Function at 0x401470
Capabilities:
Check if file exists
Get common file path
Query or enumerate registry value
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x840
mov eax, dword [0x5be094]
xor eax, ebp
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x840], ecx
xor eax, eax
mov word [ebp - 0x628], ax
push 0x206
push 0
lea ecx, [ebp - 0x626]
push ecx
call fcn.00488f20
add esp, 0xc
xor edx, edx
mov word [ebp - 0x420], dx
push 0x206
push 0
lea eax, [ebp - 0x41e]
push eax
call fcn.00488f20
add esp, 0xc
push 0
push 0x2b
lea ecx, [ebp - 0x628]
push ecx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push 0x558b04
lea edx, [ebp - 0x628]
push edx
call fcn.00488ed2
add esp, 8
push 0x558b08
lea eax, [ebp - 0x628]
push eax
call fcn.00488ed2
add esp, 8
push 0x558b18
lea ecx, [ebp - 0x628]
push ecx
call fcn.00488ed2
add esp, 8
push 0x558b1c
lea edx, [ebp - 0x628]
push edx
call fcn.00488ed2
add esp, 8
push 0x558b28
lea eax, [ebp - 0x628]
push eax
call fcn.00488ed2
add esp, 8
push 0x558b2c
lea ecx, [ebp - 0x628]
push ecx
call fcn.00488ed2
add esp, 8
push 0x558b38
lea edx, [ebp - 0x628]
push edx
call fcn.00488ed2
add esp, 8
lea eax, [ebp - 0x628]
push eax
push 0x104
lea ecx, [ebp - 0x420]
push ecx
push 0x558b44
push 0x558b48
push 0x558b60
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
push 0x558b70
lea edx, [ebp - 0x420]
push edx
call fcn.00401c20
add esp, 8
mov dword [ebp - 0xc], eax
push 0x558b80
lea eax, [ebp - 0x420]
push eax
call fcn.00401c20
add esp, 8
mov dword [ebp - 4], eax
cmp dword [ebp - 0xc], 0
je 0x401604
cmp dword [ebp - 4], 0
je 0x401604
lea ecx, [ebp - 0x420]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x401604
lea edx, [ebp - 0x420]
push edx
mov eax, dword [ebp - 0x840]
add eax, 0x10
push eax
call fcn.00488f00
add esp, 8
mov ecx, dword [ebp - 0x840]
mov dword [ecx + 0xc], 1
jmp 0x401850
xor edx, edx
mov word [ebp - 0x838], dx
push 0x206
push 0
lea eax, [ebp - 0x836]
push eax
call fcn.00488f20
add esp, 0xc
push 0x558b8c
lea ecx, [ebp - 0x838]
push ecx
call fcn.00488f00
add esp, 8
push 0x558ba0
lea edx, [ebp - 0x838]
push edx
call fcn.00488ed2
add esp, 8
push 0x558bb0
lea eax, [ebp - 0x838]
push eax
call fcn.00488ed2
add esp, 8
push 0x558bb4
lea ecx, [ebp - 0x838]
push ecx
call fcn.00488ed2
add esp, 8
lea edx, [ebp - 8]
push edx
push 0xf003f
push 0
lea eax, [ebp - 0x838]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov dword [ebp - 0x62c], eax
cmp dword [ebp - 0x62c], 0
jne 0x401761
mov dword [ebp - 0x83c], 0x104
lea ecx, [ebp - 0x83c]
push ecx
lea edx, [ebp - 0x420]
push edx
push 0
push 0
push 0x558bc0
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov dword [ebp - 0x62c], eax
cmp dword [ebp - 0x62c], 0
jne 0x401761
push 0x558bd8
lea ecx, [ebp - 0x420]
push ecx
call fcn.00401c20
add esp, 8
mov dword [ebp - 0xc], eax
push 0x558be8
lea edx, [ebp - 0x420]
push edx
call fcn.00401c20
add esp, 8
mov dword [ebp - 4], eax
cmp dword [ebp - 0xc], 0
je 0x401761
cmp dword [ebp - 4], 0
je 0x401761
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x401761
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea edx, [ebp - 0x420]
push edx
mov eax, dword [ebp - 0x840]
add eax, 0x10
push eax
call fcn.00488f00
add esp, 8
mov ecx, dword [ebp - 0x840]
mov dword [ecx + 0xc], 1
jmp 0x401850
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
mov word [ebp - 0x218], ax
push 0x206
push 0
lea ecx, [ebp - 0x216]
push ecx
call fcn.00488f20
add esp, 0xc
mov edx, dword [ebp - 0x840]
mov eax, dword [edx + 4]
push eax
push 0x558bf4
lea ecx, [ebp - 0x218]
push ecx
call fcn.00488dd2
add esp, 0xc
lea edx, [ebp - 0x218]
push edx
push 0x104
lea eax, [ebp - 0x420]
push eax
push 0x558c10
push str.ConfigPath
push 0x558c2c
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
push 0x558c3c
lea ecx, [ebp - 0x420]
push ecx
call fcn.00401c20
add esp, 8
mov dword [ebp - 0xc], eax
push 0x558c4c
lea edx, [ebp - 0x420]
push edx
call fcn.00401c20
add esp, 8
mov dword [ebp - 4], eax
cmp dword [ebp - 0xc], 0
je 0x401843
cmp dword [ebp - 4], 0
je 0x401843
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x401843
lea ecx, [ebp - 0x420]
push ecx
mov edx, dword [ebp - 0x840]
add edx, 0x10
push edx
call fcn.00488f00
add esp, 8
mov eax, dword [ebp - 0x840]
mov dword [eax + 0xc], 1
jmp 0x401850
mov ecx, dword [ebp - 0x840]
mov dword [ecx + 0xc], 0
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00488ec3
mov esp, ebp
pop ebp
ret