(CNN)A boy in a black knit cap stands in front of a man on his knees.
He locks eyes with the captive, brow furrowed, his gaze seething with anger. He lifts a pistol and shoots the man in the forehead.
The boy is a soldier for the Islamic State in Iraq and Syria -- and he's not the only one.
The Sunni extremists of ISIS appear to be brainwashing an entire generation to create an army of impressionable young soldiers.
They lure or kidnap children and then train them to fight.
They force some children to give blood to injured fighters or to spy for them, and make others whip prisoners, human rights groups say.
Their plight raises questions that defy simple answers:
What future awaits these children if ISIS is ever to be defeated? Can anything be done to help them recover from the scars of war, or will Iraq and Syria face the prospect of a lost generation, paralyzed by the memories and atrocities of their youth?
Behind the smile
Former child soldiers can lead healthy lives after fighting in wars.
Take, for example, Ngor Mayol. He now works in a grocery store in Georgia. He's got a warm demeanor and is the type of guy who says hello to everyone he encounters, no matter what mood they seem to be in.
Mayol's friendly nature belies an unsavory past: At age 15, he was fighting against the Sudanese government in that country's civil war.
"I have lived in the unforgettable place where human flesh has been used as food for birds and insects," he wrote as part of an exercise in English class.
Mayol says he didn't go through any formal rehabilitation process after his time as a child soldier. He says he suffered no residual trauma from the war and now lives a seemingly quiet and normal life.
Though the faces of his friends who were killed in the conflict are seared in his memory, he doesn't regret the time he spent fighting.
"My life experience in the military, I was so proud of it, to defend the territory of South Sudan," Mayol said.
'Cubs of the caliphate'
Many of ISIS' child soldiers have experiences similar to Mayol's.
One teenager told CNN's Arwa Damon last year that at 15 years old, he was strapped into an explosive belt and given a pistol, an AK-47 and a radio and ordered to protect a base in the eastern Syrian city of Deir Ezzor.
ISIS has sent some children into combat and made others blow themselves up in suicide attacks, according to Human Rights Watch and activists. The group forces teen girls to become sex slaves or wives for its fighters, some escapees have reported.
Children are also used to cook meals and deliver messages, says Abu Ibrahim al-Raqqawi. He's a founder of "Raqqa is Being Slaughtered Silently," a group whose name refers to the Syrian city that is the de-facto capital of territory ISIS controls. The group opposes ISIS, as well as the regime of Syrian President Bashar al-Assad.
In ISIS propaganda videos, the group calls its child soldiers "cubs of the caliphate" -- the "caliphate" being the religious state the group claims to rule.
At least two propaganda videos end with boys killing unarmed men.
Forced to watch
The children made to fight for ISIS join hundreds of thousands of others in the global fraternity of child soldiers, fighting in places as diverse as India, Somalia and Thailand, the United Nations says.
The outside world has little to no access inside the self-described "Islamic State," so proof of the terror group's use of child soldiers tends to come from propaganda or anecdotal evidence.
It's impossible to say how many child soldiers the group has, but its recruitment and training operation appears massive.
About 6 million people live in ISIS-controlled territories, according to Luay al-Khatteeb, founder and director of the Iraq Energy Institute. Other estimates say the group has as many as 8 million people under its rule.
As of 2014, 33.1% of Syria's population was under age 14, according to the CIA World Factbook. In Iraq, the figure jumps to 36.7%.
While those percentages don't account for demographic shifts across the country (ISIS controls territory in Syria's more sparsely populated north and in Iraq's Sunni-dominated north and west), they still shed light on how many potential young recruits the militant group has to mold to its liking.
A documentary released last year by VICE News included some of the first footage from an independent media outlet to show life inside ISIS, and the sheer number of kids the terror group had under its sway is striking.
The war won't end as quickly if ISIS can readily replace its fallen soldiers with brainwashed children, al-Raqqawi notes.
"It will be a matter of generations," he said of how using child soldiers will affect the Middle East. "It will take maybe 20 years, 30 years. It's a long, long process and it's very dangerous."
More and more ISIS propaganda videos show militants training children -- sometimes as young as 8 years old -- to fight and indoctrinating them in the group's extreme interpretation of Islam.
In Raqqa, ISIS has been known to force parents to give up custody of their children. It also uses parties to coax youngsters into its ranks and even outright kidnaps boys, according to al-Raqqawi.
Two boys who say they escaped from ISIS camps told CNN last year about undergoing intense training away from friends and families.
ISIS forced a boy we'll call Mohammed into a training camp when he was 13. His father told CNN when he protested, ISIS threatened to behead him. The group also wouldn't let him visit the boy.
"For 30 days we woke up and jogged, had breakfast, then learned the Quran and the Hadith of the Prophet," Mohammed says. The Hadith is a collection of teachings from the Prophet. "Then we took courses on weapons, Kalashnikovs and other light military stuff."
He recalls ISIS lashing children.
"We saw a young man who did not fast for Ramadan, so they crucified him for three days, and we saw a woman being stoned because she committed adultery," he said.
Yasir -- not his real name -- said at age 15 he "spent a month without seeing my family or anyone that I knew."
He says ISIS fighters fired at his feet and threatened to shoot recruits if they stopped strenuous physical drills.
While Yasir endured horrific conditions, he said his work for ISIS made him feel proud, strong and filled with a sense of purpose.
In fact, some children choose to join ISIS on their own.
"Children often see that being part of an armed group can give them a kind of respect or prestige," says Dr. Sofie Vindevogel of the University of Ghent and the Centre for Children in Vulnerable Situations. "They might see that -- or might think that -- they have better opportunities when joining a group like ISIS."
Ishmael Beah travels the world to advocate for children, but his life once was much more bleak.
As a teen soldier in Sierra Leone, Beah achieved the rank of junior lieutenant -- and received the luxury of his own tent -- after a contest.
Each competitor was told to slit a prisoner's throat -- whoever killed first would win, Beah recalls in his memoir, "A Long Way Gone: Memoirs of a Boy Soldier."
The story above makes Beah seems like a bloodthirsty warrior, but with some help he changed.
Could the same type of assistance Beah received help former child fighters in the Middle East?
"We can draw some important lessons from other situations when children have been engaged as child soldiers," Vindevogel says.
After the fighting finished, Beah was sent to a care center called the Benin Home in Freetown, Sierra Leone.
He and other boys sometimes would fight each other "for no reason at all," he says.
Sometimes they turned their fists on staffers, beating them so badly that they needed medical care, but Beah recalls workers returning with smiles.
"It was as if they had made a pact not to give up on us. Their smiles made us hate them all the more."
To help children prepare for a life after war, so-called interim care centers like the Benin Home help former combatants cope with the trauma. They are often mentally and emotionally scarred and need personalized counseling, psychological services and health care.
"Every child soldier situation sort of has unique features that have to be analyzed when thinking about rehabilitation and reintegration programs," says Dr. Theresa Betancourt of the Harvard School of Public Health. Betancourt has tracked 529 former child soldiers from Sierra Leone for the past 13 years as they reintegrate into society, enter adulthood and become parents themselves.
Beah became close with one nurse, Esther. "None of these things are your fault," she told him over and over about what he had been forced to do.
Eventually, he believed it.
Another step that can help former child soldiers: Going back to school.
"I missed my childhood," said Mayol, the former child soldier from South Sudan. "When you start your school at the older age, it's hard."
Schooling can offer former combatants a healthy, productive way to apply skills they learned -- or were forced to learn -- in everyday life, such as leadership abilities, strategic planning and thinking, and discipline.
Mayol now works with a nonprofit group called Mothering Across Continents in order to help bring education to South Sudan's next generation.
"It's not a matter of seeing or trying to neglect and forget this happened to them," Vindevogel says. "It's important to set up a process of reflection upon how these experiences or the good things that they (can) take from their time with IS[IS] can be useful to them in the future."
Is there hope for a future?
Returning home is rarely easy for child soldiers; it's a place that's changed dramatically -- or been destroyed -- since they left. It's also filled with people they're not sure they can trust.
"People were terrified of boys our age," Beah recalls. "This was one of the consequences of the civil war. People stopped trusting each other, and every stranger became an enemy. Even people who knew you became extremely careful about how they related or spoke to you."
War-torn communities face a tough question regarding their sons and daughters who were involved in conflict: Are these children victims of war, or perpetrators of it?
Communities that view former underage combatants as perpetrators may ostracize them, or worse -- target them for reprisal killings. If seen as victims, they risk being perceived as a burden and cost to society.
Children can't always control which choice will be made.
"We haven't been able to identify one magic bullet that can guarantee success for integration," Vindevogel says. "But what we can see from our research is that it depends a lot on the context that young people, former recruits, find themselves in when they return from armed factions or armed groups."
It takes a significant amount of time and money to rehabilitate child soldiers, experts say, but hope and determination can help them thrive long after the shooting stops.
"They're often portrayed as a lost generation and that's what they start to believe themselves after a certain time," Vindevogel says. "It's really important for them to have a future perspective, to know that their time with the armed group was not lost, that their future is not lost."