Function at 0x571590
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x691f38
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push ebp
push esi
push edi
mov eax, dword [0x78f694]
xor eax, esp
push eax
lea eax, [esp + 0x3c]
mov dword fs:[0], eax
mov esi, ecx
mov ecx, dword [esp + 0x64]
call fcn.00512090
mov edi, dword [esp + 0x4c]
mov ebp, dword [esp + 0x50]
mov eax, edi
or eax, ebp
je 0x571686
push 2
push str._r_n_____Received______r_n
mov ecx, esi
call fcn.00570e60
mov eax, dword [esi + 0x54]
test eax, eax
mov dword [esi + 0x58], 2
je 0x571698
mov edx, dword [eax + 0x78]
lea ecx, [eax + 0x78]
mov eax, dword [edx + 4]
call eax
mov ebx, eax
mov ecx, ebx
call fcn.00467ef0
xor ecx, ecx
test eax, eax
je 0x571698
cmp ecx, ebp
jg 0x571620
jl 0x57161c
cmp eax, edi
jae 0x571620
mov edi, eax
jmp 0x571624
mov ecx, dword [esp + 0x50]
cmp byte [esp + 0x58], 0
mov ebp, dword [esp + 0x68]
mov dword [esp + 0x1c], ecx
jne 0x571665
mov edx, dword [esp + 0x64]
push ebp
push edx
push edi
mov ecx, ebx
call fcn.00467e50
mov ecx, dword [esp + 0x60]
push eax
call fcn.005340e0
test al, al
jne 0x571665
mov eax, dword [ebp]
mov edx, dword [eax + 0x14]
push str.Failed_to_send_bytes_to_the_output.
mov ecx, ebp
call edx
xor al, al
jmp 0x57188e
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x50]
sub eax, edi
sbb ecx, 0
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], ecx
or eax, ecx
mov ecx, ebx
jne 0x57168d
push edi
call fcn.0046ac20
mov al, 1
jmp 0x57188e
call fcn.00467f80
mov edi, dword [esp + 0x4c]
jmp 0x57169c
mov ebp, dword [esp + 0x68]
mov eax, dword [esp + 0x50]
mov ebx, edi
lea ecx, [esp + 0x20]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], eax
mov byte [esp + 0x4c], 0
call fcn.00468060
xor edi, edi
mov dword [esp + 0x44], edi
jmp 0x5716ca
mov ebp, dword [esp + 0x68]
mov ebx, dword [esp + 0x18]
xor edi, edi
cmp dword [esp + 0x1c], edi
jl 0x5716e1
jg 0x5716da
cmp ebx, 0x1000
jbe 0x5716e1
mov eax, 0x1000
jmp 0x5716e3
mov eax, ebx
mov ecx, dword [esi + 0x54]
cmp ecx, edi
je 0x5718b4
mov ebx, dword [esp + 0x64]
mov edx, dword [esp + 0x60]
push ebp
push ebx
push edx
push eax
push eax
lea eax, [esp + 0x34]
push eax
call fcn.0051ffe0
test al, al
mov byte [esp + 0x17], al
jne 0x5717ab
push ebp
push str.readNToOutput
mov ecx, ebx
call fcn.00512100
mov ecx, dword [esi + 0x54]
cmp ecx, edi
je 0x571759
push ebp
push 1
call fcn.0051d4c0
test al, al
jne 0x571759
mov ecx, dword [esi + 0x54]
add ecx, 0x7c
call fcn.0048ed60
push 2
push str._r_n_____Not_Connected______r_n
mov ecx, esi
mov dword [esi + 0x54], edi
mov byte [esp + 0x54], 1
call fcn.00570e60
mov dword [esi + 0x58], 3
cmp byte [ebx + 0x16], 0
je 0x5717a1
cmp byte [esp + 0x4c], 0
jne 0x5717a1
mov edx, dword [ebp]
mov eax, dword [edx + 0x14]
push str.Received_fatal_socket_error.__Closing_the_connection.
mov ecx, ebp
call eax
mov eax, dword [esi + 0x54]
cmp eax, edi
je 0x571787
lea ecx, [eax + 0x7c]
call fcn.0048ed60
mov dword [esi + 0x54], edi
push 2
push str._r_n_____Not_Connected______r_n
mov ecx, esi
mov byte [esp + 0x54], 1
call fcn.00570e60
mov dword [esi + 0x58], 3
cmp byte [ebx + 0x15], 0
jne 0x5718b4
lea ecx, [esp + 0x20]
call fcn.00544a30
cmp edi, dword [esp + 0x1c]
mov ebx, eax
jg 0x5718de
jl 0x5717cc
cmp ebx, dword [esp + 0x18]
jae 0x5718de
cmp byte [esp + 0x58], 0
mov byte [esp + 0x16], 1
jne 0x5717f0
mov ecx, dword [esp + 0x64]
push ebp
push ecx
mov ecx, dword [esp + 0x5c]
lea edx, [esp + 0x28]
push edx
call fcn.00534420
mov byte [esp + 0x16], al
lea ecx, [esp + 0x20]
call fcn.00544a30
lea ecx, [esp + 0x20]
mov edi, eax
call fcn.00467d80
mov ebp, eax
test ebp, ebp
je 0x57183a
test edi, edi
je 0x57183a
cmp byte [esi + 0x178], 0
je 0x571824
push edi
push ebp
lea ecx, [esi + 0x17c]
call fcn.00469150
cmp byte [esi + 0x5c], 0
je 0x57183a
push 0
push edi
lea eax, [esi + 0x60]
push ebp
push eax
call fcn.0048c110
add esp, 0x10
sub dword [esp + 0x18], ebx
mov eax, 0
lea ecx, [esp + 0x20]
sbb dword [esp + 0x1c], eax
call fcn.00467d60
mov bl, byte [esp + 0x16]
test bl, bl
je 0x5718a4
cmp byte [esp + 0x5c], 0
je 0x571866
cmp byte [esp + 0x4c], 0
jne 0x5718c9
cmp byte [esp + 0x17], 0
je 0x5718b4
mov ecx, dword [esp + 0x18]
or ecx, dword [esp + 0x1c]
jne 0x5716c0
lea ecx, [esp + 0x20]
mov dword [esp + 0x44], 0xffffffff
call fcn.00468860
mov al, bl
mov ecx, dword [esp + 0x3c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret 0x20
mov ecx, dword [esp + 0x68]
mov edx, dword [ecx]
push str.Failed_to_send_received_bytes_to_the_output.
mov eax, dword [edx + 0x14]
call eax
lea ecx, [esp + 0x20]
mov dword [esp + 0x44], 0xffffffff
call fcn.00468860
xor al, al
jmp 0x57188e
lea ecx, [esp + 0x20]
mov dword [esp + 0x44], 0xffffffff
call fcn.00468860
mov al, 1
jmp 0x57188e
cmp byte [esp + 0x58], 0
mov byte [esp + 0x5c], 1
jne 0x57190c
mov ecx, dword [esp + 0x64]
mov edx, dword [esp + 0x18]
push ebp
push ecx
push edx
lea ecx, [esp + 0x2c]
call fcn.00467d80
mov ecx, dword [esp + 0x60]
push eax
call fcn.005340e0
mov byte [esp + 0x5c], al
mov eax, dword [esp + 0x18]
push eax
lea ecx, [esp + 0x24]
call fcn.00467d80
push eax
mov ecx, esi
call fcn.00570d50
cmp edi, dword [esp + 0x1c]
jl 0x57194c
mov edi, dword [esp + 0x18]
jg 0x571932
cmp ebx, edi
jbe 0x57194c
push edi
lea ecx, [esp + 0x24]
call fcn.00467db0
mov ecx, dword [esi + 0x54]
sub ebx, edi
test ecx, ecx
je 0x57194c
push ebx
push eax
call fcn.0051e660
cmp byte [esp + 0x5c], 0
jne 0x5718c9
mov edx, dword [ebp]
push str.Failed_to_send_received_bytes_to_the_output.__2_
mov ecx, ebp
jmp 0x5718af