Function at 0x140014868
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 [0x140026730]
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 0x14001491e
test rsi, rsi
je 0x1400148f8
mov rdi, rsi
jmp 0x140014910
lea rdx, [rsp + 0x68]
mov rcx, r12
call fcn.1400150d8
mov rdi, qword [rsp + 0x68]
mov ebx, eax
test eax, eax
js 0x14001491e
test rdi, rdi
jne 0x140014a50
mov ebx, 0xc0000098
xor r13d, r13d
mov rcx, qword [rsp + 0x70]
test rcx, rcx
je 0x1400149fc
mov esi, 8
test ebx, ebx
js 0x14001497b
test rdi, rdi
je 0x1400149f0
cmp r15d, 1
je 0x1400149f0
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 eax, eax
jns 0x1400149f0
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 [0x140026028], 5
jbe 0x1400149eb
mov ecx, 4
mov dword [rsp + 0x68], ebx
lea rax, [rsp + 0x68]
mov qword [rbp + 8], rcx
mov qword [rbp], rax
lea rdx, [0x140022101]
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.140001008
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ntdll.dll_NtClose]
nop dword [rax + rax]
cmp qword [rsp + 0x78], r13
je 0x140014a26
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.140010a60
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 [0x140027388]
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 0x140014921
mov rcx, qword [rsp + 0x70]
call fcn.140015878
mov ebx, eax
test eax, eax
js 0x140014921
mov esi, r13d
test rdi, rdi
je 0x140014921
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 0x140014921
mov ecx, r14d
cmp qword [rbp - 0x70], rcx
je 0x140014b72
mov rax, rdi
sub rax, rsi
cmp rcx, rax
jbe 0x140014bd5
cmp qword [rbp - 0x70], rax
jne 0x140014bd5
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 0x140014921
mov eax, r14d
cmp qword [rbp - 0x70], rax
jne 0x140014bd5
add rsi, rax
cmp rsi, rdi
jae 0x140014921
jmp 0x140014af9
mov ebx, 0xc0000001
jmp 0x140014921