Function at 0x406603
Capabilities:
Delete registry key
Delete registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x220
mov eax, dword [0x40d230]
xor eax, dword [ebp + 4]
and dword [ebp - 8], 0
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push edi
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x14], eax
call fcn.0040625d
mov esi, eax
test esi, esi
jge 0x406644
lea ecx, [ebp - 8]
call fcn.00406b5c
mov eax, esi
jmp 0x406acd
push ebx
jmp 0x406764
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
push str.Delete
push edi
mov dword [ebp - 0x10], 1
call esi
mov ebx, eax
neg ebx
push str.ForceRemove
sbb ebx, ebx
push edi
inc ebx
call esi
test eax, eax
je 0x40667a
test ebx, ebx
je 0x406781
mov ecx, dword [ebp - 0xc]
push edi
call fcn.0040625d
mov esi, eax
test esi, esi
jl 0x406abb
cmp dword [ebp + 0x10], 0
je 0x406781
and dword [ebp + 8], 0
mov cl, byte [edi]
mov eax, edi
jmp 0x4066b3
cmp cl, 0x5c
je 0x406ade
push eax
call dword [sym.imp.USER32.dll_CharNextA]
mov cl, byte [eax]
test cl, cl
jne 0x4066a1
mov esi, 0x40b2cc
push dword [esi]
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x4066e7
add esi, 4
cmp esi, str.TypeLib
jl 0x4066bc
mov eax, dword [ebp + 0xc]
push edi
lea ecx, [ebp + 8]
mov dword [ebp + 8], eax
call fcn.00406c43
and dword [ebp + 8], 0
test ebx, ebx
je 0x406772
mov ecx, dword [ebp - 0xc]
push edi
call fcn.0040625d
mov esi, eax
xor ebx, ebx
cmp esi, ebx
jl 0x406b0f
mov ecx, dword [ebp - 0xc]
push edi
call fcn.00406bdd
mov esi, eax
cmp esi, ebx
jl 0x406b0f
cmp dword [ebp + 8], ebx
je 0x406725
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp byte [edi], 0x7b
jne 0x406764
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, 1
jne 0x406764
mov ecx, dword [ebp - 0xc]
push 0
push dword [ebp + 0x10]
push dword [ebp - 8]
push edi
call fcn.00406603
mov esi, eax
test esi, esi
jl 0x406abb
mov ecx, dword [ebp - 0xc]
push edi
call fcn.0040625d
mov esi, eax
test esi, esi
jl 0x406abb
cmp byte [edi], 0x7d
jne 0x40664a
jmp 0x406abb
cmp dword [ebp + 8], 0
je 0x406781
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push str.NoRemove
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x4067a7
mov ecx, dword [ebp - 0xc]
and dword [ebp - 0x10], eax
push edi
call fcn.0040625d
mov esi, eax
test esi, esi
jl 0x406abb
push 0x40b3ac
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x406886
mov ecx, dword [ebp - 0xc]
lea eax, [ebp - 0x220]
push eax
call fcn.0040625d
mov esi, eax
test esi, esi
jl 0x406abb
mov ecx, dword [ebp - 0xc]
push edi
call fcn.0040625d
mov esi, eax
test esi, esi
jl 0x406abb
cmp byte [edi], 0x3d
jne 0x406b1f
xor ebx, ebx
cmp dword [ebp + 0x10], ebx
je 0x406823
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0xc]
mov dword [ebp + 8], eax
push edi
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp + 8]
push eax
call fcn.00406ce3
mov esi, eax
cmp esi, ebx
mov dword [ebp + 8], ebx
jl 0x406b2e
jmp 0x406725
cmp dword [ebp + 0x14], ebx
jne 0x406874
cmp dword [ebp - 0x10], ebx
je 0x406874
push 0x20006
push ebx
push dword [ebp + 0xc]
lea ecx, [ebp + 8]
mov dword [ebp + 8], ebx
call fcn.00406b73
cmp eax, ebx
jne 0x406b06
lea eax, [ebp - 0x220]
push eax
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
cmp eax, ebx
je 0x406866
cmp eax, 2
jne 0x406b06
cmp dword [ebp + 8], ebx
je 0x406874
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0xc]
push edi
call fcn.00406bdd
mov esi, eax
cmp esi, ebx
jmp 0x40675e
mov cl, byte [edi]
mov eax, edi
jmp 0x40689e
cmp cl, 0x5c
je 0x406b1f
push eax
call dword [sym.imp.USER32.dll_CharNextA]
mov cl, byte [eax]
test cl, cl
jne 0x40688c
xor esi, esi
cmp dword [ebp + 0x10], esi
je 0x406954
mov esi, 0x2001f
push esi
push edi
push dword [ebp + 0xc]
lea ecx, [ebp - 8]
call fcn.00406b73
test eax, eax
je 0x40691a
push 0x20019
push edi
push dword [ebp + 0xc]
lea ecx, [ebp - 8]
call fcn.00406b73
test eax, eax
je 0x40691a
lea eax, [ebp - 0x18]
push eax
xor ebx, ebx
lea eax, [ebp + 8]
push eax
push ebx
push esi
push ebx
push ebx
push ebx
push edi
push dword [ebp + 0xc]
mov dword [ebp + 8], ebx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
cmp eax, ebx
jne 0x406b25
xor eax, eax
cmp dword [ebp - 8], ebx
je 0x40690c
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp eax, ebx
mov ecx, dword [ebp + 8]
mov dword [ebp - 8], ecx
jne 0x406b25
mov ecx, dword [ebp - 0xc]
push edi
call fcn.0040625d
mov esi, eax
test esi, esi
jl 0x406abb
cmp byte [edi], 0x3d
jne 0x406725
mov ecx, dword [ebp - 0xc]
push edi
push 0
lea eax, [ebp - 8]
push eax
call fcn.00406ce3
mov esi, eax
test esi, esi
jl 0x406abb
jmp 0x406725
cmp dword [ebp + 0x14], esi
jne 0x40696f
push 0x20019
push edi
push dword [ebp + 0xc]
lea ecx, [ebp - 8]
call fcn.00406b73
mov dword [ebp + 8], eax
jmp 0x406976
mov dword [ebp + 8], 2
cmp dword [ebp + 8], esi
je 0x406982
mov dword [ebp + 0x14], 1
push 0x104
push edi
lea eax, [ebp - 0x11c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
mov ebx, dword [ebp - 0xc]
push edi
mov ecx, ebx
call fcn.0040625d
mov esi, eax
test esi, esi
jl 0x406abb
push edi
mov ecx, ebx
call fcn.00406bdd
mov esi, eax
test esi, esi
jl 0x406abb
cmp byte [edi], 0x7b
jne 0x4069f3
push dword [ebp + 0x14]
mov ecx, ebx
push 0
push dword [ebp - 8]
push edi
call fcn.00406603
mov esi, eax
test esi, esi
jge 0x4069e1
cmp dword [ebp + 0x14], 0
je 0x406abb
push edi
mov ecx, ebx
call fcn.0040625d
mov esi, eax
test esi, esi
jl 0x406abb
cmp dword [ebp + 8], 2
mov eax, dword [ebp - 0x14]
mov dword [ebp + 0x14], eax
je 0x406764
xor ebx, ebx
cmp dword [ebp + 8], ebx
je 0x406a1a
cmp eax, ebx
jne 0x406764
push dword [ebp + 8]
jmp 0x406ab3
cmp dword [ebp - 0x14], ebx
je 0x406a73
push dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
call fcn.00406ba8
test eax, eax
je 0x406a73
mov ebx, 0x40b2cc
push dword [ebx]
lea eax, [ebp - 0x11c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x406764
add ebx, 4
cmp ebx, str.TypeLib
jl 0x406a33
cmp dword [ebp - 0x10], 0
je 0x406764
lea eax, [ebp - 0x11c]
push eax
lea ecx, [ebp - 8]
call fcn.00406c43
jmp 0x406764
cmp dword [ebp - 8], ebx
je 0x406a91
push dword [ebp - 8]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call ebx
and dword [ebp - 8], 0
test eax, eax
jne 0x406b33
xor ebx, ebx
cmp dword [ebp - 0x10], ebx
je 0x406764
lea eax, [ebp - 0x11c]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
test eax, eax
je 0x406764
push eax
call fcn.00406b49
pop ecx
mov esi, eax
cmp dword [ebp - 8], 0
je 0x406aca
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop edi
pop esi
call fcn.004093a6
leave
ret 0x10
xor esi, esi
cmp dword [ebp + 8], esi
je 0x406af1
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp + 8], esi
cmp dword [ebp - 8], esi
je 0x406aff
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 0x80020009
jmp 0x406acc
push eax
call fcn.00406b49
pop ecx
mov esi, eax
cmp dword [ebp + 8], ebx
je 0x406abb
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x406abb
cmp dword [ebp - 8], 0
jmp 0x406af4
push eax
call fcn.00406b49
pop ecx
mov esi, eax
cmp dword [ebp - 8], ebx
jmp 0x406abf
push eax
call fcn.00406b49
cmp dword [ebp - 8], 0
pop ecx
mov esi, eax
je 0x406aca
push dword [ebp - 8]
call ebx
jmp 0x406aca