Function at 0x10145530
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x64
mov ebx, dword [ebp + 8]
mov eax, dword [0x101f1014]
xor eax, ebp
mov dword [ebp - 0x10], eax
push dword [0x101f45d4]
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
je 0x1014572a
cmp dword [ebx + 8], eax
jne 0x101456f2
mov dword [ebx + 8], 0
lea edx, [ebx + 0x1c]
cmp dword [ebx + 0x34], 0
jne 0x10145590
push edx
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
xor esi, esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10157a00
mov eax, esi
add esp, 0x64
pop esi
pop edi
pop ebx
pop ebp
ret
lea esi, [ebx + 0x34]
lea eax, [ebp - 0x60]
mov ecx, 0x14
mov edi, eax
rep movsd dword es:[edi], dword [esi]
xor ecx, ecx
mov dword [ebx + 0x34], ecx
mov dword [ebx + 0x80], ecx
cmp dword [eax], 0
jle 0x101455cc
xor ecx, ecx
lea edi, [ecx + ecx*2]
mov esi, dword [eax + edi*4 + 4]
mov ebx, dword [esi + 4]
test ebx, ebx
jne 0x10145612
mov dword [eax + edi*4 + 0xc], 0
inc ecx
cmp ecx, dword [eax]
jl 0x101455b1
mov eax, dword [eax + 0x4c]
test eax, eax
jne 0x101455aa
push edx
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
lea esi, [ebp - 0x60]
mov edi, esi
mov eax, dword [edi]
test eax, eax
jle 0x101455fb
xor ebx, ebx
lea ecx, [ebx + ebx*2]
mov ecx, dword [edi + ecx*4 + 0xc]
test ecx, ecx
jne 0x10145696
inc ebx
cmp ebx, eax
jl 0x101455e7
mov ebx, dword [edi + 0x4c]
cmp esi, edi
jne 0x10145745
mov edi, ebx
test ebx, ebx
je 0x1014557a
jmp 0x101455df
mov dword [ebp - 0x70], ebx
mov ebx, dword [eax + edi*4 + 8]
mov dword [ebp - 0x64], ebx
cmp dword [ebp - 0x64], 0xffffffff
je 0x101456fc
cmp dword [ebp - 0x64], 0
mov ebx, dword [ebp - 0x70]
mov dword [ebp - 0x6c], esi
jle 0x101456cd
mov esi, dword [ebp - 0x64]
mov dword [ebp - 0x68], esi
mov dword [ebx + 0x104], 0
mov ebx, dword [ebx + 0x13c]
mov esi, dword [ebp - 0x68]
dec esi
test ebx, ebx
mov dword [ebp - 0x64], esi
je 0x10145663
cmp dword [ebp - 0x68], 1
mov esi, dword [ebp - 0x64]
mov dword [ebp - 0x68], esi
ja 0x1014563c
mov esi, dword [ebp - 0x6c]
mov esi, dword [esi + 4]
mov dword [eax + edi*4 + 0xc], esi
mov esi, dword [ebp - 0x6c]
mov dword [esi + 4], ebx
test ebx, ebx
jne 0x101456d4
lea ebx, [esi + 8]
mov dword [ebx], 0
lea esi, [eax + edi*4]
add esi, 8
mov edi, dword [ebp - 0x64]
sub edi, dword [esi]
mov esi, dword [ebp - 0x6c]
add dword [esi + 0xc], edi
jmp 0x101455c7
mov eax, dword [ecx + 0x100]
mov edx, dword [ecx + 0x13c]
mov dword [ebp - 0x64], edx
xor edx, edx
mov dword [ecx + 0x13c], edx
mov dword [ecx + 0x138], edx
push edx
push 1
push eax
call dword [sym.imp.kernel32.dll_ReleaseSemaphore]
mov eax, dword [ebp - 0x64]
mov ecx, eax
test eax, eax
jne 0x10145696
mov eax, dword [edi]
jmp 0x101455f6
mov dword [eax + edi*4 + 0xc], ebx
mov dword [esi + 4], ebx
mov ebx, dword [ebx + 0x138]
test ebx, ebx
je 0x10145680
mov dword [ebx + 0x13c], 0
mov ebx, 0x138
add ebx, dword [esi + 4]
jmp 0x1014567a
mov esi, 0xffffffff
jmp 0x1014557c
mov ebx, dword [ebp - 0x70]
mov dword [ebx + 0x104], 0
mov ebx, dword [ebx + 0x13c]
test ebx, ebx
jne 0x101456ff
mov ebx, dword [esi + 4]
mov dword [eax + edi*4 + 0xc], ebx
xor edi, edi
mov dword [esi + 8], edi
mov dword [esi + 4], edi
mov dword [esi + 0xc], edi
jmp 0x101455c7
sub esp, 0x10
movaps xmm0, xmmword [0x101b11e0]
movups xmmword [esp], xmm0
call fcn.1006e720
add esp, 0x10
jmp 0x1014555a
push edi
call dword [sym.imp.mozglue.dll_free]
add esp, 4
jmp 0x10145606