Function at 0x14004b4e0
Capabilities:
Allocate or change rwx memory

Disassembly:
push rdi
sub rsp, 0x20
mov r10, rdx
mov rdi, rcx
test r8d, r8d
je 0x14003a268
mov rcx, qword [rcx + 0x9c8]
cmp rcx, rdx
jne 0x14003a23c
cmp dword [rdi + 0x9c4], 0x20
je 0x14003a260
mov rdx, qword [rdi + 0x9e0]
lea r9, [rsp + 0x40]
mov r8d, 0x20
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14003a22a
mov rcx, rdi
call fcn.14003a500
mov dword [rdi + 0x9c4], 0x20
xor eax, eax
add rsp, 0x20
pop rdi
ret
mov rdx, qword [rdx + 8]
lea r9, [rsp + 0x40]
mov r8d, 0x20
mov rcx, r10
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14003a260
mov rcx, rdi
call fcn.14003a500
xor eax, eax
add rsp, 0x20
pop rdi
ret
mov qword [rsp + 0x30], rbx
mov rbx, qword [rcx + 0x9c8]
cmp r10, rbx
jb 0x14003a2d0
mov rdx, qword [rcx + 0x9e0]
lea rax, [rdx + rbx]
cmp r10, rax
jae 0x14003a2d0
cmp dword [rcx + 0x9c4], 4
je 0x14003a305
lea r9, [rsp + 0x40]
mov r8d, 4
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14003a2b2
mov rcx, rdi
call fcn.14003a500
mov rax, rbx
mov dword [rdi + 0x9c4], 4
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
mov rbx, qword [rbx]
cmp r10, rbx
jb 0x14003a2d0
mov rdx, qword [rbx + 8]
lea rax, [rdx + rbx]
cmp r10, rax
jae 0x14003a2d0
lea r9, [rsp + 0x40]
mov r8d, 4
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x14003a305
mov rcx, rdi
call fcn.14003a500
mov rax, rbx
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x20
mov rbx, qword [rdx + 0x40]
mov r15, rdx
mov edi, r8d
mov rdx, rbx
xor r8d, r8d
mov r14, r9
mov r12, rcx
call 0x14003a1e0
mov r8d, dword [r15 + 0x3c]
lea esi, [r12 - 0x148]
mov ecx, edi
mov qword [rsp + 0x50], rax
and edi, 0x1f
shr rcx, 5
shl edi, 2
mov r13, rax
mov ebp, edi
lea rdi, [rbx - 6]
add rbp, 0xfffffffffffffffa
add rdi, r8
mov rcx, qword [r12 + rcx*8 + 0x688]
add rbp, rcx
cmp r8d, 5
jbe 0x14004b580
lea eax, [r8 - 5]
cmp byte [rax + rbx], 0xe9
jne 0x14004b580
movsxd rax, dword [r8 + rbx - 4]
add rax, 0xfffffffffffffffa
add rax, r8
add rax, rbx
cmp rax, rbp
jne 0x14004b580
mov eax, r14d
sub eax, ebx
sub eax, r8d
mov dword [r8 + rbx - 4], eax
cmp rbx, rdi
jae 0x14004b5ed
cmp dword [rbx + 3], esi
jne 0x14004b58f
cmp byte [rbx], 0xc7
je 0x14004b5a3
mov rcx, rbx
call fcn.14004aa40
mov eax, eax
add rbx, rax
cmp rbx, rdi
jb 0x14004b585
jmp 0x14004b5ed
cmp rbx, rdi
jae 0x14004b5ed
mov esi, 0xf0ff
mov r13d, 0x800f
movzx eax, word [rbx]
and ax, si
cmp ax, r13w
jne 0x14004b5d6
movsxd rax, dword [rbx + 2]
add rax, rbx
cmp rax, rbp
jne 0x14004b5d6
mov eax, r14d
sub eax, ebx
sub eax, 6
mov dword [rbx + 2], eax
mov rcx, rbx
call fcn.14004aa40
mov eax, eax
add rbx, rax
cmp rbx, rdi
jb 0x14004b5b3
mov r13, qword [rsp + 0x50]
mov rcx, qword [r15 + 0x40]
mov edx, dword [r15 + 0x3c]
add rdx, rcx
call sym.luajit.exe_luaJIT_version_2_1_0_beta3
mov r8d, 1
mov rdx, r13
mov rcx, r12
mov rbx, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x68]
add rsp, 0x20
pop r15
pop r14
pop r13
pop r12
pop rdi
jmp 0x14003a1e0