Function at 0x140186d70
Capabilities:
Allocate or change rwx memory

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
mov eax, 0x10078
call fcn.1401a4200
sub rsp, rax
mov rbx, r9
mov r13d, r8d
mov rdi, rdx
mov qword [rsp + 0x40], rcx
mov rax, qword [0x140362028]
xor rax, rsp
mov qword [rsp + 0x10070], rax
mov rcx, rdx
mov edx, r8d
mov r8d, 4
call fcn.1401870c0
mov ebp, eax
mov esi, r13d
cmp eax, 0xffffffff
jne 0x140186ddc
mov rcx, rdi
mov edx, r13d
mov r8d, 8
call fcn.1401870c0
mov ebp, eax
cmp eax, 0xffffffff
je 0x140186e36
mov rcx, rdi
mov rdx, rbx
mov r8, rsi
call fcn.1401a6090
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
mov rdx, rdi
mov r8, rsi
call qword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov rcx, rdi
mov edx, r13d
mov r8d, ebp
call fcn.1401870c0
mov sil, 1
mov rcx, qword [rsp + 0x10070]
xor rcx, rsp
call fcn.1401a4270
mov eax, esi
add rsp, 0x10078
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov dword [rsp + 0x6c], 0xaaaaaaaa
mov rbp, qword [rsp + 0x40]
mov r9, qword [rbp + 0x18]
movzx ecx, byte [rbp]
cmp r9, rdi
ja 0x140186e60
mov eax, 1
shl rax, cl
add rax, r9
cmp rax, rdi
ja 0x140186e7c
mov dword [rsp + 0x20], ecx
lea rdx, str.NaClSysToUser:_sysaddr_0x_08I64x__mem_start_0x_08I64x__addr_space__d_bits_n
mov ecx, 0xfffffffc
mov r8, rdi
call fcn.1401f7e70
mov r9, qword [rbp + 0x18]
mov r14, rdi
sub r14, r9
lea r15, [rsi + r14]
cmp r15, r14
jbe 0x140186e91
cmp r15, qword [rbp + 0x48]
jbe 0x140186e98
xor esi, esi
jmp 0x140186e10
mov qword [rsp + 0x48], rsi
mov qword [rsp + 0x50], rbx
shr r14, 0xc
dec r15
shr r15, 0xc
sub r15, r14
lea rcx, [rsp + 0x70]
mov r8d, 0x10000
mov dl, 0xaa
call fcn.1401a64a0
inc r15
je 0x140187094
lea rbx, [rbp + 0x578]
mov qword [rsp + 0x58], rbx
mov rcx, rbx
mov rdx, r14
call fcn.1401ef1f0
test rax, rax
je 0x140187085
mov rsi, rax
mov rax, qword [rax + 8]
mov qword [rsp + 0x38], r14
sub rax, r14
add rax, qword [rsi]
cmp rax, r15
mov qword [rsp + 0x60], r15
cmovae rax, r15
mov qword [rsp + 0x30], rax
cmp dword [rsi + 0x14], 0
je 0x140187069
cmp qword [rsp + 0x30], 0
je 0x140187069
mov r12, qword [rsp + 0x38]
mov r15, r12
neg r15
shl r12, 0xc
mov rbx, qword [rsp + 0x30]
movzx r9d, byte [rbp]
mov rax, r12
mov ecx, r9d
shr rax, cl
test r12, r12
je 0x140186f50
test rax, rax
je 0x140186f64
mov ecx, 0xfffffffc
lea rdx, str.NaClUserToSys:_uaddr_0x_08I64x__addr_space__d_bits_n
mov r8, r12
call fcn.1401f7e70
mov r14, qword [rsi]
add r14, r15
shl r14, 0xc
add r14, qword [rsi + 0x30]
mov eax, 0x10000
cmp r14, rax
jl 0x140186f82
mov r14d, 0x10000
mov r8, r14
sub r8, rax
neg r8
cmp r14, rax
mov eax, 0
cmovae r8, rax
mov rbp, qword [rbp + 0x18]
add rbp, r12
lea rcx, [rsp + r14]
add rcx, 0x70
mov dl, 0xf4
call fcn.1401a64a0
lea rcx, [rsp + 0x70]
mov rdx, rbp
mov r8, r14
call fcn.1401a6090
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
test eax, eax
je 0x140186e91
mov edx, 0x10000
mov rcx, rbp
mov r8d, 0x1000
mov r9d, 0x40
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
test rax, rax
jne 0x140187007
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0xfffffffc
lea rdx, str.UnmapFiles:_VirtualAlloc_failed_with__d_n
mov r8d, eax
call fcn.1401f7e70
mov r8d, 0x10000
mov rcx, rbp
lea rdx, [rsp + 0x70]
call fcn.1401a6090
mov edx, 0x10000
mov rcx, rbp
mov r8d, 0x20
lea r9, [rsp + 0x6c]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140187051
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0xfffffffc
lea rdx, str.UnmapFiles:_VirtualProtect_failed_with__d_n
mov r8d, eax
call fcn.1401f7e70
dec r15
add r12, 0x1000
dec rbx
mov rbp, qword [rsp + 0x40]
jne 0x140186f38
mov r14, qword [rsp + 0x38]
mov rax, qword [rsp + 0x30]
add r14, rax
mov r15, qword [rsp + 0x60]
sub r15, rax
mov rbx, qword [rsp + 0x58]
jmp 0x14018708b
inc r14
dec r15
test r15, r15
jne 0x140186ed7
mov rcx, rdi
mov edx, r13d
mov r8d, 8
call fcn.1401870c0
mov ebp, eax
cmp eax, 0xffffffff
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x48]
jne 0x140186ddc
jmp 0x140186e91