Function at 0x1004e590
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x524
push ebx
push esi
push edi
push dword [0x100c7608]
mov dword [ebp - 0xc], 0
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
mov dword [ebp - 0x24], edi
test edi, edi
je 0x1004eabf
mov esi, dword [edi + 0x1b42c]
lea eax, [edi + 0x1b430]
mov ebx, dword [edi + 0x1b428]
mov dword [ebp - 8], eax
cmp esi, 5
jae 0x1004e602
mov edx, edi
mov ecx, eax
call fcn.1004f8d0
movzx eax, word [edi + 0x1b430]
mov ecx, esi
shl eax, cl
add esi, 8
or ebx, eax
lea eax, [edi + 0x1b430]
cmp esi, 5
jb 0x1004e5d6
lea eax, [edi + 0x1b430]
jmp 0x1004e605
mov dword [ebp - 8], eax
mov ecx, ebx
sub esi, 5
and ecx, 0x1f
shr ebx, 5
add ecx, 0x101
mov dword [ebp - 0x1c], ecx
cmp esi, 5
jae 0x1004e640
mov edi, edi
mov edx, edi
mov ecx, eax
call fcn.1004f8d0
mov ecx, dword [ebp - 8]
movzx eax, word [ecx]
mov ecx, esi
shl eax, cl
add esi, 8
or ebx, eax
mov eax, dword [ebp - 8]
cmp esi, 5
jb 0x1004e620
mov ecx, ebx
sub esi, 5
and ecx, 0x1f
shr ebx, 5
inc ecx
mov dword [ebp - 0x20], ecx
cmp esi, 4
jae 0x1004e687
lea eax, [edi + 0x1b430]
lea ebx, [ebx]
mov edx, edi
mov ecx, eax
call fcn.1004f8d0
movzx eax, word [edi + 0x1b430]
mov ecx, esi
shl eax, cl
add esi, 8
or ebx, eax
lea eax, [edi + 0x1b430]
cmp esi, 4
jb 0x1004e660
mov ecx, dword [ebp - 0x20]
mov eax, ebx
sub esi, 4
and eax, 0xf
shr ebx, 4
add eax, 4
cmp dword [ebp - 0x1c], 0x11e
mov dword [ebp - 8], eax
ja 0x1004eabf
cmp ecx, 0x20
ja 0x1004eabf
xor edx, edx
mov dword [ebp - 0x10], edx
test eax, eax
je 0x1004e710
cmp esi, 3
jae 0x1004e6e9
lea eax, [edi + 0x1b430]
mov edx, edi
mov ecx, eax
call fcn.1004f8d0
movzx eax, word [edi + 0x1b430]
mov ecx, esi
shl eax, cl
add esi, 8
or ebx, eax
lea eax, [edi + 0x1b430]
cmp esi, 3
jb 0x1004e6c2
mov edx, dword [ebp - 0x10]
mov eax, dword [edx*4 + 0x100b04f0]
mov ecx, ebx
inc edx
shr ebx, 3
and ecx, 7
mov dword [ebp - 0x10], edx
sub esi, 3
mov dword [ebp + eax*4 - 0x520], ecx
cmp edx, dword [ebp - 8]
jb 0x1004e6b7
cmp edx, 0x13
jae 0x1004e728
mov eax, dword [edx*4 + 0x100b04f0]
inc edx
mov dword [ebp + eax*4 - 0x520], 0
cmp edx, 0x13
jb 0x1004e710
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 7
push eax
lea eax, [ebp - 0xc]
mov edx, 0x13
push eax
push 0
push 0
push 0x13
lea ecx, [ebp - 0x520]
call fcn.1004dc80
add esp, 0x14
mov dword [ebp - 0x10], eax
test eax, eax
je 0x1004e781
mov ecx, dword [ebp - 0xc]
test ecx, ecx
je 0x1004eac4
mov esi, dword [ecx - 4]
sub ecx, 8
push ecx
call fcn.10086818
add esp, 4
mov ecx, esi
test esi, esi
jne 0x1004e762
mov eax, dword [ebp - 0x10]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x14]
movzx eax, word [ecx*2 + 0x100b0540]
mov dword [ebp - 0x28], eax
xor eax, eax
xor edx, edx
mov dword [ebp - 8], eax
mov dword [ebp - 4], edx
lea esp, [esp]
cmp esi, ecx
jae 0x1004e7d7
lea eax, [edi + 0x1b430]
lea ebx, [ebx]
mov edx, edi
mov ecx, eax
call fcn.1004f8d0
movzx eax, word [edi + 0x1b430]
mov ecx, esi
shl eax, cl
add esi, 8
or ebx, eax
lea eax, [edi + 0x1b430]
cmp esi, dword [ebp - 0x14]
jb 0x1004e7b0
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0xc]
and eax, ebx
lea eax, [ecx + eax*8]
movzx ecx, byte [eax + 1]
mov dword [ebp - 0x10], eax
sub esi, ecx
movzx eax, word [eax + 4]
shr ebx, cl
cmp eax, 0x10
jae 0x1004e803
mov dword [ebp + edx*4 - 0x520], eax
inc edx
jmp 0x1004e918
jne 0x1004e86e
cmp esi, 2
jae 0x1004e834
lea eax, [edi + 0x1b430]
mov edx, edi
mov ecx, eax
call fcn.1004f8d0
movzx eax, word [edi + 0x1b430]
mov ecx, esi
shl eax, cl
add esi, 8
or ebx, eax
lea eax, [edi + 0x1b430]
cmp esi, 2
jb 0x1004e810
mov edx, dword [ebp - 4]
mov ecx, ebx
mov edi, dword [ebp - 0x20]
and ecx, 3
add edi, dword [ebp - 0x1c]
add ecx, 3
mov eax, dword [ebp - 4]
add edx, ecx
shr ebx, 2
sub esi, 2
mov dword [ebp - 0x18], ecx
cmp edx, edi
ja 0x1004eabf
lea edi, [ebp - 0x520]
lea edi, [edi + eax*4]
mov eax, dword [ebp - 8]
rep stosd dword es:[edi], eax
jmp 0x1004e91b
cmp eax, 0x11
jne 0x1004e8b4
cmp esi, 3
jae 0x1004e8a4
lea eax, [edi + 0x1b430]
mov edi, edi
mov edx, edi
mov ecx, eax
call fcn.1004f8d0
movzx eax, word [edi + 0x1b430]
mov ecx, esi
shl eax, cl
add esi, 8
or ebx, eax
lea eax, [edi + 0x1b430]
cmp esi, 3
jb 0x1004e880
mov ecx, ebx
shr ebx, 3
and ecx, 7
add ecx, 3
sub esi, 3
jmp 0x1004e8f2
cmp esi, 7
jae 0x1004e8e4
lea eax, [edi + 0x1b430]
nop
mov edx, edi
mov ecx, eax
call fcn.1004f8d0
movzx eax, word [edi + 0x1b430]
mov ecx, esi
shl eax, cl
add esi, 8
or ebx, eax
lea eax, [edi + 0x1b430]
cmp esi, 7
jb 0x1004e8c0
mov ecx, ebx
shr ebx, 7
and ecx, 0x7f
add ecx, 0xb
sub esi, 7
mov edx, dword [ebp - 4]
mov edi, dword [ebp - 0x20]
add edx, ecx
add edi, dword [ebp - 0x1c]
mov eax, dword [ebp - 4]
mov dword [ebp - 0x18], ecx
cmp edx, edi
ja 0x1004eabf
lea edi, [ebp - 0x520]
lea edi, [edi + eax*4]
xor eax, eax
rep stosd dword es:[edi], eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x20]
add eax, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 4], edx
cmp edx, eax
jb 0x1004e7a0
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x1004e955
lea esp, [esp]
mov edi, dword [eax - 4]
sub eax, 8
push eax
call fcn.10086818
add esp, 4
mov eax, edi
test edi, edi
jne 0x1004e940
mov eax, dword [ebp - 0x24]
lea ecx, [ebp - 0x520]
mov dword [ebp - 0x14], 9
mov dword [eax + 0x1b428], ebx
mov ebx, dword [ebp - 0x1c]
mov edx, ebx
mov dword [eax + 0x1b42c], esi
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xc]
push eax
push 0x100c2cf0
push 0x100c2d70
push 0x101
call fcn.1004dc80
mov esi, dword [ebp - 0x14]
add esp, 0x14
mov edi, eax
test esi, esi
jne 0x1004e9a3
lea edi, [esi + 1]
jmp 0x1004e9ac
test edi, edi
je 0x1004e9d1
cmp edi, 1
jne 0x1004e9c8
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x1004e9c8
mov esi, dword [eax - 4]
sub eax, 8
push eax
call fcn.10086818
add esp, 4
mov eax, esi
test esi, esi
jne 0x1004e9b3
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x20]
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x10]
mov dword [ebp - 0x24], 6
push eax
push 0x100c2cb0
push 0x100c2d30
lea ecx, [ebp - 0x520]
push 0
lea ecx, [ecx + ebx*4]
call fcn.1004dc80
mov edi, eax
add esp, 0x14
mov eax, dword [ebp - 0x24]
test eax, eax
jne 0x1004ea16
cmp ebx, 0x101
jbe 0x1004ea16
lea edi, [eax + 1]
jmp 0x1004ea1f
test edi, edi
je 0x1004ea60
cmp edi, 1
jne 0x1004ea3b
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x1004ea3b
mov esi, dword [eax - 4]
sub eax, 8
push eax
call fcn.10086818
add esp, 4
mov eax, esi
test esi, esi
jne 0x1004ea26
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x1004e9c8
mov esi, dword [eax - 4]
sub eax, 8
push eax
call fcn.10086818
add esp, 4
mov eax, esi
test esi, esi
jne 0x1004ea42
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp - 0x10]
mov edx, edi
mov ebx, dword [ebp - 0xc]
mov ecx, ebx
push eax
push esi
call fcn.1004e1a0
add esp, 8
mov dword [ebp - 0x18], eax
test ebx, ebx
je 0x1004ea95
jmp 0x1004ea80
mov esi, dword [ebx - 4]
sub ebx, 8
push ebx
call fcn.10086818
add esp, 4
mov ebx, esi
test esi, esi
jne 0x1004ea80
test edi, edi
je 0x1004eab5
lea esp, [esp]
mov esi, dword [edi - 4]
sub edi, 8
push edi
call fcn.10086818
add esp, 4
mov edi, esi
test esi, esi
jne 0x1004eaa0
mov eax, dword [ebp - 0x18]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret