Function at 0x4bb110
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edx, dword [ebx + 4]
mov ecx, edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4bb122
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 0x40000000
push dword [ebx + 4]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x4bb3b8
push 2
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4bb1e9
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 0x4bb3b1
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 + 4]
push str.SetFilePointer__s__returned__s__0x_08I32X_
push 0x5d6ec0
push str.C:BuildFreeRDP_stable_1.1BuildFreeRDPlibfreerdpcryptocertificate.c
push 0x27f
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
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0xc]
push dword [ecx + 0xc]
movzx eax, word [ecx + 4]
push dword [ecx + 8]
push dword [ecx + 0x10]
push eax
push dword [ecx]
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 0x4bb3b8
lea eax, [esi + 1]
push eax
call fcn.0058023c
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x4bb281
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 0x4bb3b1
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 0x5d6ec0
push str.C:BuildFreeRDP_stable_1.1BuildFreeRDPlibfreerdpcryptocertificate.c
push 0x291
jmp 0x4bb1bf
mov ecx, dword [ebp + 0xc]
push dword [ecx + 0xc]
movzx eax, word [ecx + 4]
push dword [ecx + 8]
push dword [ecx + 0x10]
push eax
push dword [ecx]
lea eax, [esi + 1]
push str._s__hu__s__s__s_n
push eax
push ebx
call fcn.00583e46
add esp, 0x20
test eax, eax
js 0x4bb33f
cmp eax, esi
jne 0x4bb33f
push 0
lea eax, [ebp - 4]
push eax
push esi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4bb2ea
cmp dword [ebp - 4], esi
jne 0x4bb2ea
push ebx
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
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 0x4bb3a8
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 0x5d6ec0
push str.C:BuildFreeRDP_stable_1.1BuildFreeRDPlibfreerdpcryptocertificate.c
push 0x2a7
jmp 0x4bb38e
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 0x4bb3a8
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 0x5d6ec0
push str.C:BuildFreeRDP_stable_1.1BuildFreeRDPlibfreerdpcryptocertificate.c
push 0x29e
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 fcn.00580204
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret