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

Disassembly:
push ebp
sub esp, 0x40
lea ebp, [esp - 4]
mov eax, dword [0x449e30]
xor eax, ebp
mov dword [ebp + 0x40], eax
push 0x108
mov eax, 0x432a05
call fcn.004217ef
mov esi, ecx
mov edi, dword [ebp + 0x4c]
mov dword [ebp], 0x10
xor ebx, ebx
cmp byte [esi + 4], bl
je 0x40a1b9
cmp dword [esi], 0xffffffff
je 0x40a1b9
mov dword [ebp - 4], ebx
mov word [ebp + 0x30], 2
push edi
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp + 0x34], eax
cmp eax, 0xffffffff
jne 0x409fbc
push edi
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov edi, eax
cmp edi, ebx
je 0x40a18a
movsx eax, word [edi + 0xa]
push eax
mov eax, dword [edi + 0xc]
push dword [eax]
lea eax, [ebp + 0x34]
push eax
call fcn.00423c30
add esp, 0xc
mov ax, word [edi + 8]
mov word [ebp + 0x30], ax
mov edi, 0x400
push edi
lea ecx, [ebp + 0x1c]
call fcn.0040795f
mov byte [ebp - 4], 1
push edi
lea ecx, [ebp + 0x18]
call fcn.0040795f
mov byte [ebp - 4], 2
cmp dword [ebp + 0x1c], ebx
je 0x40a18e
cmp dword [ebp + 0x18], ebx
je 0x40a18e
mov dword [ebp - 0x114], ebx
push 0x100
push ebx
lea eax, [ebp - 0x110]
push eax
call fcn.00421170
add esp, 0xc
mov dword [ebp + 8], ebx
xor eax, eax
lea edi, [ebp + 0xc]
stosd dword es:[edi], eax
xor ecx, ecx
mov dword [ebp - 0x114], ecx
mov dword [ebp + 4], eax
cmp eax, ecx
jae 0x40a030
mov edx, dword [ebp + eax*4 - 0x110]
cmp edx, dword [esi]
je 0x40a02e
inc eax
jmp 0x40a019
cmp eax, ecx
jne 0x40a046
cmp ecx, 0x40
jae 0x40a046
mov ecx, dword [esi]
mov dword [ebp + eax*4 - 0x110], ecx
inc dword [ebp - 0x114]
mov eax, dword [ebp + 0x54]
cdq
mov ecx, 0x3e8
idiv ecx
mov dword [ebp + 8], eax
imul edx, edx, 0x3e8
mov dword [ebp + 0xc], edx
mov dword [ebp + 0x10], ebx
mov eax, dword [ebp + 0x10]
cmp eax, dword [ebp + 0x50]
jge 0x40a163
push eax
push 0x28
pop edi
push edi
push dword [ebp + 0x1c]
mov ecx, esi
call fcn.00409ee3
mov dword [ebp + 0x14], ebx
push 0x10
lea eax, [ebp + 0x30]
push eax
push ebx
push edi
push dword [ebp + 0x1c]
push dword [esi]
call dword [sym.imp.WS2_32.dll_sendto]
mov dword [ebp + 0x14], eax
cmp eax, ebx
jge 0x40a0ca
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x40a0ca
lea eax, [ebp + 8]
push eax
push ebx
lea eax, [ebp - 0x114]
push eax
push ebx
push ebx
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp + 0x14], eax
cmp eax, ebx
jl 0x40a18e
je 0x40a15b
lea eax, [ebp]
push eax
lea eax, [ebp + 0x20]
push eax
push ebx
push 0x400
mov edi, dword [ebp + 0x18]
push edi
push dword [esi]
call dword [sym.imp.WS2_32.dll_recvfrom]
mov dword [ebp + 0x14], eax
cmp eax, ebx
jge 0x40a127
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x40a122
lea eax, [ebp + 8]
push eax
push ebx
push ebx
lea eax, [ebp - 0x114]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_select]
mov dword [ebp + 0x14], eax
cmp eax, ebx
jge 0x40a122
mov byte [ebp - 4], 1
cmp edi, ebx
je 0x40a1a0
push edi
jmp 0x40a19a
cmp dword [ebp + 0x14], ebx
je 0x40a15b
push dword [ebp + 0x14]
push edi
mov ecx, esi
call fcn.00407a95
test al, al
je 0x40a15b
mov byte [ebp - 4], 1
cmp edi, ebx
je 0x40a145
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov byte [ebp - 4], bl
cmp dword [ebp + 0x1c], ebx
je 0x40a156
push dword [ebp + 0x1c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor eax, eax
inc eax
jmp 0x40a1bc
inc dword [ebp + 0x10]
jmp 0x40a060
mov byte [ebp - 4], 1
cmp dword [ebp + 0x18], ebx
je 0x40a175
push dword [ebp + 0x18]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov byte [ebp - 4], bl
cmp dword [ebp + 0x1c], ebx
je 0x40a186
push dword [ebp + 0x1c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
or dword [ebp - 4], 0xffffffff
xor eax, eax
jmp 0x40a1bc
mov byte [ebp - 4], 1
cmp dword [ebp + 0x18], ebx
je 0x40a1a0
push dword [ebp + 0x18]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov byte [ebp - 4], bl
cmp dword [ebp + 0x1c], ebx
je 0x40a18a
push dword [ebp + 0x1c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x40a18a
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x40]
xor ecx, ebp
call fcn.004217ad
add ebp, 0x44
leave
ret 0xc