Function at 0x140001230
Capabilities:
Get common file path
Read file on windows
Write file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push r14
sub rsp, 0x680
mov rax, qword [0x140005040]
xor rax, rsp
mov qword [rsp + 0x670], rax
mov ebx, ecx
lea rdx, [rsp + 0x50]
xor r14d, r14d
mov ecx, 0x104
mov dword [rsp + 0x40], r14d
mov dword [rsp + 0x44], r14d
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
jne 0x14000128e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____GetTempPathW_Failed_With_Error_:__d__n
call fcn.140001010
xor eax, eax
jmp 0x14000147a
mov qword [rsp + 0x690], rbp
lea r9, str.test.tmp
mov qword [rsp + 0x698], rsi
lea r8, [rsp + 0x50]
lea rdx, str._s_s
mov qword [rsp + 0x6a0], rdi
lea rcx, [rsp + 0x260]
call qword [sym.imp.USER32.dll_wsprintfW]
mov rsi, r14
mov rbp, rbx
test ebx, ebx
je 0x14000145d
nop word [rax + rax]
mov qword [rsp + 0x30], r14
lea rcx, [rsp + 0x260]
mov dword [rsp + 0x28], 0x100
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 2
mov edx, 0x40000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x1400014fb
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edx, 8
mov r8d, 0xfffff
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbx, rax
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
mov r9d, eax
mov r8d, 0xfffff
mov eax, 0x80808081
imul r9d
add edx, r9d
sar edx, 7
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
imul ecx, edx, 0xff
sub r9d, ecx
mov rcx, rbx
mov edx, r9d
call sub.VCRUNTIME140.dll_memset
lea r9, [rsp + 0x44]
mov qword [rsp + 0x20], r14
mov r8d, 0xfffff
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1400014ca
cmp dword [rsp + 0x44], 0xfffff
jne 0x1400014ca
xor edx, edx
mov r8d, 0xfffff
mov rcx, rbx
call sub.VCRUNTIME140.dll_memset
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x30], r14
lea rcx, [rsp + 0x260]
mov dword [rsp + 0x28], 0x4000100
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 3
mov edx, 0x80000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x1400014fb
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], r14
mov r8d, 0xfffff
mov rdx, rbx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14000149c
cmp dword [rsp + 0x40], 0xfffff
jne 0x14000149c
xor edx, edx
mov r8d, 0xfffff
mov rcx, rbx
call sub.VCRUNTIME140.dll_memset
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
inc rsi
cmp rsi, rbp
jb 0x1400012e0
mov eax, 1
mov rsi, qword [rsp + 0x698]
mov rbp, qword [rsp + 0x690]
mov rdi, qword [rsp + 0x6a0]
mov rcx, qword [rsp + 0x670]
xor rcx, rsp
call fcn.140001ca0
mov rbx, qword [rsp + 0x6a8]
add rsp, 0x680
pop r14
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____ReadFile_Failed_With_Error_:__d__n
call fcn.140001010
mov edx, dword [rsp + 0x40]
lea rcx, str._i__Read__d_Bytes_of__d__n
mov r8d, 0xfffff
call fcn.140001010
xor eax, eax
jmp 0x140001462
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____WriteFile_Failed_With_Error_:__d__n
call fcn.140001010
mov edx, dword [rsp + 0x44]
lea rcx, str._i__Written__d_Bytes_of__d__n
mov r8d, 0xfffff
call fcn.140001010
xor eax, eax
jmp 0x140001462
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____CreateFileW_Failed_With_Error_:__d__n
call fcn.140001010
xor eax, eax
jmp 0x140001462