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

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x558
mov rax, qword [0x14004b140]
xor rax, rsp
mov qword [rsp + 0x540], rax
cmp qword [rsp + 0x560], 0
je 0x140022adb
mov rax, qword [rsp + 0x560]
mov rcx, qword [0x14004be30]
mov qword [rax], rcx
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x14004be28], eax
je 0x140022af3
mov eax, 0x10dd
jmp 0x140022f27
cmp dword [0x14004be2c], 0
je 0x140022b0c
call fcn.1400228c0
mov eax, dword [0x14004be2c]
jmp 0x140022f27
mov dword [rsp + 0x30], 0
mov rax, qword [0x14004be40]
mov qword [rsp + 0x20], rax
jmp 0x140022b2f
mov rax, qword [rsp + 0x20]
mov rax, qword [rax]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
je 0x140022c06
mov rax, qword [rsp + 0x20]
cmp dword [rax + 8], 0
je 0x140022b8b
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0x20]
movzx eax, byte [rax + 0x3e]
mov rcx, qword [rsp + 0x20]
mov rcx, qword [rcx + 0x20]
add rcx, 0x20
mov r8d, eax
mov rdx, rcx
mov rax, qword [rsp + 0x20]
mov rcx, qword [rax + 0x18]
call sub.msvcrt.dll_memcpy
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0x10]
mov rcx, qword [rsp + 0x20]
mov rcx, qword [rcx + 0x18]
mov qword [rax], rcx
jmp 0x140022c01
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0x20]
add rax, 0x50
mov rcx, qword [rsp + 0x20]
mov rcx, qword [rcx + 0x20]
add rcx, 0x58
mov rdx, rax
call fcn.1400216c0
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0x20]
add rax, 0x58
mov rdx, rax
mov rax, qword [rsp + 0x20]
mov rcx, qword [rax + 0x18]
call fcn.140021660
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0x20]
mov rdx, qword [rax + 0x48]
mov rcx, qword [rsp + 0x38]
call fcn.140021620
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0x20]
mov rcx, qword [rsp + 0x20]
mov rcx, qword [rcx + 0x10]
mov qword [rcx], rax
jmp 0x140022b22
mov rax, qword [0x14004be38]
mov qword [rsp + 0x28], rax
jmp 0x140022c21
mov rax, qword [rsp + 0x28]
mov rax, qword [rax]
mov qword [rsp + 0x28], rax
cmp qword [rsp + 0x28], 0
je 0x140022d93
mov dword [rsp + 0xa0], 0x100001
lea rdx, [rsp + 0x70]
mov rax, qword [rsp + 0x28]
mov rcx, qword [rax + 8]
call qword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x140022d8e
mov rax, qword [0x14004be40]
mov qword [rsp + 0x20], rax
jmp 0x140022c6f
mov rax, qword [rsp + 0x20]
mov rax, qword [rax]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
je 0x140022d8e
mov rax, qword [rsp + 0x20]
cmp dword [rax + 8], 0
je 0x140022d05
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0x20]
cmp qword [rsp + 0x168], rax
jb 0x140022d00
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0x20]
add rax, 8
cmp qword [rsp + 0x168], rax
jae 0x140022d00
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0x20]
mov rcx, qword [rsp + 0x168]
sub rcx, rax
mov rax, rcx
movzx edx, al
mov rax, qword [rsp + 0x20]
mov rcx, qword [rax + 0x20]
call fcn.140020b80
movzx eax, al
mov rcx, qword [rsp + 0x20]
add rax, qword [rcx + 0x18]
mov qword [rsp + 0x168], rax
lea rdx, [rsp + 0x70]
mov rax, qword [rsp + 0x28]
mov rcx, qword [rax + 8]
call qword [sym.imp.KERNEL32.dll_SetThreadContext]
jmp 0x140022d89
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0x18]
cmp qword [rsp + 0x168], rax
jb 0x140022d89
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0x20]
movzx eax, byte [rax + 0x3e]
mov rcx, qword [rsp + 0x20]
add rax, qword [rcx + 0x18]
cmp qword [rsp + 0x168], rax
jae 0x140022d89
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0x18]
mov rcx, qword [rsp + 0x168]
sub rcx, rax
mov rax, rcx
movzx eax, al
mov edx, eax
mov rax, qword [rsp + 0x20]
mov rcx, qword [rax + 0x20]
call fcn.140020b10
cdqe
mov rcx, qword [rsp + 0x20]
add rax, qword [rcx + 0x20]
mov qword [rsp + 0x168], rax
lea rdx, [rsp + 0x70]
mov rax, qword [rsp + 0x28]
mov rcx, qword [rax + 8]
call qword [sym.imp.KERNEL32.dll_SetThreadContext]
jmp 0x140022c62
jmp 0x140022c14
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov qword [rsp + 0x48], rax
mov rax, qword [0x14004be40]
mov qword [rsp + 0x20], rax
cmp qword [rsp + 0x20], 0
je 0x140022e75
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0x20]
movzx eax, byte [rax + 0x3e]
lea r9, [rsp + 0x40]
mov rcx, qword [rsp + 0x20]
mov r8d, dword [rcx + 0x28]
mov edx, eax
mov rax, qword [rsp + 0x20]
mov rcx, qword [rax + 0x18]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0x20]
movzx eax, byte [rax + 0x3e]
mov r8d, eax
mov rax, qword [rsp + 0x20]
mov rdx, qword [rax + 0x18]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov rax, qword [rsp + 0x20]
cmp dword [rax + 8], 0
je 0x140022e40
mov rax, qword [rsp + 0x20]
cmp qword [rax + 0x20], 0
je 0x140022e40
mov rax, qword [rsp + 0x20]
mov rcx, qword [rax + 0x20]
call fcn.140021540
mov rax, qword [rsp + 0x20]
mov qword [rax + 0x20], 0
mov dword [rsp + 0x30], 1
mov rax, qword [rsp + 0x20]
mov rax, qword [rax]
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x20]
mov qword [rsp + 0x50], rax
mov edx, 0x30
mov rcx, qword [rsp + 0x50]
call fcn.140025bb4
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x20], rax
jmp 0x140022daa
mov qword [0x14004be40], 0
cmp dword [rsp + 0x30], 0
je 0x140022e95
cmp dword [0x14004be24], 0
jne 0x140022e95
call fcn.140021590
call fcn.140021fa0
mov rax, qword [0x14004be38]
mov qword [rsp + 0x28], rax
cmp qword [rsp + 0x28], 0
je 0x140022eef
mov rax, qword [rsp + 0x28]
mov rcx, qword [rax + 8]
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov rax, qword [rsp + 0x28]
mov rax, qword [rax]
mov qword [rsp + 0x68], rax
mov rax, qword [rsp + 0x28]
mov qword [rsp + 0x60], rax
mov edx, 0x10
mov rcx, qword [rsp + 0x60]
call fcn.140025bb4
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x28], rax
jmp 0x140022ea6
mov qword [0x14004be38], 0
mov dword [0x14004be28], 0
cmp qword [rsp + 0x560], 0
je 0x140022f21
mov rax, qword [rsp + 0x560]
mov rcx, qword [0x14004be30]
mov qword [rax], rcx
mov eax, dword [0x14004be2c]
mov rcx, qword [rsp + 0x540]
xor rcx, rsp
call fcn.140025cd0
add rsp, 0x558
ret