Function at 0x405990
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa4
lea eax, [ebp - 0xc]
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
push eax
push 0x20008
push 0
push str.Control_PanelAppearanceClassicSchemes
push 0x80000001
call ebx
test eax, eax
je 0x4059c2
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
push esi
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor esi, esi
mov dword [ebp - 0x10], 0
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], 0x1d
push eax
lea eax, [ebp - 0x68]
push eax
push esi
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
inc esi
mov dword [ebp - 0x14], esi
test eax, eax
jne 0x405bdb
lea eax, [ebp - 0x18]
push eax
push 0x20008
push 0
lea eax, [ebp - 0x68]
push eax
push dword [ebp - 0xc]
call ebx
test eax, eax
jne 0x405bdb
push 0xc
push eax
mov eax, dword [0x40b46c]
push dword [eax + 8]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
mov dword [ebp - 0x2c], edi
test edi, edi
jne 0x405a46
push dword [ebp - 0x18]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 8], eax
call edi
jmp 0x4059d3
lea eax, [ebp - 0x68]
push eax
call fcn.004013a0
add esp, 4
mov dword [edi + 8], eax
test eax, eax
jne 0x405a80
push edi
push eax
mov eax, dword [0x40b46c]
push dword [eax + 8]
call dword [sym.imp.KERNEL32.dll_HeapFree]
push dword [ebp - 0x18]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 8], 0
call edi
jmp 0x4059d3
mov dword [edi + 4], 0
xor ebx, ebx
mov dword [edi], 0
xor esi, esi
mov eax, dword [ebp - 0x18]
mov dword [ebp - 8], edi
xor edi, edi
mov dword [ebp - 4], eax
nop dword [eax]
push 0
push 0
push 0
push 0
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x20], 0x1d
push ecx
lea ecx, [ebp - 0xa4]
push ecx
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
inc edi
mov dword [ebp - 0x28], edi
test eax, eax
jne 0x405b94
lea eax, [ebp - 0x24]
push eax
push 0x20000
push 0
lea eax, [ebp - 0xa4]
push eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x405b94
push 0xc
push eax
mov eax, dword [0x40b46c]
mov edi, esi
push dword [eax + 8]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
jne 0x405b1b
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [ebp - 0x28]
mov eax, dword [ebp - 4]
jmp 0x405aa0
lea eax, [ebp - 0xa4]
push eax
call fcn.004013a0
add esp, 4
mov dword [esi + 8], eax
test eax, eax
jne 0x405b57
push esi
push eax
mov eax, dword [0x40b46c]
push dword [eax + 8]
call dword [sym.imp.KERNEL32.dll_HeapFree]
push dword [ebp - 0x24]
xor esi, esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [ebp - 0x28]
mov eax, dword [ebp - 4]
jmp 0x405aa0
mov dword [esi + 4], 0
mov dword [esi], 0
test ebx, ebx
je 0x405b7e
mov dword [edi], esi
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [ebp - 0x28]
mov eax, dword [ebp - 4]
jmp 0x405aa0
push dword [ebp - 0x24]
mov ebx, esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [ebp - 0x28]
mov eax, dword [ebp - 4]
jmp 0x405aa0
cmp eax, 0x103
mov eax, dword [ebp - 4]
jne 0x405aa0
mov edi, dword [ebp - 0x2c]
mov dword [edi + 4], ebx
test ebx, ebx
je 0x405bb6
mov eax, dword [ebp - 0x10]
mov dword [edi], eax
mov dword [ebp - 0x10], edi
jmp 0x405bc2
lea eax, [ebp - 8]
push eax
call fcn.004056b0
add esp, 4
push dword [ebp - 0x18]
mov esi, dword [ebp - 0x14]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call edi
jmp 0x4059d3
cmp eax, 0x103
jne 0x4059d3
push dword [ebp - 0xc]
call edi
mov eax, dword [ebp - 0x10]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret