Function at 0x1400160f0
Capabilities:
Get file size
Read file on windows

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rsi
push rdi
sub rsp, 0xa8
mov rax, qword [0x14031f2d0]
xor rax, rsp
mov qword [rsp + 0x90], rax
mov qword [rsp + 0x40], 0
mov dword [rsp + 0x68], 0
mov qword [rsp + 0x48], 0
cmp qword [rsp + 0xc0], 0
je 0x14001614f
cmp qword [rsp + 0xc8], 0
jne 0x14001617a
cmp qword [rsp + 0xd8], 0
je 0x140016173
lea rax, str.CprjWriteFileTestDlg::WriteTextToTxtFileOverlay_:_lpszTxtFileFullPathName_is_NULL_or_ppcharContent_is_NULL
mov rdi, qword [rsp + 0xd8]
mov rsi, rax
mov ecx, 0xd6
rep movsb byte [rdi], byte [rsi]
xor al, al
jmp 0x14001645d
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov r8d, 3
mov edx, 0x80000000
mov rcx, qword [rsp + 0xc0]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0x40], rax
cmp qword [rsp + 0x40], 0xffffffffffffffff
jne 0x1400161eb
cmp qword [rsp + 0xd8], 0
je 0x1400161e4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.CprjWriteFileTestDlg::WriteTextToTxtFileOverlay_:_CreateFile_failed__Error_Code___d
mov rcx, qword [rsp + 0xd8]
call fcn.140015490
xor al, al
jmp 0x14001645d
lea rdx, [rsp + 0x88]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0xffffffff
jne 0x14001625d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x54], eax
cmp dword [rsp + 0x54], 0
je 0x14001625d
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x40], 0
cmp qword [rsp + 0xd8], 0
je 0x140016256
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.CprjWriteFileTestDlg::WriteTextToTxtFileOverlay_:_GetFileSize_failed__Error_Code___d
mov rcx, qword [rsp + 0xd8]
call fcn.140015490
xor al, al
jmp 0x14001645d
mov rax, qword [rsp + 0xd0]
mov ecx, dword [rsp + 0x88]
mov dword [rax], ecx
mov rax, qword [rsp + 0xd0]
mov eax, dword [rax]
shl eax, 8
mov rcx, qword [rsp + 0xd0]
mov dword [rcx], eax
mov rax, qword [rsp + 0xd0]
mov eax, dword [rax]
add eax, dword [rsp + 0x50]
mov rcx, qword [rsp + 0xd0]
mov dword [rcx], eax
mov rax, qword [rsp + 0xd0]
mov eax, dword [rax]
inc eax
mov eax, eax
mov ecx, eax
call fcn.1400cd718
mov qword [rsp + 0x70], rax
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0
jne 0x14001630c
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x40], 0
cmp qword [rsp + 0xd8], 0
je 0x140016305
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.CprjWriteFileTestDlg::WriteTextToTxtFileOverlay_:_new_failed__Error_Code___d
mov rcx, qword [rsp + 0xd8]
call fcn.140015490
xor al, al
jmp 0x14001645d
mov rax, qword [rsp + 0xd0]
mov eax, dword [rax]
inc eax
mov eax, eax
mov qword [rsp + 0x78], rax
mov rdi, qword [rsp + 0x48]
xor eax, eax
mov rcx, qword [rsp + 0x78]
rep stosb byte [rdi], al
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x8c]
mov rax, qword [rsp + 0xd0]
mov r8d, dword [rax]
mov rdx, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [rsp + 0x58], eax
cmp dword [rsp + 0x58], 0
jne 0x1400163f1
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x40], 0
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x60], rax
mov rcx, qword [rsp + 0x60]
call fcn.14013aa70
cmp qword [rsp + 0x60], 0
jne 0x1400163a6
mov qword [rsp + 0x80], 0
jmp 0x1400163bc
mov qword [rsp + 0x48], 0x8123
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x80], rax
mov qword [rsp + 0x48], 0
cmp qword [rsp + 0xd8], 0
je 0x1400163ed
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.CprjWriteFileTestDlg::WriteTextToTxtFileOverlay_:_WriteFile_failed__Error_Code___d
mov rcx, qword [rsp + 0xd8]
call fcn.140015490
xor al, al
jmp 0x14001645d
mov rcx, qword [rsp + 0x48]
call fcn.140017cc0
mov rcx, qword [rsp + 0xc8]
mov qword [rcx], rax
mov rax, qword [rsp + 0xc8]
cmp qword [rax], 0
jne 0x140016447
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp qword [rsp + 0xd8], 0
je 0x140016443
lea rax, str.CprjWriteFileTestDlg::WriteTextToTxtFileAppend_:_CStaticPubFunc::pcharTopwcharEx_failed_
mov rdi, qword [rsp + 0xd8]
mov rsi, rax
mov ecx, 0xb2
rep movsb byte [rdi], byte [rsi]
xor al, al
jmp 0x14001645d
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x40], 0
mov al, 1
mov rcx, qword [rsp + 0x90]
xor rcx, rsp
call fcn.14013a450
add rsp, 0xa8
pop rdi
pop rsi
ret