Function at 0x405280
Capabilities:
Get common file path
Query or enumerate registry value
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x134
mov eax, dword [0x411ac0]
push ebx
xor ebx, ebx
push esi
mov byte [eax], bl
mov eax, dword [0x411b58]
push edi
cmp eax, ebx
mov edi, 0x104
je 0x4052fd
mov ecx, dword [0x411b5c]
cmp ecx, 0x10
jb 0x4052b6
mov ecx, dword [0x40f060]
jmp 0x4052bd
mov ecx, dword [ecx*4 + 0x40f05c]
lea edx, [ebp - 8]
push edx
push 0x20019
push ebx
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4052fd
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], edi
push eax
lea eax, [ebp - 0x10]
push dword [0x411ac0]
push eax
push ebx
push dword [0x411b54]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [0x411ac0]
cmp byte [eax], bl
jne 0x405365
cmp dword [0x411b50], ebx
je 0x405361
cmp dword [0x411b4c], ebx
je 0x405361
cmp dword [0x411b48], ebx
je 0x405361
push dword [0x411ac8]
push eax
call fcn.00408100
pop ecx
pop ecx
push dword [0x411b50]
push edi
push dword [0x411ac8]
push dword [0x411ac0]
push dword [0x411b48]
push dword [0x411b4c]
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
mov eax, dword [0x411ac0]
jne 0x405361
mov byte [eax], bl
mov eax, dword [0x411ac0]
cmp byte [eax], bl
je 0x4053d6
push eax
call fcn.00408217
test eax, eax
pop ecx
je 0x4053af
push 0x5c
push dword [0x411ac0]
call fcn.004081f0
mov esi, eax
pop ecx
cmp esi, ebx
pop ecx
je 0x4053a8
lea eax, [esi + 1]
push 0x2e
push eax
call fcn.00408850
pop ecx
test eax, eax
pop ecx
je 0x4053a8
mov byte [esi], bl
push dword [0x411ac0]
call fcn.00408217
test eax, eax
pop ecx
je 0x4053af
mov eax, dword [0x411ac0]
mov byte [eax], bl
mov eax, dword [0x411ac0]
cmp byte [eax], bl
je 0x4053d6
push eax
push dword [0x411ac8]
call fcn.00408100
mov eax, dword [0x411ac8]
pop ecx
pop ecx
cmp byte [eax], bl
je 0x4053db
push eax
call fcn.004054e8
pop ecx
mov eax, dword [0x411ac8]
cmp byte [eax], 0x23
jne 0x4054e3
inc eax
push 0x23
push eax
call fcn.00408850
mov esi, eax
pop ecx
cmp esi, ebx
pop ecx
je 0x4054e3
mov al, byte [esi + 1]
inc esi
push str.Windows
mov byte [ebp - 1], al
mov byte [esi], bl
push dword [0x411ac8]
mov byte [ebp - 0x134], bl
call fcn.004087b0
pop ecx
test eax, eax
pop ecx
jne 0x40542e
lea eax, [ebp - 0x134]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
jmp 0x4054ab
push str.System
push dword [0x411ac8]
call fcn.004087b0
pop ecx
test eax, eax
pop ecx
jne 0x405454
lea eax, [ebp - 0x134]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
jmp 0x4054ab
push str.Program_Files
push dword [0x411ac8]
call fcn.004087b0
pop ecx
test eax, eax
pop ecx
jne 0x4054ab
lea eax, [ebp - 8]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
lea eax, [ebp - 0xc]
mov dword [ebp - 0x10], ebx
push eax
lea eax, [ebp - 0x134]
push eax
lea eax, [ebp - 0x10]
push eax
push ebx
push str.ProgramFilesDir
mov dword [ebp - 0xc], edi
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, byte [ebp - 1]
cmp al, 0x5c
mov byte [esi], al
jne 0x4054b5
inc esi
lea eax, [ebp - 0x134]
push eax
call fcn.0040629f
lea eax, [ebp - 0x134]
push esi
push eax
call fcn.00408110
lea eax, [ebp - 0x134]
push eax
push dword [0x411ac8]
call fcn.00408100
add esp, 0x14
pop edi
pop esi
pop ebx
leave
ret