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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x5c
mov ebp, dword [esp + 0x70]
test ebp, ebp
je 0x493121
mov dword [esp], 0
call sub.msvcrt.dll_time
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x78]
shl eax, 2
mov dword [esp + 0x34], eax
cmp eax, 0x100000
ja 0x492fd0
mov edx, dword [esp + 0x34]
shl edx, 3
mov dword [esp + 0x3c], edx
mov ecx, dword [ebp + 0xc]
mov dword [esp + 0x20], ecx
mov edi, dword [ecx]
mov eax, dword [edi + 0x48]
mov dword [esp + 0x28], eax
mov eax, dword [ecx + 0x54]
cmp eax, 3
je 0x492d2c
cmp eax, 5
je 0x492f88
test eax, eax
jne 0x492e4c
mov eax, dword [ebp + 0x134]
test eax, eax
jne 0x492ffc
cmp byte [ebp + 0x138], 0
jne 0x492d2c
mov eax, dword [ebp + 0x120]
sub eax, dword [ebp + 0x118]
cmp eax, dword [esp + 0x34]
jae 0x49305f
mov ecx, dword [esp + 0x34]
sub ecx, eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], edi
call sym.curl.exe_libssh2_channel_window_read_ex
cmp eax, dword [esp + 0x34]
jb 0x493095
mov esi, dword [esp + 0x1c]
test esi, esi
je 0x492d2c
lea ecx, [ebp + 0x10]
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x38], edi
jmp 0x492cd0
mov dword [eax + 0xc], esi
mov edx, dword [esp + 0x24]
mov dword [eax + 0x14], edx
mov dword [eax + 0x10], 0
lea eax, [eax + 0x1c]
mov dword [esp + 0x4c], eax
lea edx, [edi + 0x15]
mov dword [esp + 4], edx
lea ecx, [esp + 0x4c]
mov dword [esp], ecx
call fcn.0049fcd4
mov eax, dword [esp + 0x4c]
mov byte [eax], 5
inc eax
mov dword [esp + 0x4c], eax
mov edx, dword [esp + 0x20]
mov eax, dword [edx + 4]
lea edx, [eax + 1]
mov ecx, dword [esp + 0x20]
mov dword [ecx + 4], edx
mov dword [ebx + 0x18], eax
mov dword [esp + 4], eax
lea eax, [esp + 0x4c]
mov dword [esp], eax
call fcn.0049fcd4
mov eax, dword [ebp + 0x110]
mov dword [esp + 8], eax
mov edx, dword [esp + 0x2c]
mov dword [esp + 4], edx
lea ecx, [esp + 0x4c]
mov dword [esp], ecx
call fcn.0049fd00
mov edx, dword [ebp + 0x120]
mov ecx, dword [ebp + 0x124]
lea eax, [esp + 0x4c]
call fcn.004911b8
xor edx, edx
add dword [ebp + 0x120], esi
adc dword [ebp + 0x124], edx
mov dword [esp + 4], esi
lea eax, [esp + 0x4c]
mov dword [esp], eax
call fcn.0049fcd4
mov dword [esp + 4], ebx
lea ebx, [ebp + 0x14c]
mov dword [esp], ebx
call fcn.004a00d8
sub dword [esp + 0x1c], esi
je 0x492ff0
mov esi, dword [esp + 0x1c]
cmp esi, 0x7d0
jbe 0x492ce1
mov esi, 0x7d0
mov edi, dword [ebp + 0x110]
lea edx, [edi + 0x19]
mov dword [esp + 0x24], edx
mov ecx, dword [esp + 0x28]
mov dword [esp + 4], ecx
lea eax, [edi + 0x39]
mov dword [esp], eax
call dword [ecx + 4]
mov ebx, eax
test eax, eax
jne 0x492c08
mov dword [esp + 8], str.malloc_fail_for_FXP_WRITE
mov dword [esp + 4], 0xfffffffa
mov eax, dword [esp + 0x28]
mov dword [esp], eax
call fcn.0049fbac
jmp 0x492e15
lea ebx, [ebp + 0x14c]
mov edx, dword [esp + 0x20]
mov dword [edx + 0x54], 0
mov dword [esp], ebx
call fcn.004a0100
mov esi, eax
test eax, eax
je 0x492d97
nop
mov eax, dword [esi + 0x14]
test eax, eax
je 0x492d89
mov dword [esp + 0xc], eax
mov eax, dword [esi + 0x10]
lea eax, [esi + eax + 0x1c]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], edi
call fcn.00497e3c
test eax, eax
js 0x492fe0
mov edx, dword [esi + 0x14]
sub edx, eax
mov dword [esi + 0x14], edx
add dword [esi + 0x10], eax
test edx, edx
jne 0x492d97
mov dword [esp], esi
call fcn.004a0108
mov esi, eax
test eax, eax
jne 0x492d4c
mov eax, dword [esp + 0x20]
mov dword [eax + 0x54], 0
mov dword [esp], ebx
call fcn.004a0100
mov ebx, eax
test eax, eax
je 0x492e4c
mov edi, dword [eax + 0x14]
test edi, edi
jne 0x492e4c
mov ecx, dword [ebx + 0x18]
lea edx, [esp + 0x4c]
mov dword [esp + 4], edx
lea eax, [esp + 0x48]
mov dword [esp], eax
mov edx, 0x5e1896
mov eax, dword [esp + 0x20]
call fcn.0049197c
test eax, eax
js 0x4930c8
mov edx, dword [esp + 0x48]
mov al, byte [edx]
cmp al, 0x65
je 0x492f2c
cmp al, 0x67
je 0x492e58
mov dword [esp + 8], str.SFTP_Protocol_badness:_unrecognised_read_request_response
mov dword [esp + 4], 0xffffffe1
mov edx, dword [esp + 0x28]
mov dword [esp], edx
call fcn.0049fbac
cmp eax, 0xffffffdb
jne 0x492e41
mov edx, dword [ebp + 0xc]
mov edx, dword [edx]
mov edx, dword [edx + 0x48]
mov esi, dword [edx + 0x50]
test esi, esi
je 0x492e41
mov eax, dword [esp + 0x30]
mov dword [esp + 4], eax
mov dword [esp], edx
call fcn.004902b8
test eax, eax
je 0x492b60
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
xor eax, eax
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
add edx, 5
mov dword [esp], edx
call fcn.0049fc48
mov edx, eax
mov ecx, dword [esp + 0x4c]
lea eax, [ecx - 9]
cmp edx, eax
ja 0x4930d8
mov esi, dword [ebx + 0xc]
cmp edx, esi
ja 0x493100
je 0x492e91
sub esi, edx
xor edi, edi
sub dword [ebp + 0x120], esi
sbb dword [ebp + 0x124], edi
cmp dword [esp + 0x78], edx
jae 0x492fbc
sub edx, dword [esp + 0x78]
mov dword [ebp + 0x134], edx
mov eax, dword [esp + 0x48]
mov dword [ebp + 0x12c], eax
mov dword [ebp + 0x130], ecx
mov edx, dword [esp + 0x78]
lea esi, [eax + 9]
mov edi, dword [esp + 0x74]
mov ecx, edx
rep movsb byte es:[edi], byte [esi]
xor edi, edi
add dword [ebp + 0x118], edx
adc dword [ebp + 0x11c], edi
mov ecx, dword [ebp + 0x130]
test ecx, ecx
je 0x493044
mov dword [esp], ebx
mov dword [esp + 0x18], edx
call fcn.004a0108
mov esi, eax
mov dword [esp], ebx
call fcn.004a0118
mov eax, dword [esp + 0x28]
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [eax + 0xc]
mov edx, dword [esp + 0x18]
test edx, edx
jne 0x4930f9
test esi, esi
je 0x492e4c
mov ebx, dword [esi + 0x14]
test ebx, ebx
jne 0x492e4c
mov ebx, esi
jmp 0x492dbf
mov dword [esp], ebx
call fcn.004a0118
mov ecx, dword [esp + 0x28]
mov dword [esp + 4], ecx
mov dword [esp], ebx
call dword [ecx + 0xc]
mov eax, ebp
call fcn.004916dc
mov eax, dword [esp + 0x48]
add eax, 5
mov dword [esp], eax
call fcn.0049fc48
mov ebx, eax
mov eax, dword [esp + 0x28]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x48]
mov dword [esp], eax
mov edx, dword [esp + 0x28]
call dword [edx + 0xc]
cmp ebx, 1
jne 0x492f94
mov byte [ebp + 0x138], 1
xor eax, eax
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
lea ebx, [ebp + 0x14c]
jmp 0x492d97
mov ecx, dword [esp + 0x20]
mov dword [ecx + 0x24], ebx
mov dword [esp + 8], str.SFTP_READ_error
mov dword [esp + 4], 0xffffffe1
mov eax, dword [esp + 0x28]
mov dword [esp], eax
call fcn.0049fbac
jmp 0x492e15
mov dword [ebp + 0x130], 0
mov eax, dword [esp + 0x48]
jmp 0x492eb9
mov dword [esp + 0x34], 0x100000
jmp 0x492b55
mov ecx, dword [esp + 0x20]
mov dword [ecx + 0x54], 3
jmp 0x492e15
mov edi, dword [esp + 0x38]
jmp 0x492d32
mov ebx, dword [esp + 0x78]
cmp ebx, eax
ja 0x49306c
mov esi, dword [ebp + 0x130]
sub esi, eax
add esi, dword [ebp + 0x12c]
mov edi, dword [esp + 0x74]
mov ecx, ebx
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 0x134]
sub ecx, ebx
mov dword [ebp + 0x134], ecx
xor edx, edx
add dword [ebp + 0x118], ebx
adc dword [ebp + 0x11c], edx
test ecx, ecx
je 0x493070
mov eax, ebx
jmp 0x492e15
mov ecx, dword [esp + 0x28]
mov dword [esp + 4], ecx
mov dword [esp], eax
mov dword [esp + 0x18], edx
call dword [ecx + 0xc]
mov edx, dword [esp + 0x18]
jmp 0x492ee0
mov dword [esp + 0x1c], 0
jmp 0x492bc8
mov ebx, eax
jmp 0x493004
mov edx, dword [esp + 0x28]
mov dword [esp + 4], edx
mov eax, dword [ebp + 0x12c]
mov dword [esp], eax
call dword [edx + 0xc]
mov dword [ebp + 0x12c], 0
mov eax, ebx
jmp 0x492e15
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov eax, dword [esp + 0x3c]
mov dword [esp + 4], eax
mov edx, dword [esp + 0x20]
mov eax, dword [edx]
mov dword [esp], eax
call fcn.00497674
test eax, eax
je 0x492bea
jmp 0x492e15
mov edx, dword [esp + 0x20]
mov dword [edx + 0x54], 5
jmp 0x492e15
mov dword [esp + 8], str.SFTP_Protocol_badness
mov dword [esp + 4], 0xffffffe1
mov edx, dword [esp + 0x28]
mov dword [esp], edx
call fcn.0049fbac
jmp 0x492e15
mov eax, edx
jmp 0x492e15
mov dword [esp + 8], str.FXP_READ_response_too_big
mov dword [esp + 4], 0xffffffe1
mov ecx, dword [esp + 0x28]
mov dword [esp], ecx
call fcn.0049fbac
jmp 0x492e15
mov eax, 0xffffffd9
jmp 0x492e41