Function at 0x10006ba1
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
xor eax, eax
and dword [esp], eax
and dword [esp + 4], eax
push ebx
push esi
mov esi, ecx
mov dword [esp + 0x20], eax
push edi
mov edi, dword [ebp + 0x14]
mov dword [esp + 0x18], esi
cmp dword [ebp + 8], eax
je 0x10006bda
mov eax, edi
shr eax, 0x10
test ax, ax
je 0x10006bda
push edi
call fcn.10005dda
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x14]
push eax
push ecx
mov ecx, dword [esi + 0x10]
lea eax, [esp + 0x24]
push eax
call fcn.100113d7
mov ebx, eax
neg ebx
sbb ebx, ebx
and ebx, dword [esp + 0x14]
je 0x10006c5c
mov eax, edi
shr eax, 0x10
test ax, ax
jne 0x10006c1f
cmp edi, dword [ebx + 0xc]
jle 0x10006c1f
mov eax, edi
shl eax, 4
mov eax, dword [eax + 0x10001b80]
mov dword [ebx], eax
mov dword [ebx + 0xc], edi
push ebx
call fcn.10006fac
push 2
mov eax, dword [ebp + 0x10]
pop esi
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0xc]
test ebx, ebx
jne 0x10006e74
test eax, eax
jne 0x10006e74
mov edi, dword [ebp + 8]
xor esi, esi
test edi, edi
je 0x10006db8
xor edx, edx
mov eax, edi
mov dword [ebp + 8], edx
jmp 0x10006dc2
push dword [ebp + 0xc]
call fcn.10005edb
mov ebx, eax
test ebx, ebx
je 0x10006ca7
mov esi, dword [0x100156d0]
mov ecx, esi
push 1
push 0x24
push dword [ebp + 0xc]
call dword [0x10016308]
call esi
mov eax, dword [esp + 0x18]
push ebx
mov edi, dword [eax + 8]
and dword [eax + 8], 0
mov eax, dword [ebx]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x10016308]
call esi
mov eax, dword [esp + 0x18]
push 4
mov dword [eax + 8], edi
jmp 0x10006c27
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x14], eax
test eax, eax
jne 0x10006c43
push dword [0x100151dc]
mov dword [esp + 0x20], 1
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test dword [eax + 0x44], 0x1000000
je 0x10006cdc
lea eax, [edi - 0x1b]
neg eax
sbb eax, eax
and eax, dword [esp + 0x1c]
jmp 0x10006ce0
mov eax, dword [esp + 0x1c]
push dword [ebp + 0x18]
mov ecx, esi
push eax
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x28]
push eax
push dword [ebp + 0xc]
call fcn.100069f8
test eax, eax
jne 0x10006dac
cmp dword [esp + 0x20], 2
jne 0x10006d67
mov esi, dword [esp + 0x10]
test edi, edi
jne 0x10006d27
mov ebx, dword [esp + 0x1c]
cmp esi, 2
jne 0x10006c2f
push ebx
call fcn.10006fac
jmp 0x10006c2f
mov ecx, dword [esp + 0x1c]
cmp esi, 1
jne 0x10006d5f
mov eax, dword [ebp + 0xc]
cmp dword [ecx + 0x20], eax
jne 0x10006d5b
mov eax, edi
shr eax, 0x10
test ax, ax
jne 0x10006d57
cmp edi, dword [ecx + 0xc]
jbe 0x10006d57
mov eax, edi
shl eax, 4
mov eax, dword [eax + 0x10001b80]
mov dword [ecx], eax
mov dword [ecx + 0xc], edi
mov ebx, ecx
jmp 0x10006d5f
mov dword [esp + 0x24], ecx
mov eax, dword [ecx + 0x10]
jmp 0x10006c2b
mov esi, dword [0x100156d0]
mov ecx, esi
push 1
push 0x24
push dword [esp + 0x24]
call dword [0x10016308]
call esi
mov ecx, eax
mov eax, dword [ecx + 0x10]
mov dword [esp + 0x14], eax
test edi, edi
jne 0x10006c43
mov ebx, dword [ecx + 0x20]
push ebx
mov eax, dword [ebx]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x10016308]
call esi
mov esi, dword [esp + 0x10]
jmp 0x10006c2f
mov esi, dword [esp + 0x10]
xor eax, eax
inc eax
jmp 0x10006c33
mov ecx, 0x10015030
call fcn.10005615
mov dword [esp + 0x1c], eax
test eax, eax
je 0x10006e86
mov ebx, eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x1c]
push eax
push ecx
lea eax, [esp + 0x18]
mov dword [esp + 0x24], ebx
push eax
mov eax, dword [esp + 0x24]
mov ecx, dword [eax + 0x10]
call fcn.10011424
test eax, eax
je 0x10006e72
mov edi, dword [ebp + 0x14]
push dword [ebp + 0xc]
mov esi, dword [0x100156e8]
mov ecx, esi
push dword [0x10015594]
shr edi, 0x10
neg edi
sbb edi, edi
not edi
and edi, dword [ebp + 0x14]
call dword [0x10016308]
call esi
mov ecx, dword [esp + 0x14]
mov eax, edi
shl eax, 4
xor edx, edx
inc edx
mov esi, edx
mov eax, dword [eax + 0x10001b80]
mov dword [ebx], eax
mov eax, dword [ebp + 0xc]
mov dword [ebx + 0x20], eax
xor eax, eax
mov dword [ebx + 0x18], eax
mov dword [ebx + 0x14], eax
mov dword [ebx + 0x10], eax
mov dword [ebx + 8], edx
mov dword [ebx + 4], edx
mov dword [ebx + 0xc], edi
mov dword [ebx + 0x1c], 0x80
mov eax, dword [ecx + 0x10]
inc dword [ecx]
mov dword [ebx + 0x14], eax
mov eax, dword [ecx + 0x14]
mov dword [ebx + 0x18], eax
mov dword [ecx + 0x10], ebx
mov dword [ecx + 0x14], 2
mov dword [ebx + 0x10], ecx
jmp 0x10006e86
xor ebx, ebx
mov eax, dword [ebp + 8]
test eax, eax
je 0x10006e86
push eax
mov ecx, 0x10015030
call fcn.10005728
mov eax, dword [esp + 0x24]
test eax, eax
je 0x10006e98
mov ecx, dword [esp + 0x18]
push eax
call fcn.10007002
mov eax, dword [ebp + 0x1c]
test eax, eax
je 0x10006ea1
mov dword [eax], esi
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret 0x18