Function at 0x180002944
Capabilities:
Check os version
Compare security identifiers
Get system information on windows
Get token membership

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x9b0
xor eax, eax
lea rdi, [rsp + 0x90]
mov ecx, 0x11c
rep stosb byte [rdi], al
lea ecx, [rax + 0x30]
lea rdi, [rsp + 0x60]
rep stosb byte [rdi], al
lea rcx, [rsp + 0x90]
mov dword [rsp + 0x90], 0x11c
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
mov al, byte [rsp + 0x98]
mov dl, byte [rsp + 0x94]
mov byte [0x180005295], al
movzx eax, word [rsp + 0x9c]
lea rcx, [rsp + 0x60]
mov word [0x180005296], ax
mov al, byte [rsp + 0x1a4]
mov byte [0x180005294], dl
mov byte [0x180005298], al
movzx eax, word [rsp + 0x1a8]
mov word [0x180005299], ax
mov al, byte [rsp + 0x1aa]
mov byte [0x18000529b], al
call qword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
cmp word [rsp + 0x60], 9
sete byte [0x18000529c]
cmp byte [0x180005294], 6
mov ebx, 0x220
mov esi, 0x20
jae 0x180002abf
xor edi, edi
lea rax, [rsp + 0x9e0]
lea rcx, [rsp + 0x9d8]
mov qword [rsp + 0x50], rax
mov dword [rsp + 0x48], edi
mov dword [rsp + 0x40], edi
mov dword [rsp + 0x38], edi
mov dword [rsp + 0x30], edi
mov r9d, ebx
mov r8d, esi
mov dl, 2
mov dword [rsp + 0x28], edi
mov byte [rsp + 0x9d8], dil
mov byte [rsp + 0x9d9], dil
mov byte [rsp + 0x9da], dil
mov dword [rsp + 0x20], edi
mov byte [rsp + 0x9db], dil
mov byte [rsp + 0x9dc], dil
mov byte [rsp + 0x9dd], 5
call qword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
mov dword [rsp + 0x9d0], eax
cmp eax, edi
je 0x180002aeb
mov rdx, qword [rsp + 0x9e0]
lea r8, [rsp + 0x9d0]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
neg eax
sbb ecx, ecx
and ecx, dword [rsp + 0x9d0]
mov dword [rsp + 0x9d0], ecx
mov rcx, qword [rsp + 0x9e0]
call qword [sym.imp.ADVAPI32.dll_FreeSid]
cmp dword [rsp + 0x9d0], edi
je 0x180002aeb
jmp 0x180002b02
call fcn.180003568
xor edi, edi
mov byte [0x18000529e], dil
cmp eax, 0x1000
jne 0x180002add
mov byte [0x18000529e], 1
jmp 0x180002b19
cmp eax, 0x2000
jb 0x180002af4
cmp eax, 0x3000
jae 0x180002afb
mov byte [0x18000529e], 2
jmp 0x180002b19
cmp eax, 0x3000
jb 0x180002b0b
cmp eax, 0x4000
jae 0x180002b12
mov byte [0x18000529e], 3
jmp 0x180002b19
cmp eax, 0x4000
jb 0x180002b19
mov byte [0x18000529e], 4
lea rax, [rsp + 0x9e8]
lea rcx, [rsp + 0x9d8]
mov r9d, ebx
mov qword [rsp + 0x50], rax
mov dword [rsp + 0x48], edi
mov dword [rsp + 0x40], edi
mov dword [rsp + 0x38], edi
mov dword [rsp + 0x30], edi
mov r8d, esi
mov dl, 2
mov dword [rsp + 0x28], edi
mov byte [rsp + 0x9d8], dil
mov dword [rsp + 0x20], edi
mov byte [rsp + 0x9d9], dil
mov byte [rsp + 0x9da], dil
mov byte [rsp + 0x9db], dil
mov byte [rsp + 0x9dc], dil
mov byte [rsp + 0x9dd], 5
call qword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
cmp eax, edi
je 0x180002c49
mov qword [rsp + 0x9e0], rdi
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0x9e0]
mov rcx, rax
mov edx, 8
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
cmp eax, edi
je 0x180002c3b
mov rcx, qword [rsp + 0x9e0]
cmp rcx, rdi
je 0x180002c3b
lea rax, [rsp + 0x9d0]
lea r8, [rsp + 0x1b0]
mov r9d, 0x800
mov edx, 2
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
cmp eax, edi
je 0x180002c2d
mov ebx, edi
cmp dword [rsp + 0x1b0], edi
jbe 0x180002c2d
lea rsi, [rsp + 0x1b8]
mov rdx, qword [rsp + 0x9e8]
mov rcx, qword [rsi]
call qword [sym.imp.ADVAPI32.dll_EqualSid]
cmp eax, edi
jne 0x180002c28
inc ebx
add rsi, 0x10
cmp ebx, dword [rsp + 0x1b0]
jb 0x180002c02
jmp 0x180002c2d
mov edi, 1
mov rcx, qword [rsp + 0x9e0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x9e8]
call qword [sym.imp.ADVAPI32.dll_FreeSid]
mov byte [0x18000529f], dil
xor eax, eax
lea rdi, [rsp + 0x90]
mov ecx, 0x11c
rep stosb byte [rdi], al
lea rdi, [rsp + 0x60]
lea ecx, [rax + 0x30]
rep stosb byte [rdi], al
add rsp, 0x9b0
pop rdi
pop rsi
pop rbx
ret