Function at 0x1c6f820
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x18
mov esi, ecx
mov eax, dword [0x1d01324]
xor eax, ebp
mov dword [ebp - 0x10], eax
mov eax, dword [0x1d0b680]
mov ecx, dword [0x1d04a8c]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x1c6fb16
mov eax, 0x20
mov ecx, 0x20
test esi, esi
je 0x1c6f86a
bsr ecx, esi
xor ecx, 0x1f
sub eax, ecx
mov cl, byte [eax + 0x1ce7c20]
mov edx, esi
shr edx, cl
and edx, 7
mov ecx, dword [eax*4 + 0x1ce7c44]
mov dword [ebp - 0x24], esi
and ecx, esi
lea eax, [edx + eax*8]
cmp ecx, 1
sbb eax, 0xffffffff
mov byte [ebp - 0x19], 0
cmp byte [0x1d0a4e0], 2
jne 0x1c6f8a1
mov cl, byte [0x1d021a4]
movzx esi, word [eax + eax + 0x1ce7a0c]
cmp byte [0x1d0a4e2], 0
je 0x1c6f96e
mov ebx, dword [0x1d0b694]
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 0x1c6f9c3
cmp ebx, 1
jbe 0x1c6f9d3
add dword [ebx + 0x308], 1
adc dword [ebx + 0x30c], 0
add dword [ebx + esi*8 + 0x7b8], 1
adc dword [ebx + esi*8 + 0x7bc], 0
add dword [ebx + 0x318], 1
adc dword [ebx + 0x31c], 0
cmp word [0x1d021a8], si
jb 0x1c6fa2b
cmp dword [ebx + esi*8], 0
je 0x1c6fae6
add dword [ebx + 0x320], 1
adc dword [ebx + 0x324], 0
mov edi, dword [ebx + esi*8]
mov eax, dword [edi]
test eax, eax
je 0x1c6f946
mov ecx, eax
not ecx
cmp dword [edi + 4], ecx
je 0x1c6f948
call fcn.01c56c20
xor eax, eax
bswap eax
add byte [ebx + esi*8 + 4], 0xff
mov dword [ebx + esi*8], eax
test edi, edi
je 0x1c6fa47
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.01cb3141
mov eax, edi
add esp, 0x18
pop esi
pop edi
pop ebx
pop ebp
ret
shl esi, 5
lea ebx, [esi + 0x1d0a4f0]
mov esi, 1
mov dword [ebp - 0x20], 0
mov edi, dword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
push 0x1d0a4e8
call edi
test al, al
jne 0x1c6fa9d
mov eax, esi
test esi, esi
jle 0x1c6f9a8
pause
add eax, 0xffffffff
jne 0x1c6f99e
add dword [ebp - 0x20], esi
add esi, esi
cmp esi, 0x40
mov eax, 0x40
cmovge esi, eax
cmp dword [ebp - 0x20], 0x3e8
jl 0x1c6f989
jmp 0x1c6fa93
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp ebx, 1
ja 0x1c6f8de
je 0x1c6fa47
mov byte [0x1d0a4e2], 0
push 0x1d0a4e0
call fcn.01c74450
add esp, 4
mov ebx, eax
mov byte [0x1d0a4e2], 1
add dword [eax + 0x308], 1
adc dword [eax + 0x30c], 0
add dword [eax + esi*8 + 0x7b8], 1
adc dword [eax + esi*8 + 0x7bc], 0
add dword [eax + 0x318], 1
adc dword [eax + 0x31c], 0
cmp word [0x1d021a8], si
jae 0x1c6f917
add dword [ebx + 0x338], 1
adc dword [ebx + 0x33c], 0
add dword [ebx + 0x328], 1
adc dword [ebx + 0x32c], 0
shl esi, 5
lea ebx, [esi + 0x1d0a4f0]
mov esi, 1
mov dword [ebp - 0x20], 0
mov edi, dword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
push 0x1d0a4e8
call edi
test al, al
jne 0x1c6fa9d
mov eax, esi
test esi, esi
jle 0x1c6fa7d
pause
add eax, 0xffffffff
jne 0x1c6fa73
add dword [ebp - 0x20], esi
add esi, esi
cmp esi, 0x40
mov eax, 0x40
cmovge esi, eax
cmp dword [ebp - 0x20], 0x3e8
jl 0x1c6fa62
mov ecx, 0x1d0a4e8
call fcn.01c76bc0
mov eax, dword [ebx]
mov edi, dword [eax]
test edi, edi
je 0x1c6fbef
mov byte [ebp - 0x19], 0
mov ecx, dword [edi]
test ecx, ecx
je 0x1c6fac1
mov edx, ecx
not edx
cmp dword [edi + 4], edx
je 0x1c6fac3
jmp 0x1c6f941
xor ecx, ecx
bswap ecx
mov dword [eax], ecx
add word [eax + 0xc], 1
push 0x1d0a4e8
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
test edi, edi
jne 0x1c6f95a
xor edi, edi
jmp 0x1c6f95a
movdqu xmm0, xmmword [ebx + 0x328]
pcmpeqd xmm1, xmm1
psubq xmm0, xmm1
movdqu xmmword [ebx + 0x328], xmm0
mov ecx, ebx
push esi
call fcn.01c748f0
mov edi, dword [ebx + esi*8]
test edi, edi
jne 0x1c6f932
jmp 0x1c6fa47
push 0x1d0b680
call fcn.01cb3187
add esp, 4
cmp dword [0x1d0b680], 0xffffffff
jne 0x1c6f856
mov dword [ebp - 0x18], 0x1000000
mov byte [ebp - 0x14], 0
mov dword [0x1d0a4e0], 0x1000000
mov byte [0x1d0a4e7], 1
mov dword [0x1d0a4e8], 0
push 0x1100
push 0
push 0x1d0a4f0
call fcn.01cb76e0
add esp, 0xc
mov byte [0x1d0b610], 0
mov dword [0x1d0b67c], 0
pxor xmm0, xmm0
movdqu xmmword [0x1d0b614], xmm0
movdqu xmmword [0x1d0b624], xmm0
movdqu xmmword [0x1d0b634], xmm0
movdqu xmmword [0x1d0b644], xmm0
movdqu xmmword [0x1d0b654], xmm0
movdqu xmmword [0x1d0b664], xmm0
mov dword [0x1d0b676], 0
mov dword [0x1d0b672], 0
sub esp, 8
mov al, byte [ebp - 0x14]
mov byte [esp + 4], al
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov ecx, 0x1d0a4e0
call fcn.01c74c60
push 0x1d0b680
call fcn.01cb31fd
add esp, 4
jmp 0x1c6f856
lea eax, [ebp - 0x19]
mov ecx, ebx
push eax
push dword [ebp - 0x24]
push 0
push 0x1d0a4e0
call fcn.01c76d00
mov edi, eax
jmp 0x1c6facc