Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2014
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .text:00770F40 ; =============== S U B R O U T I N E =======================================
  2. .text:00770F40
  3. .text:00770F40 ; Attributes: bp-based frame
  4. .text:00770F40
  5. .text:00770F40 ; char __thiscall sub_770F40(void *this, int pSoldier)
  6. .text:00770F40 sub_770F40      proc near               ; CODE XREF: sub_771840+A5p
  7. .text:00770F40
  8. .text:00770F40 var_10C         = dword ptr -10Ch
  9. .text:00770F40 var_108         = dword ptr -108h
  10. .text:00770F40 var_104         = dword ptr -104h
  11. .text:00770F40 var_100         = dword ptr -100h
  12. .text:00770F40 var_FC          = dword ptr -0FCh
  13. .text:00770F40 var_F8          = dword ptr -0F8h
  14. .text:00770F40 var_F4          = dword ptr -0F4h
  15. .text:00770F40 var_F0          = xmmword ptr -0F0h
  16. .text:00770F40 var_E0          = qword ptr -0E0h
  17. .text:00770F40 var_D8          = qword ptr -0D8h
  18. .text:00770F40 var_D0          = xmmword ptr -0D0h
  19. .text:00770F40 var_C0          = xmmword ptr -0C0h
  20. .text:00770F40 var_AC          = dword ptr -0ACh
  21. .text:00770F40 var_A8          = dword ptr -0A8h
  22. .text:00770F40 var_A4          = dword ptr -0A4h
  23. .text:00770F40 var_A0          = dword ptr -0A0h
  24. .text:00770F40 var_9C          = dword ptr -9Ch
  25. .text:00770F40 var_98          = dword ptr -98h
  26. .text:00770F40 var_94          = dword ptr -94h
  27. .text:00770F40 var_90          = byte ptr -90h
  28. .text:00770F40 var_80          = xmmword ptr -80h
  29. .text:00770F40 var_70          = xmmword ptr -70h
  30. .text:00770F40 var_60          = byte ptr -60h
  31. .text:00770F40 var_30          = xmmword ptr -30h
  32. .text:00770F40 var_20          = qword ptr -20h
  33. .text:00770F40 var_18          = qword ptr -18h
  34. .text:00770F40 var_10          = dword ptr -10h
  35. .text:00770F40 var_C           = dword ptr -0Ch
  36. .text:00770F40 var_8           = dword ptr -8
  37. .text:00770F40 var_4           = dword ptr -4
  38. .text:00770F40 pSoldier        = dword ptr  8
  39. .text:00770F40
  40. .text:00770F40                 push    ebp
  41. .text:00770F41                 mov     ebp, esp
  42. .text:00770F43                 and     esp, 0FFFFFFF0h
  43. .text:00770F46                 sub     esp, 114h
  44. .text:00770F4C                 push    ebx
  45. .text:00770F4D                 push    esi
  46. .text:00770F4E                 mov     esi, ecx
  47. .text:00770F50                 mov     eax, [esi]
  48. .text:00770F52                 mov     edx, [eax+2Ch]
  49. .text:00770F55                 push    edi
  50. .text:00770F56                 mov     [esp+120h+var_F4], esi
  51. .text:00770F5A                 call    edx
  52. .text:00770F5C                 test    eax, eax
  53. .text:00770F5E                 jz      short loc_770F6B
  54. .text:00770F60                 add     eax, 0FFFFFF10h
  55. .text:00770F65                 mov     [esp+120h+var_F8], eax
  56. .text:00770F69                 jmp     short loc_770F73
  57. .text:00770F6B ; ---------------------------------------------------------------------------
  58. .text:00770F6B
  59. .text:00770F6B loc_770F6B:                             ; CODE XREF: sub_770F40+1Ej
  60. .text:00770F6B                 mov     [esp+120h+var_F8], 0
  61. .text:00770F73
  62. .text:00770F73 loc_770F73:                             ; CODE XREF: sub_770F40+29j
  63. .text:00770F73                 mov     ecx, esi
  64. .text:00770F75                 call    sub_11F4020
  65. .text:00770F7A                 mov     edi, [ebp+pSoldier]
  66. .text:00770F7D                 mov     ebx, eax
  67. .text:00770F7F                 mov     eax, [edi+8]
  68. .text:00770F82                 shr     eax, 12h
  69. .text:00770F85                 test    al, 1
  70. .text:00770F87                 mov     eax, [edi+1Ch]
  71. .text:00770F8A                 mov     [esp+120h+var_104], ebx
  72. .text:00770F8E                 jz      short loc_770FA4
  73. .text:00770F90                 movzx   ecx, byte ptr [eax+6]
  74. .text:00770F94                 lea     ecx, [ecx+ecx*4]
  75. .text:00770F97                 shl     ecx, 4
  76. .text:00770F9A                 lea     edx, [ecx+eax+10h]
  77. .text:00770F9E                 mov     [esp+120h+var_FC], edx
  78. .text:00770FA2                 jmp     short loc_770FA8
  79. .text:00770FA4 ; ---------------------------------------------------------------------------
  80. .text:00770FA4
  81. .text:00770FA4 loc_770FA4:                             ; CODE XREF: sub_770F40+4Ej
  82. .text:00770FA4                 mov     [esp+120h+var_FC], eax
  83. .text:00770FA8
  84. .text:00770FA8 loc_770FA8:                             ; CODE XREF: sub_770F40+62j
  85. .text:00770FA8                 mov     eax, [esp+120h+var_F8]
  86. .text:00770FAC                 mov     ecx, [eax+8]
  87. .text:00770FAF                 mov     eax, [eax+1Ch]
  88. .text:00770FB2                 shr     ecx, 12h
  89. .text:00770FB5                 test    cl, 1
  90. .text:00770FB8                 jz      short loc_770FC8
  91. .text:00770FBA                 movzx   ecx, byte ptr [eax+6]
  92. .text:00770FBE                 lea     edx, [ecx+ecx*4]
  93. .text:00770FC1                 shl     edx, 4
  94. .text:00770FC4                 lea     eax, [edx+eax+10h]
  95. .text:00770FC8
  96. .text:00770FC8 loc_770FC8:                             ; CODE XREF: sub_770F40+78j
  97. .text:00770FC8                 movaps  xmm1, xmmword ptr [eax+30h]
  98. .text:00770FCC                 mov     eax, [esp+120h+var_FC]
  99. .text:00770FD0                 movaps  xmm0, xmmword ptr [eax+30h]
  100. .text:00770FD4                 subps   xmm0, xmm1
  101. .text:00770FD7                 movaps  [esp+120h+var_F0], xmm0
  102. .text:00770FDC                 mulps   xmm0, xmm0
  103. .text:00770FDF                 movaps  xmm2, xmm0
  104. .text:00770FE2                 movaps  xmm1, xmm0
  105. .text:00770FE5                 shufps  xmm1, xmm0, 55h
  106. .text:00770FE9                 shufps  xmm2, xmm0, 0
  107. .text:00770FED                 shufps  xmm0, xmm0, 0AAh
  108. .text:00770FF1                 addps   xmm1, xmm2
  109. .text:00770FF4                 addps   xmm1, xmm0
  110. .text:00770FF7                 cvtss2sd xmm0, xmm1
  111. .text:00770FFB                 sqrtsd  xmm0, xmm0
  112. .text:00770FFF                 cvtsd2ss xmm0, xmm0
  113. .text:00771003                 movss   [esp+120h+var_10C], xmm0
  114. .text:00771009                 movss   xmm0, dword ptr [ebx+78h]
  115. .text:0077100E                 mov     ecx, esi
  116. .text:00771010                 movss   [esp+120h+var_100], xmm0
  117. .text:00771016                 call    sub_11F2870
  118. .text:0077101B                 movss   xmm0, [esp+120h+var_100]
  119. .text:00771021                 movaps  xmm1, xmmword ptr [eax]
  120. .text:00771024                 shufps  xmm0, xmm0, 0
  121. .text:00771028                 mulps   xmm0, xmm1
  122. .text:0077102B                 mulps   xmm0, xmm0
  123. .text:0077102E                 movaps  xmm2, xmm0
  124. .text:00771031                 shufps  xmm2, xmm0, 0
  125. .text:00771035                 movaps  xmm1, xmm0
  126. .text:00771038                 shufps  xmm1, xmm0, 55h
  127. .text:0077103C                 addps   xmm1, xmm2
  128. .text:0077103F                 shufps  xmm0, xmm0, 0AAh
  129. .text:00771043                 addps   xmm1, xmm0
  130. .text:00771046                 movss   xmm0, [esp+120h+var_10C]
  131. .text:0077104C                 cvtss2sd xmm1, xmm1
  132. .text:00771050                 sqrtsd  xmm1, xmm1
  133. .text:00771054                 cvtsd2ss xmm1, xmm1
  134. .text:00771058                 cvtps2pd xmm2, xmm0
  135. .text:0077105B                 cvtss2sd xmm1, xmm1
  136. .text:0077105F                 comisd  xmm2, xmm1
  137. .text:00771063                 jbe     short loc_771070
  138. .text:00771065                 xor     al, al
  139. .text:00771067                 pop     edi
  140. .text:00771068                 pop     esi
  141. .text:00771069                 pop     ebx
  142. .text:0077106A                 mov     esp, ebp
  143. .text:0077106C                 pop     ebp
  144. .text:0077106D                 retn    4
  145. .text:00771070 ; ---------------------------------------------------------------------------
  146. .text:00771070
  147. .text:00771070 loc_771070:                             ; CODE XREF: sub_770F40+123j
  148. .text:00771070                 movaps  xmm1, [esp+120h+var_F0]
  149. .text:00771075                 mov     ecx, dword_2380B58
  150. .text:0077107B                 shufps  xmm0, xmm0, 0
  151. .text:0077107F                 divps   xmm1, xmm0
  152. .text:00771082                 movaps  [esp+120h+var_F0], xmm1
  153. .text:00771087                 mov     edx, [ebx+84h]
  154. .text:0077108D                 mov     esi, [ecx+14h]
  155. .text:00771090                 lea     ebx, [edi+0F0h]
  156. .text:00771096                 mov     ecx, ebx
  157. .text:00771098                 mov     [esp+120h+var_10C], edx
  158. .text:0077109C                 call    sub_11E4E40
  159. .text:007710A1                 push    eax
  160. .text:007710A2                 mov     eax, [esp+124h+var_10C]
  161. .text:007710A6                 push    eax
  162. .text:007710A7                 lea     ecx, [esp+128h+var_10C]
  163. .text:007710AB                 push    ecx
  164. .text:007710AC                 mov     ecx, esi
  165. .text:007710AE                 call    sub_551B90
  166. .text:007710B3                 mov     edx, [esp+120h+var_10C]
  167. .text:007710B7                 push    edx
  168. .text:007710B8                 mov     ecx, esi
  169. .text:007710BA                 call    sub_76F290
  170. .text:007710BF                 test    eax, eax
  171. .text:007710C1                 jz      short loc_7710CA
  172. .text:007710C3                 movss   xmm0, dword ptr [eax+10h]
  173. .text:007710C8                 jmp     short loc_7710D2
  174. .text:007710CA ; ---------------------------------------------------------------------------
  175. .text:007710CA
  176. .text:007710CA loc_7710CA:                             ; CODE XREF: sub_770F40+181j
  177. .text:007710CA                 movss   xmm0, ds:dword_206AF48
  178. .text:007710D2
  179. .text:007710D2 loc_7710D2:                             ; CODE XREF: sub_770F40+188j
  180. .text:007710D2                 movss   [esp+120h+var_100], xmm0
  181. .text:007710D8                 test    eax, eax
  182. .text:007710DA                 jz      short loc_7710E3
  183. .text:007710DC                 movss   xmm0, dword ptr [eax+18h]
  184. .text:007710E1                 jmp     short loc_7710E6
  185. .text:007710E3 ; ---------------------------------------------------------------------------
  186. .text:007710E3
  187. .text:007710E3 loc_7710E3:                             ; CODE XREF: sub_770F40+19Aj
  188. .text:007710E3                 xorps   xmm0, xmm0
  189. .text:007710E6
  190. .text:007710E6 loc_7710E6:                             ; CODE XREF: sub_770F40+1A1j
  191. .text:007710E6                 lea     eax, [esp+120h+var_70]
  192. .text:007710ED                 push    eax
  193. .text:007710EE                 movss   [esp+124h+var_10C], xmm0
  194. .text:007710F4                 xorps   xmm0, xmm0
  195. .text:007710F7                 push    edi
  196. .text:007710F8                 movaps  [esp+128h+var_80], xmm0
  197. .text:00771100                 movaps  [esp+128h+var_70], xmm0
  198. .text:00771108                 call    sub_7690E0
  199. .text:0077110D                 add     esp, 8
  200. .text:00771110                 test    al, al
  201. .text:00771112                 jz      short loc_77112F
  202. .text:00771114                 mov     ecx, [esp+120h+var_104]
  203. .text:00771118                 movss   xmm0, dword ptr [ecx+0F0h]
  204. .text:00771120                 cvtss2sd xmm1, [esp+120h+var_100]
  205. .text:00771126                 cvtps2pd xmm0, xmm0
  206. .text:00771129                 mulsd   xmm0, xmm1
  207. .text:0077112D                 jmp     short loc_771132
  208. .text:0077112F ; ---------------------------------------------------------------------------
  209. .text:0077112F
  210. .text:0077112F loc_77112F:                             ; CODE XREF: sub_770F40+1D2j
  211. .text:0077112F                 xorps   xmm0, xmm0
  212. .text:00771132
  213. .text:00771132 loc_771132:                             ; CODE XREF: sub_770F40+1EDj
  214. .text:00771132                 mov     edx, [esp+120h+var_F8]
  215. .text:00771136                 cvtss2sd xmm1, [esp+120h+var_10C]
  216. .text:0077113C                 mov     esi, [edx+0B8h]
  217. .text:00771142                 cvtpd2ps xmm0, xmm0
  218. .text:00771146                 movss   [esp+120h+var_104], xmm0
  219. .text:0077114C                 cvtss2sd xmm0, xmm0
  220. .text:00771150                 comisd  xmm0, xmm1
  221. .text:00771154                 jbe     loc_771223
  222. .text:0077115A                 movaps  xmm0, [esp+120h+var_80]
  223. .text:00771162                 or      [esp+120h+var_90], 1
  224. .text:0077116A                 xor     eax, eax
  225. .text:0077116C                 movaps  [esp+120h+var_C0], xmm0
  226. .text:00771171                 xorps   xmm0, xmm0
  227. .text:00771174                 movss   [esp+120h+var_A4], xmm0
  228. .text:0077117A                 movss   [esp+120h+var_A0], xmm0
  229. .text:00771183                 movaps  xmm0, [esp+120h+var_F0]
  230. .text:00771188                 mov     [esp+120h+var_AC], eax
  231. .text:0077118C                 mov     [esp+120h+var_A8], eax
  232. .text:00771190                 mov     [esp+120h+var_94], eax
  233. .text:00771197                 mov     eax, [esp+120h+var_FC]
  234. .text:0077119B                 movaps  [esp+120h+var_D0], xmm0
  235. .text:007711A0                 movq    xmm0, qword ptr [eax+30h]
  236. .text:007711A5                 or      ecx, 0FFFFFFFFh
  237. .text:007711A8                 movq    [esp+120h+var_E0], xmm0
  238. .text:007711AE                 movq    xmm0, qword ptr [eax+38h]
  239. .text:007711B3                 lea     eax, [esp+120h+var_F0]
  240. .text:007711B7                 mov     [esp+120h+var_9C], ecx
  241. .text:007711BE                 mov     [esp+120h+var_98], ecx
  242. .text:007711C5                 push    eax
  243. .text:007711C6                 mov     ecx, ebx
  244. .text:007711C8                 movq    [esp+124h+var_D8], xmm0
  245. .text:007711CE                 call    sub_11ED3A0
  246. .text:007711D3                 push    esi
  247. .text:007711D4                 lea     ecx, [esp+124h+var_E0]
  248. .text:007711D8                 mov     [esp+124h+var_98], eax
  249. .text:007711DF                 call    sub_762E70
  250. .text:007711E4                 mov     ebx, [esp+120h+var_F4]
  251. .text:007711E8                 movss   xmm0, [esp+120h+var_104]
  252. .text:007711EE                 mov     ecx, ebx
  253. .text:007711F0                 movss   [esp+120h+var_A4], xmm0
  254. .text:007711F6                 mov     [esp+120h+var_108], 0
  255. .text:007711FE                 mov     [esp+120h+var_10C], esi
  256. .text:00771202                 call    sub_11EE830
  257. .text:00771207                 mov     edx, [edi]
  258. .text:00771209                 mov     edx, [edx+0F8h]
  259. .text:0077120F                 mov     [esp+120h+var_108], eax
  260. .text:00771213                 lea     eax, [esp+120h+var_10C]
  261. .text:00771217                 push    eax
  262. .text:00771218                 lea     ecx, [esp+124h+var_E0]
  263. .text:0077121C                 push    ecx
  264. .text:0077121D                 mov     ecx, edi
  265. .text:0077121F                 call    edx
  266. .text:00771221                 jmp     short loc_771227
  267. .text:00771223 ; ---------------------------------------------------------------------------
  268. .text:00771223
  269. .text:00771223 loc_771223:                             ; CODE XREF: sub_770F40+214j
  270. .text:00771223                 mov     ebx, [esp+120h+var_F4]
  271. .text:00771227
  272. .text:00771227 loc_771227:                             ; CODE XREF: sub_770F40+2E1j
  273. .text:00771227                 lea     ecx, [esp+120h+var_60]
  274. .text:0077122E                 call    sub_1FD7220
  275. .text:00771233                 movaps  xmm0, [esp+120h+var_F0]
  276. .text:00771238                 movaps  [esp+120h+var_30], xmm0
  277. .text:00771240                 movq    xmm0, qword ptr [ebx+60h]
  278. .text:00771245                 movq    [esp+120h+var_20], xmm0
  279. .text:0077124E                 movq    xmm0, qword ptr [ebx+68h]
  280. .text:00771253                 xor     ebx, ebx
  281. .text:00771255                 movq    [esp+120h+var_18], xmm0
  282. .text:0077125E                 mov     [esp+120h+var_8], ebx
  283. .text:00771265                 mov     [esp+120h+var_C], 8
  284. .text:00771270                 cmp     esi, ebx
  285. .text:00771272                 jz      short loc_77127F
  286. .text:00771274                 mov     eax, [esi]
  287. .text:00771276                 mov     edx, [eax+10h]
  288. .text:00771279                 mov     ecx, esi
  289. .text:0077127B                 call    edx
  290. .text:0077127D                 jmp     short loc_771282
  291. .text:0077127F ; ---------------------------------------------------------------------------
  292. .text:0077127F
  293. .text:0077127F loc_77127F:                             ; CODE XREF: sub_770F40+332j
  294. .text:0077127F                 or      eax, 0FFFFFFFFh
  295. .text:00771282
  296. .text:00771282 loc_771282:                             ; CODE XREF: sub_770F40+33Dj
  297. .text:00771282                 mov     [esp+120h+var_4], eax
  298. .text:00771289                 lea     eax, [esp+120h+var_60]
  299. .text:00771290                 push    eax
  300. .text:00771291                 mov     ecx, edi
  301. .text:00771293                 call    sub_118CD30
  302. .text:00771298                 test    byte ptr [esp+120h+var_10], 1
  303. .text:007712A0                 jnz     short loc_7712B9
  304. .text:007712A2                 mov     ecx, [esp+120h+var_10]
  305. .text:007712A9                 cmp     ecx, ebx
  306. .text:007712AB                 jz      short loc_7712B9
  307. .text:007712AD                 call    sub_448320
  308. .text:007712B2                 mov     [esp+120h+var_10], ebx
  309. .text:007712B9
  310. .text:007712B9 loc_7712B9:                             ; CODE XREF: sub_770F40+360j
  311. .text:007712B9                                         ; sub_770F40+36Bj
  312. .text:007712B9                 lea     ecx, [esp+120h+var_60]
  313. .text:007712C0                 call    sub_493A70
  314. .text:007712C5                 pop     edi
  315. .text:007712C6                 pop     esi
  316. .text:007712C7                 mov     al, 1
  317. .text:007712C9                 pop     ebx
  318. .text:007712CA                 mov     esp, ebp
  319. .text:007712CC                 pop     ebp
  320. .text:007712CD                 retn    4
  321. .text:007712CD sub_770F40      endp
  322. .text:007712CD
  323. .text:007712D0
  324. .text:007712D0 ; =============== S U B R O U T I N E =======================================
  325. .text:007712D0
  326. .text:007712D0 ; Attributes: bp-based frame
  327. .text:007712D0
  328. .text:007712D0 sub_7712D0      proc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement