Function at 0x100128b0
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 4
push ebx
push esi
push edi
xor ebx, ebx
push ebp
mov edi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov eax, dword [0x1002b150]
push eax
call edi
mov dword [eax + 0x5a00], ebx
mov esi, eax
xor eax, eax
mov dword [esi + 0x5a04], ebx
mov ecx, dword [esi + 0x59ec]
mov al, byte [ecx]
mov dword [esi + 0x5a10], eax
cmp eax, 0xff
jne 0x10012997
mov eax, dword [esi + 0x59ec]
inc eax
mov dword [esi + 0x59ec], eax
cmp dword [esi + 0x59f0], eax
jne 0x1001297f
mov eax, dword [0x1002b150]
push eax
call edi
lea edx, [eax + 0x59e8]
mov dword [eax + 0x59fc], ebx
mov ebp, eax
lea ecx, [esp + 0x10]
lea eax, [ebp + 0x59fc]
push eax
push ecx
push 0xffffffffffffffff
push edx
call fcn.1000e960
add esp, 0x10
test eax, eax
jne 0x10012b2c
cmp dword [ebp + 0x59fc], 1
jne 0x1001294f
cmp dword [esp + 0x10], 4
mov eax, 0xffffffc2
jb 0x10012977
mov eax, dword [ebp + 0x59e8]
mov dword [ebp + 0x59ec], eax
mov eax, dword [ebp + 0x59e8]
add eax, dword [esp + 0x10]
mov dword [ebp + 0x59f0], eax
xor eax, eax
mov dword [ebp + 0x59f4], 8
test eax, eax
jne 0x10012b2c
mov eax, dword [esi + 0x59ec]
cmp byte [eax], bl
jne 0x100128bf
mov dword [esi + 0x5a04], 1
mov dword [esi + 0x5a08], 0
mov dword [esi + 0x59f4], 8
mov dword [esi + 0x5a0c], 0x20
mov dword [esi + 0x5a14], 0
shl dword [esi + 0x5a08], 0x20
sub dword [esi + 0x5a0c], 0x20
add dword [esi + 0x5a14], 0x20
cmp dword [esi + 0x5a00], 0
jne 0x10012b2a
lea edi, [esi + 0x59fc]
cmp dword [edi], 1
jne 0x100129fe
mov eax, dword [esi + 0x59f0]
cmp dword [esi + 0x59ec], eax
jae 0x10012b2a
xor ebx, ebx
mov eax, dword [esi + 0x5a14]
cmp eax, 8
jl 0x10012b2a
sub eax, 8
mov dword [esi + 0x5a14], eax
add dword [esi + 0x5a0c], 8
mov eax, dword [esi + 0x5a10]
mov cl, byte [esi + 0x5a14]
shl eax, cl
or dword [esi + 0x5a08], eax
mov eax, dword [esi + 0x59ec]
inc eax
mov dword [esi + 0x59ec], eax
cmp dword [esi + 0x59f0], eax
ja 0x10012a9b
cmp dword [edi], 1
je 0x10012b2a
lea ebp, [esi + 0x59e8]
push edi
lea eax, [esp + 0x14]
push eax
push 0xffffffffffffffff
push ebp
call fcn.1000e960
add esp, 0x10
mov dword [esi + 0x5d84], eax
cmp eax, ebx
jne 0x10012b34
cmp dword [edi], 1
jne 0x10012a85
cmp dword [esp + 0x10], ebx
je 0x10012b2a
mov eax, dword [ebp]
mov dword [esi + 0x59ec], eax
mov eax, dword [ebp]
add eax, dword [esp + 0x10]
mov dword [esi + 0x59f0], eax
mov ecx, dword [esi + 0x59ec]
xor eax, eax
mov al, byte [ecx]
mov dword [esi + 0x5a10], eax
cmp eax, 0xff
jne 0x10012a00
mov eax, dword [esi + 0x59ec]
inc eax
mov dword [esi + 0x59ec], eax
cmp dword [esi + 0x59f0], eax
ja 0x10012b12
cmp dword [edi], 1
je 0x10012b2a
lea ebp, [esi + 0x59e8]
push edi
lea eax, [esp + 0x14]
push eax
push 0xffffffffffffffff
push ebp
call fcn.1000e960
add esp, 0x10
mov dword [esi + 0x5d84], eax
cmp eax, ebx
jne 0x10012b42
cmp dword [edi], 1
jne 0x10012afc
cmp dword [esp + 0x10], ebx
je 0x10012b2a
mov eax, dword [ebp]
mov dword [esi + 0x59ec], eax
mov eax, dword [ebp]
add eax, dword [esp + 0x10]
mov dword [esi + 0x59f0], eax
mov eax, dword [esi + 0x59ec]
cmp byte [eax], bl
je 0x10012a00
mov dword [esi + 0x5a00], 1
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov eax, dword [esi + 0x5d84]
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov eax, dword [esi + 0x5d84]
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret