Function at 0x401490
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 [0x5b2390]
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.004b7bc0
add esp, 0xc
xor edx, edx
mov word [ebp - 0x420], dx
push 0x206
push 0
lea eax, [ebp - 0x41e]
push eax
call fcn.004b7bc0
add esp, 0xc
push 0
push 0x2b
lea ecx, [ebp - 0x628]
push ecx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push 0x552bc4
lea edx, [ebp - 0x628]
push edx
call fcn.004b7b6c
add esp, 8
push 0x552bc8
lea eax, [ebp - 0x628]
push eax
call fcn.004b7b6c
add esp, 8
push 0x552bd8
lea ecx, [ebp - 0x628]
push ecx
call fcn.004b7b6c
add esp, 8
push 0x552bdc
lea edx, [ebp - 0x628]
push edx
call fcn.004b7b6c
add esp, 8
push 0x552bf0
lea eax, [ebp - 0x628]
push eax
call fcn.004b7b6c
add esp, 8
push 0x552bf4
lea ecx, [ebp - 0x628]
push ecx
call fcn.004b7b6c
add esp, 8
push 0x552c08
lea edx, [ebp - 0x628]
push edx
call fcn.004b7b6c
add esp, 8
lea eax, [ebp - 0x628]
push eax
push 0x104
lea ecx, [ebp - 0x420]
push ecx
push 0x552c14
push 0x552c18
push 0x552c30
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
push 0x552c40
lea edx, [ebp - 0x420]
push edx
call fcn.00401d40
add esp, 8
mov dword [ebp - 0xc], eax
push 0x552c50
lea eax, [ebp - 0x420]
push eax
call fcn.00401d40
add esp, 8
mov dword [ebp - 4], eax
cmp dword [ebp - 0xc], 0
je 0x401624
cmp dword [ebp - 4], 0
je 0x401624
lea ecx, [ebp - 0x420]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x401624
lea edx, [ebp - 0x420]
push edx
mov eax, dword [ebp - 0x840]
add eax, 0x14
push eax
call fcn.004b7b9a
add esp, 8
mov ecx, dword [ebp - 0x840]
mov dword [ecx + 0x10], 1
jmp 0x401870
xor edx, edx
mov word [ebp - 0x838], dx
push 0x206
push 0
lea eax, [ebp - 0x836]
push eax
call fcn.004b7bc0
add esp, 0xc
push 0x552c64
lea ecx, [ebp - 0x838]
push ecx
call fcn.004b7b9a
add esp, 8
push 0x552c78
lea edx, [ebp - 0x838]
push edx
call fcn.004b7b6c
add esp, 8
push 0x552c88
lea eax, [ebp - 0x838]
push eax
call fcn.004b7b6c
add esp, 8
push 0x552c8c
lea ecx, [ebp - 0x838]
push ecx
call fcn.004b7b6c
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 0x401781
mov dword [ebp - 0x83c], 0x104
lea ecx, [ebp - 0x83c]
push ecx
lea edx, [ebp - 0x420]
push edx
push 0
push 0
push 0x552ca0
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 0x401781
push 0x552cb8
lea ecx, [ebp - 0x420]
push ecx
call fcn.00401d40
add esp, 8
mov dword [ebp - 0xc], eax
push 0x552cc8
lea edx, [ebp - 0x420]
push edx
call fcn.00401d40
add esp, 8
mov dword [ebp - 4], eax
cmp dword [ebp - 0xc], 0
je 0x401781
cmp dword [ebp - 4], 0
je 0x401781
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x401781
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, 0x14
push eax
call fcn.004b7b9a
add esp, 8
mov ecx, dword [ebp - 0x840]
mov dword [ecx + 0x10], 1
jmp 0x401870
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.004b7bc0
add esp, 0xc
mov edx, dword [ebp - 0x840]
mov eax, dword [edx + 8]
push eax
push 0x552cdc
lea ecx, [ebp - 0x218]
push ecx
call fcn.004b7a6c
add esp, 0xc
lea edx, [ebp - 0x218]
push edx
push 0x104
lea eax, [ebp - 0x420]
push eax
push 0x552cf8
push str.ConfigPath
push 0x552d14
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
push 0x552d24
lea ecx, [ebp - 0x420]
push ecx
call fcn.00401d40
add esp, 8
mov dword [ebp - 0xc], eax
push 0x552d34
lea edx, [ebp - 0x420]
push edx
call fcn.00401d40
add esp, 8
mov dword [ebp - 4], eax
cmp dword [ebp - 0xc], 0
je 0x401863
cmp dword [ebp - 4], 0
je 0x401863
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x401863
lea ecx, [ebp - 0x420]
push ecx
mov edx, dword [ebp - 0x840]
add edx, 0x14
push edx
call fcn.004b7b9a
add esp, 8
mov eax, dword [ebp - 0x840]
mov dword [eax + 0x10], 1
jmp 0x401870
mov ecx, dword [ebp - 0x840]
mov dword [ecx + 0x10], 0
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004b7b5d
mov esp, ebp
pop ebp
ret