Function at 0x10106720
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x7c
mov ecx, dword [ebp + 8]
push ebx
xor ebx, ebx
push esi
mov esi, dword [ecx + 8]
push edi
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x38], 2
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x34], ebx
cmp eax, ebx
jne 0x1010674c
mov dword [ebp - 8], ebx
jmp 0x1010675e
mov ecx, dword [eax + 0x58]
cmp ecx, ebx
je 0x10106758
mov dword [ebp - 8], ecx
jmp 0x1010675e
lea edx, [eax + 0x38]
mov dword [ebp - 8], edx
mov eax, dword [eax + 0x28]
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx + 8]
mov eax, dword [edx + 8]
mov ecx, dword [eax + 0x14]
mov dword [ebp - 0x10], ecx
xor eax, eax
mov ecx, 0x80
lea edx, [ebp - 0x7c]
mov dword [ebp - 0x54], ebx
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0x4c], ebx
mov byte [ebp - 0x48], bl
mov dword [ebp - 0x7c], 3
mov dword [ebp - 0x74], ebx
mov dword [ebp - 0x70], ebx
mov dword [ebp - 0x6c], ebx
mov dword [ebp - 0x68], ebx
mov dword [ebp - 0x64], 0xffffffff
mov dword [ebp - 0x60], ebx
mov dword [ebp - 0x78], ebx
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x44], ebx
call fcn.10117950
cmp eax, ebx
mov dword [ebp - 4], eax
jl 0x10106a49
lea edx, [ebp - 0x34]
push edx
lea eax, [ebp - 0x40]
push eax
mov eax, dword [ebp + 0x14]
mov ecx, 4
push esi
lea edi, [eax + eax*2]
lea esi, [ecx - 2]
call fcn.100db050
cmp eax, ebx
mov dword [ebp - 4], eax
jl 0x10106a49
mov edx, dword [ebp + 0x14]
mov ecx, dword [ebp - 0x40]
add edx, edx
xor eax, eax
add edx, edx
mov dword [ebp + eax*4 - 0x30], ecx
inc eax
add ecx, edx
cmp eax, 3
jb 0x101067f2
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp - 8]
mov esi, dword [ebp + 8]
lea ecx, [ebp - 0x14]
push ecx
call fcn.10106680
cmp eax, ebx
mov dword [ebp - 4], eax
jl 0x10106a49
mov dword [ebp - 0xc], ebx
cmp dword [ebp + 0x14], ebx
jbe 0x10106941
mov edi, dword [ebp + 0x10]
mov eax, dword [ebp - 0x30]
sub eax, edi
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x2c]
sub eax, edi
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x28]
sub eax, edi
mov dword [ebp + 0x10], edi
mov dword [ebp - 0x24], eax
mov edx, dword [ebp + 8]
mov eax, dword [edx + 8]
mov dword [ebp - 0x18], eax
mov eax, dword [eax + 0x808c]
mov dword [ebp - 4], eax
mov eax, dword [0x101e316c]
cmp eax, ebx
jge 0x10106864
xor eax, eax
jmp 0x1010686b
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp dword [eax + 0xc], ebx
je 0x10106893
mov ecx, dword [eax + 0xc]
cmp ecx, ebx
jne 0x1010687d
xor ecx, ecx
mov esi, ecx
jmp 0x101068a4
mov edx, dword [ecx]
mov dword [eax + 0xc], edx
cmp edx, ebx
jne 0x10106889
mov dword [eax + 0x10], ebx
mov dword [ecx], 0xfefefefe
mov esi, ecx
jmp 0x101068a4
mov ecx, dword [eax + 8]
push 0x10
push pe_nt_image_headers32
call fcn.101d8457
mov esi, eax
cmp esi, ebx
je 0x101068f7
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
push ebx
push ebx
mov dword [esi + 0x50], eax
mov dword [esi + 0x48], eax
push ecx
mov eax, esi
mov dword [esi], ebx
mov dword [esi + 4], ebx
mov dword [esi + 0x94], ebx
mov dword [esi + 0x98], ebx
mov dword [esi + 0x24], ebx
call fcn.10165570
mov ebx, eax
test ebx, ebx
jl 0x101068fe
mov edi, dword [ebp - 0x18]
push 0
mov ebx, esi
call fcn.10169830
mov ebx, eax
test ebx, ebx
jl 0x101068fe
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp + 0x10]
xor ebx, ebx
mov dword [edx + eax], esi
jmp 0x1010690a
mov ebx, 0x8007000e
jmp 0x1010690d
mov edi, esi
call fcn.101654a0
call fcn.10168d60
mov edi, dword [ebp + 0x10]
mov dword [ebp - 4], ebx
test ebx, ebx
jl 0x10106a47
mov ecx, dword [edi]
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp + 0xc]
mov dword [edx + edi], ecx
mov ecx, dword [ebp - 0x24]
mov dword [ecx + edi], eax
mov eax, dword [ebp - 0xc]
inc eax
add edi, 4
xor ebx, ebx
mov dword [ebp - 0xc], eax
mov dword [ebp + 0x10], edi
cmp eax, dword [ebp + 0x14]
jb 0x10106845
mov edx, dword [ebp + 0x14]
mov esi, dword [ebp - 0x30]
mov eax, dword [ebp - 0x10]
mov edi, dword [ebp + 8]
push edx
push esi
push eax
push edi
call fcn.10108de0
cmp eax, ebx
mov dword [ebp - 4], eax
jl 0x10106a49
mov ecx, dword [edi + 8]
mov edx, dword [ecx + 0x808c]
mov eax, dword [ebp - 8]
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push edx
push esi
mov esi, dword [ebp - 0x10]
push eax
lea ebx, [ebp - 0x7c]
call fcn.10125380
xor ebx, ebx
mov dword [ebp - 4], eax
test eax, eax
jl 0x10106a49
cmp dword [ebp + 0x14], ebx
jbe 0x101069d0
mov ecx, dword [ebp - 0x30]
mov esi, dword [ecx + ebx*4]
cmp dword [esi + 0xa4], 0
je 0x10106a6d
mov edi, dword [ebp + 8]
mov ecx, dword [edi + 8]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push 1
push esi
call eax
mov dword [ebp - 4], eax
test eax, eax
jl 0x10106a47
mov ecx, dword [esi + 0x50]
mov edx, dword [ebp - 0x14]
inc ebx
mov dword [ecx + 0x64], edx
cmp ebx, dword [ebp + 0x14]
jb 0x10106993
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx + 0x4c]
mov edx, dword [edi + 8]
mov ecx, dword [ebp - 0x28]
mov esi, dword [ebp - 8]
push eax
mov eax, dword [edx + 0x8080]
mov edx, dword [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0x30]
push ecx
push edx
push eax
mov eax, dword [ebp + 0x14]
lea ecx, [ebp + 0xc]
push ecx
and eax, 0xfffff
push esi
or eax, 0x80000000
push edi
call fcn.10121e80
mov dword [ebp - 4], eax
test eax, eax
jl 0x10106a47
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0x4c]
push eax
mov eax, dword [edi + 8]
mov ecx, dword [eax + 0x8080]
push ecx
push 0
lea edx, [ebp - 0x14]
push edx
lea eax, [ebp + 0xc]
push eax
mov ecx, eax
push ecx
push esi
push edi
mov eax, 0x80100001
call fcn.10121e80
mov dword [ebp - 4], eax
test eax, eax
jl 0x10106a47
mov dword [ebp - 4], 0
xor ebx, ebx
lea esi, [ebp - 0x54]
call fcn.10118ed0
mov eax, dword [ebp - 0x78]
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, eax
cmp eax, ebx
je 0x10106a9d
mov eax, dword [0x101e316c]
cmp eax, ebx
jge 0x10106a8f
xor eax, eax
jmp 0x10106a96
mov eax, dword [ebp - 8]
push 0x10089d88
push eax
mov eax, dword [ebp + 8]
mov edx, 0xdaf
call fcn.1010ad00
add esp, 8
mov dword [ebp - 4], 0x80004005
jmp 0x10106a47
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edx, dword [eax]
push esi
push ebx
push edx
call edi
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x78], ebx
mov esi, eax
cmp eax, ebx
je 0x10106ac4
mov eax, dword [0x101e316c]
cmp eax, ebx
jge 0x10106ab6
xor eax, eax
jmp 0x10106abd
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov eax, dword [eax]
push esi
push ebx
push eax
call edi
lea esi, [ebp - 0x54]
mov dword [ebp - 0x44], ebx
call fcn.10118ed0
mov ecx, dword [ebp - 0x38]
mov edx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x34]
lea ecx, [ecx + ecx*2]
lea edi, [edx + ecx*4 + 0x8140]
cmp dword [ebp - 0x40], ebx
je 0x10106b0f
cmp eax, ebx
ja 0x10106af0
mov eax, 1
mov ebx, dword [edi]
cmp eax, dword [ebx + 8]
jae 0x10106b06
sub dword [ebx + 8], eax
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [ebx]
mov dword [edi], eax
call fcn.100daed0
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10