Function at 0x1c6fe20
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x28
mov ebx, 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 0x1c70131
test ebx, ebx
je 0x1c6ff5d
mov eax, ebx
and eax, 0xffe00000
mov ecx, ebx
shr ecx, 9
and ecx, 0xfe0
lea edi, [eax + ecx]
add edi, 0x1000
movzx ecx, word [eax + ecx + 0x101e]
mov edx, ecx
neg edx
mov dword [ebp - 0x24], edx
shl ecx, 5
mov edx, edi
sub edx, ecx
mov dword [ebp - 0x34], edx
mov ecx, edx
and ecx, 0xfffff000
mov ecx, dword [ecx]
cmp byte [ecx], 2
je 0x1c6ff6f
mov dword [ebp - 0x2c], ebx
cmp byte [ecx + 2], 0
mov dword [ebp - 0x30], edi
je 0x1c70027
mov eax, dword [ebp - 0x24]
shl eax, 5
mov ebx, dword [edi + eax + 8]
cmp byte [ebx + 0x10], 0
je 0x1c70027
mov dword [ebp - 0x28], ecx
mov esi, dword [0x1d0b694]
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 0x1c7000d
cmp esi, 2
mov ecx, dword [ebp - 0x28]
jb 0x1c70027
sub ebx, ecx
add ebx, 0xfffffff0
sar ebx, 5
add dword [esi + 0x340], 1
adc dword [esi + 0x344], 0
movzx eax, word [0x1d021a8]
cmp ebx, eax
ja 0x1c70019
mov eax, dword [esi + ebx*8]
bswap eax
mov ecx, dword [ebp - 0x2c]
mov dword [ecx], eax
not eax
mov dword [ecx + 4], eax
mov dword [esi + ebx*8], ecx
add byte [esi + ebx*8 + 4], 1
add dword [esi + 0x348], 1
adc dword [esi + 0x34c], 0
mov al, byte [esi + ebx*8 + 5]
cmp byte [esi + ebx*8 + 4], al
ja 0x1c700ea
mov al, byte [esi + 0x310]
test al, 1
jne 0x1c70100
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.01cb3141
add esp, 0x28
pop esi
pop edi
pop ebx
pop ebp
ret
mov edx, dword [ebp - 0x24]
shl edx, 5
mov edx, dword [edi + edx + 8]
cmp byte [edx + 0x10], 0
je 0x1c6fea5
mov ecx, dword [edx + 0xc]
mov dword [ebp - 0x24], ecx
mov ecx, dword [0x1d0219c]
and ecx, 1
shl ecx, 0xf
lea edx, [ecx + eax]
lea esi, [ecx + eax]
add esi, 0x4000
mov edi, ebx
shr edi, 8
and edi, 0x1fff
shr bl, 3
mov ecx, ebx
mov ebx, 1
shl ebx, cl
mov eax, dword [edx + edi*4 + 0x4000]
mov ecx, eax
or ecx, ebx
lock cmpxchg dword [esi + edi*4], ecx
jne 0x1c6ffbf
test eax, ebx
jne 0x1c70176
mov ecx, dword [ebp - 0x24]
mov eax, ecx
lock xadd dword [0x1d02194], eax
add eax, ecx
mov ecx, dword [0x1d02198]
cmp eax, ecx
jbe 0x1c6ff5d
mov al, byte [0x1d021a4]
test al, al
jne 0x1c6ff5d
mov ecx, 0x1d02194
push 1
call fcn.01c6f200
jmp 0x1c6ff5d
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1c6feeb
add dword [esi + 0x350], 1
adc dword [esi + 0x354], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
add ecx, 8
mov esi, 1
mov dword [ebp - 0x28], 0
mov ebx, dword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
mov edi, ecx
push ecx
call ebx
test al, al
jne 0x1c70080
mov eax, esi
test esi, esi
jle 0x1c70063
pause
add eax, 0xffffffff
jne 0x1c70059
add dword [ebp - 0x28], esi
add esi, esi
cmp esi, 0x40
mov eax, 0x40
cmovge esi, eax
cmp dword [ebp - 0x28], 0x3e8
mov ecx, edi
jl 0x1c7004a
call fcn.01c76bc0
mov ebx, dword [ebp - 0x34]
mov eax, dword [ebx]
mov esi, dword [ebp - 0x2c]
cmp eax, esi
mov ecx, edi
je 0x1c7010c
bswap eax
mov dword [esi], eax
not eax
mov dword [esi + 4], eax
mov dword [ebx], esi
mov esi, dword [ebp - 0x24]
shl esi, 5
mov edx, dword [ebp - 0x30]
movzx eax, word [edx + esi + 0xc]
add eax, 0xffffffff
mov word [edx + esi + 0xc], ax
test ax, ax
jle 0x1c70122
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 ecx
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
test esi, esi
je 0x1c6ff5d
lea ecx, [ebp - 0x18]
call fcn.01c77790
jmp 0x1c6ff5d
lea edx, [esi + ebx*8]
movzx eax, al
shr eax, 1
mov ecx, esi
push eax
push edx
call fcn.01c74a40
jmp 0x1c6ff4f
mov ecx, esi
call fcn.01c741c0
jmp 0x1c6ff5d
push str..._.._base_allocator_partition_allocator_partition_page.h_529__Check_failed:_slot_start___freelist_head
call fcn.01c4cf00
mov ecx, edi
add esp, 4
mov eax, dword [ebx]
jmp 0x1c7008e
lea eax, [ebp - 0x20]
mov ecx, ebx
push eax
call fcn.01c77590
mov ecx, edi
jmp 0x1c700c2
push 0x1d0b680
call fcn.01cb3187
add esp, 4
cmp dword [0x1d0b680], 0xffffffff
jne 0x1c6fe56
mov dword [ebp - 0x18], 0x1000000
mov byte [ebp - 0x14], 0
lea eax, [ebp - 0x18]
mov ecx, 0x1d0a4e0
push eax
call fcn.01c6fc10
push 0x1d0b680
call fcn.01cb31fd
add esp, 4
jmp 0x1c6fe56
call fcn.01c6d4f0
int3