Function at 0x40f400
Capabilities:
Get token membership
Print debug messages

Disassembly:
sub esp, 0x824
mov eax, dword [0x461054]
xor eax, esp
mov dword [esp + 0x820], eax
push esi
push edi
lea eax, [esp + 0xc]
push eax
push 0x20008
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x40f4a8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push edi
push esi
push eax
push 0xd5
push 0x44b930
lea eax, [esp + 0x3c]
push 0x44b884
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x1c
call fcn.004135e0
test eax, eax
je 0x40f488
push 0
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x40f488
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
xor al, al
pop esi
mov ecx, dword [esp + 0x820]
xor ecx, esp
call fcn.0042cc35
add esp, 0x824
ret
lea eax, [esp + 0x1c]
mov dword [esp + 0x18], 0
push eax
push 4
lea eax, [esp + 0x20]
mov dword [esp + 0x24], 0
push eax
push 0x14
push dword [esp + 0x1c]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x40f678
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push edi
push esi
push eax
push 0xdc
push 0x44b930
lea eax, [esp + 0x44]
push 0x44b884
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x1c
call fcn.004135e0
mov ebp, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ebx, dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
test eax, eax
je 0x40f535
push 0
push eax
call ebp
test eax, eax
jne 0x40f535
lea eax, [esp + 0x30]
push eax
call ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_SetLastError]
call edi
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esp + 0x18]
mov dword [esp + 0x1c], 0
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0x220
push 0x20
push 2
lea eax, [esp + 0x50]
mov dword [esp + 0x50], 0
push eax
mov word [esp + 0x58], 0x500
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
jne 0x40f5ef
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov dword [esp + 0x10], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
call eax
mov esi, eax
mov eax, dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
call eax
push dword [esp + 0x10]
push esi
push eax
push 0x52
push 0x44b930
lea eax, [esp + 0x44]
push 0x44b884
push eax
mov eax, dword [sym.imp.USER32.dll_wsprintfA]
call eax
add esp, 0x1c
call fcn.004135e0
test eax, eax
je 0x40f5dd
push 0
push eax
call ebp
test eax, eax
jne 0x40f5dd
lea eax, [esp + 0x30]
push eax
call ebx
push dword [esp + 0x10]
call edi
cmp dword [esp + 0x1c], 0
pop ebp
pop ebx
jmp 0x40f687
lea eax, [esp + 0x1c]
push eax
push dword [esp + 0x1c]
push 0
call dword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
test eax, eax
jne 0x40f665
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov dword [esp + 0x10], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
call eax
mov esi, eax
mov eax, dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
call eax
push dword [esp + 0x10]
push esi
push eax
push 0x55
push 0x44b930
lea eax, [esp + 0x444]
push 0x44b884
push eax
mov eax, dword [sym.imp.USER32.dll_wsprintfA]
call eax
add esp, 0x1c
call fcn.004135e0
test eax, eax
je 0x40f65f
push 0
push eax
call ebp
test eax, eax
jne 0x40f65f
lea eax, [esp + 0x430]
push eax
call ebx
push dword [esp + 0x10]
call edi
push dword [esp + 0x18]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
cmp dword [esp + 0x1c], 0
pop ebp
pop ebx
jmp 0x40f687
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x18], 0
mov ecx, dword [esp + 0x828]
setne al
pop edi
pop esi
xor ecx, esp
call fcn.0042cc35
add esp, 0x824
ret