Function at 0x40e4e0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x545582
mov eax, dword fs:[0]
push eax
sub esp, 0x23c
mov eax, dword [0x5ec938]
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 eax, dword [ebp + 8]
mov esi, dword [ebp + 0x10]
mov edi, dword [ebp + 0xc]
dec eax
xor ebx, ebx
mov dword [ebp - 0x248], ecx
mov dword [ebp - 0x244], esi
cmp eax, 6
ja case.0x40e52f.5
jmp dword [eax*4 + 0x40ebe4]
mov eax, dword [ebp + 0x14]
push eax
push ebx
push esi
call fcn.0052c850
mov eax, edi
add esp, 0xc
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40e550
sub eax, edx
sar eax, 1
mov dword [ebp - 0x248], eax
mov esi, ebx
je case.0x40e52f.5
lea ecx, [ecx]
cmp esi, dword [ebp + 0x14]
jae case.0x40e52f.5
movzx eax, word [edi]
test ax, ax
je case.0x40e52f.5
lea ecx, [eax - 0x41]
cmp cx, 5
ja 0x40e59c
mov edx, dword [ebp - 0x244]
sub al, 0x41
mov byte [edx + esi], al
inc ebx
jmp 0x40e5df
lea ecx, [eax - 0x61]
cmp cx, 5
ja 0x40e5b3
mov edx, dword [ebp - 0x244]
sub al, 0x61
mov byte [edx + esi], al
inc ebx
jmp 0x40e5df
lea ecx, [eax - 0x30]
cmp cx, 9
ja 0x40e5ca
mov edx, dword [ebp - 0x244]
sub al, 0x30
mov byte [edx + esi], al
inc ebx
jmp 0x40e5df
mov eax, dword [ebp - 0x244]
push edi
push 2
push eax
call fcn.0052cd4a
add esp, 0xc
add ebx, 2
inc esi
add edi, 2
cmp esi, dword [ebp - 0x248]
jb 0x40e570
jmp case.0x40e52f.5
call fcn.00436219
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40e60a
push 0x80004005
call fcn.00401ed0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x23c], eax
push edi
lea ecx, [ebp - 0x23c]
mov dword [ebp - 4], ebx
call fcn.00402bd0
push str._Installed_
lea ecx, [ebp - 0x23c]
call fcn.004095e0
mov edi, dword [ebp - 0x23c]
test eax, eax
jne 0x40e658
mov ecx, dword [ebp - 0x248]
xor eax, eax
cmp dword [ecx + 0xdb0c], ebx
setne al
jmp 0x40e661
push edi
call fcn.0052d9da
add esp, 4
mov dword [esi], eax
lea eax, [edi - 0x10]
mov ebx, 4
mov dword [ebp - 4], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x40ebb8
call fcn.00436219
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40e69e
push 0x80004005
call fcn.00401ed0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x238], eax
mov dword [ebp - 4], 1
cmp edi, ebx
jne 0x40e6bf
xor eax, eax
jmp 0x40e6d3
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40e6c4
sub eax, edx
sar eax, 1
push eax
push edi
lea ecx, [ebp - 0x238]
call fcn.004026f0
push 0x206
lea edx, [ebp - 0x216]
xor ecx, ecx
push ebx
push edx
mov word [ebp - 0x218], cx
call fcn.0052c850
add esp, 0xc
push 0x104
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
xor ecx, ecx
mov eax, edi
mov dword [ebp - 0x220], 7
mov dword [ebp - 0x224], ebx
mov word [ebp - 0x234], cx
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40e730
sub eax, edx
sar eax, 1
push eax
push edi
lea ecx, [ebp - 0x234]
call fcn.0040a700
mov esi, dword [ebp - 0x224]
lea edx, [ebp - 0x218]
push edx
push str._SysFolder_
lea ecx, [ebp - 0x238]
mov byte [ebp - 4], 2
call fcn.0040a2e0
mov edi, eax
test edi, edi
jle 0x40e79d
push 0xc
push str._SysFolder_
call fcn.0052ceda
imul eax, edi
sub esi, eax
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.0052ceda
imul eax, edi
add esp, 0x10
add esi, eax
mov edi, dword [ebp - 0x248]
mov eax, dword [edi + 0x64c]
push eax
push str._InsFolder_
lea ecx, [ebp - 0x238]
call fcn.0040a2e0
mov ebx, eax
test ebx, ebx
jle 0x40e7e2
push 0xc
push str._InsFolder_
call fcn.0052ceda
imul eax, ebx
mov ecx, dword [edi + 0x64c]
sub esi, eax
mov eax, dword [ecx - 0xc]
imul eax, ebx
add esp, 8
add esi, eax
mov eax, dword [edi + 0x658]
push eax
push str._WsptFolder_
lea ecx, [ebp - 0x238]
call fcn.0040a2e0
mov ebx, eax
test ebx, ebx
jle 0x40e821
push 0xd
push str._WsptFolder_
call fcn.0052ceda
imul eax, ebx
mov edx, dword [edi + 0x658]
sub esi, eax
mov eax, dword [edx - 0xc]
imul eax, ebx
add esp, 8
add esi, eax
mov ebx, dword [ebp - 0x238]
mov eax, dword [ebx - 0xc]
test eax, eax
js 0x40e8f8
push str._AppVersion_
push ebx
call fcn.0052d906
add esp, 8
test eax, eax
je 0x40e8f8
sub eax, ebx
sar eax, 1
cmp eax, 0xffffffff
je 0x40e8f8
call fcn.00436219
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40e86f
push 0x80004005
call fcn.00401ed0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x23c], eax
lea ecx, [ebp - 0x23c]
push ecx
mov ecx, edi
mov byte [ebp - 4], 3
call fcn.0040d400
mov edx, dword [ebp - 0x23c]
push edx
push str._AppVersion_
lea ecx, [ebp - 0x238]
call fcn.0040a2e0
mov ebx, eax
test ebx, ebx
jle 0x40e8d2
push 0xd
push str._AppVersion_
call fcn.0052ceda
imul eax, ebx
sub esi, eax
mov eax, dword [ebp - 0x23c]
mov eax, dword [eax - 0xc]
imul eax, ebx
add esp, 8
add esi, eax
mov eax, dword [ebp - 0x23c]
add eax, 0xfffffff0
mov byte [ebp - 4], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40e8f8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [edi + 0xdb1c]
push ecx
lea ecx, [ebp - 0x240]
call fcn.00404fe0
mov edx, dword [ebp - 0x240]
push edx
push str._LanguageCode_
lea ecx, [ebp - 0x238]
mov byte [ebp - 4], 4
call fcn.0040a2e0
mov ebx, eax
test ebx, ebx
jle 0x40e94d
push 0xf
push str._LanguageCode_
call fcn.0052ceda
imul eax, ebx
sub esi, eax
mov eax, dword [ebp - 0x240]
mov eax, dword [eax - 0xc]
imul eax, ebx
add esp, 8
add esi, eax
mov ebx, dword [ebp - 0x238]
cmp dword [ebx - 0xc], 0
jl 0x40ea54
push str._Language_
push ebx
call fcn.0052d906
add esp, 8
test eax, eax
je 0x40ea54
sub eax, ebx
sar eax, 1
cmp eax, 0xffffffff
je 0x40ea54
call fcn.00436219
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40e99a
push 0x80004005
call fcn.00401ed0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x23c], eax
mov eax, dword [ebp - 0x240]
cmp dword [eax - 4], 1
mov byte [ebp - 4], 5
jle 0x40e9d1
mov ecx, dword [eax - 0xc]
push ecx
lea ecx, [ebp - 0x240]
call fcn.004021c0
mov eax, dword [ebp - 0x240]
push eax
call fcn.00406c80
movzx edx, ax
push edx
lea eax, [ebp - 0x23c]
push str._04x
push eax
call fcn.00403bf0
mov ecx, dword [ebp - 0x23c]
add esp, 0x10
push ecx
push str._Language_
lea ecx, [ebp - 0x238]
call fcn.0040a2e0
mov ebx, eax
test ebx, ebx
jle 0x40ea2e
push 0xb
push str._Language_
call fcn.0052ceda
imul eax, ebx
mov edx, dword [ebp - 0x23c]
sub esi, eax
mov eax, dword [edx - 0xc]
imul eax, ebx
add esp, 8
add esi, eax
mov eax, dword [ebp - 0x23c]
add eax, 0xfffffff0
mov byte [ebp - 4], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ea54
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [edi + 0xdb04]
push eax
push str._Residence_
lea ecx, [ebp - 0x238]
call fcn.0040a2e0
mov ebx, eax
test ebx, ebx
jle 0x40ea93
push 0xc
push str._Residence_
call fcn.0052ceda
imul eax, ebx
mov ecx, dword [edi + 0xdb04]
sub esi, eax
mov eax, dword [ecx - 0xc]
imul eax, ebx
add esp, 8
add esi, eax
mov eax, dword [edi + 0xdb08]
push eax
push str._Area_
lea ecx, [ebp - 0x238]
call fcn.0040a2e0
mov ebx, eax
test ebx, ebx
jle 0x40ead2
push 7
push str._Area_
call fcn.0052ceda
imul eax, ebx
mov edx, dword [edi + 0xdb08]
sub esi, eax
mov eax, dword [edx - 0xc]
imul eax, ebx
add esp, 8
add esi, eax
mov eax, dword [edi + 0xdb14]
push eax
push str._MSetupDeviceID_
lea ecx, [ebp - 0x238]
call fcn.0040a2e0
mov ebx, eax
test ebx, ebx
jle 0x40eb11
push 0x11
push str._MSetupDeviceID_
call fcn.0052ceda
imul eax, ebx
sub esi, eax
mov eax, dword [edi + 0xdb14]
mov eax, dword [eax - 0xc]
imul eax, ebx
add esp, 8
add esi, eax
cmp dword [ebp + 8], 7
lea ebx, [esi + esi + 2]
mov esi, dword [ebp - 0x238]
push esi
jne 0x40eb31
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp - 0x244]
shr ecx, 1
push ecx
push edx
jmp 0x40eb3e
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 0x244]
shr eax, 1
push eax
push ecx
call fcn.0052cd4a
mov eax, dword [ebp - 0x240]
add eax, 0xfffffff0
add esp, 0xc
mov byte [ebp - 4], 2
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40eb6c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [ebp - 0x220], 8
jb 0x40eb84
mov ecx, dword [ebp - 0x234]
push ecx
call fcn.0042c8af
add esp, 4
xor edx, edx
lea eax, [esi - 0x10]
mov word [ebp - 0x234], dx
mov dword [ebp - 0x220], 7
mov dword [ebp - 0x224], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg case.0x40e52f.5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, ebx
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.0052c2ec
mov esp, ebp
pop ebp
ret 0x10