Function at 0x412470
Capabilities:
Get common file path
Get program files directory
Query or enumerate registry value
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x828
mov eax, dword [0x421040]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp - 0x824]
push eax
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
lea eax, [ebp - 0x820]
push eax
push 0x26
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
js 0x4124c8
push 0x422b60
push dword [ebp - 0x820]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
mov eax, dword [ebp - 0x824]
push dword [ebp - 0x820]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x14]
mov eax, dword [ebp - 0x824]
push esi
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov edx, 0x41d484
mov ecx, 0x41d498
call fcn.004122e0
mov edx, eax
mov esi, eax
nop dword [eax + eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x4124f0
push edi
mov edi, 0x422b60
sub edx, esi
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x412506
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x422d68
add ecx, 0xfffffffe
nop dword [eax + eax]
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x412530
mov eax, dword [0x41d49c]
mov edi, 0x422ef8
mov dword [ecx], eax
add edi, 0xfffffffe
mov eax, dword [0x41d4a0]
mov dword [ecx + 4], eax
mov eax, dword [0x41d4a4]
mov dword [ecx + 8], eax
mov eax, dword [0x41d4a8]
mov dword [ecx + 0xc], eax
mov ax, word [0x41d4ac]
mov word [ecx + 0x10], ax
nop dword [eax]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x412570
mov ecx, 7
mov esi, 0x41d4b0
rep movsd dword es:[edi], dword [esi]
mov edx, 0x41d4d8
mov ecx, 0x41d4f0
call fcn.004122e0
lea ecx, [ebp - 0x820]
push ecx
push 0xf003f
push 0
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
pop edi
test eax, eax
jne 0x4125fc
lea eax, [ebp - 0x824]
mov dword [ebp - 0x824], 0x80
push eax
lea eax, [ebp - 0x204]
push eax
lea eax, [ebp - 0x828]
push eax
push 0
push 0x41d4cc
push dword [ebp - 0x820]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x4127d8
push dword [ebp - 0x820]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, 0x422b60
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [ecx - 0x412], ax
test ax, ax
jne 0x412601
mov ecx, 0x422750
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x412620
sub ecx, edx
sar ecx, 1
dec ecx
cmp ecx, 1
jle 0x41264a
cmp word [ecx*2 + 0x422750], 0x5c
jne 0x41264a
xor eax, eax
mov word [ecx*2 + 0x422750], ax
mov ecx, 0x422750
nop
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [ecx + 0x206], ax
test ax, ax
jne 0x412650
lea ecx, [ebp - 0x81c]
mov word [0x423088], 1
call fcn.00412040
push 0x41e1a0
mov edx, 0x41e1bc
lea ecx, [ebp - 0x81c]
call fcn.004136f0
lea edx, [ebp - 0x40c]
add esp, 4
sub edx, eax
nop word [eax + eax]
movzx ecx, word [eax]
lea eax, [eax + 2]
mov word [edx + eax - 2], cx
test cx, cx
jne 0x4126a0
lea eax, [ebp - 0x40c]
push eax
push 0x190
lea eax, [ebp - 0x198]
push eax
push 0x41e1c0
push 0x41e1c4
push 0x41e1d4
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov ax, word [ebp - 0x198]
cmp ax, 0x42
je 0x4126fb
cmp ax, 0x4d
je 0x41289c
mov eax, 0x42
mov word [ebp - 0x198], ax
mov byte [0x42308d], 1
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
lea eax, [ebp - 0x40c]
push eax
push 0
push 0x41e1e8
push 0x41e200
call esi
cmp eax, 1
lea eax, [ebp - 0x40c]
push eax
push 0
push 0x41e214
push 0x41e220
sete byte [0x42308a]
call esi
cmp eax, 1
lea eax, [ebp - 0x40c]
push eax
push 1
push 0x41e234
push 0x41e240
sete byte [0x42308b]
call esi
cmp eax, 1
lea eax, [ebp - 0x40c]
push eax
push 0
push 0x41e254
push 0x41e264
sete byte [0x42308c]
call esi
cmp eax, 1
lea eax, [ebp - 0x40c]
push eax
push 0
push 0x41e278
push 0x41e288
sete byte [0x42308e]
call esi
mov dword [0x423090], eax
pop esi
cmp eax, 0x256
jne 0x4127b0
mov dword [0x423090], 0
cmp byte [0x42308a], 0
jne 0x4127ca
mov byte [0x42308b], 0
mov dword [0x423090], 0
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401288
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x828]
dec eax
cmp eax, 3
ja case.default.0x4127e4
jmp dword [eax*4 + 0x4128a8]
lea eax, [ebp - 0x204]
push eax
lea eax, [ebp - 0x614]
push 0x41da6c
push eax
call fcn.00401010
add esp, 0xc
jmp 0x412868
lea eax, [ebp - 0x204]
push eax
lea eax, [ebp - 0x614]
push 0x41da74
push eax
call fcn.00401010
add esp, 0xc
jmp 0x412868
lea eax, [ebp - 0x204]
push eax
lea eax, [ebp - 0x614]
push 0x41da7c
push eax
call fcn.00401010
add esp, 0xc
jmp 0x412868
lea eax, [ebp - 0x204]
push eax
lea eax, [ebp - 0x614]
push 0x41da84
push eax
call fcn.00401010
add esp, 0xc
jmp 0x412868
xor eax, eax
mov word [ebp - 0x614], ax
push dword [ebp - 0x820]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
jne 0x4125fc
xor ecx, ecx
nop
movzx eax, word [ebp + ecx - 0x614]
lea ecx, [ecx + 2]
mov word [ecx + 0x42274e], ax
test ax, ax
jne 0x412880
jmp 0x412613
mov byte [0x42308d], 0
jmp 0x412702