Function at 0x10020610
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [esp + 0x18]
sub esp, 0x10
push ebx
push esi
push edi
mov edi, dword [esp + 0x20]
xor esi, esi
push eax
push str.Loading_public_key_file:__s
push 8
push edi
call fcn.10001350
push 0x10028464
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov ebx, eax
add esp, 0x18
test ebx, ebx
jne 0x1002065a
push str.Unable_to_open_public_key_file
push 0xfffffffffffffff0
push edi
call fcn.10013940
add esp, 0xc
pop edi
pop esi
pop ebx
add esp, 0x10
ret
push ebp
mov ebp, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_feof]
push ebx
call ebp
add esp, 4
test eax, eax
jne 0x1002069f
nop dword [eax + eax]
push ebx
push 1
lea eax, [esp + 0x1b]
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
cmp eax, 1
jne 0x1002069f
mov al, byte [esp + 0x13]
cmp al, 0xd
je 0x1002069f
cmp al, 0xa
je 0x1002069f
push ebx
inc esi
call ebp
add esp, 4
test eax, eax
je 0x10020670
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_rewind]
add esp, 4
cmp esi, 1
ja 0x100206cd
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
push str.Invalid_data_in_public_key_file
push 0xfffffffffffffff0
push edi
call fcn.10013940
add esp, 0x10
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x10
ret
mov eax, dword [edi + 4]
push edi
push esi
call eax
add esp, 8
mov ebp, eax
push ebx
test ebp, ebp
jne 0x100206fc
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
push str.Unable_to_allocate_memory_for_public_key_data
push 0xfffffffffffffffa
push edi
call fcn.10013940
add esp, 0x10
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x10
ret
push esi
push 1
push ebp
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
cmp eax, esi
je 0x10020733
mov eax, dword [edi + 0xc]
push edi
push ebp
call eax
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
push str.Unable_to_read_public_key_from_file
push 0xfffffffffffffff0
push edi
call fcn.10013940
add esp, 0x18
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x10
ret
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov ebx, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_isspace]
add esp, 4
movzx eax, byte [esi + ebp - 1]
push eax
call ebx
add esp, 4
test eax, eax
je 0x10020776
sub esi, 1
jne 0x10020743
mov eax, dword [edi + 0xc]
push edi
push ebp
call eax
push str.Missing_public_key_data
push 0xfffffffffffffff0
push edi
call fcn.10013940
add esp, 0x14
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x10
ret
push esi
push 0x20
push ebp
call sub.VCRUNTIME140.dll_memchr
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x100207a7
mov eax, dword [edi + 0xc]
push edi
push ebp
call eax
push str.Invalid_public_key_data
push 0xfffffffffffffff0
push edi
call fcn.10013940
add esp, 0x14
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x10
ret
inc ebx
mov eax, ebx
sub eax, ebp
cmp ebp, ebx
mov dword [esp + 0x14], eax
sbb ecx, ecx
and ecx, eax
mov eax, esi
sub eax, ecx
push eax
push 0x20
push ebx
call sub.VCRUNTIME140.dll_memchr
add esp, 0xc
test eax, eax
jne 0x100207cd
lea eax, [esi + ebp]
sub eax, ebx
push eax
push ebx
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x24]
push eax
push edi
call sym.libssh2.dll_libssh2_base64_decode
add esp, 0x14
test eax, eax
je 0x10020807
mov eax, dword [edi + 0xc]
push edi
push ebp
call eax
push str.Invalid_key_data__not_base64_encoded
push 0xfffffffffffffff0
push edi
call fcn.10013940
add esp, 0x14
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x10
ret
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x14]
dec ecx
mov dword [eax], ebp
mov eax, dword [esp + 0x2c]
pop ebp
pop edi
pop esi
mov dword [eax], ecx
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0xc]
pop ebx
mov dword [ecx], eax
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0xc]
mov dword [ecx], eax
xor eax, eax
add esp, 0x10
ret