Function at 0x10150fe0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x2c
mov ebx, dword [ebp + 8]
mov eax, dword [0x102b0014]
xor eax, ebp
mov dword [ebp - 0x10], eax
test ebx, ebx
je 0x1015111a
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 - 0x34], ebx
mov dword [ebp - 0x2c], edx
je 0x1015112c
mov dword [ebp - 0x38], esi
cmp byte [edx + 2], 0
je 0x1015123f
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 0x1015123f
lea eax, [edx + 0x1110]
cmp eax, esi
jb 0x1015123f
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 0x10151225
cmp edi, 2
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x28]
jb 0x1015123f
sub esi, eax
sar esi, 5
add dword [edi + 0x338], 1
adc dword [edi + 0x33c], 0
cmp esi, 0x30
ja 0x10151231
mov eax, dword [edi + esi*8]
bswap eax
mov ecx, dword [ebp - 0x34]
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 0x10151306
mov al, byte [edi + 0x30c]
test al, 1
jne 0x1015131c
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10205d16
add esp, 0x2c
pop esi
pop edi
pop ebx
pop ebp
ret
mov al, byte [0x102b323c]
cmp al, 2
je 0x1015133f
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 0x1015104e
lea edx, [eax + 0x1110]
cmp edx, dword [ebp - 0x28]
mov edx, eax
jb 0x1015104e
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x24]
cmp byte [eax + ecx + 0x11], 0
jne 0x1015134c
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 0x101511bd
test eax, edx
jne 0x10151354
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 - 0x34]
jne 0x101511ff
push dword [ebp - 0x30]
push 0
push eax
call fcn.10208980
add esp, 0xc
cmp edi, esi
jbe 0x1015111a
mov al, byte [0x102b323c]
test al, al
jne 0x1015111a
mov ecx, 0x102b3220
push 1
call fcn.101a1290
jmp 0x1015111a
push ebx
call dword [sym.imp.kernel32.dll_SetLastError]
jmp 0x101510a3
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 0x1015129a
mov eax, esi
test esi, esi
jle 0x1015127b
pause
add eax, 0xffffffff
jne 0x10151271
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 0x10151262
push edx
call dword [sym.imp.kernel32.dll_AcquireSRWLockExclusive]
mov ecx, dword [ebp - 0x38]
mov eax, dword [ecx]
mov edx, dword [ebp - 0x34]
cmp eax, edx
je 0x10151359
bswap eax
mov dword [edx], eax
not eax
mov dword [edx + 4], eax
mov dword [ecx], edx
mov esi, dword [ebp - 0x30]
shl esi, 5
mov edx, dword [ebp - 0x24]
movzx eax, word [edx + esi + 0xc]
add eax, 0xffffffff
mov word [edx + esi + 0xc], ax
test ax, ax
jle 0x10151334
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 0x1015111a
lea ecx, [ebp - 0x18]
call fcn.101aaf80
jmp 0x1015111a
lea edx, [edi + esi*8]
movzx eax, al
shr eax, 1
mov ecx, edi
push eax
push edx
call fcn.101a35a0
jmp 0x1015110c
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10205d16
mov ecx, edi
add esp, 0x2c
pop esi
pop edi
pop ebx
pop ebp
jmp fcn.101a2dd0
lea eax, [ebp - 0x20]
push eax
call fcn.101aad90
jmp 0x101512de
call fcn.101a12f0
mov edx, dword [ebp - 0x2c]
jmp 0x10151139
add esi, 0x20
jmp 0x1015117e
call fcn.101a37b0
int3