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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x814
mov eax, dword [0x4150f0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
cmp edi, ebx
jne 0x412483
mov edi, 0x80004003
jmp 0x4127ee
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 0x408f10
push SysReAllocString
call esi
cmp eax, ebx
je 0x4124be
jle 0x4124b7
and eax, 0xffff
or eax, 0x80070000
mov edi, eax
jmp 0x4127ed
push 0x200
lea eax, [ebp - 0x404]
push eax
push edi
call dword [sym.imp.ole32.dll_StringFromGUID2]
cmp eax, ebx
jne 0x4124dc
xor edi, edi
jmp 0x4127e1
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 0x412526
jle 0x41251f
and eax, 0xffff
or eax, 0x80070000
mov edi, eax
jmp 0x4127e1
lea edx, [edi + 0x14]
mov eax, edx
lea esi, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x41252e
sub eax, esi
sar eax, 1
lea eax, [eax + eax + 2]
cmp eax, 0x200
jbe 0x412551
mov edi, 0x80070057
jmp 0x4127e1
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push eax
push edx
push 1
push ebx
push 0x4090b8
push dword [ebp - 0x808]
call esi
cmp eax, ebx
je 0x412578
jg 0x412809
jmp 0x412813
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 0x412589
sub eax, dword [ebp - 0x80c]
sar eax, 1
lea eax, [eax + eax + 2]
cmp eax, 0x200
ja 0x412800
push eax
push edx
push 1
push ebx
push 0x4090a4
push dword [ebp - 0x808]
call esi
cmp eax, ebx
jne 0x41256d
push 4
pop ebx
push ebx
lea eax, [edi + 0x414]
push eax
push ebx
push 0
push 0x409088
push dword [ebp - 0x808]
call esi
test eax, eax
jne 0x41256d
push ebx
lea eax, [edi + 0x418]
push eax
push ebx
push 0
push 0x40906c
push dword [ebp - 0x808]
call esi
test eax, eax
jne 0x41256d
push ebx
lea eax, [edi + 0x10]
push eax
push ebx
push 0
push 0x409060
push dword [ebp - 0x808]
call esi
test eax, eax
jne 0x41256d
push ebx
lea eax, [edi + 0x41c]
push eax
push ebx
push 0
push 0x409038
push dword [ebp - 0x808]
call esi
test eax, eax
jne 0x41256d
push ebx
lea eax, [edi + 0x420]
push eax
push ebx
push 0
push 0x409010
push dword [ebp - 0x808]
call esi
test eax, eax
jne 0x41256d
push ebx
lea eax, [edi + 0x424]
push eax
push ebx
push 0
push 0x408fe4
push dword [ebp - 0x808]
call esi
test eax, eax
jne 0x41256d
push ebx
lea eax, [edi + 0x428]
push eax
push ebx
push 0
push 0x408fb8
push dword [ebp - 0x808]
call esi
test eax, eax
jne 0x41256d
push ebx
lea eax, [edi + 0x42c]
push eax
push ebx
push 0
push 0x408f9c
push dword [ebp - 0x808]
call esi
test eax, eax
jne 0x41256d
push ebx
lea eax, [edi + 0x430]
push eax
push ebx
push 0
push 0x408f78
push dword [ebp - 0x808]
call esi
test eax, eax
jne 0x41256d
and dword [ebp - 0x810], eax
lea ebx, [edi + 0x430]
cmp dword [ebx], eax
jbe 0x412791
add edi, 0x434
mov dword [ebp - 0x80c], edi
push dword [ebp - 0x810]
lea eax, [ebp - 0x804]
push 0x408f58
push 0x400
push eax
call fcn.004123f7
mov edi, eax
add esp, 0x10
test edi, edi
jl 0x4127ed
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 0x4127d5
add eax, eax
cmp eax, 0x400
ja 0x412800
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 0x412807
inc dword [ebp - 0x810]
mov eax, dword [ebp - 0x810]
add dword [ebp - 0x80c], 0x10
cmp eax, dword [ebx]
jb 0x4126fc
mov eax, dword [0x415574]
test eax, eax
mov dword [ebp - 0x80c], eax
je 0x4127d3
lea eax, [ebp - 0x810]
push eax
lea eax, [ebp - 0x80c]
push eax
mov ecx, 0x415574
call fcn.004123cd
test eax, eax
je 0x4127ca
mov eax, dword [ebp - 0x810]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_SetEvent]
cmp dword [ebp - 0x80c], 0
jne 0x4127a0
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.00411548
leave
ret 4
mov edi, 0x80070057
jmp 0x4127d5
jle 0x412813
and eax, 0xffff
or eax, 0x80070000
mov edi, eax
jmp 0x4127d5