Function at 0x40c6c0
Capabilities:
Check os version
Compare security identifiers

Disassembly:
sub esp, 0xb0
push ebp
push edi
mov ecx, 0x24
xor eax, eax
lea edi, [esp + 0x28]
xor ebp, ebp
rep stosd dword es:[edi], eax
lea eax, [esp + 0x24]
mov dword [esp + 0x10], ebp
push eax
mov dword [esp + 0x24], ebp
mov dword [esp + 0xc], ebp
mov dword [esp + 0x10], ebp
mov byte [esp + 0x18], 0
mov byte [esp + 0x19], 0
mov byte [esp + 0x1a], 0
mov byte [esp + 0x1b], 0
mov byte [esp + 0x1c], 0
mov byte [esp + 0x1d], 5
mov dword [esp + 0x28], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [esp + 0x34], 2
je 0x40c73a
mov ecx, dword [esp + 0xc0]
pop edi
mov eax, 1
pop ebp
mov dword [ecx], 1
add esp, 0xb0
ret
mov eax, dword [esp + 0xbc]
lea edx, [esp + 0x10]
push edx
push ebp
push ebp
push ebp
push ebp
push ebp
push ebp
push eax
push 0x20
lea ecx, [esp + 0x38]
push 2
push ecx
mov dword [esp + 0x48], ebp
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
jne 0x40c76d
pop edi
pop ebp
add esp, 0xb0
ret
push esi
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp ax, 5
jb 0x40c7c0
push str.CheckTokenMembership
push str.advapi32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x24]
push edx
push ecx
push ebp
call eax
test eax, eax
je 0x40c8b2
mov edx, dword [esp + 0xc4]
mov eax, dword [esp + 0x24]
mov dword [esp + 0x20], 1
mov dword [edx], eax
jmp 0x40c8b2
lea ecx, [esp + 0xc]
push ecx
push 1
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenThreadToken]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40c809
call edi
cmp eax, 0x3f0
jne 0x40c8b2
lea edx, [esp + 0xc]
push edx
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x40c8b2
mov ecx, dword [esp + 0xc]
mov esi, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
lea eax, [esp + 0x10]
push eax
push ebp
push ebp
push 2
push ecx
call esi
test eax, eax
jne 0x40c831
call edi
cmp eax, 0x7a
je 0x40c831
call edi
jmp 0x40c8b2
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.MSVCRT.dll_malloc]
mov edi, eax
add esp, 4
cmp edi, ebp
je 0x40c8b2
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0xc]
lea eax, [esp + 0x10]
push ebx
push eax
push ecx
push edi
push 2
push edx
call esi
test eax, eax
je 0x40c8a7
cmp dword [edi], ebp
jbe 0x40c8a7
mov ebx, dword [sym.imp.ADVAPI32.dll_EqualSid]
lea esi, [edi + 8]
mov eax, dword [esi - 4]
mov ecx, dword [esp + 0x18]
push eax
push ecx
call ebx
test eax, eax
je 0x40c884
mov edx, dword [esi]
and edx, 0x14
cmp dl, 4
je 0x40c890
mov eax, dword [edi]
inc ebp
add esi, 8
cmp ebp, eax
jb 0x40c86b
jmp 0x40c8a5
mov eax, dword [esp + 0xc8]
mov dword [esp + 0x24], 1
mov dword [eax], 1
xor ebp, ebp
push edi
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
pop ebx
mov eax, dword [esp + 0xc]
pop esi
cmp eax, ebp
je 0x40c8c6
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 8], ebp
mov eax, dword [esp + 0x10]
cmp eax, ebp
je 0x40c8d5
push eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov eax, dword [esp + 0x1c]
pop edi
pop ebp
add esp, 0xb0
ret