Function at 0x4089e0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x57b8d6
mov eax, dword fs:[0]
push eax
sub esp, 0x218
mov eax, dword [0x5ef220]
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
mov dword [ebp - 0x224], ecx
mov esi, dword [ebp + 8]
lea ecx, [ebp - 0x21c]
mov edi, dword [ebp + 0xc]
push esi
call fcn.0040f690
mov dword [ebp - 4], 0
or ebx, 0xffffffff
mov eax, dword [ebp - 0x21c]
cmp dword [eax - 0xc], 0
jle 0x408c5d
push 0x5b
push eax
call fcn.00559943
mov ecx, eax
add esp, 8
test ecx, ecx
je 0x408b78
mov eax, dword [ebp - 0x21c]
sub ecx, eax
sar ecx, 1
jne 0x408b7e
cmp dword [eax - 0xc], 0
jle 0x408c5d
push 0x5d
push eax
call fcn.00559943
mov ecx, eax
add esp, 8
test ecx, ecx
je 0x408b78
mov eax, dword [ebp - 0x21c]
sub ecx, eax
sar ecx, 1
cmp ecx, 6
jne 0x408b7e
push 5
push 1
lea eax, [ebp - 0x224]
push eax
lea ecx, [ebp - 0x21c]
call fcn.0040f370
xor eax, eax
mov byte [ebp - 4], 1
push 0x206
push eax
mov word [ebp - 0x218], ax
lea eax, [ebp - 0x216]
push eax
call fcn.0055c960
mov esi, dword [ebp - 0x224]
lea eax, [ebp - 0x218]
add esp, 0xc
push eax
push esi
call fcn.00406e00
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
jmp 0x408af0
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x408af0
sub ecx, edx
sar ecx, 1
je 0x408b52
lea eax, [ebp - 0x218]
push eax
push edi
call dword [sym.imp.SHLWAPI.dll_StrCpyW]
push edi
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
push 8
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x21c]
call fcn.0040c090
push dword [eax]
push edi
call dword [sym.imp.SHLWAPI.dll_StrCatW]
mov edx, dword [ebp - 0x220]
mov ecx, ebx
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x408b52
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 0xfffffff0
mov byte [ebp - 4], 0
mov ecx, ebx
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x408c7d
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x408c7d
mov eax, dword [ebp - 0x21c]
cmp dword [eax - 0xc], 0
jle 0x408c5d
push 0x5b
push eax
call fcn.00559943
add esp, 8
test eax, eax
je 0x408c5d
mov ecx, dword [ebp - 0x21c]
sub eax, ecx
sar eax, 1
jne 0x408c5d
cmp dword [ecx - 0xc], 0
jle 0x408c5d
push 0x5d
push ecx
call fcn.00559943
add esp, 8
test eax, eax
je 0x408c5d
sub eax, dword [ebp - 0x21c]
sar eax, 1
cmp eax, 8
jne 0x408c5d
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x218], ax
lea eax, [ebp - 0x216]
push eax
call fcn.0055c960
add esp, 0xc
lea eax, [ebp - 0x218]
push 0
push 0x1a
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea eax, [ebp - 0x218]
push eax
push edi
call dword [sym.imp.SHLWAPI.dll_StrCpyW]
push edi
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
push 0xa
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x21c]
call fcn.0040c090
push dword [eax]
push edi
call dword [sym.imp.SHLWAPI.dll_StrCatW]
mov edx, dword [ebp - 0x220]
mov ecx, ebx
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x408c7d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x408c7d
mov eax, dword [ebp - 0x224]
add eax, 4
push eax
push edi
call dword [sym.imp.SHLWAPI.dll_StrCpyW]
push edi
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
push esi
push edi
call dword [sym.imp.SHLWAPI.dll_StrCatW]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str.MSG:_runpre_s__code_d
call fcn.0042abd0
mov dword [ebp - 4], 0xffffffff
add esp, 0xc
mov edx, dword [ebp - 0x21c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jg 0x408cb6
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov al, 1
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.00557f7f
mov esp, ebp
pop ebp
ret 8