Function at 0x1400058d0
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x250
mov rax, qword [0x14002f010]
xor rax, rsp
mov qword [rsp + 0x240], rax
mov r14, rcx
mov qword [rsp + 0x28], rcx
xor edi, edi
mov dword [rsp + 0x24], edi
mov qword [rcx + 8], rdi
mov qword [rcx + 0x10], rdi
lea rax, vtable.CWString.0
mov qword [rcx], rax
mov qword [rcx + 0x28], rdi
mov qword [rcx + 0x30], rdi
lea rax, vtable.CVolMem.0
mov qword [rcx + 0x20], rax
mov qword [rcx + 0x38], rdi
mov qword [rcx + 0x48], rdi
mov qword [rcx + 0x40], rdi
lea r12d, [rdi + 0x40]
mov qword [rcx + 0x18], rdi
mov qword [rcx + 0x50], 0xfe
mov dword [rsp + 0x24], 1
mov word [rsp + 0x30], di
xor r9d, r9d
lea r8d, [rdi + 0x1a]
lea rdx, [rsp + 0x30]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x140005bb5
mov qword [r14 + 0x18], rdi
mov rdx, qword [r14 + 0x38]
test rdx, rdx
je 0x14000598b
mov rax, qword [r14 + 0x20]
lea rcx, [r14 + 0x20]
call qword [rax + 0x18]
mov qword [r14 + 0x38], rdi
mov qword [r14 + 0x48], rdi
mov qword [r14 + 0x40], rdi
mov rbp, 0xffffffffffffffff
cmp word [rsp + 0x30], 0
je 0x1400059e4
lea rcx, [rsp + 0x30]
mov rax, rbp
nop
lea rax, [rax + 1]
cmp word [rcx + rax*2], 0
jne 0x1400059b0
lea rsi, [rax*2 + 2]
test rsi, rsi
jle 0x1400059e4
mov rdx, rsi
lea rcx, [r14 + 0x20]
call fcn.140009f70
mov r8, rsi
lea rdx, [rsp + 0x30]
mov rcx, rax
call fcn.14000fca0
mov rsi, qword [r14 + 0x18]
test rsi, rsi
je 0x1400059fc
mov rax, rbp
inc rax
cmp word [rsi + rax*2], 0
jne 0x1400059f0
jmp 0x140005a0f
mov rax, qword [r14 + 0x48]
test rax, rax
je 0x140005ac5
shr rax, 1
dec rax
test rax, rax
jle 0x140005a3c
test rsi, rsi
je 0x140005a1e
mov rcx, rsi
jmp 0x140005a30
cmp qword [r14 + 0x48], 0
lea rcx, [0x14002a37c]
je 0x140005a30
mov rcx, qword [r14 + 0x38]
cmp word [rcx + rax*2 - 2], 0x5c
je 0x140005bb5
test rsi, rsi
je 0x140005ac5
lea rbp, [rbp + 1]
cmp word [rsi + rbp*2], 0
jne 0x140005a45
lea rbp, [rbp*2 + 2]
mov qword [r14 + 0x48], rdi
cmp qword [r14 + 0x40], rbp
jl 0x140005aa2
cmp rbp, 2
jne 0x140005a78
mov rcx, qword [r14 + 0x38]
movzx eax, word [rsi]
mov word [rcx], ax
add qword [r14 + 0x48], rbp
jmp 0x140005ac1
cmp rbp, 4
jne 0x140005a8c
mov rcx, qword [r14 + 0x38]
mov eax, dword [rsi]
mov dword [rcx], eax
add qword [r14 + 0x48], rbp
jmp 0x140005ac1
cmp rbp, 8
jne 0x140005aa2
mov rcx, qword [r14 + 0x38]
mov rax, qword [rsi]
mov qword [rcx], rax
add qword [r14 + 0x48], rbp
jmp 0x140005ac1
test rbp, rbp
jle 0x140005ac1
mov rdx, rbp
lea rcx, [r14 + 0x20]
call fcn.140009f70
mov r8, rbp
mov rdx, rsi
mov rcx, rax
call fcn.14000fca0
mov qword [r14 + 0x18], rdi
mov rsi, qword [r14 + 0x48]
cmp rsi, 2
jb 0x140005ae3
mov rax, qword [r14 + 0x38]
cmp word [rax + rsi - 2], 0
jne 0x140005ae3
add rsi, 0xfffffffffffffffe
mov qword [r14 + 0x48], rsi
mov dword [rsp + 0x20], 0x5c
mov rdx, qword [r14 + 0x40]
mov rax, rdx
sub rax, rsi
cmp rax, 4
jl 0x140005b10
mov rcx, qword [r14 + 0x38]
mov eax, dword [rsp + 0x20]
mov dword [rsi + rcx], eax
add qword [r14 + 0x48], 4
jmp 0x140005bb5
lea rbp, [rsi + 4]
cmp rbp, rsi
jne 0x140005b22
mov rdi, qword [r14 + 0x38]
jmp 0x140005bae
mov rcx, qword [r14 + 0x38]
test rbp, rbp
jne 0x140005b4c
test rcx, rcx
je 0x140005b3e
mov rax, qword [r14 + 0x20]
mov rdx, rcx
lea rcx, [r14 + 0x20]
call qword [rax + 0x18]
mov qword [r14 + 0x38], rdi
mov qword [r14 + 0x48], rdi
mov qword [r14 + 0x40], rdi
jmp 0x140005bae
test rcx, rcx
jne 0x140005b5f
mov rdx, rbp
lea rcx, [r14 + 0x20]
call fcn.140009ef0
jmp 0x140005bab
mov r15, qword [r14 + 0x50]
test r15, r15
cmovle r15, r12
cmp rdx, rbp
jl 0x140005b80
sub rdx, rbp
cmp rdx, r15
jg 0x140005b80
mov qword [r14 + 0x48], rbp
mov rdi, rcx
jmp 0x140005bae
mov rax, rbp
cqo
idiv r15
sub r15, rdx
add r15, rbp
mov rax, qword [r14 + 0x20]
mov r8, r15
mov rdx, rcx
lea rcx, [r14 + 0x20]
call qword [rax + 0x10]
mov qword [r14 + 0x38], rax
mov qword [r14 + 0x40], r15
mov qword [r14 + 0x48], rbp
mov rdi, rax
mov eax, dword [rsp + 0x20]
mov dword [rdi + rsi], eax
mov rax, r14
mov rcx, qword [rsp + 0x240]
xor rcx, rsp
call fcn.14000b8f0
lea r11, [rsp + 0x250]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret