Function at 0x140007d44
Capabilities:
Check os version
Enumerate process modules
Get session information
Get session user name

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r12
push r13
push r14
mov eax, 0x1890
call fcn.140037820
sub rsp, rax
mov rax, qword [0x14004e300]
xor rax, rsp
mov qword [rsp + 0x1880], rax
and dword [rsp + 0x30], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea rdx, [rsp + 0x30]
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
mov edx, dword [rsp + 0x30]
xor r14d, r14d
and qword [rsp + 0x48], r14
lea rax, [rsp + 0x34]
lea r8d, [r14 + 5]
lea r9, [rsp + 0x48]
xor ecx, ecx
xor r13b, r13b
mov qword [rsp + 0x20], rax
call sub.WTSAPI32.dll_WTSQuerySessionInformationW
mov r8, qword [rsp + 0x48]
test r8, r8
je 0x140007dec
cmp dword [rsp + 0x34], r14d
je 0x140007dec
lea rcx, [rsp + 0x1470]
mov edx, pe_nt_image_headers64
call fcn.140021c90
mov rcx, qword [rsp + 0x48]
call sub.WTSAPI32.dll_WTSFreeMemory
jmp 0x140007e24
lea rcx, [rsp + 0x1050]
mov dword [rsp + 0x1050], 0x11c
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [rsp + 0x1054], 5
jne 0x140008009
cmp dword [rsp + 0x1058], r14d
jne 0x140008009
mov r13b, 1
lea r8, [rsp + 0x34]
lea rcx, [rsp + 0x50]
mov edx, 0x1000
call sub.PSAPI.DLL_EnumProcesses
test eax, eax
je 0x140008009
mov esi, dword [rsp + 0x34]
xor r12d, r12d
shr esi, 2
test esi, esi
je 0x140007f96
lea rbp, [rsp + 0x50]
mov ecx, dword [rbp]
test ecx, ecx
je 0x140007f86
cmp ecx, 4
je 0x140007f86
cmp ecx, 8
je 0x140007f86
and dword [rsp + 0x38], 0
lea rdx, [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
mov edx, dword [rsp + 0x30]
cmp dword [rsp + 0x38], edx
jne 0x140007f86
mov r8d, dword [rbp]
xor edx, edx
mov ecx, 0x410
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rbx, rax
test rax, rax
je 0x140007f86
cmp byte [0x140056449], 0
je 0x140007ef5
mov rax, qword [0x140056430]
and dword [rsp + 0x40], 0
test rax, rax
je 0x140007ee7
lea rdx, [rsp + 0x40]
mov rcx, rbx
call rax
test eax, eax
je 0x140007ee7
cmp dword [rsp + 0x40], 0
setne al
test al, al
je 0x140007ee7
xor al, al
jmp 0x140007ee9
mov al, 1
cmp byte [0x140056449], al
jne 0x140007f7d
and qword [rsp + 0x40], 0
lea r8, [rsp + 0x40]
mov edx, 0x20008
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x140007f7d
lea r8, [rsp + 0x40]
lea rdx, [rsp + 0x1050]
lea rcx, [rsp + 0x1670]
call fcn.140007c5c
test al, al
je 0x140007f7d
or rcx, 0xffffffffffffffff
xor eax, eax
lea rdi, [rsp + 0x1050]
repne scasw ax, word [rdi]
not rcx
cmp rcx, 1
je 0x140007f7d
mov edi, 0x104
lea rcx, [rsp + 0x1050]
mov rdx, rdi
call fcn.140022024
lea rcx, [rsp + 0x1050]
test r13b, r13b
jne 0x140007f9b
lea rdx, [rsp + 0x1470]
call fcn.140022510
test eax, eax
je 0x140007fac
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
inc r12d
add rbp, 4
cmp r12d, esi
jb 0x140007e57
mov rax, r14
jmp 0x14000800b
lea rdx, str.system
call fcn.14002202c
test rax, rax
jne 0x140007f7d
test r14, r14
lea rcx, [rsp + 0x1260]
mov r8, rdi
cmove r14, rbx
xor edx, edx
call fcn.140024b80
lea r8, [rsp + 0x1260]
mov r9d, edi
xor edx, edx
mov rcx, rbx
call sub.PSAPI.DLL_GetModuleFileNameExW
test eax, eax
je 0x140007f7d
lea rcx, [rsp + 0x1260]
call qword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
test rax, rax
je 0x140007f86
lea rdx, str.explorer.exe
mov rcx, rax
call fcn.140022510
test eax, eax
jne 0x140007f86
mov rax, rbx
jmp 0x14000800b
xor eax, eax
mov rcx, qword [rsp + 0x1880]
xor rcx, rsp
call fcn.140021c70
lea r11, [rsp + 0x1890]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop r13
pop r12
ret