Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2009
1,978
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.18 KB | None | 0 0
  1. As far as I can tell, the mpdata file is basically binary storage of a bunch of structures (or perhaps one large structure). Rather than text data, it is hexadecimal storage of just the numbers themselves. The exact layout used by the programmers is immaterial, provided we can identify which bits are which. I managed to identify a few of the pieces, and changed my own stats to get back most of what I had lost. Anyway, here's the secret sauce I figured out so far, with some notes afterward:
  2.  
  3. Checksum 0x0104 (checksum over 0x0108->0x2104)
  4. Rank 0x0204
  5.  
  6. Current XP 0x0d8c
  7. Score 0x0d90
  8. Kills 0x0d94
  9. Best Streak 0x0d98
  10. Deaths 0x0d9c
  11. Headshots 0x0da8
  12. Prestige Level 0x0df0
  13.  
  14. Rank 0x0e50
  15. Prev Level XP 0x0e54
  16. Next Level XP 0x0e58
  17. Last Saved XP 0x0e5c
  18.  
  19. Thom Marksman 0x10fc
  20. Thom Expert 0x1100
  21. T100 Marksman 0x1104
  22. T100 Expert 0x1108
  23. MP40 Marksman 0x110C
  24. MP40 Expert 0x1110
  25. DP-28 Marksman? 0x116c
  26. Recon? 0x123c
  27. Air Strike? 0x1240
  28. Dogs? 0x1244
  29. Defense? 0x1248
  30. Geronimo? 0x1254
  31. Crouch? 0x125c
  32. Prone? 0x1260
  33. Grenade 0x1264
  34. Point Guard? 0x1268
  35. Knife? 0x126c
  36. Vandalism 0x1270
  37. Exposed 0x1274
  38. X-Ray? 0x1278
  39. Backdraft? 0x127c
  40. CTF Victor? 0x1298
  41.  
  42. Silent/Deadly? 0x132c
  43. Pistol Marksman 0x137c
  44. SMG Expert? 0x1388
  45. Master Chef? 0x139c
  46. Arty? 0x13a0
  47. Dog Handler 0x13a4
  48. Signal Flare 0x13ac
  49. Fumigator? 0x13b0
  50. CounterBetty? 0x13bc
  51.  
  52. Okay, now the commentary. Those items with question marks I'm not completely sure of. Other stuff I am fairly sure is correct.
  53. I'm not out to insult your intelligence, but since I don't know what you know, I'll get basic. Each listed item has a hex number next to it, which is the offset to it's location in the decrypted mpdata file. Fire up a hex editor, go to that location, and verify that whatever it is matches what your game client says. For example, let's say you have 152348 Deaths shown in "Rank & Challenges". The decimal number 152348 is 0x2531c hexadecimal. Depending on your hex editor, this might show up as 0x1c530200 instead (backward, or "little-endian" format). Anyhow, assuming that's how many deaths you have, you can look at offset 0x0d9c in your decrypted mpdata file and view/change the corresponding hex value there.
  54. After that observation, it's a simple matter of noting changes to rank/challenges/score/unlocks in the game client, then looking for corresponding changes in the decrypted mpdata file. The hard part is carefully noting everything that changes from one gameplay-session to the next, and saving the corresponding mpdata file for each gameplay-session. That way, you can compare mpdata files from each session, note their differences, and see how that corresponds to differences in score changes, unlocks, etc. What I have listed above is all I bothered to figure out for my purpose.
  55.  
  56. Okay. Let's assume you've figured out (and changed) whatever you wanted to and now want to re-encrypt the file and put it back in your game profile. I don't know what all is /required/, but I can tell you what worked once for me. I googled for a list of experience for each game level (e.g. Private I, Private II, and so forth). I wanted to restore prestige levels and experience that I had lost. So I modified the values at the following offsets to what I wanted them to be:
  57.  
  58. Rank 0x0204
  59. Current XP 0x0d8c
  60. Prestige Level 0x0df0
  61. Rank 0x0e50
  62. Prev Level 0x0e54
  63. Next Level 0x0e58
  64. Last Saved XP 0x0e5c
  65.  
  66. Note there are two "Rank" locations... I changed them both. No idea if I had to or not. Anyhow, once I made the changes, I calculated a 32-bit CRC (using my hex editor) over the bytes at offset 0x0108 through 0x2104, inclusive. Then I put that 32-bit value at offset 0x0104 in the file and saved that (again, note/correct for endian-ness).
  67.  
  68. Checksum 0x0104
  69.  
  70. Then save the file, and re-encrypt it with Luigi's tool. Finally, copy the re-encrypted mpdata file into your players->profiles->[player name] directory, and fire up cod5. If you did everything right, cod5 will act normally. If you fouled anything up, it will complain about a corrupted file and reset you back to Private I. Of course, you DID save your original mpdata file as a backup, right?
  71.  
  72. Hope all that made sense. I'd like to hear of your successful mpdata modification - please let me know how it goes.
  73.  
  74. -FadedAce
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement