Function at 0x1019fd40
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x2c
mov esi, edx
mov edi, ecx
mov eax, dword [0x102b0014]
xor eax, ebp
mov dword [ebp - 0x10], eax
cmp ecx, 8
ja 0x1019fe65
lea eax, [edi - 1]
test edi, eax
sete al
test edi, edi
setne cl
test cl, al
je 0x101a04fc
mov ebx, dword [0x102b7ed0]
test ebx, ebx
je 0x101a0145
mov eax, 0x20
mov ecx, 0x20
test esi, esi
je 0x1019fd97
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 - 0x34], esi
and ecx, esi
lea esi, [edx + eax*8]
cmp ecx, 1
sbb esi, 0xffffffff
mov byte [ebp - 0x19], 0
mov dword [ebp - 0x18], 0xffffffff
cmp byte [ebx], 2
jne 0x1019fdd8
mov al, byte [0x102b323c]
cmp al, 2
je 0x101a0481
movzx esi, word [esi + esi + 0x10263fcc]
cmp byte [ebx + 2], 0
mov dword [ebp - 0x20], ebx
je 0x101a0047
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 0x101a023d
cmp edi, 2
jb 0x101a024d
add dword [edi + 0x310], 1
adc dword [edi + 0x314], 0
cmp si, 0x31
mov ebx, dword [ebp - 0x20]
jae 0x101a0290
cmp dword [edi + esi*8], 0
je 0x101a0419
add dword [edi + 0x318], 1
adc dword [edi + 0x31c], 0
mov eax, dword [edi + esi*8]
mov edx, dword [eax]
test edx, edx
je 0x1019fec9
mov ecx, edx
not ecx
cmp dword [eax + 4], ecx
jne 0x101a0414
bswap edx
prefetcht0 byte [edx]
jmp 0x1019fecb
mov eax, dword [0x102b7ed0]
mov dword [ebp - 0x20], eax
test eax, eax
je 0x101a0151
lea edx, [edi - 1]
test edi, edx
sete al
test edi, edi
setne cl
test cl, al
je 0x101a04ff
cmp edi, 0x100001
jae 0x101a0502
cmp edi, 0x4001
jb 0x1019feaa
cmp esi, 0xf0001
jae 0x101a0505
cmp edi, 0x4000
jbe 0x1019feb6
mov ebx, esi
jmp 0x1019ff12
cmp esi, edi
jb 0x1019ff03
mov eax, esi
add eax, 0xffffffff
je 0x1019fef5
bsr ecx, eax
xor ecx, 0x1f
jmp 0x1019fefa
bswap edx
add byte [edi + esi*8 + 4], 0xff
mov dword [edi + esi*8], edx
movzx ecx, word [edi + esi*8 + 6]
mov dword [ebp - 0x18], ecx
movzx ecx, word [edi + esi*8 + 6]
sub dword [edi + 0x308], ecx
test eax, eax
je 0x101a02ac
mov esi, eax
jmp 0x101a0033
mov ecx, 0x20
neg cl
mov edi, 1
shl edi, cl
mov ebx, edi
mov edi, 0x4000
cmp ebx, esi
jb 0x101a048b
mov eax, 0x20
mov ecx, 0x20
test ebx, ebx
je 0x1019ff26
bsr ecx, ebx
xor ecx, 0x1f
mov dword [ebp - 0x34], edx
sub eax, ecx
mov cl, byte [eax + 0x102641e0]
mov edx, ebx
shr edx, cl
and edx, 7
mov ecx, dword [eax*4 + 0x10264204]
mov dword [ebp - 0x24], ebx
and ecx, ebx
lea esi, [edx + eax*8]
cmp ecx, 1
sbb esi, 0xffffffff
mov byte [ebp - 0x19], 0
mov dword [ebp - 0x18], 0xffffffff
mov eax, dword [ebp - 0x20]
cmp byte [eax], 2
jne 0x1019ff6d
mov al, byte [0x102b323c]
cmp al, 2
je 0x101a0491
movzx ebx, word [esi + esi + 0x10263fcc]
mov eax, dword [ebp - 0x20]
cmp byte [eax + 2], 0
je 0x101a00ac
cmp edi, 0x4000
ja 0x101a00ac
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 0x101a0266
cmp esi, 2
jb 0x101a0276
add dword [esi + 0x310], 1
adc dword [esi + 0x314], 0
cmp bx, 0x31
jae 0x101a0356
cmp dword [esi + ebx*8], 0
je 0x101a044d
add dword [esi + 0x318], 1
adc dword [esi + 0x31c], 0
mov eax, dword [esi + ebx*8]
mov edx, dword [eax]
test edx, edx
je 0x101a0003
mov ecx, edx
not ecx
cmp dword [eax + 4], ecx
jne 0x101a0414
bswap edx
prefetcht0 byte [edx]
jmp 0x101a0005
bswap edx
add byte [esi + ebx*8 + 4], 0xff
mov dword [esi + ebx*8], edx
movzx ecx, word [esi + ebx*8 + 6]
mov dword [ebp - 0x18], ecx
movzx ecx, word [esi + ebx*8 + 6]
sub dword [esi + 0x308], ecx
test eax, eax
je 0x101a0372
test dword [ebp - 0x34], eax
mov esi, eax
jne 0x101a0508
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10205d16
mov eax, esi
add esp, 0x2c
pop esi
pop edi
pop ebx
pop ebp
ret
shl esi, 5
add esi, ebx
add esi, 0x10
lea eax, [ebx + 8]
mov dword [ebp - 0x24], 1
mov dword [ebp - 0x28], 0
mov edi, dword [sym.imp.kernel32.dll_TryAcquireSRWLockExclusive]
mov ebx, eax
push eax
call edi
test al, al
jne 0x101a030f
mov ecx, dword [ebp - 0x24]
mov eax, ecx
test ecx, ecx
jle 0x101a0089
pause
add eax, 0xffffffff
jne 0x101a007c
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 0x101a0066
jmp 0x101a0308
shl ebx, 5
mov eax, dword [ebp - 0x20]
lea ecx, [eax + ebx]
add ecx, 0x10
mov dword [ebp - 0x30], ecx
add eax, 8
mov dword [ebp - 0x2c], 1
mov dword [ebp - 0x38], 0
mov esi, dword [sym.imp.kernel32.dll_TryAcquireSRWLockExclusive]
mov ebx, 0x40
mov dword [ebp - 0x28], eax
push eax
call esi
test al, al
jne 0x101a011b
mov ecx, dword [ebp - 0x2c]
mov eax, ecx
test ecx, ecx
jle 0x101a00fa
pause
add eax, 0xffffffff
jne 0x101a00ea
mov eax, dword [ebp - 0x38]
add eax, dword [ebp - 0x2c]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x2c]
add eax, eax
cmp eax, 0x40
cmovge eax, ebx
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x38], 0x3e8
mov eax, dword [ebp - 0x28]
jl 0x101a00da
push eax
call dword [sym.imp.kernel32.dll_AcquireSRWLockExclusive]
mov ecx, dword [ebp - 0x30]
mov eax, dword [ecx]
mov edx, dword [eax]
test edx, edx
setne bl
cmp edi, 0x4001
jae 0x101a04c4
test bl, bl
jne 0x101a03db
lea eax, [ebp - 0x19]
push eax
push edi
jmp 0x101a04de
call fcn.101a1180
mov ebx, eax
jmp 0x1019fd83
mov cl, 1
xor eax, eax
lock cmpxchg byte [0x102b9080], cl
jne 0x101a0153
mov eax, dword [0x102b7ed0]
mov dword [ebp - 0x20], eax
test eax, eax
jne 0x101a0231
mov dword [ebp - 0x18], 0x10101
mov byte [ebp - 0x14], 0
mov dword [0x102b7ed8], 0x1000000
mov byte [0x102b7edf], 1
mov dword [0x102b7ee0], 0
push 0x1100
push 0
push 0x102b7ee8
call fcn.10208980
add esp, 0xc
mov byte [0x102b9008], 0
mov dword [0x102b9074], 0
mov dword [0x102b9078], 0
xorps xmm0, xmm0
movups xmmword [0x102b900c], xmm0
movups xmmword [0x102b901c], xmm0
movups xmmword [0x102b902c], xmm0
movups xmmword [0x102b903c], xmm0
movups xmmword [0x102b904c], xmm0
movups xmmword [0x102b905c], xmm0
mov dword [0x102b906e], 0
mov dword [0x102b906a], 0
sub esp, 8
mov al, byte [ebp - 0x14]
mov byte [esp + 4], al
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov ebx, 0x102b7ed8
mov ecx, 0x102b7ed8
call fcn.101a1420
mov dword [ebp - 0x20], 0x102b7ed8
mov dword [0x102b7ed0], ebx
mov byte [0x102b9080], 0
jmp 0x1019fe75
push ebx
call dword [sym.imp.kernel32.dll_SetLastError]
cmp edi, 2
jae 0x1019fe15
lea eax, [ebp - 0x18]
mov ebx, dword [ebp - 0x20]
mov ecx, ebx
push eax
push esi
call fcn.101a1710
test eax, eax
jne 0x1019feee
jmp 0x101a02ac
push edi
call dword [sym.imp.kernel32.dll_SetLastError]
cmp esi, 2
jae 0x1019ffb6
lea eax, [ebp - 0x18]
mov ecx, dword [ebp - 0x20]
push eax
push ebx
call fcn.101a1710
test eax, eax
jne 0x101a0028
jmp 0x101a0372
add dword [edi + 0x330], 1
adc dword [edi + 0x334], 0
add dword [edi + 0x320], 1
adc dword [edi + 0x324], 0
shl esi, 5
add esi, ebx
add esi, 0x10
lea eax, [ebx + 8]
mov dword [ebp - 0x24], 1
mov dword [ebp - 0x28], 0
mov edi, dword [sym.imp.kernel32.dll_TryAcquireSRWLockExclusive]
mov ebx, eax
push eax
call edi
test al, al
jne 0x101a030f
mov ecx, dword [ebp - 0x24]
mov eax, ecx
test ecx, ecx
jle 0x101a02ea
pause
add eax, 0xffffffff
jne 0x101a02dd
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 0x101a02cb
push eax
call dword [sym.imp.kernel32.dll_AcquireSRWLockExclusive]
mov eax, dword [esi]
mov edx, dword [eax]
test edx, edx
je 0x101a049b
mov byte [ebp - 0x19], 0
mov ecx, dword [edx]
test ecx, ecx
je 0x101a033d
mov esi, edx
mov edx, ecx
not edx
cmp dword [esi + 4], edx
jne 0x101a0414
mov edx, esi
bswap ecx
prefetcht0 byte [ecx]
jmp 0x101a033f
bswap ecx
mov esi, edx
mov dword [eax], ecx
add word [eax + 0xc], 1
push ebx
call dword [sym.imp.kernel32.dll_ReleaseSRWLockExclusive]
mov eax, esi
jmp 0x1019feee
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 - 0x20]
lea esi, [eax + ebx]
add esi, 0x10
add eax, 8
mov edi, 1
mov dword [ebp - 0x30], 0
mov ebx, dword [sym.imp.kernel32.dll_TryAcquireSRWLockExclusive]
mov dword [ebp - 0x28], eax
push eax
call ebx
test al, al
jne 0x101a03cf
mov ecx, edi
mov eax, edi
test edi, edi
jle 0x101a03af
pause
add eax, 0xffffffff
jne 0x101a03a5
add dword [ebp - 0x30], edi
add edi, edi
cmp edi, 0x40
mov eax, 0x40
cmovge edi, eax
cmp dword [ebp - 0x30], 0x3e8
mov eax, dword [ebp - 0x28]
jl 0x101a0396
push eax
call dword [sym.imp.kernel32.dll_AcquireSRWLockExclusive]
mov eax, dword [esi]
mov edx, dword [eax]
test edx, edx
je 0x101a04d3
mov byte [ebp - 0x19], 0
mov ecx, dword [edx]
test ecx, ecx
je 0x101a03f9
mov esi, edx
mov edx, ecx
not edx
cmp dword [esi + 4], edx
jne 0x101a0414
mov edx, esi
bswap ecx
prefetcht0 byte [ecx]
jmp 0x101a03fb
bswap ecx
mov esi, edx
mov dword [eax], ecx
add word [eax + 0xc], 1
push dword [ebp - 0x28]
call dword [sym.imp.kernel32.dll_ReleaseSRWLockExclusive]
mov eax, esi
jmp 0x101a0028
call fcn.1002c4d0
add dword [edi + 0x328], 1
adc dword [edi + 0x32c], 0
add dword [edi + 0x320], 1
adc dword [edi + 0x324], 0
mov ecx, edi
push esi
call fcn.101a3420
mov eax, dword [edi + esi*8]
test eax, eax
jne 0x1019fe4b
jmp 0x101a02ac
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 eax, dword [esi + ebx*8]
test eax, eax
jne 0x1019ffe9
jmp 0x101a0372
call fcn.101a12f0
jmp 0x1019fdd8
push esi
call fcn.101e3c80
call fcn.101a12f0
jmp 0x1019ff6d
lea eax, [ebp - 0x19]
mov ecx, esi
push eax
push 0x4000
push dword [ebp - 0x34]
push 0
push dword [ebp - 0x20]
call fcn.1002bc80
mov esi, eax
test eax, eax
jne 0x101a0348
xor esi, esi
jmp 0x101a0348
xor ebx, ebx
test bl, bl
jne 0x101a03db
jmp 0x101a013b
lea eax, [ebp - 0x19]
mov ecx, esi
push eax
push 0x4000
push dword [ebp - 0x24]
push 0
push dword [ebp - 0x20]
call fcn.1002bc80
mov esi, eax
test eax, eax
jne 0x101a0404
xor esi, esi
jmp 0x101a0404
int3
int3
int3
int3
int3