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

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x548]
sub rsp, 0x620
mov qword [rbp + 0x78], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov rax, qword [0x1401a1e90]
xor rax, rsp
mov qword [rbp + 0x510], rax
lea rcx, [0x1401a19a8]
mov rax, qword [0x1401a19a8]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x40], rax
lea rax, [rbp + 0x50]
mov qword [rbp - 0x70], rax
lea rdx, str.7451575c5b145b5252393e
lea rcx, [rbp + 0x50]
call fcn.1400022a0
nop
mov rdx, rax
lea rcx, [rbp + 0x40]
call fcn.140025050
nop
mov rdx, qword [rax]
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x40]
call fcn.14000f520
nop
mov rdx, qword [rbp + 0x40]
add rdx, 0xffffffffffffffe8
or rdi, 0xffffffffffffffff
lock add dword [rdx + 0x10], edi
jg 0x140018cac
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea rax, [rbp + 0x58]
mov qword [rsp + 0x48], rax
lea rdx, str.7d72147a7b6014716c7d676014110514737b607b14717a70393e
lea rcx, [rbp + 0x58]
call fcn.1400022a0
nop
mov rdx, rax
lea rcx, [rbp - 0x58]
call fcn.140025050
nop
mov rdx, qword [rax]
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x40]
call fcn.14000f520
nop
mov rdx, qword [rbp - 0x58]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x140018cfd
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea rax, [rbp + 0x70]
mov qword [rsp + 0x48], rax
lea rdx, str.677160141b55145d0904393e
lea rcx, [rbp + 0x70]
call fcn.1400022a0
nop
mov rdx, rax
lea rcx, [rbp - 0x48]
call fcn.140025050
nop
mov rdx, qword [rax]
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x40]
call fcn.14000f520
nop
mov rdx, qword [rbp - 0x48]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x140018d4e
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea rax, [rbp + 0x28]
mov qword [rsp + 0x48], rax
lea rdx, str.0e667164717560393e
lea rcx, [rbp + 0x28]
call fcn.1400022a0
nop
mov rdx, rax
lea rcx, [rbp - 0x38]
call fcn.140025050
nop
mov rdx, qword [rax]
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x40]
call fcn.14000f520
nop
mov rdx, qword [rbp - 0x38]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x140018d9f
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea rax, [rbp + 0x68]
mov qword [rsp + 0x48], rax
lea rdx, str.7d7214115d110909020414737b607b14717a70393e
lea rcx, [rbp + 0x68]
call fcn.1400022a0
nop
mov rdx, rax
lea rcx, [rbp - 0x28]
call fcn.140025050
nop
mov rdx, qword [rax]
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x40]
call fcn.14000f520
nop
mov rdx, qword [rbp - 0x28]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x140018df0
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea rax, [rbp + 0x38]
mov qword [rsp + 0x48], rax
lea rdx, str.707178141105393e
lea rcx, [rbp + 0x38]
call fcn.1400022a0
nop
mov rdx, rax
lea rcx, [rbp - 0x18]
call fcn.140025050
nop
mov rdx, qword [rax]
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x40]
call fcn.14000f520
nop
mov rdx, qword [rbp - 0x18]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x140018e41
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea rax, [rbp - 0x68]
mov qword [rsp + 0x48], rax
lea rdx, str.7d72147a7b6014716c7d676014110514737b607b14717a70393e
lea rcx, [rbp - 0x68]
call fcn.1400022a0
nop
mov rdx, rax
lea rcx, [rbp - 8]
call fcn.140025050
nop
mov rdx, qword [rax]
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x40]
call fcn.14000f520
nop
mov rdx, qword [rbp - 8]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x140018e92
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea rax, [rbp + 0x48]
mov qword [rsp + 0x48], rax
lea rdx, str.445d5a5314051a051a051a0514195a14051419431405040404140a145a4158393e
lea rcx, [rbp + 0x48]
call fcn.1400022a0
nop
mov rdx, rax
lea rcx, [rbp + 8]
call fcn.140025050
nop
mov rdx, qword [rax]
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x40]
call fcn.14000f520
nop
mov rdx, qword [rbp + 8]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x140018ee3
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea rax, [rbp + 0x60]
mov qword [rsp + 0x48], rax
lea rdx, str.677160141b55145d09115d111f05393e
lea rcx, [rbp + 0x60]
call fcn.1400022a0
nop
mov rdx, rax
lea rcx, [rbp + 0x18]
call fcn.140025050
nop
mov rdx, qword [rax]
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x40]
call fcn.14000f520
nop
mov rdx, qword [rbp + 0x18]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x140018f34
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea rax, [rbp - 0x60]
mov qword [rsp + 0x48], rax
lea rdx, str.737b607b14667164717560393e
lea rcx, [rbp - 0x60]
call fcn.1400022a0
nop
mov rdx, rax
lea rcx, [rbp - 0x50]
call fcn.140025050
nop
mov rdx, qword [rax]
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x40]
call fcn.14000f520
nop
mov rdx, qword [rbp - 0x50]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x140018f85
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea rax, [rbp - 0x40]
mov qword [rsp + 0x48], rax
lea rdx, str.0e717a70393e
lea rcx, [rbp - 0x40]
call fcn.1400022a0
nop
mov rdx, rax
lea rcx, [rbp - 0x30]
call fcn.140025050
nop
mov rdx, qword [rax]
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x40]
call fcn.14000f520
nop
mov rdx, qword [rbp - 0x30]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x140018fd6
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea rax, [rbp - 0x20]
mov qword [rsp + 0x48], rax
lea rdx, str.707178141104393e
lea rcx, [rbp - 0x20]
call fcn.1400022a0
nop
mov rdx, rax
lea rcx, [rbp - 0x10]
call fcn.140025050
nop
mov rdx, qword [rax]
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x40]
call fcn.14000f520
nop
mov rdx, qword [rbp - 0x10]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x140019027
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor r13d, r13d
mov word [rbp + 0xf0], r13w
xor edx, edx
mov r8d, 0x206
lea rcx, [rbp + 0xf2]
call fcn.1400c7c50
mov r8d, 0x104
lea rdx, [rbp + 0xf0]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea rcx, [0x1401a19a8]
mov rax, qword [0x1401a19a8]
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x50], rbx
lea rcx, [rbp + 0xf0]
lea rax, [rbp + 0xf0]
lea r15d, [r13 + 1]
test rax, 0xffffffffffff0000
jne 0x1400190b7
movzx ebx, cx
mov ecx, ebx
call fcn.1400019e0
test rax, rax
je 0x1400191ac
mov r8d, ebx
mov rdx, rax
lea rcx, [rsp + 0x50]
call fcn.140002750
jmp 0x1400191ac
lea rax, [rbp + 0xf0]
mov rsi, rdi
inc rsi
cmp word [rax + rsi*2], 0
jne 0x1400190c1
test esi, esi
jne 0x14001912b
lea rdx, [rbx - 0x18]
mov rsi, qword [rdx]
cmp dword [rdx + 8], 0
je 0x1400191ac
cmp dword [rdx + 0x10], 0
jge 0x140019104
cmp dword [rbx - 0xc], 0
jge 0x1400190f7
mov ecx, 0x80070057
call fcn.140001920
int3
mov dword [rbx - 0x10], r13d
mov word [rbx], r13w
jmp 0x1400191ac
lock add dword [rdx + 0x10], 0xffffffff
jg 0x140019114
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x50], rax
jmp 0x1400191ac
mov r12d, dword [rbx - 0x10]
lea r14, [rbp + 0xf0]
sub r14, rbx
sar r14, 1
test esi, esi
jns 0x14001914b
mov ecx, 0x80070057
call fcn.140001920
int3
mov ecx, r15d
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, esi
or eax, ecx
jge 0x14001916b
mov edx, esi
lea rcx, [rsp + 0x50]
call fcn.140002550
mov rbx, qword [rsp + 0x50]
movsxd rax, esi
movsxd rdx, dword [rbx - 0xc]
mov rcx, rbx
add rdx, rdx
cmp r14, r12
lea r12, [rax + rax]
mov r9, r12
ja 0x14001918f
lea r8, [rbx + r14*2]
call fcn.1400c303c
jmp 0x14001919b
lea r8, [rbp + 0xf0]
call fcn.1400c31fc
cmp esi, dword [rbx - 0xc]
jg 0x140019652
mov dword [rbx - 0x10], esi
mov word [rbx + r12], r13w
lea rcx, [0x1401a19a8]
mov rax, qword [0x1401a19a8]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x68], rax
mov edx, r15d
sub edx, dword [rax - 8]
mov ecx, dword [rax - 0xc]
dec ecx
or edx, ecx
jge 0x1400191e7
mov edx, r15d
lea rcx, [rsp + 0x68]
call fcn.140002550
mov rax, qword [rsp + 0x68]
mov ecx, 0x22
mov word [rax], cx
cmp dword [rax - 0xc], 1
jge 0x140019200
mov ecx, 0x80070057
call fcn.140001920
int3
mov dword [rax - 0x10], r15d
mov word [rax + 2], r13w
lea r8, [rsp + 0x50]
lea rdx, [rsp + 0x68]
lea rcx, [rbp]
call fcn.14000ea60
nop
mov rdx, rax
lea rcx, [rsp + 0x70]
call fcn.140019cb0
nop
mov rdx, qword [rbp]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x140019244
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x68]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x14001925d
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea rcx, [0x1401a19a8]
mov rax, qword [0x1401a19a8]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x78], rax
call fcn.1400c31d0
mov r8d, eax
lea rdx, [0x1401348a8]
lea rcx, [rsp + 0x78]
call fcn.140010db0
mov r11d, dword [0x1401a9d80]
mov ecx, r11d
imul ecx, r11d
imul ecx, r11d
mov eax, 0x30c30c31
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
imul edx, edx, 0x15
sub ecx, edx
cmp ecx, 3
jne 0x1400192f3
lea r10d, [r11 + 1]
lea r9d, [r11 + 2]
imul r9d, r10d
imul r9d, r11d
mov eax, 0x38e38e39
imul r9d
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*8]
sub r9d, eax
cmp r9d, 4
cmove r11d, r10d
mov dword [0x1401a9d80], r11d
mov word [rbp + 0x300], r13w
xor edx, edx
mov r8d, 0x206
lea rcx, [rbp + 0x302]
call fcn.1400c7c50
lea rdx, [rbp + 0x300]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
lea rcx, [0x1401a19a8]
mov rax, qword [0x1401a19a8]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rbp - 0x78], rax
lea r8, [rbp + 0x300]
lea rdx, [rbp - 0x78]
lea rcx, [rbp + 0x20]
call fcn.140019af0
nop
lea r8, [rsp + 0x78]
mov rdx, rax
lea rcx, [rbp + 0x10]
call fcn.14000ea60
nop
lea r8, str..bat
mov rdx, rax
lea rcx, [rsp + 0x60]
call fcn.140019af0
nop
mov rdx, qword [rbp + 0x10]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x14001938f
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rbp + 0x20]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x1400193a8
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rbp - 0x78]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x1400193c0
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea rcx, [0x1401a19a8]
mov rax, qword [0x1401a19a8]
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x58], rbx
mov rdx, qword [rsp + 0x40]
test rdx, rdx
je 0x14001940e
test rdx, 0xffffffffffff0000
jne 0x14001940e
movzx esi, dx
mov ecx, esi
call fcn.1400019e0
test rax, rax
je 0x14001941d
mov r8d, esi
mov rdx, rax
lea rcx, [rsp + 0x58]
call fcn.14001a250
jmp 0x140019418
lea rcx, [rsp + 0x58]
call fcn.140019710
mov rbx, qword [rsp + 0x58]
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 4
xor r9d, r9d
mov edx, 0x40000000
lea r8d, [r9 + 2]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x14001949f
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rbp - 0x80], r13d
mov qword [rsp + 0x20], r13
lea r9, [rbp - 0x80]
mov r8d, dword [rbx - 0x10]
mov rdx, rbx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140019496
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor edx, edx
lea r8d, [rdx + 0x70]
lea rcx, [rbp + 0x80]
call fcn.1400c7c50
mov dword [rbp + 0x80], 0x70
lea rax, [rbp + 0x30]
mov qword [rsp + 0x48], rax
lea rdx, str.5b44515a
lea rcx, [rbp + 0x30]
call fcn.1400022a0
nop
mov rdx, rax
lea rcx, [rbp - 0x70]
call fcn.140025050
nop
mov rax, qword [rax]
mov qword [rbp + 0x90], rax
mov rdx, qword [rbp - 0x70]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x140019504
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, qword [rsp + 0x60]
mov edx, r15d
sub edx, dword [rax - 8]
mov ecx, dword [rax - 0xc]
or ecx, edx
jge 0x140019527
xor edx, edx
lea rcx, [rsp + 0x60]
call fcn.140002550
mov rax, qword [rsp + 0x60]
mov qword [rbp + 0x98], rax
mov dword [rbp + 0xb0], r13d
mov dword [rbp + 0x84], 0x440
mov rax, qword [rsp + 0x70]
sub r15d, dword [rax - 8]
mov ecx, dword [rax - 0xc]
or ecx, r15d
jge 0x140019561
xor edx, edx
lea rcx, [rsp + 0x70]
call fcn.140002550
mov rax, qword [rsp + 0x70]
mov qword [rbp + 0xa0], rax
mov rax, qword [0x1401aa910]
test rax, rax
jne 0x1400195ab
lea rcx, str.Shell32.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
test rax, rax
je 0x14001959f
lea rdx, str.ShellExecuteExW
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1401aa910], rax
jmp 0x1400195a6
mov rax, qword [0x1401aa910]
test rax, rax
je 0x1400195b5
lea rcx, [rbp + 0x80]
call rax
nop
mov rdx, qword [rsp + 0x58]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x1400195cf
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x60]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x1400195e9
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x78]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x140019603
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x70]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x14001961d
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x50]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x140019637
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x14001965d
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
jmp 0x14001965d
mov ecx, 0x80070057
call fcn.140001920
nop
mov rcx, qword [rbp + 0x510]
xor rcx, rsp
call fcn.1400c2810
lea r11, [rsp + 0x620]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret