Function at 0x1013b480
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0xc
cmp dword [0x101d5b48], 0
mov dword [ebp - 0x18], edx
je 0x1013b5cd
mov ebx, dword [ecx + 0x20]
mov esi, ecx
push dword [0x101d4d30]
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov edi, eax
test eax, eax
je 0x1013b6c6
lea eax, [ebx + 0x1c]
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov dword [ebx + 8], edi
mov eax, dword [esi + 0x68]
test al, 1
jne 0x1013b5d6
or eax, 2
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x14], esi
mov dword [esi + 0x68], eax
push dword [esi + 0x20]
call sym.nss3.dll_PR_Unlock
add esp, 4
push esi
call sym.nss3.dll_SECMOD_UpdateSlotList
add esp, 4
push dword [0x101d5b48]
call fcn.1013e010
add esp, 4
mov eax, dword [esi + 0x2c]
test eax, eax
jle 0x1013b550
mov edx, dword [ebp - 0x10]
xor edi, edi
mov ecx, dword [esi + 0x28]
mov ebx, dword [ecx + edi*4]
cmp dword [ebx + 0xc], 0
jne 0x1013b549
movzx esi, word [ebx + 0x80]
xor edx, edx
mov ecx, ebx
inc edx
call fcn.10138680
cmp word [ebx + 0x82], si
jne 0x1013b5fa
cmp dword [ebx + 0x84], eax
jne 0x1013b5fa
mov esi, dword [ebp - 0x14]
xor edx, edx
inc edx
mov eax, dword [esi + 0x2c]
inc edi
cmp edi, eax
jl 0x1013b50a
jmp 0x1013b553
mov edx, dword [ebp - 0x10]
mov dword [ebp - 0x10], edx
push dword [0x101d5b48]
call fcn.1013e0d0
add esp, 4
cmp dword [ebp - 0x10], 0
jne 0x1013b574
cmp dword [esi + 0x2c], 0
jne 0x1013b664
test byte [ebp - 0x18], 1
jne 0x1013b67c
push dword [ebp + 8]
call sym.nss3.dll_PR_Sleep
add esp, 4
mov edi, dword [esi + 0x20]
push dword [0x101d4d30]
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov ebx, eax
test eax, eax
je 0x1013b5ba
lea eax, [edi + 0x1c]
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov dword [edi + 8], ebx
test byte [esi + 0x68], 2
jne 0x1013b4dc
jmp 0x1013b6aa
xor eax, eax
push eax
push eax
push 1
push eax
call fcn.100e2c70
add esp, 0x10
mov ebx, eax
jmp 0x1013b59e
push 0
push 0xffffe09a
jmp 0x1013b5ee
and eax, 0xfffffffe
mov dword [esi + 0x68], eax
push dword [esi + 0x20]
call sym.nss3.dll_PR_Unlock
add esp, 4
push 0
push 0xffffe098
call sym.nss3.dll_PR_SetError
add esp, 8
xor ebx, ebx
jmp 0x1013b65a
mov dword [ebx + 0x84], eax
mov word [ebx + 0x82], si
push dword [0x101d5b48]
call fcn.1013e0d0
add esp, 4
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x20]
mov dword [ebp - 0x10], eax
push dword [0x101d4d30]
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov edi, eax
test eax, eax
je 0x1013b6dc
mov esi, dword [ebp - 0x10]
lea eax, [esi + 0x1c]
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov eax, dword [ebp - 0x14]
mov dword [esi + 8], edi
and byte [eax + 0x68], 0xfe
push dword [eax + 0x20]
call sym.nss3.dll_PR_Unlock
add esp, 4
lock inc dword [ebx + 0x48]
mov eax, ebx
add esp, 0xc
pop esi
pop edi
pop ebx
pop ebp
ret
mov ebx, dword [esi + 0x20]
push dword [0x101d4d30]
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov dword [ebp - 0x10], 0xffffe043
jmp 0x1013b692
mov ebx, dword [esi + 0x20]
push dword [0x101d4d30]
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov dword [ebp - 0x10], 0xffffe098
test eax, eax
je 0x1013b6f2
mov edi, eax
lea eax, [ebx + 0x1c]
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov dword [ebx + 8], edi
mov edi, dword [ebp - 0x10]
jmp 0x1013b6af
mov edi, 0xffffe098
and byte [esi + 0x68], 0xfe
push dword [esi + 0x20]
call sym.nss3.dll_PR_Unlock
add esp, 4
push 0
push edi
jmp 0x1013b5ee
xor eax, eax
push eax
push eax
push 1
push eax
call fcn.100e2c70
add esp, 0x10
mov edi, eax
jmp 0x1013b4b4
xor eax, eax
push eax
push eax
push 1
push eax
call fcn.100e2c70
add esp, 0x10
mov edi, eax
jmp 0x1013b634
xor eax, eax
push eax
push eax
push 1
push eax
call fcn.100e2c70
add esp, 0x10
jmp 0x1013b696