Function at 0x180005270
Capabilities:
Allocate or change rwx memory
Resume thread

Disassembly:
push rbx
push rsi
push rdi
push r14
push r15
sub rsp, 0x30
xor r14d, r14d
mov rdi, rcx
mov r15d, r14d
mov ebx, r14d
xor eax, eax
mov esi, 1
lock cmpxchg dword [0x180008668], esi
je 0x1800052c1
nop dword [rax]
cmp rbx, 0x20
jae 0x1800052aa
xor ecx, ecx
jmp 0x1800052ac
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_Sleep]
inc rbx
xor eax, eax
lock cmpxchg dword [0x180008668], esi
jne 0x1800052a0
cmp qword [0x180008a88], r14
mov qword [rsp + 0x70], r13
je 0x18000554a
mov edx, dword [0x18000dacc]
mov ebx, r14d
test edx, edx
je 0x1800052ff
mov r8, qword [0x18000dac0]
mov rax, r8
nop word [rax + rax]
cmp rdi, qword [rax]
je 0x18000530a
inc ebx
add rax, 0x38
cmp ebx, edx
jb 0x1800052f0
mov r15d, 4
jmp 0x180005550
cmp ebx, 0xffffffff
je 0x1800052ff
mov eax, ebx
imul r13, rax, 0x38
test byte [r8 + r13 + 0x20], 2
je 0x180005451
xor r8d, r8d
mov qword [rsp + 0x60], rbp
mov edx, ebx
lea rcx, [rsp + 0x20]
call fcn.180004b40
mov rdi, qword [0x18000dac0]
lea r9, [rsp + 0x68]
add rdi, r13
mov r8d, 0x40
mov rdx, qword [rdi]
movzx eax, byte [rdi + 0x20]
and al, sil
movzx ecx, al
lea rsi, [rdx - 5]
cmove rsi, rdx
lea rbp, [rcx*2 + 5]
mov rcx, rsi
mov rdx, rbp
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x18000537d
lea r15d, [rax + 0xa]
jmp 0x1800053cf
mov eax, dword [rdi + 0x18]
test byte [rdi + 0x20], 1
mov dword [rsi], eax
je 0x180005399
movzx eax, word [rdi + 0x1c]
mov word [rsi + 4], ax
movzx eax, byte [rdi + 0x1e]
mov byte [rsi + 6], al
jmp 0x1800053a0
movzx eax, byte [rdi + 0x1c]
mov byte [rsi + 4], al
mov r8d, dword [rsp + 0x68]
lea r9, [rsp + 0x68]
mov rdx, rbp
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov r8, rbp
mov rdx, rsi
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_FlushInstructionCache]
and byte [rdi + 0x20], 0xf9
cmp qword [rsp + 0x20], r14
je 0x180005436
mov eax, dword [rsp + 0x2c]
test eax, eax
je 0x180005422
mov rsi, qword [rsp + 0x20]
mov ebp, eax
nop word [rax + rax]
mov r8d, dword [rsi]
xor edx, edx
lea ecx, [rdx + 0x5a]
call qword [sym.imp.KERNEL32.dll_OpenThread]
mov rdi, rax
test rax, rax
je 0x180005418
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
add rsi, 4
sub rbp, 1
jne 0x1800053f0
mov r8, qword [rsp + 0x20]
xor edx, edx
mov rcx, qword [0x180008a88]
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rbp, qword [rsp + 0x60]
test r15d, r15d
jne 0x180005550
mov edx, dword [0x18000dacc]
mov r8, qword [0x18000dac0]
mov r10, qword [r8 + r13 + 0x10]
mov r9, r14
mov rcx, qword [0x18000dad0]
mov rax, r10
and rax, 0xfffffffffffff000
test rcx, rcx
je 0x1800054c2
nop
cmp rcx, rax
je 0x180005482
mov r9, rcx
mov rcx, qword [rcx]
test rcx, rcx
jne 0x180005470
jmp 0x1800054c2
mov rax, qword [rcx + 8]
mov qword [r10], rax
add dword [rcx + 0x10], 0xffffffff
mov qword [rcx + 8], r10
jne 0x1800054c2
mov rax, qword [rcx]
test r9, r9
je 0x1800054a0
mov qword [r9], rax
jmp 0x1800054a7
mov qword [0x18000dad0], rax
xor edx, edx
mov r8d, 0x8000
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov edx, dword [0x18000dacc]
mov r8, qword [0x18000dac0]
dec edx
cmp ebx, edx
jae 0x180005505
mov eax, edx
imul rcx, rax, 0x38
movups xmm0, xmmword [rcx + r8]
movups xmmword [r8 + r13], xmm0
movups xmm1, xmmword [rcx + r8 + 0x10]
movups xmmword [r8 + r13 + 0x10], xmm1
movups xmm0, xmmword [rcx + r8 + 0x20]
movups xmmword [r8 + r13 + 0x20], xmm0
movsd xmm1, qword [rcx + r8 + 0x30]
movsd qword [r8 + r13 + 0x30], xmm1
mov r8, qword [0x18000dac0]
mov ecx, dword [0x18000dac8]
mov eax, ecx
mov dword [0x18000dacc], edx
shr eax, 1
cmp eax, 0x20
jb 0x180005550
cmp eax, edx
jb 0x180005550
mov eax, ecx
xor edx, edx
mov rcx, qword [0x180008a88]
shr rax, 1
imul r9, rax, 0x38
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
test rax, rax
je 0x180005550
shr dword [0x18000dac8], 1
mov qword [0x18000dac0], rax
jmp 0x180005550
mov r15d, 2
xchg dword [0x180008668], r14d
mov r13, qword [rsp + 0x70]
mov eax, r15d
add rsp, 0x30
pop r15
pop r14
pop rdi
pop rsi
pop rbx
ret