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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, ecx
push edi
mov di, dx
mov dword [ebp - 0x1c], ebx
mov word [ebp - 0x10], di
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
movzx edx, di
mov ecx, ebx
mov dword [eax], 0
movzx eax, word [ebp + 0xc]
push eax
push esi
call fcn.00401c90
mov esi, eax
add esp, 8
mov dword [ebp - 0xc], esi
test esi, esi
jle 0x4022af
cmp word [0x40740c], 0
je 0x401f45
cmp word [ebp + 0xc], 0
je 0x4022c3
jmp 0x401f56
push 1
push esi
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
js 0x4022cd
cmp word [0x407414], 0
je 0x402055
lea eax, [ebp - 8]
mov dword [ebp - 8], 0x10
push eax
push dword [0x407428]
push esi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x401f8d
push str.local_getsockname_failed
call fcn.00401470
add esp, 4
mov edx, dword [0x4074c8]
movq xmm0, qword [str.listening_on__]
mov ecx, dword [0x407428]
movq qword [edx], xmm0
mov eax, dword [0x405854]
mov dword [edx + 8], eax
mov ax, word [0x405858]
mov word [edx + 0xc], ax
mov al, byte [0x40585a]
mov byte [edx + 0xe], al
cmp dword [ecx + 4], 0
je 0x402002
push dword [ecx + 4]
call dword [sym.imp.WS2_32.dll_inet_ntoa]
mov ebx, eax
mov esi, eax
mov al, byte [ebx]
inc ebx
test al, al
jne 0x401fd2
mov edx, dword [0x4074c8]
sub ebx, esi
lea edi, [edx - 1]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x401fe4
mov ecx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [0x407428]
jmp 0x402016
lea edi, [edx - 1]
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x402005
mov eax, dword [0x40585c]
mov dword [edi], eax
dec edx
mov al, byte [edx + 1]
lea edx, [edx + 1]
test al, al
jne 0x402017
mov eax, dword [str.___d_...]
mov dword [edx], eax
mov eax, dword [0x405864]
mov dword [edx + 4], eax
mov al, byte [0x405868]
mov byte [edx + 8], al
movzx eax, word [ecx + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
push eax
push dword [0x4074c8]
call fcn.00401470
add esp, 8
cmp word [0x40740c], 0
mov ebx, dword [sym.imp.WS2_32.dll_shutdown]
mov dword [ebp - 8], 0x10
push 0xfffffffffffffff5
je 0x4020c9
mov esi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
call esi
push 0
push 0x407480
call sub.VCRUNTIME140.dll__setjmp3
add esp, 8
test eax, eax
jne 0x402291
mov edi, dword [ebp - 0xc]
lea eax, [ebp - 8]
push eax
push dword [0x407444]
push 2
push 0x2000
push dword [0x4074c8]
push edi
call dword [sym.imp.WS2_32.dll_recvfrom]
push 0xfffffffffffffff5
call esi
push 0x10
push dword [0x407444]
push edi
call dword [sym.imp.WS2_32.dll_connect]
mov esi, dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x402117
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push 0
push 0x407480
call sub.VCRUNTIME140.dll__setjmp3
add esp, 8
test eax, eax
jne 0x402291
mov esi, dword [ebp - 0xc]
lea eax, [ebp - 8]
push eax
push dword [0x407444]
push esi
call dword [sym.imp.WS2_32.dll_accept]
push 0xfffffffffffffff5
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push 2
push esi
call ebx
push esi
mov esi, dword [sym.imp.WS2_32.dll_closesocket]
call esi
mov dword [ebp - 0xc], edi
mov eax, edi
test eax, eax
js 0x4022a7
mov esi, dword [0x4074c8]
push 0x40
push 0
push esi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 8], 0x10
lea eax, [ebp - 8]
lea ebx, [esi + 0x20]
mov dword [ebp - 0x18], ebx
push eax
push dword [0x407428]
push edi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x402161
push str.post_rcv_getsockname_failed
call fcn.00401470
add esp, 4
mov eax, dword [0x407428]
mov esi, dword [sym.imp.WS2_32.dll_inet_ntoa]
push dword [eax + 4]
call esi
mov edx, ebx
sub edx, eax
mov cl, byte [eax]
lea eax, [eax + 1]
mov byte [edx + eax - 1], cl
test cl, cl
jne 0x402175
mov eax, dword [0x407444]
movzx eax, word [eax + 2]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
mov dword [ebp - 0x14], eax
mov eax, dword [0x407444]
push dword [eax + 4]
call esi
mov ecx, dword [0x4074c8]
mov esi, ecx
sub esi, eax
nop dword [eax]
mov dl, byte [eax]
lea eax, [eax + 1]
mov byte [esi + eax - 1], dl
test dl, dl
jne 0x4021b0
movzx edx, word [0x407434]
call fcn.004018b0
mov ebx, eax
mov eax, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
call eax
mov ecx, dword [ebp - 0x1c]
xor edx, edx
mov dword [eax], 0
mov dword [ebp - 8], 0
test ecx, ecx
je 0x402241
lea edx, [ebx + 0x1c0]
mov esi, 0xc
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x402208
add ecx, 4
add edx, 4
sub esi, 4
jae 0x4021f3
xor eax, eax
jmp 0x40222f
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x40222a
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x40222a
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
jne 0x40222a
mov al, byte [ecx + 3]
cmp al, byte [edx + 3]
jne 0x40222a
xor eax, eax
jmp 0x40222f
sbb eax, eax
or eax, 1
xor edx, edx
test eax, eax
je 0x402241
mov dword [ebp - 8], 1
mov edx, 1
mov ax, word [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
test ax, ax
je 0x40225e
cmp cx, ax
je 0x40225e
mov dword [ebp - 8], 1
mov edx, 1
test edx, edx
jne 0x4022d7
movzx ecx, cx
push ecx
lea ecx, [ebx + 0x100]
push ecx
push ebx
push dword [ebp - 0x18]
push str.connect_to___s__from__s___s___d
call fcn.00401470
add esp, 0x14
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040377b
mov esp, ebp
pop ebp
ret
mov eax, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
call eax
mov edi, dword [ebp - 0xc]
mov esi, dword [sym.imp.WS2_32.dll_closesocket]
mov dword [eax], 0x274c
push 2
push edi
call ebx
push edi
call esi
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040377b
mov esp, ebp
pop ebp
ret
push str.UDP_listen_needs__p_arg
call fcn.00401850
push str.local_listen_fuxored
call fcn.00401850
movzx eax, cx
push eax
lea eax, [ebx + 0x100]
push eax
push ebx
push dword [ebp - 0x18]
push str.invalid_connection_to___s__from__s___s___d
call fcn.00401850
int3