Function at 0x40f570
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4400f9
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x455440]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], 0
mov esi, dword [ebp + 0xc]
lea edi, [esi + 0x38]
mov eax, dword [ecx + edi*4]
lea edi, [ecx + edi*4]
cmp dword [eax - 0xc], 0
je 0x40f5c9
mov esi, dword [ebp + 8]
lea ecx, [eax - 0x10]
mov dword [ebp + 0xc], esi
call fcn.00405c60
add eax, 0x10
mov dword [esi], eax
jmp 0x40f7e9
cmp esi, 0xc
je 0x40f769
cmp esi, 0xf
je 0x40f675
mov eax, dword [ecx + 0x1ec]
xor ebx, ebx
dec eax
je 0x40f5ee
dec eax
jne 0x40f5f5
or ebx, 0xffffffff
jmp 0x40f5f5
call fcn.0040f950
mov ebx, eax
mov eax, dword [edi]
mov ecx, 1
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, 0x104
or eax, ecx
jge 0x40f617
push 0x104
mov ecx, edi
call fcn.00405ed0
push dword [edi]
push 0
push ebx
push esi
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jns 0x40f63b
push eax
push 0x78
mov edx, str.Environment::GetShellFolder
mov ecx, str.environment.cpp
call fcn.0040bca0
push 0xffffffffffffffff
mov ecx, edi
call fcn.0040b630
push dword [edi]
push esi
push str.ShellFolder__d___S
push 0x7b
push str.Environment::GetShellFolder
call fcn.004110a0
mov ecx, dword [edi]
add esp, 0x14
mov esi, dword [ebp + 8]
sub ecx, 0x10
mov dword [ebp + 0xc], esi
call fcn.00405c60
add eax, 0x10
mov dword [esi], eax
jmp 0x40f7e9
push 0x1c
lea eax, [ebp - 0x18]
push eax
call fcn.0040f570
mov dword [ebp - 4], 0xb
push dword [eax]
lea eax, [ebp - 0x14]
push str._sLow
push eax
call fcn.00406b20
add esp, 0xc
mov byte [ebp - 4], 0xc
lea ecx, [ebp + 0xc]
push dword [ebp - 0x14]
call fcn.00405110
mov byte [ebp - 4], 0xb
or ebx, 0xffffffff
mov edx, dword [ebp - 0x14]
mov eax, ebx
add edx, 0xfffffff0
lea ecx, [edx + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x40f6cc
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x10
lea eax, [ebp + 0xc]
push eax
mov ecx, edi
call fcn.00402ab0
mov edi, dword [ebp + 8]
mov dword [ebp - 0x20], edi
mov ecx, dword [eax]
sub ecx, 0x10
call fcn.00405c60
add eax, 0x10
mov dword [edi], eax
mov byte [ebp - 4], 0x10
mov dword [ebp - 0x10], 1
mov byte [ebp - 4], 0xb
lea eax, [ebp + 0xc]
mov dword [ebp - 0x20], eax
mov byte [ebp - 4], 0xb
mov ecx, ebx
mov edx, dword [ebp + 0xc]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40f725
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0
lea eax, [ebp - 0x18]
mov dword [ebp - 0x20], eax
mov dword [ebp - 4], 0
mov esi, dword [ebp - 0x18]
add esi, 0xfffffff0
lea eax, [esi + 0xc]
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jg 0x40f753
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push 0x1c
lea eax, [ebp - 0x1c]
push eax
call fcn.0040f570
mov dword [ebp - 4], 4
mov ecx, edi
push eax
call fcn.00402ab0
mov dword [ebp - 4], 0
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x20], eax
mov dword [ebp - 4], 0
or ecx, 0xffffffff
mov edx, dword [ebp - 0x1c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40f7b4
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push ecx
call fcn.0040fbb0
add esp, 4
test al, al
jne 0x40f7c8
mov ecx, edi
call fcn.0040ce80
push str.Temp
mov ecx, edi
call fcn.0040b5a0
mov ecx, dword [edi]
mov esi, dword [ebp + 8]
sub ecx, 0x10
mov dword [ebp - 0x20], esi
call fcn.00405c60
add eax, 0x10
mov dword [esi], eax
mov dword [ebp - 4], 0
mov dword [ebp - 0x10], 1
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8