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

Disassembly:
push 0xffffffffffffffff
push 0x409fd8
mov eax, dword fs:[0]
push eax
mov eax, 0x204c
call fcn.00409c20
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 + 0x2074]
mov ebp, dword [esp + 0x2070]
mov esi, ecx
mov edi, edx
lea ecx, [esp + 0x24]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], edi
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
xor ebx, ebx
lea ecx, [esp + 0x40]
mov dword [esp + 0x2068], 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_]
cmp esi, ebx
mov byte [esp + 0x2068], 1
je 0x40162b
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x28]
push edx
lea edx, [esp + 0x48]
mov ecx, esi
call fcn.00401810
cmp eax, ebx
jne 0x401658
lea ecx, [esp + 0x40]
mov byte [esp + 0x2068], bl
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 0x4017e2
lea eax, [esp + 0x40]
push eax
lea ecx, [ebp + 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 ebx, dword [esp + 0x28]
jae 0x401675
lea ebx, [esp + 0x28]
mov ecx, dword [esp + 0x20]
push ecx
mov esi, ebp
call fcn.004019a0
test eax, eax
jne 0x4016b3
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 0x4017e2
push 0x1fff
lea edx, [esp + 0x61]
push 0
push edx
mov byte [esp + 0x68], 0
call sub.MSVCR80.dll_memset
mov eax, dword [edi]
add esp, 0xc
push eax
lea esi, [esp + 0x60]
mov eax, ebp
call fcn.00401a70
mov eax, esi
lea edx, [eax + 1]
nop
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4016e0
push 0
sub eax, edx
mov edx, dword [ebp]
push eax
lea ecx, [esp + 0x64]
push ecx
push edx
call dword [sym.imp.WS2_32.dll_send]
or edi, 0xffffffff
cmp eax, edi
jne 0x40172e
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], edi
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 0x4017e2
mov ebx, dword [sym.imp.WS2_32.dll_recv]
xor esi, esi
mov ecx, dword [ebp]
push 0
push 1
lea eax, [esp + esi + 0x64]
push eax
push ecx
call ebx
test eax, eax
jle 0x401704
add esi, 1
cmp esi, 4
jle 0x40176d
cmp byte [esp + esi + 0x58], 0xd
jne 0x40176d
cmp byte [esp + esi + 0x59], 0xa
jne 0x40176d
cmp byte [esp + esi + 0x5a], 0xd
jne 0x40176d
cmp byte [esp + esi + 0x5b], 0xa
je 0x401775
cmp esi, 0x2000
jb 0x401736
lea esi, [esp + 0x5c]
call fcn.00401ba0
mov edi, eax
test edi, edi
jle 0x401685
xor esi, esi
test edi, edi
jle 0x4017b0
mov edx, dword [esp + 0x1c]
push 0
mov eax, edi
sub eax, esi
push eax
mov eax, dword [ebp]
add edx, esi
push edx
push eax
call ebx
test eax, eax
jle 0x401685
add esi, eax
cmp esi, edi
jl 0x40178e
mov ecx, dword [esp + 0x18]
mov dword [ecx], edi
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_]
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.00409345
add esp, 0x2058
ret 8