Function at 0x1012a3b0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0xe8
mov eax, dword [0x101d2014]
xor ebx, ebx
xor eax, ebp
cmp dword [ebp + 8], 0
mov dword [ebp - 0x10], eax
mov byte [ebp - 0xc5], 1
mov byte [ebp - 0xc6], 0
mov dword [ebp - 0xcc], 3
je 0x1012a80d
cmp dword [ebp + 0x18], 0
je 0x1012a80d
mov eax, dword [ebp + 0x20]
test eax, eax
je 0x1012a80d
push eax
call sym.nss3.dll_PK11_MakeIDFromPubKey
add esp, 4
test eax, eax
mov dword [ebp - 0xe4], eax
je 0x1012a80d
xor ebx, ebx
lea eax, [ebp - 0xc5]
lea edx, [ebp - 0xc6]
lea ecx, [ebp - 0x88]
lea edi, [ebp + 0x2c]
inc ebx
cmp dword [ebp + 0x24], 0
mov esi, eax
mov dword [ecx - 0x3c], ebx
cmove esi, edx
cmp dword [ebp + 0x28], 0
mov dword [ecx - 0x38], esi
lea esi, [ebp - 0xcc]
mov dword [ecx - 0x34], ebx
mov dword [ecx - 0x30], 0
mov dword [ecx - 0x2c], esi
mov esi, 4
mov dword [ecx - 0x28], esi
mov dword [ecx - 0x24], 0x100
mov dword [ecx - 0x20], edi
mov dword [ecx - 0x1c], esi
mov esi, dword [ebp + 0x1c]
mov dword [ecx - 0x18], 2
cmovne edx, eax
mov dword [ecx - 0x14], edx
mov dword [ecx - 0x10], ebx
mov dword [ecx - 0xc], 0x103
mov dword [ecx - 8], edx
mov dword [ecx - 4], ebx
test esi, esi
je 0x1012a4a7
mov edx, dword [esi + 4]
test edx, edx
je 0x1012a4a7
lea ecx, [ebp - 0x7c]
mov dword [ecx - 0xc], 3
mov dword [ecx - 8], edx
mov edx, dword [esi + 8]
mov dword [ecx - 4], edx
mov esi, dword [ebp - 0xe4]
mov dword [ecx], 0x102
mov ebx, dword [ebp + 0x30]
lea edi, [ecx + 0xc]
mov edx, dword [esi + 4]
mov dword [ecx + 4], edx
mov edx, dword [esi + 8]
mov dword [ecx + 8], edx
mov edx, dword [ebp + 0x34]
test edx, edx
jle 0x1012a4e8
mov esi, dword [ebx]
add ebx, 4
mov dword [edi], esi
mov dword [edi + 4], eax
mov dword [edi + 8], 1
add edi, 0xc
dec edx
jne 0x1012a4cc
mov ecx, edi
add ecx, 0xfffffff4
mov ebx, dword [ebp + 8]
mov eax, dword [ebp + 0x14]
cmp dword [ebx + 0x14], 0
je 0x1012a50e
mov esi, dword [ebp + 0x20]
mov dword [edi], 0xd5a0db00
mov edx, dword [esi + 4]
mov dword [ecx + 0x10], edx
mov edx, dword [esi + 8]
mov dword [ecx + 0x14], edx
add ecx, 0x18
mov edi, ecx
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
xor esi, esi
test eax, eax
mov dword [ebp - 0xdc], ecx
jne 0x1012a53c
xor eax, eax
push eax
push eax
push dword [ebp + 0x10]
call fcn.10123c10
mov edx, dword [ebp + 0xc]
add esp, 0xc
test eax, eax
mov esi, eax
je 0x1012a824
mov ecx, dword [eax + 4]
mov dword [ebp - 0xd8], ecx
mov ecx, dword [eax + 8]
mov dword [ebp - 0xd4], ecx
mov dword [ebp - 0xf4], eax
cmp dword [edx + 8], ebx
je 0x1012a59c
xor eax, eax
push edx
push eax
push eax
push 0x107
push dword [ebp + 0x10]
push ebx
call fcn.10132150
add esp, 0x18
test eax, eax
mov dword [ebp - 0xe8], eax
jne 0x1012a5a6
mov dword [ebp - 0xe0], esi
push 1
push dword [ebp - 0xe4]
call sym.nss3.dll_SECITEM_FreeItem_Util
add esp, 8
mov edi, dword [ebp + 0x18]
mov esi, 0x54
jmp 0x1012a6fe
lock inc dword [edx + 0x2c]
mov dword [ebp - 0xe8], edx
cmp dword [ebp + 0x24], 0
je 0x1012a5c2
push ebx
call fcn.101363c0
add esp, 4
mov ecx, ebx
mov ebx, eax
test eax, eax
jne 0x1012a60e
jmp 0x1012a691
mov eax, ebx
mov ebx, dword [ebx + 0x38]
test ebx, ebx
je 0x1012a691
mov dword [ebp - 0xec], ebx
mov ebx, dword [eax + 0x3c]
push dword [0x101d4d30]
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
mov dword [ebp - 0xe0], eax
je 0x1012a839
lea eax, [ebx + 0x1c]
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov eax, dword [ebp - 0xe0]
mov ecx, dword [ebp + 8]
mov dword [ebx + 8], eax
mov ebx, dword [ebp - 0xec]
mov edx, dword [ecx]
mov dword [ebp - 0xe0], esi
mov esi, dword [ebp + 0x18]
lea eax, [ebp - 0xc4]
sub edi, eax
sar edi, 2
imul eax, edi, 0xaaaaaaab
mov ecx, dword [edx + 0xf6]
mov edx, dword [esi + 4]
mov esi, dword [esi + 8]
mov dword [ebp - 0xec], eax
mov dword [ebp - 0xf0], edx
mov edx, dword [ebp - 0xe8]
mov edi, dword [edx + 4]
call dword [section..00cfg]
lea eax, [ebp - 0xd0]
lea edx, [ebp - 0xdc]
push eax
push dword [ebp - 0xec]
lea eax, [ebp - 0xc4]
push eax
push esi
push dword [ebp - 0xf0]
push edi
push edx
push ebx
call ecx
add esp, 0x20
cmp dword [ebp + 0x24], 0
mov esi, eax
je 0x1012a6c7
push ebx
mov ebx, dword [ebp + 8]
push ebx
call fcn.101364f0
add esp, 8
jmp 0x1012a6d5
push 0
push 0xffffe002
call sym.nss3.dll_PR_SetError
add esp, 8
push dword [ebp - 0xe8]
call sym.nss3.dll_PK11_FreeSymKey
add esp, 4
xor edi, edi
inc edi
push edi
push dword [ebp - 0xe4]
call sym.nss3.dll_SECITEM_FreeItem_Util
add esp, 8
push edi
push esi
jmp 0x1012a7d9
mov ebx, dword [ebp + 8]
push dword [ebx + 0x3c]
call sym.nss3.dll_PR_Unlock
add esp, 4
push dword [ebp - 0xe8]
call sym.nss3.dll_PK11_FreeSymKey
add esp, 4
push 1
push dword [ebp - 0xe4]
call sym.nss3.dll_SECITEM_FreeItem_Util
add esp, 8
mov edi, dword [ebp + 0x18]
test esi, esi
je 0x1012a7e5
mov dword [ebp - 0xe4], esi
call sym.nss3.dll_PK11_GetInternalSlot
mov esi, eax
test eax, eax
je 0x1012a7a5
cmp esi, ebx
je 0x1012a7a5
xor eax, eax
push dword [ebp + 0x38]
push dword [ebp + 0x34]
push dword [ebp + 0x30]
push dword [ebp + 0x2c]
push eax
push eax
push dword [ebp + 0x20]
push dword [ebp + 0x1c]
push edi
push dword [ebp - 0xf4]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push esi
call sym.nss3.dll_PK11_UnwrapPrivKey
add esp, 0x34
test eax, eax
je 0x1012a7a5
mov edi, eax
xor eax, eax
cmp dword [ebp + 0x28], 0
mov edx, edi
sete al
xor ecx, ecx
cmp dword [ebp + 0x24], 0
sete cl
shl eax, 6
lea ecx, [ecx + ecx*4]
or eax, ecx
mov ecx, ebx
add eax, 0x45
push eax
push 0
call fcn.1010df00
add esp, 8
mov ebx, eax
push edi
call sym.nss3.dll_SECKEY_DestroyPrivateKey
add esp, 4
lock dec dword [esi + 0x48]
jne 0x1012a793
push esi
call fcn.10135de0
add esp, 4
push 1
push dword [ebp - 0xe0]
call sym.nss3.dll_SECITEM_FreeItem_Util
add esp, 8
jmp 0x1012a80d
test esi, esi
je 0x1012a7b8
lock dec dword [esi + 0x48]
jne 0x1012a7b8
push esi
call fcn.10135de0
add esp, 4
push dword [ebp - 0xe4]
call fcn.10115520
add esp, 4
push 0
push eax
call sym.nss3.dll_PR_SetError
add esp, 8
push 1
push dword [ebp - 0xe0]
call sym.nss3.dll_SECITEM_FreeItem_Util
add esp, 8
xor ebx, ebx
jmp 0x1012a80d
push 1
push dword [ebp - 0xe0]
call sym.nss3.dll_SECITEM_FreeItem_Util
add esp, 8
xor eax, eax
push dword [ebp + 0x38]
push dword [ebp - 0xd0]
push eax
push eax
push ebx
call fcn.1010d030
add esp, 0x14
mov ebx, eax
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10192ef0
mov eax, ebx
add esp, 0xe8
pop esi
pop edi
pop ebx
pop ebp
ret
xor ecx, ecx
xor esi, esi
xor eax, eax
mov dword [ebp - 0xd8], 0
jmp 0x1012a548
xor eax, eax
push eax
push eax
push 1
push eax
call fcn.100e2c70
add esp, 0x10
mov dword [ebp - 0xe0], eax
jmp 0x1012a5f2