Function at 0x180039a80
Capabilities:
Get common file path

Disassembly:
push rbx
push rdi
push r13
mov eax, 0x12b0
call fcn.180080740
sub rsp, rax
mov rax, qword [0x1800f0028]
xor rax, rsp
mov qword [rsp + 0x1290], rax
mov rax, qword gs:[0x58]
xor r13d, r13d
mov ecx, dword [0x1801dd2e8]
movzx edi, r8b
mov edx, 4
mov rbx, qword [rax + rcx*8]
add rbx, rdx
mov eax, dword [rbx]
cmp dword [0x1801e399c], eax
jle 0x180039b0b
lea rcx, [0x1801e399c]
call fcn.18007f700
cmp dword [0x1801e399c], 0xffffffff
jne 0x180039b0b
lea rcx, [0x180082d30]
mov qword [0x1801e1948], r13
mov qword [0x1801e1950], r13
call fcn.18007fae0
lea rcx, [0x1801e399c]
call fcn.18007f694
mov eax, dword [rbx]
cmp dword [0x1801ea7e0], eax
jle 0x180039b50
lea rcx, [0x1801ea7e0]
call fcn.18007f700
cmp dword [0x1801ea7e0], 0xffffffff
jne 0x180039b50
lea rcx, [0x180082d00]
mov qword [0x1801e1958], r13
mov qword [0x1801e1960], r13
call fcn.18007fae0
lea rcx, [0x1801ea7e0]
call fcn.18007f694
mov eax, dword [rbx]
cmp dword [0x1801e3998], eax
jle 0x180039b95
lea rcx, [0x1801e3998]
call fcn.18007f700
cmp dword [0x1801e3998], 0xffffffff
jne 0x180039b95
lea rcx, [0x180082cd0]
mov qword [0x1801e3980], r13
mov qword [0x1801e3988], r13
call fcn.18007fae0
lea rcx, [0x1801e3998]
call fcn.18007f694
cmp byte [0x1801de728], r13b
lea rax, [0x1801e1958]
mov qword [0x1801de638], rax
lea rax, [0x1801de644]
mov qword [0x1801de720], rax
mov qword [rsp + 0x12e0], r12
je 0x180039bd3
test dil, dil
jne 0x180039bd3
lea rax, [0x1801e1948]
jmp 0x18003a1ec
mov rcx, qword [0x1801e1950]
mov qword [rsp + 0x12d0], rbp
mov qword [rsp + 0x12a8], r14
mov qword [rsp + 0x12a0], r15
mov byte [0x1801de728], 1
test rcx, rcx
je 0x180039c24
mov rax, qword [0x1801dd320]
mov qword [0x1801e1948], r13
test rax, rax
je 0x180039c17
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [0x1801e1950], r13
mov rcx, qword [0x1801e1960]
test rcx, rcx
je 0x180039c56
mov rax, qword [0x1801dd320]
mov qword [0x1801e1958], r13
test rax, rax
je 0x180039c49
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [0x1801e1960], r13
xor edx, edx
mov qword [rsp + 0x12d8], rsi
mov r8d, 0xffc
mov dword [rsp + 0x290], 0x2f3a43
lea rcx, [rsp + 0x294]
call sub.VCRUNTIME140.dll_memset
cmp byte [rsp + 0x290], 0x5a
jg 0x180039d17
mov edi, 0xf000
mov esi, 0x4000
nop word [rax + rax]
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x290]
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__stat64i32]
cmp eax, 0xffffffff
je 0x180039d02
movzx eax, word [rsp + 0x56]
and ax, di
cmp ax, si
jne 0x180039d02
movsxd rbx, dword [0x1801e3980]
lea rcx, [0x1801e3980]
lea edx, [rbx + 1]
call fcn.18003faa0
mov rax, rbx
lea rdx, [rsp + 0x290]
shl rax, 0xc
add rax, qword [0x1801e3988]
movzx ecx, byte [rdx]
lea rdx, [rdx + 1]
mov byte [rax], cl
lea rax, [rax + 1]
test cl, cl
jne 0x180039cf1
movzx eax, byte [rsp + 0x290]
inc al
mov byte [rsp + 0x290], al
cmp al, 0x5a
jle 0x180039ca0
mov eax, dword [0x1801e3980]
lea ebx, [rax + 7]
cmp ebx, dword [0x1801e194c]
jle 0x180039da0
mov rax, qword [0x1801dd320]
test rax, rax
je 0x180039d3a
inc dword [rax + 0xec]
movsxd rcx, ebx
shl rcx, 0xc
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rdx, qword [0x1801e1950]
mov rdi, rax
test rdx, rdx
je 0x180039d8d
movsxd r8, dword [0x1801e1948]
mov rcx, rax
shl r8, 0xc
call sub.VCRUNTIME140.dll_memcpy
mov rcx, qword [0x1801e1950]
test rcx, rcx
je 0x180039d87
mov rax, qword [0x1801dd320]
test rax, rax
je 0x180039d87
dec dword [rax + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, dword [0x1801e3980]
mov qword [0x1801e1950], rdi
mov dword [0x1801e194c], ebx
lea ebx, [rax + 7]
cmp ebx, dword [0x1801e195c]
jle 0x180039e23
mov rax, qword [0x1801dd320]
test rax, rax
je 0x180039dbd
inc dword [rax + 0xec]
movsxd rax, ebx
imul rcx, rax, 0x410
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rdx, qword [0x1801e1960]
mov rdi, rax
test rdx, rdx
je 0x180039e16
movsxd rcx, dword [0x1801e1958]
imul r8, rcx, 0x410
mov rcx, rax
call sub.VCRUNTIME140.dll_memcpy
mov rcx, qword [0x1801e1960]
test rcx, rcx
je 0x180039e10
mov rdx, qword [0x1801dd320]
test rdx, rdx
je 0x180039e10
dec dword [rdx + 0xec]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [0x1801e1960], rdi
mov dword [0x1801e195c], ebx
lea r15, str.Desktop
lea r14, [0x1800dff18]
lea rbp, [0x1800dff34]
lea rdi, [0x1801e1970]
lea r12, [0x1801e1948]
mov edx, dword [r14]
lea r8, [rsp + 0x40]
xor ecx, ecx
mov word [rsp + 0x80], r13w
mov qword [rsp + 0x40], r13
call qword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
js 0x18003a02a
mov rcx, qword [rsp + 0x40]
lea rdx, [rsp + 0x80]
call qword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
lea rcx, [rsp + 0x48]
mov qword [rsp + 0x48], r13
mov ebx, eax
shr ebx, 0x1f
xor bl, 1
call qword [sym.imp.SHELL32.dll_SHGetMalloc]
cmp eax, 0x80004005
je 0x180039ec0
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x180039ec0
mov rax, qword [rcx]
mov rdx, qword [rsp + 0x40]
call qword [rax + 0x28]
mov rcx, qword [rsp + 0x48]
mov rax, qword [rcx]
call qword [rax + 0x10]
jmp 0x180039ecb
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
test bl, bl
je 0x18003a02a
mov qword [rsp + 0x38], r13
lea r8, [rsp + 0x80]
mov qword [rsp + 0x30], r13
mov r9d, 0xffffffff
mov dword [rsp + 0x28], r13d
xor edx, edx
mov ecx, 0xfde9
mov qword [rsp + 0x20], r13
mov byte [0x1801e1970], r13b
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov qword [rsp + 0x38], r13
lea r8, [rsp + 0x80]
mov qword [rsp + 0x30], r13
mov r9d, 0xffffffff
mov dword [rsp + 0x28], eax
xor edx, edx
mov ecx, 0xfde9
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
movsxd rbx, dword [0x1801e1948]
mov rcx, r12
lea edx, [rbx + 1]
call fcn.18003faa0
mov rcx, rbx
mov rdx, rdi
shl rcx, 0xc
add rcx, qword [0x1801e1950]
nop word [rax + rax]
movzx eax, byte [rdx]
lea rdx, [rdx + 1]
mov byte [rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x180039f60
mov ebx, dword [0x1801e1958]
mov ecx, dword [0x1801e195c]
mov rsi, qword [r15]
cmp ebx, ecx
jne 0x180039fb9
inc ebx
test ecx, ecx
je 0x180039f95
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
add eax, ecx
jmp 0x180039f9a
mov eax, 8
cmp eax, ebx
lea rcx, [0x1801e1958]
cmovg ebx, eax
mov edx, ebx
call fcn.18003fb80
mov ecx, dword [0x1801e195c]
mov ebx, dword [0x1801e1958]
lea edi, [rbx + 1]
cmp edi, ecx
jle 0x180039fe7
test ecx, ecx
je 0x180039fcf
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
add eax, ecx
jmp 0x180039fd4
mov eax, 8
cmp eax, edi
lea rcx, [0x1801e1958]
mov edx, edi
cmovg edx, eax
call fcn.18003fb80
test rsi, rsi
movsxd rax, ebx
lea rcx, [0x1800dfb04]
mov dword [0x1801e1958], edi
cmovne rcx, rsi
imul rdx, rax, 0x410
add rdx, qword [0x1801e1960]
nop dword [rax]
movzx eax, byte [rcx]
lea rcx, [rcx + 1]
mov byte [rdx], al
lea rdx, [rdx + 1]
test al, al
jne 0x18003a010
lea rdi, [0x1801e1970]
jmp 0x18003a033
mov word [rsp + 0x80], r13w
add r14, 4
add r15, 8
cmp r14, rbp
jl 0x180039e46
mov eax, dword [0x1801e3980]
mov edi, dword [0x1801e1948]
mov dword [0x1801de644], edi
test eax, eax
jle 0x18003a1c9
mov rsi, r13
lea r14, [0x1801e0140]
mov ebp, eax
nop word [rax + rax]
mov rbx, qword [0x1801e3988]
lea edx, [rdi + 1]
mov rcx, r12
call fcn.18003faa0
add rbx, rsi
movsxd rcx, edi
lea rdx, [0x1800dfb04]
cmovne rdx, rbx
shl rcx, 0xc
add rcx, qword [0x1801e1950]
nop
movzx eax, byte [rdx]
lea rdx, [rdx + 1]
mov byte [rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x18003a0a0
mov rcx, 0xffffffffffffffff
nop dword [rax + rax]
inc rcx
cmp byte [rbx + rcx], r13b
jne 0x18003a0c0
dec ecx
mov eax, r13d
test rbx, rbx
cmovne eax, ecx
test eax, eax
jns 0x18003a0e9
mov rax, 0xffffffffffffffff
nop
inc rax
cmp byte [rbx + rax], r13b
jne 0x18003a0e0
movsxd rdi, eax
test eax, eax
jle 0x18003a0ff
mov r8, rdi
mov rdx, rbx
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
mov ebx, dword [0x1801e1958]
mov ecx, dword [0x1801e195c]
mov byte [rdi + r14], r13b
cmp ebx, ecx
jne 0x18003a14d
inc ebx
test ecx, ecx
je 0x18003a124
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
add eax, ecx
jmp 0x18003a129
mov eax, 8
cmp eax, ebx
lea r15, [0x1801e1958]
mov rcx, r15
cmovg ebx, eax
mov edx, ebx
call fcn.18003fb80
mov ecx, dword [0x1801e195c]
mov ebx, dword [0x1801e1958]
jmp 0x18003a154
lea r15, [0x1801e1958]
lea edi, [rbx + 1]
cmp edi, ecx
jle 0x18003a17e
test ecx, ecx
je 0x18003a16a
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
add eax, ecx
jmp 0x18003a16f
mov eax, 8
cmp eax, edi
mov edx, edi
mov rcx, r15
cmovg edx, eax
call fcn.18003fb80
movsxd rax, ebx
mov rdx, r14
imul rcx, rax, 0x410
mov dword [0x1801e1958], edi
add rcx, qword [0x1801e1960]
nop dword [rax + rax]
movzx eax, byte [rdx]
lea rdx, [rdx + 1]
mov byte [rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x18003a1a0
add rsi, 0x1000
sub rbp, 1
je 0x18003a1c9
mov edi, dword [0x1801e1948]
jmp 0x18003a070
mov rsi, qword [rsp + 0x12d8]
mov rax, r12
mov r14, qword [rsp + 0x12a8]
mov rbp, qword [rsp + 0x12d0]
mov r15, qword [rsp + 0x12a0]
mov r12, qword [rsp + 0x12e0]
mov rcx, qword [rsp + 0x1290]
xor rcx, rsp
call fcn.18007f5c0
add rsp, 0x12b0
pop r13
pop rdi
pop rbx
ret