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

Disassembly:
push ebp
mov ebp, esp
push esi
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.004038cf
mov dword [ebp - 0x24], eax
test eax, eax
jg 0x403cab
mov eax, 0xffffffff
jmp 0x40414c
movzx eax, word [0x412120]
test ax, ax
je 0x403ccc
cmp word [ebp - 0x20], 0
jne 0x403cf6
mov dword [esp], str.UDP_listen_needs__p_arg
call fcn.0040309e
jmp 0x403cf6
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 0x403cf6
mov dword [esp], str.local_listen_fuxored
call fcn.0040309e
movzx eax, word [0x412122]
test ax, ax
je 0x403dfd
mov dword [ebp - 0x18], 0x10
mov eax, dword [0x4120e0]
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 0x403d3f
mov dword [esp], str.local_getsockname_failed
call fcn.00402fc6
mov eax, dword [0x4120f4]
mov dword [eax], 0x7473696c
mov dword [eax + 4], 0x6e696e65
mov dword [eax + 8], 0x6e6f2067
mov dword [eax + 0xb], 0x5b206e
mov eax, dword [0x4120e0]
mov eax, dword [eax + 4]
test eax, eax
je 0x403d94
mov eax, dword [0x4120e0]
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, dword [0x4120f4]
mov dword [esp + 4], eax
mov dword [esp], edx
call sub.msvcrt.dll_strcat
jmp 0x403daa
mov ebx, dword [0x4120f4]
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
add eax, ebx
mov dword [eax], 0x796e61
mov ebx, dword [0x4120f4]
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
add eax, ebx
mov dword [eax], 0x6425205d
mov dword [eax + 4], 0x2e2e2e20
mov byte [eax + 8], 0
mov eax, dword [0x4120e0]
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 [0x4120f4]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.00402fc6
movzx eax, word [0x412120]
test ax, ax
je 0x403ebc
mov dword [ebp - 0x18], 0x10
mov eax, dword [0x412124]
mov dword [esp + 4], eax
mov dword [esp], 2
call fcn.004031a8
mov dword [esp + 4], 0
mov dword [esp], 0x412080
call sub.msvcrt.dll__setjmp3
test eax, eax
jne 0x40410a
mov edx, dword [0x4120e4]
mov eax, dword [0x4120f4]
mov esi, dword [ebp - 0x24]
mov ebx, esi
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 dword [esp + 4], 0
mov dword [esp], 0
call fcn.004031a8
mov eax, dword [0x4120e4]
mov edx, esi
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 0x403f55
mov dword [ebp - 0x18], 0x10
mov eax, dword [0x412124]
mov dword [esp + 4], eax
mov dword [esp], 2
call fcn.004031a8
mov dword [esp + 4], 0
mov dword [esp], 0x412080
call sub.msvcrt.dll__setjmp3
test eax, eax
jne 0x40410d
mov eax, dword [0x4120e4]
mov esi, dword [ebp - 0x24]
mov ecx, esi
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.004031a8
mov eax, esi
mov dword [esp + 4], 2
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_shutdown]
call eax
sub esp, 8
mov eax, esi
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_closesocket]
call eax
sub esp, 4
mov dword [ebp - 0x24], ebx
test ebx, ebx
js 0x40411d
mov eax, dword [0x4120f4]
mov dword [esp + 8], 0x40
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov eax, dword [0x4120f4]
add eax, 0x20
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], 0x10
mov eax, dword [0x4120e0]
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 0x403fbe
mov dword [esp], str.post_rcv_getsockname_failed
call fcn.00402fc6
mov eax, dword [0x4120e0]
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 [0x4120e4]
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 [0x4120e4]
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, dword [0x4120f4]
mov dword [esp + 4], eax
mov dword [esp], edx
call sub.msvcrt.dll_strcpy
movzx eax, word [0x41211a]
movzx edx, ax
mov eax, dword [0x4120f4]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.004032c2
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 0x404088
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 0x404088
mov dword [ebp - 0x18], 1
cmp word [ebp - 0x1c], 0
je 0x4040a0
movzx eax, word [ebp - 0xe]
cmp ax, word [ebp - 0x1c]
je 0x4040a0
mov dword [ebp - 0x18], 1
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x4040d6
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.0040309e
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.00402fc6
mov eax, dword [ebp - 0x24]
jmp 0x40414c
nop
jmp 0x40410e
nop
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov dword [eax], 0x274c
jmp 0x40411e
nop
mov esi, dword [ebp - 0x24]
mov eax, esi
mov dword [esp + 4], 2
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_shutdown]
call eax
sub esp, 8
mov eax, esi
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 esi
pop ebp
ret