Function at 0x405f56
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42050a
mov eax, dword fs:[0]
push eax
sub esp, 0xff4
mov eax, dword [0x42d04c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov edi, ecx
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x405f91
mov eax, dword [esi]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
test eax, eax
je 0x4061d8
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x405fab
mov eax, dword [esi]
lea ecx, [ebp - 0xffc]
push ecx
push 0x20019
push 0
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4061d8
and dword [ebp - 0xfb8], eax
lea ecx, [ebp - 0xfc8]
and dword [ebp - 0xfb4], eax
push esi
call fcn.0040178d
and dword [ebp - 4], 0
mov ecx, dword [ebp - 0xfb8]
test ecx, ecx
je 0x406053
cmp dword [ebp - 0xfb4], 8
lea eax, [ebp - 0xfc8]
push 0x5c
cmovae eax, dword [ebp - 0xfc8]
pop edx
cmp word [eax + ecx*2 - 2], dx
je 0x406053
cmp ecx, dword [ebp - 0xfb4]
jae 0x40603f
cmp dword [ebp - 0xfb4], 8
lea eax, [ecx + 1]
mov dword [ebp - 0xfb8], eax
lea eax, [ebp - 0xfc8]
cmovae eax, dword [ebp - 0xfc8]
mov word [eax + ecx*2], dx
xor edx, edx
mov word [eax + ecx*2 + 2], dx
jmp 0x406053
push edx
push dword [ebp - 0x1000]
lea ecx, [ebp - 0xfc8]
push 1
call fcn.004034d4
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x1000]
mov dword [ebp - 0x1000], 0x7d0
push eax
lea eax, [ebp - 0xfb0]
push eax
push 0
push dword [ebp - 0xffc]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x406158
mov dword [ebp - 0xfd0], eax
lea ecx, [ebp - 0xfe0]
mov dword [ebp - 0xfcc], eax
mov dword [ebp - 0xfd0], eax
mov word [ebp - 0xfe0], ax
lea eax, [ebp - 0xfb0]
push eax
mov dword [ebp - 0xfcc], 7
call fcn.0040171c
mov byte [ebp - 4], 1
lea eax, [ebp - 0xfe0]
push eax
lea edx, [ebp - 0xfc8]
lea ecx, [ebp - 0xff8]
call fcn.00403015
mov byte [ebp - 4], 2
mov edx, eax
mov ecx, edi
call fcn.00405f56
mov byte [ebp - 4], 1
lea ecx, [ebp - 0xff8]
call fcn.004016f1
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0xfcc]
cmp edx, 8
jb 0x406139
mov ecx, dword [ebp - 0xfe0]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x406130
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4061f1
push edx
push ecx
call fcn.0040c09d
pop ecx
pop ecx
and dword [ebp - 0xfd0], 0
xor eax, eax
mov dword [ebp - 0xfcc], 7
mov word [ebp - 0xfe0], ax
jmp 0x406053
cmp eax, 0x103
jne 0x406053
push dword [ebp - 0xffc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [esi + 0x14], 8
jb 0x406177
mov esi, dword [esi]
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
or dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0xfb4]
cmp edx, 8
jb 0x4061be
mov ecx, dword [ebp - 0xfc8]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4061b5
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4061f1
push edx
push ecx
call fcn.0040c09d
pop ecx
pop ecx
and dword [ebp - 0xfb8], 0
xor eax, eax
mov dword [ebp - 0xfb4], 7
mov word [ebp - 0xfc8], ax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040be0b
leave
ret
call fcn.0040fc8d
int3