Function at 0x406b90
Capabilities:
Query or enumerate registry key
Query or enumerate registry value
Set registry value

Disassembly:
sub esp, 0x38
push ebx
push ebp
push esi
mov esi, dword [esp + 0x48]
lea eax, [esp + 0x10]
push edi
mov dword [esp + 0x44], ecx
xor edi, edi
mov ecx, dword [esp + 0x50]
push eax
push 0x20019
push edi
push ecx
push esi
mov dword [esp + 0x28], edi
mov dword [esp + 0x40], edi
mov dword [esp + 0x3c], edi
mov dword [esp + 0x38], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x24], edi
mov dword [esp + 0x30], edi
mov dword [esp + 0x4c], edi
xor ebp, ebp
mov dword [esp + 0x50], edi
mov dword [esp + 0x48], edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x406bed
xor esi, esi
jmp 0x406dfc
mov eax, dword [esp + 0x54]
lea edx, [esp + 0x2c]
push edi
push edx
push edi
push 0xf003f
push edi
push edi
push edi
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x406c13
xor esi, esi
jmp 0x406dfc
push edi
lea ecx, [esp + 0x1c]
push edi
lea edx, [esp + 0x24]
push ecx
lea eax, [esp + 0x30]
push edx
push eax
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x24]
push edi
lea edx, [esp + 0x40]
push ecx
push edx
push edi
push edi
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
test eax, eax
je 0x406c48
xor esi, esi
jmp 0x406dfc
mov ecx, dword [esp + 0x1c]
add ecx, 2
push ecx
call fcn.0040ecd8
mov esi, eax
add esp, 4
cmp esi, edi
mov dword [esp + 0x3c], esi
jne 0x406c69
xor esi, esi
jmp 0x406dfc
mov edx, dword [esp + 0x18]
add edx, 2
push edx
call fcn.0040ecd8
mov ebx, eax
add esp, 4
cmp ebx, edi
mov dword [esp + 0x38], ebx
jne 0x406c8a
xor esi, esi
jmp 0x406dfc
mov eax, dword [esp + 0x10]
add eax, 2
push eax
call fcn.0040ecd8
mov ebp, eax
add esp, 4
cmp ebp, edi
jne 0x406ca7
xor esi, esi
jmp 0x406dfc
mov eax, dword [esp + 0x24]
mov dword [esp + 0x20], edi
cmp eax, edi
jbe 0x406d1c
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
add ecx, 2
lea eax, [esp + 0x30]
mov dword [esp + 0x30], ecx
add edx, 2
push eax
mov eax, dword [esp + 0x24]
lea ecx, [esp + 0x38]
mov dword [esp + 0x44], edx
push ebx
push ecx
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x4c]
push edi
push edx
push esi
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
test eax, eax
jne 0x406ca0
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x2c]
push edx
push ebx
push eax
push edi
push esi
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x406ca0
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
inc eax
cmp eax, ecx
mov dword [esp + 0x20], eax
jb 0x406cb3
mov edi, dword [esp + 0x50]
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [ecx + edx + 2]
push eax
call fcn.0040ecd8
mov edi, dword [esp + 0x58]
mov ebx, eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov edx, dword [esp + 0x14]
not ecx
dec ecx
lea eax, [ecx + edx + 2]
push eax
call fcn.0040ecd8
mov edi, eax
mov eax, dword [esp + 0x30]
add esp, 8
mov dword [esp + 0x20], 0
test eax, eax
jbe 0x406ddb
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x14]
add ecx, 2
push ecx
push ebp
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
test eax, eax
jne 0x406e53
mov ecx, dword [esp + 0x50]
push ebp
push ecx
push 0x41c0b0
push ebx
call fcn.0040d5cb
mov edx, dword [esp + 0x64]
add esp, 0x10
push ebp
push edx
push 0x41c0b0
push edi
call fcn.0040d5cb
mov eax, dword [esp + 0x5c]
mov ecx, dword [esp + 0x54]
add esp, 0x10
push edi
push ebx
push eax
call fcn.00406b90
mov esi, eax
test esi, esi
je 0x406de0
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x28]
inc eax
cmp eax, ecx
mov dword [esp + 0x20], eax
jb 0x406d6b
mov esi, 1
test ebx, ebx
je 0x406ded
push ebx
call fcn.0040ebef
add esp, 4
test edi, edi
je 0x406dfa
push edi
call fcn.0040ebef
add esp, 4
xor edi, edi
mov eax, dword [esp + 0x14]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp eax, edi
je 0x406e0d
push eax
call ebx
mov eax, dword [esp + 0x2c]
cmp eax, edi
je 0x406e18
push eax
call ebx
cmp ebp, edi
je 0x406e25
push ebp
call fcn.0040ebef
add esp, 4
mov eax, dword [esp + 0x38]
cmp eax, edi
je 0x406e36
push eax
call fcn.0040ebef
add esp, 4
mov eax, dword [esp + 0x3c]
cmp eax, edi
je 0x406e47
push eax
call fcn.0040ebef
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret 0xc
xor esi, esi
jmp 0x406de0