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

Disassembly:
push ebp
mov ebp, esp
push edi
push ebx
sub esp, 0x40
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
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
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.0040398b
mov dword [ebp - 0x24], eax
test eax, eax
jg 0x403d85
mov eax, 0xffffffff
jmp 0x40424d
movzx eax, word [0x40a084]
test ax, ax
je 0x403da6
cmp word [ebp - 0x20], 0
jne 0x403dd0
mov dword [esp], str.UDP_listen_needs__p_arg
call fcn.0040313a
jmp 0x403dd0
mov eax, dword [ebp - 0x24]
mov dword [esp + 4], 1
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_listen]
call eax
sub esp, 8
mov ebx, eax
test ebx, ebx
jns 0x403dd0
mov dword [esp], str.local_listen_fuxored
call fcn.0040313a
movzx eax, word [0x40a086]
test ax, ax
je 0x403efd
mov dword [ebp - 0x18], 0x10
mov eax, dword [0x40a05c]
mov ecx, dword [ebp - 0x24]
lea edx, [ebp - 0x18]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], ecx
mov eax, dword [sym.imp.WSOCK32.DLL_getsockname]
call eax
sub esp, 0xc
mov ebx, eax
test ebx, ebx
jns 0x403e19
mov dword [esp], str.local_getsockname_failed
call fcn.0040307f
mov eax, dword [0x40a540]
mov dword [eax], 0x7473696c
mov dword [eax + 4], 0x6e696e65
mov dword [eax + 8], 0x6e6f2067
mov word [eax + 0xc], 0x5b20
mov byte [eax + 0xe], 0
mov eax, dword [0x40a05c]
mov eax, dword [eax + 4]
test eax, eax
je 0x403e72
mov eax, dword [0x40a05c]
mov eax, dword [eax + 4]
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_inet_ntoa]
call eax
sub esp, 4
mov edx, eax
mov eax, dword [0x40a540]
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.msvcrt.dll_strcat
jmp 0x403e99
mov edx, dword [0x40a540]
mov eax, edx
mov ecx, 0xffffffff
mov ebx, eax
mov eax, 0
mov edi, ebx
repne scasb al, byte es:[edi]
mov eax, ecx
not eax
sub eax, 1
add eax, edx
mov dword [eax], 0x796e61
mov edx, dword [0x40a540]
mov eax, edx
mov ecx, 0xffffffff
mov ebx, eax
mov eax, 0
mov edi, ebx
repne scasb al, byte es:[edi]
mov eax, ecx
not eax
sub eax, 1
add eax, edx
mov dword [eax], 0x6425205d
mov dword [eax + 4], 0x2e2e2e20
mov byte [eax + 8], 0
mov eax, dword [0x40a05c]
movzx eax, word [eax + 2]
movzx eax, ax
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_ntohs]
call eax
sub esp, 4
mov word [ebp - 0xe], ax
movzx edx, word [ebp - 0xe]
mov eax, dword [0x40a540]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0040307f
movzx eax, word [0x40a084]
test ax, ax
je 0x403fbf
mov dword [ebp - 0x18], 0x10
mov eax, dword [0x40a088]
mov dword [esp + 4], eax
mov dword [esp], 2
call fcn.00403241
mov dword [esp + 4], 0
mov dword [esp], 0x40a500
call sub.msvcrt.dll__setjmp3
test eax, eax
jne 0x403fba
mov edx, dword [0x40a060]
mov eax, dword [0x40a540]
mov edi, dword [ebp - 0x24]
mov ebx, edi
lea ecx, [ebp - 0x18]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 2
mov dword [esp + 8], 0x2000
mov dword [esp + 4], eax
mov dword [esp], ebx
mov eax, dword [sym.imp.WSOCK32.DLL_recvfrom]
call eax
sub esp, 0x18
mov ebx, eax
mov dword [esp + 4], 0
mov dword [esp], 0
call fcn.00403241
mov eax, dword [0x40a060]
mov edx, edi
mov dword [esp + 8], 0x10
mov dword [esp + 4], eax
mov dword [esp], edx
mov eax, dword [sym.imp.WSOCK32.DLL_connect]
call eax
sub esp, 0xc
mov ebx, eax
jmp 0x40405b
jmp 0x404212
mov dword [ebp - 0x18], 0x10
mov eax, dword [0x40a088]
mov dword [esp + 4], eax
mov dword [esp], 2
call fcn.00403241
mov dword [esp + 4], 0
mov dword [esp], 0x40a500
call sub.msvcrt.dll__setjmp3
test eax, eax
jne 0x404056
mov eax, dword [0x40a060]
mov edi, dword [ebp - 0x24]
mov ecx, edi
lea edx, [ebp - 0x18]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], ecx
mov eax, dword [sym.imp.WSOCK32.DLL_accept]
call eax
sub esp, 0xc
mov ebx, eax
mov dword [esp + 4], 0
mov dword [esp], 0
call fcn.00403241
mov eax, edi
mov dword [esp + 4], 2
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_shutdown]
call eax
sub esp, 8
mov eax, edi
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_closesocket]
call eax
sub esp, 4
mov dword [ebp - 0x24], ebx
jmp 0x40405b
jmp 0x404212
test ebx, ebx
jns 0x404064
jmp 0x40421f
mov eax, dword [0x40a540]
mov dword [esp + 8], 0x40
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov eax, dword [0x40a540]
add eax, 0x20
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], 0x10
mov eax, dword [0x40a05c]
mov ecx, dword [ebp - 0x24]
lea edx, [ebp - 0x18]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], ecx
mov eax, dword [sym.imp.WSOCK32.DLL_getsockname]
call eax
sub esp, 0xc
mov ebx, eax
test ebx, ebx
jns 0x4040c5
mov dword [esp], str.post_rcv_getsockname_failed
call fcn.0040307f
mov eax, dword [0x40a05c]
mov eax, dword [eax + 4]
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_inet_ntoa]
call eax
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 [0x40a060]
movzx eax, word [eax + 2]
movzx eax, ax
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_ntohs]
call eax
sub esp, 4
mov word [ebp - 0xe], ax
mov eax, dword [0x40a060]
mov eax, dword [eax + 4]
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_inet_ntoa]
call eax
sub esp, 4
mov edx, eax
mov eax, dword [0x40a540]
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.msvcrt.dll_strcpy
movzx eax, word [0x40a07e]
movzx edx, ax
mov eax, dword [0x40a540]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0040335e
mov dword [ebp - 0xc], eax
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov dword [eax], 0
mov dword [ebp - 0x18], 0
cmp dword [ebp + 8], 0
je 0x404190
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 0x404190
mov dword [ebp - 0x18], 1
cmp word [ebp - 0x1c], 0
je 0x4041a8
movzx eax, word [ebp - 0xe]
cmp ax, word [ebp - 0x1c]
je 0x4041a8
mov dword [ebp - 0x18], 1
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x4041de
movzx edx, word [ebp - 0xe]
mov eax, dword [ebp - 0xc]
lea ecx, [eax + 0x100]
mov eax, dword [ebp - 0xc]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], ecx
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.0040313a
movzx edx, word [ebp - 0xe]
mov eax, dword [ebp - 0xc]
lea ecx, [eax + 0x100]
mov eax, dword [ebp - 0xc]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], ecx
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.0040307f
mov eax, dword [ebp - 0x24]
jmp 0x40424d
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov dword [eax], 0x274c
mov edi, dword [ebp - 0x24]
mov eax, edi
mov dword [esp + 4], 2
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_shutdown]
call eax
sub esp, 8
mov eax, edi
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_closesocket]
call eax
sub esp, 4
mov eax, 0xffffffff
lea esp, [ebp - 8]
pop ebx
pop edi
pop ebp
ret