Function at 0x10129b90
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 [0x101ef014]
xor eax, ebp
mov dword [ebp - 0x10], eax
push dword [0x101f25a4]
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
je 0x10129d83
cmp dword [ebx + 8], eax
jne 0x10129d4b
mov dword [ebx + 8], 0
lea edx, [ebx + 0x1c]
cmp dword [ebx + 0x34], 0
jne 0x10129bf0
push edx
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
xor esi, esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10156ff0
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 0x10129c30
xor ecx, ecx
lea edi, [ecx + ecx*2]
mov esi, dword [eax + edi*4 + 4]
mov ebx, dword [esi + 4]
test ebx, ebx
jne 0x10129ca6
mov dword [eax + edi*4 + 0xc], 0
inc ecx
cmp ecx, dword [eax]
jl 0x10129c11
mov eax, dword [eax + 0x4c]
test eax, eax
jne 0x10129c0a
push edx
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
lea esi, [ebp - 0x60]
mov edi, esi
mov eax, dword [edi]
test eax, eax
jle 0x10129c5b
xor ebx, ebx
lea ecx, [ebx + ebx*2]
mov ecx, dword [edi + ecx*4 + 0xc]
test ecx, ecx
jne 0x10129c72
inc ebx
cmp ebx, eax
jl 0x10129c4b
mov ebx, dword [edi + 0x4c]
cmp esi, edi
jne 0x10129d9e
mov edi, ebx
test ebx, ebx
je 0x10129bda
jmp 0x10129c43
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 0x10129c72
mov eax, dword [edi]
jmp 0x10129c56
mov dword [ebp - 0x70], ebx
mov ebx, dword [eax + edi*4 + 8]
mov dword [ebp - 0x64], ebx
cmp dword [ebp - 0x64], 0xffffffff
je 0x10129d55
cmp dword [ebp - 0x64], 0
mov ebx, dword [ebp - 0x70]
mov dword [ebp - 0x6c], esi
jle 0x10129d26
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 0x10129cf3
cmp dword [ebp - 0x68], 1
mov esi, dword [ebp - 0x64]
mov dword [ebp - 0x68], esi
ja 0x10129ccc
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 0x10129d2d
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 0x10129c2b
mov dword [eax + edi*4 + 0xc], ebx
mov dword [esi + 4], ebx
mov ebx, dword [ebx + 0x138]
test ebx, ebx
je 0x10129d10
mov dword [ebx + 0x13c], 0
mov ebx, 0x138
add ebx, dword [esi + 4]
jmp 0x10129d0a
mov esi, 0xffffffff
jmp 0x10129bdc
mov ebx, dword [ebp - 0x70]
mov dword [ebx + 0x104], 0
mov ebx, dword [ebx + 0x13c]
test ebx, ebx
jne 0x10129d58
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 0x10129c2b
sub esp, 0x10
movaps xmm0, xmmword [0x101af1a0]
movups xmmword [esp], xmm0
call fcn.1006d800
add esp, 0x10
jmp 0x10129bba
push edi
call dword [sym.imp.mozglue.dll_free]
add esp, 4
jmp 0x10129c66