Function at 0x180081130
Capabilities:
Check for time delay via queryperformancecounter
Get thread local storage value

Disassembly:
push rbp
push r13
lea rbp, [rsp - 0x48]
sub rsp, 0x148
cmp qword [rcx + 0x40], 0
mov r13, rcx
jne 0x18008117a
mov r9, qword [rbp + 0x58]
lea rax, [0x1800e6974]
mov r8d, 0x12a
mov qword [rsp + 0x20], rax
lea rdx, str.C:BuildAgent2work78a794e88763017dUE4EngineSourceRuntimeCorePublicAsyncAsyncWork.h
lea rcx, str.QueuedPool
call qword [sym.imp.FactoryGameEGS_Core.dll_public:_static_bool___cdecl_FDebug::CheckVerifyFailedImpl_char_const____ptr64__char_const____ptr64__int__void____ptr64__wchar_t_const____ptr64_]
test al, al
je 0x18008117a
nop
int3
cmp qword [r13 + 0x38], 0
je 0x180081809
mov qword [rsp + 0x140], rbx
mov qword [rsp + 0x138], rsi
mov qword [rsp + 0x130], rdi
mov rdi, qword [r13 + 0x60]
mov qword [rsp + 0x128], r12
xor r12b, r12b
mov qword [rsp + 0x120], r14
xor r14d, r14d
mov qword [rsp + 0x118], r15
mov rbx, qword [rdi]
mov qword [rbp - 0x80], r14
test ebx, ebx
jne 0x1800811d5
mov rax, rbx
shr rax, 0x20
test eax, eax
je 0x180081248
mov rax, qword [sym.imp.FactoryGameEGS_Core.dll_int_GCycleStatsShouldEmitNamedEvents]
cmp dword [rax], r14d
je 0x180081230
mov rdx, qword [rdi + 0x10]
lea rcx, [rsp + 0x68]
mov dword [rsp + 0x68], r14d
call qword [sym.imp.FactoryGameEGS_Core.dll_public:_static_void___cdecl_FWindowsPlatformMisc::BeginNamedEvent_struct_FColor_const____ptr64__char_const____ptr64_]
mov rax, qword [sym.imp.FactoryGameEGS_Core.dll_class_UE::Trace::FChannel____ptr64___ptr64_CpuChannel]
mov r12b, 1
mov rcx, qword [rax]
mov eax, dword [rcx + 0x18]
test eax, eax
js 0x180081230
mov rdx, qword [rdi + 8]
mov rax, rbx
shr rax, 0x20
xor r9d, r9d
mov dword [rsp + 0x64], eax
xor r8d, r8d
mov dword [rsp + 0x60], ebx
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.FactoryGameEGS_Core.dll_public:_static_void___cdecl_FCpuProfilerTrace::OutputBeginDynamicEventWithId_class_FName__wchar_t_const____ptr64__char_const____ptr64__unsigned_int_]
mov r12b, 3
mov rax, qword [sym.imp.FactoryGameEGS_Core.dll_bool_FThreadStats::bPrimaryDisableForever]
cmp byte [rax], r14b
je 0x180081251
mov rax, qword [sym.imp.FactoryGameEGS_Core.dll_bool_FThreadStats::bPrimaryEnable]
cmp byte [rax], r14b
jne 0x180081251
mov rsi, qword [rbp - 0x80]
jmp 0x180081350
mov rax, rbx
mov dword [rsp + 0x60], ebx
shr rax, 0x20
mov dword [rsp + 0x64], eax
mov rax, qword [sym.imp.FactoryGameEGS_Core.dll_unsigned_int_FThreadStats::TlsSlot]
mov rsi, qword [rsp + 0x60]
mov qword [rbp - 0x80], rsi
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, rax
test rax, rax
jne 0x180081292
call qword [sym.imp.FactoryGameEGS_Core.dll_public:_static_struct_FThreadStatsPool____ptr64___cdecl_FThreadStatsPool::Get_void_]
mov rcx, rax
call qword [sym.imp.FactoryGameEGS_Core.dll_public:_class_FThreadStats____ptr64___cdecl_FThreadStatsPool::GetFromPool_void____ptr64]
mov rdi, rax
inc dword [rdi + 0x44]
lea rcx, [rbp - 0x70]
mov rax, rsi
mov dword [rbp - 0x28], ebx
shr rax, 0x20
and eax, 0xffff4fff
bts eax, 0xe
mov dword [rbp - 0x24], eax
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov eax, dword [rbp - 0x70]
mov qword [rbp - 0x30], rax
mov rax, qword [sym.imp.FactoryGameEGS_Core.dll_bool_FLowLevelMemTracker::bIsDisabled]
mov word [rbp + 0x60], r14w
cmp byte [rax], r14b
jne 0x1800812e9
mov byte [rsp + 0x28], 1
lea rcx, [rbp + 0x60]
xor r9d, r9d
mov byte [rsp + 0x20], 1
xor r8d, r8d
mov dl, 0x2d
call qword [sym.imp.FactoryGameEGS_Core.dll_protected:_void___cdecl_FLLMScope::Init_enum_ELLMTag__bool__enum_ELLMTagSet__enum_ELLMTracker__bool____ptr64]
mov r8b, 1
lea rcx, [rbp - 0x68]
mov dl, 0x2d
call qword [sym.imp.FactoryGameEGS_Core.dll_public:_void___cdecl_FMemScope::constructor_enum_ELLMTag__bool____ptr64]
inc dword [rdi + 0x4c]
lea rdx, [rdi + 0x18]
mov ecx, 0x10
call fcn.18006fd00
test rax, rax
je 0x180081315
movups xmm0, xmmword [rbp - 0x30]
movups xmmword [rax], xmm0
dec dword [rdi + 0x4c]
lea rcx, [rbp - 0x68]
call qword [sym.imp.FactoryGameEGS_Core.dll_public:_void___cdecl_FMemScope::destructor_void____ptr64]
cmp byte [rbp + 0x61], r14b
je 0x180081332
lea rcx, [rbp + 0x60]
call qword [sym.imp.FactoryGameEGS_Core.dll_protected:_void___cdecl_FLLMScope::Destruct_void____ptr64]
mov rax, qword [sym.imp.FactoryGameEGS_Core.dll_bool_FThreadStats::bIsRawStatsActive]
cmp byte [rax], r14b
je 0x18008134c
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.FactoryGameEGS_Core.dll_public:_void___cdecl_FThreadStats::FlushRawStats_bool__bool____ptr64]
or r12b, 4
mov rax, qword gs:[0x58]
lea rdi, str.ThreadPool_Async_Tasks
mov ecx, dword [0x18012368c]
lea r15, str.STATCAT_Advanced
mov r8d, 0x38
mov rdx, qword [rax + rcx*8]
mov eax, dword [r8 + rdx]
cmp dword [0x1801233e8], eax
jg 0x180081825
mov rbx, qword [0x1801233e0]
test rbx, rbx
jne 0x1800813e3
mov dword [rsp + 0x58], r14d
lea r9, str.STATGROUP_ThreadPoolAsyncTasks
mov byte [rsp + 0x50], r14b
lea r8, str.FAsyncTask::FinishThreadedWork
mov byte [rsp + 0x48], 1
lea rdx, str.STAT_FAsyncTask_FinishThreadedWork
mov dword [rsp + 0x40], 2
lea rcx, [0x1801233e0]
mov byte [rsp + 0x38], 1
mov byte [rsp + 0x30], 1
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], r15
call qword [sym.imp.FactoryGameEGS_Core.dll_protected:_struct_TStatIdData_const____ptr64___cdecl_FThreadSafeStaticStatBase::DoSetup_char_const____ptr64__wchar_t_const____ptr64__char_const____ptr64__char_const____ptr64__wchar_t_const____ptr64__bool__bool__enum_EStatDataType::Type__bool__bool__enum_FWindowsPlatformMemory::EMemoryCounterRegion_const___ptr64]
mov rbx, rax
mov rdi, qword [rbx]
xor r15b, r15b
mov qword [rsp + 0x70], r14
test edi, edi
jne 0x18008140c
mov rcx, rdi
shr rcx, 0x20
test ecx, ecx
jne 0x18008140c
mov rcx, qword [r13 + 0x38]
mov rax, qword [rcx]
call qword [rax + 0x10]
jmp 0x1800816b1
mov rax, qword [sym.imp.FactoryGameEGS_Core.dll_int_GCycleStatsShouldEmitNamedEvents]
cmp dword [rax], r14d
je 0x180081464
mov rdx, qword [rbx + 0x10]
lea rcx, [rsp + 0x60]
mov dword [rsp + 0x60], r14d
call qword [sym.imp.FactoryGameEGS_Core.dll_public:_static_void___cdecl_FWindowsPlatformMisc::BeginNamedEvent_struct_FColor_const____ptr64__char_const____ptr64_]
mov rax, qword [sym.imp.FactoryGameEGS_Core.dll_class_UE::Trace::FChannel____ptr64___ptr64_CpuChannel]
mov r15b, 1
mov rcx, qword [rax]
mov eax, dword [rcx + 0x18]
test eax, eax
js 0x180081464
mov rdx, qword [rbx + 8]
mov rax, rdi
shr rax, 0x20
xor r9d, r9d
mov dword [rbp + 0x64], eax
xor r8d, r8d
mov dword [rbp + 0x60], edi
mov rcx, qword [rbp + 0x60]
call qword [sym.imp.FactoryGameEGS_Core.dll_public:_static_void___cdecl_FCpuProfilerTrace::OutputBeginDynamicEventWithId_class_FName__wchar_t_const____ptr64__char_const____ptr64__unsigned_int_]
mov r15b, 3
mov rax, qword [sym.imp.FactoryGameEGS_Core.dll_bool_FThreadStats::bPrimaryEnable]
cmp byte [rax], r14b
je 0x18008157c
mov rax, rdi
mov dword [rbp + 0x60], edi
shr rax, 0x20
mov dword [rbp + 0x64], eax
mov rax, qword [sym.imp.FactoryGameEGS_Core.dll_unsigned_int_FThreadStats::TlsSlot]
mov rbx, qword [rbp + 0x60]
mov qword [rsp + 0x70], rbx
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov r14, rax
test rax, rax
jne 0x1800814b3
call qword [sym.imp.FactoryGameEGS_Core.dll_public:_static_struct_FThreadStatsPool____ptr64___cdecl_FThreadStatsPool::Get_void_]
mov rcx, rax
call qword [sym.imp.FactoryGameEGS_Core.dll_public:_class_FThreadStats____ptr64___cdecl_FThreadStatsPool::GetFromPool_void____ptr64]
mov r14, rax
inc dword [r14 + 0x44]
lea rcx, [rbp - 0x60]
mov rax, rbx
mov dword [rbp - 0x18], edi
shr rax, 0x20
and eax, 0xffff4fff
bts eax, 0xe
mov dword [rbp - 0x14], eax
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov eax, dword [rbp - 0x60]
mov qword [rbp - 0x20], rax
mov rax, qword [sym.imp.FactoryGameEGS_Core.dll_bool_FLowLevelMemTracker::bIsDisabled]
mov word [rbp + 0x68], 0
cmp byte [rax], 0
jne 0x18008150c
mov byte [rsp + 0x28], 1
lea rcx, [rbp + 0x68]
xor r9d, r9d
mov byte [rsp + 0x20], 1
xor r8d, r8d
mov dl, 0x2d
call qword [sym.imp.FactoryGameEGS_Core.dll_protected:_void___cdecl_FLLMScope::Init_enum_ELLMTag__bool__enum_ELLMTagSet__enum_ELLMTracker__bool____ptr64]
mov r8b, 1
lea rcx, [rbp - 0x58]
mov dl, 0x2d
call qword [sym.imp.FactoryGameEGS_Core.dll_public:_void___cdecl_FMemScope::constructor_enum_ELLMTag__bool____ptr64]
inc dword [r14 + 0x4c]
lea rdx, [r14 + 0x18]
mov ecx, 0x10
call fcn.18006fd00
test rax, rax
je 0x180081539
movups xmm0, xmmword [rbp - 0x20]
movups xmmword [rax], xmm0
dec dword [r14 + 0x4c]
lea rcx, [rbp - 0x58]
call qword [sym.imp.FactoryGameEGS_Core.dll_public:_void___cdecl_FMemScope::destructor_void____ptr64]
cmp byte [rbp + 0x69], 0
je 0x180081557
lea rcx, [rbp + 0x68]
call qword [sym.imp.FactoryGameEGS_Core.dll_protected:_void___cdecl_FLLMScope::Destruct_void____ptr64]
mov rax, qword [sym.imp.FactoryGameEGS_Core.dll_bool_FThreadStats::bIsRawStatsActive]
cmp byte [rax], 0
je 0x180081571
xor r8d, r8d
xor edx, edx
mov rcx, r14
call qword [sym.imp.FactoryGameEGS_Core.dll_public:_void___cdecl_FThreadStats::FlushRawStats_bool__bool____ptr64]
mov r14d, dword [rsp + 0x70]
or r15b, 4
jmp 0x180081581
mov rbx, qword [rsp + 0x70]
mov rcx, qword [r13 + 0x38]
mov rax, qword [rcx]
call qword [rax + 0x10]
test r15b, 1
je 0x180081597
call qword [sym.imp.FactoryGameEGS_Core.dll_public:_static_void___cdecl_FWindowsPlatformMisc::EndNamedEvent_void_]
test r15b, 2
je 0x1800815a3
call qword [sym.imp.FactoryGameEGS_Core.dll_public:_static_void___cdecl_FCpuProfilerTrace::OutputEndEvent_void_]
test r15b, 4
je 0x1800816b1
mov rax, qword [sym.imp.FactoryGameEGS_Core.dll_unsigned_int_FThreadStats::TlsSlot]
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rdi, rax
test rax, rax
jne 0x1800815d6
call qword [sym.imp.FactoryGameEGS_Core.dll_public:_static_struct_FThreadStatsPool____ptr64___cdecl_FThreadStatsPool::Get_void_]
mov rcx, rax
call qword [sym.imp.FactoryGameEGS_Core.dll_public:_class_FThreadStats____ptr64___cdecl_FThreadStatsPool::GetFromPool_void____ptr64]
mov rdi, rax
mov eax, dword [rdi + 0x48]
cmp dword [rdi + 0x44], eax
jle 0x1800816b1
shr rbx, 0x20
lea rcx, [rbp - 0x50]
and ebx, 0xffff5fff
mov dword [rbp - 8], r14d
or ebx, 0x5000
mov dword [rbp - 4], ebx
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov eax, dword [rbp - 0x50]
mov qword [rbp - 0x10], rax
mov rax, qword [sym.imp.FactoryGameEGS_Core.dll_bool_FLowLevelMemTracker::bIsDisabled]
mov word [rbp + 0x70], 0
cmp byte [rax], 0
jne 0x180081638
mov byte [rsp + 0x28], 1
lea rcx, [rbp + 0x70]
xor r9d, r9d
mov byte [rsp + 0x20], 1
xor r8d, r8d
mov dl, 0x2d
call qword [sym.imp.FactoryGameEGS_Core.dll_protected:_void___cdecl_FLLMScope::Init_enum_ELLMTag__bool__enum_ELLMTagSet__enum_ELLMTracker__bool____ptr64]
mov r8b, 1
lea rcx, [rbp - 0x48]
mov dl, 0x2d
call qword [sym.imp.FactoryGameEGS_Core.dll_public:_void___cdecl_FMemScope::constructor_enum_ELLMTag__bool____ptr64]
inc dword [rdi + 0x4c]
lea rdx, [rdi + 0x18]
mov ecx, 0x10
call fcn.18006fd00
test rax, rax
je 0x180081664
movups xmm0, xmmword [rbp - 0x10]
movups xmmword [rax], xmm0
dec dword [rdi + 0x4c]
lea rcx, [rbp - 0x48]
call qword [sym.imp.FactoryGameEGS_Core.dll_public:_void___cdecl_FMemScope::destructor_void____ptr64]
cmp byte [rbp + 0x71], 0
je 0x180081681
lea rcx, [rbp + 0x70]
call qword [sym.imp.FactoryGameEGS_Core.dll_protected:_void___cdecl_FLLMScope::Destruct_void____ptr64]
sub dword [rdi + 0x44], 1
jne 0x180081697
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.FactoryGameEGS_Core.dll_public:_void___cdecl_FThreadStats::Flush_bool__bool____ptr64]
jmp 0x1800816b1
mov rax, qword [sym.imp.FactoryGameEGS_Core.dll_bool_FThreadStats::bIsRawStatsActive]
cmp byte [rax], 0
je 0x1800816b1
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.FactoryGameEGS_Core.dll_public:_void___cdecl_FThreadStats::FlushRawStats_bool__bool____ptr64]
mov r15, qword [rsp + 0x118]
mov r14, qword [rsp + 0x120]
mov rdi, qword [rsp + 0x130]
test r12b, 1
je 0x1800816d5
call qword [sym.imp.FactoryGameEGS_Core.dll_public:_static_void___cdecl_FWindowsPlatformMisc::EndNamedEvent_void_]
test r12b, 2
je 0x1800816e1
call qword [sym.imp.FactoryGameEGS_Core.dll_public:_static_void___cdecl_FCpuProfilerTrace::OutputEndEvent_void_]
test r12b, 4
mov r12, qword [rsp + 0x128]
je 0x1800817f9
mov rax, qword [sym.imp.FactoryGameEGS_Core.dll_unsigned_int_FThreadStats::TlsSlot]
mov ecx, dword [rax]
call qword [sym.imp.KERNEL32.dll_TlsGetValue]
mov rbx, rax
test rax, rax
jne 0x18008171c
call qword [sym.imp.FactoryGameEGS_Core.dll_public:_static_struct_FThreadStatsPool____ptr64___cdecl_FThreadStatsPool::Get_void_]
mov rcx, rax
call qword [sym.imp.FactoryGameEGS_Core.dll_public:_class_FThreadStats____ptr64___cdecl_FThreadStatsPool::GetFromPool_void____ptr64]
mov rbx, rax
mov eax, dword [rbx + 0x48]
cmp dword [rbx + 0x44], eax
jle 0x1800817f9
mov eax, dword [rbp - 0x80]
lea rcx, [rbp - 0x40]
shr rsi, 0x20
and esi, 0xffff5fff
mov dword [rbp + 8], eax
or esi, 0x5000
mov dword [rbp + 0xc], esi
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov eax, dword [rbp - 0x40]
mov qword [rbp], rax
mov rax, qword [sym.imp.FactoryGameEGS_Core.dll_bool_FLowLevelMemTracker::bIsDisabled]
mov word [rbp + 0x78], 0
cmp byte [rax], 0
jne 0x180081780
mov byte [rsp + 0x28], 1
lea rcx, [rbp + 0x78]
xor r9d, r9d
mov byte [rsp + 0x20], 1
xor r8d, r8d
mov dl, 0x2d
call qword [sym.imp.FactoryGameEGS_Core.dll_protected:_void___cdecl_FLLMScope::Init_enum_ELLMTag__bool__enum_ELLMTagSet__enum_ELLMTracker__bool____ptr64]
mov r8b, 1
lea rcx, [rbp - 0x38]
mov dl, 0x2d
call qword [sym.imp.FactoryGameEGS_Core.dll_public:_void___cdecl_FMemScope::constructor_enum_ELLMTag__bool____ptr64]
inc dword [rbx + 0x4c]
lea rdx, [rbx + 0x18]
mov ecx, 0x10
call fcn.18006fd00
test rax, rax
je 0x1800817ac
movups xmm0, xmmword [rbp]
movups xmmword [rax], xmm0
dec dword [rbx + 0x4c]
lea rcx, [rbp - 0x38]
call qword [sym.imp.FactoryGameEGS_Core.dll_public:_void___cdecl_FMemScope::destructor_void____ptr64]
cmp byte [rbp + 0x79], 0
je 0x1800817c9
lea rcx, [rbp + 0x78]
call qword [sym.imp.FactoryGameEGS_Core.dll_protected:_void___cdecl_FLLMScope::Destruct_void____ptr64]
sub dword [rbx + 0x44], 1
jne 0x1800817df
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.FactoryGameEGS_Core.dll_public:_void___cdecl_FThreadStats::Flush_bool__bool____ptr64]
jmp 0x1800817f9
mov rax, qword [sym.imp.FactoryGameEGS_Core.dll_bool_FThreadStats::bIsRawStatsActive]
cmp byte [rax], 0
je 0x1800817f9
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.FactoryGameEGS_Core.dll_public:_void___cdecl_FThreadStats::FlushRawStats_bool__bool____ptr64]
mov rbx, qword [rsp + 0x140]
mov rsi, qword [rsp + 0x138]
add rsp, 0x148
pop r13
pop rbp
ret
lea rcx, [0x1801233e8]
call fcn.1800de668
jmp 0x180081387
lea rcx, [0x1801233e8]
call fcn.1800de6d0
cmp dword [0x1801233e8], 0xffffffff
jne 0x180081387
mov rax, qword [0x1801233e0]
test rax, rax
jne 0x180081814
mov dword [rsp + 0x58], r14d
lea r9, str.STATGROUP_ThreadPoolAsyncTasks
mov byte [rsp + 0x50], r14b
lea r8, str.FAsyncTask::FinishThreadedWork
mov byte [rsp + 0x48], 1
lea rdx, str.STAT_FAsyncTask_FinishThreadedWork
mov dword [rsp + 0x40], 2
lea rcx, [0x1801233e0]
mov byte [rsp + 0x38], 1
mov byte [rsp + 0x30], 1
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], r15
call qword [sym.imp.FactoryGameEGS_Core.dll_protected:_struct_TStatIdData_const____ptr64___cdecl_FThreadSafeStaticStatBase::DoSetup_char_const____ptr64__wchar_t_const____ptr64__char_const____ptr64__char_const____ptr64__wchar_t_const____ptr64__bool__bool__enum_EStatDataType::Type__bool__bool__enum_FWindowsPlatformMemory::EMemoryCounterRegion_const___ptr64]
jmp 0x180081814