Function at 0x421d00
Capabilities:
Get token membership

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44cdce
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x1a8
mov eax, dword [0x45f200]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea eax, [ebp - 0x1b8]
mov dword [ebp - 0x1b4], 0
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0x220
push 0x20
push 2
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], 0
push eax
mov word [ebp - 0x18], 0x500
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x421dad
lea eax, [ebp - 0x1b4]
push eax
push dword [ebp - 0x1b8]
push 0
call dword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
test eax, eax
jne 0x421da1
mov dword [ebp - 0x1b4], eax
push dword [ebp - 0x1b8]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
cmp dword [ebp - 0x1b4], 0
je 0x421e1f
lea eax, [ebp - 0x1b4]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x421e1f
lea eax, [ebp - 0x2c]
push eax
push str.SeShutdownPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
push 0
push 0
push 0
lea eax, [ebp - 0x30]
mov dword [ebp - 0x30], 1
push eax
push 0
push dword [ebp - 0x1b4]
mov dword [ebp - 0x24], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
push dword [ebp - 0x1b4]
test eax, eax
je 0x421e3f
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004297d1
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x4580b0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
jne 0x421ef6
call esi
push 0xb0
mov edi, eax
lea eax, [ebp - 0x100]
push 0
push eax
call fcn.0042b650
add esp, 8
lea ecx, [ebp - 0x100]
call fcn.004221b0
mov dword [ebp - 4], 0
mov edx, str.Error:_Failed_to_get_handle_to_ntdll.dll._Error_code:_0x
lea ecx, [ebp - 0xf0]
call fcn.00413f80
mov esi, eax
lea eax, [ebp - 0x30]
push 0
push 8
push eax
mov ecx, dword [esi]
mov edx, dword [ecx + 4]
mov ecx, dword [edx + esi + 0x14]
and ecx, 0xfffff9ff
or ecx, 0x800
mov dword [edx + esi + 0x14], ecx
call fcn.004293f3
mov ecx, dword [esi]
add esp, 0xc
push dword [eax + 0xc]
mov ecx, dword [ecx + 4]
push dword [eax + 8]
mov eax, dword [eax]
add ecx, esi
push ecx
call eax
mov eax, dword [esi]
add esp, 0xc
mov ecx, esi
mov eax, dword [eax + 4]
push edi
mov byte [eax + esi + 0x40], 0x30
call fcn.00422330
lea ecx, [ebp - 0x100]
call fcn.004220e0
jmp 0x421e1f
push str.NtShutdownSystem
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x421f3c
call esi
push 0xb0
mov edi, eax
lea eax, [ebp - 0x100]
push 0
push eax
call fcn.0042b650
add esp, 8
lea ecx, [ebp - 0x100]
call fcn.004221b0
mov dword [ebp - 4], 1
mov edx, str.Error:_Failed_to_get_address_of_NtShutdownSystem._Error_code:_0x
jmp 0x421e89
push 1
call eax
mov edi, eax
test edi, edi
jns 0x4220c7
push 0xb0
lea eax, [ebp - 0x1b0]
push 0
push eax
call fcn.0042b650
add esp, 8
lea ecx, [ebp - 0x1b0]
call fcn.004221b0
mov edx, str.Error:_NtShutdownSystem_failed_with_status:_0x
mov dword [ebp - 4], 2
lea ecx, [ebp - 0x1a0]
call fcn.00413f80
mov esi, eax
lea eax, [ebp - 0x30]
push 0
push 8
push eax
mov ecx, dword [esi]
mov edx, dword [ecx + 4]
mov ecx, dword [edx + esi + 0x14]
and ecx, 0xfffff9ff
or ecx, 0x800
mov dword [edx + esi + 0x14], ecx
call fcn.004293f3
mov ecx, dword [esi]
add esp, 0xc
push dword [eax + 0xc]
mov ecx, dword [ecx + 4]
push dword [eax + 8]
mov eax, dword [eax]
add ecx, esi
push ecx
call eax
mov eax, dword [esi]
add esp, 0xc
mov ecx, esi
mov eax, dword [eax + 4]
push edi
mov byte [eax + esi + 0x40], 0x30
call fcn.004224d0
push edi
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
push 0
push 0
lea ecx, [ebp - 0x1b8]
push ecx
push 0x400
push eax
push 0
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
mov edx, dword [ebp - 0x1b8]
xorps xmm0, xmm0
mov ecx, edx
mov dword [ebp - 0x28], 0
movups xmmword [ebp - 0x38], xmm0
mov dword [ebp - 0x24], 0
lea esi, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x422020
sub ecx, esi
push ecx
push edx
lea ecx, [ebp - 0x38]
call fcn.00409b20
lea eax, [ebp - 0x38]
mov byte [ebp - 4], 3
push eax
mov edx, str.Error_message:
lea ecx, [ebp - 0x50]
call fcn.004142c0
mov ecx, dword [ebp - 0x24]
add esp, 4
cmp ecx, 0xf
jbe 0x42207b
mov edx, dword [ebp - 0x38]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x422071
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4220ce
push ecx
push edx
call fcn.0042980f
add esp, 8
push dword [ebp - 0x1b8]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [ebp - 0x3c]
cmp ecx, 0xf
jbe 0x4220b7
mov edx, dword [ebp - 0x50]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4220ad
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4220d3
push ecx
push edx
call fcn.0042980f
add esp, 8
lea ecx, [ebp - 0x1b0]
call fcn.004220e0
jmp 0x421e1f
mov al, 1
jmp 0x421e21
call fcn.0042e68f
call fcn.0042e68f
int3