Function at 0x10128540
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x28
mov eax, dword [0x101d2014]
mov ebx, dword [ebp + 8]
xor ecx, ecx
xor eax, ebp
mov dword [ebp - 0x10], eax
mov esi, dword [ebx + 8]
mov eax, dword [ebx + 0xc]
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x24], ecx
mov edx, dword [ebx + 4]
lea ecx, [edx - 1]
cmp ecx, 5
ja 0x10128578
mov ecx, dword [edx*4 + 0x101a157c]
jmp 0x1012857b
xor ecx, ecx
dec ecx
test esi, esi
mov dword [ebp - 0x28], ecx
je 0x10128588
lock inc dword [esi + 0x48]
jmp 0x101285c6
mov eax, dword [ebp + 0x14]
lea edx, [ebp - 0x14]
lea esi, [ebp - 0x18]
lea edi, [ebp - 0x1c]
mov dword [edx], 0
mov dword [esi], 0x4000
mov dword [edi], ecx
push eax
push 1
push edx
push esi
push edi
call fcn.101396c0
add esp, 0x14
test eax, eax
je 0x1012881f
mov esi, eax
push 0
push ebx
push eax
call sym.nss3.dll_PK11_ImportPublicKey
add esp, 0xc
test eax, eax
je 0x10128627
cmp dword [esi + 0x30], 0
mov dword [ebp - 0x2c], eax
jne 0x101285f9
mov edi, dword [esi + 0x3c]
push dword [0x101d4d30]
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov ebx, eax
test eax, eax
je 0x1012885f
lea eax, [edi + 0x1c]
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov dword [edi + 8], ebx
mov eax, dword [esi]
mov edi, dword [esi + 0x40]
mov ecx, dword [eax + 0x32]
call dword [section..00cfg]
lea eax, [ebp - 0x14]
push eax
push sym.nss3.dll_PR_DuplicateEnvironment
push esi
push 4
push edi
call ecx
add esp, 0x14
test eax, eax
je 0x10128642
mov eax, dword [esi + 0x38]
mov dword [ebp - 0x14], eax
mov al, 1
jmp 0x10128644
lock dec dword [esi + 0x48]
jne 0x10128636
push esi
call fcn.10135de0
add esp, 4
push 0
push 0xffffe00e
jmp 0x10128826
xor eax, eax
cmp dword [esi + 0x30], 0
jne 0x10128659
push dword [esi + 0x3c]
mov edi, eax
call sym.nss3.dll_PR_Unlock
mov eax, edi
add esp, 4
mov ebx, dword [ebp - 0x14]
test al, al
mov dword [ebp - 0x30], eax
jne 0x10128669
cmp dword [esi + 0x30], 0
jne 0x10128695
mov edi, dword [esi + 0x3c]
mov dword [ebp - 0x34], ebx
push dword [0x101d4d30]
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov ebx, eax
test eax, eax
je 0x10128849
lea eax, [edi + 0x1c]
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov dword [edi + 8], ebx
mov ebx, dword [ebp - 0x34]
mov eax, dword [esi]
mov ecx, dword [eax + 0xd2]
call dword [section..00cfg]
lea eax, [ebp - 0x28]
push dword [ebp - 0x2c]
push eax
push ebx
call ecx
add esp, 0xc
test eax, eax
je 0x10128738
cmp byte [ebp - 0x30], 0
mov edi, eax
jne 0x10128728
cmp dword [esi + 0x30], 0
jne 0x1012870d
push dword [esi + 0x3c]
call sym.nss3.dll_PR_Unlock
add esp, 4
cmp dword [esi + 0x30], 0
jne 0x1012870d
mov eax, dword [esi + 0x3c]
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], eax
push dword [0x101d4d30]
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
mov dword [ebp - 0x2c], eax
je 0x10128875
mov ebx, dword [ebp - 0x30]
lea eax, [ebx + 0x1c]
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov eax, dword [ebp - 0x2c]
mov dword [ebx + 8], eax
mov ebx, dword [ebp - 0x34]
mov eax, dword [esi]
mov ecx, dword [eax + 0x36]
call dword [section..00cfg]
push ebx
call ecx
add esp, 4
cmp dword [esi + 0x30], 0
jne 0x101287f7
push dword [esi + 0x3c]
call sym.nss3.dll_PR_Unlock
add esp, 4
jmp 0x101287f7
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
mov ecx, dword [edx + 8]
mov dword [ebp - 0x14], ecx
mov ecx, dword [esi]
mov edi, dword [eax + 4]
mov edx, dword [edx + 4]
mov ecx, dword [ecx + 0xd6]
mov dword [ebp - 0x2c], edi
mov edi, ebx
mov ebx, dword [eax + 8]
mov dword [ebp - 0x34], edx
call dword [section..00cfg]
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x34]
push ebx
mov ebx, edi
push dword [ebp - 0x2c]
push edi
call ecx
add esp, 0x14
cmp byte [ebp - 0x30], 0
mov edi, eax
jne 0x101287df
cmp dword [esi + 0x30], 0
jne 0x101287c8
push dword [esi + 0x3c]
call sym.nss3.dll_PR_Unlock
add esp, 4
cmp dword [esi + 0x30], 0
jne 0x101287c8
mov eax, dword [esi + 0x3c]
mov dword [ebp - 0x2c], eax
push dword [0x101d4d30]
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
mov dword [ebp - 0x30], eax
je 0x1012888c
mov eax, dword [ebp - 0x2c]
add eax, 0x1c
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x2c]
mov dword [ecx + 8], eax
mov eax, dword [esi]
mov ecx, dword [eax + 0x36]
call dword [section..00cfg]
push ebx
call ecx
add esp, 4
cmp dword [esi + 0x30], 0
jne 0x101287ea
push dword [esi + 0x3c]
call sym.nss3.dll_PR_Unlock
add esp, 4
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp + 0x10]
test edi, edi
mov dword [ecx + 8], eax
je 0x10128845
push edi
call fcn.10115520
add esp, 4
push 0
push eax
call sym.nss3.dll_PR_SetError
add esp, 8
xor edi, edi
dec edi
lock dec dword [esi + 0x48]
jne 0x10128831
push esi
call fcn.10135de0
add esp, 4
jmp 0x10128831
push 0
push 0xffffe040
call sym.nss3.dll_PR_SetError
add esp, 8
xor edi, edi
dec edi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10192ef0
mov eax, edi
add esp, 0x28
pop esi
pop edi
pop ebx
pop ebp
ret
xor edi, edi
jmp 0x1012880e
xor eax, eax
push eax
push eax
push 1
push eax
call fcn.100e2c70
add esp, 0x10
mov ebx, eax
jmp 0x10128685
xor eax, eax
push eax
push eax
push 1
push eax
call fcn.100e2c70
add esp, 0x10
mov ebx, eax
jmp 0x101285ec
xor eax, eax
push eax
push eax
push 1
push eax
call fcn.100e2c70
add esp, 0x10
mov dword [ebp - 0x2c], eax
jmp 0x101286f7
xor eax, eax
push eax
push eax
push 1
push eax
call fcn.100e2c70
add esp, 0x10
mov dword [ebp - 0x30], eax
jmp 0x101287b2