Function at 0x140007a40
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 [0x1400a3c48]
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 0x140007da2
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 0x140007b1a
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 0x140007b2d
mov rax, qword [rsp + 0x350]
mov qword [rax + 0xb8], 0xffffffffffffffff
mov rax, qword [rsp + 0x350]
cmp qword [rax + 0xb8], 0xffffffffffffffff
jne 0x140007d93
mov ecx, 0x208
call fcn.14001b3c8
mov qword [rsp + 0x70], rax
cmp qword [rsp + 0x70], 0
je 0x140007b7c
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 0x140007b88
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 0x140007bf6
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, [0x140046e20]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.USER32.dll_wsprintfW]
jmp 0x140007c64
mov r8d, 0x208
xor edx, edx
lea rcx, [rsp + 0x120]
call fcn.14001cb00
lea rdx, [rsp + 0x120]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x140007c3e
lea r8, [rsp + 0x120]
lea rdx, [0x140046e50]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.USER32.dll_wsprintfW]
jmp 0x140007c64
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0xc8], rax
mov edx, 2
mov rcx, qword [rsp + 0xc8]
call fcn.14001b3c0
xor eax, eax
jmp 0x140008149
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 0x140007d63
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 0x140007d40
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0xd0], rax
mov edx, 2
mov rcx, qword [rsp + 0xd0]
call fcn.14001b3c0
xor eax, eax
jmp 0x140008149
mov rdx, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x350]
call fcn.140008e20
mov rax, qword [rsp + 0x350]
mov byte [rax + 0xb1], 1
jmp 0x140007d72
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.14001b3c0
jmp 0x140007da2
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 0x140008145
cmp qword [rsp + 0x358], 0
je 0x14000810a
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.1400074d0
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.14001b3c8
mov qword [rsp + 0x58], rax
cmp qword [rsp + 0x58], 0
je 0x140007ea4
mov rdi, qword [rsp + 0x58]
xor eax, eax
mov rcx, qword [rsp + 0x90]
rep stosb byte [rdi], al
cmp qword [rsp + 0x58], 0
je 0x140007e86
xor eax, eax
mov rcx, qword [rsp + 0x58]
mov word [rcx], ax
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x98], rax
jmp 0x140007e92
mov qword [rsp + 0x98], 0
mov rax, qword [rsp + 0x98]
mov qword [rsp + 0xa0], rax
jmp 0x140007eb0
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.140007590
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 0x14000808f
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x350]
mov r9, qword [rax + 0x80]
lea r8, [0x140046e98]
xor edx, edx
xor ecx, ecx
call fcn.1400091c0
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.14001b3c8
mov qword [rsp + 0x60], rax
cmp qword [rsp + 0x60], 0
je 0x140007fd2
mov rdi, qword [rsp + 0x60]
xor eax, eax
mov rcx, qword [rsp + 0xa8]
rep stosb byte [rdi], al
cmp qword [rsp + 0x60], 0
je 0x140007fb4
xor eax, eax
mov rcx, qword [rsp + 0x60]
mov word [rcx], ax
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0xb0], rax
jmp 0x140007fc0
mov qword [rsp + 0xb0], 0
mov rax, qword [rsp + 0xb0]
mov qword [rsp + 0xb8], rax
jmp 0x140007fde
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, [0x140046ea8]
mov edx, eax
mov rcx, qword [rsp + 0x80]
call fcn.1400091c0
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.14001b3c0
jmp 0x1400080d6
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.14001b3c0
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 0x140008145
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.14001b9d0
add rsp, 0x340
pop rdi
ret