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

Disassembly:
jmp 0x1400118d0
mov dword [rsp + 8], ecx
push rbp
push rdi
sub rsp, 0xaa8
lea rbp, [rsp + 0x40]
lea rdi, [rsp + 0x40]
mov ecx, 0x1da
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov ecx, dword [rsp + 0xac8]
mov rax, qword [0x14001f180]
xor rax, rbp
mov qword [rbp + 0xa58], rax
lea rcx, [0x1400250a5]
call fcn.1400113f2
nop
mov qword [rbp + 0x668], 0xffffffffffffffff
mov qword [rbp + 0x688], 0xffffffffffffffff
mov dword [rbp + 0x6a4], 0
mov dword [rbp + 0x6c4], 0
mov qword [rbp + 0x6e8], 0
mov qword [rbp + 0x708], 0xfffff
mov dword [rbp + 0x724], 0
lea rdx, [rbp + 0x440]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
jne 0x140011994
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____GetTempPathW_Failed_With_Error_:__d__n
call fcn.1400111bd
nop
xor eax, eax
jmp 0x140011c3d
lea r9, str.test.tmp
lea r8, [rbp + 0x440]
lea rdx, str._s_s
lea rcx, [rbp + 0x10]
call qword [sym.imp.USER32.dll_wsprintfW]
nop
mov qword [rbp + 0x748], 0
jmp 0x1400119d2
mov rax, qword [rbp + 0x748]
inc rax
mov qword [rbp + 0x748], rax
mov eax, dword [rbp + 0xa80]
cmp qword [rbp + 0x748], rax
jae 0x140011c38
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x100
mov dword [rsp + 0x20], 2
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
lea rcx, [rbp + 0x10]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rbp + 0x688], rax
cmp qword [rbp + 0x688], 0xffffffffffffffff
jne 0x140011a40
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____CreateFileW_Failed_With_Error_:__d__n
call fcn.1400111bd
nop
xor eax, eax
jmp 0x140011c3d
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [rbp + 0x708]
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rbp + 0x6e8], rax
call qword [sym.imp.ucrtbased.dll_rand]
cdq
mov ecx, 0xff
idiv ecx
mov eax, edx
mov dword [rbp + 0x724], eax
mov r8, qword [rbp + 0x708]
mov edx, dword [rbp + 0x724]
mov rcx, qword [rbp + 0x6e8]
call fcn.140011320
nop
mov qword [rsp + 0x20], 0
lea r9, [rbp + 0x6c4]
mov r8d, dword [rbp + 0x708]
mov rdx, qword [rbp + 0x6e8]
mov rcx, qword [rbp + 0x688]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140011ad0
mov eax, dword [rbp + 0x6c4]
cmp rax, qword [rbp + 0x708]
je 0x140011b06
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____WriteFile_Failed_With_Error_:__d__n
call fcn.1400111bd
nop
mov r8, qword [rbp + 0x708]
mov edx, dword [rbp + 0x6c4]
lea rcx, str._i__Written__d_Bytes_of__d__n
call fcn.1400111bd
nop
xor eax, eax
jmp 0x140011c3d
mov r8, qword [rbp + 0x708]
xor edx, edx
mov rcx, qword [rbp + 0x6e8]
call fcn.140011320
nop
mov rcx, qword [rbp + 0x688]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x4000100
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0x80000000
lea rcx, [rbp + 0x10]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rbp + 0x668], rax
cmp qword [rbp + 0x668], 0xffffffffffffffff
jne 0x140011b85
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____CreateFileW_Failed_With_Error_:__d__n
call fcn.1400111bd
nop
xor eax, eax
jmp 0x140011c3d
mov qword [rsp + 0x20], 0
lea r9, [rbp + 0x6a4]
mov r8d, dword [rbp + 0x708]
mov rdx, qword [rbp + 0x6e8]
mov rcx, qword [rbp + 0x668]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140011bc3
mov eax, dword [rbp + 0x6a4]
cmp rax, qword [rbp + 0x708]
je 0x140011bf6
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____ReadFile_Failed_With_Error_:__d__n
call fcn.1400111bd
nop
mov r8, qword [rbp + 0x708]
mov edx, dword [rbp + 0x6a4]
lea rcx, str._i__Read__d_Bytes_of__d__n
call fcn.1400111bd
nop
xor eax, eax
jmp 0x140011c3d
mov r8, qword [rbp + 0x708]
xor edx, edx
mov rcx, qword [rbp + 0x6e8]
call fcn.140011320
nop
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [rbp + 0x6e8]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop
mov rcx, qword [rbp + 0x668]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
jmp 0x1400119c1
mov eax, 1
mov rdi, rax
lea rcx, [rbp - 0x40]
lea rdx, [0x14001bec0]
call fcn.14001137a
mov rax, rdi
mov rcx, qword [rbp + 0xa58]
xor rcx, rbp
call fcn.1400111d6
lea rsp, [rbp + 0xa68]
pop rdi
pop rbp
ret