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

Disassembly:
push 0xffffffffffffffff
push 0x650d0a
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x134
push ebx
push ebp
push esi
mov ebp, ecx
push edi
push ebp
lea ecx, [esp + 0x2c]
call fcn.004eea40
mov esi, dword [esp + 0x16c]
xor ebx, ebx
mov dword [esp + 0x14c], ebx
mov al, byte [esi + 0x121]
test al, al
jne 0x586787
mov eax, dword [esp + 0x164]
mov cl, byte [eax + 0x24]
test cl, cl
jne 0x586787
xor eax, eax
jmp 0x58678c
mov eax, 1
push eax
push str.channelSendData2
push esi
lea ecx, [esp + 0x48]
call fcn.004f03a0
mov edi, dword [esp + 0x154]
mov byte [esp + 0x14c], 1
cmp edi, 0xffffffff
jne 0x5867c1
mov edx, dword [esi]
push str.No_SSH_channel.
mov ecx, esi
call dword [edx + 0x14]
jmp 0x586cec
mov eax, dword [esp + 0x15c]
lea ecx, [ebp + 0x3e8]
push edi
mov dword [esp + 0x1c], eax
mov dword [esp + 0x38], ebx
call fcn.005fb690
mov ebx, eax
test ebx, ebx
mov dword [esp + 0x70], ebx
jne 0x586804
mov edx, dword [esi]
push str.Channel_not_found.
mov ecx, esi
call dword [edx + 0x14]
push edi
push str.clientChannelNum
mov ecx, esi
call fcn.004effe0
jmp 0x586cec
mov eax, dword [esp + 0x164]
lea ecx, [esp + 0x1c]
mov dword [eax + 0x14], edi
call fcn.005fb0b0
mov ecx, dword [esp + 0x160]
lea eax, [ebp + 0x3e8]
mov dword [esp + 0x20], eax
mov eax, 0x400
cmp ecx, eax
mov byte [esp + 0x14c], 2
mov dword [esp + 0x24], ebx
jae 0x586844
mov dword [esp + 0x160], eax
mov eax, dword [ebx + 0xa8]
mov ecx, dword [esp + 0x160]
cmp ecx, eax
jbe 0x58685c
mov dword [esp + 0x160], eax
mov ecx, dword [esp + 0x160]
sub ecx, 0x40
mov dword [esp + 0x160], ecx
lea ecx, [esp + 0x54]
call fcn.004dfe70
mov eax, dword [esp + 0x15c]
mov byte [esp + 0x14c], 3
test eax, eax
je 0x586bd4
mov edi, dword [esp + 0x168]
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x160]
cmp ecx, eax
mov dword [esp + 0x14], eax
ja 0x5868ab
mov dword [esp + 0x14], ecx
mov eax, dword [ebx + 0xb0]
mov ecx, dword [esp + 0x14]
cmp ecx, eax
jbe 0x5868bd
mov dword [esp + 0x14], eax
cmp eax, 0x2008
jae 0x5868ce
mov dword [ebp + 0x448], 0x11
cmp dword [ebp + 0x448], 0x10
jbe 0x586a2d
mov al, byte [esi + 0x121]
test al, al
jne 0x5868f7
mov ecx, dword [esp + 0x164]
mov al, byte [ecx + 0x24]
test al, al
jne 0x5868f7
xor eax, eax
jmp 0x5868fc
mov eax, 1
push eax
push str.winAdjustCheck
push esi
lea ecx, [esp + 0x54]
call fcn.004f03a0
push esi
push edi
mov ecx, ebp
mov byte [esp + 0x154], 4
call fcn.00586dd0
mov ecx, edi
mov bl, al
call fcn.00514c20
test al, al
jne 0x586c38
test bl, bl
je 0x586a18
xor ebx, ebx
lea ecx, [esp + 0x74]
mov dword [ebp + 0x448], ebx
call fcn.0057e400
mov eax, dword [esp + 0x164]
mov byte [esp + 0x14c], 5
mov dword [esp + 0x88], 0xffffffff
mov dword [esp + 0x80], ebx
mov edx, dword [eax + 0x10]
mov cl, byte [eax + 0x24]
mov dword [esp + 0x84], edx
mov edx, dword [eax + 0x28]
mov byte [esp + 0x98], cl
mov ecx, edi
mov dword [esp + 0x9c], edx
call fcn.00514cb0
push esi
lea eax, [esp + 0x78]
push edi
push eax
mov ecx, ebp
call fcn.0057fec0
mov ecx, dword [edi + 4]
mov byte [esp + 0x13], al
cmp ecx, ebx
je 0x5869b4
push esi
call fcn.00535ec0
test al, al
jne 0x586c58
mov ecx, edi
call fcn.00514c20
test al, al
jne 0x586c66
mov al, byte [esp + 0xa3]
test al, al
jne 0x586c6e
mov al, byte [esp + 0xa1]
test al, al
jne 0x586c7c
push esi
push edi
mov ecx, ebp
call fcn.00586dd0
mov ecx, edi
mov bl, al
call fcn.00514c20
test al, al
jne 0x586c8a
lea ecx, [esp + 0x74]
mov byte [esp + 0x14c], 4
call fcn.0057e480
mov al, byte [esp + 0x13]
test al, al
jne 0x58692e
lea ecx, [esp + 0x48]
mov byte [esp + 0x14c], 3
call fcn.004f03e0
mov ebx, dword [esp + 0x70]
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x586a6c
mov eax, dword [ebx + 0xb0]
test eax, eax
jne 0x586bc8
mov ecx, dword [esp + 0x164]
push esi
push edi
push ecx
push ebx
mov ecx, ebp
call fcn.00586570
test al, al
je 0x586cca
mov dword [ebp + 0x448], 0x11
jmp 0x586bc8
lea ecx, [esp + 0x54]
call fcn.004dd9e0
push 0x5e
lea ecx, [esp + 0x58]
call fcn.004e0da0
mov eax, dword [ebx + 0xa0]
lea edx, [esp + 0x54]
push edx
push eax
call fcn.005da3a0
mov eax, dword [esp + 0x160]
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x5c]
push ecx
mov ecx, dword [esp + 0x40]
add ecx, eax
push edx
push ecx
call fcn.005da580
add esp, 0x14
lea ecx, [esp + 0xd0]
mov dword [esp + 0x38], 0
call fcn.004e57f0
mov al, byte [ebp + 0xc4]
mov byte [esp + 0x14c], 6
test al, al
je 0x586b16
mov edx, dword [ebx + 0x94]
lea ecx, [esp + 0xd0]
push edx
push str.channel
call fcn.004e4e40
push 0x20
lea ecx, [esp + 0xd4]
call fcn.004e3f90
mov eax, dword [esp + 0x15c]
lea ecx, [esp + 0xd0]
push eax
push str.numBytes
call fcn.004e4e40
mov edx, dword [ebp + 0x448]
push esi
inc edx
lea ecx, [esp + 0x3c]
mov dword [ebp + 0x448], edx
push edi
lea edx, [esp + 0x5c]
push ecx
push edx
lea ecx, [esp + 0xe0]
call fcn.004dda00
push eax
push str.CHANNEL_DATA
mov ecx, ebp
call fcn.00577f70
test al, al
je 0x586caa
mov eax, dword [esp + 0x38]
mov ecx, dword [ebx + 0xa8]
cmp eax, ecx
jbe 0x586b8e
mov edx, dword [esi]
push str.Sent_packet_larger_than_what_server_can_accept.
mov ecx, esi
call dword [edx + 0x14]
mov eax, dword [esp + 0x38]
mov ecx, esi
push eax
push str.sizeOfPacketSent
call fcn.004effe0
mov ecx, dword [ebx + 0xa8]
push ecx
push str.serverMaxPacketSize
mov ecx, esi
call fcn.004effe0
mov eax, dword [esp + 0x14]
mov ecx, dword [ebx + 0xb0]
mov edx, dword [esp + 0x34]
sub ecx, eax
mov dword [ebx + 0xb0], ecx
mov ecx, dword [esp + 0x18]
sub ecx, eax
add edx, eax
mov dword [esp + 0x18], ecx
lea ecx, [esp + 0xd0]
mov dword [esp + 0x34], edx
mov byte [esp + 0x14c], 3
call fcn.004e58d0
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x586894
lea ecx, [esp + 0x54]
mov byte [esp + 0x14c], 2
call fcn.004e0890
lea ecx, [esp + 0x1c]
mov byte [esp + 0x14c], 1
call fcn.005fb0f0
lea ecx, [esp + 0x3c]
mov byte [esp + 0x14c], 0
call fcn.004f03e0
lea ecx, [esp + 0x28]
mov dword [esp + 0x14c], 0xffffffff
call fcn.004eea90
mov al, 1
mov ecx, dword [esp + 0x144]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x140
ret 0x1c
push esi
push str.lowWindowSizeCheck
mov ecx, edi
call fcn.00514d20
lea ecx, [esp + 0x48]
mov byte [esp + 0x14c], 3
call fcn.004f03e0
jmp 0x586cca
mov edx, dword [esi]
push str.aborted_by_user_application.
mov ecx, esi
call dword [edx + 0x14]
jmp 0x586c97
push esi
push str.sshWindowAdjust1
jmp 0x586c90
mov eax, dword [esi]
push str.Received_DISCONNECT
mov ecx, esi
call dword [eax + 0x14]
jmp 0x586c97
mov edx, dword [esi]
push str.Received_CHANNEL_CLOSE
mov ecx, esi
call dword [edx + 0x14]
jmp 0x586c97
push esi
push str.lowWindowSizeCheck
mov ecx, edi
call fcn.00514d20
lea ecx, [esp + 0x74]
mov byte [esp + 0x14c], 4
call fcn.0057e480
jmp 0x586c45
mov eax, dword [esi]
push str.Error_sending_data
mov ecx, esi
call dword [eax + 0x14]
lea ecx, [esp + 0xd0]
mov byte [esp + 0x14c], 3
call fcn.004e58d0
lea ecx, [esp + 0x54]
mov byte [esp + 0x14c], 2
call fcn.004e0890
lea ecx, [esp + 0x1c]
mov byte [esp + 0x14c], 1
call fcn.005fb0f0
lea ecx, [esp + 0x3c]
mov byte [esp + 0x14c], 0
call fcn.004f03e0
lea ecx, [esp + 0x28]
mov dword [esp + 0x14c], 0xffffffff
call fcn.004eea90
xor al, al
jmp 0x586c1d