Function at 0x301b8976
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push esi
push edi
mov edi, ecx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor ebx, ebx
push edi
mov dword [ebp - 4], eax
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push dword [0x3026b738]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, dword [edi + 0x20]
mov dword [ebp - 0x10], eax
lea eax, [esi - 8]
neg esi
sbb esi, esi
and esi, eax
je 0x301b8a15
mov eax, dword [esi + 8]
cmp eax, ebx
je 0x301b89c8
add eax, 0xfffffff8
mov dword [ebp - 8], eax
jmp 0x301b89cb
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 0x10]
cmp dword [esi + 0x10], eax
jne 0x301b8a0e
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 4]
mov ecx, esi
call fcn.301edf45
cmp dword [ebp - 0xc], ebx
je 0x301b8a0e
push esi
lea ecx, [edi + 0x20]
call fcn.301b8699
fldz
or dword [esi + 0x48], 1
fstp dword [esi + 0x18]
mov eax, dword [ebp - 4]
lea ecx, [edi + 0x1c]
mov dword [esi + 0x40], eax
push esi
mov dword [esi + 0x34], ecx
call fcn.301b86ef
mov esi, dword [ebp - 8]
cmp esi, ebx
jne 0x301b89b9
mov esi, dword [edi + 0x1c]
lea eax, [esi - 8]
neg esi
sbb esi, esi
and esi, eax
jmp 0x301b8ae8
mov eax, dword [esi + 8]
cmp eax, ebx
je 0x301b8a35
add eax, 0xfffffff8
mov dword [ebp - 8], eax
jmp 0x301b8a38
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 0x10]
cmp dword [esi + 0x10], eax
jne 0x301b8ae3
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 4]
mov ecx, esi
call fcn.301edf45
cmp dword [ebp - 0x14], ebx
je 0x301b8a71
xor ecx, ecx
lea eax, [esi + 4]
inc ecx
lock xadd dword [eax], ecx
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x24]
call fcn.301ebe05
cmp dword [ebp - 0xc], ebx
je 0x301b8ae3
push esi
lea ecx, [edi + 0x1c]
mov dword [esi + 0x34], ebx
call fcn.301b8699
mov ecx, esi
call fcn.301edffb
cmp dword [esi + 0x24], ebx
mov ecx, esi
jne 0x301b8a9b
or dword [esi + 0x48], 8
call fcn.3015eab5
jmp 0x301b8ae3
call fcn.301b8620
push ecx
fstp dword [esp]
call fcn.301b8602
movzx eax, al
cmp eax, ebx
mov dword [ebp - 0x18], eax
je 0x301b8abe
mov eax, dword [ebp - 4]
mov dword [esi + 0x40], eax
lea ebx, [edi + 0x1c]
jmp 0x301b8acc
push ebx
push dword [ebp - 4]
mov ecx, esi
call fcn.301b8663
lea ebx, [edi + 0x20]
push dword [ebp - 0x18]
mov ecx, esi
call fcn.301b8645
push esi
mov ecx, ebx
mov dword [esi + 0x34], ebx
call fcn.301b86ef
xor ebx, ebx
mov esi, dword [ebp - 8]
cmp esi, ebx
mov dword [ebp - 0x18], esi
jne 0x301b8a26
push dword [ebp - 4]
mov ecx, edi
call fcn.301b8799
mov esi, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push edi
mov dword [ebp - 8], eax
call esi
or byte [edi + 0x24], 4
push 1
lea eax, [ebp - 0x24]
push eax
call fcn.301b86b4
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebx, eax
sub ebx, dword [ebp - 4]
test byte [edi + 0x24], 2
je 0x301b8b42
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push dword [ebp - 4]
mov ecx, edi
call fcn.301b8799
push edi
mov dword [ebp - 8], eax
call esi
and byte [edi + 0x24], 0xfd
cmp ebx, dword [ebp - 8]
jae 0x301b8b4c
sub dword [ebp - 8], ebx
jmp 0x301b8b50
and dword [ebp - 8], 0
and byte [edi + 0x24], 0xfb
lea ecx, [ebp - 0x24]
call fcn.301ebd48
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret