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

Disassembly:
push 0xffffffffffffffff
push 0x4675ab
mov eax, dword fs:[0]
push eax
sub esp, 0x854
mov eax, dword [0x47edd4]
xor eax, esp
mov dword [esp + 0x850], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x47edd4]
xor eax, esp
push eax
lea eax, [esp + 0x868]
mov dword fs:[0], eax
mov eax, dword [esp + 0x878]
mov esi, dword [esp + 0x87c]
xor ebx, ebx
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x880]
mov dword [esp + 0x1c], ebx
push ebx
mov dword [esp + 0x28], ecx
push 0x46a7dc
lea ecx, [esp + 0x30]
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], esi
mov dword [esp + 0x48], 7
mov dword [esp + 0x44], ebx
mov word [esp + 0x34], bx
call fcn.00401d60
push 0x206
lea edx, [esp + 0x4a]
push ebx
push edx
mov dword [esp + 0x87c], ebx
mov word [esp + 0x50], bx
call fcn.00420780
push 0x206
lea eax, [esp + 0x25e]
push ebx
push eax
mov word [esp + 0x264], bx
call fcn.00420780
push 0x206
lea ecx, [esp + 0x472]
push ebx
push ecx
mov word [esp + 0x478], bx
call fcn.00420780
add esp, 0x24
push ebx
push 0x2b
lea edx, [esp + 0x4c]
push edx
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea edi, [esp + 0x44]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
cmp ax, bx
jne 0x40abd1
mov ebp, dword [0x46b018]
mov eax, esi
mov dword [edi], ebp
mov edx, eax
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40abf0
lea edi, [esp + 0x44]
sub eax, edx
add edi, 0xfffffffe
mov cx, word [edi + 2]
add edi, 2
cmp cx, bx
jne 0x40ac04
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x44]
add edi, 0xfffffffe
jmp 0x40ac30
mov ax, word [edi + 2]
add edi, 2
cmp ax, bx
jne 0x40ac30
mov eax, dword [esp + 0x24]
mov dword [edi], ebp
mov edx, eax
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40ac44
lea edi, [esp + 0x44]
sub eax, edx
add edi, 0xfffffffe
jmp 0x40ac60
mov cx, word [edi + 2]
add edi, 2
cmp cx, bx
jne 0x40ac60
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [esp + 0x44]
rep movsb byte es:[edi], byte [esi]
add eax, 0xfffffffe
mov cx, word [eax + 2]
add eax, 2
cmp cx, bx
jne 0x40ac83
mov ecx, dword [str..ini]
mov edx, dword [0x46b804]
mov dword [eax], ecx
mov cx, word [0x46b808]
mov dword [eax + 4], edx
lea edx, [esp + 0x44]
push edx
push 0x104
mov word [eax + 8], cx
lea eax, [esp + 0x254]
push eax
push 0x46a7dc
push str.InstallPath
push str.Globals
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [esp + 0x24c]
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40ace0
sub eax, edx
sar eax, 1
cmp eax, ebx
jle 0x40ad59
lea ecx, [esp + 0x24c]
push ecx
mov ecx, dword [esp + 0x24]
call fcn.00409ee0
test eax, eax
je 0x40ad59
lea eax, [esp + 0x24c]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40ad12
sub eax, edx
sar eax, 1
push eax
lea edx, [esp + 0x250]
push edx
lea ecx, [esp + 0x30]
call fcn.00401d60
mov esi, dword [esp + 0x18]
push 0xffffffffffffffff
push ebx
lea eax, [esp + 0x30]
mov dword [esi + 0x18], 7
mov dword [esi + 0x14], ebx
push eax
mov ecx, esi
mov word [esi + 4], bx
call fcn.00401c70
jmp 0x40aee1
push 0x206
lea edx, [esp + 0x662]
push ebx
push edx
mov word [esp + 0x668], bx
call fcn.00420780
add esp, 0xc
xor eax, eax
lea esp, [esp]
movzx ecx, word [eax + str.SOFTWARE_]
mov word [esp + eax + 0x65c], cx
add eax, 2
cmp cx, bx
jne 0x40ad80
mov eax, dword [esp + 0x14]
mov edx, eax
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40ada0
lea edi, [esp + 0x65c]
sub eax, edx
add edi, 0xfffffffe
jmp 0x40adc0
mov cx, word [edi + 2]
add edi, 2
cmp cx, bx
jne 0x40adc0
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [esp + 0x1c]
push eax
and ecx, 3
push 0x20019
rep movsb byte es:[edi], byte [esi]
push ebx
lea ecx, [esp + 0x668]
push ecx
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40ae30
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x458]
push eax
push ebx
push ebx
push str.InstallPath
push ecx
mov dword [esp + 0x2c], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edx, dword [esp + 0x1c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [esp + 0x454]
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40ae40
sub eax, edx
sar eax, 1
cmp eax, ebx
jle 0x40aec2
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x454]
push eax
call fcn.00409ee0
test eax, eax
je 0x40aec2
lea eax, [esp + 0x454]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40ae72
sub eax, edx
sar eax, 1
push eax
lea ecx, [esp + 0x458]
push ecx
lea ecx, [esp + 0x30]
call fcn.00401d60
mov esi, dword [esp + 0x18]
push 0xffffffffffffffff
push ebx
lea edx, [esp + 0x30]
mov dword [esi + 0x18], 7
mov dword [esi + 0x14], ebx
push edx
mov ecx, esi
mov word [esi + 4], bx
call fcn.00401c70
cmp dword [esp + 0x40], 8
jb 0x40aef5
mov eax, dword [esp + 0x2c]
push eax
jmp 0x40aeed
mov esi, dword [esp + 0x18]
push ebx
mov dword [esi + 0x18], 7
mov dword [esi + 0x14], ebx
push 0x46a7dc
mov ecx, esi
mov word [esi + 4], bx
call fcn.00401d60
cmp dword [esp + 0x40], 8
jb 0x40aef5
mov ecx, dword [esp + 0x2c]
push ecx
call fcn.004176ed
add esp, 4
mov eax, esi
mov ecx, dword [esp + 0x868]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x850]
xor ecx, esp
call fcn.004206a6
add esp, 0x860
ret 0xc