Function at 0x180003960
Capabilities:
Allocate or change rwx memory

Disassembly:
mov r11, rsp
mov qword [r11 + 0x18], r8
mov dword [rsp + 0x10], edx
push rbx
push rdi
push r12
push r13
push r15
sub rsp, 0xc0
mov rdi, rcx
mov r13, r8
xor ecx, ecx
mov eax, edx
mov r15d, ecx
test rdi, rdi
je 0x180003c98
mov qword [r11 - 0x30], rbp
mov qword [r11 - 0x40], r14
cmp dword [rdi + 0x10], ecx
je 0x1800039bf
mov ebp, ecx
mov r14, r8
test al, 1
je 0x1800039b7
mov rax, qword [rdi + 0x40]
sub r14, qword [rax + 0x30]
mov eax, dword [r11 + 0x10]
test r14, r14
jmp 0x1800039dd
sub r14, qword [rdi]
test r14, r14
jmp 0x1800039dd
mov ebp, r8d
test al, 1
je 0x1800039d6
mov rax, qword [rdi + 0x38]
sub ebp, dword [rax + 0x34]
mov eax, dword [rsp + 0xf8]
jmp 0x1800039d8
sub ebp, dword [rdi]
mov r14, rcx
test ebp, ebp
sete r15b
test r15d, r15d
jne 0x180003c88
mov qword [rsp + 0xb0], rsi
mov rsi, qword [rdi + 0xa0]
test rsi, rsi
je 0x180003c7a
and eax, 8
mov r12d, ecx
mov dword [rsp + 0xf0], eax
je 0x180003a69
mov rbx, qword [rdi + 0x68]
cmp dword [rdi + 0x60], ecx
jbe 0x180003a53
add rbx, 0xc
nop
mov ecx, dword [rbx]
lea r9, [rsp + 0x20]
mov edx, dword [rbx - 4]
mov r8d, 0x40
add rcx, qword [rdi]
mov eax, r12d
lea r9, [r9 + rax*4]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x180003a51
inc r12d
add rbx, 0x28
cmp r12d, dword [rdi + 0x60]
jb 0x180003a20
xor ecx, ecx
cmp r12d, dword [rdi + 0x60]
mov r15d, ecx
sete r15b
test r15d, r15d
je 0x180003c80
jmp 0x180003a6f
mov r15d, 1
mov eax, dword [rsi + 4]
test eax, eax
je 0x180003afa
nop word [rax + rax]
mov ecx, dword [rsi]
lea rbx, [rsi + 8]
add rsi, rax
cmp rbx, rsi
jae 0x180003aeb
nop
movzx r9d, word [rbx]
mov r11d, r9d
and r9d, 0xfff
add r9, rcx
shr r11d, 0xc
add r9, qword [rdi]
mov r8d, r9d
sub r8d, dword [rdi]
cmp r8d, dword [rdi + 0x54]
jb 0x180003b77
mov rax, qword [rdi + 0x68]
mov r10, qword [rdi + 0x70]
cmp rax, r10
jae 0x180003ae2
mov edx, dword [rax + 0xc]
cmp edx, r8d
ja 0x180003ad9
add edx, dword [rax + 8]
cmp edx, r8d
ja 0x180003b65
add rax, 0x28
cmp rax, r10
jb 0x180003ac5
cmp rbx, rsi
jb 0x180003bc6
mov eax, dword [rsi + 4]
test eax, eax
jne 0x180003a80
mov r13, qword [rsp + 0x100]
mov ecx, dword [rsp + 0xf0]
test ecx, ecx
je 0x180003bd1
mov rbx, qword [rdi + 0x68]
test r12d, r12d
je 0x180003bd1
add rbx, 0xc
mov r14d, r12d
xor r12d, r12d
lea rsi, [rsp + 0x20]
lea rbp, [rsp + 0x20]
nop word [rax + rax]
mov ecx, dword [rbx]
mov r9, rbp
add rcx, qword [rdi]
mov edx, dword [rbx - 4]
mov r8d, dword [rsi]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
lea rsi, [rsi + 4]
lea rbx, [rbx + 0x28]
cmove r15d, r12d
add rbp, 4
sub r14, 1
jne 0x180003b30
mov ecx, dword [rsp + 0xf0]
jmp 0x180003bd4
sub r8d, dword [rax + 0xc]
cmp r8d, dword [rax + 0x10]
jae 0x180003ae2
add r8d, dword [rax + 0x14]
cmp r8d, 0xffffffff
je 0x180003ae2
cmp r11d, 0xa
jne 0x180003b96
cmp dword [rdi + 0x10], 0
je 0x180003ae2
add qword [r9], r14
jmp 0x180003bb4
cmp r11d, 3
jne 0x180003bab
cmp dword [rdi + 0x10], 0
jne 0x180003ae2
add dword [r9], ebp
jmp 0x180003bb4
test r11d, r11d
jne 0x180003ae2
add rbx, 2
cmp rbx, rsi
jb 0x180003a90
jmp 0x180003aeb
xor r12d, r12d
mov r15d, r12d
jmp 0x180003c80
xor r12d, r12d
test r15d, r15d
je 0x180003c80
mov ebx, dword [rsp + 0xf8]
test bl, 2
je 0x180003c80
test ecx, ecx
je 0x180003c1e
mov rdx, qword [rdi + 0x148]
lea r9, [rsp + 0x108]
mov rcx, qword [rdi + 0x138]
mov r8d, 0x40
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x180003bc9
mov ecx, dword [rsp + 0xf0]
cmp dword [rdi + 0x10], 0
je 0x180003c2e
mov rax, qword [rdi + 0x40]
mov qword [rax + 0x30], r13
jmp 0x180003c36
mov rax, qword [rdi + 0x38]
mov dword [rax + 0x34], r13d
test ecx, ecx
je 0x180003c64
mov r8d, dword [rsp + 0x108]
lea r9, [rsp + 0x108]
mov rdx, qword [rdi + 0x148]
mov rcx, qword [rdi + 0x138]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
cmove r15d, r12d
test bl, 4
jne 0x180003c80
mov r8d, dword [rdi + 8]
mov rdx, rdi
mov rcx, qword [rdi]
call fcn.180002bf0
jmp 0x180003c80
mov r15d, 1
mov rsi, qword [rsp + 0xb0]
mov rbp, qword [rsp + 0xb8]
mov r14, qword [rsp + 0xa8]
mov eax, r15d
add rsp, 0xc0
pop r15
pop r13
pop r12
pop rdi
pop rbx
ret