Advertisement
shiftandzplz

Untitled

May 14th, 2021
373
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.62 KB | None | 0 0
  1. void __cdecl sub_465750(int a1, int a2)
  2. {
  3. int v2; // esi
  4. double v3; // st7
  5. float v4; // [esp+8h] [ebp+4h]
  6. float v5; // [esp+8h] [ebp+4h]
  7. float v6; // [esp+8h] [ebp+4h]
  8.  
  9. v2 = a1;
  10. if ( *(a1 + 0x24) - *(a2 + 8) > 0.0 )
  11. {
  12. v4 = *(a1 + 0x80) + 39.0 - *(a1 + 36);
  13. if ( v4 < 0.1000000014901161 )
  14. {
  15. v3 = 0.0;
  16. LABEL_4:
  17. *(v2 + 0x30) = v3;
  18. return;
  19. }
  20. v5 = *(v2 + 84) * (v4 + v4);
  21. v6 = sqrt(v5);
  22. v3 = v6;
  23. if ( v6 < *(v2 + 48) )
  24. goto LABEL_4;
  25. }
  26. }
  27.  
  28.  
  29. .text:00465750 sub_465750 proc near ; CODE XREF: PM_StepSlideMove+501↓p
  30. .text:00465750
  31. .text:00465750 arg_0 = dword ptr 4
  32. .text:00465750 arg_4 = dword ptr 8
  33. .text:00465750
  34. .text:00465750 000 8B 44 24 08 mov eax, [esp+arg_4]
  35. .text:00465754 000 56 push esi
  36. .text:00465755 004 8B 74 24 08 mov esi, [esp+4+arg_0]
  37. .text:00465759 004 D9 46 24 fld dword ptr [esi+24h] ; Load Real
  38. .text:0046575C 004 D8 60 08 fsub dword ptr [eax+8] ; Subtract Real
  39. .text:0046575F 004 DC 1D D0 1F 6F 00 fcomp ds:dbl_6F1FD0 ; Compare Real and Pop
  40. .text:00465765 004 DF E0 fnstsw ax ; Store Status Word (no wait)
  41. .text:00465767 004 F6 C4 41 test ah, 41h ; Logical Compare
  42. .text:0046576A 004 75 63 jnz short loc_4657CF ; Jump if Not Zero (ZF=0)
  43. .text:0046576C 004 D9 86 80 00 00 00 fld dword ptr [esi+80h] ; Load Real
  44. .text:00465772 004 DC 05 48 EC 67 00 fadd ds:dbl_67EC48 ; Add Real
  45. .text:00465778 004 D8 66 24 fsub dword ptr [esi+24h] ; Subtract Real
  46. .text:0046577B 004 D9 5C 24 08 fstp [esp+4+arg_0] ; Store Real and Pop
  47. .text:0046577F 004 D9 44 24 08 fld [esp+4+arg_0] ; Load Real
  48. .text:00465783 004 DC 15 F0 22 6F 00 fcom ds:dbl_6F22F0 ; Compare Real
  49. .text:00465789 004 DF E0 fnstsw ax ; Store Status Word (no wait)
  50. .text:0046578B 004 F6 C4 05 test ah, 5 ; Logical Compare
  51. .text:0046578E 004 7A 09 jp short loc_465799 ; Jump if Parity (PF=1)
  52. .text:00465790 004 DD D8 fstp st ; Store Real and Pop
  53. .text:00465792 004 D9 EE fldz ; Load +0.0
  54. .text:00465794
  55. .text:00465794 loc_465794: ; CODE XREF: sub_465750+7B↓j
  56. .text:00465794 004 D9 5E 30 fstp dword ptr [esi+30h] ; Store Real and Pop
  57. .text:00465797 004 5E pop esi
  58. .text:00465798 000 C3 retn ; Return Near from Procedure
  59. .text:00465799 ; ---------------------------------------------------------------------------
  60. .text:00465799
  61. .text:00465799 loc_465799: ; CODE XREF: sub_465750+3E↑j
  62. .text:00465799 004 DB 46 54 fild dword ptr [esi+54h] ; Load Integer
  63. .text:0046579C 004 D9 C9 fxch st(1) ; Exchange Registers
  64. .text:0046579E 004 DC C0 fadd st, st ; Add Real
  65. .text:004657A0 004 DE C9 fmulp st(1), st ; Multiply Real and Pop
  66. .text:004657A2 004 D9 5C 24 08 fstp [esp+4+arg_0] ; Store Real and Pop
  67. .text:004657A6 004 D9 44 24 08 fld [esp+4+arg_0] ; Load Real
  68. .text:004657AA 004 E8 31 75 1F 00 call __CIsqrt ; Call Procedure
  69. .text:004657AF 004 D9 5C 24 08 fstp [esp+4+arg_0] ; Store Real and Pop
  70. .text:004657B3 004 D9 44 24 08 fld [esp+4+arg_0] ; Load Real
  71. .text:004657B7 004 D9 5C 24 08 fstp [esp+4+arg_0] ; Store Real and Pop
  72. .text:004657BB 004 D9 46 30 fld dword ptr [esi+30h] ; Load Real
  73. .text:004657BE 004 D9 44 24 08 fld [esp+4+arg_0] ; Load Real
  74. .text:004657C2 004 D8 D1 fcom st(1) ; Compare Real
  75. .text:004657C4 004 DF E0 fnstsw ax ; Store Status Word (no wait)
  76. .text:004657C6 004 DD D9 fstp st(1) ; Store Real and Pop
  77. .text:004657C8 004 F6 C4 05 test ah, 5 ; Logical Compare
  78. .text:004657CB 004 7B C7 jnp short loc_465794 ; Jump if Not Parity (PF=0)
  79. .text:004657CD 004 DD D8 fstp st ; Store Real and Pop
  80. .text:004657CF
  81. .text:004657CF loc_4657CF: ; CODE XREF: sub_465750+1A↑j
  82. .text:004657CF 004 5E pop esi
  83. .text:004657D0 000 C3 retn ; Return Near from Procedure
  84. .text:004657D0 sub_465750 endp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement