Function at 0x14021d750
Capabilities:
Map section object

Disassembly:
push rbp
mov rbp, rsp
push r15
mov r15, rdx
push r14
push r13
push r12
mov r12d, ecx
push rdi
mov edi, ecx
push rsi
mov rsi, r9
push rbx
mov rbx, r8
and rsp, 0xfffffffffffffff0
sub rsp, 0xa0
mov rax, qword [rdx + 0x10]
and r12d, 0x20000
jne 0x14021d7db
cmp r9, rax
jne 0x14021d7db
cmp qword [rdx + 0x18], r8
jae 0x14021d887
mov rax, qword [0x1403ec488]
test rax, rax
je 0x14021d887
mov rcx, qword [r15 + 0x28]
mov qword [rsp + 0x80], r8
lea rdx, [rsp + 0x80]
call rax
mov ecx, eax
test eax, eax
js 0x14021d86f
mov qword [r15 + 0x18], rbx
cmp qword [r15 + 0x20], rbx
jae 0x14021dc46
mov qword [r15 + 0x20], rbx
jmp 0x14021dc46
cmp rsi, rax
jbe 0x14021d887
mov rdx, qword [r15]
mov r10, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r13, [rsp + 0x98]
lea r14, [rsp + 0x90]
add rdx, rax
mov qword [rsp + 0x78], r10
mov qword [rsp + 0x90], rdx
mov rdx, rsi
sub rdx, rax
mov qword [rsp + 0x98], rdx
call r10
mov r9, r13
xor r8d, r8d
mov rdx, r14
mov dword [rsp + 0x28], 1
mov rcx, rax
mov dword [rsp + 0x20], 0x2000
call sub.ntdll.dll_NtAllocateVirtualMemory
mov ecx, eax
cmp eax, 0xc0000018
je 0x14021d87c
test eax, eax
mov r10, qword [rsp + 0x78]
js 0x14021d86f
call r10
mov r9d, 0x8000
mov r8, r13
mov rdx, r14
mov rcx, rax
call sub.ntdll.dll_NtFreeVirtualMemory
mov ecx, eax
test eax, eax
jns 0x14021d887
call fcn.14021c920
mov r12d, eax
jmp 0x14021dc46
mov r12d, 0xffff87bf
jmp 0x14021dc46
bt edi, 9
jae 0x14021dc40
mov rax, qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov r13, qword [r15]
mov qword [rsp + 0x78], rax
call rax
mov rdx, r13
mov rcx, rax
call sub.ntdll.dll_NtUnmapViewOfSection
mov ecx, eax
test eax, eax
jns 0x14021d8c8
lea rsp, [rbp - 0x38]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp fcn.14021c920
mov rcx, qword [r15 + 0x28]
call sub.ntdll.dll_NtClose
mov qword [r15 + 0x28], 0
mov qword [rsp + 0x88], 0
mov r8d, eax
mov qword [rsp + 0x90], rsi
test eax, eax
js 0x14021db00
mov eax, edi
and eax, 0x100
cmp r12d, 1
sbb r14d, r14d
and edi, 0x80000
mov dword [rsp + 0x70], eax
and r14d, 2
add r14d, 2
cmp edi, 1
sbb r13d, r13d
and r13d, 0xfffffffe
add r13d, 0x17
cmp edi, 1
sbb eax, eax
mov dword [rsp + 0x74], eax
xor eax, eax
and dword [rsp + 0x74], 0xfffffffe
add dword [rsp + 0x74], 4
test r12d, r12d
sete al
xor edi, edi
shl eax, 0xd
mov dword [rsp + 0x64], eax
lea rax, [rsp + 0x90]
mov qword [rsp + 0x68], rax
mov eax, r13d
mov r13, r15
mov r15d, eax
jmp 0x14021daa8
mov rcx, qword [r13 + 8]
test r12d, r12d
je 0x14021db8a
mov rax, qword [r13 + 8]
mov dword [rsp + 0x20], r14d
xor r8d, r8d
lea rcx, [r13 + 0x28]
mov dword [rsp + 0x28], 0x4000000
lea r9, [rsp + 0x80]
mov edx, r15d
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x80], rbx
call sub.ntdll.dll_NtCreateSection
mov r8d, eax
test eax, eax
js 0x14021dafd
cmp qword [rsp + 0x88], 0
jne 0x14021dbad
mov r11, rsi
test r12d, r12d
mov qword [rsp + 0x50], rbx
xchg rsi, r13
lea rax, [rsp + 0x98]
cmovne r11, rbx
mov qword [rsp + 0x58], rax
mov rbx, r11
mov qword [rsp + 0x98], rbx
mov rax, qword [rsp + 0x78]
call rax
mov rcx, qword [rsi + 0x28]
mov r8, rsi
xor r9d, r9d
mov rdx, rax
mov eax, dword [rsp + 0x74]
mov dword [rsp + 0x38], 2
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x48], eax
mov eax, dword [rsp + 0x64]
mov qword [rsp + 0x20], 0
mov dword [rsp + 0x40], eax
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x30], rax
call sub.ntdll.dll_NtMapViewOfSection
mov r8d, eax
test eax, eax
jns 0x14021dc26
cmp eax, 0xc0000018
je 0x14021dbf7
xchg r13, rsi
mov dword [rsp + 0x58], r8d
mov rbx, qword [rsp + 0x50]
mov rcx, qword [r13 + 0x28]
call sub.ntdll.dll_NtClose
cmp qword [r13], 0
mov r8d, dword [rsp + 0x58]
mov qword [r13 + 0x28], 0
je 0x14021dafd
mov rdx, qword [r13 + 0x18]
mov rax, qword [r13 + 0x10]
cmp rdx, rbx
je 0x14021dc18
cmp rax, rsi
mov qword [rsp + 0x90], rax
mov rsi, rax
mov rbx, rdx
sbb edi, edi
and edi, 0xffff87be
inc edi
mov rax, qword [r13]
mov qword [rsp + 0x88], rax
mov rax, qword [rsp + 0x78]
call rax
mov dword [rsp + 0x28], 1
mov r9, qword [rsp + 0x68]
xor r8d, r8d
mov dword [rsp + 0x20], 0x2000
mov rcx, rax
lea rdx, [rsp + 0x88]
call sub.ntdll.dll_NtAllocateVirtualMemory
mov r8d, eax
test eax, eax
jns 0x14021db1c
mov qword [rsp + 0x88], 0
cmp eax, 0xc0000018
je 0x14021db0d
mov r15, r13
mov ecx, r8d
call fcn.14021c920
mov r12d, eax
jmp 0x14021db37
cmp dword [rsp + 0x70], 0
je 0x14021db1c
mov qword [r13], 0
mov rcx, qword [r13 + 8]
lea rdx, [r13 + 0x20]
call fcn.14021c970
test eax, eax
je 0x14021d965
mov r15, r13
mov r12d, eax
xorps xmm0, xmm0
mov qword [r15], 0
cmp qword [rsp + 0x88], 0
movups xmmword [r15 + 0x10], xmm0
je 0x14021dc46
mov qword [rsp + 0x90], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea rdx, [rsp + 0x88]
mov r9d, 0x8000
lea r8, [rsp + 0x90]
mov rcx, rax
call sub.ntdll.dll_NtFreeVirtualMemory
jmp 0x14021dc46
cmp qword [r13 + 0x20], rbx
je 0x14021d972
mov rdx, rbx
call fcn.14021d6e0
test eax, eax
jne 0x14021d972
mov qword [r13 + 0x20], rbx
jmp 0x14021d972
mov qword [rsp + 0x90], 0
mov rax, qword [rsp + 0x78]
call rax
mov r8, qword [rsp + 0x68]
lea rdx, [rsp + 0x88]
mov r9d, 0x8000
mov rcx, rax
call sub.ntdll.dll_NtFreeVirtualMemory
mov qword [rsp + 0x88], 0
mov r8d, eax
test eax, eax
jns 0x14021d9c1
jmp 0x14021dafd
cmp qword [rsi], 0
je 0x14021da4e
cmp dword [rsp + 0x70], 0
je 0x14021da4e
mov qword [rsi], 0
jmp 0x14021d9e3
cmp rax, rsi
jne 0x14021da8d
jmp 0x14021dafd
movq xmm0, qword [rsp + 0x98]
mov r12d, edi
movhps xmm0, qword [rsp + 0x80]
movups xmmword [rsi + 0x10], xmm0
jmp 0x14021dc46
mov r12d, 1
lea rsp, [rbp - 0x38]
mov eax, r12d
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret