Function at 0x401040
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x210
mov dword [esp], 2
push ebx
mov ebx, dword [esp + 0x218]
push ebp
mov al, byte [ebx]
push edi
xor edi, edi
xor ebp, ebp
test al, al
je 0x4012a1
push esi
jmp 0x40106b
xor edi, edi
push 8
push str._profile
lea esi, [ebp + ebx]
push esi
call fcn.00406090
add esp, 0xc
test eax, eax
jne 0x4011ba
mov dword [esp + 0x14], edi
add ebp, 8
mov al, byte [ebp + ebx]
cmp al, 0x20
je 0x40109e
cmp al, 9
je 0x40109e
cmp al, 0x22
jne 0x4010a1
inc ebp
jmp 0x40108e
mov edi, dword [esp + 0x228]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
lea edx, [esp + 0x20]
shr ecx, 2
mov esi, edi
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.Profiles
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x20]
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
shr ecx, 2
dec edi
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x14]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x24]
push ecx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x401293
push 0x22
lea esi, [ebp + ebx]
mov dword [esp + 0x1c], 0x100
push esi
call fcn.00403a70
add esp, 8
test eax, eax
je 0x401132
mov byte [eax], 0
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x124]
push eax
lea ecx, [esp + 0x24]
push ecx
push 0
mov edx, dword [esp + 0x24]
push esi
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x401293
lea edi, [esp + 0x120]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x228]
not ecx
sub edi, ecx
mov edx, ecx
shr ecx, 2
mov esi, edi
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor edx, edx
cmp byte [eax - 1], 0
je 0x401293
mov cl, byte [eax]
cmp cl, 0x20
je 0x4011aa
cmp cl, 9
je 0x4011aa
inc edx
inc eax
cmp edx, 0x80
jb 0x401185
jmp 0x401293
mov eax, dword [esp + 0x228]
mov byte [edx + eax], 0
jmp 0x401293
push 4
push str._ove
push esi
call fcn.00406090
add esp, 0xc
test eax, eax
jne 0x4011da
add ebp, 4
mov dword [esp + 0x10], edi
jmp 0x401293
push 4
push str._nov
push esi
call fcn.00406090
add esp, 0xc
test eax, eax
jne 0x4011fe
add ebp, 4
mov dword [esp + 0x10], 1
jmp 0x401293
push 4
push str._sil
push esi
call fcn.00406090
add esp, 0xc
test eax, eax
jne 0x401272
add ebp, 4
mov dword [esp + 0x10], 3
mov al, byte [ebp + ebx]
cmp al, 0x20
je 0x40122d
cmp al, 9
je 0x40122d
cmp al, 0x22
jne 0x401230
inc ebp
jmp 0x40121d
lea edi, [ebp + ebx]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov edx, dword [esp + 0x22c]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [ecx + edx - 1], 0x22
jne 0x401293
mov byte [ecx + edx - 1], 0
jmp 0x401293
push 6
push str._noerr
push esi
call fcn.00406090
add esp, 0xc
test eax, eax
jne 0x401293
add ebp, 6
mov dword [0x408f60], 1
mov al, byte [ebp + ebx + 1]
inc ebp
test al, al
jne 0x401069
pop esi
mov eax, dword [esp + 0xc]
pop edi
pop ebp
pop ebx
add esp, 0x210
ret