Function at 0x5d9110
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x7ca00c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
lea eax, [ebp - 0x10]
push eax
push 0x20008
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x5d91aa
cmp dword [0x7eb9f0], eax
je 0x5d9189
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov esi, dword [0x7eb9f0]
mov ecx, esi
push eax
push str.Unable_to_OpenProcessToken._Error:__u
push 0x701e7c
push 0x701e7c
push str.OSUtils
push 0x7721a4
push 0x28
call dword [0x6ef350]
call esi
add esp, 0x1c
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0063de71
mov esp, ebp
pop ebp
ret
mov esi, dword [0x7eb9f4]
test esi, esi
je 0x5d93c2
mov esi, dword [esi]
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
push str.Unable_to_OpenProcessToken._Error:__u
jmp 0x5d93a0
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push eax
push 0
push 0
push 2
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x5d9250
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0x7a
je 0x5d9250
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
cmp dword [0x7eb9f0], 0
je 0x5d922f
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov esi, dword [0x7eb9f0]
mov ecx, esi
push eax
push str.Unable_to_GetTokenInformation_size._Error:__u
push 0x701e7c
push 0x701e7c
push str.OSUtils
push 0x7721a4
push 0x28
call dword [0x6ef350]
call esi
add esp, 0x1c
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0063de71
mov esp, ebp
pop ebp
ret
mov esi, dword [0x7eb9f4]
test esi, esi
je 0x5d93c2
mov esi, dword [esi]
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
push str.Unable_to_GetTokenInformation_size._Error:__u
jmp 0x5d93a0
push dword [ebp - 0x14]
push 0x40
call dword [sym.imp.KERNEL32.DLL_GlobalAlloc]
mov esi, eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x14]
push esi
push 2
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
push dword [ebp - 0x10]
test eax, eax
jne 0x5d92f4
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push esi
call dword [sym.imp.KERNEL32.DLL_GlobalFree]
cmp dword [0x7eb9f0], 0
je 0x5d92d3
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov esi, dword [0x7eb9f0]
mov ecx, esi
push eax
push str.Unable_to_GetTokenInformation._Error:__u
push 0x701e7c
push 0x701e7c
push str.OSUtils
push 0x7721a4
push 0x28
call dword [0x6ef350]
call esi
add esp, 0x1c
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0063de71
mov esp, ebp
pop ebp
ret
mov esi, dword [0x7eb9f4]
test esi, esi
je 0x5d93c2
mov esi, dword [esi]
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
push str.Unable_to_GetTokenInformation._Error:__u
jmp 0x5d93a0
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea eax, [ebp - 0x18]
mov dword [ebp - 0xc], 0
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0x220
push 0x20
push 2
lea eax, [ebp - 0xc]
mov word [ebp - 8], 0x500
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
jne 0x5d93d3
push esi
call dword [sym.imp.KERNEL32.DLL_GlobalFree]
cmp dword [0x7eb9f0], 0
je 0x5d9388
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov esi, dword [0x7eb9f0]
mov ecx, esi
push eax
push str.Unable_to_AllocateAndInitializeSid_for_Admin._Error:__u
push 0x701e7c
push 0x701e7c
push str.OSUtils
push 0x7721a4
push 0x28
call dword [0x6ef350]
call esi
add esp, 0x1c
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0063de71
mov esp, ebp
pop ebp
ret
mov esi, dword [0x7eb9f4]
test esi, esi
je 0x5d93c2
mov esi, dword [esi]
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
push str.Unable_to_AllocateAndInitializeSid_for_Admin._Error:__u
mov esi, dword [esi + 0x34]
mov ecx, esi
push str.OSUtils
push 0x701e7c
push 0x28
push dword [0x7eb9f4]
call dword [0x6ef350]
call esi
add esp, 0x18
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0063de71
mov esp, ebp
pop ebp
ret
push ebx
xor al, al
lea ebx, [esi + 4]
push edi
mov byte [ebp - 0x19], al
xor edi, edi
nop
cmp edi, dword [esi]
jae 0x5d93fd
push dword [ebx]
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
setne byte [ebp - 0x19]
inc edi
add ebx, 8
test eax, eax
je 0x5d93e0
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
push esi
call dword [sym.imp.KERNEL32.DLL_GlobalFree]
mov ecx, dword [ebp - 4]
mov al, byte [ebp - 0x19]
xor ecx, ebp
pop edi
pop ebx
pop esi
call fcn.0063de71
mov esp, ebp
pop ebp
ret