Guest User

Untitled

a guest
Dec 18th, 2016
818
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. DWORD FixSwimReturn=0x68A50E;
  2. int FixSwimAllow;
  3. float TimeStepOriginal=1.66;
  4. void _declspec(naked) FixSwim()
  5. {
  6. _asm
  7. {
  8. pushfd
  9. pushad
  10. }
  11.  
  12. if(FixSwimAllow)
  13. {
  14. FixSwimAllow=0;
  15. _asm
  16. {
  17. popad
  18. popfd
  19.  
  20. fsub st, st(1)
  21.  
  22. fld dword ptr [esp+16]
  23. lea eax, [esi+44h]
  24. mov ecx, eax
  25. fmul st, st(1)
  26.  
  27. fdiv ds:0xB7CB5C
  28. fmul TimeStepOriginal
  29.  
  30. fstp dword ptr [esp+28]
  31.  
  32. fld dword ptr [esp+20]
  33. fmul st, st(1)
  34.  
  35. fdiv ds:0xB7CB5C
  36. fmul TimeStepOriginal
  37.  
  38. fstp dword ptr [esp+32]
  39. fmul dword ptr [esp+24]
  40.  
  41. fdiv ds:0xB7CB5C
  42. fmul TimeStepOriginal
  43.  
  44. jmp FixSwimReturn
  45. }
  46. }
  47. else _asm
  48. {
  49. popad
  50. popfd
  51.  
  52. fsub st, st(1)
  53.  
  54. fld dword ptr [esp+16]
  55. lea eax, [esi+44h]
  56. mov ecx, eax
  57. fmul st, st(1)
  58.  
  59. fstp dword ptr [esp+28]
  60.  
  61. fld dword ptr [esp+20]
  62. fmul st, st(1)
  63.  
  64. fstp dword ptr [esp+32]
  65. fmul dword ptr [esp+24]
  66.  
  67. jmp FixSwimReturn
  68. }
  69. }
  70.  
  71. DWORD CheckSwim1Return=0x68A218;
  72. void _declspec(naked) CheckSwim1()
  73. {
  74. _asm
  75. {
  76. mov eax, [esi+18h]
  77. push ebx
  78. push 137h
  79.  
  80. pushfd
  81. pushad
  82. }
  83.  
  84. FixSwimAllow=1;
  85.  
  86. _asm
  87. {
  88. popad
  89. popfd
  90.  
  91. jmp CheckSwim1Return
  92. }
  93. }
  94.  
  95. DWORD CheckSwim2Return=0x68A443;
  96. void _declspec(naked) CheckSwim2()
  97. {
  98. _asm
  99. {
  100. mov eax, [esi+14h]
  101. mov ecx, [esi+4D8h]
  102.  
  103. pushfd
  104. pushad
  105. }
  106.  
  107. FixSwimAllow=1;
  108.  
  109. _asm
  110. {
  111. popad
  112. popfd
  113.  
  114. jmp CheckSwim2Return
  115. }
  116. }
  117.  
  118. HookInstall(0x68A4EF,(DWORD)FixSwim);
  119. HookInstall(0x68A20F,(DWORD)CheckSwim1);
  120. HookInstall(0x68A43A,(DWORD)CheckSwim2);
  121.  
  122. HookInstall jmp E9
RAW Paste Data