Function at 0x1012f600
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x60
mov ebx, dword [ebp + 8]
mov eax, dword [0x101db014]
xor eax, ebp
mov dword [ebp - 0x10], eax
push dword [0x101de1f0]
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
je 0x1012f807
cmp dword [ebx + 8], eax
jne 0x1012f79e
mov dword [ebx + 8], 0
lea edx, [ebx + 0x1c]
cmp dword [ebx + 0x34], 0
jne 0x1012f660
push edx
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
xor esi, esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1014dc80
mov eax, esi
add esp, 0x60
pop esi
pop edi
pop ebx
pop ebp
ret
lea eax, [ebp - 0x60]
lea esi, [ebx + 0x34]
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 0x1012f6a0
xor ecx, ecx
lea edi, [ecx + ecx*2]
mov esi, dword [eax + edi*4 + 4]
mov ebx, dword [esi + 4]
test ebx, ebx
jne 0x1012f71d
mov dword [eax + edi*4 + 0xc], 0
inc ecx
cmp ecx, dword [eax]
jl 0x1012f681
mov eax, dword [eax + 0x4c]
test eax, eax
jne 0x1012f67a
lea esi, [ebp - 0x60]
push edx
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov edx, esi
mov ebx, esi
mov edi, esi
mov eax, dword [edi]
test eax, eax
jle 0x1012f6cf
xor esi, esi
lea ecx, [esi + esi*2]
mov ecx, dword [ebx + ecx*4 + 0xc]
test ecx, ecx
jne 0x1012f6e6
inc esi
cmp esi, eax
jl 0x1012f6bf
mov edi, dword [ebx + 0x4c]
cmp edx, ebx
jne 0x1012f822
mov ebx, edi
test edi, edi
je 0x1012f64a
jmp 0x1012f6b7
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 0x1012f6e6
mov eax, dword [edi]
lea edx, [ebp - 0x60]
jmp 0x1012f6ca
mov dword [ebp - 0x68], ebx
mov ebx, dword [eax + edi*4 + 8]
mov dword [ebp - 0x64], ebx
cmp dword [ebp - 0x64], 0xffffffff
mov dword [ebp - 0x6c], esi
je 0x1012f7d3
cmp dword [ebp - 0x64], 0
jle 0x1012f7a8
mov esi, dword [ebp - 0x64]
mov ebx, dword [ebp - 0x68]
mov dword [ebp - 0x64], esi
mov dword [ebx + 0x104], 0
mov ebx, dword [ebx + 0x13c]
mov esi, dword [ebp - 0x64]
dec esi
cmp dword [ebp - 0x64], 2
jl 0x1012f761
test ebx, ebx
jne 0x1012f740
mov dword [ebp - 0x64], esi
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
mov dword [ebp - 0x68], ebx
test ebx, ebx
jne 0x1012f835
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 0x1012f69b
mov esi, 0xffffffff
jmp 0x1012f64c
mov ebx, dword [ebp - 0x68]
mov dword [eax + edi*4 + 0xc], ebx
mov dword [esi + 4], ebx
mov ebx, dword [ebx + 0x138]
test ebx, ebx
je 0x1012f788
mov dword [ebx + 0x13c], 0
mov ebx, 0x138
mov esi, dword [ebp - 0x6c]
add ebx, dword [esi + 4]
jmp 0x1012f782
mov esi, dword [ebp - 0x68]
mov dword [esi + 0x104], 0
mov esi, dword [esi + 0x13c]
mov dword [ebp - 0x68], esi
test esi, esi
jne 0x1012f7d3
mov esi, dword [ebp - 0x6c]
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 0x1012f69b
sub esp, 0x10
movaps xmm0, xmmword [0x1019c190]
movups xmmword [esp], xmm0
call fcn.10072140
add esp, 0x10
jmp 0x1012f62a
push ebx
mov esi, edx
call dword [sym.imp.mozglue.dll_free]
mov edx, esi
add esp, 4
jmp 0x1012f6da
mov ebx, dword [ebp - 0x68]
jmp 0x1012f7b2