Function at 0x40f3a0
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x4ea5e0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor ebx, ebx
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea eax, [ebp - 0x10]
push eax
lea esi, [ebp - 0x14]
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x14], ebx
call fcn.0040f310
add esp, 4
cmp eax, 1
jne 0x40f3ec
mov al, al
lea esp, [ebp - 0x40]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a8a2f
mov esp, ebp
pop ebp
ret
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x10]
mov ecx, edi
lea esi, [ebp - 0x34]
call fcn.0040f5a0
mov edx, dword [ebp - 0x14]
mov ecx, edi
lea esi, [ebp - 0x28]
call fcn.0040f5a0
mov edx, dword [ebp - 0x14]
mov edi, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
lea ecx, [ebp - 0x18]
push ecx
push ebx
push ebx
push 2
push edx
mov dword [ebp - 0xc], ebx
mov word [ebp - 8], 0x500
call edi
test eax, eax
je 0x40f458
lea eax, [ebp - 0x28]
push eax
call fcn.0040f5b0
lea ecx, [ebp - 0x34]
push ecx
call fcn.0040f5b0
add esp, 8
xor al, al
lea esp, [ebp - 0x40]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a8a2f
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x40f48e
lea edx, [ebp - 0x28]
push edx
call fcn.0040f5b0
lea eax, [ebp - 0x34]
push eax
call fcn.0040f5b0
add esp, 8
xor al, al
lea esp, [ebp - 0x40]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a8a2f
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x18]
add eax, 8
cmp eax, 0x400
ja 0x40f4b1
call fcn.004b8840
mov esi, esp
cmp esi, ebx
je 0x40f4cd
mov dword [esi], 0xcccc
add esi, 8
jmp 0x40f4c9
push eax
call fcn.004aa188
add esp, 4
cmp eax, ebx
je 0x40f4c7
mov dword [eax], 0xdddd
add eax, 8
mov esi, eax
cmp esi, ebx
jne 0x40f4f8
lea ecx, [ebp - 0x28]
push ecx
call fcn.0040f5b0
lea edx, [ebp - 0x34]
push edx
call fcn.0040f5b0
add esp, 8
xor al, al
lea esp, [ebp - 0x40]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a8a2f
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
lea eax, [ebp - 0x18]
push eax
push ecx
push esi
push 2
push edx
call edi
test eax, eax
je 0x40f42d
lea edx, [ebp - 0x1c]
push edx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x220
push 0x20
push 2
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x40f4cd
xor edi, edi
mov dword [ebp - 0x10], ebx
cmp dword [esi], ebx
jbe 0x40f562
lea ebx, [esi + 4]
mov edi, edi
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebx]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x40f55b
inc edi
add ebx, 8
cmp edi, dword [esi]
jb 0x40f540
jmp 0x40f562
mov dword [ebp - 0x10], 1
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.ADVAPI32.dll_FreeSid]
lea eax, [ebp - 0x28]
push eax
call fcn.0040f5b0
lea ecx, [ebp - 0x34]
push ecx
call fcn.0040f5b0
add esp, 8
cmp dword [ebp - 0x10], 0
setne al
lea esp, [ebp - 0x40]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a8a2f
mov esp, ebp
pop ebp
ret