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

Disassembly:
push 0xffffffffffffffff
push 0x57f0f2
mov eax, dword fs:[0]
push eax
sub esp, 0x148
mov eax, dword [0x641030]
xor eax, esp
mov dword [esp + 0x144], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x641030]
xor eax, esp
push eax
lea eax, [esp + 0x15c]
mov dword fs:[0], eax
mov eax, dword [esp + 0x170]
mov edx, dword [esp + 0x178]
mov edi, dword [esp + 0x16c]
mov ebp, dword [esp + 0x180]
mov esi, dword [esp + 0x188]
mov ebx, ecx
mov ecx, dword [esp + 0x174]
mov dword [esp + 0x38], ecx
mov ecx, dword [esp + 0x184]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x17c]
mov dword [esp + 0x30], edx
mov edx, dword [esp + 0x18c]
mov dword [esp + 0x1c], ecx
push ebx
lea ecx, [esp + 0x5c]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], edx
call fcn.00436260
push str.sshTransportOpenChannel
push esi
lea ecx, [esp + 0x6c]
mov dword [esp + 0x16c], 0
call fcn.00437740
mov eax, dword [esp + 0x38]
mov dword [eax], 0xffffffff
cmp byte [ebp + 0x24], 0
mov byte [esp + 0x164], 1
je 0x505e38
cmp dword [ebp + 0x28], 0
jne 0x505e38
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
push str.No_m_pHandler.
mov ecx, esi
call eax
test edi, edi
je 0x5062c3
mov eax, 1
cmp dword [edi + 0x1c], eax
jne 0x505eae
push str.Globalscape
push str.serverversion
mov ecx, ebx
call fcn.00500410
test al, al
je 0x505e9a
add ebx, 0x3e8
push 0
mov ecx, ebx
call fcn.005079b0
test eax, eax
je 0x505e8e
mov ecx, dword [0x63e910]
mov dword [edi + 0x94], ecx
inc dword [0x63e910]
push eax
mov ecx, ebx
call fcn.005077a0
jmp 0x505ec0
mov dword [edi + 0x94], 0
jmp 0x505ec0
mov edx, dword [0x63e910]
mov dword [edi + 0x94], edx
inc dword [0x63e910]
jmp 0x505ec0
mov ecx, dword [0x63e910]
mov dword [edi + 0x94], ecx
add dword [0x63e910], eax
lea ecx, [esp + 0x28]
call fcn.00439600
mov ecx, dword [esp + 0x1c]
mov byte [esp + 0x164], 2
mov dword [esp + 0x2c], edi
call fcn.004725a0
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x24]
mov dword [edx], 0
mov dword [eax], 0
call fcn.0042c9c0
lea ecx, [esp + 0x3c]
call fcn.00447240
push 0x5a
lea ecx, [esp + 0x40]
mov byte [esp + 0x168], 3
call fcn.00447e40
lea ecx, [esp + 0x3c]
lea ebx, [edi + 0x20]
push ecx
mov ecx, ebx
call fcn.0051b3b0
push eax
call fcn.0054c570
add esp, 8
cmp byte [esi + 0x121], 0
je 0x505f7e
push ebx
push str.channelType
mov ecx, esi
call fcn.004370f0
mov edx, dword [edi + 0x94]
push edx
push str.clientChannel
mov ecx, esi
call fcn.004373b0
mov eax, dword [edi + 0x98]
push eax
push str.clientInitialWindowSize
mov ecx, esi
call fcn.004373b0
mov ecx, dword [edi + 0x9c]
push ecx
push str.clientMaxPacketSize
mov ecx, esi
call fcn.004373b0
mov eax, dword [edi + 0x94]
lea edx, [esp + 0x3c]
push edx
push eax
call fcn.0054c450
mov edx, dword [edi + 0x98]
lea ecx, [esp + 0x44]
push ecx
push edx
call fcn.0054c450
mov ecx, dword [edi + 0x9c]
lea eax, [esp + 0x4c]
push eax
push ecx
call fcn.0054c450
add esp, 0x18
lea ecx, [esp + 0x70]
call fcn.0042d110
mov edx, dword [esp + 0x18]
cmp byte [edx + 0xc4], 0
mov byte [esp + 0x164], 4
je 0x505ffd
push 0x5844c8
mov ecx, ebx
call fcn.0051b3b0
push eax
lea ecx, [esp + 0x78]
call fcn.0042f720
mov eax, dword [edi + 0x94]
push eax
push str.channel
lea ecx, [esp + 0x78]
call fcn.004302f0
push 0x5e5b5c
mov ecx, ebx
call fcn.0042f160
test al, al
je 0x50607c
lea edx, [esp + 0x3c]
lea ecx, [edi + 0x1e4]
push edx
call fcn.0051b3b0
push eax
call fcn.0054c570
mov ecx, dword [edi + 0x258]
lea eax, [esp + 0x44]
push eax
push ecx
call fcn.0054c450
mov ebx, dword [esp + 0x28]
add esp, 0x10
cmp byte [ebx + 0xc4], 0
je 0x5061bd
lea ecx, [edi + 0x1e4]
call fcn.0051b3b0
push eax
push str.x11_address
lea ecx, [esp + 0x78]
call fcn.00430330
mov edx, dword [edi + 0x258]
push edx
push str.x11_port
lea ecx, [esp + 0x78]
call fcn.004302f0
jmp 0x5061bd
push str.direct_tcpip
mov ecx, ebx
call fcn.0042f160
test al, al
je 0x5061b9
lea eax, [esp + 0x3c]
lea ebx, [edi + 0x25c]
push eax
mov ecx, ebx
call fcn.0051b3b0
push eax
call fcn.0054c570
mov edx, dword [edi + 0x2d0]
lea ecx, [esp + 0x44]
push ecx
push edx
call fcn.0054c450
add esp, 0x10
cmp byte [esi + 0x121], 0
je 0x5060e5
push ebx
push str.directTcpHost
mov ecx, esi
call fcn.004370f0
mov eax, dword [edi + 0x2d0]
push eax
push str.directTcpPort
mov ecx, esi
call fcn.004373b0
lea ecx, [esp + 0xe4]
call fcn.0042d110
push esi
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0xec]
push edx
add ecx, 0x46c
mov byte [esp + 0x170], 5
call fcn.00508050
lea eax, [esp + 0x3c]
push eax
lea ecx, [esp + 0xe8]
call fcn.0051b3b0
push eax
call fcn.0054c570
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x44]
push ecx
push edx
call fcn.0054c450
add esp, 0x10
cmp byte [esi + 0x121], 0
je 0x50616d
lea eax, [esp + 0xe4]
push eax
push str.originatorIP
mov ecx, esi
call fcn.004370f0
mov ecx, dword [esp + 0x14]
push ecx
push str.originatorPort
mov ecx, esi
call fcn.004373b0
mov edx, dword [esp + 0x18]
cmp byte [edx + 0xc4], 0
je 0x5061a5
mov ecx, ebx
call fcn.0051b3b0
push eax
push str.tcp_host
lea ecx, [esp + 0x78]
call fcn.00430330
mov eax, dword [edi + 0x2d0]
push eax
push str.tcp_port
lea ecx, [esp + 0x78]
call fcn.004302f0
lea ecx, [esp + 0xe4]
mov byte [esp + 0x164], 4
call fcn.0042d1d0
mov ebx, dword [esp + 0x18]
lea ecx, [esp + 0x70]
call fcn.0051b3b0
mov ecx, dword [esp + 0x1c]
push esi
push ecx
lea edx, [esp + 0x1c]
push edx
lea ecx, [esp + 0x48]
push ecx
push eax
push str.CHANNEL_OPEN
mov ecx, ebx
mov dword [esp + 0x2c], 0
call fcn.00500ca0
mov ecx, esi
test al, al
jne 0x50620b
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
push str.Error_sending_open_channel_request
call eax
mov cl, byte [ebp + 0x2f]
mov edx, dword [esp + 0x20]
mov byte [edx], cl
jmp 0x506290
mov eax, dword [esi]
mov edx, dword [eax + 0x18]
push str.Sent_open_channel_request
call edx
mov ecx, dword [esp + 0x1c]
mov eax, dword [edi + 0x94]
push esi
push ecx
push 1
push ebp
mov ecx, ebx
mov dword [esp + 0x24], 0
mov dword [ebp + 0x14], eax
mov dword [ebp + 0x20], edi
call fcn.00504dd0
test al, al
je 0x506359
mov dl, byte [ebp + 0x2f]
mov eax, dword [esp + 0x20]
mov byte [eax], dl
mov ecx, dword [ebp + 0x54]
cmp ecx, dword [edi + 0x94]
jne 0x50626e
cmp dword [ebp + 0x34], 0x62
jne 0x50636c
lea ecx, [ebp + 0x38]
call fcn.00446f40
jmp 0x506335
cmp dword [edi + 0x1c], 1
je 0x506314
cmp dword [ebp + 0x28], 0
jne 0x506329
push str.Message_for_another_channel_arrived_when_expecting_a_CHANNEL_OPEN_response.
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
mov ecx, esi
call eax
lea ecx, [esp + 0x70]
mov byte [esp + 0x164], 3
call fcn.0042d1d0
lea ecx, [esp + 0x3c]
mov byte [esp + 0x164], 2
call fcn.004479b0
lea ecx, [esp + 0x28]
mov byte [esp + 0x164], 1
call fcn.00439610
lea ecx, [esp + 0x64]
mov byte [esp + 0x164], 0
call fcn.004377b0
lea ecx, [esp + 0x58]
mov dword [esp + 0x164], 0xffffffff
call fcn.00436290
xor al, al
mov ecx, dword [esp + 0x15c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x144]
xor ecx, esp
call fcn.005550b0
add esp, 0x154
ret 0x24
cmp dword [esp + 0x14], 0
jne 0x506329
mov edx, dword [esi]
mov eax, dword [edx + 0x18]
push str.Received_extraneous_reply_to_open_channel_request__InitializeSFtp___reading_again_for_the_correct_reply...
mov ecx, esi
call eax
lea ecx, [ebp + 0x38]
call fcn.00446f40
inc dword [esp + 0x14]
mov edx, dword [esp + 0x1c]
mov ecx, dword [edi + 0x94]
push esi
push edx
mov dword [ebp + 0x14], ecx
push 1
push ebp
mov ecx, ebx
mov dword [ebp + 0x20], edi
call fcn.00504dd0
test al, al
jne 0x506243
mov al, byte [ebp + 0x2f]
mov ecx, dword [esp + 0x20]
mov byte [ecx], al
push str.Error_reading_channel_response.
jmp 0x506287
mov ecx, dword [ebp + 0x34]
mov edx, dword [esp + 0x34]
mov dword [edx], ecx
mov eax, dword [ebp + 0x34]
cmp eax, 0x5b
jne 0x506392
push esi
lea eax, [ebp + 0x38]
push edi
push eax
call fcn.004ffbb0
add esp, 0xc
mov bl, 1
jmp 0x50645c
cmp eax, 0x5c
jne 0x50643c
mov ecx, dword [esp + 0x24]
mov ebx, dword [esp + 0x30]
push esi
push ecx
lea edx, [ebp + 0x38]
push ebx
push edx
call fcn.004ffab0
mov eax, dword [ebx]
add esp, 0x10
push eax
push str.reasonCode
mov ecx, esi
call fcn.004373b0
mov ecx, dword [esp + 0x24]
push ecx
push str.errorDescrip
mov ecx, esi
call fcn.004370f0
mov eax, dword [ebx]
cmp eax, 1
jne 0x5063ee
mov edx, dword [esi]
mov eax, dword [edx + 0x2c]
push str.Server_says_it_is_administratively_prohibited.
push str.reasonCodeMeaning
mov ecx, esi
call eax
jmp 0x50645a
cmp eax, 2
jne 0x506408
mov edx, dword [esi]
mov eax, dword [edx + 0x2c]
push str.Server_says_the_connect_failed__no_further_details_provided_by_the_server_.
push str.reasonCodeMeaning
mov ecx, esi
call eax
jmp 0x50645a
cmp eax, 3
jne 0x506422
mov edx, dword [esi]
mov eax, dword [edx + 0x2c]
push str.Server_says_it_is_an_unknown_channel_type.
push str.reasonCodeMeaning
mov ecx, esi
call eax
jmp 0x50645a
cmp eax, 4
jne 0x50645a
mov edx, dword [esi]
mov eax, dword [edx + 0x2c]
push str.Server_says_it_has_a_resource_shortage.
push str.reasonCodeMeaning
mov ecx, esi
call eax
jmp 0x50645a
mov edx, dword [esi]
mov eax, dword [edx + 0x14]
push str.Unexpected_message_type_received_in_response_to_open_channel_request.
mov ecx, esi
call eax
mov ecx, dword [ebp + 0x34]
push ecx
push str.messageType
mov ecx, esi
call fcn.004373b0
xor bl, bl
xor eax, eax
mov dword [ebp + 0x20], eax
test bl, bl
je 0x506485
mov edx, dword [edi + 0x94]
mov ecx, dword [esp + 0x38]
mov dword [ecx], edx
mov ecx, dword [esp + 0x18]
push edi
add ecx, 0x3e8
mov dword [esp + 0x30], eax
call fcn.00507930
lea ecx, [esp + 0x70]
mov byte [esp + 0x164], 3
call fcn.0042d1d0
lea ecx, [esp + 0x3c]
mov byte [esp + 0x164], 2
call fcn.004479b0
lea ecx, [esp + 0x28]
mov byte [esp + 0x164], 1
call fcn.00439610
lea ecx, [esp + 0x64]
mov byte [esp + 0x164], 0
call fcn.004377b0
lea ecx, [esp + 0x58]
mov dword [esp + 0x164], 0xffffffff
call fcn.00436290
mov al, bl
jmp 0x5062ea