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 [0x5a6900]
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.004af7d0
add esp, 0xc
xor edx, edx
mov word [ebp - 0x420], dx
push 0x206
push 0
lea eax, [ebp - 0x41e]
push eax
call fcn.004af7d0
add esp, 0xc
push 0
push 0x2b
lea ecx, [ebp - 0x628]
push ecx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push 0x548bb4
lea edx, [ebp - 0x628]
push edx
call fcn.004af779
add esp, 8
push 0x548bb8
lea eax, [ebp - 0x628]
push eax
call fcn.004af779
add esp, 8
push 0x548bc8
lea ecx, [ebp - 0x628]
push ecx
call fcn.004af779
add esp, 8
push 0x548bcc
lea edx, [ebp - 0x628]
push edx
call fcn.004af779
add esp, 8
push 0x548be8
lea eax, [ebp - 0x628]
push eax
call fcn.004af779
add esp, 8
push 0x548bec
lea ecx, [ebp - 0x628]
push ecx
call fcn.004af779
add esp, 8
push 0x548c08
lea edx, [ebp - 0x628]
push edx
call fcn.004af779
add esp, 8
lea eax, [ebp - 0x628]
push eax
push 0x104
lea ecx, [ebp - 0x420]
push ecx
push 0x548c14
push 0x548c18
push 0x548c30
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
push 0x548c40
lea edx, [ebp - 0x420]
push edx
call fcn.00401c20
add esp, 8
mov dword [ebp - 0xc], eax
push 0x548c50
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.004af7a7
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.004af7d0
add esp, 0xc
push 0x548c6c
lea ecx, [ebp - 0x838]
push ecx
call fcn.004af7a7
add esp, 8
push 0x548c80
lea edx, [ebp - 0x838]
push edx
call fcn.004af779
add esp, 8
push 0x548c90
lea eax, [ebp - 0x838]
push eax
call fcn.004af779
add esp, 8
push 0x548c94
lea ecx, [ebp - 0x838]
push ecx
call fcn.004af779
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 0x548cb0
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 0x548cc8
lea ecx, [ebp - 0x420]
push ecx
call fcn.00401c20
add esp, 8
mov dword [ebp - 0xc], eax
push 0x548cd8
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.004af7a7
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.004af7d0
add esp, 0xc
mov edx, dword [ebp - 0x840]
mov eax, dword [edx + 4]
push eax
push 0x548cf4
lea ecx, [ebp - 0x218]
push ecx
call fcn.004af679
add esp, 0xc
lea edx, [ebp - 0x218]
push edx
push 0x104
lea eax, [ebp - 0x420]
push eax
push 0x548d10
push str.ConfigPath
push 0x548d2c
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
push 0x548d3c
lea ecx, [ebp - 0x420]
push ecx
call fcn.00401c20
add esp, 8
mov dword [ebp - 0xc], eax
push 0x548d4c
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.004af7a7
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.004af76a
mov esp, ebp
pop ebp
ret