Function at 0x140007940
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, 0x330
mov rax, qword [rsp + 0x340]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rax, qword [rsp + 0x340]
movzx eax, byte [rax + 0xb0]
test eax, eax
jne 0x140007c90
mov dword [rsp + 0x100], 0x18
mov dword [rsp + 0x110], 1
mov qword [rsp + 0x108], 0
mov rax, qword [rsp + 0x340]
movzx eax, byte [rax + 0xb1]
test eax, eax
jne 0x140007a08
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 + 0x340]
mov rcx, qword [rax + 0x98]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rcx, qword [rsp + 0x340]
mov qword [rcx + 0xb8], rax
jmp 0x140007a1b
mov rax, qword [rsp + 0x340]
mov qword [rax + 0xb8], 0xffffffffffffffff
mov rax, qword [rsp + 0x340]
cmp qword [rax + 0xb8], 0xffffffffffffffff
jne 0x140007c81
mov ecx, 0x208
call fcn.1400180e8
mov qword [rsp + 0x70], rax
cmp qword [rsp + 0x70], 0
je 0x140007a6a
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 0x140007a76
mov qword [rsp + 0x88], 0
mov rax, qword [rsp + 0x88]
mov qword [rsp + 0x40], rax
mov dword [rsp + 0xc0], 0
mov rax, qword [rsp + 0x340]
cmp qword [rax + 0x90], 0
je 0x140007ae4
mov rax, qword [rsp + 0x340]
mov eax, dword [rax + 0xb4]
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0x340]
mov r9, qword [rax + 0x88]
mov rax, qword [rsp + 0x340]
mov r8, qword [rax + 0x90]
lea rdx, [0x140041080]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.USER32.dll_wsprintfW]
jmp 0x140007b52
mov r8d, 0x208
xor edx, edx
lea rcx, [rsp + 0x120]
call fcn.140019770
lea rdx, [rsp + 0x120]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x140007b2c
lea r8, [rsp + 0x120]
lea rdx, [0x1400410b0]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.USER32.dll_wsprintfW]
jmp 0x140007b52
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0xc8], rax
mov edx, 2
mov rcx, qword [rsp + 0xc8]
call fcn.1400180e0
xor eax, eax
jmp 0x140008037
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 + 0x340]
mov qword [rcx + 0xb8], rax
mov rax, qword [rsp + 0x340]
cmp qword [rax + 0xb8], 0xffffffffffffffff
jne 0x140007c51
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 + 0x340]
mov qword [rcx + 0xb8], rax
mov rax, qword [rsp + 0x340]
cmp qword [rax + 0xb8], 0xffffffffffffffff
jne 0x140007c2e
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0xd0], rax
mov edx, 2
mov rcx, qword [rsp + 0xd0]
call fcn.1400180e0
xor eax, eax
jmp 0x140008037
mov rdx, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x340]
call fcn.140008ca0
mov rax, qword [rsp + 0x340]
mov byte [rax + 0xb1], 1
jmp 0x140007c60
mov rax, qword [rsp + 0x340]
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.1400180e0
jmp 0x140007c90
mov rax, qword [rsp + 0x340]
mov byte [rax + 0xb0], 1
mov rax, qword [rsp + 0x340]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [rsp + 0x4c], 0
mov rax, qword [rsp + 0x340]
cmp qword [rax + 0xb8], 0xffffffffffffffff
je 0x140008033
cmp qword [rsp + 0x348], 0
je 0x140007ff8
lea rax, [rsp + 0x350]
mov qword [rsp + 0x78], rax
mov r9, qword [rsp + 0x78]
mov r8, qword [rsp + 0x348]
xor edx, edx
xor ecx, ecx
call fcn.1400073f0
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.1400180e8
mov qword [rsp + 0x58], rax
cmp qword [rsp + 0x58], 0
je 0x140007d92
mov rdi, qword [rsp + 0x58]
xor eax, eax
mov rcx, qword [rsp + 0x90]
rep stosb byte [rdi], al
cmp qword [rsp + 0x58], 0
je 0x140007d74
xor eax, eax
mov rcx, qword [rsp + 0x58]
mov word [rcx], ax
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x98], rax
jmp 0x140007d80
mov qword [rsp + 0x98], 0
mov rax, qword [rsp + 0x98]
mov qword [rsp + 0xa0], rax
jmp 0x140007d9e
mov qword [rsp + 0xa0], 0
mov rax, qword [rsp + 0xa0]
mov qword [rsp + 0x68], rax
mov r8, qword [rsp + 0x78]
mov rdx, qword [rsp + 0x348]
mov rcx, qword [rsp + 0x68]
call fcn.1400074b0
mov qword [rsp + 0x78], 0
mov rax, qword [rsp + 0x340]
add rax, 0x28
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rax, qword [rsp + 0x340]
cmp qword [rax + 0x80], 0
je 0x140007f7d
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x340]
mov r9, qword [rax + 0x80]
lea r8, [0x1400410f8]
xor edx, edx
xor ecx, ecx
call fcn.140009040
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.1400180e8
mov qword [rsp + 0x60], rax
cmp qword [rsp + 0x60], 0
je 0x140007ec0
mov rdi, qword [rsp + 0x60]
xor eax, eax
mov rcx, qword [rsp + 0xa8]
rep stosb byte [rdi], al
cmp qword [rsp + 0x60], 0
je 0x140007ea2
xor eax, eax
mov rcx, qword [rsp + 0x60]
mov word [rcx], ax
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0xb0], rax
jmp 0x140007eae
mov qword [rsp + 0xb0], 0
mov rax, qword [rsp + 0xb0]
mov qword [rsp + 0xb8], rax
jmp 0x140007ecc
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 + 0x340]
mov r9, qword [rcx + 0x80]
lea r8, str._hs:_ls
mov edx, eax
mov rcx, qword [rsp + 0x80]
call fcn.140009040
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 + 0x340]
mov rcx, qword [rax + 0xb8]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rax, qword [rsp + 0x340]
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.1400180e0
jmp 0x140007fc4
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 + 0x340]
mov rcx, qword [rax + 0xb8]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rax, qword [rsp + 0x340]
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.1400180e0
mov rax, qword [rsp + 0x340]
add rax, 0x28
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rax, qword [rsp + 0x340]
movzx eax, byte [rax + 0xb1]
test eax, eax
je 0x140008033
mov rax, qword [rsp + 0x340]
mov rcx, qword [rax + 0xb8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rsp + 0x340]
mov qword [rax + 0xb8], 0xffffffffffffffff
mov eax, dword [rsp + 0x4c]
add rsp, 0x330
pop rdi
ret