Function at 0x10085060
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x68
mov ebx, dword [ebp + 8]
mov eax, dword [0x101f1014]
xor eax, ebp
mov dword [esp + 0x60], eax
xor eax, eax
dec eax
mov dword [esp + 8], eax
test ebx, ebx
je 0x100853f8
mov eax, dword [ebx + 0x17c]
test eax, eax
je 0x1008509d
cmp dword [eax + 0x14], 0
je 0x1008540f
mov edi, dword [0x101f5020]
push dword [0x101f45d4]
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov esi, eax
test eax, eax
je 0x10085443
lea eax, [edi + 0x1c]
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov dword [edi + 8], esi
mov esi, dword [ebx + 0x14c]
push dword [0x101f5020]
call sym.nss3.dll_PR_Unlock
add esp, 4
cmp dword [ebx + 0x17c], 0
je 0x10085111
test esi, esi
je 0x10085111
push ebx
call sym.nss3.dll_CERT_IsUserCert
add esp, 4
test eax, eax
je 0x10085111
mov dword [esp + 8], 0
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x100853f8
cmp dword [eax + 8], 0
je 0x100853f8
push ebx
call sym.nss3.dll_CERT_GetFirstEmailAddress
add esp, 4
test eax, eax
je 0x100853f0
mov esi, eax
mov edx, dword [ebp + 0x10]
lea eax, [ebx + 0x54]
mov dword [esp + 0x14], eax
test edx, edx
setne al
mov ecx, dword [ebp + 0xc]
test ecx, ecx
setne ah
cmove edx, ecx
xor edi, edi
and ah, al
cmove ecx, edi
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], edx
test edx, edx
setne al
mov byte [esp + 2], ah
and al, ah
mov byte [esp + 3], al
xor eax, eax
dec eax
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x30], eax
push ebx
call fcn.1009bef0
add esp, 4
test eax, eax
je 0x100853f8
mov edi, eax
mov ebx, dword [eax + 0x1c]
test ebx, ebx
mov dword [esp + 0x1c], esi
je 0x100851e9
mov eax, dword [ebx + 0x14]
mov dword [esp + 4], 0
test eax, eax
je 0x10085246
push edi
push eax
call fcn.1009efe0
add esp, 8
xor esi, esi
dec esi
test eax, eax
je 0x100852f0
mov ecx, dword [eax + 0x34]
mov edx, dword [ecx]
mov dword [esp + 0x48], edx
mov ecx, dword [ecx + 4]
mov dword [esp + 0x4c], ecx
mov ecx, dword [eax + 0x30]
mov edx, dword [ecx]
mov dword [esp + 0x3c], edx
mov ecx, dword [ecx + 4]
mov dword [esp + 0x40], ecx
lea ecx, [esp + 0x38]
mov dword [esp + 0x34], ecx
lea edx, [esp + 0x44]
mov dword [esp + 0x18], edx
mov dword [esp + 4], eax
jmp 0x10085210
lea eax, [esp + 0x34]
push eax
push dword [esp + 0x18]
push esi
lea eax, [esp + 0x3c]
push eax
call fcn.100bca90
add esp, 0x10
mov dword [esp + 0x18], eax
mov dword [esp + 4], 0
mov ecx, dword [esp + 0x34]
xor esi, esi
dec esi
mov eax, dword [esp + 0xc]
test eax, eax
je 0x10085292
xor esi, esi
dec esi
test ecx, ecx
je 0x10085292
cmp dword [ecx + 8], 0
je 0x1008524e
push ecx
lea eax, [esp + 0x5c]
push eax
call sym.nss3.dll_DER_UTCTimeToTime_Util
add esp, 8
mov esi, eax
mov eax, dword [esp + 0xc]
test esi, esi
jne 0x10085377
jmp 0x1008525e
xor esi, esi
dec esi
jmp 0x100852f0
mov dword [esp + 0x5c], closesocket
mov dword [esp + 0x58], 0
push eax
lea eax, [esp + 0x54]
push eax
call sym.nss3.dll_DER_UTCTimeToTime_Util
add esp, 8
mov esi, eax
test eax, eax
jne 0x10085377
mov eax, dword [esp + 0x58]
xor esi, esi
cmp eax, dword [esp + 0x50]
mov eax, dword [esp + 0x5c]
sbb eax, dword [esp + 0x54]
mov eax, dword [esp + 0xc]
jge 0x10085377
test ebx, ebx
je 0x1008535c
test eax, eax
mov edx, eax
setne al
cmp dword [esp + 4], 0
setne cl
and cl, al
and cl, byte [esp + 2]
cmp cl, 1
jne 0x100852f0
mov edi, dword [esp + 4]
mov ebx, dword [edi]
push dword [edx + 4]
push dword [edx + 8]
xor eax, eax
push eax
push ebx
call fcn.10094e70
add esp, 0x10
mov dword [edi + 0x30], eax
mov eax, dword [esp + 0x10]
push dword [eax + 4]
push dword [eax + 8]
xor eax, eax
push eax
push ebx
call fcn.10094e70
add esp, 0x10
mov dword [edi + 0x34], eax
mov ebx, dword [ebp + 8]
jmp 0x100853b5
cmp byte [esp + 3], 0
je 0x10085353
mov ecx, dword [esp + 0xc]
mov eax, dword [ecx + 4]
mov dword [esp + 0x28], eax
mov eax, dword [ecx + 8]
mov dword [esp + 0x2c], eax
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx + 4]
mov dword [esp + 0x20], eax
mov eax, dword [ecx + 8]
mov dword [esp + 0x24], eax
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x2c]
push eax
push edi
call fcn.1009a480
add esp, 0xc
mov edi, eax
test eax, eax
je 0x100853ae
mov eax, dword [ebx + 0x14]
xor esi, esi
dec esi
test eax, eax
je 0x100853ae
push edi
push eax
call fcn.1009eee0
add esp, 8
neg eax
mov esi, 0
sbb esi, esi
jmp 0x100853ae
mov ebx, dword [ebp + 8]
mov edi, dword [esp + 4]
jmp 0x100853b1
push eax
push dword [esp + 0x14]
push dword [esp + 0x1c]
push dword [esp + 0x28]
push dword [esp + 0x40]
call fcn.100bccc0
add esp, 0x14
mov esi, eax
test ebx, ebx
mov eax, dword [esp + 0x18]
jne 0x1008538e
test eax, eax
je 0x1008538e
push 1
push eax
call sym.nss3.dll_SECITEM_FreeItem_Util
add esp, 8
test ebx, ebx
mov edi, dword [esp + 4]
jne 0x100853ae
mov eax, dword [esp + 0x34]
test eax, eax
mov ebx, dword [ebp + 8]
je 0x100853b1
push 1
push eax
call sym.nss3.dll_SECITEM_FreeItem_Util
add esp, 8
jmp 0x100853b1
mov ebx, dword [ebp + 8]
test edi, edi
je 0x100853be
push edi
call fcn.1009cc00
add esp, 4
mov eax, dword [esp + 0x30]
test eax, eax
je 0x100853d5
lock dec dword [eax + 0x48]
jne 0x100853d5
push eax
call fcn.100cb320
add esp, 4
test esi, esi
jne 0x100853f8
push dword [esp + 0x1c]
push ebx
call sym.nss3.dll_CERT_GetNextEmailAddress
add esp, 8
mov esi, eax
test eax, eax
jne 0x10085163
mov dword [esp + 8], 0
mov ecx, dword [esp + 0x60]
xor ecx, ebp
call fcn.10157a00
mov eax, dword [esp + 8]
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
call sym.nss3.dll_PK11_GetInternalKeySlot
test eax, eax
je 0x100853f8
mov esi, eax
xor eax, eax
push eax
push eax
push eax
push ebx
push esi
call sym.nss3.dll_PK11_ImportCert
add esp, 0x14
mov edi, eax
lock dec dword [esi + 0x48]
jne 0x1008543a
push esi
call fcn.100cb320
add esp, 4
test edi, edi
jne 0x100853f8
jmp 0x1008509d
sub esp, 0x10
movaps xmm0, xmmword [0x101b11e0]
movups xmmword [esp], xmm0
call fcn.1006e720
add esp, 0x10
mov esi, eax
jmp 0x100850b9