Function at 0x180046890
Capabilities:
Allocate or change rwx memory

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r15
sub rsp, 0x50
xor ebp, ebp
mov r15, r9
mov r13, r8
mov r12, rdx
mov rdi, rcx
mov ebx, ebp
test r8, r8
je 0x1800468c0
mov qword [r8], rbp
test r15, r15
je 0x1800468c8
mov qword [r9], rbp
mov rsi, qword [rsp + 0xb0]
test rsi, rsi
je 0x1800468d8
mov qword [rsi], rbp
test r12, r12
jne 0x1800468f1
lea eax, [r12 + 0x57]
add rsp, 0x50
pop r15
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x180058238], eax
je 0x180046913
mov eax, 0x10dd
add rsp, 0x50
pop r15
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
mov eax, dword [0x18005823c]
test eax, eax
jne 0x180046c7c
test rdi, rdi
jne 0x180046938
lea eax, [rdi + 6]
add rsp, 0x50
pop r15
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
mov rcx, qword [rdi]
test rcx, rcx
jne 0x180046963
mov ebx, 6
mov qword [0x180058240], rdi
mov dword [0x18005823c], ebx
mov eax, ebx
add rsp, 0x50
pop r15
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
mov qword [rsp + 0x48], r14
xor edx, edx
mov r14, rbp
mov rdi, rbp
call fcn.180046c90
xor edx, edx
mov rcx, r12
mov rbp, rax
call fcn.180046c90
mov qword [rsp + 0x38], rax
cmp rax, rbp
jne 0x18004699d
cmp dword [0x180058230], ebx
jne 0x180046c66
jmp 0x180046c0c
test r15, r15
je 0x1800469a5
mov qword [r15], rbp
test rsi, rsi
je 0x1800469ad
mov qword [rsi], rax
mov ecx, 0x30
call fcn.180047e00
mov qword [rsp + 0x30], rax
mov r14, rax
test rax, rax
jne 0x1800469cc
lea ebx, [rax + 8]
jmp 0x180046c0c
mov rcx, rbp
call fcn.180046330
mov rdi, rax
test rax, rax
jne 0x1800469e4
lea ebx, [rax + 8]
jmp 0x180046c0c
test r13, r13
je 0x1800469ed
mov qword [r13], rdi
xor eax, eax
mov rsi, rbp
mov qword [rdi + 0x40], rax
mov r15, rdi
lea rax, [rdi + 0x1e]
xor r12d, r12d
mov qword [rsp + 0xa8], rax
movabs r13, 0xc000000001010101
movabs r14, 0x28040000403
nop dword [rax]
lea rax, [rsp + 0xb0]
mov dword [rsp + 0xb0], 0
xor r9d, r9d
mov qword [rsp + 0x20], rax
mov r8, rsi
lea rdx, [rsp + 0xa8]
mov rcx, r15
mov rbx, rsi
call fcn.180047ca0
mov rsi, rax
movsxd rax, dword [rsp + 0xb0]
sub rax, rbx
mov edx, esi
add rax, rsi
sub edx, ebp
add r15, rax
movzx eax, dl
and al, 7
movzx ecx, r15b
sub cl, dil
shl cl, 3
xor cl, al
mov byte [r12 + rdi + 0x40], cl
inc r12d
cmp r12d, 8
jae 0x180046aca
movzx ecx, byte [rbx]
lea eax, [rcx + 0x3e]
cmp al, 0x29
ja 0x180046a98
bt r14, rax
jb 0x180046aca
cmp cl, 0xf3
jne 0x180046b3e
cmp byte [rbx + 1], 0xc3
je 0x180046aca
sub cl, 0x26
cmp cl, 0x3f
ja 0x180046ac1
bt r13, rcx
jae 0x180046ac1
cmp byte [rbx + 1], 0xff
jne 0x180046ac1
cmp byte [rbx + 2], 0x25
je 0x180046aca
cmp edx, 5
jb 0x180046a20
mov r14, qword [rsp + 0x30]
mov r13, qword [rsp + 0xa0]
cmp edx, 5
jae 0x180046afe
nop dword [rax]
mov rcx, rsi
call fcn.180046600
test eax, eax
je 0x180046bfe
cdqe
add rsi, rax
mov edx, esi
sub edx, ebp
cmp edx, 5
jb 0x180046ae0
cmp r12d, 8
ja 0x180046bfe
cmp r15, qword [rsp + 0xa8]
jbe 0x180046b13
int3
mov byte [rdi + 0x3e], dl
lea rcx, [rdi + 0x20]
mov ebx, edx
sub r15b, dil
mov r8d, edx
mov rdx, rbp
mov byte [rdi + 0x1e], r15b
call sub.VCRUNTIME140.dll_memcpy
cmp rbx, 0x19
jbe 0x180046b50
mov ebx, 6
jmp 0x180046c0c
cmp cl, 0xff
jne 0x180046aa7
cmp byte [rbx + 1], 0x25
jmp 0x180046abf
movzx r8d, byte [rdi + 0x1e]
lea rax, [rbx + rbp]
mov qword [rdi + 0x48], rax
add r8, rdi
mov rax, qword [rsp + 0x38]
mov qword [rdi + 0x50], rax
mov eax, edi
lea rcx, [r8 + 6]
mov word [r8], 0x25ff
sub eax, ecx
lea rcx, [r8 + 6]
add eax, 0x48
mov dword [r8 + 2], eax
mov rdx, qword [rsp + 0xa8]
call fcn.1800465b0
lea r9, [rsp + 0x98]
mov dword [rsp + 0x98], 0
mov r8d, 0x40
mov rdx, rbx
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x180046bc2
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x180046c0c
mov rax, qword [rsp + 0x90]
mov qword [r14 + 0x10], rax
mov dword [r14 + 8], 0
mov qword [r14 + 0x20], rdi
mov qword [r14 + 0x18], rbp
mov eax, dword [rsp + 0x98]
mov dword [r14 + 0x28], eax
mov rax, qword [0x180058250]
mov qword [r14], rax
xor eax, eax
mov qword [0x180058250], r14
jmp 0x180046c77
cmp dword [0x180058230], 0
mov ebx, 9
jne 0x180046c17
mov dword [0x18005823c], ebx
test rdi, rdi
je 0x180046c54
xorps xmm0, xmm0
mov rcx, rdi
movups xmmword [rdi], xmm0
and rcx, 0xffffffffffff0000
movups xmmword [rdi + 0x10], xmm0
movups xmmword [rdi + 0x20], xmm0
movups xmmword [rdi + 0x30], xmm0
movups xmmword [rdi + 0x40], xmm0
movups xmmword [rdi + 0x50], xmm0
mov rax, qword [rcx + 0x10]
mov qword [rdi + 0x48], rax
mov qword [rcx + 0x10], rdi
test r13, r13
je 0x180046c54
mov qword [r13], 0
test r14, r14
je 0x180046c66
mov edx, 0x30
mov rcx, r14
call fcn.180047e44
mov rax, qword [rsp + 0x90]
mov qword [0x180058240], rax
mov eax, ebx
mov r14, qword [rsp + 0x48]
add rsp, 0x50
pop r15
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret