Function at 0x4ba8c0
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov dword [ebp - 0xc], 1
mov edx, dword [ebx + 8]
mov ecx, edx
lea esi, [ecx + 1]
jmp 0x4ba8e0
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4ba8e0
sub ecx, esi
push 2
push ecx
push edx
call fcn.00431b20
add esp, 0xc
push 0
push 0x80
push 3
push 0
push 1
push connect
push dword [ebx + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x4bac18
lea eax, [ebp - 0x10]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
jne 0x4ba9a8
push 4
push str.com.freerdp.crypto
call fcn.0042f4e0
add esp, 4
push eax
call fcn.0042f7e0
add esp, 8
test eax, eax
je 0x4bac11
call fcn.005814b7
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [esi]
call fcn.005811b1
add esp, 4
push eax
push dword [ebx + 8]
push str.GetFileSize__s__returned__s__0x_08I32X_
push str.certificate_data_match_legacy
push str.C:BuildFreeRDP_stable_1.1BuildFreeRDPlibfreerdpcryptocertificate.c
push 0xa8
push 4
push 0
push str.com.freerdp.crypto
call fcn.0042f4e0
add esp, 4
push eax
call fcn.0042fce0
add esp, 0x28
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp - 0x10]
xor esi, esi
or esi, eax
or ebx, 0
ja 0x4ba9c3
jb 0x4bac11
cmp esi, 1
jb 0x4bac11
lea eax, [esi + 2]
push eax
call fcn.0058023c
add esp, 4
mov dword [ebp - 0x18], eax
test eax, eax
je 0x4bac11
push 0
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], eax
push ecx
push esi
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4bac06
xor eax, eax
cmp dword [ebp - 0x14], esi
jne 0x4bac06
cmp eax, ebx
jne 0x4bac06
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 4]
push 0x5b5e4c
mov byte [esi + eax], 0xa
mov eax, dword [ebp - 4]
mov byte [esi + eax + 1], 0
lea eax, [ebp - 4]
push eax
call fcn.00431290
mov ecx, eax
add esp, 8
mov dword [ebp - 8], ecx
test ecx, ecx
je 0x4babf1
mov ebx, dword [ebp + 0xc]
mov edi, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4baa43
sub ecx, edx
je 0x4bab22
lea eax, [ebp - 8]
push 0x5d6d5c
push eax
call fcn.00431290
mov edi, eax
add esp, 8
test edi, edi
je 0x4baacf
mov esi, dword [ebp - 8]
test esi, esi
je 0x4baacf
mov ecx, dword [ebx]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4baa92
test dl, dl
je 0x4baa8e
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4baa92
add eax, 2
add ecx, 2
test dl, dl
jne 0x4baa72
xor eax, eax
jmp 0x4baa97
sbb eax, eax
or eax, 1
test eax, eax
jne 0x4bab22
mov edx, dword [ebx + 0x10]
mov eax, edx
mov cl, byte [esi]
cmp cl, byte [eax]
jne 0x4bab55
test cl, cl
je 0x4baac8
mov cl, byte [esi + 1]
cmp cl, byte [eax + 1]
jne 0x4bab55
add esi, 2
add eax, 2
test cl, cl
jne 0x4baaa4
xor ebx, ebx
jmp 0x4bab5a
push 3
push str.com.freerdp.crypto
call fcn.0042f4e0
add esp, 4
push eax
call fcn.0042f7e0
add esp, 8
test eax, eax
je 0x4bab22
push dword [ebp - 8]
push edi
push str.known_hosts
push str.Invalid__s_entry__s__s_
push str.certificate_data_match_legacy
push str.C:BuildFreeRDP_stable_1.1BuildFreeRDPlibfreerdpcryptocertificate.c
push 0xd5
push 3
push 0
push str.com.freerdp.crypto
call fcn.0042f4e0
add esp, 4
push eax
call fcn.0042fce0
add esp, 0x28
lea eax, [ebp - 4]
push 0x5b5e4c
push eax
call fcn.00431290
mov ecx, eax
add esp, 8
mov dword [ebp - 8], ecx
test ecx, ecx
jne 0x4baa40
push dword [ebp - 0x18]
call fcn.00580204
mov eax, dword [ebp - 0xc]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
sbb ebx, ebx
or ebx, 1
neg ebx
sbb ebx, ebx
mov dword [ebp - 0xc], ebx
jne 0x4babf1
mov ebx, dword [ebp + 0xc]
push edx
push 0
push 0
movzx eax, word [ebx + 4]
push eax
push edi
call sym.wfreerdp.exe_certificate_data_new
mov esi, eax
add esp, 0x14
test esi, esi
je 0x4babe8
push dword [esi + 8]
call fcn.00580204
push dword [esi + 0xc]
call fcn.00580204
mov dword [esi + 8], 0
add esp, 8
mov dword [esi + 0xc], 0
mov eax, dword [ebx + 8]
test eax, eax
je 0x4babbb
push eax
call fcn.00580c20
add esp, 4
mov dword [esi + 8], eax
test eax, eax
je 0x4babe8
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x4babd2
push eax
call fcn.00580c20
add esp, 4
mov dword [esi + 0xc], eax
test eax, eax
je 0x4babe8
push esi
push dword [ebp + 8]
call sym.wfreerdp.exe_certificate_data_print
add esp, 8
mov ebx, eax
neg ebx
sbb ebx, ebx
inc ebx
mov dword [ebp - 0xc], ebx
push esi
call sym.wfreerdp.exe_certificate_data_free
add esp, 4
push dword [ebp - 0x18]
call fcn.00580204
mov eax, dword [ebp - 0xc]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push dword [ebp - 4]
call fcn.00580204
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret