Function at 0x14003ffc0
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]
mov rcx, rax
lea r8, [rsp + 0x50]
lea edx, [rbx + 8]
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x14004002e
call fcn.140041e50
mov rdx, rax
lea rcx, str.OpenProcessToken_failed:__s
call fcn.140041aa0
jmp 0x14004018e
mov rcx, qword [rsp + 0x50]
lea rax, [rsp + 0xe0]
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea edx, [r9 + 1]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x14004018e
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x14004007c
call fcn.140041e50
mov rdx, rax
lea rcx, str.GetTokenInformation__pre__failed:__s
call fcn.140041aa0
jmp 0x14004018e
mov edx, dword [rsp + 0xe0]
mov ecx, 1
call fcn.1400966e0
mov rdi, rax
test rax, rax
je 0x14004018b
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 0x14004011f
mov rcx, qword [rdi]
lea rdx, [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_ConvertSidToStringSidA]
test eax, eax
jne 0x1400400e5
call fcn.140041e50
lea rcx, str.Unable_to_convert_SID_to_string:__s
jmp 0x14004012b
mov rcx, qword [rsp + 0x40]
lea rdx, [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_ConvertStringSidToSidA]
test eax, eax
jne 0x140040112
call fcn.140041e50
mov rdx, rax
lea rcx, str.Unable_to_convert_string_back_to_SID:__s
call fcn.140041aa0
mov qword [rsp + 0x48], rbx
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x140040133
call fcn.140041e50
lea rcx, str.GetTokenInformation__real__failed:__s
mov rdx, rax
call fcn.140041aa0
mov rcx, rdi
call fcn.14009b5a0
mov rdi, qword [rsp + 0x48]
test rdi, rdi
je 0x14004018b
mov edx, 1
lea rcx, [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x14004018b
xor r8d, r8d
lea rcx, [rsp + 0x70]
mov rdx, rdi
call qword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorOwner]
test eax, eax
je 0x14004018b
lea rax, [rsp + 0x70]
mov dword [rsp + 0x58], 0x18
mov qword [rsp + 0x60], rax
lea rdi, [rsp + 0x58]
mov dword [rsp + 0x68], ebx
jmp 0x1400401a2
mov rdi, rbx
call fcn.140041e50
mov rdx, rax
lea rcx, str.Could_not_set_security_descriptor:__s
call fcn.140041aa0
mov ecx, esi
test esi, esi
je 0x1400401e4
sub ecx, 1
je 0x1400401d7
cmp ecx, 1
je 0x1400401cd
mov r8d, 0x2b5
lea rdx, str.C:_src_r3dusb_src_stdfn.c
lea rcx, str.FALSE
call fcn.1400a15c4
jmp 0x1400401f2
mov ebp, 4
mov r13d, ebp
jmp 0x1400401f2
mov ebp, 0x40000000
mov r13d, 2
jmp 0x1400401f2
mov qword [r14], rbx
mov ebp, 0x80000000
mov r13d, 3
mov rcx, r12
call fcn.140003550
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 0x14004023b
mov rcx, r12
call fcn.14009b5a0
mov ecx, ebp
call qword [sym.imp.KERNEL32.dll_SetLastError]
cmp rdi, 0xffffffffffffffff
jne 0x14004026a
call fcn.140041e50
mov rdx, qword [rsp + 0xe8]
lea rcx, str.Could_not_open__s:__s
mov r8, rax
call fcn.140041aa0
jmp 0x140040309
mov ecx, esi
test esi, esi
je 0x1400402a6
sub ecx, 1
je 0x14004028d
cmp ecx, 1
jne 0x1400402f5
lea r9d, [rcx + 1]
xor r8d, r8d
mov rcx, rdi
mov rdx, rbx
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 0x1400402f1
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, eax
mov dword [r15], ecx
call fcn.14009b5b4
mov qword [r14], rax
test rax, rax
jne 0x1400402da
lea rcx, str.Could_not_allocate_buffer_for_reading_file
call fcn.140041aa0
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140040316
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 0x140040328
call fcn.140041e50
mov rdx, rax
lea rcx, str.I_O_Error:__s
call fcn.140041aa0
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
jne 0x140040324
mov rcx, qword [r14]
call fcn.14009b5a0
mov qword [r14], rbx
mov dword [r15], ebx
mov eax, ebx
jmp 0x14004035e
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.14001b7e0
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