Function at 0x503fb0
Capabilities:
Execute anti-debugging instructions
Get thread local storage value

Disassembly:
sub esp, 0x210
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
push esi
push edi
push dword [0x884c50]
mov edi, ecx
call ebp
mov ebx, eax
mov esi, dword [ebx + 4]
cmp esi, dword [ebx + 0xc]
jae 0x503fed
mov dword [esi], str.TtAgentJob.addToi
rdtsc
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 0x10]
lea eax, [esi + 0xc]
mov dword [esi + 4], ecx
mov dword [ebx + 4], eax
mov esi, dword [esp + 0x22c]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [edi + 0x38]
and eax, 0x3fffffff
cmp dword [edi + 0x34], eax
jl 0x504067
push 0x200
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x1c]
call fcn.004745a0
push str.TOI_event_queue_full__consider_using_HK_COLLIDABLE_QUALITY_DEBRIS_for_some_objects_or_increase_hkpWorldCinfo::m_sizeOfToiEventQueue
lea ecx, [esp + 0x18]
call fcn.0045cb80
mov ecx, dword [0x884c54]
lea edx, [esp + 0x20]
push 0x415
push str.WorldSimulationMultithreadedhkpMultithreadedSimulation.cpp
push edx
mov eax, dword [ecx]
push 0xf0323454
push 1
call dword [eax + 0xc]
lea ecx, [esp + 0x14]
call fcn.0045caa0
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x210
ret 0xc
mov eax, dword [edi + 0x34]
mov ecx, dword [edi + 0x30]
add ecx, 0x18
lea edx, [eax + 1]
mov dword [edi + 0x34], edx
sub edx, eax
imul eax, eax, 0x70
mov dword [esp + 0x10], eax
test edx, edx
jle 0x5040a5
add ecx, eax
lea eax, [ecx - 0x18]
test eax, eax
je 0x504099
mov dword [ecx], 0
mov dword [ecx + 4], 0
add ecx, 0x70
sub edx, 1
jne 0x504085
mov eax, dword [esp + 0x10]
mov ebx, dword [edi + 0x30]
push esi
add ebx, eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push dword [0x884c50]
call ebp
mov ebp, eax
mov esi, dword [ebp + 4]
cmp esi, dword [ebp + 0xc]
jae 0x5040dc
mov dword [esi], 0x77f5ec
rdtsc
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 0x10]
lea eax, [esi + 0xc]
mov dword [esi + 4], ecx
mov dword [ebp + 4], eax
mov esi, dword [esp + 0x224]
mov edx, dword [esp + 0x228]
mov eax, dword [esi + 0x3030]
mov dword [ebx], eax
mov eax, dword [edi + 0xc]
movsx ecx, byte [edx + 0xc]
shl ecx, 6
pop edi
mov eax, dword [eax + 0x80]
mov al, byte [ecx + eax + 0x1cd4]
mov byte [ebx + 8], al
mov eax, dword [esi + 0x3034]
mov dword [ebx + 4], eax
movaps xmm0, xmmword [esi + 0x3010]
movaps xmmword [ebx + 0x50], xmm0
movaps xmm0, xmmword [esi + 0x3020]
movaps xmmword [ebx + 0x60], xmm0
mov eax, dword [edx + 0x10]
movsx ecx, byte [eax + 0x10]
add ecx, eax
mov dword [ebx + 0xc], ecx
mov eax, dword [edx + 0x14]
movsx ecx, byte [eax + 0x10]
add ecx, eax
mov dword [ebx + 0x10], ecx
movups xmm0, xmmword [esi + 0x3050]
movups xmmword [ebx + 0x18], xmm0
mov eax, dword [esi + 0x3060]
mov dword [ebx + 0x28], eax
mov eax, dword [edx + 8]
mov dword [ebx + 0x14], eax
mov eax, dword [esi + 0x3064]
mov dword [ebx + 0x2c], eax
mov eax, dword [esi + 0x3068]
mov dword [ebx + 0x30], eax
mov eax, dword [esi + 0x306c]
mov dword [ebx + 0x34], eax
mov eax, dword [esi + 0x3070]
mov dword [ebx + 0x38], eax
mov eax, dword [esi + 0x3074]
mov dword [ebx + 0x3c], eax
mov eax, dword [esi + 0x3078]
mov dword [ebx + 0x40], eax
mov eax, dword [esi + 0x307c]
pop esi
pop ebp
mov dword [ebx + 0x44], eax
pop ebx
add esp, 0x210
ret 0xc