View Single Post
Old 28th September 2008, 11:57   #177  |  Link
Oopho2ei
Guest
 
Posts: n/a
1. You should work more with our repository so it contains always the latest version. Only upload source and documentation there and no files which can be derived from the source like binaries and logfiles.
I have updated the source in the repository now. You can still upload the binaries to "uploaded.to" for a daily/weekly snapshot.

2. In my parameter checking there is no bit masking and still you use this "MASK_UNS" which masks the most significant bit. All the checks should work perfectly as they are. If they don't please report the problem and we will see how to fix it.

3. You should store the player keys in an array of arrays so you can access them like this OBF_PLAYER_KEY[opOrKeyID] together with a range check.

Code:
	  if (((int)opOrKeyID) == 0x00000000){
		return(obfAES(OBF_PLAYER_KEY0,pDst,pSrc,len,pKey));

	  }

	  if (((int)opOrKeyID) == 0x00000001){
		return(obfAES(OBF_PLAYER_KEY1,pDst,pSrc,len,pKey));

	  }

	  if (((int)opOrKeyID) == 0x00000002){
		return(obfAES(OBF_PLAYER_KEY2,pDst,pSrc,len,pKey));

	  }

	  if (((int)opOrKeyID) == 0x00000003){
		return(obfAES(OBF_PLAYER_KEY3,pDst,pSrc,len,pKey));

	  }

	  if (((int)opOrKeyID) == 0x00000004){
		return(obfAES(OBF_PLAYER_KEY4,pDst,pSrc,len,pKey));

	  }

	  if (((int)opOrKeyID) == 0x00000005){
		return(obfAES(OBF_PLAYER_KEY5,pDst,pSrc,len,pKey));

	  }

	  if (((int)opOrKeyID) == 0x00000006){
		return(obfAES(OBF_PLAYER_KEY6,pDst,pSrc,len,pKey));

	  }
It replaces all this by a single statement.

4. I would like to see a separate file for each of those:
- instruction processing
- decoding of cmd39, parameter fetching, parameter checking, return code interpretation
- trap implementations
- obfuscated aes implementation and player keys

So the code looks well structured and we don't squeeze everything into BDVM.java which will grow larger over time.

Quote:
Originally Posted by schluppo View Post
Traps 0x120 and 0x530 seem to be most important to me now (since they require player-data to be emulated).
I am working on TRAP_PrivateKey() (#0120)

Last edited by Oopho2ei; 28th September 2008 at 12:18.
  Reply With Quote