Function at 0x101aa5e0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x28
mov ebx, dword [ebp + 8]
mov eax, dword [0x102b0014]
xor eax, ebp
mov dword [ebp - 0x10], eax
call fcn.101aafb0
test ebx, ebx
je 0x101aa71c
prefetcht0 byte [ebx]
mov edi, ebx
and edi, 0xffe00000
mov eax, ebx
shr eax, 9
and eax, 0xfe0
lea esi, [edi + eax]
add esi, 0x1000
movzx eax, byte [edi + eax + 0x101e]
mov ecx, eax
neg ecx
mov dword [ebp - 0x30], ecx
shl eax, 5
mov dword [ebp - 0x24], esi
sub esi, eax
prefetcht0 byte [esi]
mov eax, esi
and eax, 0xfffff000
mov edx, dword [eax]
cmp byte [edx], 2
mov dword [ebp - 0x2c], edx
je 0x101aa730
mov dword [ebp - 0x34], esi
cmp byte [edx + 2], 0
je 0x101aa843
mov eax, dword [ebp - 0x30]
shl eax, 5
mov ecx, dword [ebp - 0x24]
mov esi, dword [ecx + eax + 8]
lea ecx, [edx + 0x10]
cmp ecx, esi
ja 0x101aa843
lea eax, [edx + 0x1110]
cmp eax, esi
jb 0x101aa843
mov dword [ebp - 0x28], ecx
mov edi, dword [0x102b910c]
call dword [sym.imp.kernel32.dll_GetLastError]
mov ebx, eax
push edi
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov edi, eax
test ebx, ebx
jne 0x101aa829
cmp edi, 2
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x28]
jb 0x101aa843
sub esi, eax
sar esi, 5
add dword [edi + 0x338], 1
adc dword [edi + 0x33c], 0
cmp esi, 0x30
ja 0x101aa835
mov eax, dword [edi + esi*8]
bswap eax
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
not eax
mov dword [ecx + 4], eax
mov dword [edi + esi*8], ecx
add byte [edi + esi*8 + 4], 1
movzx eax, word [edi + esi*8 + 6]
add dword [edi + 0x308], eax
add dword [edi + 0x340], 1
adc dword [edi + 0x344], 0
mov al, byte [edi + esi*8 + 5]
cmp byte [edi + esi*8 + 4], al
ja 0x101aa90a
mov al, byte [edi + 0x30c]
test al, 1
jne 0x101aa920
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10205d16
add esp, 0x28
pop esi
pop edi
pop ebx
pop ebp
ret 8
mov al, byte [0x102b323c]
cmp al, 2
je 0x101aa939
mov ecx, dword [ebp - 0x30]
shl ecx, 5
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + ecx + 8]
mov dword [ebp - 0x28], eax
mov eax, edx
add edx, 0x10
cmp edx, dword [ebp - 0x28]
mov edx, eax
ja 0x101aa650
lea edx, [eax + 0x1110]
cmp edx, dword [ebp - 0x28]
mov edx, eax
jb 0x101aa650
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x24]
cmp byte [eax + ecx + 0x11], 0
jne 0x101aa946
lea esi, [edx + 0xc]
mov eax, dword [edx + 0xc]
mov dword [ebp - 0x24], eax
mov eax, dword [esi]
mov dword [ebp - 0x30], eax
mov eax, dword [0x102b3228]
and eax, 1
shl eax, 0xf
lea esi, [eax + edi]
add edi, eax
add edi, 0x4000
mov eax, ebx
shr ebx, 8
and ebx, 0x1fff
mov ecx, eax
shr cl, 3
mov edx, 1
shl edx, cl
mov eax, dword [esi + ebx*4 + 0x4000]
mov ecx, eax
or ecx, edx
lock cmpxchg dword [edi + ebx*4], ecx
jne 0x101aa7c1
test eax, edx
jne 0x101aa94e
mov eax, dword [ebp - 0x24]
mov edi, eax
lock xadd dword [0x102b3220], edi
add edi, eax
mov esi, dword [0x102b3224]
cmp byte [0x102b323d], 1
mov eax, dword [ebp + 8]
jne 0x101aa803
push dword [ebp - 0x30]
push 0
push eax
call fcn.10208980
add esp, 0xc
cmp edi, esi
jbe 0x101aa71c
mov al, byte [0x102b323c]
test al, al
jne 0x101aa71c
mov ecx, 0x102b3220
push 1
call fcn.101a1290
jmp 0x101aa71c
push ebx
call dword [sym.imp.kernel32.dll_SetLastError]
jmp 0x101aa6a5
add dword [edi + 0x348], 1
adc dword [edi + 0x34c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
add edx, 8
mov esi, 1
mov dword [ebp - 0x2c], 0
mov ebx, dword [sym.imp.kernel32.dll_TryAcquireSRWLockExclusive]
mov edi, edx
push edx
call ebx
test al, al
jne 0x101aa89e
mov eax, esi
test esi, esi
jle 0x101aa87f
pause
add eax, 0xffffffff
jne 0x101aa875
add dword [ebp - 0x2c], esi
add esi, esi
cmp esi, 0x40
mov eax, 0x40
cmovge esi, eax
cmp dword [ebp - 0x2c], 0x3e8
mov edx, edi
jl 0x101aa866
push edx
call dword [sym.imp.kernel32.dll_AcquireSRWLockExclusive]
mov edx, dword [ebp - 0x34]
mov eax, dword [edx]
mov ecx, dword [ebp + 8]
cmp eax, ecx
je 0x101aa953
bswap eax
mov dword [ecx], eax
not eax
mov dword [ecx + 4], eax
mov dword [edx], ecx
mov esi, dword [ebp - 0x30]
shl esi, 5
mov ecx, dword [ebp - 0x24]
movzx eax, word [ecx + esi + 0xc]
add eax, 0xffffffff
mov word [ecx + esi + 0xc], ax
test ax, ax
jle 0x101aa92c
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov esi, dword [ebp - 0x20]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], esi
push edi
call dword [sym.imp.kernel32.dll_ReleaseSRWLockExclusive]
test esi, esi
je 0x101aa71c
lea ecx, [ebp - 0x18]
call fcn.101aaf80
jmp 0x101aa71c
lea edx, [edi + esi*8]
movzx eax, al
shr eax, 1
mov ecx, edi
push eax
push edx
call fcn.101a35a0
jmp 0x101aa70e
mov ecx, edi
call fcn.101a2dd0
jmp 0x101aa71c
lea eax, [ebp - 0x20]
mov ecx, edx
push eax
call fcn.101aad90
jmp 0x101aa8e2
call fcn.101a12f0
mov edx, dword [ebp - 0x2c]
jmp 0x101aa73d
add esi, 0x20
jmp 0x101aa782
call fcn.101a37b0
int3