Function at 0x566470
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5786e4
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push esi
push edi
mov eax, dword [0x5d52e0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push ebx
mov ecx, 0xa0009
lea edi, [ebp - 0x18]
call fcn.00530ca0
add esp, 4
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x566688
call fcn.0040c84f
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x5664db
push 0x80004005
call fcn.004010a0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea edi, [eax + 0x10]
mov dword [ebp - 0x14], edi
mov byte [ebp - 4], 1
mov eax, dword [edi - 8]
mov ecx, 1
sub ecx, dword [edi - 4]
sub eax, 0x104
or eax, ecx
jge 0x566512
push 0x104
lea ecx, [ebp - 0x14]
call fcn.004019b0
mov edi, dword [ebp - 0x14]
push edi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov eax, dword [edi - 8]
push eax
push edi
call fcn.004ff818
add esp, 8
test eax, eax
js 0x5666d1
cmp eax, dword [edi - 8]
jg 0x5666d1
xor ecx, ecx
mov dword [edi - 0xc], eax
mov word [edi + eax*2], cx
call fcn.0040c84f
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x56655f
push 0x80004005
call fcn.004010a0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x10], esi
mov byte [ebp - 4], 2
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x566596
push 0x104
lea ecx, [ebp - 0x10]
call fcn.004019b0
mov esi, dword [ebp - 0x10]
push 0x104
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
mov eax, dword [esi - 8]
push eax
push esi
call fcn.004ff818
add esp, 8
test eax, eax
js 0x5666d1
cmp eax, dword [esi - 8]
jg 0x5666d1
mov dword [esi - 0xc], eax
xor ecx, ecx
mov word [esi + eax*2], cx
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x5665ee
push 0x104
lea ecx, [ebp - 0x10]
call fcn.004019b0
mov esi, dword [ebp - 0x10]
push esi
call dword [sym.imp.SHLWAPI.dll_PathRemoveBackslashW]
mov eax, dword [esi - 8]
push eax
push esi
call fcn.004ff818
add esp, 8
test eax, eax
js 0x5666d1
cmp eax, dword [esi - 8]
jg 0x5666d1
xor edx, edx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], dx
xor eax, eax
cmp ebx, 0x9fbf1
jne 0x566629
lea eax, [edx + 1]
mov edx, dword [0x5dd53c]
test edx, edx
je 0x566648
mov ecx, dword [esi - 0xc]
mov eax, dword [eax*4 + 0x5dd9a0]
inc ecx
push ecx
push esi
push 0xa0009
push eax
call edx
lea eax, [esi - 0x10]
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x566668
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x566688
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
cmp ebx, 0x9fbf1
jne 0x566697
mov eax, 1
mov ecx, dword [0x5dd530]
test ecx, ecx
je 0x566713
mov edx, dword [eax*4 + 0x5dd9a0]
push 0x50000
push edx
call ecx
test eax, eax
jns 0x566713
xor eax, eax
cmp ebx, 0x9fbf1
jne 0x5666c3
mov eax, 1
mov ecx, dword [0x5dd530]
test ecx, ecx
jne 0x5666db
xor eax, eax
jmp 0x5666ea
push 0x80070057
call fcn.004010a0
mov eax, dword [eax*4 + 0x5dd9a0]
push 0x10001
push eax
call ecx
xor ecx, ecx
cmp ebx, 0x9fbf1
jne 0x5666f9
mov ecx, 1
mov edx, dword [0x5dd534]
test edx, edx
je 0x566713
mov ecx, dword [ecx*4 + 0x5dd9a0]
push eax
push 0x50000
push ecx
call edx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x566739
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret