Function at 0x4029b0
Capabilities:
Connect socket
Get local ipv4 addresses
Get socket information
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov edx, dword [ebp + 0xc]
push ebx
mov ecx, dword [ebp + 0x10]
push esi
push edi
mov edi, dword [ebp + 0x14]
mov eax, edi
and edx, 0xffff
and eax, 0xffff
mov dword [0x40fcd0], 0
push eax
mov eax, dword [ebp + 8]
push ecx
push edx
push eax
call fcn.00402770
mov esi, eax
add esp, 0x10
test esi, esi
mov dword [ebp - 8], esi
jle 0x402d68
cmp word [0x40fcb4], 0
je 0x402a0b
test di, di
jne 0x402a24
push str.UDP_listen_needs__p_arg
jmp 0x402a1c
push 1
push esi
call sub.WSOCK32.dll_listen
test eax, eax
jge 0x402a24
push str.local_listen_fuxored
call fcn.004021c0
add esp, 4
cmp word [0x40fcb8], 0
mov ebx, 0x10
je 0x402b25
mov edx, dword [0x40fc84]
lea ecx, [ebp - 4]
push ecx
push edx
push esi
mov dword [ebp - 4], ebx
call sub.WSOCK32.dll_getsockname
test eax, eax
jge 0x402a5c
push str.local_getsockname_failed
call fcn.00402120
add esp, 4
mov eax, dword [0x4100e0]
mov ecx, dword [str.listening_on__]
mov dword [eax], ecx
mov edx, dword [0x40c924]
mov dword [eax + 4], edx
mov ecx, dword [0x40c928]
mov dword [eax + 8], ecx
mov dx, word [0x40c92c]
mov word [eax + 0xc], dx
mov cl, byte [0x40c92e]
mov byte [eax + 0xe], cl
mov eax, dword [0x40fc84]
mov ecx, dword [eax + 4]
test ecx, ecx
je 0x402aa7
mov edx, ecx
push edx
call sub.WSOCK32.dll_inet_ntoa
mov edi, eax
jmp 0x402aac
mov edi, 0x40c91c
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, dword [0x4100e0]
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.___d_...
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, dword [0x4100e0]
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [0x40fc84]
mov cx, word [eax + 2]
push ecx
call sub.WSOCK32.dll_ntohs
mov edx, dword [0x4100e0]
and eax, 0xffff
push eax
push edx
call fcn.00402120
add esp, 8
cmp word [0x40fcb4], 0
mov dword [ebp - 4], ebx
je 0x402b98
mov eax, dword [0x40fcbc]
push eax
push 2
call fcn.00402220
add esp, 8
push 0
push 0x4100a0
call fcn.00404870
add esp, 8
test eax, eax
jne 0x402d55
mov edx, dword [0x40fc88]
mov eax, dword [0x4100e0]
mov esi, dword [ebp - 8]
lea ecx, [ebp - 4]
push ecx
push edx
push 2
push 0x2000
push eax
push esi
call sub.WSOCK32.dll_recvfrom
push 0
push 0
call fcn.00402220
mov ecx, dword [0x40fc88]
add esp, 8
push ebx
push ecx
push esi
call sub.WSOCK32.dll_connect
mov edi, eax
jmp 0x402bed
mov edx, dword [0x40fcbc]
push edx
push 2
call fcn.00402220
add esp, 8
push 0
push 0x4100a0
call fcn.00404870
add esp, 8
test eax, eax
jne 0x402d55
mov ecx, dword [0x40fc88]
mov esi, dword [ebp - 8]
lea eax, [ebp - 4]
push eax
push ecx
push esi
call sub.WSOCK32.dll_accept
push 0
push 0
mov edi, eax
call fcn.00402220
add esp, 8
push esi
call sub.WSOCK32.dll_closesocket
mov dword [ebp - 8], edi
mov esi, edi
test edi, edi
jl 0x402d62
mov edi, dword [0x4100e0]
mov ecx, ebx
xor eax, eax
rep stosd dword es:[edi], eax
mov edx, dword [0x4100e0]
mov ecx, dword [0x40fc84]
lea eax, [ebp - 4]
mov dword [ebp - 4], 0x10
push eax
lea ebx, [edx + 0x20]
push ecx
push esi
mov dword [ebp - 0x10], ebx
call sub.WSOCK32.dll_getsockname
test eax, eax
jge 0x402c36
push str.post_rcv_getsockname_failed
call fcn.00402120
add esp, 4
mov edx, dword [0x40fc84]
mov eax, dword [edx + 4]
push eax
call sub.WSOCK32.dll_inet_ntoa
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [0x40fc88]
mov cx, word [eax + 2]
push ecx
call sub.WSOCK32.dll_ntohs
mov edx, dword [0x40fc88]
mov dword [ebp - 0xc], eax
mov eax, dword [edx + 4]
push eax
call sub.WSOCK32.dll_inet_ntoa
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, dword [0x4100e0]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [0x40fca8]
mov ecx, dword [0x4100e0]
and eax, 0xffff
push eax
push ecx
call fcn.00402310
mov esi, dword [ebp + 8]
mov ebx, eax
xor eax, eax
add esp, 8
cmp esi, eax
mov dword [0x40fcd0], eax
mov dword [ebp - 4], eax
je 0x402cee
mov ecx, 0x10
lea edi, [ebx + 0x1c0]
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x402cee
mov eax, 1
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0xc]
mov esi, dword [ebp - 0xc]
test cx, cx
je 0x402d06
cmp si, cx
je 0x402d06
mov eax, 1
mov dword [ebp - 4], eax
test eax, eax
je 0x402d2b
mov edx, dword [ebp - 0x10]
mov eax, esi
and eax, 0xffff
lea ecx, [ebx + 0x100]
push eax
push ecx
push ebx
push edx
push str.invalid_connection_to___s__from__s___s___d
call fcn.004021c0
add esp, 0x14
mov ecx, dword [ebp - 0x10]
and esi, 0xffff
lea eax, [ebx + 0x100]
push esi
push eax
push ebx
push ecx
push str.connect_to___s__from__s___s___d
call fcn.00402120
mov eax, dword [ebp - 8]
add esp, 0x14
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 8]
mov dword [0x40fcd0], 0x274c
push esi
call sub.WSOCK32.dll_closesocket
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret