Function at 0x10104140
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x10
mov edi, dword [ebp + 8]
mov eax, dword [edi]
mov esi, dword [eax + 0x14]
lock inc dword [esi + 8]
push esi
call fcn.10101400
add esp, 4
mov ebx, eax
push esi
call fcn.10101380
add esp, 4
xor esi, esi
dec esi
test ebx, ebx
je 0x1010420f
mov esi, dword [ebp + 0x14]
mov edi, dword [edi + 4]
push dword [0x101d4d30]
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov ebx, eax
test eax, eax
je 0x10104372
lea eax, [edi + 0x1c]
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
cmp esi, 0xce534351
mov dword [edi + 8], ebx
je 0x101041ba
mov edi, dword [ebp + 8]
cmp esi, 1
je 0x101041c4
cmp esi, 0xce534353
jne 0x10104201
xor ebx, ebx
inc ebx
jmp 0x101041c6
mov edi, dword [ebp + 8]
mov ebx, 2
jmp 0x101041c6
xor ebx, ebx
mov ecx, edi
mov edx, ebx
call fcn.10104390
test eax, eax
je 0x10104201
mov eax, dword [edi + ebx*4 + 0x24]
test eax, eax
je 0x10104201
mov ebx, dword [eax]
test ebx, ebx
je 0x10104201
mov ecx, dword [ebp + 0x10]
add eax, 4
mov edx, dword [ecx + 4]
mov esi, dword [ebx + 4]
cmp dword [esi + 4], edx
jne 0x101041f8
mov esi, dword [esi]
cmp esi, dword [ecx]
je 0x10104219
mov ebx, dword [eax]
add eax, 4
test ebx, ebx
jne 0x101041ea
push dword [edi + 4]
call sym.nss3.dll_PR_Unlock
add esp, 4
xor esi, esi
dec esi
mov eax, esi
add esp, 0x10
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x1010422e
push eax
call fcn.100ff5c0
add esp, 4
mov dword [ebp - 0x18], eax
jmp 0x10104235
mov dword [ebp - 0x18], 0
mov edx, dword [ebp + 0x1c]
test edx, edx
je 0x1010431d
mov dword [ebp - 0x14], 0
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x101042fb
mov ecx, dword [ebp - 0x14]
xor edi, edi
lea esi, [ecx + ecx*2]
mov ecx, dword [ebp + 0x18]
mov dword [ebp - 0x10], esi
mov ecx, dword [ecx + esi*4]
mov esi, dword [ebx + 8]
add esi, 8
cmp ecx, dword [esi - 8]
je 0x1010427b
inc edi
add esi, 0xc
cmp eax, edi
jne 0x10104269
jmp 0x101042fb
mov ecx, dword [esi]
lea edx, [ecx + 1]
cmp edx, 2
jb 0x101042f4
mov edx, dword [ebp + 0x18]
mov eax, dword [ebp - 0x10]
mov eax, dword [edx + eax*4 + 8]
test eax, eax
je 0x101042ab
cmp eax, ecx
jb 0x1010434a
mov eax, dword [ebp - 0x10]
mov eax, dword [edx + eax*4 + 4]
test eax, eax
jne 0x101042cb
jmp 0x1010434a
push ecx
push dword [ebp + 0xc]
call fcn.100ff2b0
mov edx, dword [ebp + 0x18]
add esp, 8
mov ecx, dword [ebp - 0x10]
test eax, eax
mov dword [edx + ecx*4 + 4], eax
je 0x1010434a
mov ecx, dword [esi]
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebp + 0x18]
lea edx, [ecx + edx*4 + 8]
mov dword [ebp - 0x10], edx
push dword [ebp - 0x1c]
push dword [esi - 4]
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov eax, dword [esi]
mov ecx, dword [ebp - 0x10]
mov dword [ecx], eax
mov eax, dword [ebx + 0xc]
mov edx, dword [ebp + 0x1c]
cmp eax, edi
jne 0x1010430c
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp + 0x18]
lea eax, [eax + eax*2]
mov dword [ecx + eax*4 + 8], 0xffffffff
mov ecx, dword [ebp - 0x14]
inc ecx
cmp ecx, edx
mov eax, ecx
mov dword [ebp - 0x14], ecx
jne 0x10104247
mov eax, dword [ebp + 8]
push dword [eax + 4]
call sym.nss3.dll_PR_Unlock
add esp, 4
mov edx, dword [ebp - 0x18]
xor esi, esi
test edx, edx
je 0x1010420f
mov ecx, dword [ebp + 0xc]
push 0
call fcn.100ff690
add esp, 4
jmp 0x1010420f
mov eax, dword [ebp + 8]
push dword [eax + 4]
call sym.nss3.dll_PR_Unlock
add esp, 4
mov edx, dword [ebp - 0x18]
test edx, edx
je 0x1010420c
mov ecx, dword [ebp + 0xc]
push 1
call fcn.100ff690
jmp 0x10104209
xor eax, eax
push eax
push eax
push 1
push eax
call fcn.100e2c70
add esp, 0x10
mov ebx, eax
jmp 0x10104190