Function at 0x1400037c0
Capabilities:
Check os version
Get token membership

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rdi
push rbp
lea rbp, [rsp - 0xc0]
sub rsp, 0x1c0
mov rax, qword [0x140021170]
xor rax, rsp
mov qword [rbp + 0xb0], rax
lea rdx, [rsp + 0x68]
xor edi, edi
mov ebx, ecx
mov qword [rsp + 0x68], rdi
call qword [sym.imp.WTSAPI32.dll_WTSQueryUserToken]
test eax, eax
jne 0x14000384b
xor ecx, ecx
call fcn.140004a60
lea rcx, [rsp + 0x70]
mov qword [rsp + 0x70], rax
call fcn.140004ac0
lea rcx, str._s_r_n
mov rdx, rax
call fcn.1400011a0
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, [0x14001da18]
lea rcx, str._s___failed_with_error__d_r_n
mov r8d, eax
call fcn.1400011a0
xor eax, eax
jmp 0x1400039f9
lea rcx, [rbp - 0x70]
xor edx, edx
mov r8d, 0x114
call fcn.1400062d0
lea rcx, [rbp - 0x70]
mov dword [rbp - 0x70], 0x114
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
jne 0x1400038b4
xor ecx, ecx
call fcn.140004a60
lea rcx, [rsp + 0x70]
mov qword [rsp + 0x70], rax
call fcn.140004ac0
lea rcx, str._s_r_n
mov rdx, rax
call fcn.1400011a0
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.GetVersionEx
lea rcx, str._s___failed_with_error__d_r_n
mov r8d, eax
call fcn.1400011a0
jmp 0x140003912
cmp dword [rbp - 0x6c], 6
jb 0x140003912
mov rcx, qword [rsp + 0x68]
mov r9d, 8
lea rax, [rsp + 0x70]
lea edx, [r9 + 0xb]
lea r8, [rsp + 0x78]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x1400038fd
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x520
je 0x140003912
lea rcx, [0x14001da40]
call fcn.140001270
jmp 0x140003912
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x68], rax
mov rcx, qword [rsp + 0x68]
mov dword [rsp + 0x60], edi
call qword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
test eax, eax
jne 0x140003966
xor ecx, ecx
call fcn.140004a60
lea rcx, [rsp + 0x78]
mov qword [rsp + 0x78], rax
call fcn.140004ac0
lea rcx, str._s_r_n
mov rdx, rax
call fcn.1400011a0
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, [0x14001da58]
lea rcx, str._s___failed_with_error__d_r_n
mov r8d, eax
call fcn.1400011a0
lea rax, [rbp - 0x80]
lea rcx, [rbp - 0x78]
mov r9d, 0x220
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, 0x20
mov dl, 2
mov dword [rsp + 0x28], edi
mov dword [rbp - 0x78], edi
mov dword [rsp + 0x20], edi
mov word [rbp - 0x74], 0x500
call qword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x1400039d4
mov rdx, qword [rbp - 0x80]
lea r8, [rsp + 0x60]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
mov ecx, dword [rsp + 0x60]
test eax, eax
cmove ecx, edi
mov dword [rsp + 0x60], ecx
mov rcx, qword [rbp - 0x80]
call qword [sym.imp.ADVAPI32.dll_FreeSid]
call qword [sym.imp.ADVAPI32.dll_RevertToSelf]
cmp dword [rsp + 0x60], edi
je 0x1400039e7
mov rax, qword [rsp + 0x68]
jmp 0x1400039f9
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, ebx
call fcn.140003580
mov rcx, qword [rbp + 0xb0]
xor rcx, rsp
call fcn.140004730
lea r11, [rsp + 0x1c0]
mov rbx, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov rsp, r11
pop rbp
ret