Function at 0x1001a260
Capabilities:
Get thread local storage value

Disassembly:
push ecx
push ebx
push ebp
push esi
xor ebx, ebx
push edi
mov esi, ecx
cmp byte [esp + 0x18], bl
je 0x1001a3ec
cmp dword [esi + 4], ebx
jne 0x1001a461
push 0x18
call fcn.1001d2d9
add esp, 4
cmp eax, ebx
je 0x1001a2b3
mov dword [eax + 4], ebx
mov dword [eax + 8], ebx
mov dword [eax + 0xc], ebx
mov dword [eax + 0x10], esi
mov dword [eax], 1
mov ecx, dword [eax + 0x10]
cmp dword [ecx + 8], 0x80000000
setne cl
dec cl
and cl, 6
mov byte [eax + 0x14], cl
jmp 0x1001a2b5
xor eax, eax
mov dword [esi + 4], eax
cmp byte [eax + 0x14], 6
jl 0x1001a381
mov edx, dword [eax + 0x10]
cmp dword [edx + 0xc], ebx
je 0x1001a381
mov eax, dword [0x1004fea0]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [esi + 4]
mov edx, dword [ecx + 0x10]
mov ebp, dword [edx + 0xc]
mov edi, eax
cmp ebp, 1
je 0x1001a30a
cmp byte [ebp + 0x14], bl
jne 0x1001a2fa
mov ecx, ebp
call sym.tbb.dll_protected:_void___thiscall_tbb::interface7::internal::task_arena_base::internal_initialize_void_
mov byte [ebp + 0x14], 1
mov eax, dword [ebp]
mov ecx, dword [esi + 4]
add eax, 0xd8
mov dword [ecx + 4], eax
jmp 0x1001a32c
cmp edi, ebx
jne 0x1001a31d
push 1
push ebx
push 0xffffffffffffffff
call fcn.10012020
add esp, 0xc
mov edi, eax
mov edx, dword [edi + 0x10]
mov eax, dword [esi + 4]
add edx, 0xd8
mov dword [eax + 4], edx
mov eax, dword [esi + 4]
mov ecx, dword [eax + 4]
push eax
call fcn.10019c60
mov dword [esi + 8], ebx
cmp edi, ebx
je 0x1001a461
mov ecx, dword [esi + 4]
mov edx, dword [edi + 0x10]
mov ecx, dword [ecx + 4]
add edx, 0xd8
cmp edx, ecx
jne 0x1001a461
mov edx, dword [edi + 0x28]
lea eax, [edi + 0x28]
cmp edx, dword [ecx + 4]
je 0x1001a461
cmp dword [edi + 8], ebx
setne dl
movzx edx, dl
push edx
push eax
call fcn.10019e90
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 4
mov al, byte [0x1004feb8]
cmp al, bl
jne 0x1001a38f
call fcn.1001a720
mov dword [esi + 8], ebx
mov eax, dword [esi + 4]
mov dword [eax + 4], 0x1004fe78
mov esi, dword [esi + 4]
mov ecx, dword [esi + 4]
push esi
call fcn.10019c60
mov ecx, dword [0x1004fea0]
push ecx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, ebx
je 0x1001a461
mov edx, dword [eax + 0x24]
lea ecx, [eax + 0x24]
cmp edx, dword [0x1004fe7c]
je 0x1001a461
cmp dword [eax + 8], ebx
setne al
movzx edx, al
push edx
push ecx
mov ecx, 0x1004fe78
call fcn.10019e90
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 4
lea eax, [esi + 4]
mov dword [esp + 0x10], eax
mov edx, dword [esp + 0x10]
mov eax, 0
lock xchg dword [edx], eax
mov dword [esp + 0x18], eax
mov edi, dword [esp + 0x18]
cmp edi, ebx
je 0x1001a461
mov ebp, dword [edi + 4]
lea ecx, [ebp + 8]
call sym.tbb.dll_private:_bool___thiscall_tbb::spin_rw_mutex_v3::internal_acquire_writer_void_
lea eax, [ebp + 8]
mov dword [edi + 0x10], ebx
test eax, eax
je 0x1001a430
mov dword [esp + 0x10], eax
mov eax, 0xfffffffc
mov edx, dword [esp + 0x10]
lock and dword [edx], eax
xor ebx, ebx
cmp byte [edi + 0x14], 6
push edi
setne bl
mov ecx, ebp
dec ebx
and ebx, 0x80000000
call fcn.10019dc0
mov eax, dword [esi + 8]
test eax, eax
je 0x1001a45e
mov edi, dword [sym.imp.KERNEL32.dll_SwitchToThread]
call edi
mov eax, dword [esi + 8]
test eax, eax
jne 0x1001a455
mov dword [esi + 8], ebx
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 4