Function at 0x1007ebb0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x18
mov ebx, dword [ebp + 8]
push dword [0x101de1f0]
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov esi, eax
test eax, eax
je 0x1007ed71
lea eax, [ebx + 0x20]
mov dword [ebp - 0x24], eax
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov dword [ebx + 0xc], esi
mov eax, dword [ebx + 0x88]
mov dword [ebp - 0x20], eax
mov eax, dword [ebx + 0x194]
mov dword [ebp - 0x1c], eax
xor eax, eax
mov dword [ebx + 0x194], eax
mov dword [ebx + 0x88], eax
mov esi, dword [ebx + 0x198]
test esi, esi
jne 0x1007edfc
lea esi, [ebx + 0x8c]
push dword [0x101de1f0]
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
je 0x1007ed8e
mov dword [ebp - 0x14], esi
mov esi, dword [esi]
cmp dword [esi + 8], eax
jne 0x1007ec5c
lea edx, [ebx + 0x100]
mov ecx, dword [esi + 0x34]
add esi, 0x34
xor edi, edi
test ecx, ecx
jg 0x1007ed31
lea eax, [edi + edi*2]
mov dword [esi + eax*4 + 8], 1
mov dword [esi + eax*4 + 4], edx
inc ecx
mov dword [esi], ecx
lea esi, [ebx + 0x110]
push dword [0x101de1f0]
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov edi, eax
test eax, eax
je 0x1007eda9
mov ebx, dword [esi]
cmp dword [ebx + 8], edi
jne 0x1007ecd6
mov ecx, esi
mov esi, 0x1002
mov eax, dword [edi + 0xe0]
and eax, esi
cmp eax, 2
je 0x1007ede1
mov eax, dword [ebp + 0xc]
mov dword [edi + 0xd8], ecx
xor ecx, ecx
mov dword [ebx + 8], ecx
lea ecx, [ebx + 0x1c]
mov edx, dword [ebp + 8]
add edx, 0x184
push eax
push ecx
push edx
call sym.nss3.dll__PR_MD_WAIT_CV
add esp, 0xc
xor eax, eax
mov dword [edi + 0xd8], eax
mov dword [ebx + 8], edi
and esi, dword [edi + 0xe0]
cmp esi, 2
je 0x1007ede1
mov esi, dword [ebp + 8]
cmp dword [esi + 0x194], 0
jne 0x1007ee3e
mov eax, dword [ebp - 0x1c]
mov dword [esi + 0x194], eax
mov eax, dword [ebp - 0x20]
mov dword [esi + 0x88], eax
push dword [0x101de1f0]
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
je 0x1007edc6
cmp dword [esi + 0xc], eax
jne 0x1007ee66
mov dword [esi + 0xc], 0
push dword [ebp - 0x24]
call sym.nss3.dll__PR_MD_UNLOCK
add esp, 4
xor eax, eax
add esp, 0x18
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [ebp - 0x10], edx
xor edx, edx
inc edx
mov eax, esi
mov esi, eax
test ecx, ecx
mov ebx, edx
cmovg ebx, ecx
lea edx, [eax + 8]
mov dword [ebp - 0x18], ebx
mov eax, dword [ebp - 0x10]
cmp dword [edx - 4], eax
je 0x1007ee93
add edx, 0xc
dec ebx
jne 0x1007ed48
cmp ecx, 6
jge 0x1007eea9
mov edi, dword [ebp - 0x18]
mov ebx, dword [ebp + 8]
mov edx, dword [ebp - 0x10]
jmp 0x1007ec4a
sub esp, 0x10
movaps xmm0, xmmword [0x1019c190]
movups xmmword [esp], xmm0
call fcn.10072140
add esp, 0x10
mov esi, eax
jmp 0x1007ebd2
sub esp, 0x10
movaps xmm0, xmmword [0x1019c190]
movups xmmword [esp], xmm0
call fcn.10072140
add esp, 0x10
jmp 0x1007ec2a
sub esp, 0x10
movaps xmm0, xmmword [0x1019c190]
movups xmmword [esp], xmm0
call fcn.10072140
add esp, 0x10
mov edi, eax
jmp 0x1007ec78
sub esp, 0x10
movaps xmm0, xmmword [0x1019c190]
movups xmmword [esp], xmm0
call fcn.10072140
add esp, 0x10
jmp 0x1007ed0c
push 0
push 0xffffe897
call sym.nss3.dll_PR_SetError
add esp, 8
and byte [edi + 0xe0], 0xfd
jmp 0x1007ecd6
cmp esi, 0xffffffff
je 0x1007ee6e
test esi, esi
jle 0x1007ee2f
lea edi, [ebx + 0x184]
inc esi
call fcn.1014c8b0
mov ecx, dword [ebx + 0x110]
cmp dword [ecx + 8], eax
jne 0x1007ee29
add ecx, 0x1c
push ecx
push edi
call sym.nss3.dll__PR_MD_NOTIFY_CV
add esp, 8
dec esi
cmp esi, 1
jg 0x1007ee0c
mov dword [ebx + 0x198], 0
jmp 0x1007ec10
call fcn.1014c8b0
mov ecx, dword [ebp - 0x14]
mov esi, dword [ecx]
cmp dword [esi + 8], eax
jne 0x1007ecd6
mov ecx, eax
mov edx, dword [ebp - 0x14]
push 0xffffffffffffffff
push esi
call fcn.1014f2d0
add esp, 8
jmp 0x1007ecd6
xor eax, eax
dec eax
jmp 0x1007ed29
call fcn.1014c8b0
mov ecx, dword [ebx + 0x110]
cmp dword [ecx + 8], eax
jne 0x1007ee2f
add ecx, 0x1c
lea eax, [ebx + 0x184]
push ecx
push eax
call sym.nss3.dll__PR_MD_NOTIFYALL_CV
add esp, 8
jmp 0x1007ee2f
mov eax, dword [edx]
cmp eax, 0xffffffff
mov ebx, dword [ebp + 8]
je 0x1007ec5c
inc eax
mov dword [edx], eax
jmp 0x1007ec5c
mov eax, dword [esi + 0x4c]
test eax, eax
jne 0x1007eec0
push 0x50
push 1
call dword [sym.imp.mozglue.dll_calloc]
add esp, 8
mov dword [esi + 0x4c], eax
mov ecx, dword [eax]
test ecx, ecx
mov edx, 1
jg 0x1007ed39
mov esi, eax
jmp 0x1007ed66