Function at 0x140017070
Capabilities:
Allocate or change rwx memory

Disassembly:
push rbx
push rsi
push r14
sub rsp, 0x40
mov rbx, rdx
mov rdx, qword [rcx + 0x28]
mov r14, r8
mov rsi, rcx
test rdx, rdx
je 0x140016e2e
mov rcx, qword [rdx + 0x80]
test rcx, rcx
jne 0x140016e39
cmp qword [0x1400ab418], 8
lea r8, [0x1400ab400]
lea rdx, [0x1400ab5c0]
cmovae r8, qword [0x1400ab400]
cmp qword [0x1400ab5d8], 8
cmovae rdx, qword [0x1400ab5c0]
xor r9d, r9d
call qword [sym.imp.USER32.dll_MessageBoxW]
xor eax, eax
add rsp, 0x40
pop r14
pop rsi
pop rbx
ret
test r9b, r9b
je 0x14001701f
test rbx, rbx
je 0x14001701f
mov qword [rsp + 0x68], rbp
mov qword [rsp + 0x70], rdi
cmp rbx, 0xffffffffffffffff
jne 0x140016ee8
mov rdi, qword [rsi + 0x10]
mov rbx, qword [rdi]
cmp rbx, rdi
je 0x14001701b
nop
mov rdx, qword [rsi + 0x28]
lea rcx, [rbx + 0x20]
add rdx, 0x20
call fcn.140018c00
test eax, eax
je 0x140016ee2
cmp byte [rbx + 0x19], 0
jne 0x140016ed6
mov rax, qword [rbx + 0x10]
cmp byte [rax + 0x19], 0
jne 0x140016eaf
mov rbx, rax
mov rax, qword [rax]
cmp byte [rax + 0x19], 0
jne 0x140016ed6
mov rbx, rax
mov rax, qword [rax]
cmp byte [rax + 0x19], 0
je 0x140016ea1
jmp 0x140016ed6
mov rax, qword [rbx + 8]
cmp byte [rax + 0x19], 0
jne 0x140016ed3
nop dword [rax]
cmp rbx, qword [rax + 0x10]
jne 0x140016ed3
mov rbx, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x19], 0
je 0x140016ec0
mov rbx, rax
cmp rbx, rdi
jne 0x140016e70
xor eax, eax
jmp 0x140016ffb
lea rdi, [rbx + 0x40]
jmp 0x140016f04
cmp byte [rsi + 0x20], 0
jne 0x140016ef6
mov rcx, rsi
call fcn.140017f20
mov rdx, rbx
mov rcx, rsi
call fcn.140017290
mov rdi, rax
test rdi, rdi
je 0x14001701b
cmp qword [rdi + 0x20], 0x10000
ja 0x140016f2a
mov rdx, rdi
mov rcx, rsi
call fcn.140018000
test al, al
je 0x14001701b
mov rcx, qword [rsi + 0x28]
mov r9d, 0x3000
mov r8, r14
mov rcx, qword [rcx + 0x80]
xor edx, edx
mov dword [rsp + 0x20], 0x40
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov qword [rsp + 0x60], rax
cmp rax, 0x10000
jbe 0x14001701b
mov r8, rdi
mov rdx, rax
mov rcx, rsi
call fcn.140017cd0
test al, al
je 0x14001700e
mov rdx, qword [rdi + 0x40]
mov rcx, qword [rsp + 0x60]
mov rax, qword [rdx + 8]
mov rbx, rdx
cmp byte [rax + 0x19], 0
jne 0x140016fa8
nop dword [rax + rax]
cmp qword [rax + 0x20], rcx
jae 0x140016f9c
mov rax, qword [rax + 0x10]
jmp 0x140016fa2
mov rbx, rax
mov rax, qword [rax]
cmp byte [rax + 0x19], 0
je 0x140016f90
cmp rbx, rdx
je 0x140016fb3
cmp rcx, qword [rbx + 0x20]
jae 0x140016fea
lea rax, [rsp + 0x60]
lea r8, [rsp + 0x30]
lea rcx, [rdi + 0x40]
mov qword [rsp + 0x30], rax
call fcn.140018c90
lea rdx, [rsp + 0x30]
lea rcx, [rdi + 0x40]
lea r9, [rax + 0x20]
mov r8, rbx
mov qword [rsp + 0x20], rax
call fcn.140018cd0
mov rbx, qword [rsp + 0x30]
mov rax, qword [rdi + 0x28]
sub rax, 0x10
mov qword [rbx + 0x28], rax
mov rax, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
mov rdi, qword [rsp + 0x70]
add rsp, 0x40
pop r14
pop rsi
pop rbx
ret
mov rdx, qword [rsp + 0x60]
mov rcx, rsi
call fcn.140017310
xor eax, eax
jmp 0x140016ffb
cmp rbx, 0x10
jne 0x140017039
mov rdx, qword [rdx + 0x48]
mov rcx, rsi
add rsp, 0x40
pop r14
pop rsi
pop rbx
jmp 0x140017070
test rbx, rbx
je 0x140017051
mov rdx, rbx
mov rcx, rsi
add rsp, 0x40
pop r14
pop rsi
pop rbx
jmp 0x140017070
xor edx, edx
mov r9d, 0x3000
mov dword [rsp + 0x20], 0x40
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
add rsp, 0x40
pop r14
pop rsi
pop rbx
ret
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r14
sub rsp, 0x30
mov rsi, r8
mov rbp, rcx
cmp rdx, 0x7fffffff
jb 0x1400170a2
lea rbx, [rdx - 0x10000000]
jmp 0x1400170a4
xor ebx, ebx
lea r14, [rdx + 0x7fffffff]
xor edx, edx
mov rax, rbx
div qword [rcx]
mov rcx, qword [rcx + 0x28]
mov r9d, 0x3000
mov rcx, qword [rcx + 0x80]
sub rbx, rdx
mov dword [rsp + 0x20], 0x40
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov rdi, rax
cmp rax, r14
jae 0x14001711f
cmp rbx, r14
jae 0x14001711f
lea rcx, [rdi + rsi]
cmp rcx, rbx
jae 0x140017155
mov rcx, qword [rbp + 0x28]
add rbx, qword [rbp]
mov r9d, 0x3000
mov rcx, qword [rcx + 0x80]
mov r8, rsi
mov rdx, rbx
mov dword [rsp + 0x20], 0x40
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov rdi, rax
cmp rax, r14
jb 0x1400170e0
test rdi, rdi
je 0x140017155
mov ecx, 0x1e7
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, qword [rbp + 0x28]
test rcx, rcx
je 0x140017151
mov rcx, qword [rcx + 0x80]
mov r9d, 0x8000
xor r8d, r8d
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFreeEx]
xor eax, eax
jmp 0x140017158
mov rax, rdi
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x58]
add rsp, 0x30
pop r14
ret