Function at 0x40bd07
Capabilities:
Delete registry key
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x814
mov eax, dword [0x419fa8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
cmp edi, ebx
jne 0x40bd31
mov edi, 0x80004003
jmp 0x40c09c
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
push ebx
lea eax, [ebp - 0x814]
push eax
push ebx
push 0x20006
push ebx
push ebx
push ebx
push 0x401b88
push SysReAllocString
call esi
cmp eax, ebx
je 0x40bd6c
jle 0x40bd65
and eax, 0xffff
or eax, 0x80070000
mov edi, eax
jmp 0x40c09b
push 0x200
lea eax, [ebp - 0x404]
push eax
push edi
call dword [sym.imp.ole32.dll_StringFromGUID2]
cmp eax, ebx
jne 0x40bd8a
xor edi, edi
jmp 0x40c08f
lea eax, [ebp - 0x404]
push eax
push dword [ebp - 0x814]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
push ebx
lea eax, [ebp - 0x808]
push eax
push ebx
push 0x20006
push ebx
push ebx
push ebx
lea eax, [ebp - 0x404]
push eax
push dword [ebp - 0x814]
call esi
cmp eax, ebx
je 0x40bdd4
jle 0x40bdcd
and eax, 0xffff
or eax, 0x80070000
mov edi, eax
jmp 0x40c08f
lea edx, [edi + 0x14]
mov eax, edx
lea esi, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x40bddc
sub eax, esi
sar eax, 1
lea eax, [eax + eax + 2]
cmp eax, 0x200
jbe 0x40bdff
mov edi, 0x80070057
jmp 0x40c08f
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push eax
push edx
push 1
push ebx
push 0x401d30
push dword [ebp - 0x808]
call esi
cmp eax, ebx
je 0x40be26
jg 0x40c0b7
jmp 0x40c0c1
lea edx, [edi + 0x214]
mov eax, edx
lea ecx, [eax + 2]
mov dword [ebp - 0x80c], ecx
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x40be37
sub eax, dword [ebp - 0x80c]
sar eax, 1
lea eax, [eax + eax + 2]
cmp eax, 0x200
ja 0x40c0ae
push eax
push edx
push 1
push ebx
push 0x401d1c
push dword [ebp - 0x808]
call esi
cmp eax, ebx
jne 0x40be1b
push 4
pop ebx
push ebx
lea eax, [edi + 0x414]
push eax
push ebx
push 0
push 0x401d00
push dword [ebp - 0x808]
call esi
test eax, eax
jne 0x40be1b
push ebx
lea eax, [edi + 0x418]
push eax
push ebx
push 0
push 0x401ce4
push dword [ebp - 0x808]
call esi
test eax, eax
jne 0x40be1b
push ebx
lea eax, [edi + 0x10]
push eax
push ebx
push 0
push 0x401cd8
push dword [ebp - 0x808]
call esi
test eax, eax
jne 0x40be1b
push ebx
lea eax, [edi + 0x41c]
push eax
push ebx
push 0
push 0x401cb0
push dword [ebp - 0x808]
call esi
test eax, eax
jne 0x40be1b
push ebx
lea eax, [edi + 0x420]
push eax
push ebx
push 0
push 0x401c88
push dword [ebp - 0x808]
call esi
test eax, eax
jne 0x40be1b
push ebx
lea eax, [edi + 0x424]
push eax
push ebx
push 0
push 0x401c5c
push dword [ebp - 0x808]
call esi
test eax, eax
jne 0x40be1b
push ebx
lea eax, [edi + 0x428]
push eax
push ebx
push 0
push 0x401c30
push dword [ebp - 0x808]
call esi
test eax, eax
jne 0x40be1b
push ebx
lea eax, [edi + 0x42c]
push eax
push ebx
push 0
push 0x401c14
push dword [ebp - 0x808]
call esi
test eax, eax
jne 0x40be1b
push ebx
lea eax, [edi + 0x430]
push eax
push ebx
push 0
push 0x401bf0
push dword [ebp - 0x808]
call esi
test eax, eax
jne 0x40be1b
and dword [ebp - 0x810], eax
lea ebx, [edi + 0x430]
cmp dword [ebx], eax
jbe 0x40c03f
add edi, 0x434
mov dword [ebp - 0x80c], edi
push dword [ebp - 0x810]
lea eax, [ebp - 0x804]
push 0x401bd0
push 0x400
push eax
call fcn.0040bca5
mov edi, eax
add esp, 0x10
test edi, edi
jl 0x40c09b
push 0x200
lea eax, [ebp - 0x404]
push eax
push dword [ebp - 0x80c]
call dword [sym.imp.ole32.dll_StringFromGUID2]
xor edi, edi
cmp eax, edi
je 0x40c083
add eax, eax
cmp eax, 0x400
ja 0x40c0ae
push eax
lea eax, [ebp - 0x404]
push eax
push 1
push edi
lea eax, [ebp - 0x804]
push eax
push dword [ebp - 0x808]
call esi
test eax, eax
jne 0x40c0b5
inc dword [ebp - 0x810]
mov eax, dword [ebp - 0x810]
add dword [ebp - 0x80c], 0x10
cmp eax, dword [ebx]
jb 0x40bfaa
mov eax, dword [0x430894]
test eax, eax
mov dword [ebp - 0x80c], eax
je 0x40c081
lea eax, [ebp - 0x810]
push eax
lea eax, [ebp - 0x80c]
push eax
mov ecx, 0x430894
call fcn.0040bc7b
test eax, eax
je 0x40c078
mov eax, dword [ebp - 0x810]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_SetEvent]
cmp dword [ebp - 0x80c], 0
jne 0x40c04e
xor edi, edi
push dword [ebp - 0x808]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp - 0x814]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
xor ecx, ebp
pop ebx
call fcn.0040ad0d
leave
ret 4
mov edi, 0x80070057
jmp 0x40c083
jle 0x40c0c1
and eax, 0xffff
or eax, 0x80070000
mov edi, eax
jmp 0x40c083