Function at 0x140049860
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x2f0]
sub rsp, 0x3f0
mov r14, rcx
xor eax, eax
mov dword [rsp + 0x30], eax
mov qword [rcx], rax
mov qword [rcx + 8], rax
mov qword [rcx + 0x10], rax
mov dword [rsp + 0x30], 1
lea rax, [rbp + 0x1e0]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 0x1c]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetFolderPathA]
movabs r13, 0x3ae2c5ec7d41c09f
movabs r12, 0xc94621f1bea2a8e0
xorps xmm1, xmm1
mov r15, 0xffffffffffffffff
mov r8, r15
test eax, eax
js 0x140049913
xorps xmm0, xmm0
movups xmmword [rsp + 0x60], xmm0
movdqu xmmword [rsp + 0x70], xmm1
lea rax, [rbp + 0x1e0]
nop dword [rax + rax]
inc r8
cmp byte [rax + r8], 0
jne 0x140049900
lea rdx, [rbp + 0x1e0]
jmp 0x140049992
mov qword [rbp + 0x338], r13
mov rax, qword [rbp + 0x338]
mov qword [rbp - 0x80], rax
mov qword [rbp + 0x338], r12
mov rax, qword [rbp + 0x338]
mov qword [rbp - 0x78], rax
mov qword [rbp + 0x338], r13
mov rax, qword [rbp + 0x338]
mov qword [rbp + 0x90], rax
mov qword [rbp + 0x338], r12
mov rax, qword [rbp + 0x338]
mov qword [rbp + 0x98], rax
movdqa xmm0, xmmword [rbp - 0x80]
xorps xmm0, xmmword [rbp + 0x90]
movdqa xmmword [rbp - 0x80], xmm0
xorps xmm0, xmm0
movups xmmword [rsp + 0x60], xmm0
movdqu xmmword [rsp + 0x70], xmm1
lea rax, [rbp - 0x80]
inc r8
cmp byte [rax + r8], 0
jne 0x140049984
lea rdx, [rbp - 0x80]
lea rcx, [rsp + 0x60]
call fcn.140020ef0
mov dword [rsp + 0x30], 0x201
mov rax, qword [rsp + 0x60]
lea rdx, [rsp + 0x60]
cmp qword [rsp + 0x78], 0x10
cmovb rax, rdx
mov qword [rbp + 0xa0], rax
mov rax, qword [rsp + 0x70]
mov qword [rbp + 0xa8], rax
xor r8d, r8d
lea rdx, [rbp + 0xa0]
lea rcx, [rbp + 0x160]
call fcn.14002aab0
mov dword [rsp + 0x30], 0x601
mov rdx, qword [rsp + 0x78]
cmp rdx, 0x10
jb 0x140049a29
inc rdx
mov rcx, qword [rsp + 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140049a24
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140049a24
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1401582b8
movdqa xmm0, xmmword [0x1401815a0]
movdqu xmmword [rsp + 0x70], xmm0
mov byte [rsp + 0x60], 0
movabs rax, 0x3ae2c5ec0e26aff3
mov qword [rbp + 0x338], rax
mov rax, qword [rbp + 0x338]
mov qword [rbp - 0x70], rax
mov qword [rbp + 0x338], r12
mov rax, qword [rbp + 0x338]
mov qword [rbp - 0x68], rax
mov qword [rbp + 0x338], r13
mov rax, qword [rbp + 0x338]
mov qword [rbp + 0xb0], rax
mov qword [rbp + 0x338], r12
mov rax, qword [rbp + 0x338]
mov qword [rbp + 0xb8], rax
movdqa xmm0, xmmword [rbp - 0x70]
xorps xmm0, xmmword [rbp + 0xb0]
movdqa xmmword [rbp - 0x70], xmm0
lea rax, [rbp - 0x70]
mov qword [rbp + 0x20], rax
lea rcx, [rbp - 0x70]
mov rax, r15
inc rax
cmp byte [rcx + rax], 0
jne 0x140049ab4
mov qword [rbp + 0x28], rax
xor r8d, r8d
lea rdx, [rbp + 0x20]
lea rcx, [rbp + 0x140]
call fcn.14002aab0
mov dword [rsp + 0x30], 0xe01
movabs rax, 0x3ae2bd831123afcd
mov qword [rbp + 0x338], rax
mov rax, qword [rbp + 0x338]
mov qword [rbp - 0x60], rax
mov qword [rbp + 0x338], r12
mov rax, qword [rbp + 0x338]
mov qword [rbp - 0x58], rax
mov qword [rbp + 0x338], r13
mov rax, qword [rbp + 0x338]
mov qword [rbp + 0x30], rax
mov qword [rbp + 0x338], r12
mov rax, qword [rbp + 0x338]
mov qword [rbp + 0x38], rax
movdqa xmm0, xmmword [rbp - 0x60]
xorps xmm0, xmmword [rbp + 0x30]
movdqa xmmword [rbp - 0x60], xmm0
lea rax, [rbp - 0x60]
mov qword [rbp + 0x40], rax
lea rcx, [rbp - 0x60]
mov rax, r15
nop dword [rax + rax]
inc rax
cmp byte [rcx + rax], 0
jne 0x140049b50
mov qword [rbp + 0x48], rax
xor r8d, r8d
lea rdx, [rbp + 0x40]
lea rcx, [rbp + 0x120]
call fcn.14002aab0
mov ebx, 0x1e01
mov dword [rsp + 0x30], ebx
lea rdx, [rbp + 0x160]
lea rcx, [rbp + 0x100]
call fcn.1400285d0
mov dword [rsp + 0x30], 0x3e01
lea rdx, [rbp + 0x120]
lea rcx, [rbp + 0x100]
call fcn.1400218e0
lea r8, [rbp + 0x140]
lea rdx, [rbp + 0x100]
lea rcx, [rbp + 0x180]
call fcn.140021f20
nop
mov dword [rsp + 0x30], ebx
lea rcx, [rbp + 0x100]
call fcn.140028d40
nop
lea rcx, [rbp + 0x120]
call fcn.140028d40
nop
lea rcx, [rbp + 0x140]
call fcn.140028d40
lea rdx, [rbp + 0x180]
lea rcx, [rsp + 0x40]
call fcn.140022bf0
nop
mov rdi, qword [rsp + 0x48]
test rdi, rdi
je 0x140049c15
lock inc dword [rdi + 8]
mov rdi, qword [rsp + 0x48]
mov ebx, dword [rsp + 0x30]
movaps xmm1, xmmword [rsp + 0x40]
movdqa xmmword [rsp + 0x50], xmm1
xorps xmm0, xmm0
movdqu xmmword [rbp + 0xd0], xmm0
test rdi, rdi
je 0x140049c42
lock inc dword [rdi + 8]
mov rdi, qword [rsp + 0x48]
movaps xmm1, xmmword [rsp + 0x40]
mov ebx, dword [rsp + 0x30]
movdqa xmmword [rbp + 0xe0], xmm1
xorps xmm1, xmm1
movdqu xmmword [rbp + 0xf0], xmm1
test rdi, rdi
je 0x140049c8e
mov eax, r15d
lock xadd dword [rdi + 8], eax
cmp eax, 1
jne 0x140049c85
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax]
mov eax, r15d
lock xadd dword [rdi + 0xc], eax
cmp eax, 1
jne 0x140049c85
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + reloc.WS2_32.dll_htonl]
mov ebx, dword [rsp + 0x30]
mov rdi, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
test rsi, rsi
je 0x140049fae
movabs rdi, 0x3ae2c5ec1a2eacb1
lea rdx, [rbp - 0x30]
mov rcx, rsi
call fcn.1400226b0
mov rax, qword [rbp - 0x30]
mov edx, dword [rbp - 0x28]
test edx, edx
je 0x140049ccc
lea ecx, [rax - 1]
test ecx, 0xfffffff7
jne 0x14004a056
cmp eax, 2
jne 0x140049f01
mov qword [rbp + 0x338], rdi
mov rax, qword [rbp + 0x338]
mov qword [rbp - 0x50], rax
mov qword [rbp + 0x338], r12
mov rax, qword [rbp + 0x338]
mov qword [rbp - 0x48], rax
mov qword [rbp + 0x338], r13
mov rax, qword [rbp + 0x338]
mov qword [rbp + 0x50], rax
mov qword [rbp + 0x338], r12
mov rax, qword [rbp + 0x338]
mov qword [rbp + 0x58], rax
movdqa xmm0, xmmword [rbp - 0x50]
xorps xmm0, xmmword [rbp + 0x50]
movdqa xmmword [rbp - 0x50], xmm0
lea rax, [rbp - 0x50]
mov qword [rbp + 0x60], rax
lea rcx, [rbp - 0x50]
mov rax, r15
nop word [rax + rax]
inc rax
cmp byte [rcx + rax], 0
jne 0x140049d40
mov qword [rbp + 0x68], rax
xor r8d, r8d
lea rdx, [rbp + 0x60]
lea rcx, [rbp]
call fcn.14002aab0
mov ebx, dword [rsp + 0x30]
or ebx, 0x20
or ebx, 2
mov dword [rsp + 0x30], ebx
mov rsi, qword [rsp + 0x50]
lea rdx, [rbp + 0x1c0]
lea rcx, [rsi + 0x20]
call fcn.140021de0
nop
or ebx, 4
mov dword [rsp + 0x30], ebx
lea rcx, [rbp]
cmp qword [rbp + 0x18], 8
cmovae rcx, qword [rbp]
mov qword [rbp + 0x70], rcx
mov rcx, qword [rbp + 0x10]
mov qword [rbp + 0x78], rcx
movaps xmm0, xmmword [rbp + 0x70]
movdqa xmmword [rbp + 0xc0], xmm0
lea rdx, [rbp + 0xc0]
mov rcx, rax
call fcn.140021be0
test eax, eax
jne 0x140049f01
lea rcx, [rsi + 0x20]
cmp qword [rsi + 0x38], 8
jb 0x140049dd4
mov rcx, qword [rsi + 0x20]
mov rax, qword [rsi + 0x30]
lea rsi, [rcx + rax*2]
mov rdi, rsi
mov rdx, rsi
call fcn.1400217b0
cmp rax, rsi
je 0x140049e2b
nop dword [rax]
movzx ecx, word [rax]
cmp cx, 0x5c
je 0x140049dff
cmp cx, 0x2f
jne 0x140049e08
add rax, 2
cmp rax, rsi
jne 0x140049df0
cmp rax, rsi
je 0x140049e2b
nop dword [rax]
lea rdx, [rdi - 2]
movzx ecx, word [rdx]
cmp cx, 0x5c
je 0x140049e2b
cmp cx, 0x2f
je 0x140049e2b
mov rdi, rdx
cmp rax, rdx
jne 0x140049e10
sub rsi, rdi
sar rsi, 1
xorps xmm0, xmm0
movups xmmword [rbp - 0x20], xmm0
xor eax, eax
mov qword [rbp - 0x10], rax
mov qword [rbp - 8], rax
mov r8, rsi
mov rdx, rdi
lea rcx, [rbp - 0x20]
call fcn.140029510
or ebx, 0x1c0
or ebx, 8
mov dword [rsp + 0x30], ebx
lea rdx, [rbp + 0x1a0]
lea rcx, [rbp - 0x20]
call fcn.140021ae0
mov r8, rax
or ebx, 0x10
mov dword [rsp + 0x30], ebx
movabs rax, 0x3ae2b7890420accf
mov qword [rbp + 0x338], rax
mov rcx, qword [rbp + 0x338]
mov qword [rbp - 0x40], rcx
mov qword [rbp + 0x338], r12
mov rcx, qword [rbp + 0x338]
mov qword [rbp - 0x38], rcx
mov qword [rbp + 0x338], r13
mov rcx, qword [rbp + 0x338]
mov qword [rbp + 0x80], rcx
mov qword [rbp + 0x338], r12
mov rax, qword [rbp + 0x338]
mov qword [rbp + 0x88], rax
movdqa xmm0, xmmword [rbp - 0x40]
xorps xmm0, xmmword [rbp + 0x80]
movdqa xmmword [rbp - 0x40], xmm0
lea rdx, [rbp - 0x40]
mov rcx, r8
call fcn.1400286a0
mov rsi, qword [rsp + 0x50]
mov ebx, dword [rsp + 0x30]
cmp rax, 0xffffffffffffffff
je 0x140049f01
mov dil, 1
jmp 0x140049f04
xor dil, dil
test bl, 0x10
je 0x140049f1d
and ebx, 0xffffffef
mov dword [rsp + 0x30], ebx
lea rcx, [rbp + 0x1a0]
call fcn.140020e70
nop
test bl, 8
je 0x140049f33
and ebx, 0xfffffff7
mov dword [rsp + 0x30], ebx
lea rcx, [rbp - 0x20]
call fcn.140028d40
nop
test bl, 4
je 0x140049f4c
and ebx, 0xfffffffb
mov dword [rsp + 0x30], ebx
lea rcx, [rbp + 0x1c0]
call fcn.140028d40
nop
test bl, 2
je 0x140049f61
and ebx, 0xfffffffd
mov dword [rsp + 0x30], ebx
lea rcx, [rbp]
call fcn.140028d40
test dil, dil
je 0x140049f91
lea r8, [rsi + 0x20]
mov rax, qword [r14 + 8]
cmp rax, qword [r14 + 0x10]
je 0x140049f86
mov rdx, r8
mov rcx, rax
call fcn.1400285d0
add qword [r14 + 8], 0x20
jmp 0x140049f91
mov rdx, rax
mov rcx, r14
call fcn.14002a680
lea rcx, [rsp + 0x50]
call fcn.140022d40
mov rsi, qword [rsp + 0x50]
test rsi, rsi
jne 0x140049c9c
mov rdi, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x140049fef
mov eax, r15d
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x140049fea
mov rbx, qword [rsp + 0x58]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
mov eax, r15d
lock xadd dword [rbx + 0xc], eax
cmp eax, 1
jne 0x140049fea
mov rcx, qword [rsp + 0x58]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
mov rdi, qword [rsp + 0x48]
test rdi, rdi
je 0x14004a01f
mov eax, r15d
lock xadd dword [rdi + 8], eax
cmp eax, 1
jne 0x14004a01f
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax]
lock xadd dword [rdi + 0xc], r15d
cmp r15d, 1
jne 0x14004a01f
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + reloc.WS2_32.dll_htonl]
nop
lea rcx, [rbp + 0x180]
call fcn.140028d40
nop
lea rcx, [rbp + 0x160]
call fcn.140028d40
mov rax, r14
mov rbx, qword [rsp + 0x440]
add rsp, 0x3f0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea r8, [rsi + 0x20]
lea rcx, str.directory_entry::status
call fcn.140022630
int3