Advertisement
Guest User

Add GW_MonsterBookCode::Decode to CharacterData::Decode

a guest
Aug 16th, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [enable]
  2. alloc(hook,150)
  3. label(org)
  4. label(fLoop)
  5. label(incCount)
  6.  
  7. 004B81B4: //CharacterData::Decode
  8. jmp hook
  9. nop
  10.  
  11. hook:
  12. mov eax,[ebp-38]
  13. and eax,00010000
  14. xor ecx,ecx
  15. or eax,ecx
  16. je org
  17. //hacky
  18. mov [ebp+0C],00
  19. lea eax,[ebp+0C]
  20. push eax
  21. push [ebp+08]
  22. call 004B6DB0 //GW_MonsterBookCode::Decode
  23. pop ecx
  24. pop ecx
  25. push esi
  26. xor esi,esi
  27. fLoop:
  28. mov eax,[ebp+0C]
  29. cmp eax,eax
  30. je org
  31. cmp esi,[eax-04]
  32. jae org
  33. lea eax,[eax+esi*8]
  34. mov eax,[eax+04]
  35. lea ecx,[ebp-24]
  36. mov [ebp-20],eax
  37. call 004B8B3D //InterlockedIncrement_1
  38. mov eax,[ebp-20]
  39. movzx eax,word ptr [eax]
  40. movzx eax,word ptr [eax]
  41. add eax,002450E0
  42. mov [ebp-28],eax
  43. lea eax,[ebp-24]
  44. push eax
  45. lea eax,[ebp-28]
  46. push eax
  47. lea ecx,[edi+00000573]
  48. mov byte ptr [ebp-04],11
  49. call 007B445D //ZMap<long,ZRef<GW_MonsterBookCard>,long>::Insert
  50. cmp [ebp-20],ebx
  51. mov byte ptr [ebp-04],10
  52. je incCount
  53. push ebx
  54. lea ecx,[ebp-24]
  55. call 004B8BA3 //ZRef<GW_MonsterBookCard>::~ZRef<GW_MonsterBookCard>
  56. mov [ebp-20],ebx
  57. incCount:
  58. inc esi
  59. jmp fLoop
  60.  
  61. org:
  62. pop esi
  63. mov esi,[ebp-38]
  64. mov edi,[ebp-34]
  65. jmp 004B81BA
  66.  
  67. [disable]
  68. 004B81B4:
  69. mov esi,[ebp-38]
  70. mov edi,[ebp-34]
  71.  
  72. dealloc(hook)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement