Function at 0x405670
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x124
push 0
lea eax, [ebp - 0xc]
push eax
push 0
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx + 8]
push edx
push 0
push 0
push 0
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
push edx
call fcn.00405970
add esp, 0x24
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x405964
mov eax, dword [ebp + 0x10]
cmp dword [eax + 0x10], 0
jne 0x40576c
mov ecx, dword [ebp + 0x10]
mov dword [ecx + 8], 1
mov dword [ebp - 0x11c], 0xffffffff
cmp dword [ebp + 0x18], 1
jne 0x4056fc
push 0
push 0
push 0
push 0
push 0
push 0
push 0
lea edx, [ebp - 0x11c]
push edx
push 0
push 0
push 0
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
mov dword [ebp - 4], eax
cmp dword [ebp + 0x18], 2
jne 0x40572a
push 0
push 0
push 0
push 0
lea ecx, [ebp - 0x11c]
push ecx
push 0
push 0
push 0
push 0
push 0
push 0
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x405744
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 5
jmp 0x405966
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x11c], 0xffffffff
jne 0x405761
mov eax, 5
jmp 0x405966
mov eax, dword [ebp - 0x11c]
jmp 0x405966
cmp dword [ebp + 0x18], 1
jne 0x405871
mov dword [ebp - 0x120], 0
jmp 0x405791
mov edx, dword [ebp - 0x120]
add edx, 1
mov dword [ebp - 0x120], edx
mov dword [ebp - 8], 0x104
mov eax, dword [ebp - 8]
push eax
push 0
lea ecx, [ebp - 0x118]
push ecx
call sub.msvcrt.dll_memset
add esp, 0xc
push 0
push 0
push 0
push 0
lea edx, [ebp - 8]
push edx
lea eax, [ebp - 0x118]
push eax
mov ecx, dword [ebp - 0x120]
push ecx
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
je 0x4057e9
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 3
jmp 0x405966
mov ecx, dword [ebp + 0xc]
cmp ecx, dword [ebp - 0x120]
jne 0x40586c
mov edx, dword [ebp + 0x14]
cmp dword [edx], 0x104
jbe 0x405813
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 6
jmp 0x405966
mov ecx, dword [ebp + 0x14]
mov edx, dword [ecx]
cmp edx, dword [ebp - 8]
jae 0x405831
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 6
jmp 0x405966
mov ecx, dword [ebp + 0x10]
cmp dword [ecx + 0x10], 0
je 0x40586a
push 0x104
push 0
mov edx, dword [ebp + 0x10]
mov eax, dword [edx + 0x10]
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov ecx, dword [ebp - 8]
push ecx
lea edx, [ebp - 0x118]
push edx
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax + 0x10]
push ecx
call sub.msvcrt.dll_memcpy
add esp, 0xc
jmp 0x405871
jmp 0x405782
cmp dword [ebp + 0x18], 2
jne 0x40595a
mov dword [ebp - 0x124], 0
jmp 0x405896
mov edx, dword [ebp - 0x124]
add edx, 1
mov dword [ebp - 0x124], edx
mov dword [ebp - 8], 0x104
mov eax, dword [ebp - 8]
push eax
push 0
lea ecx, [ebp - 0x118]
push ecx
call sub.msvcrt.dll_memset
add esp, 0xc
mov edx, dword [ebp + 0x10]
mov eax, dword [edx + 0x14]
add eax, 0x10c
push eax
push 0
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx + 0x14]
add edx, 0x108
push edx
push 0
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 0x118]
push ecx
mov edx, dword [ebp - 0x124]
push edx
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
test eax, eax
je 0x405900
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 4
jmp 0x405966
mov edx, dword [ebp + 0xc]
cmp edx, dword [ebp - 0x124]
jne 0x405955
mov eax, dword [ebp + 0x10]
cmp dword [eax + 0x14], 0
je 0x405944
push 0x104
push 0
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx + 0x14]
push edx
call sub.msvcrt.dll_memset
add esp, 0xc
mov eax, dword [ebp - 8]
push eax
lea ecx, [ebp - 0x118]
push ecx
mov edx, dword [ebp + 0x10]
mov eax, dword [edx + 0x14]
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx + 0x14]
mov eax, dword [ebp - 8]
mov dword [edx + 0x104], eax
jmp 0x40595a
jmp 0x405887
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
mov esp, ebp
pop ebp
ret