Function at 0x1004cbc0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x34
mov eax, dword [ecx + 0x804]
and dword [ebp - 0x40], 0
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x10], eax
mov eax, dword [ecx + 0x80c]
inc eax
mov dword [ecx + 0x80c], eax
add eax, dword [ecx + 0x808]
mov dword [ebp - 0x24], eax
mov eax, pe_nt_image_headers32
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
and dword [ebp - 0x34], 0
xor eax, eax
cmp eax, 2
je 0x1004ce0d
lea ecx, [eax + 1]
mov edx, dword [ebp + eax*8 - 0x40]
mov eax, dword [ebp + eax*8 - 0x3c]
xor ebx, ebx
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x1c], eax
mov eax, ebx
cmp ebx, 0x20
adc ebx, 0
lea edi, [eax*4]
cmp eax, 0x1f
ja 0x1004ce05
mov eax, dword [ebp - 0x20]
lea ecx, [edi + eax]
cmp ecx, 0xff
ja 0x1004ce36
mov eax, dword [ebp - 0x1c]
lea esi, [edi + eax]
cmp esi, 0x100
jae 0x1004ce34
mov edx, ecx
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x30], edx
mov edi, eax
mov ebx, dword [ecx + edx*4 + 0x400]
mov edx, 0x3fc
shl edi, 0xd
xor edi, eax
mov eax, dword [ebp - 0x24]
add edi, dword [ecx + esi*4 + 0x400]
mov esi, ebx
and esi, edx
add eax, dword [ecx + esi + 0x400]
mov esi, dword [ebp - 0x30]
add eax, edi
mov dword [ecx + esi*4 + 0x400], eax
shr eax, 8
and eax, edx
add ebx, dword [ecx + eax + 0x400]
mov eax, dword [ebp - 0x20]
mov dword [ecx + esi*4], ebx
mov esi, dword [ebp - 0x14]
or esi, 1
add eax, esi
cmp eax, 0x100
jae 0x1004ce45
add esi, dword [ebp - 0x1c]
cmp esi, 0x100
jae 0x1004ce49
mov ecx, dword [ebp - 0x18]
mov edx, edi
mov dword [ebp - 0x10], eax
shr edx, 6
xor edx, edi
mov edi, dword [ecx + eax*4 + 0x400]
add edx, dword [ecx + esi*4 + 0x400]
mov eax, 0x3fc
mov esi, edi
and esi, eax
add ebx, dword [ecx + esi + 0x400]
mov esi, dword [ebp - 0x10]
add ebx, edx
mov dword [ecx + esi*4 + 0x400], ebx
shr ebx, 8
and ebx, eax
mov eax, dword [ebp - 0x20]
add edi, dword [ecx + ebx + 0x400]
mov dword [ecx + esi*4], edi
mov esi, dword [ebp - 0x14]
or esi, 2
lea ecx, [esi + eax]
cmp ecx, 0x100
jae 0x1004ce5c
add esi, dword [ebp - 0x1c]
cmp esi, 0x100
jae 0x1004ce5a
lea eax, [edx*4]
mov dword [ebp - 0x10], ecx
xor eax, edx
mov edx, dword [ebp - 0x18]
mov ebx, dword [edx + ecx*4 + 0x400]
add eax, dword [edx + esi*4 + 0x400]
mov ecx, edx
mov esi, 0x3fc
mov edx, ebx
and edx, esi
add edi, dword [ecx + edx + 0x400]
mov edx, dword [ebp - 0x10]
add edi, eax
mov dword [ecx + edx*4 + 0x400], edi
shr edi, 8
and edi, esi
add ebx, dword [ecx + edi + 0x400]
mov edi, dword [ebp - 0x14]
mov dword [ecx + edx*4], ebx
mov ecx, dword [ebp - 0x20]
or edi, 3
add ecx, edi
cmp ecx, 0x100
jae 0x1004ce6d
add edi, dword [ebp - 0x1c]
cmp edi, 0x100
jae 0x1004ce6b
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x14], ecx
mov esi, eax
shr esi, 0x10
xor esi, eax
mov ecx, dword [edx + ecx*4 + 0x400]
add esi, dword [edx + edi*4 + 0x400]
mov edi, 0x3fc
mov eax, ecx
mov dword [ebp - 0x10], esi
and eax, edi
add ebx, dword [edx + eax + 0x400]
mov eax, dword [ebp - 0x14]
add ebx, esi
mov dword [edx + eax*4 + 0x400], ebx
shr ebx, 8
and ebx, edi
add ecx, dword [edx + ebx + 0x400]
mov ebx, dword [ebp - 0x2c]
mov dword [ebp - 0x24], ecx
mov dword [edx + eax*4], ecx
jmp 0x1004cc1f
mov eax, dword [ebp - 0x28]
jmp 0x1004cc00
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x24]
mov dword [eax + 0x804], ecx
mov dword [eax + 0x808], edx
mov dword [eax + 0x800], 0x100
add esp, 0x34
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, esi
mov edx, 0x100
push 0x101b7fe8
call dbg.panic_bounds_check
mov ecx, eax
jmp 0x1004ce4b
mov ecx, esi
mov edx, 0x100
push 0x101b7ff8
call dbg.panic_bounds_check
mov ecx, esi
mov edx, 0x100
push 0x101b8008
call dbg.panic_bounds_check
mov ecx, edi
mov edx, 0x100
push 0x101b8018
call dbg.panic_bounds_check