Function at 0x4be200
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x4e9bef
mov eax, dword fs:[0]
push eax
sub esp, 0x248
mov eax, dword [0x64a000]
xor eax, esp
mov dword [esp + 0x244], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x64a000]
xor eax, esp
push eax
lea eax, [esp + 0x25c]
mov dword fs:[0], eax
mov esi, dword [esp + 0x26c]
mov edi, dword [esp + 0x270]
mov dword [esp + 0x3c], 0
mov dword [esp + 0x4c], esi
mov dword [esi], 0x51a640
lea eax, [edi - 9]
mov dword [esp + 0x264], 0
or ebp, 0xffffffff
mov dword [esp + 0x3c], 1
cmp eax, 9
ja case.0x4be284.10
movzx eax, byte [eax + 0x4be57c]
jmp dword [eax*4 + 0x4be574]
xor eax, eax
cmp edi, 0x11
push 0
setne al
lea eax, [eax*2 + 0x1a]
push eax
lea eax, [esp + 0x58]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je case.0x4be284.10
lea eax, [esp + 0x50]
push eax
lea eax, [esp + 0x1c]
push eax
call fcn.004be160
add esp, 8
mov dword [esp + 0x264], 1
cmp edi, 0xb
je 0x4be3b3
cmp edi, 0x10
je 0x4be3b3
lea eax, [esp + 0x30]
push eax
call fcn.004228b0
add esp, 4
lea ecx, [esp + 0x30]
mov eax, dword [eax]
cmp dword [eax + 4], 0
setne bl
call fcn.00467a00
test bl, bl
je 0x4be34a
lea eax, [esp + 0x40]
push eax
call fcn.004228b0
mov dword [esp + 0x28], eax
lea ecx, [esp + 0x1a]
lea eax, [esp + 0x24]
mov byte [esp + 0x268], 2
push eax
lea eax, [esp + 0x20]
mov byte [esp + 0x1e], 0x2f
push eax
mov dword [esp + 0x2c], ecx
call fcn.00465080
add esp, 0xc
mov byte [esp + 0x264], 1
lea ecx, [esp + 0x40]
call fcn.00467a00
lea eax, [esp + 0x38]
push eax
call fcn.00421a10
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 0x4be3b3
lea eax, [esp + 0x34]
push eax
call fcn.00421a10
mov dword [esp + 0x28], eax
lea ecx, [esp + 0x1b]
lea eax, [esp + 0x24]
mov byte [esp + 0x268], 3
push eax
lea eax, [esp + 0x20]
mov byte [esp + 0x1f], 0x2f
push eax
mov dword [esp + 0x2c], ecx
call fcn.00465080
add esp, 0xc
mov byte [esp + 0x264], 1
lea ecx, [esp + 0x34]
call fcn.00467a00
lea eax, [esp + 0x18]
mov ecx, esi
push eax
call fcn.00401af0
cmp edi, 0xb
je 0x4be4c7
lea eax, [esp + 0x2c]
push eax
call fcn.004216f0
add esp, 4
push eax
mov ecx, esi
mov byte [esp + 0x268], 4
call fcn.00401af0
mov eax, dword [esp + 0x2c]
mov byte [esp + 0x264], 1
mov ecx, dword [eax]
test ecx, ecx
je 0x4be40d
cmp ecx, 0xffffffff
je 0x4be41a
mov ecx, ebp
lock xadd dword [eax], ecx
setne al
test al, al
jne 0x4be41a
mov eax, dword [esp + 0x2c]
push 4
push 2
push eax
call fcn.00413640
add esp, 0xc
lea eax, [esp + 0x1c]
push eax
call fcn.004216f0
add esp, 4
mov dword [esp + 0x20], eax
lea ecx, [esp + 0x20]
lea eax, [esp + 0x44]
mov byte [esp + 0x264], 5
mov dword [esp + 0x24], eax
lea eax, [esp + 0x28]
push eax
mov dword [esp + 0x48], 5
mov dword [esp + 0x4c], str._data
call fcn.0046f450
lea eax, [esp + 0x28]
mov byte [esp + 0x264], 6
push eax
mov ecx, esi
call fcn.00401af0
mov eax, dword [esp + 0x28]
mov ecx, dword [eax]
test ecx, ecx
je 0x4be48d
cmp ecx, 0xffffffff
je 0x4be49a
mov ecx, ebp
lock xadd dword [eax], ecx
setne al
test al, al
jne 0x4be49a
mov eax, dword [esp + 0x28]
push 4
push 2
push eax
call fcn.00413640
add esp, 0xc
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax]
test ecx, ecx
je 0x4be4ba
cmp ecx, 0xffffffff
je 0x4be4c7
mov ecx, ebp
lock xadd dword [eax], ecx
setne al
test al, al
jne 0x4be4c7
mov eax, dword [esp + 0x1c]
push 4
push 2
push eax
call fcn.00413640
add esp, 0xc
mov eax, dword [esp + 0x18]
mov byte [esp + 0x264], 0
mov ecx, dword [eax]
test ecx, ecx
je 0x4be4ef
cmp ecx, 0xffffffff
je case.0x4be284.10
mov ecx, ebp
lock xadd dword [eax], ecx
setne al
test al, al
jne case.0x4be284.10
mov eax, dword [esp + 0x18]
push 4
push 2
push eax
call fcn.00413640
add esp, 0xc
lea eax, [esp + 0x1c]
push edi
push eax
call fcn.004be590
add esp, 8
lea eax, [esp + 0x1c]
mov dword [esp + 0x264], 7
push eax
mov ecx, esi
call fcn.00422a90
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx]
test eax, eax
je 0x4be53c
cmp eax, 0xffffffff
je 0x4be549
lock xadd dword [ecx], ebp
dec ebp
setne dl
test dl, dl
jne 0x4be549
push 4
push 2
push ecx
call fcn.00413640
add esp, 0xc
mov eax, esi
mov ecx, dword [esp + 0x25c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x244]
xor ecx, esp
call fcn.004c17c4
add esp, 0x254
ret