Function at 0x40c4a0
Capabilities:
Delete registry value
Persist via run registry key
Set registry value

Disassembly:
push 0xffffffffffffffff
push 0x44c998
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x465d3c]
xor eax, esp
push eax
lea eax, [esp + 0x28]
mov dword fs:[0], eax
lea eax, [esp + 0x14]
push eax
push 0x20006
xor ebx, ebx
push ebx
push str.SoftwareMicrosoftWindowsCurrentVersionRun
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x28], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, ebx
jne 0x40c637
cmp dword [esp + 0x40], 1
jne 0x40c697
mov ecx, dword [esp + 0x3c]
push ecx
lea ecx, [esp + 0x14]
call fcn.00402a70
mov ecx, dword [esp + 0x10]
mov esi, dword [ecx - 0xc]
mov dword [esp + 0x30], ebx
cmp esi, ebx
jbe 0x40c5c2
jle 0x40c538
push 0x22
push ecx
call fcn.00433fe5
add esp, 8
cmp eax, ebx
je 0x40c538
mov ecx, dword [esp + 0x10]
sub eax, ecx
je 0x40c5c2
push 0x44fa10
lea ecx, [esp + 0x28]
call fcn.00402a70
mov esi, eax
push 0x44fa10
lea ecx, [esp + 0x24]
mov byte [esp + 0x34], 1
call fcn.00402a70
lea edx, [esp + 0x10]
push edx
push eax
lea eax, [esp + 0x24]
push eax
mov byte [esp + 0x3c], 2
call fcn.00402610
push esi
push eax
lea ecx, [esp + 0x2c]
push ecx
mov byte [esp + 0x48], 3
call fcn.00402610
add esp, 0x18
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x34], 4
call fcn.00402100
lea ecx, [esp + 0x18]
call fcn.00401020
lea ecx, [esp + 0x1c]
call fcn.00401020
lea ecx, [esp + 0x20]
call fcn.00401020
lea ecx, [esp + 0x24]
mov byte [esp + 0x30], bl
call fcn.00401020
mov ecx, dword [esp + 0x10]
mov esi, dword [ecx - 0xc]
mov eax, dword [ecx - 8]
lea edi, [esi + 1]
mov esi, dword [ecx - 0xc]
mov edx, 1
sub edx, dword [ecx - 4]
sub eax, esi
or eax, edx
jge 0x40c5e7
push esi
lea ecx, [esp + 0x14]
call fcn.004017b0
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x14]
push edi
push ecx
push 1
push ebx
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
cmp eax, ebx
je 0x40c64c
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov dword [esp + 0x14], ebx
mov dword [esp + 0x30], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40c637
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add esp, 0x24
ret
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov dword [esp + 0x30], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c674
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 1
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add esp, 0x24
ret
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x14]
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
test eax, eax
je 0x40c674
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add esp, 0x24
ret