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

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x10], rdx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xa0
xor ebx, ebx
mov r15, r9
mov edi, ebx
mov qword [rsp + 0x48], rbx
mov ebp, ebx
mov qword [rsp + 0x40], rbx
mov r13d, ebx
mov r14, r8
mov r12, rdx
mov esi, ecx
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0x50]
mov edx, 8
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x14004d000
call fcn.14004fba0
mov rdx, rax
lea rcx, str.OpenProcessToken_failed:__s
call fcn.14004f2f0
jmp 0x14004d161
mov rcx, qword [rsp + 0x50]
lea rax, [rsp + 0xe0]
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov edx, 1
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x14004d161
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x14004d04f
call fcn.14004fba0
mov rdx, rax
lea rcx, str.GetTokenInformation__pre__failed:__s
call fcn.14004f2f0
jmp 0x14004d161
mov edx, dword [rsp + 0xe0]
mov ecx, 1
call fcn.1400c4f6c
mov rdi, rax
test rax, rax
je 0x14004d15e
mov r9d, dword [rsp + 0xe0]
lea rax, [rsp + 0xe0]
mov rcx, qword [rsp + 0x50]
mov r8, rdi
mov edx, 1
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x14004d0f2
mov rcx, qword [rdi]
lea rdx, [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_ConvertSidToStringSidA]
test eax, eax
jne 0x14004d0b8
call fcn.14004fba0
lea rcx, str.Unable_to_convert_SID_to_string:__s
jmp 0x14004d0fe
mov rcx, qword [rsp + 0x40]
lea rdx, [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_ConvertStringSidToSidA]
test eax, eax
jne 0x14004d0e5
call fcn.14004fba0
mov rdx, rax
lea rcx, str.Unable_to_convert_string_back_to_SID:__s
call fcn.14004f2f0
mov qword [rsp + 0x48], rbx
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x14004d106
call fcn.14004fba0
lea rcx, str.GetTokenInformation__real__failed:__s
mov rdx, rax
call fcn.14004f2f0
mov rcx, rdi
call fcn.1400e8c70
mov rdi, qword [rsp + 0x48]
test rdi, rdi
je 0x14004d15e
mov edx, 1
lea rcx, [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x14004d15e
xor r8d, r8d
lea rcx, [rsp + 0x70]
mov rdx, rdi
call qword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorOwner]
test eax, eax
je 0x14004d15e
lea rax, [rsp + 0x70]
mov dword [rsp + 0x58], 0x18
mov qword [rsp + 0x60], rax
lea rdi, [rsp + 0x58]
mov dword [rsp + 0x68], ebx
jmp 0x14004d175
mov rdi, rbx
call fcn.14004fba0
mov rdx, rax
lea rcx, str.Could_not_set_security_descriptor:__s
call fcn.14004f2f0
mov ecx, esi
test esi, esi
je 0x14004d1b7
sub ecx, 1
je 0x14004d1aa
cmp ecx, 1
je 0x14004d1a0
mov r8d, 0x2b5
lea rdx, str.D:_a_rufus_rufus_src_stdfn.c
lea rcx, str.FALSE
call fcn.1400fbe54
jmp 0x14004d1c5
mov ebp, 4
mov r13d, ebp
jmp 0x14004d1c5
mov ebp, 0x40000000
mov r13d, 2
jmp 0x14004d1c5
mov qword [r14], rbx
mov ebp, 0x80000000
mov r13d, 3
mov rcx, r12
call fcn.14004a720
mov qword [rsp + 0x30], rbx
mov r9, rdi
mov dword [rsp + 0x28], 0x80
mov r8d, 1
mov edx, ebp
mov dword [rsp + 0x20], r13d
mov rcx, rax
mov r12, rax
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
test r12, r12
je 0x14004d20e
mov rcx, r12
call fcn.1400e8c70
mov ecx, ebp
call qword [sym.imp.KERNEL32.dll_SetLastError]
cmp rdi, 0xffffffffffffffff
jne 0x14004d23d
call fcn.14004fba0
mov rdx, qword [rsp + 0xe8]
lea rcx, str.Could_not_open__s:__s
mov r8, rax
call fcn.14004f2f0
jmp 0x14004d2de
mov ecx, esi
test esi, esi
je 0x14004d27b
sub ecx, 1
je 0x14004d262
cmp ecx, 1
jne 0x14004d2ca
mov r9d, 2
xor r8d, r8d
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov r8d, dword [r15]
mov r9, r15
mov rdx, qword [r14]
mov rcx, rdi
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x14004d2c6
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, eax
mov dword [r15], ecx
call fcn.1400e8c84
mov qword [r14], rax
test rax, rax
jne 0x14004d2af
lea rcx, str.Could_not_allocate_buffer_for_reading_file
call fcn.14004f2f0
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14004d2eb
mov r8d, dword [r15]
mov r9, r15
mov rdx, rax
mov qword [rsp + 0x20], rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x14004d2fd
call fcn.14004fba0
mov rdx, rax
lea rcx, str.I_O_Error:__s
call fcn.14004f2f0
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
jne 0x14004d2f9
mov rcx, qword [r14]
call fcn.1400e8c70
mov qword [r14], rbx
mov dword [r15], ebx
mov eax, ebx
jmp 0x14004d333
mov rax, qword [rsp + 0xe8]
mov edx, 1
test esi, esi
mov qword [rsp + 0x20], rax
mov ecx, edx
setne bl
xor r8d, r8d
lea r9d, [rbx + 0xc8f]
call fcn.140021510
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
mov rbx, qword [rsp + 0xf0]
add rsp, 0xa0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret