Function at 0x14001281c
Capabilities:
Read file on windows
Set file attributes
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x30]
sub rsp, 0x130
mov rax, qword [0x1400236e0]
xor rax, rsp
mov qword [rbp + 0x20], rax
and qword [rsp + 0x70], 0
lea r9, [rbp - 0x80]
and qword [rsp + 0x78], 0
xor edi, edi
mov rsi, r8
mov dword [rsp + 0x28], 4
mov r13, rdx
mov qword [rsp + 0x68], rdi
mov r12, rcx
mov dword [rsp + 0x20], 0x3000
mov r14d, 0x100000
lea rdx, [rsp + 0x78]
xor r8d, r8d
mov qword [rbp - 0x80], r14
or rcx, 0xffffffffffffffff
lea r15d, [rdi + 1]
call qword [sym.imp.ntdll.dll_NtAllocateVirtualMemory]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
js 0x1400128d2
test rsi, rsi
je 0x1400128ac
mov rdi, rsi
jmp 0x1400128c4
lea rdx, [rsp + 0x68]
mov rcx, r12
call fcn.140013088
mov rdi, qword [rsp + 0x68]
mov ebx, eax
test eax, eax
js 0x1400128d2
test rdi, rdi
jne 0x140012a05
mov ebx, 0xc0000098
xor r13d, r13d
mov rcx, qword [rsp + 0x70]
test rcx, rcx
je 0x1400129b1
mov esi, 8
test ebx, ebx
js 0x140012927
test rdi, rdi
je 0x140012923
cmp r15d, 1
je 0x140012923
mov r9d, esi
mov qword [rsp + 0x68], rdi
lea r8, [rsp + 0x68]
mov dword [rsp + 0x20], 0x14
lea rdx, [rbp - 0x78]
call qword [sym.imp.ntdll.dll_NtSetInformationFile]
nop dword [rax + rax]
mov rcx, qword [rsp + 0x70]
mov ebx, eax
test ebx, ebx
jns 0x1400129a5
mov r9d, 1
mov byte [rsp + 0x60], 1
lea r8, [rsp + 0x60]
mov dword [rsp + 0x20], 0xd
lea rdx, [rbp - 0x78]
call qword [sym.imp.ntdll.dll_NtSetInformationFile]
nop dword [rax + rax]
cmp dword [0x140023018], 5
jbe 0x1400129a0
call fcn.140001008
test al, al
je 0x1400129a0
mov ecx, 4
mov dword [rsp + 0x68], ebx
lea rax, [rsp + 0x68]
mov qword [rbp + 8], rcx
mov qword [rbp], rax
lea rdx, [0x14001e719]
lea rax, [rbp - 0x60]
mov qword [rbp - 0x60], rdi
mov qword [rbp + 0x10], rax
lea rax, [rbp - 0x20]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], ecx
mov qword [rbp + 0x18], rsi
call fcn.140001014
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ntdll.dll_NtClose]
nop dword [rax + rax]
cmp qword [rsp + 0x78], r13
je 0x1400129db
mov r9d, 0x8000
mov qword [rbp - 0x80], r13
lea r8, [rbp - 0x80]
or rcx, 0xffffffffffffffff
lea rdx, [rsp + 0x78]
call qword [sym.imp.ntdll.dll_NtFreeVirtualMemory]
nop dword [rax + rax]
mov eax, ebx
mov rcx, qword [rbp + 0x20]
xor rcx, rsp
call fcn.14000e4b0
mov rbx, qword [rsp + 0x188]
add rsp, 0x130
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov r8d, dword [0x140024308]
lea r9, [rbp - 0x78]
xor edx, edx
mov qword [rbp - 0x48], r13
mov rax, rdi
mov dword [rbp - 0x58], 0x30
div r8
xorps xmm0, xmm0
mov dword [rbp - 0x40], 0x40
test rdx, rdx
lea rcx, [rsp + 0x70]
mov edx, 0xc0150000
cmovne r15d, r8d
and qword [rbp - 0x50], 0
xor r13d, r13d
lea r8, [rbp - 0x58]
mov dword [rsp + 0x50], r13d
mov qword [rsp + 0x48], r13
mov dword [rsp + 0x40], 0x68
mov dword [rsp + 0x38], r13d
mov dword [rsp + 0x30], r13d
mov dword [rsp + 0x28], 0x80
mov qword [rsp + 0x20], r13
movdqu xmmword [rbp - 0x38], xmm0
call qword [sym.imp.ntdll.dll_NtCreateFile]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
js 0x1400128d5
mov rcx, qword [rsp + 0x70]
call fcn.14001381c
mov ebx, eax
test eax, eax
js 0x1400128d5
mov esi, r13d
test rdi, rdi
je 0x1400128d5
mov qword [rsp + 0x40], r13
lea rax, [rbp - 0x68]
mov qword [rsp + 0x38], rax
xor r9d, r9d
mov rax, qword [rsp + 0x78]
xor r8d, r8d
mov dword [rsp + 0x30], r14d
xor edx, edx
mov qword [rsp + 0x28], rax
mov rcx, r12
lea rax, [rbp - 0x78]
mov qword [rbp - 0x68], rsi
mov qword [rsp + 0x20], rax
call qword [sym.imp.ntdll.dll_NtReadFile]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
js 0x1400128d5
mov ecx, r14d
cmp qword [rbp - 0x70], rcx
je 0x140012b27
mov rax, rdi
sub rax, rsi
cmp rcx, rax
jbe 0x140012b8a
cmp qword [rbp - 0x70], rax
jne 0x140012b8a
mov r14d, edi
mov eax, r15d
sub r14d, esi
neg eax
dec r14d
add r14d, r15d
and r14d, eax
mov rcx, qword [rsp + 0x70]
lea rax, [rbp - 0x68]
mov qword [rsp + 0x40], r13
xor r9d, r9d
mov qword [rsp + 0x38], rax
xor r8d, r8d
mov rax, qword [rsp + 0x78]
xor edx, edx
mov dword [rsp + 0x30], r14d
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x78]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ntdll.dll_NtWriteFile]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
js 0x1400128d5
mov eax, r14d
cmp qword [rbp - 0x70], rax
jne 0x140012b8a
add rsi, rax
cmp rsi, rdi
jae 0x1400128d5
jmp 0x140012aae
mov ebx, 0xc0000001
jmp 0x1400128d5