Function at 0x40c5d8
Capabilities:
Delete registry value
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x65c
mov eax, dword [0x4434f4]
xor eax, esp
mov dword [esp + 0x658], eax
push ebx
push esi
push edi
push 6
pop ecx
mov esi, 0x4015f0
lea edi, [esp + 0x250]
rep movsd dword es:[edi], dword [esi]
push 0x1ee
lea eax, [esp + 0x26e]
push 0
push eax
movsw word es:[edi], word [esi]
call sub.msvcrt.dll_memset
add esp, 0xc
lea edi, [esp + 0x458]
mov esi, 0x40160c
lea eax, [esp + 0x476]
push 7
pop ecx
rep movsd dword es:[edi], dword [esi]
push 0x1ea
movsw word es:[edi], word [esi]
xor edi, edi
push edi
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov dword [esp + 0x24], 2
lea ebx, [esp + 0x250]
lea eax, [esp + 0x20]
mov dword [esp + 0x20], edi
push eax
push 0x2001f
push edi
push ebx
xor esi, esi
push SysReAllocStringLen
inc esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40c6b9
push 4
lea eax, [esp + 0x18]
mov dword [esp + 0x18], edi
push eax
push 4
push edi
push 0x40162c
push dword [esp + 0x34]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x40c6af
push 0x40162c
push dword [esp + 0x24]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
mov esi, edi
push dword [esp + 0x20]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x40c921
push ebx
push 0x401638
lea eax, [esp + 0x50]
push 0x104
push eax
call fcn.0040c0b5
add esp, 0x10
test eax, eax
js 0x40c921
lea eax, [esp + 0x14]
mov dword [esp + 0x18], edi
push eax
push edi
lea eax, [esp + 0x20]
mov dword [esp + 0x24], edi
push eax
push edi
push edi
push 4
push 4
lea eax, [esp + 0x64]
mov dword [esp + 0x30], edi
push eax
mov esi, edi
call dword [sym.imp.ADVAPI32.dll_GetNamedSecurityInfoW]
test eax, eax
jne 0x40c7d9
push 8
mov dword [esp + 0x14], edi
lea edi, [esp + 0x2c]
pop ecx
rep stosd dword es:[edi], eax
lea eax, [esp + 0x10]
mov dword [esp + 0x28], 0x10000000
push eax
xor edi, edi
mov dword [esp + 0x30], 1
push 0x401658
mov dword [esp + 0x38], 3
mov dword [esp + 0x44], edi
call dword [sym.imp.ADVAPI32.dll_ConvertStringSidToSidW]
test eax, eax
je 0x40c7b7
mov eax, dword [esp + 0x10]
mov dword [esp + 0x44], eax
lea eax, [esp + 0x1c]
push eax
push dword [esp + 0x1c]
lea eax, [esp + 0x30]
push eax
push 1
call dword [sym.imp.ADVAPI32.dll_SetEntriesInAclW]
test eax, eax
jne 0x40c79b
push edi
push dword [esp + 0x20]
lea eax, [esp + 0x50]
push edi
push edi
push 4
push 4
push eax
call dword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoW]
test eax, eax
jne 0x40c793
xor esi, esi
inc esi
jmp 0x40c7ab
push eax
push 0x40561c
jmp 0x40c7a1
push eax
push 0x405644
push 2
call fcn.0041ea5f
add esp, 0xc
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x40c7cd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x405664
push 2
call fcn.0041ea5f
add esp, 0xc
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x40c7e9
push eax
push 0x405694
push 2
call fcn.0041ea5f
add esp, 0xc
test esi, esi
je 0x40c801
lea eax, [esp + 0x48]
push eax
push 0x4056bc
push 4
call fcn.0041ea5f
add esp, 0xc
lea eax, [esp + 0x18]
mov dword [esp + 0x14], edi
push eax
push edi
lea eax, [esp + 0x1c]
mov dword [esp + 0x24], edi
push eax
push edi
push edi
push 4
push 4
lea eax, [esp + 0x64]
mov dword [esp + 0x34], edi
push eax
mov esi, edi
call dword [sym.imp.ADVAPI32.dll_GetNamedSecurityInfoW]
test eax, eax
jne 0x40c8f9
push 8
mov dword [esp + 0x14], edi
lea edi, [esp + 0x2c]
pop ecx
rep stosd dword es:[edi], eax
lea eax, [esp + 0x10]
mov dword [esp + 0x28], 0x10000000
push eax
xor edi, edi
mov dword [esp + 0x30], 1
push 0x401660
mov dword [esp + 0x38], 3
mov dword [esp + 0x44], edi
call dword [sym.imp.ADVAPI32.dll_ConvertStringSidToSidW]
test eax, eax
je 0x40c8d7
mov eax, dword [esp + 0x10]
mov dword [esp + 0x44], eax
lea eax, [esp + 0x1c]
push eax
push dword [esp + 0x18]
lea eax, [esp + 0x30]
push eax
push 1
call dword [sym.imp.ADVAPI32.dll_SetEntriesInAclW]
test eax, eax
jne 0x40c8bb
push edi
push dword [esp + 0x20]
lea eax, [esp + 0x50]
push edi
push edi
push 4
push 4
push eax
call dword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoW]
test eax, eax
jne 0x40c8b3
xor esi, esi
inc esi
jmp 0x40c8cb
push eax
push 0x40561c
jmp 0x40c8c1
push eax
push 0x405644
push 2
call fcn.0041fb3c
add esp, 0xc
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x40c8ed
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x405664
push 2
call fcn.0041ea5f
add esp, 0xc
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x40c909
push eax
push 0x405694
push 2
call fcn.0041ea5f
add esp, 0xc
test esi, esi
je 0x40c921
lea eax, [esp + 0x48]
push eax
push 0x4056bc
push 4
call fcn.0041ea5f
add esp, 0xc
add ebx, 0x208
sub dword [esp + 0x24], 1
jne 0x40c65b
mov ecx, dword [esp + 0x664]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00441b90
mov esp, ebp
pop ebp
ret