Function at 0x1000e380
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 4
mov eax, dword [0x1002b150]
push ebx
push esi
push edi
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
mov eax, dword [esp + 0x24]
cmp eax, 5
ja case.default.0x1000e39e
jmp dword [eax*4 + 0x1000e6b8]
mov eax, 0xffffffc5
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov esi, dword [esp + 0x20]
mov eax, dword [esi]
test eax, eax
je 0x1000e3de
cmp dword [edi + 0x5e84], eax
jb 0x1000e47d
add dword [edi + 0x5e9c], eax
mov eax, dword [esi]
sub dword [edi + 0x5e84], eax
mov eax, dword [esi]
add dword [edi + 0x5e7c], eax
cmp dword [edi + 0x5e84], 0
jne 0x1000e45f
mov eax, dword [0x1002b150]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [eax + 0x5e84]
mov ebx, eax
mov eax, dword [eax + 0x5e80]
cmp ecx, eax
jae 0x1000e455
sub eax, ecx
lea ebp, [ebx + 0x5e78]
push 0
lea ecx, [ebx + 0x5e80]
push ecx
mov dword [ebx + 0x5e80], eax
push 0xffffffffffffffff
add dword [ebx + 0x5e74], eax
push ebp
call dword [ebx + 0x5d18]
add esp, 0x10
test eax, eax
jne 0x1000e6a6
cmp dword [ebp], 0
je 0x1000e48a
mov eax, dword [ebx + 0x5e80]
test eax, eax
je 0x1000e48a
mov dword [ebx + 0x5e84], eax
mov eax, dword [ebp]
mov dword [ebx + 0x5e7c], eax
xor eax, eax
test eax, eax
jne 0x1000e6a6
mov eax, dword [edi + 0x5e7c]
mov ecx, dword [esp + 0x18]
pop ebp
mov dword [ecx], eax
mov edx, dword [edi + 0x5e84]
xor eax, eax
pop edi
mov dword [esi], edx
pop esi
pop ebx
add esp, 4
ret
mov eax, 0xffffffc5
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov eax, 0xffffffde
jmp 0x1000e457
mov esi, dword [esp + 0x20]
mov ecx, dword [esp + 0x18]
mov eax, dword [0x1002b150]
mov dword [esp + 0x10], ecx
mov ebx, dword [esi]
push eax
mov esi, dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebp, eax
cmp esi, 0xffffffff
jne 0x1000e4c8
mov esi, dword [ebp + 0x5e74]
sub esi, dword [ebp + 0x5e84]
add esi, dword [ebp + 0x5e80]
mov edx, dword [ebp + 0x5e80]
test edx, edx
jne 0x1000e4e4
push esi
call fcn.1000e1d0
add esp, 4
test eax, eax
je 0x1000e52e
jmp 0x1000e5e7
mov ecx, dword [ebp + 0x5e74]
mov eax, ecx
sub eax, dword [ebp + 0x5e84]
add eax, edx
cmp ecx, esi
jg 0x1000e51d
cmp esi, eax
jg 0x1000e51d
lea edi, [ebx + esi]
cmp edi, eax
jl 0x1000e51d
sub esi, ecx
sub edx, esi
mov dword [ebp + 0x5e84], edx
mov eax, dword [ebp + 0x5e78]
add eax, esi
mov dword [ebp + 0x5e7c], eax
jmp 0x1000e52e
push esi
call fcn.1000e1d0
add esp, 4
test eax, eax
jne 0x1000e5ef
test ebx, ebx
je 0x1000e5e5
cmp dword [ebp + 0x5e84], 0
jne 0x1000e5a9
mov eax, dword [0x1002b150]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [eax + 0x5e84]
lea edi, [eax + 0x5e80]
mov esi, eax
mov eax, dword [edi]
cmp ecx, eax
jae 0x1000e5a3
sub eax, ecx
push 0
push edi
lea ecx, [esi + 0x5e78]
push 0xffffffffffffffff
mov dword [edi], eax
push ecx
add dword [esi + 0x5e74], eax
call dword [esi + 0x5d18]
add esp, 0x10
test eax, eax
jne 0x1000e5e7
cmp dword [esi + 0x5e78], 0
je 0x1000e5f7
mov eax, dword [edi]
test eax, eax
je 0x1000e5f7
mov dword [esi + 0x5e84], eax
mov eax, dword [esi + 0x5e78]
mov dword [esi + 0x5e7c], eax
xor eax, eax
test eax, eax
jne 0x1000e5ef
mov eax, dword [ebp + 0x5e84]
cmp eax, ebx
jb 0x1000e5b5
mov eax, ebx
mov edi, dword [ebp + 0x5e7c]
mov esi, dword [esp + 0x10]
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
add dword [ebp + 0x5e7c], eax
add dword [esp + 0x10], eax
sub dword [ebp + 0x5e84], eax
sub ebx, eax
jne 0x1000e536
xor eax, eax
test eax, eax
je 0x1000e6a4
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov eax, 0xffffffde
jmp 0x1000e5a5
mov eax, dword [0x1002b150]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [eax + 0x5e80]
sub ecx, dword [eax + 0x5e84]
add ecx, dword [eax + 0x5e74]
add ecx, dword [esp + 0x1c]
push ecx
call fcn.1000e1d0
add esp, 4
mov ecx, eax
mov eax, 0
cmp ecx, 1
adc eax, 0xffffffff
and eax, ecx
je 0x1000e6a4
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov eax, dword [0x1002b150]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [eax + 0x5e84]
lea edi, [eax + 0x5e80]
mov esi, eax
mov eax, dword [edi]
cmp ecx, eax
jae 0x1000e69e
sub eax, ecx
lea ebx, [esi + 0x5e78]
push 0
mov dword [edi], eax
push edi
add dword [esi + 0x5e74], eax
push 0xffffffffffffffff
push ebx
call dword [esi + 0x5d18]
add esp, 0x10
test eax, eax
jne 0x1000e6a6
cmp dword [ebx], 0
je 0x1000e6ae
mov eax, dword [edi]
test eax, eax
je 0x1000e6ae
mov dword [esi + 0x5e84], eax
mov eax, dword [ebx]
mov dword [esi + 0x5e7c], eax
xor eax, eax
test eax, eax
jne 0x1000e6a6
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov eax, 0xffffffde
jmp 0x1000e6a0