Function at 0x49a558
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], 0x5e254c
mov eax, dword [esp + 0x68]
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov ebx, eax
test eax, eax
je 0x49a7ef
xor esi, esi
lea edi, [esp + 0x37]
test byte [eax + 0xc], 0x10
je 0x49a5b3
jmp 0x49a754
mov al, byte [esp + 0x37]
cmp al, 0xd
je 0x49a5d2
cmp al, 0xa
je 0x49a5d2
inc esi
test byte [ebx + 0xc], 0x10
jne 0x49a754
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 0x49a59c
mov eax, dword [ebx + 0xc]
and eax, 0x10
test eax, eax
jne 0x49a754
mov dword [esp], ebx
call sub.msvcrt.dll_rewind
cmp esi, 1
jbe 0x49a766
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 0x49a7c6
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 0x49a664
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.0049fbac
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 0x49a693
mov edx, dword [esi]
mov ax, word [edx + eax*2]
and eax, 8
movzx eax, ax
test eax, eax
je 0x49a6b1
dec edi
je 0x49a794
movzx eax, byte [ebp + edi - 1]
cmp dword [ebx], 1
je 0x49a67c
mov dword [esp + 4], 8
mov dword [esp], eax
call sub.msvcrt.dll__isctype
test eax, eax
jne 0x49a68c
mov dword [esp + 8], edi
mov dword [esp + 4], 0x20
mov dword [esp], ebp
call sub.msvcrt.dll_memchr
test eax, eax
je 0x49a848
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 0x49a83f
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 0x49a810
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 0x49a5f1
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.0049fbac
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.0049fbac
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.0049fbac
jmp 0x49a659
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.0049fbac
jmp 0x49a659
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.0049fbac
jmp 0x49a659
lea eax, [ebp + edi]
jmp 0x49a6f4
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.0049fbac
jmp 0x49a659