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

Disassembly:
mov eax, 0x40d549
call fcn.0040cd30
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 0x404539
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 0x404130
test ebx, ebx
je 0x4041c2
mov ecx, dword [ebp - 0x21c]
push edi
call fcn.0040232c
mov esi, eax
test esi, esi
jl 0x404592
cmp dword [ebp + 0x10], 0
je 0x4041c2
and dword [ebp + 8], 0
push 0x5c
push edi
call fcn.004022c4
test eax, eax
pop ecx
pop ecx
jne 0x404550
mov ecx, dword [ebp - 0x21c]
push edi
call fcn.00402415
test eax, eax
je 0x404185
mov eax, dword [ebp + 0xc]
push edi
lea ecx, [ebp + 8]
mov dword [ebp + 8], eax
call fcn.004029f7
and dword [ebp + 8], 0
test ebx, ebx
je 0x4041ba
mov ecx, dword [ebp - 0x21c]
push edi
call fcn.0040232c
mov esi, eax
test esi, esi
jl 0x40458a
mov ecx, dword [ebp - 0x21c]
push edi
call fcn.00402476
lea ecx, [ebp + 8]
mov esi, eax
call fcn.00401fe6
jmp 0x404382
lea ecx, [ebp + 8]
call fcn.00401fe6
push str.NoRemove
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x4041ee
mov ecx, dword [ebp - 0x21c]
and dword [ebp - 0x224], eax
push edi
call fcn.0040232c
mov esi, eax
test esi, esi
jl 0x404592
push 0x40eac4
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x4042e0
mov ecx, dword [ebp - 0x21c]
lea eax, [ebp - 0x218]
push eax
call fcn.0040232c
mov esi, eax
xor ebx, ebx
cmp esi, ebx
jl 0x404592
mov ecx, dword [ebp - 0x21c]
push edi
call fcn.0040232c
mov esi, eax
cmp esi, ebx
jl 0x404592
cmp byte [edi], 0x3d
jne 0x404558
cmp dword [ebp + 0x10], ebx
je 0x40427d
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.00403d3f
mov esi, eax
cmp esi, ebx
mov dword [ebp + 8], ebx
lea ecx, [ebp + 8]
jl 0x40458d
mov byte [ebp - 4], bl
jmp 0x4044fa
cmp dword [ebp + 0x14], ebx
jne 0x4042cb
cmp dword [ebp - 0x224], ebx
je 0x4042cb
push 0x20006
push ebx
push dword [ebp + 0xc]
lea ecx, [ebp + 8]
mov dword [ebp + 8], ebx
call fcn.0040204b
cmp eax, ebx
jne 0x404581
lea eax, [ebp - 0x218]
push eax
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
cmp eax, ebx
je 0x4042c3
cmp eax, 2
jne 0x404581
lea ecx, [ebp + 8]
call fcn.00401fe6
mov ecx, dword [ebp - 0x21c]
push edi
call fcn.00402476
mov esi, eax
cmp esi, ebx
jmp 0x404543
push 0x5c
push edi
call fcn.004022c4
test eax, eax
pop ecx
pop ecx
jne 0x404558
cmp dword [ebp + 0x10], eax
je 0x40438f
mov esi, 0x2001f
push esi
push edi
push dword [ebp + 0xc]
lea ecx, [ebp - 0x220]
call fcn.0040204b
test eax, eax
je 0x40434c
push 0x20019
push edi
push dword [ebp + 0xc]
lea ecx, [ebp - 0x220]
call fcn.0040204b
test eax, eax
je 0x40434c
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.00401ffd
mov esi, eax
cmp esi, ebx
jne 0x40455f
mov ecx, dword [ebp - 0x21c]
push edi
call fcn.0040232c
mov esi, eax
test esi, esi
jl 0x404592
cmp byte [edi], 0x3d
jne 0x4044ff
mov ecx, dword [ebp - 0x21c]
push edi
push 0
lea eax, [ebp - 0x220]
push eax
call fcn.00403d3f
mov esi, eax
test esi, esi
jl 0x404592
jmp 0x4044ff
cmp dword [ebp + 0x14], 0
jne 0x4043ad
push 0x20019
push edi
push dword [ebp + 0xc]
lea ecx, [ebp - 0x220]
call fcn.0040204b
mov ebx, eax
jmp 0x4043b0
push 2
pop ebx
test ebx, ebx
je 0x4043bb
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.0040232c
mov esi, eax
test esi, esi
jl 0x404592
mov ecx, dword [ebp - 0x21c]
push edi
call fcn.00402476
mov esi, eax
test esi, esi
jl 0x404592
cmp byte [edi], 0x7b
jne 0x40443c
push dword [ebp + 0x14]
mov ecx, dword [ebp - 0x21c]
push 0
push dword [ebp - 0x220]
push edi
call fcn.004040c0
mov esi, eax
test esi, esi
jge 0x404426
cmp dword [ebp + 0x14], 0
je 0x404592
mov ecx, dword [ebp - 0x21c]
push edi
call fcn.0040232c
mov esi, eax
test esi, esi
jl 0x404592
cmp ebx, 2
mov eax, dword [ebp - 0x228]
mov dword [ebp + 0x14], eax
je 0x404545
test ebx, ebx
je 0x404468
test eax, eax
jne 0x404545
push ebx
call fcn.00401f2b
pop ecx
mov esi, eax
jmp 0x404592
test eax, eax
je 0x4044bf
push dword [ebp - 0x220]
mov ecx, dword [ebp - 0x21c]
call fcn.00402441
test eax, eax
je 0x4044bf
mov ecx, dword [ebp - 0x21c]
lea eax, [ebp - 0x114]
push eax
call fcn.00402415
test eax, eax
je 0x404545
cmp dword [ebp - 0x224], 0
je 0x404545
lea eax, [ebp - 0x114]
push eax
lea ecx, [ebp - 0x220]
call fcn.004029f7
jmp 0x404545
lea ecx, [ebp - 0x220]
call fcn.00401fe6
mov ebx, eax
test ebx, ebx
jne 0x40456d
cmp dword [ebp - 0x224], eax
je 0x404545
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 0x404581
lea ecx, [ebp + 8]
call fcn.00401fe6
cmp dword [ebp + 0x10], 0
je 0x404545
cmp byte [edi], 0x7b
jne 0x404545
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, 1
jne 0x404545
mov ecx, dword [ebp - 0x21c]
push 0
push dword [ebp + 0x10]
push dword [ebp - 0x220]
push edi
call fcn.004040c0
mov esi, eax
test esi, esi
jl 0x404592
mov ecx, dword [ebp - 0x21c]
push edi
call fcn.0040232c
mov esi, eax
test esi, esi
jl 0x404592
cmp byte [edi], 0x7d
jne 0x4040fd
jmp 0x404592
lea ecx, [ebp + 8]
call fcn.00401fe6
mov esi, 0x80020009
jmp 0x404592
lea ecx, [ebp - 0x220]
call fcn.00401fe6
push esi
jmp 0x404579
lea ecx, [ebp - 0x220]
call fcn.00401fe6
push ebx
call fcn.00401f2b
pop ecx
jmp 0x40459f
push eax
call fcn.00401f2b
pop ecx
mov esi, eax
lea ecx, [ebp + 8]
call fcn.00401fe6
lea ecx, [ebp - 0x220]
call fcn.00401fe6
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.0040cd0f
leave
ret 0x10