Function at 0x407fc0
Capabilities:
Get common file path
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x44e45c
mov eax, dword fs:[0]
push eax
sub esp, 0x2c0
mov eax, dword [0x4677a0]
xor eax, esp
mov dword [esp + 0x2bc], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4677a0]
xor eax, esp
push eax
lea eax, [esp + 0x2d4]
mov dword fs:[0], eax
mov ebp, ecx
call fcn.00418923
mov eax, dword [ebp + 0x7c]
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
push eax
mov eax, dword [ebp + 0x20]
mov ebx, 1
push ebx
push 0x80
push eax
call edi
mov eax, dword [ebp + 0x7c]
mov ecx, dword [ebp + 0x20]
push eax
push 0
push 0x80
push ecx
call edi
push 0x4583b0
lea ecx, [esp + 0x1c]
call fcn.004026a0
mov esi, eax
push 0x46be44
lea ecx, [esp + 0x24]
mov dword [esp + 0x2e0], 0
call fcn.004026a0
push esi
push eax
lea edx, [esp + 0x1c]
push edx
mov byte [esp + 0x2e8], bl
call fcn.00401ed0
add esp, 0xc
mov byte [esp + 0x2dc], 2
mov eax, dword [eax]
push eax
mov ecx, ebp
call fcn.0041f006
mov byte [esp + 0x2dc], bl
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4080a6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x2dc], 0
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4080ce
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x2dc], 0xffffffff
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4080f9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0x468c88
push 0
push 0
push 0x8026
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jl 0x40816d
mov eax, 0x468c88
lea edx, [eax + 2]
jmp 0x408120
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x408120
sub eax, edx
sar eax, 1
cmp word [eax*2 + str.Ec:_], 0x5c
lea ebx, [eax*2 + 0x468c88]
je 0x40814c
mov ecx, 0x5c
mov word [ebx], cx
add ebx, 2
xor edx, edx
push 0x46bf34
push 0x4583bc
mov ecx, 0x104
mov word [ebx], dx
call fcn.00402d10
add esp, 8
mov ebx, 1
call fcn.00420e12
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x408187
push 0x80004005
call fcn.00402bd0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
push 0x46f0f8
lea ecx, [esp + 0x18]
push 0x457370
push ecx
mov dword [esp + 0x2e8], 3
call fcn.00402bb0
mov eax, dword [esp + 0x20]
add esp, 0xc
cmp dword [eax - 4], ebx
jle 0x4081cf
mov edx, dword [eax - 0xc]
push edx
lea ecx, [esp + 0x18]
call fcn.004029b0
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x1c]
push eax
push 0x20019
push 0
push ecx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x408266
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0xcc]
push eax
push 0
push 0
push str.InstallLocation
push ecx
mov dword [esp + 0x30], 0x200
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40825b
mov eax, 0x468c88
lea esi, [esp + 0xc8]
mov edx, 0x104
sub esi, eax
nop
lea ecx, [edx + 0x7ffffefa]
test ecx, ecx
je 0x40824f
movzx ecx, word [esi + eax]
test cx, cx
je 0x40824f
mov word [eax], cx
add eax, 2
sub edx, ebx
jne 0x408230
jmp 0x408253
test edx, edx
jne 0x408256
sub eax, 2
xor edx, edx
mov word [eax], dx
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x468c88
push 0x3fe
mov ecx, ebp
call fcn.0041ef45
push 5
push 0x3fc
mov ecx, ebp
call fcn.0041eec8
mov ecx, eax
call fcn.0041f0a8
push 5
push 0x3e8
mov ecx, ebp
call fcn.0041eec8
mov ecx, eax
call fcn.0041f0a8
push 0x3e8
mov ecx, ebp
call fcn.0041eec8
mov ecx, dword [eax + 0x20]
push 0
push 0x20
push 0xc5
push ecx
call edi
push 0x46eef0
push str._s_dataFiles_main.dmg
mov ecx, 0x104
lea ebx, [esp + 0xd0]
call fcn.00402d10
lea edx, [esp + 0x20]
push edx
mov eax, ebx
call fcn.004066e0
add esp, 0xc
test eax, eax
je 0x408433
mov eax, dword [esp + 0x18]
mov esi, dword [eax + 0x214]
mov eax, dword [0x46cb78]
test eax, eax
je 0x408306
mov dword [esi + 0x74], eax
jmp 0x40830d
mov dword [esi + 0x74], 0x64
cmp dword [0x46cb7c], 0
je 0x4083d2
lea ebx, [esi + 0x78]
push ebx
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
mov edi, dword [0x46cb7c]
cmp edi, 0x16d
jle 0x40835b
lea ecx, [edi - 0x16e]
mov eax, 0x6719f361
mul ecx
movzx eax, word [ebx]
sub ecx, edx
shr ecx, 1
add ecx, edx
shr ecx, 8
inc ecx
mov edx, ecx
imul edx, edx, 0xfffffe93
add edi, edx
add eax, ecx
mov word [ebx], ax
cmp edi, 0x1e
jle 0x408398
movzx ecx, word [esi + 0x7a]
lea edx, [edi - 0x1f]
mov eax, 0x88888889
mul edx
shr edx, 4
inc edx
mov eax, edx
shl eax, 4
sub eax, edx
neg eax
lea edi, [edi + eax*2]
mov edi, edi
inc ecx
cmp cx, 0xd
jne 0x40838f
inc word [ebx]
mov ecx, 1
sub edx, 1
jne 0x408380
mov word [esi + 0x7a], cx
test edi, edi
jle 0x4083d8
movzx eax, word [esi + 0x7e]
mov edx, 1
add eax, edx
cmp ax, 0x1e
jne 0x4083c6
add word [esi + 0x7a], dx
movzx ecx, word [esi + 0x7a]
mov eax, edx
cmp cx, 0xd
jne 0x4083c6
add word [ebx], dx
mov ecx, edx
mov word [esi + 0x7a], cx
sub edi, edx
test edi, edi
jg 0x4083a5
mov word [esi + 0x7e], ax
jmp 0x4083d8
xor edx, edx
mov word [esi + 0x78], dx
xor eax, eax
lea esi, [esp + 0x24]
mov byte [esp + 0x24], 0
mov dword [esp + 0x25], eax
mov dword [esp + 0x29], eax
mov dword [esp + 0x2d], eax
mov dword [esp + 0x31], eax
mov dword [esp + 0x35], eax
mov dword [esp + 0x39], eax
mov dword [esp + 0x3d], eax
mov dword [esp + 0x41], eax
call fcn.00410960
mov eax, esi
push eax
push 0x4583f4
mov ecx, 0x80
lea edi, [esp + 0x50]
call fcn.00411290
mov eax, dword [ebp + 0x20]
add esp, 8
mov ecx, edi
push ecx
push 0x3f1
push eax
call dword [sym.imp.USER32.dll_SetDlgItemTextA]
cmp byte [0x46cbc8], 0
mov ecx, ebp
je 0x4084a8
push 0
push 0x3ea
call fcn.0041eec8
mov ecx, eax
call fcn.0041f0a8
push 0
push 0x3ee
mov ecx, ebp
call fcn.0041eec8
mov ecx, eax
call fcn.0041f0a8
push 0
push 0x3e9
mov ecx, ebp
call fcn.0041eec8
mov ecx, eax
call fcn.0041f0a8
push 0
push 0x3eb
mov ecx, ebp
call fcn.0041eec8
mov ecx, eax
call fcn.0041f0a8
push 0x3e9
push 0x3eb
push 0x3e9
mov ecx, ebp
call fcn.0041ee9e
jmp 0x4084ce
push 0x3eb
push 0x3eb
push 0x3e9
call fcn.0041ee9e
push 0
push 1
mov ecx, ebp
call fcn.0041eec8
mov ecx, eax
call fcn.0041f0ea
push 0x458428
push 1
mov ecx, ebp
call fcn.0041ef45
mov dword [esp + 0x2dc], 0xffffffff
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x408507
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [esp + 0x2d4]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x2bc]
xor ecx, esp
call fcn.00435010
add esp, 0x2cc
ret