Function at 0x10021bc0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
mov esi, ecx
mov dword [ebp - 4], 0
push edi
mov eax, dword [esi]
inc byte [esi + 0x10458]
call dword [eax + 0xe4]
test eax, eax
jne 0x10021dd3
lea ebx, [esi + 0x103e4]
xor edi, edi
mov ecx, ebx
mov dword [ebp - 8], ebx
mov eax, dword [esi]
push ecx
mov ecx, esi
call dword [eax + 0xf4]
mov dword [ebp - 0xc], eax
test eax, eax
je 0x10021c13
cmp eax, 0x3e5
jne 0x10021c60
mov byte [ebp + edi - 4], 1
mov ecx, dword [ebp - 8]
inc edi
add ecx, 0x1c
mov dword [ebp - 8], ecx
cmp edi, 4
jb 0x10021bf5
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0xec]
mov dword [ebp - 0xc], eax
test eax, eax
je 0x10021ca3
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0xf8]
xor edi, edi
nop
cmp byte [ebp + edi - 4], 0
je 0x10021c52
mov eax, dword [esi]
mov ecx, esi
push ebx
call dword [eax + 0xc4]
inc edi
add ebx, 0x1c
cmp edi, 4
jb 0x10021c40
jmp 0x10021ddc
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0xf8]
test edi, edi
je 0x10021ddc
lea ebx, [edi*8]
sub ebx, edi
add ebx, 0x40f9
lea ebx, [esi + ebx*4]
dec edi
sub ebx, 0x1c
cmp byte [ebp + edi - 4], 0
je 0x10021c9a
mov eax, dword [esi]
mov ecx, esi
push ebx
call dword [eax + 0xc4]
test edi, edi
jne 0x10021c84
jmp 0x10021ddc
mov edi, dword [esi + 8]
push dword [0x100db8a4]
mov dword [edi], 0
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_SetEvent]
push edi
push dword [0x100db8a4]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, dword [esi + 0x368]
xor edi, edi
mov dword [ebp - 0x14], eax
mov eax, ebx
push 0xffffffffffffffff
push edi
mov eax, dword [eax + 0x18]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x14]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test eax, eax
je 0x10021d91
mov eax, dword [esi]
mov ecx, esi
push ebx
call dword [eax + 0xc4]
mov eax, dword [esi]
mov ecx, esi
push ebx
mov byte [ebp + edi - 4], 0
call dword [eax + 0xfc]
push 1
push dword [esi + 0x360]
push dword [ebx + 0xc]
call dword [0x100db8b8]
movzx eax, word [ebx + 4]
add esp, 0xc
mov ecx, esi
push eax
push dword [esi + 0x360]
push dword [ebx + 0xc]
call fcn.1001f4b0
mov eax, dword [esi]
mov ecx, esi
push ebx
call dword [eax + 0xf4]
cmp eax, 0x3e5
jne 0x10021d54
mov byte [ebp + edi - 4], 1
jmp 0x10021d58
test eax, eax
jne 0x10021d8b
inc edi
and edi, 3
push 0xffffffffffffffff
push 0
lea eax, [edi*8]
sub eax, edi
add eax, 0x40f9
lea ebx, [esi + eax*4]
mov eax, dword [ebx + 0x18]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x14]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test eax, eax
jne 0x10021cf7
lea ebx, [esi + 0x103e4]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + pe_nt_image_headers32]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0xf8]
xor edi, edi
cmp byte [ebp + edi - 4], 0
je 0x10021db9
mov eax, dword [esi]
mov ecx, esi
push ebx
call dword [eax + 0xc4]
inc edi
add ebx, 0x1c
cmp edi, 4
jb 0x10021da7
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0xe8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi + 8]
push eax
call fcn.100145e0
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0xe8]
push dword [ebp - 0xc]
mov ecx, dword [esi + 8]
call fcn.100145e0
int3