Function at 0x7fff25d4d660
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x18], r8
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x40
xor edi, edi
mov r13, rcx
and dword [rax + 0x20], edi
mov rsi, rdx
and dword [rax - 0x48], edi
xor edx, edx
mov rcx, qword gs:[0x60]
lea ebx, [rdi + 0x4c]
mov r8d, ebx
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlAllocateHeap]
nop dword [rax + rax]
mov r12, rax
test rax, rax
je 0x7fff25ddc5de
lea rax, [rsp + 0x98]
mov r9d, ebx
mov r8, r12
mov qword [rsp + 0x20], rax
lea edx, [rdi + 0x1f]
mov rcx, r13
call qword [sym.imp.ntdll.dll_NtQueryInformationToken]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
js 0x7fff25d4d756
mov rdx, qword [rsi]
mov rcx, qword [r12]
call qword [sym.imp.ntdll.dll_RtlEqualSid]
nop dword [rax + rax]
test al, al
je 0x7fff25ddc5e8
mov rcx, qword [rsi]
lea rdx, [rsp + 0x30]
call qword [sym.imp.ntdll.dll_RtlGetAppContainerSidType]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
js 0x7fff25d4d756
cmp dword [rsp + 0x30], 1
jne 0x7fff25d4d78f
mov rax, qword [rsp + 0x90]
xor r9d, r9d
mov qword [rsp + 0x28], rax
xor r8d, r8d
mov edx, 0xf01ff
mov dword [rsp + 0x20], 1
mov rcx, r13
call qword [sym.imp.ntdll.dll_NtDuplicateToken]
nop dword [rax + rax]
mov ebx, eax
test rdi, rdi
jne 0x7fff25d4d898
mov rcx, qword gs:[0x60]
mov r8, r12
xor edx, edx
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlFreeHeap]
nop dword [rax + rax]
mov eax, ebx
mov rbx, qword [rsp + 0x80]
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
xor r9d, r9d
lea rax, [rsp + 0x98]
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov rcx, r13
lea ebp, [r9 + 0x1e]
mov edx, ebp
call qword [sym.imp.ntdll.dll_NtQueryInformationToken]
nop dword [rax + rax]
mov ebx, eax
cmp eax, 0xc0000023
jne 0x7fff25d4d756
mov rcx, qword gs:[0x60]
xor edx, edx
mov r8d, dword [rsp + 0x98]
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlAllocateHeap]
nop dword [rax + rax]
mov rdi, rax
test rax, rax
je 0x7fff25ddc5f2
mov r9d, dword [rsp + 0x98]
lea rax, [rsp + 0x98]
mov r8, rdi
mov qword [rsp + 0x20], rax
mov edx, ebp
mov rcx, r13
call qword [sym.imp.ntdll.dll_NtQueryInformationToken]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
js 0x7fff25d4d74d
mov eax, dword [rdi]
cmp dword [rsi + 0x10], eax
jne 0x7fff25ddc5fc
mov rcx, qword [rsi + 8]
xor ebx, ebx
mov qword [rsp + 0x38], rcx
test eax, eax
je 0x7fff25d4d71c
xor ebp, ebp
cmp dword [rsi + 0x10], ebp
jbe 0x7fff25ddc5fc
mov r14d, ebx
add r14, r14
mov r15d, ebp
add r15, r15
mov rdx, qword [rcx + r15*8]
mov rcx, qword [rdi + r14*8 + 8]
call qword [sym.imp.ntdll.dll_RtlEqualSid]
nop dword [rax + rax]
mov rcx, qword [rsp + 0x38]
test al, al
jne 0x7fff25d4d881
inc ebp
cmp ebp, dword [rsi + 0x10]
jb 0x7fff25d4d851
jmp 0x7fff25ddc5fc
mov eax, dword [rcx + r15*8 + 8]
cmp dword [rdi + r14*8 + 0x10], eax
jne 0x7fff25d4d875
inc ebx
cmp ebx, dword [rdi]
jb 0x7fff25d4d840
jmp 0x7fff25d4d71c
mov rcx, qword gs:[0x60]
mov r8, rdi
xor edx, edx
mov rcx, qword [rcx + 0x30]
call qword [sym.imp.ntdll.dll_RtlFreeHeap]
nop dword [rax + rax]
jmp 0x7fff25d4d756
mov ebx, 0xc0000017
jmp 0x7fff25d4d774
mov ebx, 0xc000000d
jmp 0x7fff25d4d756
mov ebx, 0xc0000017
jmp 0x7fff25d4d756
mov ebx, 0xc000000d
jmp 0x7fff25d4d74d