Well Saudi Arabia and the gulf states still playing a role esp with the vacuum when the US forces left.
Key component of ISIS’s support came from wealthy individuals in the Arab Gulf States of Kuwait, Qatar and Saudi Arabia. Sometimes the support came with the tacit nod of approval from those regimes; often, it took advantage of poor money laundering protections in those states, according to officials, experts, and leaders of the Syrian opposition, which is fighting ISIS as well as the regime.
“Everybody knows the money is going through Kuwait and that it’s coming from the Arab Gulf,” said Andrew Tabler, senior fellow at the Washington Institute for Near East Policy. “Kuwait’s banking system and its money changers have long been a huge problem because they are a major conduit for money to extremist groups in Syria and now Iraq.”
America's Allies Are Funding ISIS - The Daily Beast
The ISIS first began in the early days of the Syrian civil war. Saudi Arabia has been open in funding the Syrian rebels and some of this came in hands with the extremists. Also Pakistan forces are also aiding the Syrian rebels.
Here is a report a year ago on Saudi Arabia.
Saudi Arabia is preparing to spend millions of dollars to arm and train thousands of Syrian fighters in a new national rebel force to help defeat Bashar al-Assad and act as a counterweight to increasingly powerful jihadi organisations.
According to one unconfirmed report the JAI
will be trained with Pakistani help, and estimates of its likely strength range from 5,000 to more than 50,000. But diplomats and experts warned on Thursday that there are serious doubts about its prospects as well as fears of "blowback" by extremists returning from Syria.
Yet since Pakistan is also involved perhaps they were trained in the same way like the way they trained militants in Pakistan who are killing innocent citizens everyday.
Yet of course the US has also supported and funded the Syrian rebels and some of it has got into the hands of extremists, just like what happened with the US funding the Afghan resistance groups against the Soviets in the 1980s.