Function at 0x140003945
Capabilities:
Allocate or change rwx memory

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0x90
mov rax, qword [0x1400fa8e0]
xor rax, rsp
mov qword [rbp + 0x1f], rax
mov r12d, dword [rdx]
lea r11, [0x140000000]
mov r15d, dword [rcx]
lea rax, [0x140073208]
xor ebx, ebx
mov qword [rbp - 0x39], rax
add r12, r11
mov qword [rbp - 0x41], rbx
add r15, r11
mov qword [rbp - 1], r12
mov r10d, 0x3fffffff
mov qword [rbp - 9], r15
mov ecx, ebx
mov dword [rbp - 0x49], ebx
mov r13, qword [r12]
mov r8d, ebx
mov edx, dword [r15]
mov r9, r13
shr r9, 0x3f
mov qword [rbp + 7], r13
mov qword [rbp - 0x31], r9
test r10d, edx
jbe 0x1400039f7
xor r14d, r14d
mov eax, r8d
mov qword [rbp - 0x25], rbx
mov dil, bl
mov dword [rbp - 0x29], ebx
mov dword [rbp - 0x1d], ebx
mov r13, qword [r15 + rax*8 + 8]
mov r12, r13
mov dword [rbp - 0x45], r14d
shr r13, 5
and r13d, 0xfffffff
shr r12, 0x21
mov r10d, r13d
and r12d, 0xfffffff
add r10, r11
mov qword [rbp - 0x11], r10
test r9d, r9d
je 0x140003898
mov r8d, r12d
lea rcx, [rbp - 0x29]
mov edx, r13d
call fcn.1400025bc
mov r10d, dword [rbp - 0x15]
cmp r10d, dword [rbp - 0x29]
jae 0x140003882
mov rax, qword [rbp - 0x25]
mov edx, dword [rax + r10*4]
mov eax, edx
and eax, 0xfffffff
cmp eax, dword [rbp - 0x19]
jae 0x140003882
inc r10d
mov dword [rbp - 0x45], edx
mov dword [rbp - 0x15], r10d
mov r14d, edx
mov dil, 1
jmp 0x140003885
mov dil, bl
mov r10, qword [rbp - 0x11]
lea r11, [0x140000000]
mov r9, qword [rbp - 0x31]
mov r8d, dword [rbp - 0x49]
mov r15d, ebx
test r12d, r12d
je 0x1400039b7
test r9d, r9d
je 0x140003976
test dil, dil
je 0x140003976
mov eax, r14d
lea ecx, [r15 + r13]
and eax, 0xfffffff
cmp ecx, eax
jne 0x140003976
mov rcx, qword [0x1400fa910]
mov rdi, rbx
mov r14d, dword [rbp - 0x45]
sub rcx, r11
mov eax, r14d
mov edx, r15d
shr eax, 0x1c
test eax, eax
je 0x140003913
cmp eax, 3
je 0x140003907
cmp eax, 0xa
je 0x1400038f8
or rdi, 0xffffffffffffffff
jmp 0x140003913
add rcx, qword [rdx + r10]
mov edi, 8
mov qword [rbp + 0xf], rcx
jmp 0x14000391a
add ecx, dword [rdx + r10]
mov edi, 4
mov dword [rbp + 0xf], ecx
mov esi, ebx
test rdi, rdi
je 0x140003943
mov rcx, rbx
mov esi, ebx
mov rax, qword [rbp - 0x39]
lea rdx, [rbp - 0x41]
mov r8b, byte [rbp + rcx + 0xf]
lea rcx, [rbp - 0x39]
mov rax, qword [rax + 8]
call qword [0x140075220]
inc esi
mov ecx, esi
cmp rcx, rdi
jb 0x14000391f
mov edx, dword [rbp + 0x48]
sub esp, 0xa0
mov rcx, 0
mov rdx, 0xaa8e
mov r8, 0x1000
lea r9, [rcx + 0x40]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
jne 0x140003980
add byte [rbp + 7], dh
mov eax, 1
jmp 0x1400039db
lea rax, [0x1400206f9]
mov rdi, qword [rsp + 0x20]
mov rsi, rax
mov rcx, 0xaa8e
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x20]
mov qword [rsp + 0x28], rax
call qword [rsp + 0x28]
xor eax, eax
add rsp, 0xa0
ret
mov r15, qword [rbp - 9]
lea r11, [0x140000000]
mov r9, qword [rbp - 0x31]
inc r8d
mov r10d, 0x3fffffff
mov dword [rbp - 0x49], r8d
mov edx, dword [r15]
mov eax, edx
and eax, r10d
cmp r8d, eax
jb 0x1400037ff
mov rcx, qword [rbp - 0x41]
lea r11, [0x140000000]
mov r12, qword [rbp - 1]
mov r13, qword [rbp + 7]
movabs r8, 0x8000000000000000
mov rax, r13
or rcx, r8
or rax, r8
cmp rcx, rax
je 0x140003a19
call fcn.140002644
jmp 0x140003aab
test r9d, r9d
je 0x140003aab
mov qword [rbp - 0x41], rbx
mov esi, ebx
test r10d, edx
jbe 0x140003a91
mov eax, esi
mov rdi, qword [r15 + rax*8 + 8]
mov rax, rdi
shr rdi, 5
and edi, 0xfffffff
shr rax, 0x21
add rdi, r11
and eax, 0xfffffff
je 0x140003a81
mov r14d, eax
mov rax, qword [rbp - 0x39]
lea rdx, [rbp - 0x41]
mov r8b, byte [rdi]
lea rcx, [rbp - 0x39]
mov rax, qword [rax + 8]
call qword [0x140075220]
inc rdi
sub r14, 1
jne 0x140003a52
mov r10d, 0x3fffffff
lea r11, [0x140000000]
mov ecx, dword [r15]
inc esi
and ecx, r10d
cmp esi, ecx
jb 0x140003a2d
mov rbx, qword [rbp - 0x41]
movabs rcx, 0x7fffffffffffffff
mov rax, r13
and rbx, rcx
mov qword [rbp - 0x41], rbx
lock cmpxchg qword [r12], rbx
mov eax, 1
mov rcx, qword [rbp + 0x1f]
xor rcx, rsp
call 0x140070f60
mov rbx, qword [rsp + 0xe0]
add rsp, 0x90
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret