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

Disassembly:
push 0xffffffffffffffff
push 0x579b98
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push ebp
push esi
push edi
mov eax, dword [0x641030]
xor eax, esp
push eax
lea eax, [esp + 0x3c]
mov dword fs:[0], eax
mov esi, ecx
mov ecx, dword [esp + 0x64]
call fcn.004725a0
mov ebp, dword [esp + 0x4c]
mov edi, dword [esp + 0x50]
mov eax, ebp
or eax, edi
je 0x4a9b13
push 2
push str._r_n_____Received______r_n
mov ecx, esi
call fcn.004a92f0
mov eax, dword [esi + 0x54]
mov dword [esi + 0x58], 2
test eax, eax
je 0x4a9b23
mov edx, dword [eax + 0x78]
lea ecx, [eax + 0x78]
mov eax, dword [edx + 4]
call eax
mov ebx, eax
mov ecx, ebx
call fcn.004470d0
xor ecx, ecx
test eax, eax
je 0x4a9b23
cmp ecx, edi
jg 0x4a9ab0
jl 0x4a9aac
cmp eax, ebp
jae 0x4a9ab0
mov edi, eax
jmp 0x4a9ab6
mov ecx, dword [esp + 0x50]
mov edi, ebp
cmp byte [esp + 0x58], 0
mov dword [esp + 0x1c], ecx
jne 0x4a9af8
mov edx, dword [esp + 0x68]
mov eax, dword [esp + 0x64]
push edx
push eax
push edi
mov ecx, ebx
call fcn.00447030
mov ecx, dword [esp + 0x60]
push eax
call fcn.004735a0
test al, al
jne 0x4a9af8
mov ecx, dword [esp + 0x68]
mov edx, dword [ecx]
mov eax, dword [edx + 0x14]
push str.Failed_to_send_bytes_to_the_output.
call eax
xor al, al
jmp 0x4a9ccc
mov eax, dword [esp + 0x50]
sub ebp, edi
sbb eax, 0
mov ecx, ebp
or ecx, eax
mov dword [esp + 0x50], eax
mov ecx, ebx
jne 0x4a9b1a
push edi
call fcn.00449c90
mov al, 1
jmp 0x4a9ccc
call fcn.00447160
mov edi, dword [esp + 0x50]
lea ecx, [esp + 0x20]
mov dword [esp + 0x18], ebp
mov dword [esp + 0x1c], edi
mov byte [esp + 0x16], 0
call fcn.00447240
mov dword [esp + 0x44], 0
jmp 0x4a9b47
mov ebp, dword [esp + 0x18]
cmp dword [esp + 0x1c], 0
jl 0x4a9b5f
jg 0x4a9b58
cmp ebp, 0x1000
jbe 0x4a9b5f
mov eax, 0x1000
jmp 0x4a9b61
mov eax, ebp
mov ecx, dword [esi + 0x54]
test ecx, ecx
je 0x4a9cf2
mov ebx, dword [esp + 0x68]
mov edi, dword [esp + 0x64]
mov edx, dword [esp + 0x60]
push ebx
push edi
push edx
push eax
push eax
lea eax, [esp + 0x34]
push eax
call fcn.00489a00
mov byte [esp + 0x17], al
test al, al
jne 0x4a9be5
push ebx
push str.readNToOutput
mov ecx, edi
call fcn.00472610
mov ecx, dword [esi + 0x54]
test ecx, ecx
je 0x4a9bdb
push ebx
push 1
call fcn.00486ef0
test al, al
jne 0x4a9bdb
mov ecx, dword [esi + 0x54]
add ecx, 0x7c
call fcn.00412990
push 2
push str._r_n_____Not_Connected______r_n
mov ecx, esi
mov dword [esi + 0x54], 0
mov byte [esp + 0x1e], 1
call fcn.004a92f0
mov dword [esi + 0x58], 3
cmp byte [edi + 0x15], 0
jne 0x4a9cf2
lea ecx, [esp + 0x20]
call fcn.0051d090
xor edi, edi
cmp edi, dword [esp + 0x1c]
mov ebx, eax
jg 0x4a9d1c
jl 0x4a9c06
cmp ebx, ebp
jae 0x4a9d1c
cmp byte [esp + 0x58], 0
mov byte [esp + 0x4c], 1
jne 0x4a9c2e
mov ecx, dword [esp + 0x68]
mov edx, dword [esp + 0x64]
push ecx
mov ecx, dword [esp + 0x58]
push edx
lea eax, [esp + 0x28]
push eax
call fcn.004737c0
mov byte [esp + 0x4c], al
lea ecx, [esp + 0x20]
call fcn.0051d090
lea ecx, [esp + 0x20]
mov edi, eax
call fcn.00446f60
mov ebp, eax
test ebp, ebp
je 0x4a9c78
test edi, edi
je 0x4a9c78
cmp byte [esi + 0x178], 0
je 0x4a9c62
push edi
push ebp
lea ecx, [esi + 0x17c]
call fcn.00448260
cmp byte [esi + 0x5c], 0
je 0x4a9c78
push 0
push edi
lea ecx, [esi + 0x60]
push ebp
push ecx
call fcn.004667d0
add esp, 0x10
sub dword [esp + 0x18], ebx
mov eax, 0
lea ecx, [esp + 0x20]
sbb dword [esp + 0x1c], eax
call fcn.00446f40
mov bl, byte [esp + 0x4c]
test bl, bl
je 0x4a9ce2
cmp byte [esp + 0x5c], 0
je 0x4a9ca4
cmp byte [esp + 0x16], 0
jne 0x4a9d07
cmp byte [esp + 0x17], 0
je 0x4a9cf2
mov edx, dword [esp + 0x18]
or edx, dword [esp + 0x1c]
jne 0x4a9b43
lea ecx, [esp + 0x20]
mov dword [esp + 0x44], 0xffffffff
call fcn.004479b0
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 eax, dword [ecx]
mov edx, dword [eax + 0x14]
push str.Failed_to_send_received_bytes_to_the_output.
call edx
lea ecx, [esp + 0x20]
mov dword [esp + 0x44], 0xffffffff
call fcn.004479b0
xor al, al
jmp 0x4a9ccc
lea ecx, [esp + 0x20]
mov dword [esp + 0x44], 0xffffffff
call fcn.004479b0
mov al, 1
jmp 0x4a9ccc
cmp byte [esp + 0x58], 0
mov byte [esp + 0x5c], 1
jne 0x4a9d4a
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x64]
push eax
push ecx
push ebp
lea ecx, [esp + 0x2c]
call fcn.00446f60
mov ecx, dword [esp + 0x60]
push eax
call fcn.004735a0
mov byte [esp + 0x5c], al
push ebp
lea ecx, [esp + 0x24]
call fcn.00446f60
push eax
mov ecx, esi
call fcn.004a91e0
cmp edi, dword [esp + 0x1c]
jl 0x4a9d82
jg 0x4a9d68
cmp ebx, ebp
jbe 0x4a9d82
push ebp
lea ecx, [esp + 0x24]
call fcn.00446f90
mov ecx, dword [esi + 0x54]
sub ebx, ebp
test ecx, ecx
je 0x4a9d82
push ebx
push eax
call fcn.00488090
cmp byte [esp + 0x5c], 0
jne 0x4a9d07
mov ecx, dword [esp + 0x68]
mov edx, dword [ecx]
mov eax, dword [edx + 0x14]
push str.Failed_to_send_received_bytes_to_the_output.__2_
call eax
jmp 0x4a9cf2