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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x435adf
mov eax, dword fs:[0]
push eax
sub esp, 0x438
mov eax, dword [0x44a020]
xor eax, esp
mov dword [esp + 0x430], eax
push ebx
push esi
push edi
mov eax, dword [0x44a020]
xor eax, esp
push eax
lea eax, [esp + 0x448]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
and dword [esp + 0x14], 0
mov dword [esp + 0x18], ecx
mov dword [esp + 0x24], eax
mov eax, dword [ebp + 0x14]
and dword [esp + 0x450], 0
mov dword [esp + 0x28], eax
mov eax, edi
call fcn.00404016
mov esi, eax
test esi, esi
jl 0x4045c1
cmp word [edi], 0x7d
je 0x4045bf
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpiW]
push str.Delete
push edi
mov dword [esp + 0x24], 1
call esi
mov ebx, eax
neg ebx
push str.ForceRemove
sbb ebx, ebx
push edi
inc ebx
call esi
test eax, eax
je 0x4041d5
test ebx, ebx
je 0x4042a2
mov ecx, dword [esp + 0x18]
mov eax, edi
call fcn.00404016
mov esi, eax
test esi, esi
jl 0x4045ae
xor esi, esi
cmp dword [ebp + 0x10], esi
je 0x4042a4
push 0x5c
mov eax, edi
call fcn.00403ef2
test eax, eax
pop ecx
jne 0x40467e
push edi
call fcn.00404bf5
test eax, eax
je 0x404223
mov eax, dword [esp + 0x24]
push edi
lea ecx, [esp + 0x24]
mov dword [esp + 0x24], eax
call fcn.00404c21
cmp ebx, esi
je 0x4042a4
mov ecx, dword [esp + 0x18]
mov eax, edi
call fcn.00404016
mov esi, eax
test esi, esi
jl 0x4045ae
mov ecx, dword [esp + 0x18]
call fcn.00404b90
mov esi, eax
test esi, esi
jl 0x4045ae
cmp word [edi], 0x7b
jne 0x404293
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, 1
jne 0x404293
mov ecx, dword [esp + 0x18]
push 0
push dword [ebp + 0x10]
push dword [esp + 0x1c]
push edi
call fcn.00404127
mov esi, eax
test esi, esi
jl 0x4045ae
mov ecx, dword [esp + 0x18]
mov eax, edi
call fcn.00404016
mov esi, eax
test esi, esi
jl 0x4045ae
cmp word [edi], 0x7d
jne 0x4041a4
jmp 0x4045ae
xor esi, esi
push str.NoRemove
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x4042cf
and dword [esp + 0x1c], eax
mov ecx, dword [esp + 0x18]
mov eax, edi
call fcn.00404016
mov esi, eax
test esi, esi
jl 0x4045ae
xor esi, esi
push 0x439c48
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x4043cb
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x234]
call fcn.00404016
mov esi, eax
test esi, esi
jl 0x4045ae
mov ecx, dword [esp + 0x18]
mov eax, edi
call fcn.00404016
mov esi, eax
test esi, esi
jl 0x4045ae
cmp word [edi], 0x3d
jne 0x404698
xor ebx, ebx
cmp dword [ebp + 0x10], ebx
je 0x40435f
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x18]
mov byte [esp + 0x450], 1
mov dword [esp + 0x1c], eax
push edi
lea eax, [esp + 0x238]
push eax
lea edx, [esp + 0x24]
call fcn.00404713
mov esi, eax
cmp esi, ebx
jl 0x40469f
mov byte [esp + 0x450], bl
jmp 0x40424f
cmp dword [ebp + 0x14], ebx
jne 0x4043b9
cmp dword [esp + 0x1c], ebx
je 0x4043b9
lea eax, [esp + 0x1c]
push eax
push 0x20006
push ebx
push ebx
push dword [esp + 0x34]
mov dword [esp + 0x30], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebx
jne 0x4045a7
mov ebx, dword [esp + 0x1c]
lea eax, [esp + 0x234]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
test eax, eax
je 0x4043ac
cmp eax, 2
jne 0x4046a8
test ebx, ebx
je 0x4043b7
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor ebx, ebx
mov ecx, dword [esp + 0x18]
call fcn.00404b90
mov esi, eax
cmp esi, ebx
jmp 0x40428d
push 0x5c
mov eax, edi
call fcn.00403ef2
test eax, eax
pop ecx
jne 0x40467e
cmp dword [ebp + 0x10], esi
je 0x4044aa
lea eax, [esp + 0x1c]
push eax
push 0x2001f
push esi
push edi
push dword [esp + 0x34]
mov dword [esp + 0x30], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, esi
jne 0x404424
xor eax, eax
cmp dword [esp + 0x14], esi
je 0x404416
push dword [esp + 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp eax, esi
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x14], ecx
je 0x404476
xor esi, esi
lea eax, [esp + 0x1c]
push eax
push 0x20019
push esi
push edi
push dword [esp + 0x34]
mov dword [esp + 0x30], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, esi
jne 0x404460
xor eax, eax
cmp dword [esp + 0x14], esi
je 0x404454
push dword [esp + 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp eax, esi
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x14], ecx
je 0x404476
push edi
push dword [esp + 0x28]
lea esi, [esp + 0x1c]
call fcn.004046cd
test eax, eax
jne 0x4045a7
mov ecx, dword [esp + 0x18]
mov eax, edi
call fcn.00404016
mov esi, eax
test esi, esi
jl 0x4045ae
cmp word [edi], 0x3d
jne 0x40424f
mov ecx, dword [esp + 0x18]
push edi
push 0
lea edx, [esp + 0x1c]
call fcn.00404713
jmp 0x404245
cmp dword [ebp + 0x14], esi
jne 0x4044ed
lea eax, [esp + 0x20]
push eax
push 0x20019
push esi
push edi
push dword [esp + 0x34]
mov dword [esp + 0x34], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, esi
jne 0x4044e7
xor eax, eax
cmp dword [esp + 0x14], esi
je 0x4044df
push dword [esp + 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x20], eax
jmp 0x4044f5
mov dword [esp + 0x20], 2
cmp dword [esp + 0x20], esi
je 0x404502
mov dword [ebp + 0x14], 1
push 0x103
lea eax, [esp + 0x30]
push edi
push eax
call dword [sym.imp.MSVCR80.dll_wcsncpy]
mov ecx, dword [esp + 0x24]
and word [esp + 0x23e], 0
add esp, 0xc
mov eax, edi
call fcn.00404016
mov esi, eax
test esi, esi
jl 0x4045ae
mov ecx, dword [esp + 0x18]
call fcn.00404b90
mov esi, eax
test esi, esi
jl 0x4045ae
cmp word [edi], 0x7b
jne 0x404581
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, 1
jne 0x404581
push dword [ebp + 0x14]
mov ecx, dword [esp + 0x1c]
push 0
push dword [esp + 0x1c]
push edi
call fcn.00404127
mov esi, eax
test esi, esi
jge 0x404570
cmp dword [ebp + 0x14], 0
je 0x4045ae
mov ecx, dword [esp + 0x18]
mov eax, edi
call fcn.00404016
mov esi, eax
test esi, esi
jl 0x4045ae
cmp dword [esp + 0x20], 2
mov eax, dword [esp + 0x28]
mov dword [ebp + 0x14], eax
je 0x404293
xor ebx, ebx
cmp dword [esp + 0x20], ebx
je 0x4045e7
cmp eax, ebx
jne 0x404293
mov eax, dword [esp + 0x20]
call fcn.00404dae
mov esi, eax
cmp dword [esp + 0x14], 0
je 0x4045bf
push dword [esp + 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
mov ecx, dword [esp + 0x448]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x430]
xor ecx, esp
call fcn.0043461c
mov esp, ebp
pop ebp
ret 0x10
cmp eax, ebx
je 0x404628
push dword [esp + 0x14]
call fcn.00404d79
test eax, eax
je 0x404628
lea eax, [esp + 0x2c]
push eax
call fcn.00404bf5
test eax, eax
je 0x404293
cmp dword [esp + 0x1c], 0
je 0x404293
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x18]
call fcn.00404c21
jmp 0x404293
push dword [esp + 0x14]
call fcn.00404d79
cmp dword [esp + 0x14], ebx
mov dword [esp + 0x20], eax
je 0x40464d
push dword [esp + 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp eax, ebx
mov dword [esp + 0x14], ebx
jne 0x4046c3
cmp dword [esp + 0x1c], ebx
je 0x404293
cmp dword [esp + 0x20], 0
jne 0x404293
lea eax, [esp + 0x2c]
push eax
push dword [esp + 0x28]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
test eax, eax
jne 0x4045a7
jmp 0x404293
cmp dword [esp + 0x14], esi
je 0x40468e
push dword [esp + 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 0x80020009
jmp 0x4045c1
cmp dword [esp + 0x14], 0
jmp 0x404682
cmp dword [esp + 0x14], ebx
jmp 0x4045b3
call fcn.00404dae
test ebx, ebx
mov esi, eax
je 0x4045ae
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4045ae
call fcn.00404dae
jmp 0x4045c1