Function at 0x101396c0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x38
mov eax, dword [0x101d2014]
mov ecx, dword [ebp + 8]
xor eax, ebp
mov dword [ebp - 0x10], eax
mov edi, dword [ecx]
mov ecx, edi
call fcn.10137450
test eax, eax
je 0x101396ec
mov ebx, eax
mov al, 1
cmp dword [ebx], 0
jne 0x10139719
sub esp, 0x10
mov eax, dword [ebp + 0x18]
mov dword [esp], edi
mov dword [esp + 4], 0
mov dword [esp + 0xc], eax
call sym.nss3.dll_PK11_GetAllTokens
add esp, 0x10
xor ebx, ebx
test eax, eax
je 0x10139a5a
mov ecx, eax
xor eax, eax
mov ebx, ecx
mov esi, dword [ebp + 0x14]
mov dword [ebp - 0x40], eax
xor eax, eax
push eax
push eax
call sym.nss3.dll_PR_SetError
add esp, 8
test esi, esi
je 0x1013978a
mov ecx, dword [ebp + 8]
mov eax, 0x8000801
mov edx, esi
mov esi, dword [ecx]
mov dword [ebp - 0x3c], 0
cmp esi, 0x21f
jg 0x10139764
cmp esi, 0x80000efe
je 0x10139784
cmp esi, 0x200
je 0x10139784
cmp esi, 0x210
je 0x10139784
jmp 0x1013978f
lea edi, [esi - 0x255]
cmp edi, 0x1b
ja 0x10139774
bt eax, edi
jb 0x10139784
cmp esi, 0x250
je 0x10139784
cmp esi, 0x220
jne 0x1013978f
add ecx, 4
dec edx
jne 0x10139739
mov al, 1
mov dword [ebp - 0x3c], eax
mov esi, dword [ebx + 8]
push dword [0x101d4d30]
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov edi, eax
test eax, eax
je 0x10139b02
lea eax, [esi + 0x1c]
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov dword [esi + 8], edi
mov eax, dword [ebx]
test eax, eax
je 0x10139a2f
inc dword [eax + 0xc]
push dword [ebx + 8]
mov esi, eax
call sym.nss3.dll_PR_Unlock
mov eax, esi
add esp, 4
mov dword [ebp - 0x34], ebx
mov ecx, dword [eax + 8]
mov dword [ebp - 0x2c], eax
call fcn.10138680
mov edi, dword [ebp - 0x2c]
test eax, eax
je 0x10139a16
cmp dword [ebp + 0x14], 0
je 0x101399f2
xor esi, esi
mov eax, dword [ebp + 8]
mov ecx, dword [edi + 8]
mov ebx, dword [eax + esi*4]
mov dword [ebp - 0x20], ecx
cmp ebx, 0x80000efe
jne 0x1013980f
mov eax, dword [ecx + 0x28]
jmp 0x10139832
cmp ebx, 0x7ff
jae 0x10139885
movzx eax, bl
mov edx, ebx
mov edi, dword [ebp - 0x2c]
movsx ecx, byte [ecx + eax + 0x1e0]
shr edx, 8
xor eax, eax
bt ecx, edx
setb al
test eax, eax
je 0x10139a16
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x1013985a
mov eax, dword [eax + esi*4]
test eax, eax
mov dword [ebp - 0x30], eax
je 0x1013985a
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x20]
test eax, eax
je 0x101398ab
mov eax, dword [eax + esi*4]
jmp 0x101398ad
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x20]
test eax, eax
je 0x101399cf
mov eax, dword [eax + esi*4]
test eax, eax
je 0x101399cf
mov dword [ebp - 0x28], eax
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x101398e0
mov eax, dword [eax + esi*4]
mov dword [ebp - 0x30], eax
jmp 0x101398e7
mov eax, dword [ecx + 0x98]
test eax, eax
jle 0x10139a16
mov ecx, dword [ebp - 0x20]
mov ecx, dword [ecx + 0x94]
cmp dword [ecx], ebx
je 0x1013983a
add ecx, 4
dec eax
jne 0x1013989c
jmp 0x10139a16
xor eax, eax
test eax, eax
sete dl
cmp ebx, 1
mov dword [ebp - 0x38], edx
sete dl
jne 0x101398db
test eax, eax
jne 0x101398db
cmp dword [ecx + 0x124], 0
je 0x101398f6
mov eax, dword [ecx + 0x128]
mov ebx, dword [ebp - 0x30]
mov dword [ebp - 0x14], eax
jmp 0x101399c9
mov dword [ebp - 0x28], eax
jmp 0x10139904
mov dword [ebp - 0x30], 0
cmp ebx, 1
mov dword [ebp - 0x38], 0
sete dl
jmp 0x10139904
mov dl, 1
mov al, 1
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x38], eax
cmp dword [ecx + 0x30], 0
mov byte [ebp - 0x21], dl
jne 0x1013993a
mov edi, dword [ecx + 0x3c]
push dword [0x101d4d30]
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
mov dword [ebp - 0x44], eax
je 0x101399db
lea eax, [edi + 0x1c]
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x20]
mov dword [edi + 8], eax
mov eax, dword [ecx]
mov edi, dword [ecx + 0x40]
mov ecx, dword [eax + 0x22]
call dword [section..00cfg]
lea eax, [ebp - 0x1c]
push eax
push ebx
push edi
call ecx
mov ecx, dword [ebp - 0x20]
add esp, 0xc
cmp dword [ecx + 0x30], 0
mov ebx, eax
jne 0x1013996c
push dword [ecx + 0x3c]
call sym.nss3.dll_PR_Unlock
mov ecx, dword [ebp - 0x20]
add esp, 4
mov dl, byte [ebp - 0x21]
test ebx, ebx
setne al
xor dl, 1
or dl, al
jne 0x101399a5
cmp dword [ecx + 0x124], 0
mov edi, dword [ebp - 0x2c]
mov ebx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x28]
jne 0x101399b2
mov eax, dword [ebp - 0x14]
mov dword [ecx + 0x128], eax
mov eax, dword [ebp - 0x28]
mov dword [ecx + 0x124], 1
jmp 0x101399b2
test ebx, ebx
mov edi, dword [ebp - 0x2c]
mov ebx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x28]
jne 0x10139a16
cmp byte [ebp - 0x38], 0
jne 0x101399c2
cmp dword [ebp - 0x1c], eax
ja 0x10139a16
cmp dword [ebp - 0x18], eax
jb 0x10139a16
test ebx, ebx
je 0x101399cf
mov eax, dword [ebp - 0x14]
and eax, ebx
cmp eax, ebx
jne 0x10139a16
inc esi
cmp esi, dword [ebp + 0x14]
jne 0x101397f6
jmp 0x101399f2
xor eax, eax
push eax
push eax
push 1
push eax
call fcn.100e2c70
add esp, 0x10
mov dword [ebp - 0x44], eax
jmp 0x10139927
cmp byte [ebp - 0x3c], 0
jne 0x10139a6e
mov eax, dword [edi + 8]
cmp dword [eax + 0x24], 0
je 0x10139a6e
push dword [ebp + 0x18]
push 1
push eax
call sym.nss3.dll_PK11_Authenticate
mov edi, dword [ebp - 0x2c]
add esp, 0xc
test eax, eax
je 0x10139a6e
push 1
push edi
mov ebx, dword [ebp - 0x34]
push ebx
call sym.nss3.dll_PK11_GetNextSafe
add esp, 0xc
test eax, eax
jne 0x101397d4
jmp 0x10139a3a
push dword [ebx + 8]
call sym.nss3.dll_PR_Unlock
add esp, 4
cmp byte [ebp - 0x40], 0
jne 0x10139a49
push ebx
call sym.nss3.dll_PK11_FreeSlotList
add esp, 4
call sym.nss3.dll_PR_GetCurrentThread
xor ebx, ebx
cmp dword [eax + 0x28], 0
jne 0x10139aee
push 0
push 0xffffe041
call sym.nss3.dll_PR_SetError
add esp, 8
jmp 0x10139aee
mov ebx, dword [edi + 8]
lock inc dword [ebx + 0x48]
mov eax, dword [ebp - 0x34]
mov esi, dword [eax + 8]
push dword [0x101d4d30]
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
mov dword [ebp - 0x20], eax
je 0x10139b18
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 [edi + 0xc]
lea eax, [esi - 1]
mov dword [edi + 0xc], eax
mov eax, dword [ebp - 0x34]
push dword [eax + 8]
call sym.nss3.dll_PR_Unlock
add esp, 4
cmp esi, 1
jne 0x10139add
mov eax, dword [edi + 8]
lock dec dword [eax + 0x48]
jne 0x10139ad3
push eax
call fcn.10135de0
mov edi, dword [ebp - 0x2c]
add esp, 4
push edi
call dword [sym.imp.mozglue.dll_free]
add esp, 4
cmp byte [ebp - 0x40], 0
jne 0x10139aee
push dword [ebp - 0x34]
call sym.nss3.dll_PK11_FreeSlotList
add esp, 4
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10192ef0
mov eax, ebx
add esp, 0x38
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 0x101397a8
xor eax, eax
push eax
push eax
push 1
push eax
call fcn.100e2c70
add esp, 0x10
mov dword [ebp - 0x20], eax
jmp 0x10139a92