Function at 0x14016dfb0
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push rbx
push rsi
push r12
sub rsp, 0x60
mov rax, qword [0x1404af540]
xor rax, rsp
mov qword [rsp + 0x50], rax
xor r12d, r12d
lea rcx, [0x1404ba420]
mov qword [rsp + 0x30], r12
mov eax, 0xfeff
mov dword [rsp + 0x28], 0x80
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 3
mov edx, 0xc0000000
mov word [rsp + 0x44], ax
mov dword [rsp + 0x4c], r12d
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x14016e1da
lea r9, [rsp + 0x48]
mov dword [rsp + 0x48], r12d
mov r8d, 1
mov byte [rsp + 0x40], r12b
lea rdx, [rsp + 0x40]
mov qword [rsp + 0x20], r12
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14016e1d5
cmp dword [rsp + 0x48], 1
jne 0x14016e1d5
cmp byte [rsp + 0x40], 0x7f
ja 0x14016e1d5
xor r9d, r9d
mov qword [rsp + 0x80], rbp
xor r8d, r8d
xor edx, edx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
xor edx, edx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, eax
cmp eax, 0xffffffff
je 0x14016e1cd
mov ecx, ebp
mov qword [rsp + 0x90], r14
call fcn.1403ca480
mov r8d, ebp
xor edx, edx
mov rcx, rax
mov r14, rax
call sub.VCRUNTIME140.dll_memset
lea r9, [rsp + 0x48]
mov dword [rsp + 0x48], r12d
mov r8d, ebp
mov qword [rsp + 0x20], r12
mov rdx, r14
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14016e1bd
cmp dword [rsp + 0x48], ebp
jne 0x14016e1bd
mov dword [rsp + 0x28], r12d
mov r9d, ebp
mov r8, r14
mov qword [rsp + 0x20], r12
xor edx, edx
mov qword [rsp + 0x98], r15
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
movsxd r15, eax
test eax, eax
jle 0x14016e1b5
mov rcx, 0xffffffffffffffff
mov qword [rsp + 0x88], rdi
mov eax, 2
mul r15
cmovb rax, rcx
mov rcx, rax
call fcn.1403ca480
lea r8, [r15 + r15]
xor edx, edx
mov rcx, rax
mov rdi, rax
call sub.VCRUNTIME140.dll_memset
mov r9d, ebp
mov dword [rsp + 0x28], r15d
mov r8, r14
mov qword [rsp + 0x20], rdi
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
lea r9, [rsp + 0x4c]
mov qword [rsp + 0x20], r12
mov r8d, 2
lea rdx, [rsp + 0x44]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
lea r8d, [r15 + r15]
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x4c]
mov rdx, rdi
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rdi
call fcn.1403ca488
mov rdi, qword [rsp + 0x88]
mov r15, qword [rsp + 0x98]
mov rcx, r14
call fcn.1403ca488
mov r14, qword [rsp + 0x90]
mov rbp, qword [rsp + 0x80]
mov rcx, rsi
jmp 0x14016e231
mov qword [rsp + 0x30], r12
lea rcx, [0x1404ba420]
mov dword [rsp + 0x28], 0x80
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 1
mov edx, 0x40000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x14016e237
lea r9, [rsp + 0x4c]
mov qword [rsp + 0x20], r12
mov r8d, 2
lea rdx, [rsp + 0x44]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.1403ca460
add rsp, 0x60
pop r12
pop rsi
pop rbx
ret