Function at 0x10151360
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x20
mov eax, dword [0x102b0014]
xor eax, ebp
mov dword [ebp - 0x10], eax
mov eax, dword [0x102b51b8]
mov ecx, dword [0x102b3718]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x10151795
mov esi, dword [ebp + 8]
mov al, byte [0x102b51b4]
test al, 1
jne 0x10151530
call fcn.101a1070
mov edi, eax
mov dword [ebp - 0x2c], eax
mov eax, 0x20
mov ecx, 0x20
test esi, esi
je 0x101513c2
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]
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 - 0x2c]
cmp byte [eax], 2
jne 0x10151403
mov al, byte [0x102b323c]
cmp al, 2
je 0x1015173a
movzx ebx, word [esi + esi + 0x10263fcc]
mov eax, dword [ebp - 0x2c]
cmp byte [eax + 2], 0
je 0x101514c9
mov dword [ebp - 0x24], edi
mov esi, dword [0x102b910c]
call dword [sym.imp.kernel32.dll_GetLastError]
mov edi, eax
push esi
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov esi, eax
test edi, edi
jne 0x10151619
cmp esi, 2
jb 0x10151629
add dword [esi + 0x310], 1
adc dword [esi + 0x314], 0
cmp bx, 0x31
jae 0x10151642
cmp dword [esi + ebx*8], 0
je 0x10151706
add dword [esi + 0x318], 1
adc dword [esi + 0x31c], 0
mov edi, dword [esi + ebx*8]
mov eax, dword [edi]
test eax, eax
je 0x10151490
mov ecx, eax
not ecx
cmp dword [edi + 4], ecx
jne 0x101518f1
bswap eax
prefetcht0 byte [eax]
jmp 0x10151492
bswap eax
add byte [esi + ebx*8 + 4], 0xff
mov dword [esi + ebx*8], eax
movzx eax, word [esi + ebx*8 + 6]
mov dword [ebp - 0x18], eax
movzx eax, word [esi + ebx*8 + 6]
sub dword [esi + 0x308], eax
test edi, edi
je 0x1015165e
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10205d16
mov eax, edi
add esp, 0x20
pop esi
pop edi
pop ebx
pop ebp
ret
shl ebx, 5
lea eax, [edi + ebx]
add eax, 0x10
mov dword [ebp - 0x24], eax
add edi, 8
mov eax, edi
mov edi, 1
mov dword [ebp - 0x28], 0
mov esi, dword [sym.imp.kernel32.dll_TryAcquireSRWLockExclusive]
mov ebx, eax
push eax
call esi
test al, al
jne 0x10151526
mov ecx, edi
mov eax, edi
test edi, edi
jle 0x10151507
pause
add eax, 0xffffffff
jne 0x101514fd
add dword [ebp - 0x28], edi
add edi, edi
cmp edi, 0x40
mov eax, 0x40
cmovge edi, eax
cmp dword [ebp - 0x28], 0x3e8
mov eax, ebx
jl 0x101514ec
push eax
call dword [sym.imp.kernel32.dll_AcquireSRWLockExclusive]
mov ecx, dword [ebp - 0x24]
mov eax, dword [ecx]
jmp 0x101516c9
mov edi, dword [0x102b51ac]
mov eax, 0x20
mov ecx, 0x20
test esi, esi
je 0x1015154a
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]
and ecx, esi
lea esi, [edx + eax*8]
cmp ecx, 1
sbb esi, 0xffffffff
mov byte [ebp - 0x19], 0
mov dword [ebp - 0x20], 0xffffffff
cmp byte [edi], 2
jne 0x10151588
mov al, byte [0x102b323c]
cmp al, 2
je 0x1015193b
movzx esi, word [esi + esi + 0x10263fcc]
mov dword [ebp - 0x2c], edi
cmp byte [edi + 2], 0
je 0x101517d2
mov ebx, dword [0x102b910c]
call dword [sym.imp.kernel32.dll_GetLastError]
mov edi, eax
push ebx
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov ebx, eax
test edi, edi
jne 0x1015182e
cmp ebx, 2
jb 0x1015183e
add dword [ebx + 0x310], 1
adc dword [ebx + 0x314], 0
cmp si, 0x31
jae 0x10151857
cmp dword [ebx + esi*8], 0
je 0x10151907
add dword [ebx + 0x318], 1
adc dword [ebx + 0x31c], 0
mov edi, dword [ebx + esi*8]
mov eax, dword [edi]
test eax, eax
je 0x10151744
mov ecx, eax
not ecx
cmp dword [edi + 4], ecx
jne 0x101518f1
bswap eax
prefetcht0 byte [eax]
jmp 0x10151746
push edi
call dword [sym.imp.kernel32.dll_SetLastError]
cmp esi, 2
jae 0x10151443
lea eax, [ebp - 0x18]
mov ecx, dword [ebp - 0x2c]
push eax
push ebx
call fcn.101a1710
mov edi, eax
test edi, edi
jne 0x101514b5
jmp 0x1015165e
add dword [esi + 0x330], 1
adc dword [esi + 0x334], 0
add dword [esi + 0x320], 1
adc dword [esi + 0x324], 0
shl ebx, 5
mov eax, dword [ebp - 0x24]
lea edi, [eax + ebx]
add edi, 0x10
add eax, 8
mov dword [ebp - 0x24], 1
mov dword [ebp - 0x28], 0
mov esi, dword [sym.imp.kernel32.dll_TryAcquireSRWLockExclusive]
mov ebx, eax
push eax
call esi
test al, al
jne 0x101516c5
mov ecx, dword [ebp - 0x24]
mov eax, ecx
test ecx, ecx
jle 0x101516a0
pause
add eax, 0xffffffff
jne 0x10151693
mov eax, dword [ebp - 0x24]
add dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x24]
add eax, eax
cmp eax, 0x40
mov ecx, 0x40
cmovge eax, ecx
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x28], 0x3e8
mov eax, ebx
jl 0x10151681
push eax
call dword [sym.imp.kernel32.dll_AcquireSRWLockExclusive]
mov ecx, edi
mov eax, dword [edi]
mov edi, dword [eax]
test edi, edi
je 0x1015176e
mov byte [ebp - 0x11], 0
mov ecx, dword [edi]
test ecx, ecx
je 0x101516f1
mov edx, ecx
not edx
cmp dword [edi + 4], edx
jne 0x101518f1
bswap ecx
prefetcht0 byte [ecx]
jmp 0x101516f3
bswap ecx
mov dword [eax], ecx
add word [eax + 0xc], 1
push ebx
call dword [sym.imp.kernel32.dll_ReleaseSRWLockExclusive]
jmp 0x101514b5
add dword [esi + 0x328], 1
adc dword [esi + 0x32c], 0
add dword [esi + 0x320], 1
adc dword [esi + 0x324], 0
mov ecx, esi
push ebx
call fcn.101a3420
mov edi, dword [esi + ebx*8]
test edi, edi
jne 0x10151476
jmp 0x1015165e
call fcn.101a12f0
jmp 0x10151403
bswap eax
add byte [ebx + esi*8 + 4], 0xff
mov dword [ebx + esi*8], eax
movzx eax, word [ebx + esi*8 + 6]
mov dword [ebp - 0x20], eax
movzx eax, word [ebx + esi*8 + 6]
sub dword [ebx + 0x308], eax
test edi, edi
jne 0x101514b5
jmp 0x10151873
lea eax, [ebp - 0x11]
push eax
push 0x4000
push dword [ebp + 8]
push 0
push dword [ebp - 0x2c]
call fcn.1002bc80
mov edi, eax
test eax, eax
jne 0x101516fa
xor edi, edi
jmp 0x101516fa
push 0x102b51b8
call fcn.1020d865
add esp, 4
cmp dword [0x102b51b8], 0xffffffff
jne 0x10151394
mov dword [0x102b51ac], 0
mov byte [0x102b51b4], 0
push 0x102b51b8
call fcn.1020d865
add esp, 4
jmp 0x10151394
shl esi, 5
mov eax, dword [ebp - 0x2c]
lea ebx, [eax + esi]
add ebx, 0x10
add eax, 8
mov dword [ebp - 0x24], eax
mov esi, 1
mov dword [ebp - 0x28], 0
mov edi, dword [sym.imp.kernel32.dll_TryAcquireSRWLockExclusive]
push dword [ebp - 0x24]
call edi
test al, al
jne 0x101518cf
mov eax, esi
test esi, esi
jle 0x10151813
pause
add eax, 0xffffffff
jne 0x10151809
add dword [ebp - 0x28], esi
add esi, esi
cmp esi, 0x40
mov eax, 0x40
cmovge esi, eax
cmp dword [ebp - 0x28], 0x3e8
jl 0x101517f6
jmp 0x101518c6
push edi
call dword [sym.imp.kernel32.dll_SetLastError]
cmp ebx, 2
jae 0x101515c5
lea eax, [ebp - 0x20]
mov ecx, dword [ebp - 0x2c]
push eax
push esi
call fcn.101a1710
mov edi, eax
test edi, edi
jne 0x101514b5
jmp 0x10151873
add dword [ebx + 0x330], 1
adc dword [ebx + 0x334], 0
add dword [ebx + 0x320], 1
adc dword [ebx + 0x324], 0
shl esi, 5
mov eax, dword [ebp - 0x2c]
lea ebx, [eax + esi]
add ebx, 0x10
add eax, 8
mov dword [ebp - 0x24], eax
mov esi, 1
mov dword [ebp - 0x28], 0
mov edi, dword [sym.imp.kernel32.dll_TryAcquireSRWLockExclusive]
push dword [ebp - 0x24]
call edi
test al, al
jne 0x101518cf
mov eax, esi
test esi, esi
jle 0x101518b0
pause
add eax, 0xffffffff
jne 0x101518a6
add dword [ebp - 0x28], esi
add esi, esi
cmp esi, 0x40
mov eax, 0x40
cmovge esi, eax
cmp dword [ebp - 0x28], 0x3e8
jl 0x10151897
push dword [ebp - 0x24]
call dword [sym.imp.kernel32.dll_AcquireSRWLockExclusive]
mov eax, dword [ebx]
mov edi, dword [eax]
test edi, edi
je 0x10151945
mov byte [ebp - 0x19], 0
mov ecx, dword [edi]
test ecx, ecx
je 0x101518f6
mov edx, ecx
not edx
cmp dword [edi + 4], edx
jne 0x101518f1
bswap ecx
prefetcht0 byte [ecx]
jmp 0x101518f8
call fcn.1002c4d0
bswap ecx
mov dword [eax], ecx
add word [eax + 0xc], 1
push dword [ebp - 0x24]
jmp 0x101516fb
add dword [ebx + 0x328], 1
adc dword [ebx + 0x32c], 0
add dword [ebx + 0x320], 1
adc dword [ebx + 0x324], 0
mov ecx, ebx
push esi
call fcn.101a3420
mov edi, dword [ebx + esi*8]
test edi, edi
jne 0x101515f8
jmp 0x10151873
call fcn.101a12f0
jmp 0x10151588
lea eax, [ebp - 0x19]
mov ecx, ebx
push eax
push 0x4000
push dword [ebp + 8]
push 0
push dword [ebp - 0x2c]
call fcn.1002bc80
mov edi, eax
test eax, eax
je 0x1015196b
push dword [ebp - 0x24]
jmp 0x101516fb
xor edi, edi
jmp 0x10151963