Function at 0x4be590
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x4e9c70
mov eax, dword fs:[0]
push eax
sub esp, 0x288
mov eax, dword [0x64a000]
xor eax, esp
mov dword [esp + 0x284], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x64a000]
xor eax, esp
push eax
lea eax, [esp + 0x29c]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x2ac]
mov dword [esp + 0x74], 0
mov dword [esp + 0x14], 0x4ed20c
mov eax, dword [0x64eb64]
or edi, 0xffffffff
mov dword [esp + 0x2a4], 0
test al, 1
jne 0x4be66c
or eax, 1
mov dword [0x64eb64], eax
push 7
push str.shell32
mov byte [esp + 0x2ac], 1
call fcn.0041a250
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x2c]
mov byte [esp + 0x2ac], 2
push 0x60cdec
push eax
call fcn.0046cab0
mov dword [0x64eb60], eax
add esp, 0x10
mov eax, dword [esp + 0x24]
mov ecx, dword [eax]
test ecx, ecx
je 0x4be657
cmp ecx, edi
je 0x4be664
mov ecx, edi
lock xadd dword [eax], ecx
setne al
test al, al
jne 0x4be664
mov eax, dword [esp + 0x24]
push 4
push 2
push eax
call fcn.00413640
add esp, 0xc
mov byte [esp + 0x2a4], 0
mov esi, dword [esp + 0x2b0]
cmp esi, 0x12
ja case.default.0x4be67c
jmp dword [esi*4 + 0x4beba4]
xor eax, eax
cmp esi, 0x11
push 0
setne al
lea eax, [eax*2 + 0x1a]
push eax
lea eax, [esp + 0x98]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x4be6d5
lea eax, [esp + 0x90]
push eax
lea eax, [esp + 0x54]
push eax
call fcn.004be160
mov ecx, dword [esp + 0x1c]
mov edx, eax
add esp, 8
mov eax, dword [edx]
mov dword [esp + 0x14], eax
mov dword [edx], ecx
lea ecx, [esp + 0x50]
call fcn.00467a00
call fcn.004a2000
test al, al
je 0x4be6fd
push str._qttest
lea ecx, [esp + 0x8c]
call fcn.004011c0
lea ecx, [esp + 0x14]
push dword [eax + 4]
push dword [eax]
call fcn.00418000
cmp esi, 0xb
je case.default.0x4be67c
cmp esi, 0x10
je case.default.0x4be67c
lea eax, [esp + 0x38]
push eax
call fcn.004228b0
add esp, 4
lea ecx, [esp + 0x38]
mov eax, dword [eax]
cmp dword [eax + 4], 0
setne bl
call fcn.00467a00
test bl, bl
je 0x4be778
lea eax, [esp + 0x60]
push eax
call fcn.004228b0
mov dword [esp + 0x24], eax
lea ecx, [esp + 0x1f]
lea eax, [esp + 0x20]
mov byte [esp + 0x2a8], 3
push eax
lea eax, [esp + 0x1c]
mov byte [esp + 0x23], 0x2f
push eax
mov dword [esp + 0x28], ecx
call fcn.00465080
add esp, 0xc
mov byte [esp + 0x2a4], 0
lea ecx, [esp + 0x60]
call fcn.00467a00
lea eax, [esp + 0x40]
push eax
call fcn.00421a10
add esp, 4
lea ecx, [esp + 0x40]
mov eax, dword [eax]
cmp dword [eax + 4], 0
setne bl
call fcn.00467a00
test bl, bl
je case.default.0x4be67c
lea eax, [esp + 0x70]
push eax
call fcn.00421a10
mov dword [esp + 0x24], eax
lea ecx, [esp + 0x1e]
lea eax, [esp + 0x20]
mov byte [esp + 0x2a8], 4
push eax
lea eax, [esp + 0x1c]
mov byte [esp + 0x22], 0x2f
push eax
mov dword [esp + 0x28], ecx
call fcn.00465080
add esp, 0xc
lea ecx, [esp + 0x70]
jmp 0x4beb38
push 0
push 0x10
lea eax, [esp + 0x98]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je case.default.0x4be67c
lea eax, [esp + 0x90]
push eax
lea eax, [esp + 0x4c]
push eax
call fcn.004be160
mov ecx, dword [esp + 0x1c]
mov edx, eax
add esp, 8
mov eax, dword [edx]
mov dword [esp + 0x14], eax
mov dword [edx], ecx
lea ecx, [esp + 0x48]
jmp 0x4beb38
mov eax, dword [0x64eb60]
test eax, eax
je case.0x4be67c.1
lea ecx, [esp + 0x1c]
push ecx
push 0
push 0
push 0x60cddc
call eax
test eax, eax
jne case.default.0x4be67c
push dword [esp + 0x1c]
lea eax, [esp + 0x70]
push eax
call fcn.004be160
mov ecx, dword [esp + 0x1c]
mov edx, eax
add esp, 8
mov eax, dword [edx]
mov dword [esp + 0x14], eax
mov dword [edx], ecx
lea ecx, [esp + 0x6c]
call fcn.00467a00
push dword [esp + 0x1c]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
jmp case.default.0x4be67c
push 0
push 5
lea eax, [esp + 0x98]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je case.default.0x4be67c
lea eax, [esp + 0x90]
push eax
lea eax, [esp + 0x34]
push eax
call fcn.004be160
mov ecx, dword [esp + 0x1c]
mov edx, eax
add esp, 8
mov eax, dword [edx]
mov dword [esp + 0x14], eax
mov dword [edx], ecx
lea ecx, [esp + 0x30]
jmp 0x4beb38
push 0
push 0x14
lea eax, [esp + 0x98]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je case.default.0x4be67c
lea eax, [esp + 0x90]
push eax
lea eax, [esp + 0x68]
push eax
call fcn.004be160
mov ecx, dword [esp + 0x1c]
mov edx, eax
add esp, 8
mov eax, dword [edx]
mov dword [esp + 0x14], eax
mov dword [edx], ecx
lea ecx, [esp + 0x64]
jmp 0x4beb38
push 0
push 2
lea eax, [esp + 0x98]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je case.default.0x4be67c
lea eax, [esp + 0x90]
push eax
lea eax, [esp + 0x5c]
push eax
call fcn.004be160
mov ecx, dword [esp + 0x1c]
mov edx, eax
add esp, 8
mov eax, dword [edx]
mov dword [esp + 0x14], eax
mov dword [edx], ecx
lea ecx, [esp + 0x58]
jmp 0x4beb38
push 0
push 0xd
lea eax, [esp + 0x98]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je case.default.0x4be67c
lea eax, [esp + 0x90]
push eax
lea eax, [esp + 0x6c]
push eax
call fcn.004be160
mov ecx, dword [esp + 0x1c]
mov edx, eax
add esp, 8
mov eax, dword [edx]
mov dword [esp + 0x14], eax
mov dword [edx], ecx
lea ecx, [esp + 0x68]
jmp 0x4beb38
push 0
push 0xe
lea eax, [esp + 0x98]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je case.default.0x4be67c
lea eax, [esp + 0x90]
push eax
lea eax, [esp + 0x38]
push eax
call fcn.004be160
mov ecx, dword [esp + 0x1c]
mov edx, eax
add esp, 8
mov eax, dword [edx]
mov dword [esp + 0x14], eax
mov dword [edx], ecx
lea ecx, [esp + 0x34]
jmp 0x4beb38
push 0
push 0x27
lea eax, [esp + 0x98]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je case.default.0x4be67c
lea eax, [esp + 0x90]
push eax
lea eax, [esp + 0x40]
push eax
call fcn.004be160
mov ecx, dword [esp + 0x1c]
mov edx, eax
add esp, 8
mov eax, dword [edx]
mov dword [esp + 0x14], eax
mov dword [edx], ecx
lea ecx, [esp + 0x3c]
jmp 0x4beb38
lea eax, [esp + 0x44]
push 9
push eax
call fcn.004be590
add esp, 8
push str._cache
lea ecx, [esp + 0x7c]
mov byte [esp + 0x2a8], 5
mov dword [esp + 0x20], eax
call fcn.004011c0
mov dword [esp + 0x20], eax
lea ecx, [esp + 0x1c]
lea eax, [esp + 0x2c]
push eax
call fcn.0046f450
mov ecx, dword [esp + 0x2c]
mov dword [ebp], ecx
lea ecx, [esp + 0x2c]
mov dword [esp + 0x2c], 0x4ed20c
call fcn.00467a00
lea ecx, [esp + 0x44]
call fcn.00467a00
lea ecx, [esp + 0x14]
call fcn.00467a00
jmp 0x4beb79
lea eax, [esp + 0x4c]
push 0xb
push eax
call fcn.004be590
add esp, 8
push str._cache
lea ecx, [esp + 0x84]
mov byte [esp + 0x2a8], 6
mov dword [esp + 0x20], eax
call fcn.004011c0
mov dword [esp + 0x20], eax
lea ecx, [esp + 0x1c]
lea eax, [esp + 0x28]
push eax
call fcn.0046f450
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x28]
mov dword [ebp], eax
mov dword [esp + 0x28], 0x4ed20c
call fcn.00467a00
lea ecx, [esp + 0x4c]
call fcn.00467a00
lea ecx, [esp + 0x14]
call fcn.00467a00
jmp 0x4beb79
lea eax, [esp + 0x54]
push eax
call fcn.00464740
mov edx, dword [esp + 0x18]
mov ecx, dword [eax]
mov dword [esp + 0x18], ecx
lea ecx, [esp + 0x58]
jmp 0x4beb33
lea eax, [esp + 0x5c]
push eax
call fcn.00464ea0
mov edx, dword [esp + 0x18]
mov ecx, dword [eax]
mov dword [esp + 0x18], ecx
lea ecx, [esp + 0x60]
mov dword [eax], edx
add esp, 4
call fcn.00467a00
mov eax, dword [esp + 0x14]
mov dword [ebp], eax
mov eax, 0x4ed20c
mov ecx, dword [0x4ed20c]
mov dword [esp + 0x14], eax
test ecx, ecx
je 0x4beb6c
cmp ecx, 0xffffffff
je 0x4beb79
lock xadd dword [eax], edi
dec edi
setne al
test al, al
jne 0x4beb79
mov eax, dword [esp + 0x14]
push 4
push 2
push eax
call fcn.00413640
add esp, 0xc
mov eax, ebp
mov ecx, dword [esp + 0x29c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x284]
xor ecx, esp
call fcn.004c17c4
add esp, 0x294
ret