Function at 0x4bb3d0
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x24], 0
mov edx, dword [edi + 4]
mov ecx, edx
lea esi, [ecx + 1]
jmp 0x4bb3f0
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4bb3f0
sub ecx, esi
push 2
push ecx
push edx
call fcn.00431b20
add esp, 0xc
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
mov dword [ebp - 8], ebx
cmp ebx, 0xffffffff
je 0x4bb59e
lea eax, [ebp - 0x28]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
jne 0x4bb4b8
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 0x4bb597
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 [edi + 8]
push str.GetFileSize__s__returned__s__0x_08I32X_
push 0x5d6dac
push str.C:BuildFreeRDP_stable_1.1BuildFreeRDPlibfreerdpcryptocertificate.c
push 0x1ae
push 4
push 0
push str.com.freerdp.crypto
call fcn.0042f4e0
add esp, 4
push eax
call fcn.0042fce0
add esp, 0x28
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp - 0x28]
xor esi, esi
or esi, eax
or edi, 0
ja 0x4bb4d3
jb 0x4bb597
cmp esi, 1
jb 0x4bb597
lea eax, [esi + 2]
push eax
call fcn.0058023c
add esp, 4
mov dword [ebp - 4], eax
test eax, eax
je 0x4bb597
push 0
lea ecx, [ebp - 0x2c]
push ecx
push esi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4bb58c
xor eax, eax
cmp dword [ebp - 0x2c], esi
jne 0x4bb58c
cmp eax, edi
jne 0x4bb58c
push eax
push eax
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4bb5a7
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 0x4bb58c
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
mov eax, dword [ebp + 8]
push dword [eax + 4]
push str.SetFilePointer__s__returned__s__0x_08I32X_
push 0x5d6dac
push str.C:BuildFreeRDP_stable_1.1BuildFreeRDPlibfreerdpcryptocertificate.c
push 0x1cd
push 4
push 0
push str.com.freerdp.crypto
call fcn.0042f4e0
add esp, 4
push eax
call fcn.0042fce0
add esp, 0x28
push dword [ebp - 4]
call fcn.00580204
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x4bb606
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 0x4bb58c
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
mov eax, dword [ebp + 8]
push dword [eax + 4]
push str.SetEndOfFile__s__returned__s__0x_08I32X_
push 0x5d6dac
push str.C:BuildFreeRDP_stable_1.1BuildFreeRDPlibfreerdpcryptocertificate.c
push 0x1d6
jmp 0x4bb572
mov edi, dword [ebp - 4]
lea eax, [ebp - 0x20]
push 0x5b5e4c
push eax
mov word [esi + edi], 0xa
mov dword [ebp - 0x20], edi
call fcn.00431290
mov esi, eax
add esp, 8
test esi, esi
je 0x4bb800
lea ecx, [ecx]
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4bb635
sub ecx, edx
je 0x4bb7e2
push ecx
push esi
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
call fcn.004bb9f0
add esp, 8
test eax, eax
jne 0x4bb7e2
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x18]
push eax
push esi
call fcn.004bba30
add esp, 0x18
test eax, eax
jne 0x4bb6f3
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 0x4bb7e2
push esi
push str.known_hosts2
push str.Skipping_invalid__s_entry__s_
push 0x5d6dac
push str.C:BuildFreeRDP_stable_1.1BuildFreeRDPlibfreerdpcryptocertificate.c
push 0x1f4
push 3
push 0
push str.com.freerdp.crypto
call fcn.0042f4e0
add esp, 4
push eax
call fcn.0042fce0
add esp, 0x24
jmp 0x4bb7e2
mov ebx, dword [ebp + 0xc]
mov esi, dword [ebp - 0x18]
mov eax, esi
mov ecx, dword [ebx]
lea ecx, [ecx]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4bb720
test dl, dl
je 0x4bb71c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4bb720
add eax, 2
add ecx, 2
test dl, dl
jne 0x4bb700
xor eax, eax
jmp 0x4bb725
sbb eax, eax
or eax, 1
test eax, eax
mov eax, dword [ebp - 0x14]
jne 0x4bb73e
cmp ax, word [ebx + 4]
jne 0x4bb73e
mov ebx, dword [ebx + 0x10]
mov dword [ebp - 0x24], 1
jmp 0x4bb741
mov ebx, dword [ebp - 0x1c]
push dword [ebp - 0xc]
movzx eax, ax
push dword [ebp - 0x10]
push ebx
push eax
push esi
push str._s__hu__s__s__s_n
push 0
push 0
call fcn.00583e46
mov esi, eax
add esp, 0x20
test esi, esi
js 0x4bb999
lea eax, [esi + 1]
push eax
call fcn.0058023c
mov edi, eax
add esp, 4
test edi, edi
je 0x4bb930
push dword [ebp - 0xc]
movzx eax, word [ebp - 0x14]
push dword [ebp - 0x10]
push ebx
push eax
push dword [ebp - 0x18]
lea eax, [esi + 1]
push str._s__hu__s__s__s_n
push eax
push edi
call fcn.00583e46
add esp, 0x20
test eax, eax
js 0x4bb90d
xor ecx, ecx
cmp eax, esi
jne 0x4bb8a4
test ecx, ecx
jne 0x4bb8a4
mov ebx, dword [ebp - 8]
lea eax, [ebp - 0x30]
push ecx
push eax
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4bb81a
xor eax, eax
cmp dword [ebp - 0x30], esi
jne 0x4bb81a
test eax, eax
jne 0x4bb81a
push edi
call fcn.00580204
add esp, 4
lea eax, [ebp - 0x20]
push 0x5b5e4c
push eax
call fcn.00431290
mov esi, eax
add esp, 8
test esi, esi
jne 0x4bb630
mov edi, dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call fcn.00580204
mov eax, dword [ebp - 0x24]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
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 0x4bb883
call fcn.005814b7
mov esi, eax
call fcn.005814b7
push dword [esi]
push dword [eax]
call fcn.005811b1
add esp, 4
push eax
mov eax, dword [ebp + 8]
push dword [eax + 4]
push str.WriteFile__s__returned__s__0x_08X_
push 0x5d6dac
push str.C:BuildFreeRDP_stable_1.1BuildFreeRDPlibfreerdpcryptocertificate.c
push 0x22c
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 fcn.00580204
push dword [ebp - 4]
call fcn.00580204
add esp, 8
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
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 0x4bb90d
call fcn.005814b7
mov esi, eax
call fcn.005814b7
push dword [esi]
push dword [eax]
call fcn.005811b1
add esp, 4
push eax
mov eax, dword [ebp + 8]
push dword [eax + 4]
push str._snprintf__s__returned__s__0x_08X_
push 0x5d6dac
push str.C:BuildFreeRDP_stable_1.1BuildFreeRDPlibfreerdpcryptocertificate.c
push 0x222
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 fcn.00580204
push dword [ebp - 4]
call fcn.00580204
add esp, 8
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
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 0x4bb999
call fcn.005814b7
mov esi, eax
call fcn.005814b7
push dword [esi]
push dword [eax]
call fcn.005811b1
add esp, 4
push eax
mov eax, dword [ebp + 8]
push dword [eax + 4]
push str.malloc__s__returned__s__0x_08X_
push 0x5d6dac
push str.C:BuildFreeRDP_stable_1.1BuildFreeRDPlibfreerdpcryptocertificate.c
push 0x20f
push 4
push 0
push str.com.freerdp.crypto
call fcn.0042f4e0
add esp, 4
push eax
call fcn.0042fce0
add esp, 0x28
push dword [ebp - 4]
call fcn.00580204
add esp, 4
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret