Function at 0x4017bf
Capabilities:
Compare security identifiers
Get token membership

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xac
mov dword [ebp - 0x28], 0
mov eax, dword [0x47a01c]
cmp eax, 0xffffffff
je 0x4017e6
test eax, eax
setne bl
jmp 0x401a1c
mov dword [0x47a01c], 0
call sub.KERNEL32.DLL_GetCurrentProcess
lea edx, [ebp - 0x30]
mov dword [esp + 8], edx
mov dword [esp + 4], 0x20008
mov dword [esp], eax
call sub.ADVAPI32.dll_OpenProcessToken
sub esp, 0xc
xor ebx, ebx
test eax, eax
je 0x401a1c
lea esi, [ebp - 0x28]
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], 4
lea eax, [ebp - 0x2c]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x12
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call sub.ADVAPI32.dll_GetTokenInformation
sub esp, 0x14
test eax, eax
jne 0x40197f
mov dword [ebp - 0x24], 0
mov byte [ebp - 0x74], 0
mov byte [ebp - 0x73], 0
mov byte [ebp - 0x72], 0
mov byte [ebp - 0x71], 0
mov byte [ebp - 0x70], 0
mov byte [ebp - 0x6f], 5
lea edx, [ebp - 0x24]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 2
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
mov dword [ebp - 0x7c], edx
call sub.ADVAPI32.dll_GetTokenInformation
sub esp, 0x14
mov edi, dword [ebp - 0x24]
mov dword [esp], edi
call sub.msvcrt.dll_malloc
mov esi, eax
mov edx, dword [ebp - 0x7c]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], edi
mov dword [esp + 8], eax
mov dword [esp + 4], 2
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call sub.ADVAPI32.dll_GetTokenInformation
sub esp, 0x14
mov edi, eax
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call sub.KERNEL32.DLL_CloseHandle
push eax
test edi, edi
je 0x401972
lea eax, [ebp - 0x20]
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0x220
mov dword [esp + 8], 0x20
mov dword [esp + 4], 2
lea eax, [ebp - 0x74]
mov dword [esp], eax
call sub.ADVAPI32.dll_AllocateAndInitializeSid
sub esp, 0x2c
mov bl, 1
test eax, eax
je 0x401972
xor ebx, ebx
cmp ebx, dword [esi]
jae 0x401a26
mov eax, dword [esi + ebx*8 + 4]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sub.ADVAPI32.dll_EqualSid
push edi
push edi
inc ebx
test eax, eax
je 0x401949
mov bl, 1
jmp 0x401a28
mov dword [esp], esi
call fcn.0041afa8
jmp 0x401a14
cmp dword [ebp - 0x2c], 3
jne 0x401a14
mov dword [ebp - 0x24], 0x44
mov dword [ebp - 0x1c], 0
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], 4
lea eax, [ebp - 0x20]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x13
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call sub.ADVAPI32.dll_GetTokenInformation
sub esp, 0x14
test eax, eax
je 0x401a14
lea eax, [ebp - 0x24]
mov dword [esp + 0xc], eax
lea ebx, [ebp - 0x74]
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov dword [esp], 0x1a
call sub.ADVAPI32.dll_CreateWellKnownSid
sub esp, 0x10
test eax, eax
je 0x401a06
lea eax, [ebp - 0x1c]
mov dword [esp + 8], eax
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sub.ADVAPI32.dll_CheckTokenMembership
sub esp, 0xc
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sub.KERNEL32.DLL_CloseHandle
push ebx
xor ebx, ebx
movzx eax, bl
mov dword [0x47a01c], eax
mov al, bl
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
xor ebx, ebx
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sub.ADVAPI32.dll_FreeSid
push ecx
jmp 0x401972