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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x515ef0
mov eax, dword fs:[0]
push eax
sub esp, 0x38
push esi
push edi
mov eax, dword [0x55b524]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push dword [ebp + 8]
lea eax, [ebp - 0x1c]
push eax
call fcn.004e6930
add esp, 8
mov esi, dword [ebp - 0x1c]
lea eax, [ebp - 0x44]
push 1
xorps xmm0, xmm0
mov dword [ebp - 4], 0
push eax
movups xmmword [ebp - 0x44], xmm0
mov dword [ebp - 0x34], 0
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
push 1
push 0
push 1
lea eax, [ebp - 0x44]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
push 0x40000
push esi
push SysReAllocString
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
call fcn.00419c90
mov esi, dword [ebp - 0x30]
test eax, eax
jne 0x4e6113
lea eax, [ebp - 0x44]
push eax
push 4
push esi
call dword [sym.imp.ADVAPI32.dll_RegSetKeySecurity]
push 0x51d334
lea ecx, [ebp - 0x30]
call fcn.00421230
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x4e6120
push esi
call edi
push dword [ebp - 0x1c]
push SysReAllocString
call dword [sym.imp.SHLWAPI.dll_SHDeleteKeyW]
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
push 0
push 0
push 0x2001f
push 0
push 0
push dword [ebp - 0x1c]
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 1
push SysReAllocString
call fcn.004e5f90
cmp eax, 0xb7
je 0x4e6180
test eax, eax
je 0x4e6180
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x4e6179
push eax
call edi
xor dl, dl
jmp 0x4e62f7
cmp word [0x5654c0], 0
jne 0x4e6267
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0
push eax
push 8
mov dword [ebp - 0x14], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x4e6267
mov esi, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
lea eax, [ebp - 0x14]
push eax
push 0
push 0
push 1
push dword [ebp - 0x18]
call esi
push dword [ebp - 0x14]
call fcn.004bbd73
push dword [ebp - 0x14]
mov edi, eax
push 0
push edi
call fcn.00491810
add esp, 0x10
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x14]
push edi
push 1
push dword [ebp - 0x18]
call esi
test eax, eax
je 0x4e6267
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [edi]
call dword [sym.imp.ADVAPI32.dll_IsValidSid]
test eax, eax
jne 0x4e6217
push edi
call fcn.004bbd56
add esp, 4
jmp 0x4e6267
push dword [edi]
call dword [sym.imp.ADVAPI32.dll_GetSidSubAuthorityCount]
movzx eax, byte [eax]
dec eax
push eax
push dword [edi]
call dword [sym.imp.ADVAPI32.dll_GetSidSubAuthority]
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 0
push eax
push dword [edi]
call sub.ADVAPI32.dll_ConvertSidToStringSidW
push dword [ebp - 0x20]
push 0x5278b4
push 0x104
push 0x5654c0
call fcn.00409c90
push edi
call fcn.004bbd56
add esp, 0x14
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov edi, dword [ebp + 0xc]
push 0x5654c0
push edi
push dword [ebp + 8]
call fcn.004e92b0
mov esi, dword [ebp - 0x30]
mov edx, eax
add esp, 0xc
test edx, edx
je 0x4e62b9
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0x24], eax
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4e6290
sub ecx, dword [ebp - 0x24]
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push edx
push 1
push 0
push 0x53ca98
push esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test edi, edi
je 0x4e62ea
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4e62c2
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push edi
push 1
push 0
push str.ProgId
push esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test esi, esi
je 0x4e62f5
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dl, 1
mov eax, dword [ebp - 0x1c]
or ecx, 0xffffffff
mov byte [ebp - 0xd], dl
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lock xadd dword [eax + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x4e6330
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov al, byte [ebp - 0xd]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov al, dl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret