Function at 0x437c30
Capabilities:
Connect socket
Get socket status
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xe54
mov eax, dword [0x4bc410]
xor eax, ebp
push ebx
mov dword [esp + 0xe54], eax
mov eax, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0x10]
push edi
mov ebx, ecx
mov dword [esp + 0x14], eax
call dword [sym.imp.MSVCR71.dll_rand]
mov edx, eax
xor eax, eax
mov ecx, 0x180
lea edi, [esp + 0x258]
rep stosd dword es:[edi], eax
mov byte [esp + 0x259], al
mov byte [esp + 0x258], al
mov byte [esp + 0x266], al
mov byte [esp + 0x265], al
mov byte [esp + 0x264], al
mov eax, edx
cdq
mov cl, 8
mov dword [esp + 0xc], 0x50
mov byte [esp + 0x25f], 0x60
mov byte [esp + 0x25e], 0x39
mov byte [esp + 0x25d], 0x20
mov byte [esp + 0x25c], 0x54
mov byte [esp + 0x25b], 0x34
mov byte [esp + 0x25a], 8
mov byte [esp + 0x267], 0x6c
mov byte [esp + 0x26b], al
call fcn.00496e10
mov cl, 8
mov byte [esp + 0x26a], al
call fcn.00496e10
mov cl, 8
mov byte [esp + 0x269], al
call fcn.00496e10
mov ecx, dword [ebp + 0x14]
mov edx, dword [ecx]
mov byte [esp + 0x268], al
mov eax, dword [ecx + 4]
mov dword [esp + 0x26c], edx
mov edx, dword [ecx + 8]
mov dword [esp + 0x270], eax
mov eax, dword [ecx + 0xc]
mov ecx, dword [ecx + 0x10]
mov dword [esp + 0x278], eax
mov eax, dword [ebp + 0x18]
mov dword [esp + 0x27c], ecx
mov dword [esp + 0x274], edx
mov ecx, 8
lea edi, [esp + 0x280]
rep movsd dword es:[edi], dword [esi]
cdq
mov cl, 8
mov byte [esp + 0x2a3], al
call fcn.00496e10
mov cl, 8
mov byte [esp + 0x2a2], al
call fcn.00496e10
mov cl, 8
mov byte [esp + 0x2a1], al
call fcn.00496e10
mov byte [esp + 0x2a0], al
mov eax, dword [ebp + 0x1c]
cdq
mov cl, 8
mov byte [esp + 0x2a7], al
call fcn.00496e10
mov cl, 8
mov byte [esp + 0x2a6], al
call fcn.00496e10
mov cl, 8
mov byte [esp + 0x2a5], al
call fcn.00496e10
mov byte [esp + 0x2a4], al
push 0x44
lea edx, [esp + 0x268]
push edx
lea ecx, [ebx + 0x10c8]
call fcn.00402fc0
cdq
mov cl, 8
mov byte [esp + 0x263], al
call fcn.00496e10
mov cl, 8
mov byte [esp + 0x262], al
call fcn.00496e10
mov cl, 8
mov byte [esp + 0x261], al
call fcn.00496e10
mov byte [esp + 0x260], al
mov eax, dword [ebx + 0x1bb8]
test eax, eax
push 0x50
je 0x437e64
lea eax, [esp + 0x25c]
push eax
lea ecx, [esp + 0x26a]
push ecx
call dword [sym.imp.MSVCR71.dll_memmove]
lea edx, [ebx + 0x1bbc]
mov eax, dword [edx]
mov ecx, dword [edx + 4]
mov dx, word [edx + 8]
add esp, 0xc
mov dword [esp + 0x258], eax
push 0x50
lea eax, [esp + 0x266]
mov dword [esp + 0x260], ecx
push eax
lea ecx, [ebx + 0x1bc8]
mov word [esp + 0x268], dx
call fcn.0047cfa0
mov dword [esp + 0xc], 0x5a
jmp 0x437e77
lea ecx, [esp + 0x25c]
push ecx
lea ecx, [ebx + 0x14cc]
call fcn.0047cfa0
push 2
mov ecx, ebx
call fcn.00435510
mov esi, eax
cmp esi, 0xffffffff
je 0x4381c8
mov eax, dword [ebp + 0xc]
xor edx, edx
mov dword [esp + 0x238], edx
mov dword [esp + 0x23c], edx
mov dword [esp + 0x240], edx
push eax
mov dword [esp + 0x248], edx
mov word [esp + 0x23c], 2
call dword [sym.imp.WS2_32.dll_htons]
mov edi, dword [esp + 0x14]
push edi
mov word [esp + 0x23e], ax
call dword [sym.imp.WS2_32.dll_inet_addr]
cmp eax, 0xffffffff
mov dword [esp + 0x23c], eax
jne 0x437ef9
push edi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x4381c1
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov eax, dword [edx]
mov dword [esp + 0x23c], eax
mov dword [esp + 0x10], 3
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0xc]
push 0x10
lea ecx, [esp + 0x23c]
push ecx
dec eax
push 0
mov dword [esp + 0x1c], eax
push edx
lea eax, [esp + 0x268]
push eax
push esi
call dword [sym.imp.WS2_32.dll_sendto]
mov edi, 0x14
nop
push 0x64
mov ecx, ebx
dec edi
call fcn.00435430
cmp eax, 0x42b
je 0x4381c8
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x24c]
push edx
push 0
push 0x5fc
lea eax, [esp + 0x868]
push eax
push esi
mov dword [esp + 0x30], 0x10
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp eax, 0x10
jge 0x438183
test edi, edi
jg 0x437f30
mov eax, dword [esp + 0x10]
test eax, eax
jg 0x437f01
mov edi, dword [sym.imp.WS2_32.dll_closesocket]
push esi
call edi
push 1
mov ecx, ebx
call fcn.00435510
push 0x10
lea ecx, [esp + 0x23c]
mov esi, eax
push ecx
push esi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x438060
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x437fcc
push esi
call edi
jmp 0x4381c8
mov edi, 0xc8
push 0x64
mov ecx, ebx
dec edi
call fcn.00435430
cmp eax, 0x42b
je 0x4381c8
mov eax, 1
lea edx, [esp + 0x20]
push edx
mov dword [esp + 0x134], eax
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x138]
push ecx
push 0
lea edx, [esi + 1]
push edx
mov dword [esp + 0x148], esi
mov dword [esp + 0x40], esi
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], 0x3e8
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0x438058
lea eax, [esp + 0x28]
push eax
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x4381c1
lea ecx, [esp + 0x130]
push ecx
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x438060
test edi, edi
jg 0x437fd1
mov edi, dword [esp + 0xc]
push edi
lea edx, [esp + 0x25c]
push edx
lea eax, [esp + 0x268]
push eax
call dword [sym.imp.MSVCR71.dll_memmove]
add edi, 8
mov eax, edi
cdq
add esp, 0xc
mov cl, 8
mov byte [esp + 0x25b], al
call fcn.00496e10
mov cl, 8
mov byte [esp + 0x25a], al
call fcn.00496e10
mov cl, 8
mov byte [esp + 0x259], al
call fcn.00496e10
push 0
push edi
lea ecx, [esp + 0x260]
push ecx
push esi
mov byte [esp + 0x268], al
mov byte [esp + 0x26f], 0
mov byte [esp + 0x26e], 0
mov byte [esp + 0x26d], 0
mov byte [esp + 0x26c], 0
call dword [sym.imp.WS2_32.dll_send]
mov dword [esp + 0x10], 0xc8
xor edi, edi
mov eax, dword [esp + 0x10]
dec eax
push 0x64
mov ecx, ebx
mov dword [esp + 0x14], eax
call fcn.00435430
cmp eax, 0x42b
je 0x4381c8
push 0
mov edx, 0x5fc
sub edx, edi
push edx
lea eax, [esp + edi + 0x860]
push eax
push esi
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
mov dword [esp + 0x18], eax
jle 0x4381a6
add edi, eax
lea ecx, [esp + 0x858]
mov dword [esp + 0xc], ecx
xor eax, eax
mov dword [esp + 0x1c], edi
xor ecx, ecx
mov dword [esp + 0x14], 4
mov edx, dword [esp + 0xc]
shld ecx, eax, 8
shl eax, 8
mov edi, eax
movzx eax, byte [edx]
cdq
or edi, eax
or ecx, edx
mov edx, dword [esp + 0x14]
mov eax, edi
mov edi, dword [esp + 0xc]
inc edi
dec edx
mov dword [esp + 0xc], edi
mov dword [esp + 0x14], edx
jne 0x438150
mov edi, dword [esp + 0x1c]
cmp edi, eax
jl 0x4381b5
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xe50]
xor ecx, ebp
call fcn.00496ace
mov esp, ebp
pop ebp
ret 0x18
jge 0x4381b5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x2733
jne 0x4381c1
mov eax, dword [esp + 0x10]
test eax, eax
jg 0x4380f1
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [esp + 0xe5c]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.00496ace
mov esp, ebp
pop ebp
ret 0x18