Function at 0x10098440
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x38
mov esi, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov eax, dword [0x101f1014]
xor eax, ebp
mov dword [ebp - 0x10], eax
mov eax, dword [ecx + 0x14]
mov eax, dword [eax + 0x3c]
mov dword [ebp - 0x30], eax
test esi, esi
jne 0x1009846d
mov esi, dword [ecx + 0x24]
test esi, esi
je 0x100984a4
cmp dword [esi + 4], 0
je 0x100984a4
mov ecx, dword [ebp + 0x10]
mov eax, 0x101bcc0c
cmp ecx, 1
je 0x1009848d
and ecx, 0xfffffffe
mov eax, 0x101bcc04
cmp ecx, 2
jne 0x100984b8
lea edi, [ebp - 0x1c]
mov dword [edi - 0xc], 1
mov ecx, dword [eax]
mov eax, dword [eax + 4]
mov dword [edi - 8], ecx
mov dword [edi - 4], eax
jmp 0x100984bb
push 0
push 0xffffe041
call sym.nss3.dll_PR_SetError
add esp, 8
jmp 0x10098577
lea edi, [ebp - 0x28]
mov dword [edi], 0
mov dword [edi + 4], 0x101bcc00
mov dword [edi + 8], 4
call fcn.100941c0
test eax, eax
je 0x10098577
mov ebx, eax
mov dword [ebp - 0x38], esi
push 0x40
push eax
call fcn.10094240
add esp, 8
test eax, eax
je 0x1009856e
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x40], ebx
lea eax, [ebp - 0x28]
neg eax
add eax, edi
add eax, 0xc
sar eax, 2
imul edi, eax, 0xaaaaaaab
mov eax, dword [ebp - 0x38]
mov ebx, dword [eax]
test ebx, ebx
je 0x10098535
push dword [0x101f45d4]
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov esi, eax
test eax, eax
je 0x100986f2
lea eax, [ebx + 0x1c]
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov dword [ebx + 8], esi
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax + 0x6a]
mov eax, dword [ebp - 0x38]
mov ebx, dword [eax + 4]
call dword [section..00cfg]
push edi
lea eax, [ebp - 0x28]
push eax
push ebx
call ecx
add esp, 0xc
test eax, eax
mov eax, dword [ebp - 0x34]
je 0x1009858e
mov eax, dword [ebp - 0x38]
mov eax, dword [eax]
test eax, eax
mov ebx, dword [ebp - 0x40]
je 0x1009856e
push eax
call sym.nss3.dll_PR_Unlock
add esp, 4
push ebx
call fcn.100944c0
add esp, 4
xor esi, esi
dec esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10157a00
mov eax, esi
add esp, 0x38
pop esi
pop edi
pop ebx
pop ebp
ret
xor edx, edx
mov edi, 0x10
mov dword [ebp - 0x44], edx
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp - 0x30]
mov ecx, dword [ecx + 0x6e]
mov esi, edi
sub esi, edx
lea ebx, [eax + edx*4]
mov eax, dword [ebp - 0x38]
mov eax, dword [eax + 4]
mov dword [ebp - 0x3c], eax
call dword [section..00cfg]
lea eax, [ebp - 0x2c]
push eax
push esi
push ebx
push dword [ebp - 0x3c]
call ecx
mov ecx, dword [ebp - 0x44]
add esp, 0x10
test eax, eax
mov eax, dword [ebp - 0x34]
jne 0x10098559
mov edx, dword [ebp - 0x2c]
lea esi, [edx + ecx]
cmp esi, edi
jb 0x100985f6
lea ebx, [edi + edi]
shl edi, 3
push edi
push eax
call fcn.10094750
add esp, 8
mov edi, ebx
mov edx, esi
test eax, eax
jne 0x10098595
jmp 0x10098559
mov dword [ebp - 0x3c], edx
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax + 0x72]
mov ebx, dword [ebp - 0x38]
mov edi, dword [ebx + 4]
call dword [section..00cfg]
push edi
call ecx
add esp, 4
mov edi, eax
mov eax, dword [ebx]
test eax, eax
je 0x10098622
push eax
call sym.nss3.dll_PR_Unlock
add esp, 4
test edi, edi
mov ebx, dword [ebp - 0x40]
jne 0x1009856e
test esi, esi
je 0x100986e2
lea eax, [esi*4 + 4]
push eax
push 0
call fcn.10094240
add esp, 8
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0x30], eax
test eax, eax
je 0x100986e2
test esi, esi
mov edi, dword [ebp + 8]
jle 0x10098689
mov eax, dword [ebp - 0x3c]
add eax, dword [ebp - 0x44]
mov dword [ebp - 0x3c], eax
xor esi, esi
push dword [ecx + esi*4]
push dword [ebp - 0x38]
push edi
call fcn.10098770
add esp, 0xc
mov ecx, dword [ebp - 0x30]
mov dword [ecx + esi*4], eax
test eax, eax
je 0x100986bc
inc esi
cmp dword [ebp - 0x3c], esi
mov ecx, dword [ebp - 0x34]
jne 0x10098667
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax]
test ecx, ecx
mov esi, dword [ebp + 0x14]
je 0x100986d7
mov edi, dword [ebp - 0x30]
add edi, 4
mov dword [ebp - 0x34], ecx
mov ecx, esi
call dword [section..00cfg]
push dword [ebp + 0x18]
push dword [ebp - 0x34]
call esi
add esp, 8
mov ecx, dword [edi]
add edi, 4
test ecx, ecx
jne 0x1009869b
jmp 0x100986d7
cmp esi, 2
jb 0x100986d7
inc esi
mov eax, dword [ebp - 0x30]
push dword [eax + esi*4 - 8]
call fcn.10098840
add esp, 4
dec esi
cmp esi, 2
jg 0x100986c2
push dword [ebp - 0x30]
call fcn.10094350
add esp, 4
push ebx
call fcn.100944c0
add esp, 4
xor esi, esi
jmp 0x1009857a
sub esp, 0x10
movaps xmm0, xmmword [0x101b11e0]
movups xmmword [esp], xmm0
call fcn.1006e720
add esp, 0x10
mov esi, eax
jmp 0x10098528