Function at 0x10139c40
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x20
mov eax, dword [0x101d2014]
mov ecx, dword [ebp + 8]
xor eax, ebp
mov dword [ebp - 0x10], eax
call fcn.10137450
test eax, eax
je 0x10139c66
cmp dword [eax], 0
mov cl, 1
jne 0x10139c8b
sub esp, 0x10
mov eax, dword [ebp + 8]
xor edi, edi
mov dword [esp + 0xc], edi
mov dword [esp + 4], edi
mov dword [esp], eax
call sym.nss3.dll_PK11_GetAllTokens
add esp, 0x10
test eax, eax
je 0x10139dac
xor ecx, ecx
mov ebx, dword [eax + 8]
mov esi, eax
mov dword [ebp - 0x2c], ecx
push dword [0x101d4d30]
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov edi, eax
test eax, eax
je 0x10139e4b
lea eax, [ebx + 0x1c]
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov dword [ebx + 8], edi
mov ebx, dword [esi]
test ebx, ebx
je 0x10139d7d
inc dword [ebx + 0xc]
push dword [esi + 8]
call sym.nss3.dll_PR_Unlock
add esp, 4
mov dword [ebp - 0x24], esi
mov edi, dword [ebx + 8]
mov ecx, edi
call fcn.10138680
test eax, eax
je 0x10139d51
cmp dword [edi + 0x30], 0
jne 0x10139d11
mov eax, dword [edi + 0x3c]
mov dword [ebp - 0x28], eax
push dword [0x101d4d30]
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
mov dword [ebp - 0x20], eax
je 0x10139d69
mov esi, dword [ebp - 0x28]
lea eax, [esi + 0x1c]
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov eax, dword [ebp - 0x20]
mov dword [esi + 8], eax
mov eax, dword [edi]
mov esi, dword [edi + 0x40]
mov ecx, dword [eax + 0x22]
call dword [section..00cfg]
lea eax, [ebp - 0x1c]
push eax
push dword [ebp + 8]
push esi
call ecx
add esp, 0xc
cmp dword [edi + 0x30], 0
mov esi, eax
jne 0x10139d3f
push dword [edi + 0x3c]
call sym.nss3.dll_PR_Unlock
add esp, 4
test esi, esi
mov esi, dword [ebp - 0x24]
jne 0x10139d51
mov edi, dword [ebp - 0x18]
lea eax, [edi + 1]
cmp eax, 1
ja 0x10139dbd
push 1
push ebx
push esi
call sym.nss3.dll_PK11_GetNextSafe
add esp, 0xc
mov ebx, eax
test eax, eax
jne 0x10139cd1
jmp 0x10139d88
xor eax, eax
push eax
push eax
push 1
push eax
call fcn.100e2c70
add esp, 0x10
mov dword [ebp - 0x20], eax
jmp 0x10139cfe
push dword [esi + 8]
call sym.nss3.dll_PR_Unlock
add esp, 4
push 0
push dword [ebp + 8]
call fcn.101230f0
add esp, 8
lea ecx, [eax - 0x13]
xor edi, edi
cmp ecx, 0xb
jae 0x10139e28
mov edi, dword [eax*4 + 0x101a2410]
jmp 0x10139e28
push 0
push 0xffffe006
call sym.nss3.dll_PR_SetError
add esp, 8
jmp 0x10139e37
mov eax, dword [esi + 8]
mov dword [ebp - 0x28], eax
push dword [0x101d4d30]
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
mov dword [ebp - 0x20], eax
je 0x10139e61
mov esi, dword [ebp - 0x28]
lea eax, [esi + 0x1c]
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov eax, dword [ebp - 0x20]
mov dword [esi + 8], eax
mov esi, dword [ebx + 0xc]
lea eax, [esi - 1]
mov dword [ebx + 0xc], eax
mov eax, dword [ebp - 0x24]
push dword [eax + 8]
call sym.nss3.dll_PR_Unlock
add esp, 4
cmp esi, 1
jne 0x10139e25
mov eax, dword [ebx + 8]
lock dec dword [eax + 0x48]
jne 0x10139e1b
push eax
call fcn.10135de0
add esp, 4
push ebx
call dword [sym.imp.mozglue.dll_free]
add esp, 4
mov esi, dword [ebp - 0x24]
cmp byte [ebp - 0x2c], 0
jne 0x10139e37
push esi
call sym.nss3.dll_PK11_FreeSlotList
add esp, 4
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10192ef0
mov eax, edi
add esp, 0x20
pop esi
pop edi
pop ebx
pop ebp
ret
xor eax, eax
push eax
push eax
push 1
push eax
call fcn.100e2c70
add esp, 0x10
mov edi, eax
jmp 0x10139ca9
xor eax, eax
push eax
push eax
push 1
push eax
call fcn.100e2c70
add esp, 0x10
mov dword [ebp - 0x20], eax
jmp 0x10139dda