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

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
push rdi
sub rsp, 0x340
mov rax, qword [0x140097e48]
xor rax, rsp
mov qword [rsp + 0x330], rax
mov rax, qword [rsp + 0x350]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rax, qword [rsp + 0x350]
movzx eax, byte [rax + 0xb0]
test eax, eax
jne 0x140007f52
mov dword [rsp + 0x100], 0x18
mov dword [rsp + 0x110], 1
mov qword [rsp + 0x108], 0
mov rax, qword [rsp + 0x350]
movzx eax, byte [rax + 0xb1]
test eax, eax
jne 0x140007cca
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0xa0000000
mov dword [rsp + 0x20], 3
lea r9, [rsp + 0x100]
xor r8d, r8d
mov edx, 0xc0000000
mov rax, qword [rsp + 0x350]
mov rcx, qword [rax + 0x98]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rcx, qword [rsp + 0x350]
mov qword [rcx + 0xb8], rax
jmp 0x140007cdd
mov rax, qword [rsp + 0x350]
mov qword [rax + 0xb8], 0xffffffffffffffff
mov rax, qword [rsp + 0x350]
cmp qword [rax + 0xb8], 0xffffffffffffffff
jne 0x140007f43
mov ecx, 0x208
call fcn.14001b204
mov qword [rsp + 0x70], rax
cmp qword [rsp + 0x70], 0
je 0x140007d2c
mov rax, qword [rsp + 0x70]
mov rdi, qword [rsp + 0x70]
xor eax, eax
mov ecx, 0x208
rep stosb byte [rdi], al
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x88], rax
jmp 0x140007d38
mov qword [rsp + 0x88], 0
mov rax, qword [rsp + 0x88]
mov qword [rsp + 0x40], rax
mov dword [rsp + 0xc0], 0
mov rax, qword [rsp + 0x350]
cmp qword [rax + 0x90], 0
je 0x140007da6
mov rax, qword [rsp + 0x350]
mov eax, dword [rax + 0xb4]
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0x350]
mov r9, qword [rax + 0x88]
mov rax, qword [rsp + 0x350]
mov r8, qword [rax + 0x90]
lea rdx, [0x1400440e0]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.USER32.dll_wsprintfW]
jmp 0x140007e14
mov r8d, 0x208
xor edx, edx
lea rcx, [rsp + 0x120]
call fcn.14001c950
lea rdx, [rsp + 0x120]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x140007dee
lea r8, [rsp + 0x120]
lea rdx, [0x140044110]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.USER32.dll_wsprintfW]
jmp 0x140007e14
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0xc8], rax
mov edx, 2
mov rcx, qword [rsp + 0xc8]
call fcn.14001b1fc
xor eax, eax
jmp 0x1400082f9
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
lea r9, [rsp + 0x100]
mov r8d, 3
mov edx, 4
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rcx, qword [rsp + 0x350]
mov qword [rcx + 0xb8], rax
mov rax, qword [rsp + 0x350]
cmp qword [rax + 0xb8], 0xffffffffffffffff
jne 0x140007f13
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 1
lea r9, [rsp + 0x100]
mov r8d, 3
mov edx, 0x40000000
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rcx, qword [rsp + 0x350]
mov qword [rcx + 0xb8], rax
mov rax, qword [rsp + 0x350]
cmp qword [rax + 0xb8], 0xffffffffffffffff
jne 0x140007ef0
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0xd0], rax
mov edx, 2
mov rcx, qword [rsp + 0xd0]
call fcn.14001b1fc
xor eax, eax
jmp 0x1400082f9
mov rdx, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x350]
call fcn.140008fd0
mov rax, qword [rsp + 0x350]
mov byte [rax + 0xb1], 1
jmp 0x140007f22
mov rax, qword [rsp + 0x350]
mov byte [rax + 0xb1], 1
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0xd8], rax
mov edx, 2
mov rcx, qword [rsp + 0xd8]
call fcn.14001b1fc
jmp 0x140007f52
mov rax, qword [rsp + 0x350]
mov byte [rax + 0xb0], 1
mov rax, qword [rsp + 0x350]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [rsp + 0x4c], 0
mov rax, qword [rsp + 0x350]
cmp qword [rax + 0xb8], 0xffffffffffffffff
je 0x1400082f5
cmp qword [rsp + 0x358], 0
je 0x1400082ba
lea rax, [rsp + 0x360]
mov qword [rsp + 0x78], rax
mov r9, qword [rsp + 0x78]
mov r8, qword [rsp + 0x358]
xor edx, edx
xor ecx, ecx
call fcn.140007680
mov dword [rsp + 0x50], eax
mov eax, dword [rsp + 0x50]
inc eax
mov eax, eax
mov qword [rsp + 0xe0], rax
mov eax, 2
mov rcx, qword [rsp + 0xe0]
mul rcx
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov qword [rsp + 0x90], rax
mov rcx, qword [rsp + 0x90]
call fcn.14001b204
mov qword [rsp + 0x58], rax
cmp qword [rsp + 0x58], 0
je 0x140008054
mov rdi, qword [rsp + 0x58]
xor eax, eax
mov rcx, qword [rsp + 0x90]
rep stosb byte [rdi], al
cmp qword [rsp + 0x58], 0
je 0x140008036
xor eax, eax
mov rcx, qword [rsp + 0x58]
mov word [rcx], ax
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x98], rax
jmp 0x140008042
mov qword [rsp + 0x98], 0
mov rax, qword [rsp + 0x98]
mov qword [rsp + 0xa0], rax
jmp 0x140008060
mov qword [rsp + 0xa0], 0
mov rax, qword [rsp + 0xa0]
mov qword [rsp + 0x68], rax
mov r8, qword [rsp + 0x78]
mov rdx, qword [rsp + 0x358]
mov rcx, qword [rsp + 0x68]
call fcn.140007740
mov qword [rsp + 0x78], 0
mov rax, qword [rsp + 0x350]
add rax, 0x28
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rax, qword [rsp + 0x350]
cmp qword [rax + 0x80], 0
je 0x14000823f
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x350]
mov r9, qword [rax + 0x80]
lea r8, [0x140044158]
xor edx, edx
xor ecx, ecx
call fcn.140009370
mov dword [rsp + 0x48], eax
mov eax, dword [rsp + 0x48]
inc eax
mov eax, eax
mov qword [rsp + 0xe8], rax
mov eax, 2
mov rcx, qword [rsp + 0xe8]
mul rcx
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov qword [rsp + 0xa8], rax
mov rcx, qword [rsp + 0xa8]
call fcn.14001b204
mov qword [rsp + 0x60], rax
cmp qword [rsp + 0x60], 0
je 0x140008182
mov rdi, qword [rsp + 0x60]
xor eax, eax
mov rcx, qword [rsp + 0xa8]
rep stosb byte [rdi], al
cmp qword [rsp + 0x60], 0
je 0x140008164
xor eax, eax
mov rcx, qword [rsp + 0x60]
mov word [rcx], ax
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0xb0], rax
jmp 0x140008170
mov qword [rsp + 0xb0], 0
mov rax, qword [rsp + 0xb0]
mov qword [rsp + 0xb8], rax
jmp 0x14000818e
mov qword [rsp + 0xb8], 0
mov rax, qword [rsp + 0xb8]
mov qword [rsp + 0x80], rax
mov eax, dword [rsp + 0x48]
mov rcx, qword [rsp + 0x68]
mov qword [rsp + 0x20], rcx
mov rcx, qword [rsp + 0x350]
mov r9, qword [rcx + 0x80]
lea r8, [0x140044168]
mov edx, eax
mov rcx, qword [rsp + 0x80]
call fcn.140009370
mov eax, dword [rsp + 0x48]
shl rax, 1
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x4c]
mov r8d, eax
mov rdx, qword [rsp + 0x80]
mov rax, qword [rsp + 0x350]
mov rcx, qword [rax + 0xb8]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rax, qword [rsp + 0x350]
mov rcx, qword [rax + 0xb8]
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov rax, qword [rsp + 0x80]
mov qword [rsp + 0xf0], rax
mov edx, 2
mov rcx, qword [rsp + 0xf0]
call fcn.14001b1fc
jmp 0x140008286
mov eax, dword [rsp + 0x50]
shl rax, 1
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x4c]
mov r8d, eax
mov rdx, qword [rsp + 0x68]
mov rax, qword [rsp + 0x350]
mov rcx, qword [rax + 0xb8]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rax, qword [rsp + 0x350]
mov rcx, qword [rax + 0xb8]
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0xf8], rax
mov edx, 2
mov rcx, qword [rsp + 0xf8]
call fcn.14001b1fc
mov rax, qword [rsp + 0x350]
add rax, 0x28
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rax, qword [rsp + 0x350]
movzx eax, byte [rax + 0xb1]
test eax, eax
je 0x1400082f5
mov rax, qword [rsp + 0x350]
mov rcx, qword [rax + 0xb8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rsp + 0x350]
mov qword [rax + 0xb8], 0xffffffffffffffff
mov eax, dword [rsp + 0x4c]
mov rcx, qword [rsp + 0x330]
xor rcx, rsp
call fcn.14001b810
add rsp, 0x340
pop rdi
ret