Function at 0x46d9da
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e18fc
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x1420
call fcn.004b4d90
mov eax, dword [0x5382cc]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
xor ebx, ebx
mov dword [ebp - 0x1420], ebx
mov dword [ebp - 0x142c], ebx
mov byte [ebp - 0x141c], bl
mov byte [ebp - 0x141b], bl
mov byte [ebp - 0x141a], bl
mov byte [ebp - 0x1419], bl
mov byte [ebp - 0x1418], bl
mov byte [ebp - 0x1417], 5
mov dword [ebp - 0x1430], ebx
push dword [ebp + 8]
push ebx
push 0x400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
mov dword [ebp - 0x1424], esi
cmp esi, ebx
je 0x46da7f
lea eax, [ebp - 0x1420]
push eax
push 8
push esi
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x46dab9
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x1424], ebx
xor esi, esi
lea eax, [ebp - 0x1424]
push eax
push 1
push ebx
push str.SYSTEMCurrentControlSet_services
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x46dab2
push dword [ebp - 0x1424]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc esi
mov eax, esi
jmp 0x46dbb0
mov eax, 0x1400
mov dword [ebp - 0x142c], eax
lea ecx, [ebp - 0x142c]
push ecx
push eax
lea eax, [ebp - 0x1414]
push eax
push 2
push dword [ebp - 0x1420]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
cmp eax, ebx
jne 0x46daf4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x46dbe0
lea eax, [ebp - 0x1428]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x220
push 0x20
push 2
lea eax, [ebp - 0x141c]
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x46dbe0
xor esi, esi
mov edi, dword [sym.imp.ADVAPI32.dll_IsValidSid]
lea eax, [ebp - 0x1414]
cmp esi, dword [eax]
jae 0x46db7c
mov dword [ebp - 4], ebx
push dword [ebp - 0x1428]
call edi
test eax, eax
je 0x46dbca
lea eax, [ebp - 0x1414]
push dword [eax + esi*8 + 4]
call edi
test eax, eax
je 0x46dbca
lea eax, [ebp - 0x1414]
push dword [eax + esi*8 + 4]
push dword [ebp - 0x1428]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x46dbca
mov dword [ebp - 0x1430], 1
or dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x1420], ebx
je 0x46db96
push dword [ebp - 0x1420]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x1420], ebx
cmp dword [ebp - 0x1424], ebx
je 0x46dbaa
push dword [ebp - 0x1424]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x1430]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004b46ff
leave
ret
or dword [ebp - 4], 0xffffffff
inc esi
jmp 0x46db27
cmp dword [ebp - 0x1428], ebx
je 0x46dbf4
push dword [ebp - 0x1428]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
cmp dword [ebp - 0x1420], ebx
je 0x46dc0e
push dword [ebp - 0x1420]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x1420], ebx
cmp dword [ebp - 0x1424], ebx
je 0x46dc22
push dword [ebp - 0x1424]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x46dbb0