Function at 0x4089d0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x58774b
mov eax, dword fs:[0]
push eax
sub esp, 0x84c
mov eax, dword [0x5f50fc]
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 edi, ecx
mov dword [ebp - 0x850], edi
mov eax, dword [ebp + 8]
lea edx, [ebp - 0x84c]
push edx
lea ecx, [edi + 0x658]
mov dword [ebp - 0x858], eax
mov eax, dword [ecx]
lea edx, [ebp - 0x838]
push edx
push str.AppPathsName
xor ebx, ebx
mov dword [ebp - 0x838], 0
push str._app_path_info_
mov dword [ebp - 0x84c], 0
mov dword [ebp - 0x848], 0
mov dword [ebp - 0x844], ebx
mov dword [ebp - 0x854], ecx
call dword [eax + 0x10]
test eax, eax
je 0x408d24
push 0x208
lea eax, [ebp - 0x218]
push ebx
push eax
call fcn.00568420
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
call fcn.00423a43
mov ecx, eax
test ecx, ecx
je 0x408d44
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x834], esi
mov ecx, dword [ebp - 0x838]
mov dword [ebp - 4], ebx
cmp dword [ecx], ebx
jle 0x408ce7
xor esi, esi
mov dword [ebp - 0x83c], esi
mov dword [ebp - 0x840], esi
nop dword [eax]
push dword [ebx + ecx + 0x290]
lea eax, [ebp - 0x830]
push 0x104
push eax
call fcn.0056b3b9
mov eax, dword [ebp - 0x838]
add esp, 0xc
mov edx, dword [ebx + eax + 0x294]
test edx, edx
jne 0x408b00
xor ecx, ecx
jmp 0x408b1a
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x408b05
sub ecx, esi
mov esi, dword [ebp - 0x83c]
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x834]
call fcn.00407520
lea eax, [ebp - 0x218]
push eax
push str._SysFolder_
lea ecx, [ebp - 0x834]
call fcn.0040e190
push dword [edi + 0x644]
lea ecx, [ebp - 0x834]
push str._InsFolder_
call fcn.0040e190
push dword [edi + 0x63c]
lea ecx, [ebp - 0x834]
push str._ProductName_
call fcn.0040e190
test eax, eax
jle 0x408b7e
mov eax, dword [edi + 0x63c]
cmp dword [eax - 0xc], 0
je 0x408cc0
push dword [ebp - 0x834]
lea eax, [ebp - 0x628]
push 0x104
push eax
call fcn.0056b3b9
mov eax, dword [ebp - 0x838]
add esp, 0xc
mov edx, dword [ebx + eax + 0x298]
test edx, edx
jne 0x408bad
xor eax, eax
jmp 0x408bc1
mov eax, edx
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x408bb2
sub eax, esi
sar eax, 1
push eax
push edx
lea ecx, [ebp - 0x834]
call fcn.00407520
lea eax, [ebp - 0x218]
push eax
push str._SysFolder_
lea ecx, [ebp - 0x834]
call fcn.0040e190
push dword [edi + 0x644]
lea ecx, [ebp - 0x834]
push str._InsFolder_
call fcn.0040e190
push dword [edi + 0x63c]
lea ecx, [ebp - 0x834]
push str._ProductName_
call fcn.0040e190
test eax, eax
jle 0x408c25
mov eax, dword [edi + 0x63c]
cmp dword [eax - 0xc], 0
je 0x408cba
mov eax, dword [ebp - 0x838]
push dword [ebx + eax + 0x298]
lea eax, [ebp - 0x420]
push 0x104
push eax
call fcn.0056b3b9
mov ecx, dword [ebp - 0x844]
add esp, 0xc
test ecx, ecx
jne 0x408c66
push 0x618
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
jmp 0x408c82
mov eax, dword [ebp - 0x840]
add eax, 0x618
push eax
push ecx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
test eax, eax
je 0x408cba
mov edx, dword [ebp - 0x840]
lea esi, [ebp - 0x830]
inc dword [ebp - 0x848]
mov ecx, 0x186
mov dword [ebp - 0x844], eax
lea edi, [edx + eax]
add edx, 0x618
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebp - 0x850]
mov dword [ebp - 0x840], edx
mov esi, dword [ebp - 0x83c]
mov ecx, dword [ebp - 0x838]
inc esi
add ebx, 0x514
mov dword [ebp - 0x83c], esi
cmp esi, dword [ecx]
jl 0x408ad0
mov esi, dword [ebp - 0x834]
mov ebx, dword [ebp - 0x844]
mov edx, dword [ebp - 0x854]
push ecx
mov ecx, edx
mov eax, dword [edx]
call dword [eax + 0x14]
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x408d14
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x858]
mov dword [eax], ebx
mov eax, dword [ebp - 0x848]
jmp 0x408d26
xor eax, eax
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.005663a7
mov esp, ebp
pop ebp
ret 4
push 0x80004005
call fcn.00406af0
int3