Function at 0x1000e960
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0x10
mov eax, dword [0x1002b150]
push ebx
push esi
push edi
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
mov eax, dword [esp + 0x30]
mov eax, dword [eax]
cmp eax, 4
ja case.0x1000e980.17
jmp dword [eax*4 + 0x1000ed00]
mov eax, 0xffffffc5
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x10
ret
mov esi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x24]
mov edx, dword [0x1002b150]
mov dword [esp + 0x18], ecx
mov eax, dword [esi]
push edx
mov dword [esp + 0x14], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebp, eax
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x28]
push ecx
push eax
call fcn.1000e6d0
add esp, 8
test eax, eax
jne 0x1000eaff
cmp dword [esp + 0x10], 0
je 0x1000eaf5
cmp dword [ebp + 0x5e84], 0
jne 0x1000eab3
mov eax, dword [ebp + 0x5ea4]
add eax, dword [esp + 0x10]
cmp eax, 0xfffe
jb 0x1000e9fd
mov eax, 0xfffe
mov edi, 0xffffffff
mov dword [esp + 0x1c], eax
mov eax, dword [0x1002b150]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
mov eax, dword [eax + 0x5e74]
add eax, dword [esi + 0x5e80]
cmp edi, 0xffffffff
mov dword [esi + 0x5e74], eax
je 0x1000ea31
mov dword [esi + 0x5e74], edi
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x14]
push ecx
lea edx, [esi + 0x5e80]
push edx
mov dword [esi + 0x5e80], eax
push edi
lea eax, [esi + 0x5e78]
mov dword [esp + 0x20], 0
push eax
call dword [esi + 0x5cdc]
add esp, 0x10
test eax, eax
jne 0x1000eaf7
mov eax, dword [esi + 0x5e80]
test eax, eax
je 0x1000ea7b
cmp dword [esi + 0x5e78], 0
jne 0x1000ea89
cmp dword [esp + 0x14], 0
je 0x1000ea89
mov eax, 0xffffffde
jmp 0x1000ea9d
mov dword [esi + 0x5e84], eax
mov eax, dword [esi + 0x5e78]
mov dword [esi + 0x5e7c], eax
xor eax, eax
test eax, eax
jne 0x1000eaff
cmp dword [ebp + 0x5e78], 0
je 0x1000eb07
cmp dword [ebp + 0x5e80], 0
je 0x1000eb07
mov edx, dword [ebp + 0x5e84]
mov eax, dword [esp + 0x10]
cmp edx, eax
jb 0x1000eac3
mov edx, eax
mov edi, dword [esp + 0x18]
mov esi, dword [ebp + 0x5e7c]
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
add dword [ebp + 0x5e7c], edx
add dword [esp + 0x18], edx
sub dword [ebp + 0x5e84], edx
sub dword [esp + 0x10], edx
jne 0x1000e9da
xor eax, eax
test eax, eax
je 0x1000ece9
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x10
ret
mov eax, 0xffffffde
jmp 0x1000eaf7
mov eax, dword [0x1002b150]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [eax + 0x5e74]
push 0
sub ecx, dword [eax + 0x5e84]
add ecx, dword [eax + 0x5e80]
mov eax, dword [esp + 0x2c]
add eax, ecx
push eax
call fcn.1000e6d0
add esp, 8
mov ecx, 0
cmp eax, 1
adc ecx, 0xffffffff
and ecx, eax
je 0x1000ece9
mov eax, ecx
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x10
ret
mov esi, dword [esp + 0x2c]
mov eax, dword [esi]
mov dword [ebx + 0x5e9c], eax
mov ecx, dword [ebx + 0x5ea4]
mov dword [ebx + 0x5ea0], ecx
jmp 0x1000eb78
mov esi, dword [esp + 0x2c]
mov eax, dword [ebx + 0x5e84]
test eax, eax
je 0x1000ebcd
mov ecx, dword [ebx + 0x5e9c]
cmp ecx, eax
jb 0x1000eb8e
mov ecx, eax
mov dword [esi], ecx
mov ecx, dword [esp + 0x24]
mov eax, dword [ebx + 0x5e7c]
mov dword [ecx], eax
mov edx, dword [ebx + 0x5e9c]
cmp dword [esi], edx
jne 0x1000ebb0
mov eax, dword [esp + 0x30]
mov dword [eax], 1
mov eax, dword [esi]
sub dword [ebx + 0x5e9c], eax
mov eax, dword [esi]
sub dword [ebx + 0x5e84], eax
mov eax, dword [esi]
add dword [ebx + 0x5e7c], eax
jmp 0x1000ece9
mov eax, dword [ebx + 0x5ea0]
add eax, dword [ebx + 0x5e9c]
cmp eax, 0xfffe
jb 0x1000ebe5
mov eax, 0xfffe
mov ebp, 0xffffffff
mov dword [esp + 0x1c], eax
mov eax, dword [0x1002b150]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
mov eax, dword [eax + 0x5e74]
add eax, dword [edi + 0x5e80]
cmp ebp, 0xffffffff
mov dword [edi + 0x5e74], eax
je 0x1000ec19
mov dword [edi + 0x5e74], ebp
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x18]
push ecx
lea edx, [edi + 0x5e80]
push edx
mov dword [edi + 0x5e80], eax
push ebp
lea eax, [edi + 0x5e78]
mov dword [esp + 0x24], 0
push eax
call dword [edi + 0x5cdc]
add esp, 0x10
test eax, eax
jne 0x1000ecf5
mov eax, dword [edi + 0x5e80]
test eax, eax
je 0x1000ec63
cmp dword [edi + 0x5e78], 0
jne 0x1000ec71
cmp dword [esp + 0x18], 0
je 0x1000ec71
mov eax, 0xffffffde
jmp 0x1000ec85
mov dword [edi + 0x5e84], eax
mov eax, dword [edi + 0x5e78]
mov dword [edi + 0x5e7c], eax
xor eax, eax
test eax, eax
jne 0x1000ecf5
cmp dword [ebx + 0x5e80], 0
je 0x1000ec9b
cmp dword [ebx + 0x5e78], 0
jne 0x1000eca5
mov eax, dword [esp + 0x30]
mov dword [eax], 1
mov eax, dword [ebx + 0x5e78]
mov ecx, dword [esp + 0x24]
mov dword [ecx], eax
mov ecx, dword [ebx + 0x5e9c]
mov eax, dword [ebx + 0x5e80]
cmp ecx, eax
jb 0x1000ecc3
mov ecx, eax
mov dword [esi], ecx
mov eax, dword [ebx + 0x5e80]
sub eax, ecx
mov dword [ebx + 0x5e84], eax
mov eax, dword [esi]
add eax, dword [ebx + 0x5e78]
mov dword [ebx + 0x5e7c], eax
mov eax, dword [esi]
sub dword [ebx + 0x5e9c], eax
mov dword [ebx + 0x5ea4], 0xffff
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x10
ret