Function at 0x1008a490
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x2c
mov esi, ecx
mov edi, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0xc]
mov eax, dword [0x101b9014]
xor eax, ebp
mov dword [ebp - 0x10], eax
cmp byte [ecx], 0
je 0x1008a4d9
push dword [0x101bac5c]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
and eax, 0xfffffffc
je 0x1008a4e0
mov ecx, dword [esi + 0x1ac]
mov edx, dword [eax + ecx*8 + 4]
cmp edx, dword [esi + 0x1b0]
jne 0x1008a4e0
cmp dword [eax + ecx*8], 0
je 0x1008a4e0
xor ebx, ebx
jmp 0x1008a748
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp eax, edi
jne 0x1008a716
mov eax, dword [0x101ce560]
cmp eax, 1
ja 0x1008a529
push 0x101ce560
call fcn.10065310
add esp, 4
test al, al
je 0x1008a524
push 0x3c
call fcn.10145ba4
add esp, 4
mov ebx, eax
mov ecx, eax
call fcn.100be570
mov dword [0x101ce560], ebx
jmp 0x1008a529
mov eax, dword [0x101ce560]
mov eax, dword [0x101ce55c]
mov ecx, dword [0x101bd164]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x1008a832
push dword [0x101bac5c]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
xor ecx, ecx
and eax, 0xfffffffc
je 0x1008a572
mov edx, dword [0x101ce554]
mov ebx, dword [eax + edx*8 + 4]
cmp ebx, dword [0x101ce558]
jne 0x1008a572
mov ecx, dword [eax + edx*8]
test ecx, ecx
mov eax, 0x101a7c2c
cmovne eax, ecx
mov dword [ebp - 0x24], eax
mov eax, dword [0x101bfe6c]
mov ecx, dword [0x101bd164]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x1008a87e
mov ebx, dword [0x101bfe68]
push dword [0x101bac5c]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
and eax, 0xfffffffc
je 0x1008a5ce
mov ecx, dword [ebx]
mov edx, dword [eax + ecx*8 + 4]
cmp edx, dword [ebx + 4]
jne 0x1008a5ce
mov edx, dword [ebp - 0x24]
cmp edx, dword [eax + ecx*8]
je 0x1008a716
mov eax, dword [ebp - 0x24]
cmp byte [eax], 0
je 0x1008a716
mov ebx, dword [0x101bfe68]
push dword [0x101bac5c]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
and eax, 0xfffffffc
je 0x1008a81c
mov ecx, dword [ebx]
mov edx, dword [ebp - 0x24]
mov dword [eax + ecx*8], edx
mov ecx, dword [ebx]
mov edx, dword [ebx + 4]
mov dword [eax + ecx*8 + 4], edx
lea ebx, [esi + 8]
push ebx
call dword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x1008a826
mov dword [ebp - 0x30], ebx
mov edx, dword [esi + 0x98]
add esi, 0x94
test edx, edx
je 0x1008a6e6
mov ecx, edx
shr ecx, 1
and ecx, 0x55555555
mov eax, edx
sub eax, ecx
mov ecx, eax
and ecx, 0x33333333
shr eax, 2
and eax, 0x33333333
add eax, ecx
mov ecx, eax
shr ecx, 4
add ecx, eax
and ecx, 0xf0f0f0f
imul ebx, ecx, 0x1010101
shr ebx, 0x18
cmp ebx, 1
mov dword [ebp - 0x28], edx
ja 0x1008a672
dec edx
and edx, edi
jmp 0x1008a681
mov eax, edx
mov edx, edi
cmp eax, edi
ja 0x1008a681
mov eax, edi
xor edx, edx
div dword [ebp - 0x28]
mov eax, dword [esi]
mov dword [ebp - 0x2c], edx
mov eax, dword [eax + edx*4]
test eax, eax
mov edx, dword [ebp - 0x28]
je 0x1008a6e6
mov ecx, dword [eax]
test ecx, ecx
je 0x1008a6e6
lea eax, [edx - 1]
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], ebx
jmp 0x1008a6bf
cmp dword [ecx + 8], edi
je 0x1008a75e
mov ecx, dword [ecx]
test ecx, ecx
je 0x1008a6e6
mov eax, dword [ecx + 4]
cmp eax, edi
je 0x1008a6b0
cmp ebx, 1
ja 0x1008a6d0
and eax, dword [ebp - 0x38]
jmp 0x1008a6e1
cmp eax, edx
jb 0x1008a6e1
xor edx, edx
div dword [ebp - 0x28]
mov eax, edx
mov edx, dword [ebp - 0x28]
mov ebx, dword [ebp - 0x34]
cmp eax, dword [ebp - 0x2c]
je 0x1008a6b9
lea eax, [ebp + 0x1c]
mov dword [ebp - 0x14], eax
lea edi, [ebp - 0x14]
lea edx, [ebp - 0x20]
mov ecx, esi
push edi
push eax
call fcn.100715e0
add esp, 8
mov ecx, dword [ebp - 0x20]
add ecx, 0xc
push dword [ebp - 0x24]
call fcn.100561c4
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov bl, 1
mov esi, dword [ebp + 0xc]
test byte [esi], 8
je 0x1008a748
mov eax, dword [ebp + 0x10]
movzx ecx, byte [ebp + 8]
test eax, eax
mov edx, 0x1019d59c
cmovne edx, eax
movsx eax, cl
push dword [ebp + 0x20]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push edx
push esi
push eax
call fcn.100cc750
add esp, 0x18
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.101465a3
mov eax, ebx
add esp, 0x2c
pop esi
pop edi
pop ebx
pop ebp
ret 0x1c
mov dword [ebp - 0x20], 0xffffffff
mov dword [ebp - 0x1c], 0xffffffff
mov dword [ebp - 0x18], 0xffffffff
lea edi, [ecx + 0xc]
movzx eax, byte [ecx + 0x17]
mov edx, edi
test al, al
jns 0x1008a786
mov edx, dword [ecx + 0xc]
mov eax, dword [ecx + 0x10]
lea ecx, [ebp - 0x20]
push 1
push 0
push 1
push 0x1019d7b8
push eax
push edx
push ecx
call fcn.10075440
add esp, 0x1c
mov ebx, dword [ebp - 0x20]
mov esi, dword [ebp - 0x1c]
cmp ebx, esi
je 0x1008a7f0
mov dword [ebp - 0x28], edi
push dword [ebp - 0x24]
call fcn.10163870
add esp, 4
mov edi, eax
mov dword [ebp - 0x2c], ebx
jmp 0x1008a7c5
add ebx, 8
cmp ebx, esi
je 0x1008a7e4
cmp dword [ebx + 4], edi
jne 0x1008a7be
test edi, edi
je 0x1008a7e0
push edi
push dword [ebp - 0x24]
push dword [ebx]
call fcn.10147f9d
add esp, 0xc
test eax, eax
jne 0x1008a7be
cmp ebx, esi
jne 0x1008a800
mov edi, dword [ebp - 0x28]
mov ecx, edi
push 0x2c
call fcn.1005664a
mov ecx, edi
push dword [ebp - 0x24]
call fcn.10056746
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x1008a70c
mov dword [ebp - 0x1c], eax
push eax
call fcn.10145bd4
add esp, 4
jmp 0x1008a70c
call fcn.1007a6e0
jmp 0x1008a5f5
mov ecx, ebx
call fcn.10083990
jmp 0x1008a618
push 0x101ce55c
call fcn.10145c47
add esp, 4
cmp dword [0x101ce55c], 0xffffffff
jne 0x1008a54a
mov dword [0x101ce554], 0xffffffff
mov dword [0x101ce558], 0
mov ecx, 0x101ce554
push 0
call fcn.1007a5a0
push 0x101ce55c
call fcn.10145cbd
add esp, 4
jmp 0x1008a54a
push 0x101bfe6c
call fcn.10145c47
add esp, 4
cmp dword [0x101bfe6c], 0xffffffff
jne 0x1008a5a0
push 8
call fcn.10145ba4
add esp, 4
mov ebx, eax
mov dword [eax + 4], 0
mov dword [eax], 0xffffffff
mov ecx, eax
push 0
call fcn.1007a5a0
mov dword [0x101bfe68], ebx
push 0x101bfe6c
call fcn.10145cbd
add esp, 4
jmp 0x1008a5a0