Function at 0x18001d880
Capabilities:
Get common file path

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x2540
call fcn.180083120
sub rsp, rax
mov qword [rsp + 0x60], 0xfffffffffffffffe
mov qword [rsp + 0x2590], rbx
mov rax, qword [0x1800ac2b8]
xor rax, rsp
mov qword [rsp + 0x2530], rax
mov r12, r8
mov r13, rdx
mov rdi, rcx
mov qword [rsp + 0x88], 7
xor ebx, ebx
mov qword [rsp + 0x80], rbx
mov word [rsp + 0x70], bx
mov rcx, qword [rcx + 0x80]
sub rcx, qword [rdi + 0x78]
movabs r15, 0x6666666666666667
mov rax, r15
imul rcx
sar rdx, 4
mov rax, rdx
shr rax, 0x3f
add rdx, rax
test edx, edx
jle 0x18001d9a0
movsxd r14, edx
mov rsi, rbx
nop word [rax + rax]
mov rax, qword [rdi + 0xb0]
sub rax, qword [rdi + 0xa8]
sar rax, 2
cmp rbx, rax
jb 0x18001d93c
call fcn.1800610c8
mov rax, qword [rdi + 0xa8]
test byte [rax + rbx*4], 2
je 0x18001d994
mov rcx, qword [rdi + 0x80]
sub rcx, qword [rdi + 0x78]
mov rax, r15
imul rcx
sar rdx, 4
mov rax, rdx
shr rax, 0x3f
add rdx, rax
cmp rbx, rdx
jb 0x18001d972
call fcn.1800610c8
mov rax, qword [rdi + 0x78]
cmp qword [rsi + rax + 0x20], 8
jb 0x18001d985
mov rdx, qword [rsi + rax + 8]
jmp 0x18001d98a
lea rdx, [rsi + rax + 8]
lea rcx, [rsp + 0x68]
call fcn.18001d140
inc rbx
add rsi, 0x28
cmp rbx, r14
jl 0x18001d920
lea r9, str._anf
mov r8d, 2
lea rdx, [rsp + 0x68]
mov rcx, rdi
call fcn.18001d330
test eax, eax
jne 0x18001d9dc
cmp qword [rsp + 0x88], 8
jb 0x18001ddd3
mov rcx, qword [rsp + 0x70]
call fcn.18005eeb4
jmp 0x18001ddd3
cmp r12, 0x10
jg 0x18001dbfb
cmp r12, 0x10
je 0x18001dbac
cmp r12, 2
je 0x18001dd7c
cmp r12, 4
je 0x18001db83
cmp r12, 8
jne 0x18001ddbe
cmp qword [rdi + 0x28], r12
jb 0x18001da1a
mov rdx, qword [rdi + 0x10]
jmp 0x18001da1e
lea rdx, [rdi + 0x10]
lea rcx, [rsp + 0x1320]
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
xor edx, edx
lea rcx, [rdi + 0x60]
call fcn.180022c00
cmp qword [rax + 0x20], 8
jb 0x18001da44
mov rcx, qword [rax + 8]
jmp 0x18001da48
lea rcx, [rax + 8]
mov qword [rsp + 0x40], 0x104
lea rax, [rsp + 0x8d0]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], 0x104
lea rax, [rsp + 0x4b0]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0x104
lea r9, [rsp + 0x1110]
mov r8d, 0x104
lea rdx, [rsp + 0xcf0]
call fcn.18006233c
mov rdx, qword [rdi + 0x338]
lea rcx, [rsp + 0x1320]
call qword [sym.imp.SHLWAPI.dll_PathAppendW]
lea rdx, [rsp + 0x70]
cmp qword [rsp + 0x88], 8
cmovae rdx, qword [rsp + 0x70]
mov rcx, r13
call fcn.18001d140
lea rcx, case.0x180034a3c.6
mov rax, qword [case.0x180034a3c.6]
call qword [rax + Ordinal_26]
add rax, 0x18
mov qword [rsp + 0x50], rax
mov r8d, 0x104
lea rdx, [rsp + 0x1320]
lea rcx, [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_lstrcpynW]
lea rcx, [rsp + 0x90]
call qword [sym.imp.SHLWAPI.dll_PathRemoveBackslashW]
lea r8, [rsp + 0x90]
lea rdx, [0x18008c738]
lea rcx, [rsp + 0x50]
call fcn.180011550
mov r8d, 1
lea rdx, [0x18008c674]
mov rcx, r13
call fcn.180019270
xor eax, eax
or rsi, 0xffffffffffffffff
mov rcx, rsi
mov rbx, qword [rsp + 0x50]
mov rdi, rbx
repne scasw ax, word [rdi]
not rcx
lea r8, [rcx - 1]
mov rdx, rbx
mov rcx, r13
call fcn.180019270
nop
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], esi
dec esi
test esi, esi
jg 0x18001ddbe
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + ioctlsocket]
jmp 0x18001ddbe
cmp qword [rdi + 0x28], 8
jb 0x18001db90
mov r8, qword [rdi + 0x10]
jmp 0x18001db94
lea r8, [rdi + 0x10]
mov r9d, 1
lea rdx, [rsp + 0x68]
mov rcx, r13
call fcn.18001d640
jmp 0x18001ddbe
lea r8, [rdi + 0x124]
cmp word [r8], 0
je 0x18001dbd2
mov r9d, 1
lea rdx, [rsp + 0x68]
mov rcx, r13
call fcn.18001d640
jmp 0x18001ddbe
cmp qword [rdi + 0x28], 8
jb 0x18001dbdf
mov r8, qword [rdi + 0x10]
jmp 0x18001dbe3
lea r8, [rdi + 0x10]
mov r9d, 1
lea rdx, [rsp + 0x68]
mov rcx, r13
call fcn.18001d640
jmp 0x18001ddbe
cmp r12, 0x200
je 0x18001dd7c
cmp r12, 0x1000
jne 0x18001ddbe
xor r9d, r9d
lea r8d, [r9 + 0x10]
lea rdx, [rsp + 0x1d30]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
xor edx, edx
lea rcx, [rdi + 0x60]
call fcn.180022c00
cmp qword [rax + 0x20], 8
jb 0x18001dc44
mov rcx, qword [rax + 8]
jmp 0x18001dc48
lea rcx, [rax + 8]
mov qword [rsp + 0x40], 0x104
lea rax, [rsp + 0x1b20]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], 0x104
lea rax, [rsp + 0x6c0]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0x104
lea r9, [rsp + 0xae0]
mov r8d, 0x104
lea rdx, [rsp + 0xf00]
call fcn.18006233c
mov rdx, qword [rdi + 0x338]
lea rcx, [rsp + 0x1d30]
call qword [sym.imp.SHLWAPI.dll_PathAppendW]
lea rdx, [rsp + 0x70]
cmp qword [rsp + 0x88], 8
cmovae rdx, qword [rsp + 0x70]
mov rcx, r13
call fcn.18001d140
lea rcx, case.0x180034a3c.6
mov rax, qword [case.0x180034a3c.6]
call qword [rax + Ordinal_26]
add rax, 0x18
mov qword [rsp + 0x58], rax
mov r8d, 0x104
lea rdx, [rsp + 0x1d30]
lea rcx, [rsp + 0x2a0]
call qword [sym.imp.KERNEL32.dll_lstrcpynW]
lea rcx, [rsp + 0x2a0]
call qword [sym.imp.SHLWAPI.dll_PathRemoveBackslashW]
lea r8, [rsp + 0x2a0]
lea rdx, [0x18008c738]
lea rcx, [rsp + 0x58]
call fcn.180011550
mov r8d, 1
lea rdx, [0x18008c674]
mov rcx, r13
call fcn.180019270
xor eax, eax
or rsi, 0xffffffffffffffff
mov rcx, rsi
mov rbx, qword [rsp + 0x58]
mov rdi, rbx
repne scasw ax, word [rdi]
not rcx
lea r8, [rcx - 1]
mov rdx, rbx
mov rcx, r13
call fcn.180019270
nop
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], esi
dec esi
test esi, esi
jg 0x18001ddbe
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + ioctlsocket]
jmp 0x18001ddbe
lea r8, [rdi + 0x124]
cmp word [r8], 0
je 0x18001dd9c
xor r9d, r9d
lea rdx, [rsp + 0x68]
mov rcx, r13
call fcn.18001d640
jmp 0x18001ddbe
cmp qword [rdi + 0x28], 8
jb 0x18001dda9
mov r8, qword [rdi + 0x10]
jmp 0x18001ddad
lea r8, [rdi + 0x10]
xor r9d, r9d
lea rdx, [rsp + 0x68]
mov rcx, r13
call fcn.18001d640
nop
cmp qword [rsp + 0x88], 8
jb 0x18001ddd3
mov rcx, qword [rsp + 0x70]
call fcn.18005eeb4
mov rcx, qword [rsp + 0x2530]
xor rcx, rsp
call fcn.18005f4d0
mov rbx, qword [rsp + 0x2590]
add rsp, 0x2540
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret