Function at 0x3985d3ac0
Capabilities:
Allocate or change rwx memory
Enumerate pe sections
Execute shellcode via indirect call

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xe8
movaps xmmword [rsp + 0xd0], xmm6
movsxd rax, dword [r8 + 0x3c]
add rax, r8
mov r13, rdx
mov r15, rcx
movzx edx, word [rax + 6]
mov r12, r8
mov r14, r9
test dx, dx
je 0x3985d3c53
movzx ecx, word [rax + 0x14]
lea rsi, [rsp + 0x60]
movzx edi, word [0x39869108c]
movd xmm6, dword [0x398691088]
lea rbx, [rax + rcx + 0x18]
lea rax, [rdx + rdx*4]
lea rbp, [rbx + rax*8]
jmp 0x3985d3b35
add rbx, 0x28
cmp rbp, rbx
je 0x3985d3c53
mov rdx, rsi
mov rcx, rbx
movd dword [rsp + 0x60], xmm6
mov word [rsp + 0x64], di
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x3985d3b28
mov ebp, dword [rbx + 0xc]
mov r9d, 0x40
mov rcx, r15
mov qword [rsp + 0x48], 0
mov eax, dword [rbx + 8]
mov dword [rsp + 0x44], 0
lea r8, [rsp + 0x50]
mov rdi, qword [sym.imp.ntdll.dll_NtProtectVirtualMemory]
add r13, rbp
mov qword [rsp + 0x50], rax
lea rax, [rsp + 0x58]
mov qword [rsp + 0x58], r13
lea r13, [rsp + 0x44]
mov rdx, rax
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x20], r13
call rdi
test eax, eax
je 0x3985d3c74
test r14, r14
je 0x3985d3c4c
movdqa xmm0, xmmword [str.Error_deprotect__lu_bytes_in_process_memory__addr__0x_lx___oldprotect__0x_x__error__0]
mov dword [rsp + 0x28], eax
mov rcx, r14
mov rdx, qword [0x3986910e0]
mov byte [rsp + 0xbe], 0
movaps xmmword [rsp + 0x60], xmm0
movdqa xmm0, xmmword [0x3986910a0]
mov dword [rsp + 0xb8], 0x786c2578
mov eax, dword [rsp + 0x44]
movaps xmmword [rsp + 0x70], xmm0
movdqa xmm0, xmmword [0x3986910b0]
mov r9, qword [rsp + 0x58]
mov qword [rsp + 0xb0], rdx
mov edx, 0xa0a
movaps xmmword [rsp + 0x80], xmm0
mov r8, qword [rsp + 0x50]
movdqa xmm0, xmmword [0x3986910c0]
mov word [rsp + 0xbc], dx
mov rdx, rsi
mov dword [rsp + 0x20], eax
movaps xmmword [rsp + 0x90], xmm0
movdqa xmm0, xmmword [0x3986910d0]
movaps xmmword [rsp + 0xa0], xmm0
call fcn.3985f4570
mov eax, 0xa
jmp 0x3985d3c58
mov eax, 0xd
movaps xmm6, xmmword [rsp + 0xd0]
add rsp, 0xe8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov r9d, dword [rbx + 8]
lea rbx, [rsp + 0x48]
mov rcx, r15
mov rdx, qword [rsp + 0x58]
mov qword [rsp + 0x20], rbx
lea r8, [r12 + rbp]
call qword [sym.imp.ntdll.dll_NtWriteVirtualMemory]
test eax, eax
mov r9d, eax
je 0x3985d3d00
test r14, r14
je 0x3985d3cf6
movdqa xmm0, xmmword [str.Error_write__lu_bytes_in_process_memory__status__0x_lx_n]
mov rdx, rsi
mov rcx, r14
mov rax, qword [0x398691120]
movaps xmmword [rsp + 0x60], xmm0
mov r8, qword [rsp + 0x48]
movdqa xmm0, xmmword [0x398691100]
movaps xmmword [rsp + 0x70], xmm0
movdqa xmm0, xmmword [0x398691110]
mov qword [rsp + 0x90], rax
mov eax, 0xa
movaps xmmword [rsp + 0x80], xmm0
mov word [rsp + 0x98], ax
call fcn.3985f4570
mov eax, 0xc
jmp 0x3985d3c58
mov rdx, qword [rsp + 0x38]
mov qword [rsp + 0x20], r13
mov r8, rbx
mov rcx, r15
mov r9d, 0x20
call rdi
mov edx, eax
xor eax, eax
test edx, edx
je 0x3985d3c58
test r14, r14
je 0x3985d3db0
movdqa xmm0, xmmword [str.Error_reprotect_rotect__0x_x___status__0x_lx_n_nUnhook_module:__ntdll.dll]
mov dword [rsp + 0x28], edx
mov rcx, r14
mov rdx, rsi
mov eax, dword [rsp + 0x44]
mov byte [rsp + 0xc0], 0
movaps xmmword [rsp + 0x60], xmm0
movdqa xmm0, xmmword [0x3986910a0]
mov r9, qword [rsp + 0x58]
movaps xmmword [rsp + 0x70], xmm0
movdqa xmm0, xmmword [0x3986910b0]
mov r8, qword [rsp + 0x50]
mov dword [rsp + 0x20], eax
movaps xmmword [rsp + 0x80], xmm0
movdqa xmm0, xmmword [0x3986910c0]
movaps xmmword [rsp + 0x90], xmm0
movdqa xmm0, xmmword [0x398691140]
movaps xmmword [rsp + 0xa0], xmm0
movdqa xmm0, xmmword [0x398691150]
movaps xmmword [rsp + 0xb0], xmm0
call fcn.3985f4570
mov eax, 0xb
jmp 0x3985d3c58