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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x134
push ebx
xor ebx, ebx
cmp dword [0x40da7c], ebx
push esi
push edi
mov edi, 0x104
je 0x404dd0
mov eax, dword [0x40da80]
cmp eax, 0x10
jb 0x404d5f
mov eax, dword [0x40d060]
jmp 0x404d66
mov eax, dword [eax*4 + 0x40d05c]
mov ecx, dword [0x40d9ec]
mov byte [ecx], bl
lea ecx, [ebp - 8]
push ecx
push 0x20019
push ebx
push dword [0x40da7c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x404db3
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], edi
push eax
lea eax, [ebp - 0x10]
push dword [0x40d9ec]
push eax
push ebx
push dword [0x40da78]
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 [0x40d9ec]
cmp byte [eax], bl
je 0x404e79
push eax
push dword [0x40d9f4]
call fcn.00407ab0
pop ecx
pop ecx
jmp 0x404e30
cmp dword [0x40da74], ebx
je 0x404e79
cmp dword [0x40da70], ebx
je 0x404e79
cmp dword [0x40da6c], ebx
je 0x404e79
push dword [0x40d9f4]
push dword [0x40d9ec]
call fcn.00407ab0
pop ecx
pop ecx
push dword [0x40da74]
push edi
push dword [0x40d9f4]
push dword [0x40d9ec]
push dword [0x40da6c]
push dword [0x40da70]
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
je 0x404e79
mov eax, dword [0x40d9f4]
cmp byte [eax], bl
je 0x404f86
push eax
call fcn.00407bc7
test eax, eax
pop ecx
je 0x404e60
push dword [0x40d9f4]
call fcn.00407a30
pop ecx
mov ecx, dword [0x40d9f4]
mov byte [eax + ecx - 1], bl
jmp 0x404e30
mov eax, dword [0x40d9f4]
cmp byte [eax], bl
je 0x404f86
push eax
call fcn.00404f8b
pop ecx
jmp 0x404f86
mov eax, dword [0x40d9f4]
cmp byte [eax], 0x23
jne 0x404f86
inc eax
push 0x23
push eax
call fcn.00408390
mov esi, eax
pop ecx
cmp esi, ebx
pop ecx
je 0x404f86
mov al, byte [esi + 1]
inc esi
push str.Windows
mov byte [ebp - 1], al
mov byte [esi], bl
push dword [0x40d9f4]
mov byte [ebp - 0x134], bl
call fcn.00407d00
pop ecx
test eax, eax
pop ecx
jne 0x404ed1
lea eax, [ebp - 0x134]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
jmp 0x404f4e
push str.System
push dword [0x40d9f4]
call fcn.00407d00
pop ecx
test eax, eax
pop ecx
jne 0x404ef7
lea eax, [ebp - 0x134]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
jmp 0x404f4e
push str.Program_Files
push dword [0x40d9f4]
call fcn.00407d00
pop ecx
test eax, eax
pop ecx
jne 0x404f4e
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 0x404f58
inc esi
lea eax, [ebp - 0x134]
push eax
call fcn.00405cca
lea eax, [ebp - 0x134]
push esi
push eax
call fcn.00407ac0
lea eax, [ebp - 0x134]
push eax
push dword [0x40d9f4]
call fcn.00407ab0
add esp, 0x14
pop edi
pop esi
pop ebx
leave
ret