Function at 0x6601302a
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x280
cmp dword [0x6610ed60], 1
push ebx
push esi
push edi
jne 0x6601304a
push 0x6610ed18
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp + 0xc]
xor ebx, ebx
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x10], ebx
mov eax, dword [eax + 4]
mov dword [ebp - 0x14], ebx
mov ecx, eax
mov dword [ebp - 0x1c], eax
call fcn.66013242
test eax, eax
je 0x66042ed9
lea eax, [ebp - 0x280]
push eax
lea eax, [ebp - 0x80]
push eax
push 0x20
call fcn.6601327c
push ebx
push eax
call fcn.660132f2
mov edi, dword [ebp - 0x1c]
mov esi, eax
pop ecx
cmp esi, ebx
pop ecx
jne 0x66042ef7
movzx eax, word [edi + 0x2a]
cmp dword [0x6610ee9c], ebx
mov dword [ebp - 0xc], eax
jne 0x66042f49
mov eax, dword [ebp - 0x20]
mov esi, dword [edi + 4]
mov ecx, dword [eax + 0x20]
cmp ecx, ebx
jne 0x66013235
cmp esi, ebx
je 0x660130cd
mov dword [esi + 0x220], 0x6601a968
mov dword [esi], 0x6601a958
mov dword [esi + 0x24c], eax
add eax, 0x24
push eax
lea eax, [esi + 0x10]
push eax
mov dword [esi + 4], 1
mov dword [esi + 0xc], edi
call fcn.6601333f
mov ax, word [edi + 0x2a]
pop ecx
pop ecx
push eax
mov ecx, esi
call fcn.6601336c
push esi
push dword [ebp + 8]
call fcn.6601348c
cmp eax, ebx
mov dword [ebp - 4], eax
jne 0x66042fd9
mov eax, dword [edi + 0x14]
mov ecx, dword [ebp + 8]
cmp dword [0x6610ed60], ebx
mov dword [ebp - 0x14], 1
mov dword [eax + 8], ecx
je 0x66013153
push dword [0x6610ee98]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, dword [eax + 0x18]
push 1
push esi
push dword [ebp + 8]
call fcn.660134e6
test eax, eax
mov dword [ebp - 0x10], eax
je 0x66042fd0
mov ecx, dword [ebx + 0x10]
mov dword [ebx + 0x10], eax
mov dword [eax], ecx
xor ebx, ebx
lea eax, [ebp - 0x18]
push eax
push edi
call fcn.660135e3
cmp eax, ebx
jl 0x66042fe3
cmp dword [0x6610ee9c], ebx
mov esi, dword [ebp - 0x18]
jne 0x66042fee
mov eax, dword [edi + 0x14]
cmp dword [ebp - 0xc], ebx
mov dword [eax + 0xc], esi
mov dword [ebp - 4], ebx
jbe 0x660131ff
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
add eax, dword [edi + 0x30]
mov eax, dword [eax]
mov esi, eax
inc esi
neg esi
sbb esi, esi
and esi, eax
mov ecx, esi
call fcn.660136ac
mov ecx, esi
mov dword [eax + 0x18], esi
call fcn.660136ac
mov ebx, dword [eax + 4]
cmp dword [0x6610ee9c], 0
mov dword [ebx + 8], esi
jne 0x66042ffa
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 4]
mov dword [eax], ebx
movzx eax, word [esi + 2]
mov ecx, dword [ecx + 0x30]
lea eax, [eax + eax*2]
shl eax, 4
mov eax, dword [ecx + eax + 8]
movzx eax, word [eax + 2]
mov dword [ebx + 0x1c], eax
mov eax, dword [esi + 0x18]
test byte [eax + 0x28], 2
jne 0x660131ee
push 0
push dword [ebp - 4]
push edi
call fcn.660136c8
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
add dword [ebp - 8], 0x30
cmp eax, dword [ebp - 0xc]
jb 0x66013185
xor ebx, ebx
mov eax, dword [edi + 4]
push ebx
push 0x660137bb
mov ecx, dword [eax + 0x24c]
call fcn.66013786
call fcn.660137c9
cmp dword [0x6610ed60], 1
jne 0x6601322c
push 0x6610ed18
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 8
mov edx, dword [0x6610c7b8]
mov dword [ecx], edx
jmp 0x660130b9
cmp dword [0x6610ed60], 1
jne 0x66042eed
push 0x6610ed18
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 0x9cfe
jmp 0x6601322e
call fcn.660137c9
push esi
call fcn.6600fcf2
mov dword [ebp - 4], eax
cmp dword [ebp - 0x14], ebx
je 0x66042f12
push dword [ebp + 8]
call fcn.66017803
push edi
call fcn.660174a5
cmp dword [0x6610ed60], ebx
je 0x66042f2d
cmp dword [ebp - 0x10], ebx
je 0x66042f2d
push dword [ebp + 8]
call fcn.66017748
cmp dword [0x6610ed60], 1
jne 0x66042f41
push 0x6610ed18
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 4]
jmp 0x6601322e
push dword [ebp + 8]
call fcn.66013add
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x660130a8
push dword [0x6610ee98]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, dword [eax + 0x18]
push ebx
push dword [ebp - 8]
push dword [ebp + 8]
call fcn.660134e6
mov ebx, eax
test ebx, ebx
mov dword [ebp - 0x10], ebx
jne 0x66042f8a
push 0x8007000e
call fcn.660dd7bf
mov eax, dword [esi + 0x10]
mov dword [esi + 0x10], ebx
mov dword [ebx], eax
xor esi, esi
xor ebx, ebx
cmp dword [ebp - 0xc], esi
jbe 0x66013213
mov eax, esi
add eax, dword [edi + 0x30]
mov ecx, dword [eax]
mov eax, ecx
inc eax
neg eax
sbb eax, eax
and eax, ecx
mov eax, dword [eax + 0x18]
test byte [eax + 0x28], 2
jne 0x66042fc1
push 0
push ebx
push edi
call fcn.660136c8
inc ebx
add esi, 0x30
cmp ebx, dword [ebp - 0xc]
jae 0x66013213
jmp 0x66042f9f
mov dword [ebp - 4], 7
xor ebx, ebx
call fcn.660137c9
jmp 0x66042f05
push eax
call fcn.6600fcf2
mov dword [ebp - 4], eax
jmp 0x66042fd9
mov ecx, edi
call fcn.660dcbd4
jmp 0x66013177
mov ecx, esi
call fcn.660dcbb6
jmp 0x660131bd