Function at 0x101e5570
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x1c
mov esi, ecx
mov eax, dword [0x102b0014]
xor eax, ebp
mov dword [ebp - 0x10], eax
call fcn.101aafb0
mov ebx, eax
mov dword [ebp - 0x24], eax
mov eax, 0x20
mov ecx, 0x20
test esi, esi
je 0x101e55a3
bsr ecx, esi
xor ecx, 0x1f
sub eax, ecx
mov cl, byte [eax + 0x102641e0]
mov edx, esi
shr edx, cl
and edx, 7
mov ecx, dword [eax*4 + 0x10264204]
mov dword [ebp - 0x28], esi
and ecx, esi
lea esi, [edx + eax*8]
cmp ecx, 1
sbb esi, 0xffffffff
mov byte [ebp - 0x11], 0
mov dword [ebp - 0x18], 0xffffffff
mov eax, dword [ebp - 0x24]
cmp byte [eax], 2
jne 0x101e55e7
mov al, byte [0x102b323c]
cmp al, 2
je 0x101e5836
movzx edi, word [esi + esi + 0x10263fcc]
mov eax, dword [ebp - 0x24]
cmp byte [eax + 2], 0
je 0x101e56ad
mov dword [ebp - 0x1c], ebx
mov ebx, dword [0x102b910c]
call dword [sym.imp.kernel32.dll_GetLastError]
mov esi, eax
push ebx
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov ebx, eax
test esi, esi
jne 0x101e5718
cmp ebx, 2
jb 0x101e5728
add dword [ebx + 0x310], 1
adc dword [ebx + 0x314], 0
cmp di, 0x31
jae 0x101e5741
cmp dword [ebx + edi*8], 0
je 0x101e57fd
add dword [ebx + 0x318], 1
adc dword [ebx + 0x31c], 0
mov esi, dword [ebx + edi*8]
mov eax, dword [esi]
test eax, eax
je 0x101e5674
mov ecx, eax
not ecx
cmp dword [esi + 4], ecx
jne 0x101e5831
bswap eax
prefetcht0 byte [eax]
jmp 0x101e5676
bswap eax
add byte [ebx + edi*8 + 4], 0xff
mov dword [ebx + edi*8], eax
movzx eax, word [ebx + edi*8 + 6]
mov dword [ebp - 0x18], eax
movzx eax, word [ebx + edi*8 + 6]
sub dword [ebx + 0x308], eax
test esi, esi
je 0x101e575d
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10205d16
mov eax, esi
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret
shl edi, 5
lea esi, [ebx + edi]
add esi, 0x10
add ebx, 8
mov dword [ebp - 0x1c], 1
mov dword [ebp - 0x20], 0
mov edx, dword [sym.imp.kernel32.dll_TryAcquireSRWLockExclusive]
mov edi, ebx
push ebx
mov ebx, edx
call edx
test al, al
jne 0x101e57c4
mov edx, ebx
mov ecx, dword [ebp - 0x1c]
mov eax, ecx
test ecx, ecx
jle 0x101e56f4
pause
add eax, 0xffffffff
jne 0x101e56e7
mov eax, dword [ebp - 0x1c]
add dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x1c]
add eax, eax
cmp eax, 0x40
mov ecx, 0x40
cmovge eax, ecx
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x20], 0x3e8
mov ebx, edi
jl 0x101e56cd
push ebx
jmp 0x101e57be
push esi
call dword [sym.imp.kernel32.dll_SetLastError]
cmp ebx, 2
jae 0x101e5627
lea eax, [ebp - 0x18]
mov ecx, dword [ebp - 0x24]
push eax
push edi
call fcn.101a1710
mov esi, eax
test esi, esi
jne 0x101e5699
jmp 0x101e575d
add dword [ebx + 0x330], 1
adc dword [ebx + 0x334], 0
add dword [ebx + 0x320], 1
adc dword [ebx + 0x324], 0
shl edi, 5
mov eax, dword [ebp - 0x1c]
lea esi, [eax + edi]
add esi, 0x10
add eax, 8
mov dword [ebp - 0x1c], 1
mov dword [ebp - 0x20], 0
mov ebx, dword [sym.imp.kernel32.dll_TryAcquireSRWLockExclusive]
mov edi, eax
push eax
call ebx
test al, al
jne 0x101e57c4
mov ecx, dword [ebp - 0x1c]
mov eax, ecx
test ecx, ecx
jle 0x101e579f
pause
add eax, 0xffffffff
jne 0x101e5792
mov eax, dword [ebp - 0x1c]
add dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x1c]
add eax, eax
cmp eax, 0x40
mov ecx, 0x40
cmovge eax, ecx
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x20], 0x3e8
mov eax, edi
jl 0x101e5780
push eax
call dword [sym.imp.kernel32.dll_AcquireSRWLockExclusive]
mov ecx, esi
mov eax, dword [esi]
mov esi, dword [eax]
test esi, esi
je 0x101e5840
mov byte [ebp - 0x11], 0
mov ecx, dword [esi]
test ecx, ecx
je 0x101e57e8
mov edx, ecx
not edx
cmp dword [esi + 4], edx
jne 0x101e5831
bswap ecx
prefetcht0 byte [ecx]
jmp 0x101e57ea
bswap ecx
mov dword [eax], ecx
add word [eax + 0xc], 1
push edi
call dword [sym.imp.kernel32.dll_ReleaseSRWLockExclusive]
jmp 0x101e5699
add dword [ebx + 0x328], 1
adc dword [ebx + 0x32c], 0
add dword [ebx + 0x320], 1
adc dword [ebx + 0x324], 0
mov ecx, ebx
push edi
call fcn.101a3420
mov esi, dword [ebx + edi*8]
test esi, esi
jne 0x101e565a
jmp 0x101e575d
call fcn.1002c4d0
call fcn.101a12f0
jmp 0x101e55e7
lea eax, [ebp - 0x11]
push eax
push 0x4000
push dword [ebp - 0x28]
push 0
push dword [ebp - 0x24]
call fcn.1002bc80
mov esi, eax
test eax, eax
jne 0x101e57f1
xor esi, esi
jmp 0x101e57f1