Function at 0x1000c66fc
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, [0x100003158]
cmp rcx, r13
je 0x1000c675e
test byte [rcx + 0x1c], 4
je 0x1000c675e
cmp byte [rcx + 0x19], 4
jb 0x1000c675e
mov rcx, qword [rcx + 0x10]
mov edx, 0x7a
mov r8, r12
call fcn.10001c854
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 0x1000c681e
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 0x1000c6a77
test byte [rcx + 0x1c], 4
je 0x1000c6a55
cmp byte [rcx + 0x19], 2
jb 0x1000c6a55
mov rcx, qword [rcx + 0x10]
lea edx, [rsi + 0x7c]
mov r9, rdi
mov r8, r12
mov dword [rsp + 0x20], eax
call fcn.10001ddb0
jmp 0x1000c6a4e
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 0x1000c6896
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 0x1000c6a45
test byte [rcx + 0x1c], 4
je 0x1000c6a45
cmp byte [rcx + 0x19], 2
jb 0x1000c6a45
mov edx, 0x7c
jmp 0x1000c6a32
xor r9d, r9d
xor r8d, r8d
mov edx, 0x1e00
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0x1e00
je 0x1000c68f9
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 0x1000c6a45
test byte [rcx + 0x1c], 4
je 0x1000c6a45
cmp byte [rcx + 0x19], 2
jb 0x1000c6a45
mov edx, 0x7d
jmp 0x1000c6a32
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 0x1000c6966
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 0x1000c6a45
test byte [rcx + 0x1c], 4
je 0x1000c6a45
cmp byte [rcx + 0x19], 2
jb 0x1000c6a45
mov edx, 0x7e
jmp 0x1000c6a32
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 0x1000c69d6
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 0x1000c6a45
test byte [rcx + 0x1c], 4
je 0x1000c6a45
cmp byte [rcx + 0x19], 2
jb 0x1000c6a45
mov edx, 0x7f
jmp 0x1000c6a32
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 0x1000c6a45
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 0x1000c6a45
test byte [rcx + 0x1c], 4
je 0x1000c6a45
cmp byte [rcx + 0x19], 2
jb 0x1000c6a45
mov edx, 0x80
mov rcx, qword [rcx + 0x10]
mov r9, rdi
mov r8, r12
mov dword [rsp + 0x20], eax
call fcn.10001ddb0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x1001653b8]
cmp rcx, r13
je 0x1000c6a77
test byte [rcx + 0x1c], 4
je 0x1000c6a77
cmp byte [rcx + 0x19], 4
jb 0x1000c6a77
mov rcx, qword [rcx + 0x10]
mov edx, 0x81
mov r8, r12
call fcn.10001c854
mov eax, ebx
mov rcx, qword [rsp + 0x2d0]
xor rcx, rsp
call fcn.10014e600
lea r11, [rsp + 0x2e0]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r13
pop r12
pop rdi
ret