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

Disassembly:
sub esp, 0xa34
mov eax, dword [0x437164]
xor eax, esp
mov dword [esp + 0xa30], eax
push ebx
push ebp
push esi
push edi
xor ebx, ebx
push 0x206
lea eax, [esp + 0x226]
push ebx
push eax
mov ebp, ecx
mov word [esp + 0x22c], bx
call fcn.00408700
push 0x206
lea ecx, [esp + 0x2a]
push ebx
push ecx
mov word [esp + 0x30], bx
call fcn.00408700
add esp, 0x18
push ebx
push 0x2b
lea edx, [esp + 0x228]
push edx
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea edi, [esp + 0x220]
add edi, 0xfffffffe
jmp 0x406420
mov ax, word [edi + 2]
add edi, 2
cmp ax, bx
jne 0x406420
mov edx, dword [0x42d65c]
lea eax, [esp + 0x220]
mov dword [edi], edx
add eax, 0xfffffffe
mov edi, edi
mov cx, word [eax + 2]
add eax, 2
cmp cx, bx
jne 0x406440
mov ecx, dword [str.GSInput]
mov dword [eax], ecx
mov ecx, dword [0x42d5f8]
mov dword [eax + 4], ecx
mov ecx, dword [0x42d5fc]
mov dword [eax + 8], ecx
mov ecx, dword [0x42d600]
lea edi, [esp + 0x220]
mov dword [eax + 0xc], ecx
add edi, 0xfffffffe
lea esp, [esp]
mov ax, word [edi + 2]
add edi, 2
cmp ax, bx
jne 0x406480
lea eax, [esp + 0x220]
mov dword [edi], edx
add eax, 0xfffffffe
jmp 0x4064a0
mov cx, word [eax + 2]
add eax, 2
cmp cx, bx
jne 0x4064a0
mov edx, dword [str.gswb]
mov ecx, dword [0x42d654]
mov dword [eax], edx
mov dx, word [0x42d658]
mov dword [eax + 4], ecx
mov word [eax + 8], dx
lea eax, [esp + 0x220]
add eax, 0xfffffffe
mov cx, word [eax + 2]
add eax, 2
cmp cx, bx
jne 0x4064d2
mov ecx, dword [str..ini]
mov edx, dword [0x42d648]
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov dword [eax], ecx
mov cx, word [0x42d64c]
mov dword [eax + 4], edx
lea edx, [esp + 0x220]
push edx
push 0x104
mov word [eax + 8], cx
lea eax, [esp + 0x20]
push eax
push 0x42d3b8
push str.CfgUserPath
push str.Globals
call edi
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea ecx, [esp + 0x18]
push ecx
call esi
test eax, eax
je 0x406566
lea eax, [esp + 0x18]
lea edx, [eax + 2]
jmp 0x406540
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x406540
sub eax, edx
sar eax, 1
push eax
lea edx, [esp + 0x1c]
push edx
lea ecx, [ebp + 0x1c]
call fcn.00401f70
mov byte [ebp + 0x19], 1
jmp 0x406708
push 0x206
lea eax, [esp + 0x42e]
push ebx
push eax
mov word [esp + 0x434], bx
call fcn.00408700
add esp, 0xc
xor eax, eax
jmp 0x406590
movzx ecx, word [eax + str.SOFTWARE_]
mov word [esp + eax + 0x428], cx
add eax, 2
cmp cx, bx
jne 0x406590
lea eax, [esp + 0x428]
add eax, 0xfffffffe
mov cx, word [eax + 2]
add eax, 2
cmp cx, bx
jne 0x4065b1
mov ecx, dword [str.GSInput]
mov edx, dword [0x42d5f8]
mov dword [eax], ecx
mov ecx, dword [0x42d5fc]
mov dword [eax + 4], edx
mov edx, dword [0x42d600]
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edx
lea eax, [esp + 0x10]
push eax
push 0xf003f
push ebx
lea ecx, [esp + 0x434]
push ecx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x406656
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x1c]
push eax
push ebx
push ebx
push str.CfgUserPath
push ecx
mov dword [esp + 0x2c], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x406656
lea edx, [esp + 0x18]
push edx
call esi
test eax, eax
je 0x406656
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x18]
push ecx
lea ecx, [ebp + 0x1c]
call fcn.004021b0
mov byte [ebp + 0x19], 1
jmp 0x406708
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x104
lea eax, [esp + 0x83c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [esp + 0x838]
push 0x5c
push ecx
call fcn.004085e0
push 0x206
lea edx, [esp + 0x63e]
push ebx
mov word [eax + 2], bx
push edx
mov word [esp + 0x644], bx
call fcn.00408700
lea eax, [esp + 0x84c]
push eax
lea ecx, [esp + 0x648]
push str._sSoftApp.ini
push ecx
call fcn.00408610
add esp, 0x20
lea edx, [esp + 0x630]
push edx
push 0x104
lea eax, [esp + 0x20]
push eax
push 0x42d3b8
push str.CfgUserPath
push str.AppInfo
call edi
lea ecx, [esp + 0x18]
push ecx
call esi
test eax, eax
je 0x406705
lea eax, [esp + 0x18]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4066f5
jmp 0x40654b
mov byte [ebp + 0x19], bl
mov ecx, dword [esp + 0xa40]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004086c2
add esp, 0xa34
ret