Function at 0x403a49
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 - 0xc], 0
call sub.msvcrt.dll__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 fcn.004036da
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jg 0x403aa5
mov eax, 0xffffffff
jmp 0x403f38
movzx eax, word [0x40a06c]
test ax, ax
je 0x403ac6
cmp word [ebp - 0x20], 0
jne 0x403aee
mov dword [esp], str.UDP_listen_needs__p_arg
call fcn.00402ea2
jmp 0x403aee
mov eax, dword [ebp - 0x24]
mov dword [esp + 4], 1
mov dword [esp], eax
call sub.WSOCK32.DLL_listen
sub esp, 8
mov ebx, eax
test ebx, ebx
jns 0x403aee
mov dword [esp], str.local_listen_fuxored
call fcn.00402ea2
movzx eax, word [0x40a06e]
test ax, ax
je 0x403c09
mov dword [ebp - 0x18], 0x10
mov eax, dword [0x40a044]
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 sub.WSOCK32.DLL_getsockname
sub esp, 0xc
mov ebx, eax
test ebx, ebx
jns 0x403b37
mov dword [esp], str.local_getsockname_failed
call fcn.00402dec
mov eax, dword [0x40a140]
mov dword [esp + 8], 0xf
mov dword [esp + 4], str.listening_on__
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov eax, dword [0x40a044]
mov eax, dword [eax + 4]
test eax, eax
je 0x403b87
mov eax, dword [0x40a044]
mov eax, dword [eax + 4]
mov dword [esp], eax
call sub.WSOCK32.DLL_inet_ntoa
sub esp, 4
mov edx, dword [0x40a140]
mov dword [esp + 4], eax
mov dword [esp], edx
call sub.msvcrt.dll_strcat
jmp 0x403bb0
mov ebx, dword [0x40a140]
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
lea eax, [ebx + eax]
mov dword [esp + 8], 4
mov dword [esp + 4], 0x40886b
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov ebx, dword [0x40a140]
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
lea eax, [ebx + eax]
mov dword [esp + 8], 9
mov dword [esp + 4], str.___d_...
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov eax, dword [0x40a044]
movzx eax, word [eax + 2]
movzx eax, ax
mov dword [esp], eax
call sub.WSOCK32.DLL_ntohs
sub esp, 4
mov word [ebp - 0xe], ax
movzx edx, word [ebp - 0xe]
mov eax, dword [0x40a140]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.00402dec
movzx eax, word [0x40a06c]
test ax, ax
je 0x403cc1
mov dword [ebp - 0x18], 0x10
mov eax, dword [0x40a070]
mov dword [esp + 4], eax
mov dword [esp], 2
call fcn.00402fa1
mov dword [esp], 0x40a100
call sub.msvcrt.dll__setjmp
test eax, eax
jne 0x403efd
mov eax, dword [0x40a048]
mov ecx, eax
mov edx, dword [0x40a140]
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 sub.WSOCK32.DLL_recvfrom
sub esp, 0x18
mov ebx, eax
mov dword [esp + 4], 0
mov dword [esp], 0
call fcn.00402fa1
mov eax, dword [0x40a048]
mov edx, eax
mov eax, dword [ebp - 0x24]
mov dword [esp + 8], 0x10
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.WSOCK32.DLL_connect
sub esp, 0xc
mov ebx, eax
jmp 0x403d4e
mov dword [ebp - 0x18], 0x10
mov eax, dword [0x40a070]
mov dword [esp + 4], eax
mov dword [esp], 2
call fcn.00402fa1
mov dword [esp], 0x40a100
call sub.msvcrt.dll__setjmp
test eax, eax
jne 0x403f00
mov eax, dword [0x40a048]
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 sub.WSOCK32.DLL_accept
sub esp, 0xc
mov ebx, eax
mov dword [esp + 4], 0
mov dword [esp], 0
call fcn.00402fa1
mov eax, dword [ebp - 0x24]
mov dword [esp + 4], 2
mov dword [esp], eax
call sub.WSOCK32.DLL_shutdown
sub esp, 8
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call sub.WSOCK32.DLL_closesocket
sub esp, 4
mov dword [ebp - 0x24], ebx
test ebx, ebx
js 0x403f0e
mov eax, dword [0x40a140]
mov dword [esp + 8], 0x40
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov eax, dword [0x40a140]
add eax, 0x20
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], 0x10
mov eax, dword [0x40a044]
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 sub.WSOCK32.DLL_getsockname
sub esp, 0xc
mov ebx, eax
test ebx, ebx
jns 0x403db7
mov dword [esp], str.post_rcv_getsockname_failed
call fcn.00402dec
mov eax, dword [0x40a044]
mov eax, dword [eax + 4]
mov dword [esp], eax
call sub.WSOCK32.DLL_inet_ntoa
sub esp, 4
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sub.msvcrt.dll_strcpy
mov eax, dword [0x40a048]
movzx eax, word [eax + 2]
movzx eax, ax
mov dword [esp], eax
call sub.WSOCK32.DLL_ntohs
sub esp, 4
mov word [ebp - 0xe], ax
mov eax, dword [0x40a048]
mov eax, dword [eax + 4]
mov dword [esp], eax
call sub.WSOCK32.DLL_inet_ntoa
sub esp, 4
mov edx, dword [0x40a140]
mov dword [esp + 4], eax
mov dword [esp], edx
call sub.msvcrt.dll_strcpy
movzx eax, word [0x40a066]
movzx edx, ax
mov eax, dword [0x40a140]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.004030ba
mov dword [ebp - 0xc], eax
call sub.msvcrt.dll__errno
mov dword [eax], 0
mov dword [ebp - 0x18], 0
cmp dword [ebp + 8], 0
je 0x403e79
mov eax, dword [ebp - 0xc]
add eax, 0x1c0
mov dword [esp + 8], 0x10
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.msvcrt.dll_memcmp
test eax, eax
je 0x403e79
mov dword [ebp - 0x18], 1
cmp word [ebp - 0x1c], 0
je 0x403e91
movzx eax, word [ebp - 0xe]
cmp ax, word [ebp - 0x1c]
je 0x403e91
mov dword [ebp - 0x18], 1
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x403ec8
movzx ecx, word [ebp - 0xe]
mov eax, dword [ebp - 0xc]
add eax, 0x100
mov edx, eax
mov eax, dword [ebp - 0xc]
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x14]
mov dword [esp + 4], eax
mov dword [esp], str.invalid_connection_to___s__from__s___s___d
call fcn.00402ea2
movzx ecx, word [ebp - 0xe]
mov eax, dword [ebp - 0xc]
add eax, 0x100
mov edx, eax
mov eax, dword [ebp - 0xc]
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x14]
mov dword [esp + 4], eax
mov dword [esp], str.connect_to___s__from__s___s___d
call fcn.00402dec
mov eax, dword [ebp - 0x24]
jmp 0x403f38
nop
jmp 0x403f01
nop
call sub.msvcrt.dll__errno
mov dword [eax], 0x274c
jmp 0x403f0f
nop
mov eax, dword [ebp - 0x24]
mov dword [esp + 4], 2
mov dword [esp], eax
call sub.WSOCK32.DLL_shutdown
sub esp, 8
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call sub.WSOCK32.DLL_closesocket
sub esp, 4
mov eax, 0xffffffff
mov ebx, dword [ebp - 4]
leave
ret