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

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x44
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x14]
mov word [ebp - 0x1c], dx
mov word [ebp - 0x20], ax
mov dword [ebp - 0x14], 0
call sym.__errno
mov dword [eax], 0
movzx edx, word [ebp - 0x20]
movzx eax, word [ebp - 0x1c]
mov dword [esp + 0xc], edx
mov edx, dword [ebp + 0x10]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call dbg.doconnect
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jg 0x403aee
mov eax, 0xffffffff
jmp 0x403f58
mov ax, word [0x40a0c8]
test ax, ax
je 0x403b0e
cmp word [ebp - 0x20], 0
jne 0x403b38
mov dword [esp], str.UDP_listen_needs__p_arg
call dbg.bail
jmp 0x403b39
mov eax, dword [ebp - 0x24]
mov dword [esp + 4], 1
mov dword [esp], eax
call sym._listen_8
sub esp, 8
mov ebx, eax
test ebx, ebx
jns 0x403b39
mov dword [esp], str.local_listen_fuxored
call dbg.bail
jmp 0x403b39
nop
mov ax, word [0x40a0ca]
test ax, ax
je 0x403c2b
mov dword [ebp - 0x18], 0x10
mov eax, dword [0x40a0a0]
mov edx, eax
mov eax, dword [ebp - 0x24]
lea ecx, [ebp - 0x18]
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._getsockname_12
sub esp, 0xc
mov ebx, eax
test ebx, ebx
jns 0x403b81
mov dword [esp], str.local_getsockname_failed
call dbg.holler
mov eax, dword [0x40a198]
mov dword [esp + 8], 0xf
mov dword [esp + 4], str.listening_on__
mov dword [esp], eax
call sym._memcpy
mov eax, dword [0x40a0a0]
mov eax, dword [eax + 4]
test eax, eax
je 0x403bd1
mov eax, dword [0x40a0a0]
mov eax, dword [eax + 4]
mov dword [esp], eax
call sym._inet_ntoa_4
sub esp, 4
mov edx, dword [0x40a198]
mov dword [esp + 4], eax
mov dword [esp], edx
call sym._strcat
jmp 0x403be6
mov eax, dword [0x40a198]
mov dword [esp + 4], 0x4088db
mov dword [esp], eax
call sym._strcat
mov eax, dword [0x40a198]
mov dword [esp + 4], str.___d_...
mov dword [esp], eax
call sym._strcat
mov eax, dword [0x40a0a0]
mov ax, word [eax + 2]
movzx eax, ax
mov dword [esp], eax
call sym._ntohs_4
sub esp, 4
mov word [ebp - 0xa], ax
movzx edx, word [ebp - 0xa]
mov eax, dword [0x40a198]
mov dword [esp + 4], edx
mov dword [esp], eax
call dbg.holler
mov ax, word [0x40a0c8]
test ax, ax
je 0x403ce2
mov dword [ebp - 0x18], 0x10
mov eax, dword [0x40a0cc]
mov dword [esp + 4], eax
mov dword [esp], 2
call dbg.arm
mov dword [esp], 0x40a158
call sym.__setjmp
test eax, eax
jne 0x403f1d
mov eax, dword [0x40a0a4]
mov ecx, eax
mov edx, dword [0x40a198]
mov eax, dword [ebp - 0x24]
lea ebx, [ebp - 0x18]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], 2
mov dword [esp + 8], 0x2000
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._recvfrom_24
sub esp, 0x18
mov ebx, eax
mov dword [esp + 4], 0
mov dword [esp], 0
call dbg.arm
mov eax, dword [0x40a0a4]
mov edx, eax
mov eax, dword [ebp - 0x24]
mov dword [esp + 8], 0x10
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._connect_12
sub esp, 0xc
mov ebx, eax
jmp 0x403d6f
mov dword [ebp - 0x18], 0x10
mov eax, dword [0x40a0cc]
mov dword [esp + 4], eax
mov dword [esp], 2
call dbg.arm
mov dword [esp], 0x40a158
call sym.__setjmp
test eax, eax
jne 0x403f20
mov eax, dword [0x40a0a4]
mov edx, eax
mov eax, dword [ebp - 0x24]
lea ecx, [ebp - 0x18]
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._accept_12
sub esp, 0xc
mov ebx, eax
mov dword [esp + 4], 0
mov dword [esp], 0
call dbg.arm
mov eax, dword [ebp - 0x24]
mov dword [esp + 4], 2
mov dword [esp], eax
call sym._shutdown_8
sub esp, 8
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call sym._closesocket_4
sub esp, 4
mov dword [ebp - 0x24], ebx
test ebx, ebx
js 0x403f2e
mov eax, dword [0x40a198]
mov dword [esp + 8], 0x40
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._memset
mov eax, dword [0x40a198]
add eax, 0x20
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x18], 0x10
mov eax, dword [0x40a0a0]
mov edx, eax
mov eax, dword [ebp - 0x24]
lea ecx, [ebp - 0x18]
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._getsockname_12
sub esp, 0xc
mov ebx, eax
test ebx, ebx
jns 0x403dd8
mov dword [esp], str.post_rcv_getsockname_failed
call dbg.holler
mov eax, dword [0x40a0a0]
mov eax, dword [eax + 4]
mov dword [esp], eax
call sym._inet_ntoa_4
sub esp, 4
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym._strcpy
mov eax, dword [0x40a0a4]
mov ax, word [eax + 2]
movzx eax, ax
mov dword [esp], eax
call sym._ntohs_4
sub esp, 4
mov word [ebp - 0xa], ax
mov eax, dword [0x40a0a4]
mov eax, dword [eax + 4]
mov dword [esp], eax
call sym._inet_ntoa_4
sub esp, 4
mov edx, dword [0x40a198]
mov dword [esp + 4], eax
mov dword [esp], edx
call sym._strcpy
mov ax, word [0x40a0c2]
movzx edx, ax
mov eax, dword [0x40a198]
mov dword [esp + 4], edx
mov dword [esp], eax
call dbg.gethostpoop
mov dword [ebp - 0x14], eax
call sym.__errno
mov dword [eax], 0
mov dword [ebp - 0x18], 0
cmp dword [ebp + 8], 0
je 0x403e99
mov eax, dword [ebp - 0x14]
add eax, 0x1c0
mov dword [esp + 8], 0x10
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._memcmp
test eax, eax
je 0x403e99
mov dword [ebp - 0x18], 1
cmp word [ebp - 0x1c], 0
je 0x403eb1
mov ax, word [ebp - 0xa]
cmp ax, word [ebp - 0x1c]
je 0x403eb1
mov dword [ebp - 0x18], 1
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x403ee8
movzx ecx, word [ebp - 0xa]
mov eax, dword [ebp - 0x14]
add eax, 0x100
mov edx, eax
mov eax, dword [ebp - 0x14]
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x10]
mov dword [esp + 4], eax
mov dword [esp], str.invalid_connection_to___s__from__s___s___d
call dbg.bail
movzx ecx, word [ebp - 0xa]
mov eax, dword [ebp - 0x14]
add eax, 0x100
mov edx, eax
mov eax, dword [ebp - 0x14]
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x10]
mov dword [esp + 4], eax
mov dword [esp], str.connect_to___s__from__s___s___d
call dbg.holler
mov eax, dword [ebp - 0x24]
jmp 0x403f58
nop
jmp 0x403f21
nop
call sym.__errno
mov dword [eax], 0x274c
jmp 0x403f2f
nop
mov eax, dword [ebp - 0x24]
mov dword [esp + 4], 2
mov dword [esp], eax
call sym._shutdown_8
sub esp, 8
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call sym._closesocket_4
sub esp, 4
mov eax, 0xffffffff
mov ebx, dword [ebp - 4]
leave
ret