Function at 0x1006a850
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x6c
mov esi, dword [ebp + 0x10]
mov eax, dword [0x101db014]
xor eax, ebp
mov dword [ebp - 0x10], eax
push dword [0x101de1f0]
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov ebx, eax
test eax, eax
je 0x1006ab66
mov edx, dword [ebp + 0xc]
cmp esi, 0xffffffff
je 0x1006a95f
push esi
mov esi, edx
call sym.nss3.dll_PR_IntervalToMilliseconds
mov edx, esi
add esp, 4
mov edi, dword [ebp + 8]
cmp dword [edx + 0x18], 0
mov dword [ebp - 0x78], eax
jne 0x1006a967
inc dword [edi + 0xc]
mov dword [ebx + 0x104], 1
mov dword [ebx + 0x13c], 0
mov ecx, dword [edi + 8]
mov dword [ebx + 0x138], ecx
cmp dword [edi + 4], 0
jne 0x1006ab83
lea eax, [edi + 4]
mov dword [eax], ebx
mov dword [edi + 8], ebx
push edx
mov esi, ebx
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
push dword [ebp - 0x78]
push dword [esi + 0x100]
call dword [sym.imp.kernel32.dll_WaitForSingleObject]
mov ebx, eax
push dword [ebp + 0xc]
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
cmp ebx, 0x102
jne 0x1006a94d
cmp dword [esi + 0x104], 0
mov edx, esi
je 0x1006ab90
dec dword [edi + 0xc]
mov dword [edx + 0x104], 0
mov eax, dword [edx + 0x13c]
cmp dword [edi + 4], edx
jne 0x1006aba3
mov dword [edi + 4], eax
test eax, eax
jne 0x1006abce
mov dword [edi + 8], 0
xor eax, eax
mov dword [edx + 0x138], eax
mov dword [edx + 0x13c], eax
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1014dc80
add esp, 0x6c
pop esi
pop edi
pop ebx
pop ebp
ret
xor eax, eax
dec eax
jmp 0x1006a895
lea eax, [ebp - 0x60]
lea esi, [edx + 0x18]
mov ecx, 0x14
mov edi, eax
rep movsd dword es:[edi], dword [esi]
xor ecx, ecx
mov dword [edx + 0x18], ecx
mov dword [edx + 0x64], ecx
cmp dword [eax], 0
jle 0x1006a9aa
xor ecx, ecx
mov dword [ebp - 0x70], ecx
lea ecx, [ecx + ecx*2]
mov edi, dword [eax + ecx*4 + 4]
mov esi, dword [edi + 4]
test esi, esi
jne 0x1006aa39
mov dword [eax + ecx*4 + 0xc], 0
mov ecx, dword [ebp - 0x70]
inc ecx
cmp ecx, dword [eax]
jl 0x1006a985
mov eax, dword [eax + 0x4c]
test eax, eax
jne 0x1006a97e
test ebx, ebx
jne 0x1006ab20
lea esi, [ebp - 0x60]
push edx
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov edx, esi
mov edi, esi
mov eax, esi
mov dword [ebp - 0x70], eax
mov eax, dword [eax]
test eax, eax
jle 0x1006a9e4
xor esi, esi
lea ecx, [esi + esi*2]
mov ecx, dword [edi + ecx*4 + 0xc]
test ecx, ecx
jne 0x1006a9ff
inc esi
cmp esi, eax
jl 0x1006a9d4
mov eax, dword [edi + 0x4c]
cmp edx, edi
jne 0x1006abe2
mov edi, eax
test eax, eax
jne 0x1006a9c9
mov edi, dword [ebp + 8]
mov esi, ebx
jmp 0x1006a8e0
mov eax, dword [ecx + 0x100]
mov edx, dword [ecx + 0x13c]
mov dword [ebp - 0x64], edx
xor edx, edx
mov dword [ecx + 0x13c], edx
mov dword [ecx + 0x138], edx
push edx
push 1
push eax
call dword [sym.imp.kernel32.dll_ReleaseSemaphore]
mov eax, dword [ebp - 0x64]
mov ecx, eax
test eax, eax
jne 0x1006a9ff
mov eax, dword [ebp - 0x70]
mov eax, dword [eax]
lea edx, [ebp - 0x60]
jmp 0x1006a9df
mov dword [ebp - 0x68], esi
mov dword [ebp - 0x64], edi
mov dword [ebp - 0x74], ebx
mov dword [ebp - 0x6c], ecx
mov edx, dword [eax + ecx*4 + 8]
cmp edx, 0xffffffff
je 0x1006aaec
mov edi, edx
test edx, edx
jle 0x1006aab8
mov edx, dword [ebp - 0x68]
mov ecx, edi
mov dword [edx + 0x104], 0
mov edx, dword [edx + 0x13c]
dec edi
cmp ecx, 2
jl 0x1006aa77
test edx, edx
jne 0x1006aa5b
mov esi, edx
mov ebx, dword [ebp - 0x64]
mov edx, dword [ebx + 4]
mov ecx, dword [ebp - 0x6c]
mov dword [eax + ecx*4 + 0xc], edx
mov dword [ebx + 4], esi
mov dword [ebp - 0x68], esi
test esi, esi
jne 0x1006aac8
mov edx, dword [ebp - 0x64]
lea ebx, [edx + 8]
mov dword [ebx], 0
mov ecx, dword [ebp - 0x6c]
lea edx, [eax + ecx*4]
add edx, 8
sub edi, dword [edx]
mov edx, dword [ebp - 0x64]
add dword [edx + 0xc], edi
mov edx, dword [ebp + 0xc]
mov ebx, dword [ebp - 0x74]
jmp 0x1006a9a2
mov esi, dword [ebp - 0x68]
mov ecx, dword [ebp - 0x6c]
mov dword [eax + ecx*4 + 0xc], esi
mov edx, dword [ebp - 0x64]
mov dword [edx + 4], esi
mov edx, dword [ebp - 0x68]
mov edx, dword [edx + 0x138]
test edx, edx
je 0x1006aa9c
mov dword [edx + 0x13c], 0
mov ebx, 0x138
mov edx, dword [ebp - 0x64]
add ebx, dword [edx + 4]
jmp 0x1006aa96
mov edx, dword [ebp - 0x68]
mov dword [edx + 0x104], 0
mov edx, dword [edx + 0x13c]
mov dword [ebp - 0x68], edx
test edx, edx
jne 0x1006aaec
mov edx, dword [ebp - 0x64]
mov edi, dword [edx + 4]
mov ecx, dword [ebp - 0x6c]
mov dword [eax + ecx*4 + 0xc], edi
xor esi, esi
mov dword [edx + 8], esi
mov dword [edx + 4], esi
mov dword [edx + 0xc], esi
jmp 0x1006aaad
mov eax, dword [ebp + 8]
mov ecx, eax
inc dword [eax + 0xc]
mov dword [ebx + 0x104], 1
mov dword [ebx + 0x13c], 0
mov eax, dword [eax + 8]
mov esi, ebx
mov dword [ebx + 0x138], eax
cmp dword [ecx + 4], 0
jne 0x1006abf9
mov eax, dword [ebp + 8]
add eax, 4
mov ebx, esi
mov dword [eax], esi
mov eax, dword [ebp + 8]
mov dword [eax + 8], esi
jmp 0x1006a9b9
sub esp, 0x10
movaps xmm0, xmmword [0x1019c190]
movups xmmword [esp], xmm0
call fcn.10072140
add esp, 0x10
mov ebx, eax
jmp 0x1006a87c
mov eax, 0x13c
add eax, dword [edi + 8]
jmp 0x1006a8d2
push 0xffffffffffffffff
push dword [edx + 0x100]
call dword [sym.imp.kernel32.dll_WaitForSingleObject]
jmp 0x1006a94d
mov ecx, dword [edx + 0x138]
mov dword [ecx + 0x13c], eax
mov eax, dword [edx + 0x138]
mov esi, edx
mov ecx, dword [edx + 0x13c]
test ecx, ecx
je 0x1006abdd
mov dword [ecx + 0x138], eax
mov edx, esi
jmp 0x1006a93f
mov dword [eax + 0x138], 0
jmp 0x1006a93f
mov dword [edi + 8], eax
jmp 0x1006abc7
push edi
mov esi, edx
mov edi, eax
call dword [sym.imp.mozglue.dll_free]
mov eax, edi
mov edx, esi
add esp, 4
jmp 0x1006a9ef
mov eax, 0x13c
mov ecx, dword [ebp + 8]
add eax, dword [ecx + 8]
jmp 0x1006ab57