Function at 0x406530
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4df0a6
mov eax, dword fs:[0]
push eax
sub esp, 0x258
mov eax, dword [0x509018]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov ebx, ecx
mov dword [ebp - 0x260], ebx
mov eax, dword [ebp + 8]
movzx eax, al
shl eax, 8
cmp dword [esi + 0x14], 8
mov dword [ebp - 0x264], eax
lea edx, [eax + 0xf003f]
mov eax, esi
jb 0x406587
mov eax, dword [esi]
lea ecx, [ebp - 0x258]
push ecx
push edx
push 0
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov edi, eax
test edi, edi
jne 0x4068a5
push esi
lea ecx, [ebp - 0x254]
call fcn.00402dc0
push 1
push 0x4ef608
lea ecx, [ebp - 0x254]
mov dword [ebp - 4], edi
call fcn.004033e0
lea eax, [ebp - 0x23c]
mov dword [ebp - 0x21c], 0x104
push eax
push edi
push edi
push edi
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x218]
push eax
push edi
push dword [ebp - 0x258]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x406728
nop dword [eax + eax]
lea eax, [ebp - 0x254]
push eax
lea ecx, [ebp - 0x234]
call fcn.00402dc0
lea ecx, [ebp - 0x218]
mov byte [ebp - 4], 1
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x406620
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x234]
call fcn.004033e0
push 0
push 1
push dword [ebp + 8]
lea edx, [ebp - 0x234]
mov ecx, ebx
call fcn.00406530
add esp, 0xc
test al, al
je 0x4066e4
lea eax, [ebp - 0x23c]
mov dword [ebp - 0x21c], 0x104
push eax
push 0
push 0
push 0
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x218]
push eax
push 0
push dword [ebp - 0x258]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
mov byte [ebp - 4], 0
mov edi, eax
mov edx, dword [ebp - 0x220]
cmp edx, 8
jb 0x4066da
mov ecx, dword [ebp - 0x234]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4066d0
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4068c4
push edx
push ecx
call fcn.004bda5c
add esp, 8
test edi, edi
je 0x406600
jmp 0x406728
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x220]
cmp edx, 8
jb 0x406728
mov ecx, dword [ebp - 0x234]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40671e
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4068c4
push edx
push ecx
call fcn.004bda5c
add esp, 8
push dword [ebp - 0x258]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push str.RegDeleteKeyExW
push 0x4f7790
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp byte [ebp + 8], 0
mov ebx, eax
je 0x40677b
test ebx, ebx
je 0x40677b
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x406761
mov eax, dword [esi]
push 0
push 0x100
push eax
push dword [ebp - 0x260]
mov ecx, ebx
call dword [0x4e2324]
call ebx
jmp 0x406792
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x406785
mov eax, dword [esi]
push eax
push dword [ebp - 0x260]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
mov edi, eax
cmp edi, 5
jne 0x406867
test dword [ebp + 0xc], 0x10000000
jne 0x406867
mov ecx, dword [ebp - 0x264]
mov eax, esi
add ecx, 0x60019
mov dword [ebp - 0x25c], 0
cmp dword [esi + 0x14], 8
jb 0x4067ca
mov eax, dword [esi]
lea edx, [ebp - 0x25c]
push edx
push ecx
push 0
push eax
push dword [ebp - 0x260]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ecx, dword [ebp - 0x25c]
test ecx, ecx
je 0x406821
lea eax, [ebp - 0x264]
mov dword [ebp - 0x264], 0x10000000
push eax
call fcn.00406240
mov ecx, dword [ebp - 0x25c]
add esp, 4
mov dword [ebp - 0x264], eax
test ecx, ecx
je 0x406821
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x264]
test eax, eax
jne 0x406867
cmp byte [ebp + 8], al
je 0x406850
test ebx, ebx
je 0x406850
cmp dword [esi + 0x14], 8
jb 0x406836
mov esi, dword [esi]
push 0
push 0x100
push esi
push dword [ebp - 0x260]
mov ecx, ebx
call dword [0x4e2324]
call ebx
jmp 0x406865
cmp dword [esi + 0x14], 8
jb 0x406858
mov esi, dword [esi]
push esi
push dword [ebp - 0x260]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
mov edi, eax
mov edx, dword [ebp - 0x240]
cmp edx, 8
jb 0x4068a3
mov ecx, dword [ebp - 0x254]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x406899
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4068c9
push edx
push ecx
call fcn.004bda5c
add esp, 8
test edi, edi
sete al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004bda16
mov esp, ebp
pop ebp
ret
call fcn.004c59a2
call fcn.004c59a2
int3