Function at 0x10088570
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x44
mov esi, ecx
mov eax, dword [0x101b9014]
xor eax, ebp
mov dword [ebp - 0x10], eax
mov eax, dword [0x101bac5c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
and eax, 0xfffffffc
je 0x100885b7
mov ecx, dword [esi + 0x1a4]
mov edx, dword [eax + ecx*8 + 4]
cmp edx, dword [esi + 0x1a8]
jne 0x100885b7
cmp dword [eax + ecx*8], 0
jne 0x10088d3e
mov eax, dword [0x101ce500]
mov ecx, dword [0x101bd164]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x10088d69
mov eax, dword [0x101bac5c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
and eax, 0xfffffffc
je 0x10088d3e
mov ecx, dword [0x101ce4f8]
mov edx, dword [eax + ecx*8 + 4]
cmp edx, dword [0x101ce4fc]
jne 0x10088d3e
cmp dword [eax + ecx*8], 0
je 0x10088d3e
mov eax, dword [0x101ce540]
mov ecx, dword [0x101bd164]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x10088dbb
mov eax, dword [0x101bac5c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
and eax, 0xfffffffc
je 0x10088d3e
mov ecx, dword [0x101ce538]
mov edx, dword [eax + ecx*8 + 4]
cmp edx, dword [0x101ce53c]
jne 0x10088d3e
cmp dword [eax + ecx*8], 0
je 0x10088d3e
mov eax, dword [0x101bac5c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
and eax, 0xfffffffc
je 0x100886ba
mov ecx, dword [esi + 0x19c]
mov edx, dword [eax + ecx*8 + 4]
cmp edx, dword [esi + 0x1a0]
jne 0x100886ba
mov edi, dword [eax + ecx*8]
test edi, edi
je 0x100886ba
mov eax, dword [esi + 0x1e4]
cmp eax, dword [edi + 0x14]
je 0x10088d3e
mov ecx, edi
call fcn.10087dc0
mov dword [esp], edi
call fcn.10145bd4
mov dword [esp], 0x18
call fcn.10145ba4
mov ebx, eax
mov dword [eax], 0x1019b6d4
mov dword [eax + 4], 0x1019b6dc
mov eax, esi
shr eax, 0xe
mov ecx, esi
shr ecx, 0x13
mov ecx, dword [ecx*4 + 0x101c1e84]
bt ecx, eax
jae 0x100886f5
mov dword [esp], esi
call fcn.10069180
jmp 0x10088701
mov eax, esi
shr eax, 0x15
mov byte [eax + 0x101c9e84], 1
mov dword [ebx + 8], esi
mov dword [ebx + 0xc], 0
mov dword [ebx + 0x10], 0
mov eax, dword [esi + 0x1e4]
mov dword [ebx + 0x14], eax
lea eax, [ebp - 0x14]
mov dword [esp], eax
call fcn.100797e0
mov edi, dword [ebp - 0x14]
lea ecx, [edi + 0x28c]
mov dword [esp], ebx
call fcn.10073300
sub esp, 4
mov eax, edi
shr eax, 0xe
mov ecx, edi
shr ecx, 0x13
mov ecx, dword [ecx*4 + 0x101c1e84]
bt ecx, eax
jae 0x10088758
mov dword [esp], edi
call fcn.10069280
mov dword [ebp - 0x30], ebx
add ebx, 4
call fcn.100872e0
mov edi, eax
call fcn.100bdc70
mov eax, dword [eax]
test eax, eax
je 0x10088774
lock inc dword [eax + 4]
mov byte [ebp - 0x14], 1
lea ecx, [ebp - 0x14]
mov dword [esp + 0xc], ecx
mov dword [esp + 8], eax
mov dword [esp], ebx
mov dword [esp + 4], str.ThreadLocalEventBuffer
mov ecx, edi
call fcn.10087360
sub esp, 0x10
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [ebp - 0x18], eax
lea edi, [esi + 4]
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
sub esp, 4
test al, al
je 0x10088d50
call fcn.100bdc70
mov eax, dword [eax]
test eax, eax
je 0x100887c7
lock inc dword [eax + 4]
mov ecx, dword [esi + 0x1b8]
test ecx, ecx
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x34], eax
je 0x1008881f
mov edi, ecx
shr ecx, 1
and ecx, 0x55555555
mov eax, edi
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 ecx, ecx, 0x1010101
shr ecx, 0x18
cmp ecx, 1
ja 0x10088826
lea ebx, [edi - 1]
and ebx, edx
jmp 0x10088838
mov ebx, 0xffffffff
jmp 0x10088895
mov ebx, edx
cmp edx, edi
jb 0x10088838
mov eax, edx
xor edx, edx
div dword [ebp - 0x1c]
mov ebx, edx
mov edx, dword [ebp - 0x18]
mov eax, dword [esi + 0x1b4]
mov eax, dword [eax + ebx*4]
test eax, eax
je 0x10088895
mov edi, dword [ebp - 0x1c]
dec edi
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x20], ecx
jmp 0x1008885a
and eax, dword [ebp - 0x24]
cmp eax, ebx
je 0x10088889
jmp 0x10088895
mov eax, dword [eax]
test eax, eax
je 0x10088895
mov edi, eax
mov eax, dword [eax + 4]
cmp eax, edx
je 0x10088889
cmp ecx, 1
jbe 0x10088851
mov ecx, ebx
mov ebx, dword [ebp - 0x1c]
cmp eax, ebx
jb 0x10088880
xor edx, edx
div ebx
mov eax, edx
mov edx, dword [ebp - 0x18]
mov ebx, ecx
mov ecx, dword [ebp - 0x20]
cmp eax, ebx
jne 0x10088895
mov eax, edi
cmp dword [edi + 8], edx
jne 0x1008885a
jmp 0x10088ccd
mov dword [esp], 0x10
call fcn.10145ba4
mov ecx, dword [ebp - 0x18]
mov dword [eax + 8], ecx
mov dword [eax + 0xc], 0
mov dword [eax + 4], ecx
mov dword [ebp - 0x24], eax
mov dword [eax], 0
mov eax, dword [esi + 0x1c0]
inc eax
movq xmm2, qword [0x1019d9f8]
movd xmm0, eax
por xmm0, xmm2
subsd xmm0, xmm2
cvtsd2ss xmm0, xmm0
movss xmm1, dword [esi + 0x1c4]
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x10088908
movd xmm3, eax
por xmm3, xmm2
subsd xmm3, xmm2
xorps xmm2, xmm2
cvtsd2ss xmm2, xmm3
mulss xmm2, xmm1
ucomiss xmm0, xmm2
jbe 0x10088c63
divss xmm0, xmm1
cvtss2sd xmm0, xmm0
movsd qword [esp], xmm0
mov edi, eax
call fcn.10177120
fstp dword [ebp - 0x40]
movss xmm0, dword [ebp - 0x40]
cvttss2si eax, xmm0
mov edx, eax
subss xmm0, dword [0x1018b960]
sar edx, 0x1f
cvttss2si ecx, xmm0
and ecx, edx
or ecx, eax
lea edx, [edi + edi]
mov eax, 1
cmp edi, 3
jb 0x10088957
mov ebx, dword [ebp - 0x1c]
lea edi, [ebx - 1]
xor eax, eax
test ebx, edi
setne al
or eax, edx
cmp eax, ecx
cmovbe eax, ecx
mov ebx, 2
cmp eax, 1
je 0x10088971
lea ecx, [eax - 1]
test eax, ecx
jne 0x10088979
mov ebx, eax
mov edx, dword [ebp - 0x18]
mov edi, dword [ebp - 0x1c]
jmp 0x1008898c
mov dword [esp], eax
call fcn.1003cf14
mov ebx, eax
mov edi, dword [esi + 0x1b8]
mov edx, dword [ebp - 0x18]
cmp ebx, edi
jbe 0x10088aa6
cmp ebx, 0x40000000
jae 0x10088e0d
lea eax, [ebx*4]
mov dword [esp], eax
call fcn.10145ba4
mov ecx, dword [esi + 0x1b4]
mov dword [esi + 0x1b4], eax
test ecx, ecx
je 0x100889c7
mov dword [esp], ecx
call fcn.10145bd4
mov dword [esi + 0x1b8], ebx
lea edx, [ebx - 1]
mov eax, ebx
and eax, 3
xor ecx, ecx
mov dword [ebp - 0x28], edx
cmp edx, 3
jb 0x10088a24
mov edx, ebx
and edx, 0xfffffffc
xor ecx, ecx
mov edi, dword [esi + 0x1b4]
mov dword [edi + ecx*4], 0
mov edi, dword [esi + 0x1b4]
mov dword [edi + ecx*4 + 4], 0
mov edi, dword [esi + 0x1b4]
mov dword [edi + ecx*4 + 8], 0
mov edi, dword [esi + 0x1b4]
mov dword [edi + ecx*4 + 0xc], 0
add ecx, 4
cmp edx, ecx
jne 0x100889e6
mov dword [ebp - 0x2c], ebx
test eax, eax
je 0x10088a3c
mov edx, dword [esi + 0x1b4]
mov dword [edx + ecx*4], 0
inc ecx
dec eax
jne 0x10088a2b
mov edi, dword [esi + 0x1bc]
test edi, edi
mov edx, dword [ebp - 0x18]
je 0x10088c43
lea eax, [esi + 0x1bc]
mov dword [ebp - 0x20], eax
mov ebx, dword [ebp - 0x2c]
mov ecx, ebx
shr ecx, 1
and ecx, 0x55555555
mov eax, ebx
sub eax, ecx
mov ecx, eax
and ecx, 0x33333333
shr eax, 2
and eax, 0x33333333
add eax, ecx
mov edx, eax
shr edx, 4
add edx, eax
mov ecx, dword [edi + 4]
and edx, 0xf0f0f0f
imul eax, edx, 0x1010101
shr eax, 0x18
mov dword [ebp - 0x1c], eax
cmp eax, 1
ja 0x10088b6a
and ecx, dword [ebp - 0x28]
jmp 0x10088b76
jae 0x10088c43
movss xmm0, dword [esi + 0x1c0]
orpd xmm0, xmmword [0x1019da00]
subsd xmm0, qword [0x1019d9f8]
cvtsd2ss xmm0, xmm0
divss xmm0, dword [esi + 0x1c4]
cvtss2sd xmm0, xmm0
movsd qword [esp], xmm0
call fcn.10177120
mov eax, edi
fstp dword [ebp - 0x3c]
movss xmm0, dword [ebp - 0x3c]
cvttss2si ecx, xmm0
mov edx, ecx
subss xmm0, dword [0x1018b960]
cvttss2si edi, xmm0
sar edx, 0x1f
and edi, edx
or edi, ecx
cmp eax, 3
mov dword [ebp - 0x1c], eax
jb 0x10088bfb
mov edx, eax
shr edx, 1
and edx, 0x55555555
mov ecx, eax
sub ecx, edx
mov edx, ecx
and edx, 0x33333333
shr ecx, 2
and ecx, 0x33333333
add ecx, edx
mov edx, ecx
shr edx, 4
add edx, ecx
and edx, 0xf0f0f0f
imul ecx, edx, 0x1010101
shr ecx, 0x18
cmp ecx, 1
ja 0x10088bfb
lea ecx, [edi - 1]
bsr ecx, ecx
xor ecx, 0x1f
neg cl
mov eax, 1
shl eax, cl
cmp edi, 2
cmovb eax, edi
jmp 0x10088c03
cmp ecx, ebx
jb 0x10088b76
mov eax, ecx
xor edx, edx
div ebx
mov ecx, edx
mov edx, dword [ebp - 0x18]
mov eax, dword [esi + 0x1b4]
mov ebx, dword [ebp - 0x20]
mov dword [eax + ecx*4], ebx
mov ebx, dword [edi]
jmp 0x10088b91
mov eax, ecx
mov edi, ebx
mov ebx, dword [ebx]
mov ecx, eax
test ebx, ebx
je 0x10088c43
mov eax, dword [ebx + 4]
cmp dword [ebp - 0x1c], 1
ja 0x10088bab
and eax, dword [ebp - 0x28]
cmp eax, ecx
je 0x10088b89
jmp 0x10088bc5
mov dword [ebp - 0x20], edi
mov edi, dword [ebp - 0x2c]
cmp eax, edi
jb 0x10088bbe
xor edx, edx
div edi
mov eax, edx
mov edx, dword [ebp - 0x18]
mov edi, dword [ebp - 0x20]
cmp eax, ecx
je 0x10088b89
mov edx, dword [esi + 0x1b4]
cmp dword [edx + eax*4], 0
je 0x10088bf3
mov edx, dword [ebx]
mov dword [edi], edx
mov edx, dword [esi + 0x1b4]
mov edx, dword [edx + eax*4]
mov edx, dword [edx]
mov dword [ebx], edx
mov edx, dword [esi + 0x1b4]
mov eax, dword [edx + eax*4]
mov dword [eax], ebx
mov ebx, edi
mov eax, ecx
jmp 0x10088bf6
mov dword [edx + eax*4], edi
mov edx, dword [ebp - 0x18]
jmp 0x10088b8b
mov dword [esp], edi
call fcn.1003cf14
cmp ebx, eax
cmova eax, ebx
cmp eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
jae 0x10088c43
mov ebx, eax
test eax, eax
jne 0x10088994
mov eax, dword [esi + 0x1b4]
mov dword [esi + 0x1b4], 0
test eax, eax
je 0x10088c39
mov dword [esp], eax
call fcn.10145bd4
mov edx, dword [ebp - 0x18]
mov dword [esi + 0x1b8], 0
mov ecx, dword [esi + 0x1b8]
lea ebx, [ecx - 1]
test ecx, ebx
mov dword [ebp - 0x1c], ecx
jne 0x10088c57
and ebx, edx
jmp 0x10088c63
cmp edx, ecx
jb 0x10088c61
mov eax, edx
xor edx, edx
div ecx
mov ebx, edx
mov ecx, dword [esi + 0x1b4]
mov eax, dword [ecx + ebx*4]
test eax, eax
je 0x10088c79
mov ecx, dword [eax]
mov edx, dword [ebp - 0x24]
mov dword [edx], ecx
jmp 0x10088cc2
mov eax, dword [esi + 0x1bc]
mov edx, dword [ebp - 0x24]
mov dword [edx], eax
lea eax, [esi + 0x1bc]
mov dword [esi + 0x1bc], edx
mov dword [ecx + ebx*4], eax
mov eax, dword [edx]
test eax, eax
je 0x10088cc4
mov eax, dword [eax + 4]
mov edx, dword [ebp - 0x1c]
lea ecx, [edx - 1]
test edx, ecx
jne 0x10088caa
and eax, ecx
jmp 0x10088cb6
cmp eax, edx
jb 0x10088cb6
mov ecx, edx
xor edx, edx
div ecx
mov eax, edx
shl eax, 2
add eax, dword [esi + 0x1b4]
mov edx, dword [ebp - 0x24]
mov dword [eax], edx
inc dword [esi + 0x1c0]
mov eax, dword [ebp - 0x24]
mov ebx, dword [eax + 0xc]
mov ecx, eax
mov eax, dword [ebp - 0x34]
mov dword [ecx + 0xc], eax
test ebx, ebx
je 0x10088cfd
lock dec dword [ebx + 4]
jne 0x10088cfd
mov eax, dword [ebx]
mov edi, dword [eax + 4]
mov ecx, edi
call dword [section..00cfg]
mov dword [esp], 1
mov ecx, ebx
call edi
sub esp, 4
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
sub esp, 4
mov eax, dword [0x101bac5c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
and eax, 0xfffffffc
je 0x10088d5c
mov ecx, dword [esi + 0x19c]
mov edx, dword [ebp - 0x30]
mov dword [eax + ecx*8], edx
mov ecx, dword [esi + 0x19c]
mov edx, dword [esi + 0x1a0]
mov dword [eax + ecx*8 + 4], edx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.101465a3
add esp, 0x44
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, edi
call fcn.10083990
jmp 0x100887b8
cmp dword [ebp - 0x30], 0
je 0x10088d3e
call fcn.1007a6e0
jmp 0x10088d22
mov dword [esp], 0x101ce500
call fcn.10145c47
cmp dword [0x101ce500], 0xffffffff
jne 0x100885d8
mov dword [0x101ce4fc], 0
mov dword [0x101ce4f8], 0xffffffff
mov dword [esp], 0
mov ecx, 0x101ce4f8
call fcn.1007a5a0
sub esp, 4
mov dword [esp], 0x101ce500
call fcn.10145cbd
jmp 0x100885d8
mov dword [esp], 0x101ce540
call fcn.10145c47
cmp dword [0x101ce540], 0xffffffff
jne 0x10088633
mov dword [0x101ce53c], 0
mov dword [0x101ce538], 0xffffffff
mov dword [esp], 0
mov ecx, 0x101ce538
call fcn.1007a5a0
sub esp, 4
mov dword [esp], 0x101ce540
call fcn.10145cbd
jmp 0x10088633
call fcn.10034a48
int3