Function at 0x406ec8
Capabilities:
Delete registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x225c
call fcn.0041e6c0
push ebx
mov eax, ecx
xor ecx, ecx
push esi
mov ebx, ecx
mov dword [esp + 0x54], ecx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], ecx
mov ecx, dword [ebp + 0x14]
push edi
mov edi, dword [ebp + 8]
mov dword [esp + 0x5c], ecx
push edi
mov ecx, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ebx
call fcn.00406d8a
mov esi, eax
test esi, esi
js 0x40741e
push 0x7d
pop eax
cmp word [edi], ax
je 0x40740f
xor eax, eax
push str.Delete
inc eax
push edi
mov dword [esp + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
neg eax
push str.ForceRemove
sbb ebx, ebx
push edi
inc ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x406f4d
test ebx, ebx
je 0x406ff6
mov ecx, dword [esp + 0x10]
push edi
call fcn.00406d8a
mov esi, eax
test esi, esi
js 0x40740f
xor esi, esi
cmp dword [ebp + 0x10], esi
je 0x406ff8
push 0x5c
pop edx
mov ecx, edi
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], esi
call fcn.00406498
test eax, eax
jne 0x40740a
push edi
call fcn.00406a8d
test eax, eax
je 0x406fb9
mov eax, dword [ebp + 0xc]
push edi
lea ecx, [esp + 0x2c]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], esi
call fcn.00406b78
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], esi
test ebx, ebx
je 0x406ff0
mov ebx, dword [esp + 0x10]
push edi
mov ecx, ebx
call fcn.00406d8a
mov esi, eax
test esi, esi
js 0x40740f
push edi
mov ecx, ebx
call fcn.00406a3c
mov esi, eax
test esi, esi
js 0x40740f
xor eax, eax
mov dword [esp + 0x2c], eax
jmp 0x40737c
mov dword [esp + 0x2c], esi
jmp 0x406ff8
xor esi, esi
push str.NoRemove
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
mov ebx, dword [esp + 0x10]
test eax, eax
jne 0x407022
push edi
mov ecx, ebx
mov dword [esp + 0x28], esi
call fcn.00406d8a
mov esi, eax
test esi, esi
js 0x40740f
push 0x44208c
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x407133
lea eax, [esp + 0x268]
push eax
mov ecx, ebx
call fcn.00406d8a
mov esi, eax
test esi, esi
js 0x40740f
push edi
mov ecx, ebx
call fcn.00406d8a
mov esi, eax
test esi, esi
js 0x40740f
push 0x3d
pop eax
cmp word [edi], ax
jne 0x40740a
cmp dword [ebp + 0x10], 0
je 0x4070ba
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x40], eax
xor eax, eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
push edi
lea eax, [esp + 0x26c]
push eax
lea eax, [esp + 0x48]
push eax
mov ecx, ebx
call fcn.00406687
xor ecx, ecx
mov esi, eax
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], ecx
mov dword [esp + 0x48], ecx
test esi, esi
js 0x40740f
mov dword [esp + 0x44], ecx
jmp 0x40737c
cmp dword [ebp + 0x14], 0
jne 0x407126
cmp dword [esp + 0x24], 0
je 0x407126
xor esi, esi
push 0x20006
push esi
push dword [ebp + 0xc]
lea ecx, [esp + 0x40]
mov dword [esp + 0x40], esi
mov dword [esp + 0x44], esi
mov dword [esp + 0x48], esi
call fcn.00406b1c
test eax, eax
jne 0x4073ee
mov ebx, dword [esp + 0x34]
lea eax, [esp + 0x268]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
test eax, eax
je 0x40710f
cmp eax, 2
jne 0x4073de
test ebx, ebx
je 0x40711e
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0x34], esi
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x38], esi
push edi
mov ecx, ebx
call fcn.00406a3c
jmp 0x4073d3
push 0x5c
pop edx
mov ecx, edi
call fcn.00406498
test eax, eax
jne 0x40740a
cmp dword [ebp + 0x10], eax
je 0x4071c8
mov esi, dword [ebp + 0xc]
push 0x2001f
push edi
push esi
lea ecx, [esp + 0x20]
call fcn.00406b1c
test eax, eax
je 0x40718b
push 0x20019
push edi
push esi
lea ecx, [esp + 0x20]
call fcn.00406b1c
test eax, eax
je 0x40718b
sub esp, 0x14
lea ecx, [esp + 0x28]
push edi
push esi
call fcn.00406537
test eax, eax
jne 0x4072b6
push edi
mov ecx, ebx
call fcn.00406d8a
mov esi, eax
test esi, esi
js 0x40740f
push 0x3d
pop eax
cmp word [edi], ax
jne 0x40737c
push edi
xor eax, eax
push eax
lea eax, [esp + 0x1c]
push eax
mov ecx, ebx
call fcn.00406687
mov esi, eax
test esi, esi
js 0x40740f
jmp 0x40737c
mov esi, dword [ebp + 0x14]
test esi, esi
jne 0x4071e3
push 0x20019
push edi
push dword [ebp + 0xc]
lea ecx, [esp + 0x20]
call fcn.00406b1c
jmp 0x4071e6
push 2
pop eax
push 1
test eax, eax
mov dword [esp + 0x24], eax
pop eax
push 0xffffffffffffffff
cmovne esi, eax
push edi
lea eax, [esp + 0x68]
push 0x104
push eax
mov dword [ebp + 0x14], esi
call fcn.0040fbca
push eax
call fcn.00406a04
add esp, 0x14
mov ecx, ebx
push edi
call fcn.00406d8a
mov esi, eax
test esi, esi
js 0x40740f
push edi
mov ecx, ebx
call fcn.00406a3c
mov esi, eax
test esi, esi
js 0x40740f
push 0x7b
pop eax
cmp word [edi], ax
jne 0x407292
mov ecx, edi
xor ebx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x407243
sub ecx, edx
xor eax, eax
sar ecx, 1
inc eax
cmp ecx, eax
jne 0x407292
push dword [ebp + 0x14]
mov ecx, dword [esp + 0x14]
push ebx
mov ebx, dword [esp + 0x1c]
push ebx
push edi
call fcn.00406ec8
mov esi, eax
test esi, esi
jns 0x40727c
cmp dword [ebp + 0x14], 0
je 0x40740f
mov ecx, dword [esp + 0x10]
push edi
call fcn.00406d8a
mov esi, eax
test esi, esi
js 0x40740f
jmp 0x407296
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x5c]
mov dword [ebp + 0x14], ecx
cmp eax, 2
je 0x406f11
test eax, eax
je 0x4072c4
test ecx, ecx
jne 0x406f11
mov ecx, eax
call fcn.00406d7c
mov esi, eax
jmp 0x40740f
test ecx, ecx
je 0x407302
push ebx
call fcn.00406c66
test eax, eax
je 0x407302
lea eax, [esp + 0x60]
push eax
call fcn.00406a8d
test eax, eax
je 0x406f11
cmp dword [esp + 0x24], 0
je 0x406f11
lea eax, [esp + 0x60]
push eax
lea ecx, [esp + 0x18]
call fcn.00406b78
jmp 0x406f11
push ebx
call fcn.00406c66
mov ecx, eax
xor edx, edx
mov dword [esp + 0x20], ecx
mov eax, edx
test ebx, ebx
je 0x407327
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x20]
xor edx, edx
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], edx
test eax, eax
jne 0x4072b6
cmp dword [esp + 0x24], eax
je 0x406f11
test ecx, ecx
jne 0x406f11
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x4c], eax
lea eax, [esp + 0x60]
push eax
lea ecx, [esp + 0x50]
mov dword [esp + 0x54], edx
mov dword [esp + 0x58], edx
call fcn.00406d04
xor ecx, ecx
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x50], ecx
mov dword [esp + 0x54], ecx
test eax, eax
jne 0x4072b6
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x50], ecx
cmp dword [ebp + 0x10], 0
je 0x406f11
push 0x7b
pop eax
cmp word [edi], ax
jne 0x406f11
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [esp + 0x58]
jne 0x407397
sub ecx, edx
xor eax, eax
sar ecx, 1
inc eax
cmp ecx, eax
jne 0x406f11
xor eax, eax
push eax
push dword [ebp + 0x10]
mov ecx, ebx
push dword [esp + 0x1c]
push edi
call fcn.00406ec8
mov esi, eax
test esi, esi
js 0x40740f
push edi
mov ecx, ebx
call fcn.00406d8a
mov esi, eax
test esi, esi
js 0x40740f
jmp 0x406f11
mov ecx, eax
call fcn.00406d7c
mov esi, eax
test ebx, ebx
je 0x40740f
push ebx
jmp 0x407402
mov ecx, eax
call fcn.00406d7c
cmp dword [esp + 0x34], 0
mov esi, eax
je 0x40740f
push dword [esp + 0x34]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40740f
mov esi, 0x80020009
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40741e
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10