Function at 0x403119
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
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.00402dcf
mov dword [ebp - 0x24], eax
test eax, eax
jg 0x403174
mov eax, 0xffffffff
jmp 0x40360c
movzx eax, word [0x40c084]
test ax, ax
je 0x403195
cmp word [ebp - 0x20], 0
jne 0x4031bd
mov dword [esp], str.UDP_listen_needs__p_arg
call fcn.004025c9
jmp 0x4031bd
mov eax, dword [ebp - 0x24]
mov dword [esp + 4], 1
mov dword [esp], eax
call sub.WS2_32.dll_listen
sub esp, 8
mov ebx, eax
test ebx, ebx
jns 0x4031bd
mov dword [esp], str.local_listen_fuxored
call fcn.004025c9
movzx eax, word [0x40c086]
test ax, ax
je 0x4032e4
mov dword [ebp - 0x18], 0x10
mov eax, dword [0x40c05c]
mov ecx, dword [ebp - 0x24]
lea edx, [ebp - 0x18]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], ecx
call sub.WS2_32.dll_getsockname
sub esp, 0xc
mov ebx, eax
test ebx, ebx
jns 0x403204
mov dword [esp], str.local_getsockname_failed
call fcn.00402513
mov eax, dword [0x40c120]
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 [0x40c05c]
mov eax, dword [eax + 4]
test eax, eax
je 0x40325b
mov eax, dword [0x40c05c]
mov eax, dword [eax + 4]
mov dword [esp], eax
call sub.WS2_32.dll_inet_ntoa
sub esp, 4
mov edx, eax
mov eax, dword [0x40c120]
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.msvcrt.dll_strcat
jmp 0x403282
mov edx, dword [0x40c120]
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 [0x40c120]
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 [0x40c05c]
movzx eax, word [eax + 2]
movzx eax, ax
mov dword [esp], eax
call sub.WS2_32.dll_ntohs
sub esp, 4
mov word [ebp - 0xe], ax
movzx edx, word [ebp - 0xe]
mov eax, dword [0x40c120]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.00402513
movzx eax, word [0x40c084]
test ax, ax
je 0x403399
mov dword [ebp - 0x18], 0x10
mov eax, dword [0x40c088]
mov dword [esp + 4], eax
mov dword [esp], 2
call fcn.004026c9
mov dword [esp], 0x40c0e0
call sub.msvcrt.dll__setjmp
test eax, eax
jne 0x4035d0
mov edx, dword [0x40c060]
mov eax, dword [0x40c120]
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
call sub.WS2_32.dll_recvfrom
sub esp, 0x18
mov ebx, eax
mov dword [esp + 4], 0
mov dword [esp], 0
call fcn.004026c9
mov eax, dword [0x40c060]
mov edx, edi
mov dword [esp + 8], 0x10
mov dword [esp + 4], eax
mov dword [esp], edx
call sub.WS2_32.dll_connect
sub esp, 0xc
mov ebx, eax
jmp 0x403424
mov dword [ebp - 0x18], 0x10
mov eax, dword [0x40c088]
mov dword [esp + 4], eax
mov dword [esp], 2
call fcn.004026c9
mov dword [esp], 0x40c0e0
call sub.msvcrt.dll__setjmp
test eax, eax
jne 0x4035d3
mov eax, dword [0x40c060]
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
call sub.WS2_32.dll_accept
sub esp, 0xc
mov ebx, eax
mov dword [esp + 4], 0
mov dword [esp], 0
call fcn.004026c9
mov eax, edi
mov dword [esp + 4], 2
mov dword [esp], eax
call sub.WS2_32.dll_shutdown
sub esp, 8
mov eax, edi
mov dword [esp], eax
call sub.WS2_32.dll_closesocket
sub esp, 4
mov dword [ebp - 0x24], ebx
test ebx, ebx
js 0x4035e1
mov eax, dword [0x40c120]
mov dword [esp + 8], 0x40
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov eax, dword [0x40c120]
add eax, 0x20
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], 0x10
mov eax, dword [0x40c05c]
mov ecx, dword [ebp - 0x24]
lea edx, [ebp - 0x18]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], ecx
call sub.WS2_32.dll_getsockname
sub esp, 0xc
mov ebx, eax
test ebx, ebx
jns 0x40348b
mov dword [esp], str.post_rcv_getsockname_failed
call fcn.00402513
mov eax, dword [0x40c05c]
mov eax, dword [eax + 4]
mov dword [esp], eax
call sub.WS2_32.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 [0x40c060]
movzx eax, word [eax + 2]
movzx eax, ax
mov dword [esp], eax
call sub.WS2_32.dll_ntohs
sub esp, 4
mov word [ebp - 0xe], ax
mov eax, dword [0x40c060]
mov eax, dword [eax + 4]
mov dword [esp], eax
call sub.WS2_32.dll_inet_ntoa
sub esp, 4
mov edx, eax
mov eax, dword [0x40c120]
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.msvcrt.dll_strcpy
movzx eax, word [0x40c07e]
movzx edx, ax
mov eax, dword [0x40c120]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.004027e3
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 0x40354e
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 0x40354e
mov dword [ebp - 0x18], 1
cmp word [ebp - 0x1c], 0
je 0x403566
movzx eax, word [ebp - 0xe]
cmp ax, word [ebp - 0x1c]
je 0x403566
mov dword [ebp - 0x18], 1
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x40359c
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.004025c9
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.00402513
mov eax, dword [ebp - 0x24]
jmp 0x40360c
nop
jmp 0x4035d4
nop
call sub.msvcrt.dll__errno
mov dword [eax], 0x274c
jmp 0x4035e2
nop
mov edi, dword [ebp - 0x24]
mov eax, edi
mov dword [esp + 4], 2
mov dword [esp], eax
call sub.WS2_32.dll_shutdown
sub esp, 8
mov eax, edi
mov dword [esp], eax
call sub.WS2_32.dll_closesocket
sub esp, 4
mov eax, 0xffffffff
lea esp, [ebp - 8]
pop ebx
pop edi
pop ebp
ret