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

Disassembly:
push 0xffffffffffffffff
push 0x40a0a8
mov eax, dword fs:[0]
push eax
mov eax, 0x204c
call fcn.00409cf0
mov eax, dword [0x41013c]
xor eax, esp
mov dword [esp + 0x2048], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x41013c]
xor eax, esp
push eax
lea eax, [esp + 0x2060]
mov dword fs:[0], eax
mov eax, dword [esp + 0x2070]
mov ebx, dword [esp + 0x2074]
mov edi, ecx
lea ecx, [esp + 0x24]
mov esi, edx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], ebx
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
lea ecx, [esp + 0x40]
mov dword [esp + 0x2068], 0
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
test esi, esi
mov byte [esp + 0x2068], 1
je 0x40162d
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x28]
push edx
lea edx, [esp + 0x48]
mov ecx, esi
call fcn.004017e0
test eax, eax
jne 0x40165b
lea ecx, [esp + 0x40]
mov byte [esp + 0x2068], 0
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [esp + 0x24]
mov dword [esp + 0x2068], 0xffffffff
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
xor eax, eax
jmp 0x4017b1
lea eax, [esp + 0x40]
push eax
lea ecx, [edi + 0x24]
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
cmp dword [esp + 0x3c], 0x10
mov ecx, dword [esp + 0x28]
jae 0x401678
lea ecx, [esp + 0x28]
mov edx, dword [esp + 0x20]
push edx
call fcn.00401970
test eax, eax
je 0x40162d
push 0x1fff
lea eax, [esp + 0x61]
push 0
push eax
mov byte [esp + 0x68], 0
call sub.MSVCR80.dll_memset
mov ecx, dword [ebx]
add esp, 0xc
push ecx
lea esi, [esp + 0x60]
mov eax, edi
call fcn.00401b40
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4016b2
sub eax, edx
push 0
push eax
mov eax, dword [edi]
lea edx, [esp + 0x64]
push edx
push eax
call dword [sym.imp.WS2_32.dll_send]
or ebp, 0xffffffff
cmp eax, ebp
jne 0x4016ff
lea ecx, [esp + 0x40]
mov byte [esp + 0x2068], 0
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [esp + 0x24]
mov dword [esp + 0x2068], ebp
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
xor eax, eax
jmp 0x4017b1
mov ebx, dword [sym.imp.WS2_32.dll_recv]
xor esi, esi
mov edx, dword [edi]
push 0
push 1
lea ecx, [esp + esi + 0x64]
push ecx
push edx
call ebx
test eax, eax
jle 0x4016d5
add esi, 1
cmp esi, 4
jle 0x40173d
cmp byte [esp + esi + 0x58], 0xd
jne 0x40173d
cmp byte [esp + esi + 0x59], 0xa
jne 0x40173d
cmp byte [esp + esi + 0x5a], 0xd
jne 0x40173d
cmp byte [esp + esi + 0x5b], 0xa
je 0x401745
cmp esi, 0x2000
jb 0x401707
lea esi, [esp + 0x5c]
call fcn.00401c70
mov ebp, eax
test ebp, ebp
jle 0x40162d
xor esi, esi
test ebp, ebp
jle 0x40177f
mov ecx, dword [edi]
push 0
mov eax, ebp
sub eax, esi
push eax
mov eax, dword [esp + 0x24]
add eax, esi
push eax
push ecx
call ebx
test eax, eax
jle 0x40162d
add esi, eax
cmp esi, ebp
jl 0x40175e
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x40]
mov dword [edx], ebp
mov byte [esp + 0x2068], 0
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [esp + 0x24]
mov dword [esp + 0x2068], 0xffffffff
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov eax, 1
mov ecx, dword [esp + 0x2060]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x2048]
xor ecx, esp
call fcn.00409415
add esp, 0x2058
ret 8