Function at 0x10216763
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push esi
mov esi, ecx
test byte [esi + 0x7e], 1
je 0x10216782
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.1021a3a3
jmp 0x10216a23
push ebx
push edi
push dword [0x1039a750]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp byte [ebp + 0xc], 0
mov eax, dword [eax + 8]
mov dword [ebp - 0xc], eax
je 0x102168eb
test dword [ebp + 8], 0x100
je 0x10216864
test byte [esi + 0x7b], 8
mov edi, 0xf000
je 0x102167ef
mov ecx, esi
call fcn.102045d8
mov ebx, eax
test edi, ebx
je 0x102167ef
call fcn.10208911
test al, al
jne 0x102167da
push edi
mov ecx, esi
call fcn.10213e1d
test al, al
je 0x102167ef
test byte [esi + 0x7e], 2
je 0x102167ef
push 0x300f000
push ebx
mov ecx, esi
call fcn.1021f05a
jmp 0x1021685c
lea eax, [ebp - 0x10]
push eax
mov ecx, esi
call fcn.10216173
mov al, byte [esi + 0x81]
mov edx, dword [esi + 0x48]
mov ecx, dword [esi + 0x4c]
test al, 8
je 0x1021680c
inc ecx
inc ecx
test al, 0x10
je 0x10216814
sub dword [ebp - 0xc], 2
push 0xb
push ecx
push edx
push dword [ebp - 0xc]
push dword [ebp - 0x10]
push dword [esi + 0x3c]
call fcn.102644eb
test byte [esi + 0x7b], 8
je 0x1021685c
mov ecx, esi
call fcn.102045d8
test edi, eax
je 0x1021685c
test eax, 0x4000000
je 0x1021685c
mov eax, dword [0x1039a774]
push 0
mov dword [ebp - 0x1c], eax
push 1
lea eax, [ebp - 0x24]
push eax
mov ecx, esi
mov dword [ebp - 0x24], 0x14
call fcn.1021ccf2
push 1
push esi
call fcn.10277567
mov edi, dword [ebp + 8]
test edi, 0x200
jne 0x1021688b
test edi, 0x400
je 0x10216893
call fcn.102e9ba5
test eax, eax
je 0x10216893
mov ecx, esi
call fcn.1021615c
test al, al
je 0x10216893
push dword [esi + 0x3c]
call fcn.10263095
test edi, 0x1800
je 0x10216a14
test byte [esi + 0x7e], 2
je 0x10216a14
mov ecx, esi
call fcn.10204632
test al, al
je 0x10216a14
test edi, 0x800
je 0x102168cd
push 0
push esi
push 0x800a
call fcn.10276026
test edi, 0x1000
je 0x10216a14
push 0
push esi
push 0x8004
call fcn.10276026
jmp 0x10216a14
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0xb8]
test byte [ebp + 8], 0xf
mov dword [ebp - 8], eax
je 0x10216a14
test byte [ebp + 8], 1
je 0x1021691d
mov al, byte [esi + 0x79]
or byte [esi + 0x7c], 0x40
or dword [ebp + 8], 4
and al, 3
cmp al, 1
je 0x1021691d
or dword [ebp + 8], 2
test byte [ebp + 8], 4
je 0x1021693e
mov al, byte [esi + 0x7d]
and byte [esi + 0x7e], 0x9f
and al, 0xf7
or al, 4
mov byte [esi + 0x7d], al
mov al, byte [esi + 0x79]
and al, 3
cmp al, 1
je 0x1021693e
or dword [ebp + 8], 8
mov eax, dword [ebp + 8]
and eax, 0xa
mov dword [ebp - 4], eax
test al, 2
je 0x10216951
or eax, 8
mov dword [ebp - 4], eax
mov edi, dword [esi + 4]
mov ebx, esi
test edi, edi
je 0x102169cd
test eax, eax
je 0x102169cd
mov al, byte [esi + 0x79]
and al, 3
cmp al, 2
je 0x102169cd
cmp dword [ebp - 8], 2
jne 0x10216971
mov ecx, esi
jmp 0x102169c4
test byte [ebp - 4], 2
mov ebx, edi
je 0x1021698b
mov al, byte [edi + 0x7c]
test al, 0x40
je 0x10216986
and dword [ebp - 4], 0xfffffffd
jmp 0x1021698b
or al, 0x40
mov byte [edi + 0x7c], al
test byte [ebp - 4], 8
je 0x102169a5
mov al, byte [edi + 0x7d]
test al, 0xc
je 0x1021699e
and dword [ebp - 4], 0xfffffff7
jmp 0x102169a5
and al, 0xf7
or al, 4
mov byte [edi + 0x7d], al
and byte [edi + 0x7e], 0x9f
mov edi, dword [edi + 4]
test edi, edi
je 0x102169cd
cmp dword [ebp - 4], 0
je 0x102169cd
test byte [ebx + 0x79], 3
jne 0x102169cd
cmp dword [ebp - 8], 2
jne 0x10216971
mov ecx, ebx
call fcn.10203c41
test al, al
je 0x10216971
mov al, byte [ebx + 0x79]
and al, 3
cmp al, 1
je 0x10216a14
cmp dword [ebp - 8], 0
jne 0x10216a14
test byte [ebx + 0x7e], 2
jne 0x102169e8
cmp dword [ebx + 4], 0
je 0x10216a14
test byte [ebp - 4], 2
je 0x102169fe
mov ecx, dword [ebp - 0xc]
push 1
push 1
push ebx
add ecx, 0x64
call fcn.102133f3
test byte [ebp - 4], 8
je 0x10216a14
mov ecx, dword [ebp - 0xc]
push 1
push 1
push ebx
add ecx, 0x58
call fcn.102133f3
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call fcn.1021a3a3
pop edi
pop ebx
pop esi
leave
ret 8