Function at 0x408860
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x542017
mov eax, dword fs:[0]
push eax
mov eax, 0x2c30
call fcn.005194d0
mov eax, dword [0x594ca8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea ebx, [ebp - 0x2c1c]
call fcn.00407aa0
xor ebx, ebx
mov dword [ebp - 4], ebx
mov eax, dword [ebp - 0x2c1c]
mov ecx, 0x5704e4
lea ecx, [ecx]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4088d6
cmp dx, bx
je 0x4088d2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4088d6
add eax, 4
add ecx, 4
cmp dx, bx
jne 0x4088b0
xor eax, eax
jmp 0x4088db
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
setne al
cmp al, bl
je 0x408901
push ecx
lea eax, [ebp - 0x2c1c]
mov dword [ebp - 0x2c18], esp
mov ecx, esp
push eax
call fcn.00404900
call fcn.00402330
add esp, 4
cmp dword [ebp + 8], ebx
jne 0x408b7c
push 0x27ff
lea ecx, [ebp - 0x2c0f]
push ebx
push ecx
mov byte [ebp - 0x2c10], bl
call fcn.00518ea0
push 0x3ff
lea edx, [ebp - 0x40f]
push ebx
push edx
mov byte [ebp - 0x410], bl
call fcn.00518ea0
add esp, 0x18
push 1
push 0x23
lea eax, [ebp - 0x410]
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
push str.1905Cache2
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jle 0x408966
xor eax, eax
jmp 0x408980
lea esi, [eax + eax]
mov eax, esi
call fcn.0051b880
mov eax, esp
push 3
push esi
push str.1905Cache2
push eax
call fcn.00403b60
push eax
lea ecx, [ebp - 0x410]
push ecx
push 0x570d7c
lea edx, [ebp - 0x2c10]
push 0x2800
push edx
call fcn.00515f7a
add esp, 0x14
lea eax, [ebp - 0x2c10]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edi, [eax + 1]
cmp edi, 0x3fffffff
jg 0x4089e8
lea eax, [edi + edi]
call fcn.0051b880
mov esi, esp
cmp esi, ebx
je 0x4089e8
push edi
push esi
push 0xffffffffffffffff
lea edx, [ebp - 0x2c10]
push edx
push ebx
xor ecx, ecx
push 3
mov word [esi], cx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
neg eax
sbb eax, eax
and eax, esi
jmp 0x4089ea
xor eax, eax
push eax
lea ecx, [ebp - 0x2c18]
call fcn.004040f0
lea ecx, [ebp - 0x2c3c]
mov byte [ebp - 4], 1
call fcn.00417d5d
push 0x570d84
lea eax, [ebp - 0x2c18]
push eax
lea ecx, [ebp - 0x2c20]
push ecx
mov byte [ebp - 4], 2
call fcn.00404260
add esp, 0xc
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x2c20]
push ebx
push edx
lea ecx, [ebp - 0x2c3c]
call fcn.00417e29
cmp eax, ebx
je 0x408b17
lea ecx, [ebp - 0x2c3c]
call fcn.004179af
mov esi, eax
mov eax, dword [ebp - 0x2c3c]
mov edx, dword [eax + 0x38]
push 0x10
lea ecx, [ebp - 0x2c3c]
call edx
test eax, eax
je 0x408a7a
lea ecx, [ebp - 0x2c3c]
call fcn.00417d1f
test eax, eax
jne 0x408b0f
lea eax, [ebp - 0x2c14]
push eax
lea ecx, [ebp - 0x2c3c]
call fcn.0041806c
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x2c14]
cmp dword [ecx - 0xc], ebx
jl 0x408aef
push str.1905Update
push ecx
call fcn.00517220
add esp, 8
cmp eax, ebx
je 0x408ae9
mov ecx, dword [ebp - 0x2c14]
sub eax, ecx
sar eax, 1
cmp eax, 0xffffffff
je 0x408aef
cmp dword [ecx - 0xc], ebx
jl 0x408aef
push 0x570da8
push ecx
call fcn.00517220
add esp, 8
cmp eax, ebx
je 0x408ae9
mov ecx, dword [ebp - 0x2c14]
sub eax, ecx
sar eax, 1
cmp eax, 0xffffffff
je 0x408aef
push ebx
push ecx
call fcn.004273e9
mov ecx, dword [ebp - 0x2c14]
lea eax, [ecx - 0x10]
mov byte [ebp - 4], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408b0f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp esi, ebx
jne 0x408a43
lea ecx, [ebp - 0x2c3c]
call fcn.004178c9
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x2c20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408b48
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x2c3c]
mov byte [ebp - 4], 1
call fcn.00417d8f
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x2c18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408b7c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x2c1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408ba5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea esp, [ebp - 0x2c4c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0051553d
mov esp, ebp
pop ebp
ret