Function at 0x18005c4d8
Capabilities:
Access peb ldr_data

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov byte [rax + 0x20], r9b
push rbp
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x40
mov rax, qword gs:[0x60]
mov rdi, rcx
mov r14, qword [rbp + 0x68]
mov ecx, 0xfffff000
mov r12, qword [rbp + 0x58]
mov rbx, rdx
mov eax, dword [rax + 0xbc]
mov dword [rbp + 0x48], eax
mov rax, r14
sub rax, r12
cmp rax, rcx
ja 0x1800b8896
cqo
lea r13, [r8 + 0xf]
mov r8, qword [rbp + 0x60]
mov r15d, 0x1000
idiv r15
and r13, 0xfffffffffffffff0
mov qword [rbp + 0x68], rax
lea rsi, [rbx + r13]
sar r13, 4
lea rcx, [rsi + 0x50]
cmp rcx, r8
jae 0x1800b889d
sub r14, r8
mov word [rbx + 8], r13w
mov rax, r14
mov word [rbx + 0xa], 1
cqo
mov byte [rbx + 0xf], 1
movzx ecx, word [rdi + 0x8c]
xor r13d, r13d
idiv r15
test dword [rbp + 0x48], 0x1000
mov r15, rax
mov word [rbx + 0xc], cx
jne 0x1800b894b
mov eax, dword [rbp + 0x50]
mov rdx, qword [rbp + 0x68]
mov dword [rbx + 0x14], eax
mov eax, edx
mov qword [rbx + 0x28], rdi
shl eax, 0xc
mov ecx, eax
add rax, r12
mov qword [rbx + 0x48], rax
lea rax, [rbx + 0x60]
mov dword [rbx + 0x10], 0xffeeffee
mov qword [rbx + 0x30], r12
mov qword [rbx + 0x40], rsi
mov dword [rbx + 0x38], edx
mov dword [rbx + 0x50], r13d
add qword [rdi + 0x220], rcx
add qword [rdi + 0x218], rcx
mov qword [rax + 8], rax
mov qword [rax], rax
cmp qword [rbx + 0x28], rbx
jne 0x18005c6b7
mov al, r13b
mov byte [rbx + 0xe], al
movzx eax, word [rdi + 0x8c]
xor ax, word [rbx + 8]
mov word [rsi + 0xc], ax
mov rdx, qword [rbx + 0x28]
cmp rdx, rbx
jne 0x18005c6c1
mov r14b, r13b
lea rax, [rbp - 0x10]
shl r15d, 0xc
mov qword [rsp + 0x28], rax
add r8, 0xffffffffffffffd0
mov r9d, r15d
mov rdx, rbx
mov rcx, rdi
mov qword [rsp + 0x20], rsi
mov byte [rsi + 0xe], r14b
call fcn.18002aa88
cmp dword [rdi + 0x7c], r13d
je 0x18005c654
mov al, byte [rbx + 0xa]
xor al, byte [rbx + 9]
xor al, byte [rbx + 8]
mov byte [rbx + 0xb], al
mov eax, dword [rdi + 0x88]
xor dword [rbx + 8], eax
mov r8, qword [rbp - 0x10]
test r8, r8
je 0x18005c668
mov rdx, rsi
mov rcx, rdi
call fcn.180012f50
lea r8, [rdi + 0x120]
add rbx, 0x18
mov rax, qword [r8 + 8]
mov rcx, qword [rax]
cmp rcx, r8
jne 0x1800b8985
mov qword [rbx], r8
mov qword [rbx + 8], rax
mov qword [rax], rbx
mov qword [r8 + 8], rbx
inc dword [rdi + 0x238]
mov al, 1
lea r11, [rsp + 0x40]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
mov eax, 1
jmp 0x18005c5ef
mov r14, rsi
sub r14, rbx
shr r14, 0x10
inc r14
cmp r14, 0xfe
jb 0x18005c611
jmp 0x1800b8962
inc dword [rdi + 0x258]
xor al, al
jmp 0x18005c699
cmp rcx, r14
jae 0x1800b8896
mov rax, rsi
mov edx, 1
sub rax, r8
mov rcx, rdi
add rax, 0x100f
and rax, 0xfffffffffffff000
mov qword [rbp - 0x10], rax
call fcn.18002ae30
mov dword [rsp + 0x28], eax
lea r9, [rbp - 0x10]
xor r8d, r8d
mov dword [rsp + 0x20], r15d
lea rdx, [rbp + 0x60]
or rcx, 0xffffffffffffffff
call sym.ntdll.dll_NtAllocateVirtualMemory
test eax, eax
js 0x1800b8890
call sym.ntdll.dll_RtlGetCurrentServiceSessionId
test eax, eax
je 0x1800b8908
mov rax, qword gs:[0x60]
mov rcx, qword [rax + 0x90]
add rcx, 0x226
jmp 0x1800b890d
mov ecx, 0x7ffe0380
cmp byte [rcx], 0
je 0x1800b893a
mov rax, qword gs:[0x60]
test byte [rax + 0x378], 1
je 0x1800b893a
mov r8, qword [rbp - 0x10]
mov r9d, 3
mov rdx, qword [rbp + 0x60]
mov rcx, rdi
call fcn.1800fdf54
mov r8, qword [rbp + 0x60]
add r8, qword [rbp - 0x10]
mov qword [rbp + 0x60], r8
jmp 0x18005c55f
mov ecx, 1
call fcn.1800244c4
mov r8, qword [rbp + 0x60]
mov word [rbx + 0x58], ax
jmp 0x18005c597
mov qword [rsp + 0x28], r13
mov r9, rbx
mov r8, rsi
mov qword [rsp + 0x20], r13
mov ecx, 3
call fcn.18009a4c0
mov r8, qword [rbp + 0x60]
jmp 0x18005c611
xor edx, edx
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x20], rcx
xor r9d, r9d
lea ecx, [rdx + 0xd]
call fcn.18009a4c0
nop
jmp 0x18005c691