Function at 0x10069400
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x10
mov edi, dword [ebp + 0x24]
mov eax, dword [ebp + 0x14]
xor ecx, ecx
test eax, eax
cmovg ecx, eax
cmp ecx, 3
mov eax, 3
cmovl eax, ecx
mov dword [ebp - 0x10], eax
cmp dword [0x101f2f50], 0
je 0x100694be
mov esi, dword [ebp + 0x20]
mov ebx, dword [ebp + 0x18]
bt edi, 9
jb 0x1006944d
push dword [0x101f25a4]
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
je 0x100694a6
mov edx, dword [ebp + 0x1c]
xor eax, eax
inc eax
test ebx, ebx
cmove ebx, eax
mov cl, byte [0x101f259c]
shl eax, cl
add esi, eax
dec esi
shr esi, cl
shl esi, cl
mov ecx, dword [ebp + 8]
lea eax, [ebx - 1]
cmp eax, 1
ja 0x100694c8
and edi, 0xfffffd7f
lea eax, [edi + 0x80]
cmp dword [0x101f2f88], 0
jne 0x10069605
push eax
push esi
push edx
push ebx
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 [0x101af1a0]
movups xmmword [esp], xmm0
call fcn.1006d800
add esp, 0x10
jmp 0x1006944d
call fcn.100029e0
jmp 0x10069431
mov ecx, esi
call fcn.101ab480
test eax, eax
je 0x10069743
mov esi, eax
mov ebx, dword [eax + 0x18]
lea eax, [ebx - 0x144]
mov dword [ebp - 0x14], eax
mov dword [esi + 0x24], eax
push 0x144
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebx - 0x54], 1
mov dword [ebx - 0x134], esi
mov eax, dword [ebp - 0x10]
mov dword [ebx - 0x140], eax
mov eax, dword [ebp + 0xc]
mov dword [ebx - 0x138], eax
mov eax, dword [ebp + 0x10]
mov dword [ebx - 0x13c], eax
lea eax, [ebx - 0x7c]
mov dword [ebx - 0x7c], eax
mov dword [ebp - 0x10], ebx
mov dword [ebx - 0x78], eax
push dword [ebp - 0x14]
call fcn.10063e00
add esp, 4
cmp eax, 0xffffffff
je 0x1006978a
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 0x100697d9
cmp dword [ebp + 0x1c], 0
je 0x1006981a
mov ebx, dword [0x101f2fd8]
call fcn.10155630
mov esi, eax
lea eax, [ebx + 0x1c]
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov dword [ebx + 8], esi
mov ecx, dword [ebp - 0x10]
mov dword [ecx - 0x64], edi
mov eax, dword [0x101f2f64]
inc eax
mov dword [0x101f2f64], eax
mov dword [ecx - 0x68], eax
mov eax, 0x101f2f60
cmp dword [ebp + 8], 1
jne 0x100695ac
or edi, 1
mov eax, dword [ebp - 0x10]
mov dword [eax - 0x64], edi
mov eax, 0x101f2f5c
inc dword [eax]
mov eax, dword [ebp - 0x14]
mov dword [eax], 1
mov esi, dword [0x101f2fd8]
call fcn.10155630
cmp dword [esi + 8], eax
jne 0x100695da
mov dword [esi + 8], 0
add esi, 0x1c
push esi
call sym.nss3.dll__PR_MD_UNLOCK
add esp, 4
push dword [0x101f2598]
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov ecx, dword [ebp - 0x10]
mov dword [ecx - 0x58], eax
test byte [ecx - 0x63], 2
jne 0x1006980b
push 0
push 1
mov eax, dword [ebp - 0x10]
push dword [eax - 0x44]
jmp 0x10069732
mov dword [ebp - 0x18], eax
mov eax, dword [0x101f2f84]
mov dword [ebp - 0x14], eax
call fcn.10155630
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 [0x101f2f88]
test eax, eax
je 0x1006974c
mov esi, dword [0x101f2f8c]
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 [0x101f2f88], eax
mov ebx, dword [0x101f2f84]
call fcn.10155630
cmp dword [ebx + 8], eax
jne 0x10069679
mov dword [ebx + 8], 0
add ebx, 0x1c
push ebx
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 edi, 0x81
cmp dword [ebp + 8], 1
mov edx, dword [ebp - 0x18]
cmove edx, edi
mov eax, 0x101f2f5c
mov ecx, 0x101f2f60
cmove ecx, eax
mov dword [esi + 0x28], edx
lock inc dword [ecx]
mov edi, dword [esi + 0x30]
cmp dword [ebp + 0x1c], 0
je 0x100697be
test edi, edi
je 0x10069702
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
xor eax, eax
mov dword [esi + 0x30], eax
lea eax, [esi - 0xb8]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x10]
mov dword [esi - 0xb4], ecx
lea eax, [esi + 0x48]
push ecx
push eax
call fcn.10070eb0
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 0x100694a1
push 0
push 0xffffe890
jmp 0x100697aa
mov edi, dword [0x101f2f84]
call fcn.10155630
cmp dword [edi + 8], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0x1c]
mov eax, dword [ebp - 0x18]
jne 0x1006948b
mov dword [edi + 8], 0
add edi, 0x1c
push edi
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 0x1006948b
mov eax, dword [ebp - 0x10]
cmp dword [eax - 0x54], 1
je 0x10069871
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 0x10069738
test edi, edi
jne 0x10069702
push dword [0x101f2f58]
call sym.nss3.dll_PR_NewCondVar
add esp, 4
jmp 0x100696ff
mov eax, dword [ebp - 0x10]
cmp dword [eax - 0x54], 1
je 0x10069871
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 0x100697a0
push 0
push 1
push dword [0x100]
jmp 0x10069732
push dword [0x101f2f58]
call sym.nss3.dll_PR_NewCondVar
add esp, 4
mov ecx, dword [ebp - 0x10]
mov dword [ecx - 0x5c], eax
test eax, eax
jne 0x10069565
push esi
call dword [sym.imp.kernel32.dll_DeleteCriticalSection]
mov eax, dword [ebp - 0x10]
cmp dword [eax - 0x54], 1
je 0x10069884
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 0x100697b2
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax - 0x134]
call fcn.101ab660
jmp 0x100697a3
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax - 0x134]
call fcn.101ab660
jmp 0x100697b2