Advertisement
Guest User

Untitled

a guest
Dec 27th, 2013
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .text:080C73A0 ; int __cdecl sub_80C73A0(struct in_addr in, __int16, void *buf, int, int fd)
  2. .text:080C73A0 sub_80C73A0     proc near               ; CODE XREF: sub_808E6C0+A6p
  3. .text:080C73A0
  4. .text:080C73A0 var_7C          = dword ptr -7Ch
  5. .text:080C73A0 s               = dword ptr -78h
  6. .text:080C73A0 var_74          = dword ptr -74h
  7. .text:080C73A0 var_70          = dword ptr -70h
  8. .text:080C73A0 var_6C          = dword ptr -6Ch
  9. .text:080C73A0 var_68          = dword ptr -68h
  10. .text:080C73A0 var_64          = dword ptr -64h
  11. .text:080C73A0 var_60          = dword ptr -60h
  12. .text:080C73A0 var_5C          = dword ptr -5Ch
  13. .text:080C73A0 var_58          = dword ptr -58h
  14. .text:080C73A0 var_54          = dword ptr -54h
  15. .text:080C73A0 var_50          = dword ptr -50h
  16. .text:080C73A0 var_4C          = dword ptr -4Ch
  17. .text:080C73A0 var_48          = dword ptr -48h
  18. .text:080C73A0 src             = dword ptr -44h
  19. .text:080C73A0 n               = dword ptr -40h
  20. .text:080C73A0 ptr             = dword ptr -3Ch
  21. .text:080C73A0 var_38          = dword ptr -38h
  22. .text:080C73A0 var_34          = dword ptr -34h
  23. .text:080C73A0 var_20          = dword ptr -20h
  24. .text:080C73A0 var_1C          = dword ptr -1Ch
  25. .text:080C73A0 var_C           = dword ptr -0Ch
  26. .text:080C73A0 var_8           = dword ptr -8
  27. .text:080C73A0 var_4           = dword ptr -4
  28. .text:080C73A0 in              = in_addr ptr  8
  29. .text:080C73A0 arg_4           = word ptr  0Ch
  30. .text:080C73A0 buf             = dword ptr  10h
  31. .text:080C73A0 arg_C           = dword ptr  14h
  32. .text:080C73A0 fd              = dword ptr  18h
  33. .text:080C73A0
  34. .text:080C73A0                 push    ebp
  35. .text:080C73A1                 mov     ebp, esp
  36. .text:080C73A3                 sub     esp, 0A8h
  37. .text:080C73A9                 mov     [ebp+var_C], ebx
  38. .text:080C73AC                 mov     ebx, [ebp+arg_C]
  39. .text:080C73AF                 mov     [ebp+var_8], esi
  40. .text:080C73B2                 mov     esi, [ebp+in.s_addr]
  41. .text:080C73B5                 cmp     ebx, 4
  42. .text:080C73B8                 mov     [ebp+var_4], edi
  43. .text:080C73BB                 mov     edi, [ebp+buf]
  44. .text:080C73BE                 movzx   edx, [ebp+arg_4]
  45. .text:080C73C2                 jle     short loc_80C73CC
  46. .text:080C73C4                 cmp     dword ptr [edi], 504D4153h
  47. .text:080C73CA                 jz      short loc_80C73E0
  48. .text:080C73CC
  49. .text:080C73CC loc_80C73CC:                            ; CODE XREF: sub_80C73A0+22j
  50. .text:080C73CC                                         ; sub_80C73A0+47j ...
  51. .text:080C73CC                 xor     ecx, ecx
  52. .text:080C73CE
  53. .text:080C73CE loc_80C73CE:                            ; CODE XREF: sub_80C73A0+B7j
  54. .text:080C73CE                                         ; sub_80C73A0+DAj ...
  55. .text:080C73CE                 mov     ebx, [ebp+var_C]
  56. .text:080C73D1                 mov     eax, ecx
  57. .text:080C73D3                 mov     esi, [ebp+var_8]
  58. .text:080C73D6                 mov     edi, [ebp+var_4]
  59. .text:080C73D9                 mov     esp, ebp
  60. .text:080C73DB                 pop     ebp
  61. .text:080C73DC                 retn
  62. .text:080C73DC ; ---------------------------------------------------------------------------
  63. .text:080C73DD                 align 10h
  64. .text:080C73E0
  65. .text:080C73E0 loc_80C73E0:                            ; CODE XREF: sub_80C73A0+2Aj
  66. .text:080C73E0                 mov     eax, ds:dword_8192F68
  67. .text:080C73E5                 test    eax, eax
  68. .text:080C73E7                 jz      short loc_80C73CC
  69. .text:080C73E9                 cmp     dword ptr [eax+59h], 1
  70. .text:080C73ED                 jnz     short loc_80C73CC
  71. .text:080C73EF                 cmp     ebx, 0Ah
  72. .text:080C73F2                 jle     loc_80C75BF     ; default
  73. .text:080C73F2                                         ; jumptable 080C7433 cases 2-5,7-12,14,16-20
  74. .text:080C73F8                 mov     dword ptr ds:addr.sa_data+2, esi
  75. .text:080C73FE                 mov     eax, 2
  76. .text:080C7403                 mov     ds:addr.sa_family, ax
  77. .text:080C7409                 mov     eax, edx
  78. .text:080C740B                 ror     ax, 8
  79. .text:080C740F                 cmp     ds:byte_8192F44, 0
  80. .text:080C7416                 mov     word ptr ds:addr.sa_data, ax
  81. .text:080C741C                 jnz     loc_80C7BA1
  82. .text:080C7422
  83. .text:080C7422 loc_80C7422:                            ; CODE XREF: sub_80C73A0+821j
  84. .text:080C7422                 movzx   eax, byte ptr [edi+0Ah]
  85. .text:080C7426                 sub     al, 63h
  86. .text:080C7428                 cmp     al, 15h         ; switch 22 cases
  87. .text:080C742A                 ja      loc_80C75BF     ; default
  88. .text:080C742A                                         ; jumptable 080C7433 cases 2-5,7-12,14,16-20
  89. .text:080C7430                 movzx   eax, al
  90. .text:080C7433                 jmp     ds:off_8147AD4[eax*4] ; switch jump
  91. .text:080C743A
  92. .text:080C743A loc_80C743A:                            ; DATA XREF: .rodata:off_8147AD4o
  93. .text:080C743A                 mov     eax, offset aQuery ; jumptable 080C7433 case 21
  94. .text:080C743F                 mov     [esp+4], eax    ; src
  95. .text:080C7443                 mov     eax, ds:dword_8192F64
  96. .text:080C7448                 mov     [esp], eax      ; int
  97. .text:080C744B                 call    sub_80A84F0
  98. .text:080C7450                 test    al, al
  99. .text:080C7452                 mov     ecx, 1
  100. .text:080C7457                 jz      loc_80C73CE
  101. .text:080C745D                 mov     eax, offset aRcon ; "rcon"
  102. .text:080C7462                 mov     [esp+4], eax    ; src
  103. .text:080C7466                 mov     eax, ds:dword_8192F64
  104. .text:080C746B                 mov     [esp], eax      ; int
  105. .text:080C746E                 call    sub_80A84F0
  106. .text:080C7473                 test    al, al
  107. .text:080C7475                 mov     ecx, 1
  108. .text:080C747A                 jz      loc_80C73CE
  109. .text:080C7480                 mov     [esp], esi
  110. .text:080C7483                 call    sub_80C7240
  111. .text:080C7488                 test    eax, eax
  112. .text:080C748A                 mov     ecx, 1
  113. .text:080C748F                 jnz     loc_80C73CE
  114. .text:080C7495                 mov     edx, edi
  115. .text:080C7497                 add     edi, 0Bh
  116. .text:080C749A                 cmp     ebx, 0Dh
  117. .text:080C749D                 jl      loc_80C75A4
  118. .text:080C74A3                 movzx   ecx, word ptr [edi]
  119. .text:080C74A6                 add     edi, 2
  120. .text:080C74A9                 lea     eax, [ecx+0Dh]
  121. .text:080C74AC                 mov     [ebp+n], ecx
  122. .text:080C74AF                 cmp     ebx, eax
  123. .text:080C74B1                 jl      loc_80C75A4
  124. .text:080C74B7                 mov     ds:src, edx
  125. .text:080C74BD                 mov     eax, [ebp+fd]
  126. .text:080C74C0                 mov     dword_8180854, eax
  127. .text:080C74C5                 mov     eax, 0Bh
  128. .text:080C74CA                 mov     ds:n, eax
  129. .text:080C74CF                 mov     eax, ecx
  130. .text:080C74D1                 inc     eax
  131. .text:080C74D2                 mov     [esp], eax      ; size
  132. .text:080C74D5                 call    _malloc
  133. .text:080C74DA                 mov     [ebp+ptr], eax
  134. .text:080C74DD                 mov     edx, [ebp+n]
  135. .text:080C74E0                 mov     [esp+4], edi    ; src
  136. .text:080C74E4                 mov     [esp], eax      ; dest
  137. .text:080C74E7                 mov     [esp+8], edx    ; n
  138. .text:080C74EB                 call    _memcpy
  139. .text:080C74F0                 mov     ecx, [ebp+n]
  140. .text:080C74F3                 mov     eax, [ebp+ptr]
  141. .text:080C74F6                 add     edi, ecx
  142. .text:080C74F8                 mov     byte ptr [ecx+eax], 0
  143. .text:080C74FC                 mov     eax, ds:dword_8192F64
  144. .text:080C7501                 mov     ecx, offset aRcon_ ; "rcon_"
  145. .text:080C7506                 mov     [esp+4], ecx    ; src
  146. .text:080C750A                 mov     [esp], eax      ; int
  147. .text:080C750D                 call    sub_80A8670
  148. .text:080C7512                 mov     [esp+4], eax    ; s2
  149. .text:080C7516                 mov     edx, [ebp+ptr]
  150. .text:080C7519                 mov     [esp], edx      ; s1
  151. .text:080C751C                 call    _strcmp
  152. .text:080C7521                 test    eax, eax
  153. .text:080C7523                 jnz     loc_80C7C3D
  154. .text:080C7529                 mov     eax, [ebp+n]
  155. .text:080C752C                 add     eax, 0Fh
  156. .text:080C752F                 cmp     ebx, eax
  157. .text:080C7531                 jl      short loc_80C7599
  158. .text:080C7533                 movzx   edx, word ptr [edi]
  159. .text:080C7536                 add     edi, 2
  160. .text:080C7539                 add     eax, edx
  161. .text:080C753B                 mov     [ebp+n], edx
  162. .text:080C753E                 cmp     ebx, eax
  163. .text:080C7540                 jl      short loc_80C7599
  164. .text:080C7542                 mov     eax, [ebp+n]
  165. .text:080C7545                 inc     eax
  166. .text:080C7546                 mov     [esp], eax      ; size
  167. .text:080C7549                 call    _malloc
  168. .text:080C754E                 mov     [esp+4], edi    ; src
  169. .text:080C7552                 mov     ebx, eax
  170. .text:080C7554                 mov     eax, [ebp+n]
  171. .text:080C7557                 mov     [esp], ebx      ; dest
  172. .text:080C755A                 mov     [esp+8], eax    ; n
  173. .text:080C755E                 call    _memcpy
  174. .text:080C7563                 mov     edx, [ebp+n]
  175. .text:080C7566                 mov     byte ptr [edx+ebx], 0
  176. .text:080C756A                 mov     eax, ds:dword_8192F64
  177. .text:080C756F                 test    eax, eax
  178. .text:080C7571                 jz      short loc_80C7591
  179. .text:080C7573                 mov     [esp], eax      ; int
  180. .text:080C7576                 mov     edx, 1
  181. .text:080C757B                 mov     ds:dword_81938D8, edx
  182. .text:080C7581                 mov     [esp+4], ebx    ; src
  183. .text:080C7585                 call    sub_80A80B0
  184. .text:080C758A                 xor     eax, eax
  185. .text:080C758C                 mov     ds:dword_81938D8, eax
  186. .text:080C7591
  187. .text:080C7591 loc_80C7591:                            ; CODE XREF: sub_80C73A0+1D1j
  188. .text:080C7591                 mov     [esp], ebx      ; ptr
  189. .text:080C7594                 call    _free
  190. .text:080C7599
  191. .text:080C7599 loc_80C7599:                            ; CODE XREF: sub_80C73A0+191j
  192. .text:080C7599                                         ; sub_80C73A0+1A0j ...
  193. .text:080C7599                 mov     ecx, [ebp+ptr]
  194. .text:080C759C                 mov     [esp], ecx      ; ptr
  195. .text:080C759F                 call    _free
  196. .text:080C75A4
  197. .text:080C75A4 loc_80C75A4:                            ; CODE XREF: sub_80C73A0+FDj
  198. .text:080C75A4                                         ; sub_80C73A0+111j
  199. .text:080C75A4                 xor     edi, edi
  200. .text:080C75A6                 xor     esi, esi
  201. .text:080C75A8                 mov     ebx, 0FFFFFFFFh
  202. .text:080C75AD                 mov     ds:n, edi
  203. .text:080C75B3                 mov     ds:src, esi
  204. .text:080C75B9                 mov     dword_8180854, ebx
  205. .text:080C75BF
  206. .text:080C75BF loc_80C75BF:                            ; CODE XREF: sub_80C73A0+52j
  207. .text:080C75BF                                         ; sub_80C73A0+8Aj ...
  208. .text:080C75BF                 mov     ecx, 1          ; default
  209. .text:080C75BF                                         ; jumptable 080C7433 cases 2-5,7-12,14,16-20
  210. .text:080C75C4                 jmp     loc_80C73CE
  211. .text:080C75C9 ; ---------------------------------------------------------------------------
  212. .text:080C75C9
  213. .text:080C75C9 loc_80C75C9:                            ; CODE XREF: sub_80C73A0+93j
  214. .text:080C75C9                                         ; DATA XREF: .rodata:off_8147AD4o
  215. .text:080C75C9                 mov     eax, offset aQuery ; jumptable 080C7433 case 15
  216. .text:080C75CE                 mov     [esp+4], eax    ; src
  217. .text:080C75D2                 mov     eax, ds:dword_8192F64
  218. .text:080C75D7                 mov     [esp], eax      ; int
  219. .text:080C75DA                 call    sub_80A84F0
  220. .text:080C75DF                 test    al, al
  221. .text:080C75E1                 mov     ecx, 1
  222. .text:080C75E6                 jz      loc_80C73CE
  223. .text:080C75EC                 mov     [esp], esi
  224. .text:080C75EF                 call    sub_80C7240
  225. .text:080C75F4                 test    eax, eax
  226. .text:080C75F6                 mov     ecx, 1
  227. .text:080C75FB                 jnz     loc_80C73CE
  228. .text:080C7601                 mov     [esp+8], edi    ; int
  229. .text:080C7605                 mov     eax, 10h
  230. .text:080C760A                 mov     edx, [ebp+fd]
  231. .text:080C760D                 mov     [esp+10h], eax  ; addr_len
  232. .text:080C7611                 mov     eax, offset addr
  233. .text:080C7616                 mov     [esp+0Ch], eax  ; addr
  234. .text:080C761A                 mov     eax, ds:dword_8192F64
  235. .text:080C761F                 mov     [esp+4], edx    ; fd
  236. .text:080C7623                 mov     [esp], eax      ; int
  237. .text:080C7626                 call    sub_80A7A30
  238. .text:080C762B                 mov     ecx, 1
  239. .text:080C7630                 jmp     loc_80C73CE
  240. .text:080C7635 ; ---------------------------------------------------------------------------
  241. .text:080C7635
  242. .text:080C7635 loc_80C7635:                            ; CODE XREF: sub_80C73A0+93j
  243. .text:080C7635                                         ; DATA XREF: .rodata:off_8147AD4o
  244. .text:080C7635                 cmp     ebx, 0Fh        ; jumptable 080C7433 case 13
  245. .text:080C7638                 jnz     short loc_80C75BF ; default
  246. .text:080C7638                                         ; jumptable 080C7433 cases 2-5,7-12,14,16-20
  247. .text:080C763A                 mov     [esp+4], edi    ; buf
  248. .text:080C763E                 mov     eax, 10h
  249. .text:080C7643                 mov     [esp+14h], eax  ; addr_len
  250. .text:080C7647                 mov     eax, offset addr
  251. .text:080C764C                 mov     [esp+10h], eax  ; addr
  252. .text:080C7650                 xor     eax, eax
  253. .text:080C7652                 mov     [esp+0Ch], eax  ; flags
  254. .text:080C7656                 mov     eax, 0Fh
  255. .text:080C765B                 mov     [esp+8], eax    ; n
  256. .text:080C765F                 mov     eax, [ebp+fd]
  257. .text:080C7662                 mov     [esp], eax      ; fd
  258. .text:080C7665                 call    _sendto
  259. .text:080C766A                 mov     ecx, 1
  260. .text:080C766F                 jmp     loc_80C73CE
  261. .text:080C7674 ; ---------------------------------------------------------------------------
  262. .text:080C7674
  263. .text:080C7674 loc_80C7674:                            ; CODE XREF: sub_80C73A0+93j
  264. .text:080C7674                                         ; DATA XREF: .rodata:off_8147AD4o
  265. .text:080C7674                 mov     eax, offset aQuery ; jumptable 080C7433 case 6
  266. .text:080C7679                 mov     [esp+4], eax    ; src
  267. .text:080C767D                 mov     eax, ds:dword_8192F64
  268. .text:080C7682                 mov     [esp], eax      ; int
  269. .text:080C7685                 call    sub_80A84F0
  270. .text:080C768A                 test    al, al
  271. .text:080C768C                 mov     ecx, 1
  272. .text:080C7691                 jz      loc_80C73CE
  273. .text:080C7697                 mov     [esp], esi
  274. .text:080C769A                 call    sub_80C7240
  275. .text:080C769F                 test    eax, eax
  276. .text:080C76A1                 mov     ecx, 1
  277. .text:080C76A6                 jnz     loc_80C73CE
  278. .text:080C76AC                 mov     eax, ds:dword_8192F64
  279. .text:080C76B1                 mov     ebx, offset aHostname ; "hostname"
  280. .text:080C76B6                 mov     [esp+4], ebx    ; src
  281. .text:080C76BA                 mov     [esp], eax      ; int
  282. .text:080C76BD                 call    sub_80A8670
  283. .text:080C76C2                 mov     [ebp+src], eax
  284. .text:080C76C5                 mov     [esp], eax      ; s
  285. .text:080C76C8                 call    _strlen
  286. .text:080C76CD                 mov     [ebp+var_48], eax
  287. .text:080C76D0                 cmp     eax, 32h
  288. .text:080C76D3                 jbe     short loc_80C76DC
  289. .text:080C76D5                 mov     [ebp+var_48], 32h
  290. .text:080C76DC
  291. .text:080C76DC loc_80C76DC:                            ; CODE XREF: sub_80C73A0+333j
  292. .text:080C76DC                 mov     eax, ds:dword_8192F64
  293. .text:080C76E1                 mov     ecx, offset aGamemodetext ; "gamemodetext"
  294. .text:080C76E6                 mov     [esp+4], ecx    ; src
  295. .text:080C76EA                 mov     [esp], eax      ; int
  296. .text:080C76ED                 call    sub_80A8670
  297. .text:080C76F2                 mov     [ebp+var_4C], eax
  298. .text:080C76F5                 mov     [esp], eax      ; s
  299. .text:080C76F8                 call    _strlen
  300. .text:080C76FD                 mov     [ebp+var_50], eax
  301. .text:080C7700                 cmp     eax, 1Eh
  302. .text:080C7703                 jbe     short loc_80C770C
  303. .text:080C7705                 mov     [ebp+var_50], 1Eh
  304. .text:080C770C
  305. .text:080C770C loc_80C770C:                            ; CODE XREF: sub_80C73A0+363j
  306. .text:080C770C                 mov     eax, ds:dword_8192F64
  307. .text:080C7711                 mov     edx, offset aMapname ; "mapname"
  308. .text:080C7716                 mov     [esp+4], edx    ; src
  309. .text:080C771A                 mov     [esp], eax      ; int
  310. .text:080C771D                 call    sub_80A8670
  311. .text:080C7722                 mov     [ebp+var_54], eax
  312. .text:080C7725                 mov     [esp], eax      ; s
  313. .text:080C7728                 call    _strlen
  314. .text:080C772D                 mov     [ebp+var_58], eax
  315. .text:080C7730                 cmp     eax, 1Eh
  316. .text:080C7733                 jbe     short loc_80C773C
  317. .text:080C7735                 mov     [ebp+var_58], 1Eh
  318. .text:080C773C
  319. .text:080C773C loc_80C773C:                            ; CODE XREF: sub_80C73A0+393j
  320. .text:080C773C                 mov     word ptr [ebp+var_1C+2], 0
  321. .text:080C7742                 mov     eax, ds:dword_8192F68
  322. .text:080C7747                 mov     ecx, 1
  323. .text:080C774C                 mov     esi, [eax+8]
  324. .text:080C774F                 test    esi, esi
  325. .text:080C7751                 jz      loc_80C73CE
  326. .text:080C7757                 mov     [esp], esi
  327. .text:080C775A                 call    sub_80C59A0
  328. .text:080C775F                 mov     word ptr [ebp+var_1C+2], ax
  329. .text:080C7763                 mov     eax, offset aMaxplayers ; "maxplayers"
  330. .text:080C7768                 mov     [esp+4], eax    ; src
  331. .text:080C776C                 mov     eax, ds:dword_8192F64
  332. .text:080C7771                 mov     [esp], eax      ; int
  333. .text:080C7774                 call    sub_80A8550
  334. .text:080C7779                 mov     [esp], esi
  335. .text:080C777C                 mov     ebx, eax
  336. .text:080C777E                 call    sub_80C5A10
  337. .text:080C7783                 sub     ebx, eax
  338. .text:080C7785                 mov     eax, offset aPassword ; "password"
  339. .text:080C778A                 mov     [esp+4], eax    ; src
  340. .text:080C778E                 mov     eax, ds:dword_8192F64
  341. .text:080C7793                 mov     word ptr [ebp+var_1C], bx
  342. .text:080C7797                 mov     [esp], eax      ; int
  343. .text:080C779A                 call    sub_80A8670
  344. .text:080C779F                 cmp     byte ptr [eax], 0
  345. .text:080C77A2                 mov     ecx, [ebp+var_50]
  346. .text:080C77A5                 mov     edx, [ebp+var_48]
  347. .text:080C77A8                 setnz   bl
  348. .text:080C77AB                 lea     edx, [edx+ecx+1Ch]
  349. .text:080C77AF                 mov     ecx, [ebp+var_58]
  350. .text:080C77B2                 add     edx, ecx
  351. .text:080C77B4                 mov     [ebp+var_5C], edx
  352. .text:080C77B7                 mov     [esp], edx      ; size
  353. .text:080C77BA                 call    _malloc
  354. .text:080C77BF                 mov     esi, eax
  355. .text:080C77C1                 mov     eax, [edi]
  356. .text:080C77C3                 mov     [esi], eax
  357. .text:080C77C5                 mov     eax, [edi+4]
  358. .text:080C77C8                 mov     [esi+4], eax
  359. .text:080C77CB                 movzx   eax, word ptr [edi+8]
  360. .text:080C77CF                 mov     [esi+8], ax
  361. .text:080C77D3                 movzx   eax, byte ptr [edi+0Ah]
  362. .text:080C77D7                 xor     edi, edi
  363. .text:080C77D9                 mov     [esi+0Bh], bl
  364. .text:080C77DC                 lea     ebx, [esi+14h]
  365. .text:080C77DF                 mov     [esi+0Ah], al
  366. .text:080C77E2                 movzx   eax, word ptr [ebp+var_1C+2]
  367. .text:080C77E6                 mov     [esi+0Ch], ax
  368. .text:080C77EA                 mov     eax, [ebp+var_1C]
  369. .text:080C77ED                 mov     [esi+0Eh], ax
  370. .text:080C77F1                 mov     eax, [ebp+var_48]
  371. .text:080C77F4                 mov     [esi+10h], eax
  372. .text:080C77F7                 mov     edx, [ebp+src]
  373. .text:080C77FA                 mov     [esp], ebx      ; dest
  374. .text:080C77FD                 mov     [esp+8], eax    ; n
  375. .text:080C7801                 mov     [esp+4], edx    ; src
  376. .text:080C7805                 call    _memcpy
  377. .text:080C780A                 mov     eax, [ebp+var_48]
  378. .text:080C780D                 mov     ecx, [ebp+var_50]
  379. .text:080C7810                 add     ebx, eax
  380. .text:080C7812                 mov     [ebx], ecx
  381. .text:080C7814                 mov     eax, [ebp+var_4C]
  382. .text:080C7817                 add     ebx, 4
  383. .text:080C781A                 mov     [esp+8], ecx    ; n
  384. .text:080C781E                 mov     [esp], ebx      ; dest
  385. .text:080C7821                 mov     [esp+4], eax    ; src
  386. .text:080C7825                 call    _memcpy
  387. .text:080C782A                 mov     eax, [ebp+var_50]
  388. .text:080C782D                 mov     edx, [ebp+var_58]
  389. .text:080C7830                 add     ebx, eax
  390. .text:080C7832                 mov     [ebx], edx
  391. .text:080C7834                 mov     ecx, [ebp+var_54]
  392. .text:080C7837                 add     ebx, 4
  393. .text:080C783A                 mov     [esp+8], edx    ; n
  394. .text:080C783E                 mov     [esp], ebx      ; dest
  395. .text:080C7841                 mov     [esp+4], ecx    ; src
  396. .text:080C7845                 call    _memcpy
  397. .text:080C784A                 mov     [esp+0Ch], edi  ; flags
  398. .text:080C784E                 mov     eax, 10h
  399. .text:080C7853                 mov     edx, [ebp+fd]
  400. .text:080C7856                 mov     [esp+14h], eax  ; addr_len
  401. .text:080C785A                 mov     eax, offset addr
  402. .text:080C785F                 mov     [esp+10h], eax  ; addr
  403. .text:080C7863                 mov     eax, [ebp+var_5C]
  404. .text:080C7866                 mov     [esp+4], esi    ; buf
  405. .text:080C786A                 mov     [esp], edx      ; fd
  406. .text:080C786D                 mov     [esp+8], eax    ; n
  407. .text:080C7871                 call    _sendto
  408. .text:080C7876                 mov     [esp], esi      ; ptr
  409. .text:080C7879
  410. .text:080C7879 loc_80C7879:                            ; CODE XREF: sub_80C73A0+860j
  411. .text:080C7879                 call    _free
  412. .text:080C787E                 mov     ecx, 1
  413. .text:080C7883                 jmp     loc_80C73CE
  414. .text:080C7888 ; ---------------------------------------------------------------------------
  415. .text:080C7888
  416. .text:080C7888 loc_80C7888:                            ; CODE XREF: sub_80C73A0+93j
  417. .text:080C7888                                         ; DATA XREF: .rodata:off_8147AD4o
  418. .text:080C7888                 mov     eax, offset aQuery ; jumptable 080C7433 case 1
  419. .text:080C788D                 mov     [esp+4], eax    ; src
  420. .text:080C7891                 mov     eax, ds:dword_8192F64
  421. .text:080C7896                 mov     [esp], eax      ; int
  422. .text:080C7899                 call    sub_80A84F0
  423. .text:080C789E                 test    al, al
  424. .text:080C78A0                 mov     ecx, 1
  425. .text:080C78A5                 jz      loc_80C73CE
  426. .text:080C78AB                 mov     [esp], esi
  427. .text:080C78AE                 call    sub_80C7240
  428. .text:080C78B3                 test    eax, eax
  429. .text:080C78B5                 mov     ecx, 1
  430. .text:080C78BA                 jnz     loc_80C73CE
  431. .text:080C78C0                 mov     word ptr [ebp+var_20], 0
  432. .text:080C78C6                 mov     eax, ds:dword_8192F68
  433. .text:080C78CB                 mov     eax, [eax+8]
  434. .text:080C78CE                 mov     [ebp+var_70], eax
  435. .text:080C78D1                 test    eax, eax
  436. .text:080C78D3                 jz      loc_80C73CE
  437. .text:080C78D9                 mov     [esp], eax
  438. .text:080C78DC                 call    sub_80C59A0
  439. .text:080C78E1                 mov     word ptr [ebp+var_20], ax
  440. .text:080C78E5                 cmp     ax, 64h
  441. .text:080C78E9                 mov     ecx, 1
  442. .text:080C78EE                 ja      loc_80C73CE
  443. .text:080C78F4                 movzx   edx, ax
  444. .text:080C78F7                 xor     esi, esi
  445. .text:080C78F9                 mov     eax, edx
  446. .text:080C78FB                 shl     eax, 4
  447. .text:080C78FE                 add     eax, edx
  448. .text:080C7900                 lea     eax, [eax+eax+0Dh]
  449. .text:080C7904                 mov     [esp], eax      ; size
  450. .text:080C7907                 call    _malloc
  451. .text:080C790C                 mov     [ebp+var_74], eax
  452. .text:080C790F                 mov     eax, [edi]
  453. .text:080C7911                 mov     edx, [ebp+var_74]
  454. .text:080C7914                 mov     [edx], eax
  455. .text:080C7916                 mov     eax, [edi+4]
  456. .text:080C7919                 mov     [edx+4], eax
  457. .text:080C791C                 movzx   eax, word ptr [edi+8]
  458. .text:080C7920                 mov     [edx+8], ax
  459. .text:080C7924                 movzx   eax, byte ptr [edi+0Ah]
  460. .text:080C7928                 mov     edi, edx
  461. .text:080C792A                 add     edi, 0Dh
  462. .text:080C792D                 mov     [edx+0Ah], al
  463. .text:080C7930                 mov     eax, [ebp+var_20]
  464. .text:080C7933                 mov     [edx+0Bh], ax
  465. .text:080C7937                 xor     eax, eax
  466. .text:080C7939                 jmp     short loc_80C7950
  467. .text:080C7939 ; ---------------------------------------------------------------------------
  468. .text:080C793B                 align 10h
  469. .text:080C7940
  470. .text:080C7940 loc_80C7940:                            ; CODE XREF: sub_80C73A0+5B7j
  471. .text:080C7940                                         ; sub_80C73A0+5C5j ...
  472. .text:080C7940                 lea     eax, [esi+1]
  473. .text:080C7943                 cmp     eax, 1F3h
  474. .text:080C7948                 mov     esi, eax
  475. .text:080C794A                 jg      loc_80C7C05
  476. .text:080C7950
  477. .text:080C7950 loc_80C7950:                            ; CODE XREF: sub_80C73A0+599j
  478. .text:080C7950                 movzx   eax, ax
  479. .text:080C7953                 cmp     ax, 1F3h
  480. .text:080C7957                 ja      short loc_80C7940
  481. .text:080C7959                 mov     ecx, [ebp+var_70]
  482. .text:080C795C                 mov     ebx, [ecx+eax*4+12504h]
  483. .text:080C7963                 test    ebx, ebx
  484. .text:080C7965                 jz      short loc_80C7940
  485. .text:080C7967                 movzx   eax, si
  486. .text:080C796A                 mov     edx, [ecx+eax*4+16D48h]
  487. .text:080C7971                 mov     [ebp+var_7C], eax
  488. .text:080C7974                 test    edx, edx
  489. .text:080C7976                 jnz     short loc_80C7940
  490. .text:080C7978                 mov     [esp+4], eax
  491. .text:080C797C                 mov     [esp], ecx
  492. .text:080C797F                 call    sub_80C5980
  493. .text:080C7984                 test    al, al
  494. .text:080C7986                 jz      short loc_80C7940
  495. .text:080C7988                 mov     edx, esi
  496. .text:080C798A                 mov     [edi], dl
  497. .text:080C798C                 inc     edi
  498. .text:080C798D                 cmp     word ptr [ebp+var_7C], 1F3h
  499. .text:080C7993                 mov     [ebp+s], 0
  500. .text:080C799A                 ja      short loc_80C79B2
  501. .text:080C799C                 mov     ecx, [ebp+var_7C]
  502. .text:080C799F                 mov     edx, [ebp+var_70]
  503. .text:080C79A2                 lea     eax, [ecx+ecx*4]
  504. .text:080C79A5                 lea     eax, [eax+eax*4]
  505. .text:080C79A8                 lea     eax, [eax+edx+134A4h]
  506. .text:080C79AF                 mov     [ebp+s], eax
  507. .text:080C79B2
  508. .text:080C79B2 loc_80C79B2:                            ; CODE XREF: sub_80C73A0+5FAj
  509. .text:080C79B2                 mov     ecx, [ebp+s]
  510. .text:080C79B5                 mov     [esp], ecx      ; s
  511. .text:080C79B8                 call    _strlen
  512. .text:080C79BD                 mov     [edi], al
  513. .text:080C79BF                 movzx   ebx, al
  514. .text:080C79C2                 mov     eax, [ebp+s]
  515. .text:080C79C5                 mov     [esp+8], ebx    ; n
  516. .text:080C79C9                 inc     edi
  517. .text:080C79CA                 mov     [esp], edi      ; dest
  518. .text:080C79CD                 add     edi, ebx
  519. .text:080C79CF                 mov     [esp+4], eax    ; src
  520. .text:080C79D3                 call    _memcpy
  521. .text:080C79D8                 xor     eax, eax
  522. .text:080C79DA                 cmp     word ptr [ebp+var_7C], 1F3h
  523. .text:080C79E0                 ja      short loc_80C79EF
  524. .text:080C79E2                 mov     edx, [ebp+var_7C]
  525. .text:080C79E5                 mov     ecx, [ebp+var_70]
  526. .text:080C79E8                 mov     eax, [ecx+edx*4+7DCh]
  527. .text:080C79EF
  528. .text:080C79EF loc_80C79EF:                            ; CODE XREF: sub_80C73A0+640j
  529. .text:080C79EF                 mov     [edi], eax
  530. .text:080C79F1                 mov     eax, ds:dword_81930A8
  531. .text:080C79F6                 add     edi, 4
  532. .text:080C79F9                 mov     edx, [eax]
  533. .text:080C79FB                 mov     [esp+4], eax
  534. .text:080C79FF                 lea     eax, [ebp+var_38]
  535. .text:080C7A02                 mov     [esp], eax
  536. .text:080C7A05                 mov     [esp+8], esi
  537. .text:080C7A09                 call    dword ptr [edx+0ECh]
  538. .text:080C7A0F                 mov     edx, ds:dword_81930A8
  539. .text:080C7A15                 mov     eax, [ebp+var_38]
  540. .text:080C7A18                 sub     esp, 4
  541. .text:080C7A1B                 mov     ecx, [edx]
  542. .text:080C7A1D                 mov     [esp+4], eax
  543. .text:080C7A21                 mov     eax, [ebp+var_34]
  544. .text:080C7A24                 mov     [esp], edx
  545. .text:080C7A27                 mov     [esp+8], ax
  546. .text:080C7A2C                 call    dword ptr [ecx+50h]
  547. .text:080C7A2F                 mov     [edi], eax
  548. .text:080C7A31                 add     edi, 4
  549. .text:080C7A34                 jmp     loc_80C7940
  550. .text:080C7A39 ; ---------------------------------------------------------------------------
  551. .text:080C7A39
  552. .text:080C7A39 loc_80C7A39:                            ; CODE XREF: sub_80C73A0+93j
  553. .text:080C7A39                                         ; DATA XREF: .rodata:off_8147AD4o
  554. .text:080C7A39                 mov     eax, ds:dword_8192F64 ; jumptable 080C7433 case 0
  555. .text:080C7A3E                 mov     ebx, offset aQuery ; "query"
  556. .text:080C7A43                 mov     [esp+4], ebx    ; src
  557. .text:080C7A47                 mov     [esp], eax      ; int
  558. .text:080C7A4A                 call    sub_80A84F0
  559. .text:080C7A4F                 test    al, al
  560. .text:080C7A51                 mov     ecx, 1
  561. .text:080C7A56                 jz      loc_80C73CE
  562. .text:080C7A5C                 mov     [esp], esi
  563. .text:080C7A5F                 call    sub_80C7240
  564. .text:080C7A64                 test    eax, eax
  565. .text:080C7A66                 mov     ecx, 1
  566. .text:080C7A6B                 jnz     loc_80C73CE
  567. .text:080C7A71                 mov     word ptr [ebp+var_20+2], 0
  568. .text:080C7A77                 mov     eax, ds:dword_8192F68
  569. .text:080C7A7C                 mov     eax, [eax+8]
  570. .text:080C7A7F                 mov     [ebp+var_60], eax
  571. .text:080C7A82                 test    eax, eax
  572. .text:080C7A84                 jz      loc_80C73CE
  573. .text:080C7A8A                 mov     [esp], eax
  574. .text:080C7A8D                 call    sub_80C59A0
  575. .text:080C7A92                 mov     word ptr [ebp+var_20+2], ax
  576. .text:080C7A96                 cmp     ax, 64h
  577. .text:080C7A9A                 mov     ecx, 1
  578. .text:080C7A9F                 ja      loc_80C73CE
  579. .text:080C7AA5                 movzx   edx, ax
  580. .text:080C7AA8                 lea     eax, ds:0[edx*8]
  581. .text:080C7AAF                 sub     eax, edx
  582. .text:080C7AB1                 lea     eax, [edx+eax*4+0Dh]
  583. .text:080C7AB5                 mov     [esp], eax      ; size
  584. .text:080C7AB8                 call    _malloc
  585. .text:080C7ABD                 mov     [ebp+var_68], eax
  586. .text:080C7AC0                 mov     eax, [edi]
  587. .text:080C7AC2                 mov     ecx, [ebp+var_68]
  588. .text:080C7AC5                 mov     [ecx], eax
  589. .text:080C7AC7                 mov     eax, [edi+4]
  590. .text:080C7ACA                 mov     [ecx+4], eax
  591. .text:080C7ACD                 movzx   eax, word ptr [edi+8]
  592. .text:080C7AD1                 mov     [ecx+8], ax
  593. .text:080C7AD5                 movzx   eax, byte ptr [edi+0Ah]
  594. .text:080C7AD9                 xor     edi, edi
  595. .text:080C7ADB                 mov     [ecx+0Ah], al
  596. .text:080C7ADE                 movzx   eax, word ptr [ebp+var_20+2]
  597. .text:080C7AE2                 mov     [ecx+0Bh], ax
  598. .text:080C7AE6                 add     ecx, 0Dh
  599. .text:080C7AE9                 mov     [ebp+var_64], ecx
  600. .text:080C7AEC                 jmp     short loc_80C7AFD
  601. .text:080C7AEC ; ---------------------------------------------------------------------------
  602. .text:080C7AEE                 align 10h
  603. .text:080C7AF0
  604. .text:080C7AF0 loc_80C7AF0:                            ; CODE XREF: sub_80C73A0+765j
  605. .text:080C7AF0                                         ; sub_80C73A0+773j ...
  606. .text:080C7AF0                 inc     edi
  607. .text:080C7AF1                 cmp     edi, 1F3h
  608. .text:080C7AF7                 jg      loc_80C7BC6
  609. .text:080C7AFD
  610. .text:080C7AFD loc_80C7AFD:                            ; CODE XREF: sub_80C73A0+74Cj
  611. .text:080C7AFD                 movzx   esi, di
  612. .text:080C7B00                 cmp     si, 1F3h
  613. .text:080C7B05                 ja      short loc_80C7AF0
  614. .text:080C7B07                 mov     eax, [ebp+var_60]
  615. .text:080C7B0A                 mov     ecx, [eax+esi*4+12504h]
  616. .text:080C7B11                 test    ecx, ecx
  617. .text:080C7B13                 jz      short loc_80C7AF0
  618. .text:080C7B15                 mov     edx, [eax+esi*4+16D48h]
  619. .text:080C7B1C                 test    edx, edx
  620. .text:080C7B1E                 jnz     short loc_80C7AF0
  621. .text:080C7B20                 mov     [esp+4], esi
  622. .text:080C7B24                 mov     [esp], eax
  623. .text:080C7B27                 call    sub_80C5980
  624. .text:080C7B2C                 test    al, al
  625. .text:080C7B2E                 jz      short loc_80C7AF0
  626. .text:080C7B30                 mov     [ebp+var_6C], 0
  627. .text:080C7B37                 cmp     si, 1F3h
  628. .text:080C7B3C                 ja      short loc_80C7B51
  629. .text:080C7B3E                 mov     edx, [ebp+var_60]
  630. .text:080C7B41                 lea     eax, [esi+esi*4]
  631. .text:080C7B44                 lea     eax, [eax+eax*4]
  632. .text:080C7B47                 lea     eax, [eax+edx+134A4h]
  633. .text:080C7B4E                 mov     [ebp+var_6C], eax
  634. .text:080C7B51
  635. .text:080C7B51 loc_80C7B51:                            ; CODE XREF: sub_80C73A0+79Cj
  636. .text:080C7B51                 mov     ecx, [ebp+var_6C]
  637. .text:080C7B54                 mov     [esp], ecx      ; s
  638. .text:080C7B57                 call    _strlen
  639. .text:080C7B5C                 mov     ecx, [ebp+var_64]
  640. .text:080C7B5F                 movzx   ebx, al
  641. .text:080C7B62                 mov     [ecx], al
  642. .text:080C7B64                 mov     eax, [ebp+var_6C]
  643. .text:080C7B67                 inc     ecx
  644. .text:080C7B68                 mov     [ebp+var_64], ecx
  645. .text:080C7B6B                 mov     [esp+8], ebx    ; n
  646. .text:080C7B6F                 mov     [esp+4], eax    ; src
  647. .text:080C7B73                 mov     [esp], ecx      ; dest
  648. .text:080C7B76                 call    _memcpy
  649. .text:080C7B7B                 add     [ebp+var_64], ebx
  650. .text:080C7B7E                 xor     eax, eax
  651. .text:080C7B80                 cmp     si, 1F3h
  652. .text:080C7B85                 ja      short loc_80C7B91
  653. .text:080C7B87                 mov     edx, [ebp+var_60]
  654. .text:080C7B8A                 mov     eax, [edx+esi*4+7DCh]
  655. .text:080C7B91
  656. .text:080C7B91 loc_80C7B91:                            ; CODE XREF: sub_80C73A0+7E5j
  657. .text:080C7B91                 mov     ecx, [ebp+var_64]
  658. .text:080C7B94                 mov     [ecx], eax
  659. .text:080C7B96                 add     ecx, 4
  660. .text:080C7B99                 mov     [ebp+var_64], ecx
  661. .text:080C7B9C                 jmp     loc_80C7AF0
  662. .text:080C7BA1 ; ---------------------------------------------------------------------------
  663. .text:080C7BA1
  664. .text:080C7BA1 loc_80C7BA1:                            ; CODE XREF: sub_80C73A0+7Cj
  665. .text:080C7BA1                 mov     [esp], esi      ; in
  666. .text:080C7BA4                 call    _inet_ntoa
  667. .text:080C7BA9                 mov     [esp+8], eax
  668. .text:080C7BAD                 movsx   eax, byte ptr [edi+0Ah]
  669. .text:080C7BB1                 mov     dword ptr [esp], offset aQueryCFromS ; "[query:%c] from %s"
  670. .text:080C7BB8                 mov     [esp+4], eax    ; arg
  671. .text:080C7BBC                 call    sub_80B0840
  672. .text:080C7BC1                 jmp     loc_80C7422
  673. .text:080C7BC6 ; ---------------------------------------------------------------------------
  674. .text:080C7BC6
  675. .text:080C7BC6 loc_80C7BC6:                            ; CODE XREF: sub_80C73A0+757j
  676. .text:080C7BC6                 mov     eax, 10h
  677. .text:080C7BCB                 mov     ecx, [ebp+fd]
  678. .text:080C7BCE                 mov     [esp+14h], eax  ; addr_len
  679. .text:080C7BD2                 mov     eax, offset addr
  680. .text:080C7BD7                 mov     [esp+10h], eax  ; addr
  681. .text:080C7BDB                 xor     eax, eax
  682. .text:080C7BDD                 mov     [esp+0Ch], eax  ; flags
  683. .text:080C7BE1                 mov     eax, [ebp+var_68]
  684. .text:080C7BE4                 sub     [ebp+var_64], eax
  685. .text:080C7BE7                 mov     [esp], ecx      ; fd
  686. .text:080C7BEA                 mov     [esp+4], eax    ; buf
  687. .text:080C7BEE                 mov     edx, [ebp+var_64]
  688. .text:080C7BF1                 mov     [esp+8], edx    ; n
  689. .text:080C7BF5                 call    _sendto
  690. .text:080C7BFA                 mov     eax, [ebp+var_68]
  691. .text:080C7BFD
  692. .text:080C7BFD loc_80C7BFD:                            ; CODE XREF: sub_80C73A0+89Bj
  693. .text:080C7BFD                 mov     [esp], eax
  694. .text:080C7C00                 jmp     loc_80C7879
  695. .text:080C7C05 ; ---------------------------------------------------------------------------
  696. .text:080C7C05
  697. .text:080C7C05 loc_80C7C05:                            ; CODE XREF: sub_80C73A0+5AAj
  698. .text:080C7C05                 mov     edx, [ebp+var_74]
  699. .text:080C7C08                 xor     ecx, ecx
  700. .text:080C7C0A                 mov     esi, 10h
  701. .text:080C7C0F                 mov     [esp+0Ch], ecx  ; flags
  702. .text:080C7C13                 mov     ecx, [ebp+fd]
  703. .text:080C7C16                 mov     ebx, offset addr
  704. .text:080C7C1B                 mov     [esp+14h], esi  ; addr_len
  705. .text:080C7C1F                 sub     edi, edx
  706. .text:080C7C21                 mov     edx, [ebp+var_74]
  707. .text:080C7C24                 mov     [esp+10h], ebx  ; addr
  708. .text:080C7C28                 mov     [esp+8], edi    ; n
  709. .text:080C7C2C                 mov     [esp+4], edx    ; buf
  710. .text:080C7C30                 mov     [esp], ecx      ; fd
  711. .text:080C7C33                 call    _sendto
  712. .text:080C7C38                 mov     eax, [ebp+var_74]
  713. .text:080C7C3B                 jmp     short loc_80C7BFD
  714. .text:080C7C3D ; ---------------------------------------------------------------------------
  715. .text:080C7C3D
  716. .text:080C7C3D loc_80C7C3D:                            ; CODE XREF: sub_80C73A0+183j
  717. .text:080C7C3D                 mov     [esp], esi      ; in
  718. .text:080C7C40                 call    _inet_ntoa
  719. .text:080C7C45                 mov     [esp+4], eax    ; arg
  720. .text:080C7C49                 mov     dword ptr [esp], offset aBadRconAttempt ; "BAD RCON ATTEMPT BY: %s"
  721. .text:080C7C50                 call    sub_80B0840
  722. .text:080C7C55                 mov     dword ptr [esp], offset aInvalidRconPas ; "Invalid RCON password."
  723. .text:080C7C5C                 mov     eax, 1
  724. .text:080C7C61                 mov     ds:dword_81938D8, eax
  725. .text:080C7C66                 call    sub_80C72B0
  726. .text:080C7C6B                 xor     eax, eax
  727. .text:080C7C6D                 mov     ds:dword_81938D8, eax
  728. .text:080C7C72                 jmp     loc_80C7599
  729. .text:080C7C72 sub_80C73A0     endp
  730. .text:080C7C72
  731. .text:080C7C72 ; ---------------------------------------------------------------------------
  732. .text:080C7C77                 align 10h
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement