Function at 0x49a978
Capabilities:
Read file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x4c
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], ecx
mov dword [esp + 4], 0x5e262c
mov eax, dword [esp + 0x68]
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov ebx, eax
test eax, eax
je 0x49ac0f
xor esi, esi
lea edi, [esp + 0x37]
test byte [eax + 0xc], 0x10
je 0x49a9d3
jmp 0x49ab74
mov al, byte [esp + 0x37]
cmp al, 0xd
je 0x49a9f2
cmp al, 0xa
je 0x49a9f2
inc esi
test byte [ebx + 0xc], 0x10
jne 0x49ab74
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 1
mov dword [esp + 4], 1
mov dword [esp], edi
call sub.msvcrt.dll_fread
dec eax
je 0x49a9bc
mov eax, dword [ebx + 0xc]
and eax, 0x10
test eax, eax
jne 0x49ab74
mov dword [esp], ebx
call sub.msvcrt.dll_rewind
cmp esi, 1
jbe 0x49ab86
mov eax, dword [esp + 0x24]
mov dword [esp + 4], eax
mov dword [esp], esi
call dword [eax + 4]
mov ebp, eax
test eax, eax
je 0x49abe6
mov dword [esp + 0xc], ebx
mov dword [esp + 8], esi
mov dword [esp + 4], 1
mov dword [esp], eax
call sub.msvcrt.dll_fread
mov edi, eax
cmp eax, esi
je 0x49aa84
mov eax, dword [esp + 0x24]
mov dword [esp + 4], eax
mov dword [esp], ebp
call dword [eax + 0xc]
mov dword [esp], ebx
call sub.msvcrt.dll_fclose
mov dword [esp + 8], str.Unable_to_read_public_key_from_file
mov dword [esp + 4], 0xfffffff0
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call fcn.0049ffcc
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], ebx
call sub.msvcrt.dll_fclose
mov ebx, dword [sym.imp.msvcrt.dll___mb_cur_max]
mov esi, dword [sym.imp.msvcrt.dll__pctype]
jmp 0x49aab3
mov edx, dword [esi]
mov ax, word [edx + eax*2]
and eax, 8
movzx eax, ax
test eax, eax
je 0x49aad1
dec edi
je 0x49abb4
movzx eax, byte [ebp + edi - 1]
cmp dword [ebx], 1
je 0x49aa9c
mov dword [esp + 4], 8
mov dword [esp], eax
call sub.msvcrt.dll__isctype
test eax, eax
jne 0x49aaac
mov dword [esp + 8], edi
mov dword [esp + 4], 0x20
mov dword [esp], ebp
call sub.msvcrt.dll_memchr
test eax, eax
je 0x49ac68
lea ebx, [eax + 1]
mov eax, ebp
sub eax, ebx
lea eax, [edi + eax + 1]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x20
mov dword [esp], ebx
call sub.msvcrt.dll_memchr
test eax, eax
je 0x49ac5f
sub eax, ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], ebx
lea eax, [esp + 0x3c]
mov dword [esp + 8], eax
lea eax, [esp + 0x38]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call sym.curl.exe_libssh2_base64_decode
test eax, eax
jne 0x49ac30
mov edx, dword [esp + 0x28]
mov dword [edx], ebp
sub ebx, ebp
lea eax, [ebx - 1]
mov edx, dword [esp + 0x2c]
mov dword [edx], eax
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x60]
mov dword [eax], edx
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x64]
mov dword [eax], edx
xor eax, eax
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
dec esi
mov dword [esp], ebx
call sub.msvcrt.dll_rewind
cmp esi, 1
ja 0x49aa11
mov dword [esp], ebx
call sub.msvcrt.dll_fclose
mov dword [esp + 8], str.Invalid_data_in_public_key_file
mov dword [esp + 4], 0xfffffff0
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call fcn.0049ffcc
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x24]
mov dword [esp + 4], eax
mov dword [esp], ebp
call dword [eax + 0xc]
mov dword [esp + 8], str.Missing_public_key_data
mov dword [esp + 4], 0xfffffff0
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call fcn.0049ffcc
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], ebx
call sub.msvcrt.dll_fclose
mov dword [esp + 8], str.Unable_to_allocate_memory_for_public_key_data
mov dword [esp + 4], 0xfffffffa
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call fcn.0049ffcc
jmp 0x49aa79
mov dword [esp + 8], str.Unable_to_open_public_key_file
mov dword [esp + 4], 0xfffffff0
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call fcn.0049ffcc
jmp 0x49aa79
mov eax, dword [esp + 0x24]
mov dword [esp + 4], eax
mov dword [esp], ebp
call dword [eax + 0xc]
mov dword [esp + 8], str.Invalid_key_data__not_base64_encoded
mov dword [esp + 4], 0xfffffff0
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call fcn.0049ffcc
jmp 0x49aa79
lea eax, [ebp + edi]
jmp 0x49ab14
mov eax, dword [esp + 0x24]
mov dword [esp + 4], eax
mov dword [esp], ebp
call dword [eax + 0xc]
mov dword [esp + 8], str.Invalid_public_key_data
mov dword [esp + 4], 0xfffffff0
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call fcn.0049ffcc
jmp 0x49aa79