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

Disassembly:
sub esp, 0x38
push ebx
xor ebx, ebx
mov dword [esp + 0x28], edx
push ecx
lea ecx, [esp + 0x1c]
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], ebx
call fcn.00404f61
lea edx, [esp + 0x30]
lea ecx, [esp + 0x18]
call fcn.0041a22c
mov ecx, dword [esp + 0x18]
lea ecx, [ecx - 0x10]
call fcn.004052ff
cmp dword [esp + 0x34], 2
jne 0x40bebe
push ebp
push edi
push ebx
lea ecx, [esp + 0x3c]
call fcn.00409706
push 0x10
pop ebp
mov ecx, dword [eax]
sub ecx, ebp
call fcn.0040ab13
push 0x441380
lea ecx, [esp + 0x2c]
lea edi, [eax + ebp]
mov dword [esp + 0x38], edi
mov dword [esp + 0x2c], edi
call fcn.0040a0e8
test eax, eax
jne 0x40beb4
push esi
push 1
lea ecx, [esp + 0x40]
call fcn.00409706
mov ecx, dword [eax]
sub ecx, ebp
call fcn.0040ab13
push 0x5c
lea esi, [eax + ebp]
push esi
mov dword [esp + 0x34], esi
call fcn.00426705
mov ebp, eax
pop ecx
pop ecx
test ebp, ebp
je 0x40beab
sub ebp, esi
or ecx, 0xffffffff
sar ebp, 1
mov dword [esp + 0x28], ecx
cmp ebp, ecx
je 0x40beab
push ebp
push ebx
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x38]
call fcn.0040999a
call fcn.0040522e
push eax
lea ecx, [esp + 0x28]
call fcn.004028b4
call fcn.0040522e
push eax
lea ecx, [esp + 0x20]
call fcn.004028b4
lea ecx, [esp + 0x10]
call fcn.0040ffde
push ebx
push 0x5c
lea ecx, [esp + 0x18]
mov dword [esp + 0x28], eax
call fcn.00409b22
lea edx, [eax + 1]
mov eax, dword [esp + 0x10]
mov ecx, dword [eax - 0xc]
lea eax, [esp + 0x18]
sub ecx, edx
push ecx
push edx
push eax
lea ecx, [esp + 0x1c]
call fcn.0040999a
mov edi, dword [esp + 0x18]
lea eax, [esp + 0x14]
push eax
push 0xf003f
push ebx
push edi
push dword [esp + 0x30]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x40bd69
lea eax, [esp + 0x14]
push eax
push 0x20019
push ebx
push edi
push dword [esp + 0x30]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x40bd69
lea ecx, [edi - 0x10]
call fcn.004052ff
jmp 0x40bde1
push 0x5c
push edi
call fcn.00426705
pop ecx
pop ecx
test eax, eax
jne 0x40bd7c
or eax, 0xffffffff
jmp 0x40bd84
sub eax, edi
sar eax, 1
mov dword [esp + 0x28], eax
push eax
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x20]
call fcn.0040995a
push eax
lea ecx, [esp + 0x28]
call fcn.00409e7f
mov ecx, dword [esp + 0x30]
lea ecx, [ecx - 0x10]
call fcn.004052ff
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x18]
inc eax
push eax
lea eax, [esp + 0x34]
push eax
call fcn.00409a20
push eax
lea ecx, [esp + 0x20]
call fcn.00409e7f
mov ecx, dword [esp + 0x30]
lea ecx, [ecx - 0x10]
call fcn.004052ff
lea ecx, [edi - 0x10]
call fcn.004052ff
cmp dword [esp + 0x14], ebx
jne 0x40bdea
mov edi, dword [esp + 0x1c]
jmp 0x40be87
mov eax, dword [esi - 0xc]
lea ecx, [ebp + 1]
sub eax, ecx
push eax
push ecx
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x38]
call fcn.0040999a
push dword [esp + 0x34]
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x1c]
call fcn.0041b701
pop ecx
push dword [esp + 0x18]
push dword [esp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
mov edi, dword [esp + 0x1c]
test eax, eax
jne 0x40be79
lea eax, [esp + 0x28]
push eax
push 0xf003f
push ebx
push dword [esp + 0x30]
push dword [esp + 0x30]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40be79
push ebx
push ebx
push ebx
push ebx
lea eax, [esp + 0x3c]
mov dword [esp + 0x3c], ebx
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push dword [esp + 0x54]
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
test eax, eax
je 0x40be79
cmp dword [esp + 0x2c], ebx
jne 0x40be79
push edi
push dword [esp + 0x2c]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
mov ecx, dword [esp + 0x18]
mov bl, 1
lea ecx, [ecx - 0x10]
call fcn.004052ff
lea ecx, [edi - 0x10]
call fcn.004052ff
mov ecx, dword [esp + 0x24]
lea ecx, [ecx - 0x10]
call fcn.004052ff
mov ecx, dword [esp + 0x10]
lea ecx, [ecx - 0x10]
call fcn.004052ff
mov edi, dword [esp + 0x38]
lea ecx, [esi - 0x10]
call fcn.004052ff
pop esi
lea ecx, [edi - 0x10]
call fcn.004052ff
pop edi
pop ebp
lea ecx, [esp + 0x30]
call fcn.0040972d
mov al, bl
pop ebx
add esp, 0x38
ret