Function at 0x1000c65a8
Capabilities:
Read file on windows
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
sub rsp, 0x2e0
mov rax, qword [0x100165138]
xor rax, rsp
mov qword [rsp + 0x2d0], rax
mov rdi, rcx
mov rcx, qword [0x1001653b8]
lea r13, [0x1001653b8]
lea r12, [0x100003198]
cmp rcx, r13
je 0x1000c660a
test byte [rcx + 0x1c], 4
je 0x1000c660a
cmp byte [rcx + 0x19], 4
jb 0x1000c660a
mov rcx, qword [rcx + 0x10]
mov edx, 0x7a
mov r8, r12
call fcn.10001c7b8
xor ebx, ebx
lea rcx, [rsp + 0xd1]
xor edx, edx
mov r8d, 0x1ff
mov dword [rsp + 0x40], ebx
mov byte [rsp + 0xd0], bl
call sub.msvcrt.dll_memset
lea rcx, [rsp + 0x50]
xor edx, edx
mov r8d, 0x80
call sub.msvcrt.dll_memset
mov qword [rsp + 0x30], rbx
lea r8d, [rbx + 7]
xor r9d, r9d
mov edx, 0xc0000000
mov rcx, rdi
mov dword [rsp + 0x28], 0x2000080
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x1000c66ca
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r11d, eax
movzx eax, ax
or eax, 0x80070000
cmp r11d, ebx
cmovle eax, r11d
mov ebx, eax
mov rcx, qword [0x1001653b8]
cmp rcx, r13
je 0x1000c6923
test byte [rcx + 0x1c], 4
je 0x1000c6901
cmp byte [rcx + 0x19], 2
jb 0x1000c6901
mov rcx, qword [rcx + 0x10]
lea edx, [rsi + 0x7c]
mov r9, rdi
mov r8, r12
mov dword [rsp + 0x20], eax
call fcn.10001daa4
jmp 0x1000c68fa
mov qword [rsp + 0x38], rbx
lea rax, [rsp + 0x40]
xor r9d, r9d
mov qword [rsp + 0x30], rax
xor r8d, r8d
mov edx, 0x90020
mov rcx, rsi
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
cmp eax, ebx
jne 0x1000c6742
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r11d, eax
movzx eax, ax
or eax, 0x80070000
cmp r11d, ebx
cmovle eax, r11d
mov ebx, eax
mov rcx, qword [0x1001653b8]
cmp rcx, r13
je 0x1000c68f1
test byte [rcx + 0x1c], 4
je 0x1000c68f1
cmp byte [rcx + 0x19], 2
jb 0x1000c68f1
mov edx, 0x7c
jmp 0x1000c68de
xor r9d, r9d
xor r8d, r8d
mov edx, 0x1e00
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0x1e00
je 0x1000c67a5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r11d, eax
movzx eax, ax
or eax, 0x80070000
cmp r11d, ebx
cmovle eax, r11d
mov ebx, eax
mov rcx, qword [0x1001653b8]
cmp rcx, r13
je 0x1000c68f1
test byte [rcx + 0x1c], 4
je 0x1000c68f1
cmp byte [rcx + 0x19], 2
jb 0x1000c68f1
mov edx, 0x7d
jmp 0x1000c68de
lea r9, [rsp + 0x40]
lea rdx, [rsp + 0xd0]
mov r8d, 0x200
mov rcx, rsi
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, ebx
jne 0x1000c6812
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r11d, eax
movzx eax, ax
or eax, 0x80070000
cmp r11d, ebx
cmovle eax, r11d
mov ebx, eax
mov rcx, qword [0x1001653b8]
cmp rcx, r13
je 0x1000c68f1
test byte [rcx + 0x1c], 4
je 0x1000c68f1
cmp byte [rcx + 0x19], 2
jb 0x1000c68f1
mov edx, 0x7e
jmp 0x1000c68de
lea rcx, [rsp + 0xd0]
lea rdx, [rsp + 0x50]
mov r8d, 0x80
call sub.msvcrt.dll_memcpy
xor r9d, r9d
xor r8d, r8d
mov edx, 0x1e00
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0x1e00
je 0x1000c6882
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r11d, eax
movzx eax, ax
or eax, 0x80070000
cmp r11d, ebx
cmovle eax, r11d
mov ebx, eax
mov rcx, qword [0x1001653b8]
cmp rcx, r13
je 0x1000c68f1
test byte [rcx + 0x1c], 4
je 0x1000c68f1
cmp byte [rcx + 0x19], 2
jb 0x1000c68f1
mov edx, 0x7f
jmp 0x1000c68de
lea r9, [rsp + 0x40]
lea rdx, [rsp + 0xd0]
mov r8d, 0x200
mov rcx, rsi
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, ebx
jne 0x1000c68f1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r11d, eax
movzx eax, ax
or eax, 0x80070000
cmp r11d, ebx
cmovle eax, r11d
mov ebx, eax
mov rcx, qword [0x1001653b8]
cmp rcx, r13
je 0x1000c68f1
test byte [rcx + 0x1c], 4
je 0x1000c68f1
cmp byte [rcx + 0x19], 2
jb 0x1000c68f1
mov edx, 0x80
mov rcx, qword [rcx + 0x10]
mov r9, rdi
mov r8, r12
mov dword [rsp + 0x20], eax
call fcn.10001daa4
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x1001653b8]
cmp rcx, r13
je 0x1000c6923
test byte [rcx + 0x1c], 4
je 0x1000c6923
cmp byte [rcx + 0x19], 4
jb 0x1000c6923
mov rcx, qword [rcx + 0x10]
mov edx, 0x81
mov r8, r12
call fcn.10001c7b8
mov eax, ebx
mov rcx, qword [rsp + 0x2d0]
xor rcx, rsp
call fcn.10014e480
lea r11, [rsp + 0x2e0]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r13
pop r12
pop rdi
ret