Function at 0x659f7d6
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb8
mov eax, dword [0x65e4e2c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, ecx
mov dword [ebp - 0xb8], eax
call fcn.0659e9b1
test al, al
jne 0x659f805
inc al
jmp 0x659fabc
push edi
or dword [ebp - 0xac], 0xffffffff
xor edi, edi
lea eax, [ebp - 0xb0]
push eax
push edi
push edi
push edi
push edi
push edi
push edi
push 0x220
push 0x20
push 2
lea eax, [ebp - 0xc]
push eax
mov byte [ebp - 0xa5], 0
mov dword [ebp - 0xb0], edi
mov dword [ebp - 0xc], edi
mov word [ebp - 8], 0x500
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
jne 0x659f893
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 4], eax
mov ecx, dword [0x65e4c3c]
cmp ecx, 0x65e4c3c
je 0x659fa86
test byte [ecx + 0x1c], 1
je 0x659fa86
cmp byte [ecx + 0x19], 2
jb 0x659fa86
push eax
push 0x65d3d2c
push 0xf
push dword [ecx + 0x14]
push dword [ecx + 0x10]
call fcn.065af7a9
add esp, 0x14
jmp 0x659fa86
push esi
lea eax, [ebp - 0xac]
push eax
push edi
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenThreadToken]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x659f90d
call esi
cmp eax, 0x3f0
jne 0x659f8d8
lea eax, [ebp - 0xac]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x659f90d
call esi
mov dword [ebx + 4], eax
mov ecx, dword [0x65e4c3c]
cmp ecx, 0x65e4c3c
je 0x659fa85
test byte [ecx + 0x1c], 1
je 0x659fa85
cmp byte [ecx + 0x19], 2
jb 0x659fa85
push eax
push 0x65d3d2c
push 0x10
jmp 0x659f968
lea eax, [ebp - 0xb4]
push eax
push edi
push edi
push 2
push dword [ebp - 0xac]
mov dword [ebp - 0xb4], edi
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x659f97b
call esi
cmp eax, 0x7a
je 0x659f97b
call esi
mov dword [ebx + 4], eax
mov ecx, dword [0x65e4c3c]
cmp ecx, 0x65e4c3c
je 0x659fa85
test byte [ecx + 0x1c], 1
je 0x659fa85
cmp byte [ecx + 0x19], 2
jb 0x659fa85
push eax
push 0x65d3d2c
push 0x11
push dword [ecx + 0x14]
push dword [ecx + 0x10]
call fcn.065af7a9
add esp, 0x14
jmp 0x659fa85
lea ecx, [ebp - 0xa4]
call fcn.0658b8e9
push dword [ebp - 0xb4]
lea ecx, [ebp - 0xa4]
call fcn.0658bb20
mov edi, eax
test edi, edi
jne 0x659f9e2
mov dword [ebx + 4], 0xe
mov eax, dword [0x65e4c3c]
cmp eax, 0x65e4c3c
je 0x659fa78
test byte [eax + 0x1c], 1
je 0x659fa78
cmp byte [eax + 0x19], 2
jb 0x659fa78
push 0x65d3d2c
push 0x12
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.0658b8a5
add esp, 0x10
jmp 0x659fa78
lea eax, [ebp - 0xb4]
push eax
push dword [ebp - 0xb4]
push edi
push 2
push dword [ebp - 0xac]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x659fa39
call esi
mov dword [ebx + 4], eax
mov ecx, dword [0x65e4c3c]
cmp ecx, 0x65e4c3c
je 0x659fa78
test byte [ecx + 0x1c], 1
je 0x659fa78
cmp byte [ecx + 0x19], 2
jb 0x659fa78
push eax
push 0x65d3d2c
push 0x13
push dword [ecx + 0x14]
push dword [ecx + 0x10]
call fcn.065af7a9
add esp, 0x14
jmp 0x659fa78
xor esi, esi
cmp dword [edi], esi
jbe 0x659fa78
lea ebx, [edi + 4]
push dword [ebx]
push dword [ebp - 0xb0]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x659fa5e
inc esi
add ebx, 8
cmp esi, dword [edi]
jb 0x659fa42
jmp 0x659fa78
mov eax, dword [edi + esi*8 + 8]
mov ecx, dword [ebp - 0xb8]
shr eax, 2
not al
and al, 1
mov byte [ecx], al
mov byte [ebp - 0xa5], 1
lea ecx, [ebp - 0xa4]
call fcn.0658bb15
xor edi, edi
pop esi
cmp dword [ebp - 0xb0], edi
je 0x659faa0
push dword [ebp - 0xb0]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov dword [ebp - 0xb0], edi
cmp dword [ebp - 0xac], 0xffffffff
pop edi
je 0x659fab6
push dword [ebp - 0xac]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [ebp - 0xa5]
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.065b6645
leave
ret 4