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

Disassembly:
sub esp, 0xe48
mov eax, dword [0x4cbba0]
xor eax, esp
push ebx
push ebp
mov dword [esp + 0xe4c], eax
mov eax, dword [esp + 0xe54]
push esi
mov esi, dword [esp + 0xe60]
push edi
mov ebp, ecx
mov dword [esp + 0x18], eax
call dword [sym.imp.MSVCR71.dll_rand]
mov edx, eax
xor eax, eax
mov ecx, 0x180
lea edi, [esp + 0x254]
rep stosd dword es:[edi], eax
xor ebx, ebx
mov eax, edx
cdq
mov cl, 8
mov dword [esp + 0x10], 0x50
mov byte [esp + 0x25b], 0x60
mov byte [esp + 0x25a], 0x39
mov byte [esp + 0x259], 0x20
mov byte [esp + 0x258], 0x54
mov byte [esp + 0x257], 0x34
mov byte [esp + 0x256], 8
mov byte [esp + 0x255], bl
mov byte [esp + 0x254], bl
mov byte [esp + 0x263], 0x6c
mov byte [esp + 0x262], bl
mov byte [esp + 0x261], bl
mov byte [esp + 0x260], bl
mov byte [esp + 0x267], al
call fcn.004a1b50
mov cl, 8
mov byte [esp + 0x266], al
call fcn.004a1b50
mov cl, 8
mov byte [esp + 0x265], al
call fcn.004a1b50
mov ecx, dword [esp + 0xe68]
mov edx, dword [ecx]
mov byte [esp + 0x264], al
mov eax, dword [ecx + 4]
mov dword [esp + 0x268], edx
mov edx, dword [ecx + 8]
mov dword [esp + 0x26c], eax
mov eax, dword [ecx + 0xc]
mov ecx, dword [ecx + 0x10]
mov dword [esp + 0x274], eax
mov eax, dword [esp + 0xe6c]
mov dword [esp + 0x278], ecx
mov dword [esp + 0x270], edx
mov ecx, 8
lea edi, [esp + 0x27c]
rep movsd dword es:[edi], dword [esi]
cdq
mov cl, 8
mov byte [esp + 0x29f], al
call fcn.004a1b50
mov cl, 8
mov byte [esp + 0x29e], al
call fcn.004a1b50
mov cl, 8
mov byte [esp + 0x29d], al
call fcn.004a1b50
mov byte [esp + 0x29c], al
mov eax, dword [esp + 0xe70]
cdq
mov cl, 8
mov byte [esp + 0x2a3], al
call fcn.004a1b50
mov cl, 8
mov byte [esp + 0x2a2], al
call fcn.004a1b50
mov cl, 8
mov byte [esp + 0x2a1], al
call fcn.004a1b50
mov byte [esp + 0x2a0], al
push 0x44
lea edx, [esp + 0x264]
push edx
lea ecx, [ebp + 0x10c8]
call fcn.00402fa0
cdq
mov cl, 8
mov byte [esp + 0x25f], al
call fcn.004a1b50
mov cl, 8
mov byte [esp + 0x25e], al
call fcn.004a1b50
mov cl, 8
mov byte [esp + 0x25d], al
call fcn.004a1b50
mov byte [esp + 0x25c], al
cmp dword [ebp + 0x1bb8], ebx
push 0x50
je 0x441b13
lea eax, [esp + 0x258]
push eax
lea ecx, [esp + 0x266]
push ecx
call dword [sym.imp.MSVCR71.dll_memmove]
lea edx, [ebp + 0x1bbc]
mov eax, dword [edx]
mov ecx, dword [edx + 4]
mov dx, word [edx + 8]
add esp, 0xc
mov dword [esp + 0x254], eax
push 0x50
lea eax, [esp + 0x262]
mov dword [esp + 0x25c], ecx
push eax
lea ecx, [ebp + 0x1bc8]
mov word [esp + 0x264], dx
call fcn.00487f10
mov dword [esp + 0x10], 0x5a
jmp 0x441b26
lea ecx, [esp + 0x258]
push ecx
lea ecx, [ebp + 0x14cc]
call fcn.00487f10
push 2
mov ecx, ebp
call fcn.0043ef50
mov esi, eax
cmp esi, 0xffffffff
je 0x441e51
mov eax, dword [esp + 0xe60]
xor edx, edx
mov dword [esp + 0x234], edx
mov dword [esp + 0x238], edx
mov dword [esp + 0x23c], edx
push eax
mov dword [esp + 0x244], edx
mov word [esp + 0x238], 2
call dword [sym.imp.WS2_32.dll_htons]
mov edi, dword [esp + 0x18]
push edi
mov word [esp + 0x23a], ax
call dword [sym.imp.WS2_32.dll_inet_addr]
cmp eax, 0xffffffff
mov dword [esp + 0x238], eax
jne 0x441bac
push edi
call dword [sym.imp.WS2_32.dll_gethostbyname]
cmp eax, ebx
je 0x441e4a
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov eax, dword [edx]
mov dword [esp + 0x238], eax
mov dword [esp + 0x14], 3
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
push 0x10
lea ecx, [esp + 0x238]
push ecx
dec eax
push ebx
mov dword [esp + 0x20], eax
push edx
lea eax, [esp + 0x264]
push eax
push esi
call dword [sym.imp.WS2_32.dll_sendto]
mov edi, 0x14
push 0x64
mov ecx, ebp
dec edi
call fcn.0043ee60
cmp eax, 0x42b
je 0x441e4a
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x248]
push edx
push ebx
push 0x5fc
lea eax, [esp + 0x864]
push eax
push esi
mov dword [esp + 0x34], 0x10
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp eax, 0x10
jge 0x441e23
cmp edi, ebx
jg 0x441be1
cmp dword [esp + 0x14], ebx
jg 0x441bb4
mov edi, dword [sym.imp.WS2_32.dll_closesocket]
push esi
call edi
push 1
mov ecx, ebp
call fcn.0043ef50
push 0x10
lea ecx, [esp + 0x238]
mov esi, eax
push ecx
push esi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x441d0a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x441c76
push esi
call edi
jmp 0x441e51
mov edi, 0x64
jmp 0x441c80
push 0x64
mov ecx, ebp
dec edi
call fcn.0043ee60
cmp eax, 0x42b
je 0x441e4a
mov eax, 1
lea edx, [esp + 0x24]
push edx
mov dword [esp + 0x134], eax
mov dword [esp + 0x30], eax
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x138]
push ecx
push ebx
lea edx, [esi + 1]
push edx
mov dword [esp + 0x148], esi
mov dword [esp + 0x44], esi
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], 0x3e8
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0x441d02
lea eax, [esp + 0x2c]
push eax
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x441e4a
lea ecx, [esp + 0x130]
push ecx
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x441d0a
cmp edi, ebx
jg 0x441c80
mov edi, dword [esp + 0x10]
push edi
lea edx, [esp + 0x258]
push edx
lea eax, [esp + 0x264]
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 + 0x257], al
call fcn.004a1b50
mov cl, 8
mov byte [esp + 0x256], al
call fcn.004a1b50
mov cl, 8
mov byte [esp + 0x255], al
call fcn.004a1b50
push ebx
push edi
lea ecx, [esp + 0x25c]
push ecx
push esi
mov byte [esp + 0x264], al
mov byte [esp + 0x26b], bl
mov byte [esp + 0x26a], bl
mov byte [esp + 0x269], bl
mov byte [esp + 0x268], bl
call dword [sym.imp.WS2_32.dll_send]
mov dword [esp + 0x14], 0x64
xor edi, edi
mov eax, dword [esp + 0x14]
dec eax
push 0x64
mov ecx, ebp
mov dword [esp + 0x18], eax
call fcn.0043ee60
cmp eax, 0x42b
je 0x441e4a
push ebx
mov edx, 0x5fc
sub edx, edi
push edx
lea eax, [esp + edi + 0x85c]
push eax
push esi
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, ebx
mov dword [esp + 0x1c], eax
jle 0x441e31
add edi, eax
lea ecx, [esp + 0x854]
mov dword [esp + 0x10], ecx
xor eax, eax
mov dword [esp + 0x20], edi
xor ecx, ecx
mov dword [esp + 0x18], 4
mov edx, dword [esp + 0x10]
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 + 0x18]
mov eax, edi
mov edi, dword [esp + 0x10]
inc edi
dec edx
mov dword [esp + 0x10], edi
mov dword [esp + 0x18], edx
jne 0x441df0
mov edi, dword [esp + 0x20]
cmp edi, eax
jl 0x441e40
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, 1
jmp 0x441e53
jge 0x441e40
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x2733
jne 0x441e4a
cmp dword [esp + 0x14], ebx
jg 0x441d96
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
mov ecx, dword [esp + 0xe54]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004a17d1
add esp, 0xe48
ret 0x18