Function at 0x180002540
Capabilities:
Allocate or change rwx memory

Disassembly:
push rsi
push rdi
push r15
sub rsp, 0x80
mov rax, qword [0x18006b3b0]
xor rax, rsp
mov qword [rsp + 0x50], rax
xor esi, esi
mov rdi, rdx
mov r15, rcx
test rdx, rdx
jne 0x180002570
lea eax, [rdx + 0x57]
jmp 0x180002893
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x18006c3f0], eax
je 0x180002588
mov eax, 0x10dd
jmp 0x180002893
mov eax, dword [0x18006c34c]
test eax, eax
jne 0x180002893
test r15, r15
je 0x1800025b4
mov rcx, qword [r15]
test rcx, rcx
jne 0x1800025be
mov dword [0x18006c34c], 6
mov qword [0x18006c400], r15
mov eax, 6
jmp 0x180002893
mov qword [rsp + 0xb0], rbx
mov rbx, rsi
mov qword [rsp + 0x78], rbp
mov qword [rsp + 0x70], r12
mov qword [rsp + 0x68], r13
mov qword [rsp + 0x60], r14
mov r14, rsi
call fcn.180001d70
mov rcx, rdi
mov rbp, rax
call fcn.180001d70
mov qword [rsp + 0x30], rax
cmp rax, rbp
jne 0x18000260b
cmp dword [0x18006bda0], ebx
jne 0x18000286e
jmp 0x180002821
mov ecx, 0x30
call fcn.180053990
mov rcx, rbp
mov r14, rax
call fcn.180001ba0
mov rbx, rax
test rax, rax
jne 0x180002630
lea esi, [rax + 8]
jmp 0x180002821
xor eax, eax
mov r10, rbp
mov qword [rbx + 0x40], rax
mov r13, rbx
lea rax, [rbx + 0x1e]
mov r12d, esi
mov qword [rsp + 0x40], rax
nop dword [rax + rax]
lea rax, [rsp + 0x38]
mov dword [rsp + 0x38], esi
xor r9d, r9d
mov qword [rsp + 0x20], rax
mov r8, r10
lea rdx, [rsp + 0x40]
mov rcx, r13
mov rdi, r10
call fcn.18004f1e0
mov r10, rax
mov edx, r12d
movsxd rax, dword [rsp + 0x38]
mov r8d, r10d
sub rax, rdi
sub r8d, ebp
add rax, r10
inc r12d
add r13, rax
movzx eax, r8b
and al, 7
movzx r9d, r13b
sub r9b, bl
movzx ecx, r9b
shl cl, 3
or cl, al
mov byte [rdx + rbx + 0x40], cl
cmp r12d, 8
jae 0x180002711
movzx ecx, byte [rdi]
lea eax, [rcx + 0x3e]
cmp al, 0x29
ja 0x1800026cb
movabs rdx, 0x28040000403
bt rdx, rax
jb 0x180002711
cmp cl, 0xf3
jne 0x180002706
cmp byte [rdi + 1], 0xc3
je 0x180002711
sub cl, 0x26
cmp cl, 0x3f
ja 0x1800026fa
movabs rax, 0xc000000001010101
bt rax, rcx
jae 0x1800026fa
cmp byte [rdi + 1], 0xff
jne 0x1800026fa
cmp byte [rdi + 2], 0x25
je 0x180002711
cmp r8d, 5
jb 0x180002650
jmp 0x180002742
cmp cl, 0xff
jne 0x1800026d6
cmp byte [rdi + 1], 0x25
jmp 0x1800026f8
cmp r8d, 5
jae 0x180002738
mov rcx, r10
call fcn.180001630
test eax, eax
je 0x180002813
cdqe
add r10, rax
mov r8d, r10d
sub r8d, ebp
cmp r8d, 5
jb 0x180002717
cmp r12d, 8
ja 0x180002813
cmp r13, qword [rsp + 0x40]
jbe 0x18000274a
int3
lea rcx, [rbx + 0x20]
mov byte [rbx + 0x1e], r9b
mov rdx, rbp
mov byte [rbx + 0x3e], r8b
mov edi, r8d
call sub.VCRUNTIME140.dll_memcpy
cmp rdi, 0x19
jbe 0x180002771
mov esi, 6
jmp 0x180002821
movzx edx, byte [rbx + 0x1e]
lea rax, [rdi + rbp]
mov qword [rbx + 0x48], rax
add rdx, rbx
mov rax, qword [rsp + 0x30]
mov qword [rbx + 0x50], rax
mov eax, ebx
mov word [rdx], 0x25ff
lea rcx, [rdx + 6]
sub eax, ecx
lea rcx, [rdx + 6]
add eax, 0x48
mov dword [rdx + 2], eax
mov r8, qword [rsp + 0x40]
sub r8, rcx
cmp rcx, qword [rsp + 0x40]
cmova r8, rsi
test r8, r8
je 0x1800027bd
mov dl, 0xcc
call sub.VCRUNTIME140.dll_memset
lea r9, [rsp + 0x48]
mov dword [rsp + 0x48], esi
mov r8d, 0x40
mov rdx, rdi
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1800027e6
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x180002821
mov dword [r14 + 8], esi
mov qword [r14 + 0x10], r15
mov qword [r14 + 0x20], rbx
mov qword [r14 + 0x18], rbp
mov eax, dword [rsp + 0x48]
mov dword [r14 + 0x28], eax
mov rax, qword [0x18006c418]
mov qword [r14], rax
xor eax, eax
mov qword [0x18006c418], r14
jmp 0x180002877
cmp dword [0x18006bda0], 0
mov esi, 9
jne 0x18000282c
mov dword [0x18006c34c], esi
test rbx, rbx
je 0x18000285c
xorps xmm0, xmm0
mov r8, rbx
movups xmmword [rbx], xmm0
and r8, 0xffffffffffff0000
movups xmmword [rbx + 0x10], xmm0
movups xmmword [rbx + 0x20], xmm0
movups xmmword [rbx + 0x30], xmm0
movups xmmword [rbx + 0x40], xmm0
movups xmmword [rbx + 0x50], xmm0
mov rax, qword [r8 + 0x10]
mov qword [rbx + 0x48], rax
mov qword [r8 + 0x10], rbx
test r14, r14
je 0x18000286e
mov edx, 0x30
mov rcx, r14
call fcn.1800539cc
mov qword [0x18006c400], r15
mov eax, esi
mov r13, qword [rsp + 0x68]
mov r12, qword [rsp + 0x70]
mov rbp, qword [rsp + 0x78]
mov rbx, qword [rsp + 0xb0]
mov r14, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.180053970
add rsp, 0x80
pop r15
pop rdi
pop rsi
ret