Function at 0x1006ddf0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x10
mov ebx, dword [ebp + 0x24]
mov eax, dword [ebp + 0x14]
xor ecx, ecx
test eax, eax
cmovns ecx, eax
cmp ecx, 3
mov eax, 3
cmovl eax, ecx
mov dword [ebp - 0x10], eax
cmp dword [0x101de200], 0
je 0x1006deae
mov esi, dword [ebp + 0x20]
mov edi, dword [ebp + 0x18]
bt ebx, 9
jb 0x1006de3d
push dword [0x101de1f0]
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
je 0x1006de96
mov edx, dword [ebp + 0x1c]
xor eax, eax
inc eax
test edi, edi
cmove edi, eax
mov cl, byte [0x101de1dc]
shl eax, cl
add esi, eax
dec esi
shr esi, cl
shl esi, cl
mov ecx, dword [ebp + 8]
lea eax, [edi - 1]
cmp eax, 1
ja 0x1006deb8
and ebx, 0xfffffd7f
lea eax, [ebx + 0x80]
cmp dword [0x101debf0], 0
jne 0x1006e004
push eax
push esi
push edx
push edi
push dword [ebp - 0x10]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ecx
call sym.nss3.dll__PR_NativeCreateThread
add esp, 0x30
pop esi
pop edi
pop ebx
pop ebp
ret
sub esp, 0x10
movaps xmm0, xmmword [0x1019c190]
movups xmmword [esp], xmm0
call fcn.10072140
add esp, 0x10
jmp 0x1006de3d
call fcn.100745f0
jmp 0x1006de21
mov ecx, esi
call fcn.101950e0
test eax, eax
je 0x1006e144
mov esi, eax
mov edi, dword [eax + 0x18]
lea eax, [edi - 0x144]
mov dword [ebp - 0x14], eax
mov dword [esi + 0x24], eax
xor ecx, ecx
push 0x144
push ecx
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [edi - 0x54], 1
xor eax, eax
mov dword [edi - 0x124], eax
mov dword [edi - 0x120], eax
mov dword [edi - 0x134], esi
mov eax, dword [ebp - 0x10]
mov dword [edi - 0x140], eax
mov eax, dword [ebp + 0xc]
mov dword [edi - 0x138], eax
mov eax, dword [ebp + 0x10]
mov dword [edi - 0x13c], eax
lea eax, [edi - 0x7c]
mov dword [edi - 0x7c], eax
mov dword [ebp - 0x10], edi
mov dword [edi - 0x78], eax
push dword [ebp - 0x14]
call fcn.100695f0
add esp, 4
cmp eax, 0xffffffff
je 0x1006e18b
mov eax, dword [ebp - 0x10]
lea esi, [eax - 0x104]
push esi
call sym.nss3.dll__PR_MD_NEW_LOCK
add esp, 4
cmp eax, 0xffffffff
je 0x1006e1dd
cmp dword [ebp + 0x1c], 0
je 0x1006e21e
mov esi, dword [0x101debd8]
call fcn.1014c8b0
mov edi, eax
lea eax, [esi + 0x1c]
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov dword [esi + 8], edi
mov ecx, dword [ebp - 0x10]
mov dword [ecx - 0x64], ebx
mov eax, dword [0x101de288]
inc eax
mov dword [0x101de288], eax
mov dword [ecx - 0x68], eax
mov eax, 0x101de238
cmp dword [ebp + 8], 1
jne 0x1006dfab
or ebx, 1
mov eax, dword [ebp - 0x10]
mov dword [eax - 0x64], ebx
mov eax, 0x101de23c
inc dword [eax]
mov eax, dword [ebp - 0x14]
mov dword [eax], 1
mov esi, dword [0x101debd8]
call fcn.1014c8b0
cmp dword [esi + 8], eax
jne 0x1006dfd9
mov dword [esi + 8], 0
add esi, 0x1c
push esi
call sym.nss3.dll__PR_MD_UNLOCK
add esp, 4
push dword [0x101de1f8]
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov ecx, dword [ebp - 0x10]
mov dword [ecx - 0x58], eax
test byte [ecx - 0x63], 2
jne 0x1006e20f
push 0
push 1
mov eax, dword [ebp - 0x10]
push dword [eax - 0x44]
jmp 0x1006e133
mov dword [ebp - 0x18], eax
mov eax, dword [0x101debec]
mov dword [ebp - 0x14], eax
call fcn.1014c8b0
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x14]
add eax, 0x1c
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x1c]
mov dword [eax + 8], ecx
mov eax, dword [0x101debf0]
test eax, eax
je 0x1006e14d
mov esi, dword [0x101debf4]
mov ecx, dword [esi]
mov edx, dword [esi + 4]
mov dword [edx], ecx
mov ecx, dword [esi]
mov edx, dword [esi + 4]
mov dword [ecx + 4], edx
dec eax
mov dword [0x101debf0], eax
mov edi, dword [0x101debec]
call fcn.1014c8b0
cmp dword [edi + 8], eax
jne 0x1006e078
mov dword [edi + 8], 0
add edi, 0x1c
push edi
call sym.nss3.dll__PR_MD_UNLOCK
add esp, 4
xor eax, eax
mov dword [esi - 0x8c], eax
mov dword [esi - 0x90], eax
mov dword [esi + 0x44], eax
mov dword [esi + 0x3c], eax
mov dword [esi - 0xa4], eax
lea eax, [esi + 0x10]
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], eax
mov eax, dword [ebp + 0xc]
mov dword [esi - 0xac], eax
mov eax, dword [ebp + 0x10]
mov dword [esi - 0xb0], eax
or ebx, 0x81
cmp dword [ebp + 8], 1
mov edx, dword [ebp - 0x18]
cmove edx, ebx
mov eax, 0x101de23c
mov ecx, 0x101de238
cmove ecx, eax
mov dword [esi + 0x28], edx
lock inc dword [ecx]
lea eax, [esi - 0xb8]
mov dword [ebp - 0x14], eax
mov edi, dword [esi + 0x30]
cmp dword [ebp + 0x1c], 0
je 0x1006e1bf
test edi, edi
je 0x1006e10c
mov dword [edi + 0x74], 0xffffffff
lea eax, [edi + 0xc]
push eax
call dword [sym.imp.kernel32.dll_DeleteCriticalSection]
push edi
call dword [sym.imp.mozglue.dll_free]
add esp, 4
mov dword [esi + 0x30], 0
mov ecx, dword [ebp - 0x10]
mov dword [esi - 0xb4], ecx
lea eax, [esi + 0x48]
push ecx
push eax
call fcn.10076670
add esp, 8
mov dword [esi - 0xb8], 2
push 0
push 1
push dword [esi + 0x48]
call dword [sym.imp.kernel32.dll_ReleaseSemaphore]
mov eax, dword [ebp - 0x14]
add esp, 0x10
jmp 0x1006de91
push 0
push 0xffffe890
jmp 0x1006e1ab
mov ebx, dword [0x101debec]
call fcn.1014c8b0
cmp dword [ebx + 8], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0x1c]
mov eax, dword [ebp - 0x18]
jne 0x1006de7b
mov dword [ebx + 8], 0
add ebx, 0x1c
push ebx
call sym.nss3.dll__PR_MD_UNLOCK
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp + 0x1c]
mov ecx, dword [ebp + 8]
add esp, 4
jmp 0x1006de7b
mov eax, dword [ebp - 0x10]
cmp dword [eax - 0x54], 1
je 0x1006e275
push dword [ebp - 0x14]
call dword [sym.imp.mozglue.dll_free]
add esp, 4
push 0
push 0xffffe8aa
call sym.nss3.dll_PR_SetError
add esp, 8
mov dword [ebp - 0x14], 0
jmp 0x1006e139
test edi, edi
jne 0x1006e10c
push dword [0x101de28c]
call sym.nss3.dll_PR_NewCondVar
add esp, 4
mov dword [esi + 0x30], eax
jmp 0x1006e10c
mov eax, dword [ebp - 0x10]
cmp dword [eax - 0x54], 1
je 0x1006e275
mov esi, dword [sym.imp.mozglue.dll_free]
mov edi, dword [ebp - 0x10]
push dword [edi - 0x120]
call esi
add esp, 4
mov dword [edi - 0x120], 0
push dword [ebp - 0x14]
call esi
jmp 0x1006e1a1
push 0
push 1
push dword [0x100]
jmp 0x1006e133
push dword [0x101de28c]
call sym.nss3.dll_PR_NewCondVar
add esp, 4
mov ecx, dword [ebp - 0x10]
mov dword [ecx - 0x5c], eax
test eax, eax
jne 0x1006df64
push esi
call dword [sym.imp.kernel32.dll_DeleteCriticalSection]
mov eax, dword [ebp - 0x10]
cmp dword [eax - 0x54], 1
je 0x1006e288
mov esi, dword [sym.imp.mozglue.dll_free]
mov edi, dword [ebp - 0x10]
push dword [edi - 0x120]
call esi
add esp, 4
mov dword [edi - 0x120], 0
push dword [ebp - 0x14]
call esi
add esp, 4
jmp 0x1006e1b3
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax - 0x134]
call fcn.101952e0
jmp 0x1006e1a4
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax - 0x134]
call fcn.101952e0
jmp 0x1006e1b3