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

Disassembly:
mov eax, 0x40d3d9
call fcn.0040cbc0
sub esp, 0x21c
mov eax, dword [0x41239c]
and dword [ebp - 0x220], 0
push ebx
push esi
mov dword [ebp - 0x10], eax
push edi
mov dword [ebp - 0x21c], ecx
mov eax, dword [ebp + 0x14]
and dword [ebp - 4], 0
mov edi, dword [ebp + 8]
mov dword [ebp - 0x228], eax
jmp 0x404526
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
push str.Delete
push edi
mov dword [ebp - 0x224], 1
call esi
mov ebx, eax
neg ebx
push str.ForceRemove
sbb ebx, ebx
push edi
inc ebx
call esi
test eax, eax
je 0x40411d
test ebx, ebx
je 0x4041af
mov ecx, dword [ebp - 0x21c]
push edi
call fcn.00402324
mov esi, eax
test esi, esi
jl 0x40457f
cmp dword [ebp + 0x10], 0
je 0x4041af
and dword [ebp + 8], 0
push 0x5c
push edi
call fcn.004022bc
test eax, eax
pop ecx
pop ecx
jne 0x40453d
mov ecx, dword [ebp - 0x21c]
push edi
call fcn.0040240d
test eax, eax
je 0x404172
mov eax, dword [ebp + 0xc]
push edi
lea ecx, [ebp + 8]
mov dword [ebp + 8], eax
call fcn.004029e4
and dword [ebp + 8], 0
test ebx, ebx
je 0x4041a7
mov ecx, dword [ebp - 0x21c]
push edi
call fcn.00402324
mov esi, eax
test esi, esi
jl 0x404577
mov ecx, dword [ebp - 0x21c]
push edi
call fcn.0040246e
lea ecx, [ebp + 8]
mov esi, eax
call fcn.00401fde
jmp 0x40436f
lea ecx, [ebp + 8]
call fcn.00401fde
push str.NoRemove
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x4041db
mov ecx, dword [ebp - 0x21c]
and dword [ebp - 0x224], eax
push edi
call fcn.00402324
mov esi, eax
test esi, esi
jl 0x40457f
push 0x40eab0
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x4042cd
mov ecx, dword [ebp - 0x21c]
lea eax, [ebp - 0x218]
push eax
call fcn.00402324
mov esi, eax
xor ebx, ebx
cmp esi, ebx
jl 0x40457f
mov ecx, dword [ebp - 0x21c]
push edi
call fcn.00402324
mov esi, eax
cmp esi, ebx
jl 0x40457f
cmp byte [edi], 0x3d
jne 0x404545
cmp dword [ebp + 0x10], ebx
je 0x40426a
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x21c]
mov dword [ebp + 8], eax
push edi
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp + 8]
push eax
mov byte [ebp - 4], 1
call fcn.00403d2c
mov esi, eax
cmp esi, ebx
mov dword [ebp + 8], ebx
lea ecx, [ebp + 8]
jl 0x40457a
mov byte [ebp - 4], bl
jmp 0x4044e7
cmp dword [ebp + 0x14], ebx
jne 0x4042b8
cmp dword [ebp - 0x224], ebx
je 0x4042b8
push 0x20006
push ebx
push dword [ebp + 0xc]
lea ecx, [ebp + 8]
mov dword [ebp + 8], ebx
call fcn.00402043
cmp eax, ebx
jne 0x40456e
lea eax, [ebp - 0x218]
push eax
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
cmp eax, ebx
je 0x4042b0
cmp eax, 2
jne 0x40456e
lea ecx, [ebp + 8]
call fcn.00401fde
mov ecx, dword [ebp - 0x21c]
push edi
call fcn.0040246e
mov esi, eax
cmp esi, ebx
jmp 0x404530
push 0x5c
push edi
call fcn.004022bc
test eax, eax
pop ecx
pop ecx
jne 0x404545
cmp dword [ebp + 0x10], eax
je 0x40437c
mov esi, 0x2001f
push esi
push edi
push dword [ebp + 0xc]
lea ecx, [ebp - 0x220]
call fcn.00402043
test eax, eax
je 0x404339
push 0x20019
push edi
push dword [ebp + 0xc]
lea ecx, [ebp - 0x220]
call fcn.00402043
test eax, eax
je 0x404339
xor ebx, ebx
push ebx
push ebx
push esi
push ebx
push ebx
push edi
push dword [ebp + 0xc]
lea ecx, [ebp - 0x220]
call fcn.00401ff5
mov esi, eax
cmp esi, ebx
jne 0x40454c
mov ecx, dword [ebp - 0x21c]
push edi
call fcn.00402324
mov esi, eax
test esi, esi
jl 0x40457f
cmp byte [edi], 0x3d
jne 0x4044ec
mov ecx, dword [ebp - 0x21c]
push edi
push 0
lea eax, [ebp - 0x220]
push eax
call fcn.00403d2c
mov esi, eax
test esi, esi
jl 0x40457f
jmp 0x4044ec
cmp dword [ebp + 0x14], 0
jne 0x40439a
push 0x20019
push edi
push dword [ebp + 0xc]
lea ecx, [ebp - 0x220]
call fcn.00402043
mov ebx, eax
jmp 0x40439d
push 2
pop ebx
test ebx, ebx
je 0x4043a8
mov dword [ebp + 0x14], 1
push 0x104
push edi
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
mov ecx, dword [ebp - 0x21c]
push edi
call fcn.00402324
mov esi, eax
test esi, esi
jl 0x40457f
mov ecx, dword [ebp - 0x21c]
push edi
call fcn.0040246e
mov esi, eax
test esi, esi
jl 0x40457f
cmp byte [edi], 0x7b
jne 0x404429
push dword [ebp + 0x14]
mov ecx, dword [ebp - 0x21c]
push 0
push dword [ebp - 0x220]
push edi
call fcn.004040ad
mov esi, eax
test esi, esi
jge 0x404413
cmp dword [ebp + 0x14], 0
je 0x40457f
mov ecx, dword [ebp - 0x21c]
push edi
call fcn.00402324
mov esi, eax
test esi, esi
jl 0x40457f
cmp ebx, 2
mov eax, dword [ebp - 0x228]
mov dword [ebp + 0x14], eax
je 0x404532
test ebx, ebx
je 0x404455
test eax, eax
jne 0x404532
push ebx
call fcn.00401f18
pop ecx
mov esi, eax
jmp 0x40457f
test eax, eax
je 0x4044ac
push dword [ebp - 0x220]
mov ecx, dword [ebp - 0x21c]
call fcn.00402439
test eax, eax
je 0x4044ac
mov ecx, dword [ebp - 0x21c]
lea eax, [ebp - 0x114]
push eax
call fcn.0040240d
test eax, eax
je 0x404532
cmp dword [ebp - 0x224], 0
je 0x404532
lea eax, [ebp - 0x114]
push eax
lea ecx, [ebp - 0x220]
call fcn.004029e4
jmp 0x404532
lea ecx, [ebp - 0x220]
call fcn.00401fde
mov ebx, eax
test ebx, ebx
jne 0x40455a
cmp dword [ebp - 0x224], eax
je 0x404532
lea eax, [ebp - 0x114]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
and dword [ebp + 8], ebx
test eax, eax
jne 0x40456e
lea ecx, [ebp + 8]
call fcn.00401fde
cmp dword [ebp + 0x10], 0
je 0x404532
cmp byte [edi], 0x7b
jne 0x404532
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, 1
jne 0x404532
mov ecx, dword [ebp - 0x21c]
push 0
push dword [ebp + 0x10]
push dword [ebp - 0x220]
push edi
call fcn.004040ad
mov esi, eax
test esi, esi
jl 0x40457f
mov ecx, dword [ebp - 0x21c]
push edi
call fcn.00402324
mov esi, eax
test esi, esi
jl 0x40457f
cmp byte [edi], 0x7d
jne 0x4040ea
jmp 0x40457f
lea ecx, [ebp + 8]
call fcn.00401fde
mov esi, 0x80020009
jmp 0x40457f
lea ecx, [ebp - 0x220]
call fcn.00401fde
push esi
jmp 0x404566
lea ecx, [ebp - 0x220]
call fcn.00401fde
push ebx
call fcn.00401f18
pop ecx
jmp 0x40458c
push eax
call fcn.00401f18
pop ecx
mov esi, eax
lea ecx, [ebp + 8]
call fcn.00401fde
lea ecx, [ebp - 0x220]
call fcn.00401fde
mov eax, esi
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
pop ebx
call fcn.0040cb97
leave
ret 0x10