Advertisement
Guest User

Untitled

a guest
Oct 26th, 2014
366
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .text:004523F0 ; int __fastcall CallFunction(int Stack, struct_Function *Function, _DWORD *a3, void *Result)
  2. .text:004523F0 CallFunction    proc near               ; CODE XREF: .text:00441800p
  3. .text:004523F0                                         ; .text:0044184Ap
  4. .text:004523F0                                         ; sub_441860+1Dp
  5. .text:004523F0                                         ; .text:004418C3p
  6. .text:004523F0                                         ; sub_4418D0+D2p
  7. .text:004523F0                                         ; sub_4418D0+112p
  8. .text:004523F0
  9. .text:004523F0 var_45C         = byte ptr -45Ch
  10. .text:004523F0 var_440         = dword ptr -440h
  11. .text:004523F0 var_43C         = dword ptr -43Ch
  12. .text:004523F0 var_434         = byte ptr -434h
  13. .text:004523F0 var_42C         = dword ptr -42Ch
  14. .text:004523F0 var_424         = dword ptr -424h
  15. .text:004523F0 var_41C         = dword ptr -41Ch
  16. .text:004523F0 tResult         = dword ptr -418h
  17. .text:004523F0 var_414         = dword ptr -414h
  18. .text:004523F0 Buffer          = byte ptr -410h
  19. .text:004523F0 var_10          = dword ptr -10h
  20. .text:004523F0 var_C           = dword ptr -0Ch
  21. .text:004523F0 var_4           = dword ptr -4
  22. .text:004523F0 arg_0           = dword ptr  8
  23. .text:004523F0 Result          = dword ptr  0Ch
  24. .text:004523F0
  25. .text:004523F0                 push    ebp
  26. .text:004523F1                 mov     ebp, esp
  27. .text:004523F3                 push    0FFFFFFFFh
  28. .text:004523F5                 push    11B934Bh
  29. .text:004523FA                 mov     eax, large fs:0
  30. .text:00452400                 push    eax
  31. .text:00452401                 sub     esp, 454h
  32. .text:00452407                 mov     eax, ___security_cookie ; jumptable 0043E033 cases 2,6,10,14
  33. .text:00452407                                         ; jumptable 00AD19AD case 13
  34. .text:00452407                                         ; jumptable 00E1B46B case 8
  35. .text:0045240C                 xor     eax, ebp
  36. .text:0045240E                 mov     [ebp+var_10], eax
  37. .text:00452411                 push    ebx
  38. .text:00452412                 push    esi
  39. .text:00452413                 push    edi
  40. .text:00452414                 push    eax
  41. .text:00452415                 lea     eax, [ebp+var_C]
  42. .text:00452418                 mov     large fs:0, eax
  43. .text:0045241E                 mov     ebx, [ebp+arg_0]
  44. .text:00452421                 mov     eax, [ebp+Result]
  45. .text:00452424                 mov     esi, edx
  46. .text:00452426                 cmp     word ptr [esi+8Ch], 0
  47. .text:0045242E                 mov     [ebp+var_414], ebx
  48. .text:00452434                 mov     edi, ecx
  49. .text:00452436                 mov     [ebp+tResult], eax
  50. .text:0045243C                 mov     [ebp+var_42C], esi
  51. .text:00452442                 jz      short loc_452455
  52. .text:00452444                 push    eax
  53. .text:00452445                 mov     eax, [esi+84h]
  54. .text:0045244B                 push    edi
  55. .text:0045244C                 mov     ecx, ebx
  56. .text:0045244E                 call    eax
  57. .text:00452450                 jmp     loc_4527C5
  58. .text:00452455 ; ---------------------------------------------------------------------------
  59. .text:00452455
  60. .text:00452455 loc_452455:                             ; CODE XREF: CallFunction+52j
  61. .text:00452455                 mov     eax, [esi+88h]
  62. .text:0045245B                 test    eax, 400h
  63. .text:00452460                 jz      short loc_4524A0
  64. .text:00452462                 mov     edx, [ebx]
  65. .text:00452464                 mov     edx, [edx+124h]
  66. .text:0045246A                 push    edi
  67. .text:0045246B                 lea     eax, [ebp+Buffer]
  68. .text:00452471                 push    eax
  69. .text:00452472                 push    esi
  70. .text:00452473                 mov     ecx, ebx
  71. .text:00452475                 call    edx
  72. .text:00452477                 test    eax, eax
  73. .text:00452479                 mov     eax, [ebp+tResult]
  74. .text:0045247F                 jnz     short loc_452492
  75. .text:00452481                 mov     edx, [esi+84h]
  76. .text:00452487                 push    eax
  77. .text:00452488                 push    edi
  78. .text:00452489                 mov     ecx, ebx
  79. .text:0045248B                 call    edx
  80. .text:0045248D                 jmp     loc_4527C5
  81. .text:00452492 ; ---------------------------------------------------------------------------
  82. .text:00452492
  83. .text:00452492 loc_452492:                             ; CODE XREF: CallFunction+8Fj
  84. .text:00452492                 push    esi             ; int
  85. .text:00452493                 push    eax             ; Dst
  86. .text:00452494                 mov     ecx, edi
  87. .text:00452496                 call    sub_4522B0
  88. .text:0045249B                 jmp     loc_4527C5
  89. .text:004524A0 ; ---------------------------------------------------------------------------
  90. .text:004524A0
  91. .text:004524A0 loc_4524A0:                             ; CODE XREF: CallFunction+70j
  92. .text:004524A0                 test    al, 2
  93. .text:004524A2                 jnz     short loc_4524CD
  94. .text:004524A4                 mov     edx, [ebx]
  95. .text:004524A6                 mov     edx, [edx+124h]
  96. .text:004524AC                 push    edi
  97. .text:004524AD                 lea     eax, [ebp+Buffer]
  98. .text:004524B3                 push    eax
  99. .text:004524B4                 push    esi
  100. .text:004524B5                 mov     ecx, ebx
  101. .text:004524B7                 call    edx
  102. .text:004524B9                 mov     eax, [ebp+tResult]
  103. .text:004524BF                 push    esi             ; int
  104. .text:004524C0                 push    eax             ; Dst
  105. .text:004524C1                 mov     ecx, edi
  106. .text:004524C3                 call    sub_4522B0
  107. .text:004524C8                 jmp     loc_4527C5
  108. .text:004524CD ; ---------------------------------------------------------------------------
  109. .text:004524CD
  110. .text:004524CD loc_4524CD:                             ; CODE XREF: CallFunction+B2j
  111. .text:004524CD                 mov     eax, [esi+48h]
  112. .text:004524D0                 test    eax, eax
  113. .text:004524D2                 jnz     short loc_4524DE
  114. .text:004524D4                 xor     ebx, ebx
  115. .text:004524D6                 mov     [ebp+var_424], ebx
  116. .text:004524DC                 jmp     short loc_4524F1
  117. .text:004524DE ; ---------------------------------------------------------------------------
  118. .text:004524DE
  119. .text:004524DE loc_4524DE:                             ; CODE XREF: CallFunction+E2j
  120. .text:004524DE                 add     eax, 7
  121. .text:004524E1                 and     eax, 0FFFFFFF8h
  122. .text:004524E4                 call    __alloca_probe_16
  123. .text:004524E9                 mov     [ebp+var_424], esp
  124. .text:004524EF                 mov     ebx, esp
  125. .text:004524F1
  126. .text:004524F1 loc_4524F1:                             ; CODE XREF: CallFunction+ECj
  127. .text:004524F1                 mov     eax, [esi+48h]
  128. .text:004524F4                 push    eax             ; Size
  129. .text:004524F5                 push    0               ; Val
  130. .text:004524F7                 push    ebx             ; Dst
  131. .text:004524F8                 call    memset
  132. .text:004524FD                 mov     ecx, [ebp+var_414]
  133. .text:00452503                 add     esp, 0Ch
  134. .text:00452506                 push    edi
  135. .text:00452507                 push    ebx
  136. .text:00452508                 push    0
  137. .text:0045250A                 push    ecx
  138. .text:0045250B                 mov     ecx, esi
  139. .text:0045250D                 lea     eax, [ebp+var_45C]
  140. .text:00452513                 call    sub_454CB0
  141. .text:00452518                 mov     [ebp+var_4], 0
  142. .text:0045251F                 mov     eax, [edi+1Ch]
  143. .text:00452522                 cmp     byte ptr [eax], 16h
  144. .text:00452525                 mov     esi, [esi+44h]
  145. .text:00452528                 lea     edx, [ebp+var_434]
  146. .text:0045252E                 mov     [ebp+var_41C], edx
  147. .text:00452534                 jz      loc_452678
  148. .text:0045253A                 lea     ebx, [ebx+0]
  149. .text:00452540
  150. .text:00452540 loc_452540:                             ; CODE XREF: CallFunction+282j
  151. .text:00452540                 mov     eax, [esi+50h]
  152. .text:00452543                 and     dword_1A7F79C, 0FFFFFFFDh
  153. .text:0045254A                 xor     ecx, ecx
  154. .text:0045254C                 and     eax, 100h
  155. .text:00452551                 or      eax, ecx
  156. .text:00452553                 mov     eax, [edi+1Ch]
  157. .text:00452556                 movzx   edx, byte ptr [eax]
  158. .text:00452559                 mov     GPropAddr, ecx
  159. .text:0045255F                 mov     GPropObject, ecx
  160. .text:00452565                 mov     ecx, [edi+18h]
  161. .text:00452568                 jz      loc_4525FA
  162. .text:0045256E                 inc     eax
  163. .text:0045256F                 push    0
  164. .text:00452571                 mov     [edi+1Ch], eax
  165. .text:00452574                 mov     edx, dword_193AAA0[edx*4]
  166. .text:0045257B                 push    edi
  167. .text:0045257C                 call    edx ; dword_193AAA0
  168. .text:0045257E                 mov     eax, 10h
  169. .text:00452583                 call    __alloca_probe
  170. .text:00452588                 mov     eax, GPropAddr
  171. .text:0045258D                 mov     ecx, esp
  172. .text:0045258F                 test    eax, eax
  173. .text:00452591                 jnz     short loc_452598
  174. .text:00452593                 mov     eax, [esi+68h]
  175. .text:00452596                 add     eax, ebx
  176. .text:00452598
  177. .text:00452598 loc_452598:                             ; CODE XREF: CallFunction+1A1j
  178. .text:00452598                 mov     edx, [ebp+var_41C]
  179. .text:0045259E                 mov     [ecx+4], eax
  180. .text:004525A1                 mov     [ecx], esi
  181. .text:004525A3                 mov     ebx, eax
  182. .text:004525A5                 mov     eax, [edx]
  183. .text:004525A7                 test    eax, eax
  184. .text:004525A9                 jz      short loc_4525BB
  185. .text:004525AB                 mov     [eax+8], ecx
  186. .text:004525AE                 mov     eax, [edx]
  187. .text:004525B0                 add     eax, 8
  188. .text:004525B3                 mov     [ebp+var_41C], eax
  189. .text:004525B9                 jmp     short loc_4525BD
  190. .text:004525BB ; ---------------------------------------------------------------------------
  191. .text:004525BB
  192. .text:004525BB loc_4525BB:                             ; CODE XREF: CallFunction+1B9j
  193. .text:004525BB                 mov     [edx], ecx
  194. .text:004525BD
  195. .text:004525BD loc_4525BD:                             ; CODE XREF: CallFunction+1C9j
  196. .text:004525BD                 cmp     GPropObject, 0
  197. .text:004525C4                 jz      short loc_452612
  198. .text:004525C6                 mov     ecx, GProperty
  199. .text:004525CC                 test    ecx, ecx
  200. .text:004525CE                 jz      short loc_452612
  201. .text:004525D0                 mov     eax, [ecx+50h]
  202. .text:004525D3                 and     eax, 20h
  203. .text:004525D6                 xor     edx, edx
  204. .text:004525D8                 or      eax, edx
  205. .text:004525DA                 jz      short loc_452612
  206. .text:004525DC                 mov     eax, [esi+50h]
  207. .text:004525DF                 and     eax, 2
  208. .text:004525E2                 or      eax, edx
  209. .text:004525E4                 jnz     short loc_452612
  210. .text:004525E6                 mov     eax, GPropObject
  211. .text:004525EB                 mov     edx, [eax]
  212. .text:004525ED                 push    ecx
  213. .text:004525EE                 mov     ecx, eax
  214. .text:004525F0                 mov     eax, [edx+0D8h]
  215. .text:004525F6                 call    eax
  216. .text:004525F8                 jmp     short loc_452612
  217. .text:004525FA ; ---------------------------------------------------------------------------
  218. .text:004525FA
  219. .text:004525FA loc_4525FA:                             ; CODE XREF: CallFunction+178j
  220. .text:004525FA                 mov     ebx, [esi+68h]
  221. .text:004525FD                 add     ebx, [ebp+var_43C]
  222. .text:00452603                 inc     eax
  223. .text:00452604                 push    ebx
  224. .text:00452605                 mov     [edi+1Ch], eax
  225. .text:00452608                 mov     edx, dword_193AAA0[edx*4]
  226. .text:0045260F                 push    edi
  227. .text:00452610                 call    edx ; dword_193AAA0
  228. .text:00452612
  229. .text:00452612 loc_452612:                             ; CODE XREF: CallFunction+1D4j
  230. .text:00452612                                         ; CallFunction+1DEj
  231. .text:00452612                                         ; CallFunction+1EAj
  232. .text:00452612                                         ; CallFunction+1F4j
  233. .text:00452612                                         ; CallFunction+208j
  234. .text:00452612                 mov     eax, [esi+50h]
  235. .text:00452615                 and     eax, 10h
  236. .text:00452618                 xor     ecx, ecx
  237. .text:0045261A                 or      eax, ecx
  238. .text:0045261C                 jz      short loc_452663
  239. .text:0045261E                 test    byte ptr dword_1A7F79C, 2
  240. .text:00452625                 jz      short loc_45263C
  241. .text:00452627                 mov     eax, [esi+34h]
  242. .text:0045262A                 test    dword ptr [eax+0ACh], 100000h
  243. .text:00452634                 jz      short loc_45263C
  244. .text:00452636                 push    ebx
  245. .text:00452637                 call    sub_490AF0
  246. .text:0045263C ; ---------------------------------------------------------------------------
  247. .text:0045263C
  248. .text:0045263C loc_45263C:                             ; CODE XREF: CallFunction+235j
  249. .text:0045263C                                         ; CallFunction+244j
  250. .text:0045263C                 mov     eax, [ebp+var_440]
  251. .text:00452642                 movzx   edx, byte ptr [eax]
  252. .text:00452645                 mov     edx, dword_193AAA0[edx*4]
  253. .text:0045264C                 push    ebx
  254. .text:0045264D                 lea     ecx, [ebp+var_45C]
  255. .text:00452653                 inc     eax
  256. .text:00452654                 push    ecx
  257. .text:00452655                 mov     ecx, [ebp+var_414]
  258. .text:0045265B                 mov     [ebp+var_440], eax
  259. .text:00452661                 call    edx ; dword_193AAA0
  260. .text:00452663
  261. .text:00452663 loc_452663:                             ; CODE XREF: CallFunction+22Cj
  262. .text:00452663                 mov     eax, [edi+1Ch]
  263. .text:00452666                 cmp     byte ptr [eax], 16h
  264. .text:00452669                 mov     esi, [esi+40h]
  265. .text:0045266C                 mov     ebx, [ebp+var_424]
  266. .text:00452672                 jnz     loc_452540
  267. .text:00452678
  268. .text:00452678 loc_452678:                             ; CODE XREF: CallFunction+144j
  269. .text:00452678                 inc     dword ptr [edi+1Ch]
  270. .text:0045267B                 test    esi, esi
  271. .text:0045267D                 jz      loc_452719
  272. .text:00452683
  273. .text:00452683 loc_452683:                             ; CODE XREF: CallFunction+323j
  274. .text:00452683                 mov     ecx, [esi+50h]
  275. .text:00452686                 mov     edx, [esi+54h]
  276. .text:00452689                 mov     eax, ecx
  277. .text:0045268B                 mov     [ebp+var_424], edx
  278. .text:00452691                 and     eax, 10h
  279. .text:00452694                 xor     edx, edx
  280. .text:00452696                 or      eax, edx
  281. .text:00452698                 jz      short loc_452719
  282. .text:0045269A                 xor     eax, eax
  283. .text:0045269C                 and     ecx, 100h
  284. .text:004526A2                 or      ecx, eax
  285. .text:004526A4                 mov     GPropAddr, eax
  286. .text:004526A9                 mov     GPropObject, eax
  287. .text:004526AE                 jz      short loc_4526E2
  288. .text:004526B0                 lea     eax, [edx+10h]
  289. .text:004526B3                 call    __alloca_probe
  290. .text:004526B8                 mov     ecx, [esi+68h]
  291. .text:004526BB                 mov     edx, [ebp+var_41C]
  292. .text:004526C1                 add     ecx, ebx
  293. .text:004526C3                 mov     eax, esp
  294. .text:004526C5                 mov     [eax+4], ecx
  295. .text:004526C8                 mov     [eax], esi
  296. .text:004526CA                 mov     ecx, [edx]
  297. .text:004526CC                 test    ecx, ecx
  298. .text:004526CE                 jz      short loc_4526E0
  299. .text:004526D0                 mov     [ecx+8], eax
  300. .text:004526D3                 mov     edx, [edx]
  301. .text:004526D5                 add     edx, 8
  302. .text:004526D8                 mov     [ebp+var_41C], edx
  303. .text:004526DE                 jmp     short loc_4526E2
  304. .text:004526E0 ; ---------------------------------------------------------------------------
  305. .text:004526E0
  306. .text:004526E0 loc_4526E0:                             ; CODE XREF: CallFunction+2DEj
  307. .text:004526E0                 mov     [edx], eax
  308. .text:004526E2
  309. .text:004526E2 loc_4526E2:                             ; CODE XREF: CallFunction+2BEj
  310. .text:004526E2                                         ; CallFunction+2EEj
  311. .text:004526E2                 mov     eax, [esi+68h]
  312. .text:004526E5                 mov     ecx, [ebp+var_440]
  313. .text:004526EB                 movzx   edx, byte ptr [ecx]
  314. .text:004526EE                 mov     edx, dword_193AAA0[edx*4]
  315. .text:004526F5                 add     eax, ebx
  316. .text:004526F7                 inc     ecx
  317. .text:004526F8                 push    eax
  318. .text:004526F9                 lea     eax, [ebp+var_45C]
  319. .text:004526FF                 mov     [ebp+var_440], ecx
  320. .text:00452705                 mov     ecx, [ebp+var_414]
  321. .text:0045270B                 push    eax
  322. .text:0045270C                 call    edx ; dword_193AAA0
  323. .text:0045270E                 mov     esi, [esi+40h]
  324. .text:00452711                 test    esi, esi
  325. .text:00452713                 jnz     loc_452683
  326. .text:00452719
  327. .text:00452719 loc_452719:                             ; CODE XREF: CallFunction+28Dj
  328. .text:00452719                                         ; CallFunction+2A8j
  329. .text:00452719                 mov     eax, [edi+1Ch]
  330. .text:0045271C                 cmp     byte ptr [eax], 41h
  331. .text:0045271F                 jnz     short loc_452731
  332. .text:00452721                 mov     ecx, [edi+18h]  ; _DWORD
  333. .text:00452724                 push    0               ; _DWORD
  334. .text:00452726                 inc     eax
  335. .text:00452727                 push    edi             ; _DWORD
  336. .text:00452728                 mov     [edi+1Ch], eax
  337. .text:0045272B                 call    dword_193ABA4
  338. .text:00452731
  339. .text:00452731 loc_452731:                             ; CODE XREF: CallFunction+32Fj
  340. .text:00452731                 mov     edi, [ebp+var_42C]
  341. .text:00452737                 mov     esi, [edi+94h]
  342. .text:0045273D                 test    esi, esi
  343. .text:0045273F                 jz      short loc_452766
  344. .text:00452741
  345. .text:00452741 loc_452741:                             ; CODE XREF: CallFunction+374j
  346. .text:00452741                 mov     eax, [esi+34h]
  347. .text:00452744                 test    dword ptr [eax+0ACh], 100000h
  348. .text:0045274E                 jz      short loc_45275F
  349. .text:00452750                 mov     ecx, [esi+68h]
  350. .text:00452753                 add     ecx, [ebp+var_43C]
  351. .text:00452759                 push    ecx
  352. .text:0045275A                 call    sub_490AF0
  353. .text:0045275F ; ---------------------------------------------------------------------------
  354. .text:0045275F
  355. .text:0045275F loc_45275F:                             ; CODE XREF: CallFunction+35Ej
  356. .text:0045275F                 mov     esi, [esi+40h]
  357. .text:00452762                 test    esi, esi
  358. .text:00452764                 jnz     short loc_452741
  359. .text:00452766
  360. .text:00452766 loc_452766:                             ; CODE XREF: CallFunction+34Fj
  361. .text:00452766                 mov     edx, [ebp+tResult]
  362. .text:0045276C                 mov     ecx, [ebp+var_414]
  363. .text:00452772                 push    edx
  364. .text:00452773                 lea     eax, [ebp+var_45C]
  365. .text:00452779                 push    eax
  366. .text:0045277A                 call    sub_4527F0
  367. .text:0045277F                 mov     esi, [edi+68h]
  368. .text:00452782                 test    esi, esi
  369. .text:00452784                 jz      short loc_4527C5
  370. .text:00452786
  371. .text:00452786 loc_452786:                             ; CODE XREF: CallFunction+3D3j
  372. .text:00452786                 mov     ecx, [esi+50h]
  373. .text:00452789                 mov     edx, [esi+54h]
  374. .text:0045278C                 mov     eax, ecx
  375. .text:0045278E                 mov     [ebp+var_42C], edx
  376. .text:00452794                 and     eax, 100h
  377. .text:00452799                 xor     edx, edx
  378. .text:0045279B                 or      eax, edx
  379. .text:0045279D                 jz      short loc_4527A8
  380. .text:0045279F                 and     ecx, 10h
  381. .text:004527A2                 xor     eax, eax
  382. .text:004527A4                 or      ecx, eax
  383. .text:004527A6                 jz      short loc_4527BE
  384. .text:004527A8
  385. .text:004527A8 loc_4527A8:                             ; CODE XREF: CallFunction+3ADj
  386. .text:004527A8                 mov     ecx, [esi+68h]
  387. .text:004527AB                 add     ecx, [ebp+var_43C]
  388. .text:004527B1                 mov     eax, [esi]
  389. .text:004527B3                 mov     edx, [eax+19Ch]
  390. .text:004527B9                 push    ecx
  391. .text:004527BA                 mov     ecx, esi
  392. .text:004527BC                 call    edx
  393. .text:004527BE
  394. .text:004527BE loc_4527BE:                             ; CODE XREF: CallFunction+3B6j
  395. .text:004527BE                 mov     esi, [esi+74h]
  396. .text:004527C1                 test    esi, esi
  397. .text:004527C3                 jnz     short loc_452786
  398. .text:004527C5
  399. .text:004527C5 loc_4527C5:                             ; CODE XREF: CallFunction+60j
  400. .text:004527C5                                         ; CallFunction+9Dj
  401. .text:004527C5                                         ; CallFunction+ABj
  402. .text:004527C5                                         ; CallFunction+D8j
  403. .text:004527C5                                         ; CallFunction+394j
  404. .text:004527C5                 and     dword_1A7F79C, 0FFFFFFFDh
  405. .text:004527CC                 lea     esp, [ebp-470h]
  406. .text:004527D2                 mov     ecx, [ebp+var_C]
  407. .text:004527D5                 mov     large fs:0, ecx
  408. .text:004527DC                 pop     ecx
  409. .text:004527DD                 pop     edi
  410. .text:004527DE                 pop     esi
  411. .text:004527DF                 pop     ebx
  412. .text:004527E0                 mov     ecx, [ebp+var_10]
  413. .text:004527E3                 xor     ecx, ebp
  414. .text:004527E5                 call    @__security_check_cookie@4 ; __security_check_cookie(x)
  415. .text:004527EA                 mov     esp, ebp
  416. .text:004527EC                 pop     ebp
  417. .text:004527ED                 retn    8
  418. .text:004527ED CallFunction    endp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement