This is an awkward construction that I had to read a couple of times to understand. 'was take' is not a construction that is commonly seen, and it makes my head hurt to try to explain it.
It is like if you were to say 'All I know how to do is paint houses' in other words 'The only thing I know how to do is paint houses.'
But your sentence is in the past tense, so it's more like 'All I knew how to do was paint houses'. Your sentence is 'All the orphans knew how to do was take cigarettes etc.' In present tense it would be 'All the orphans know how to do is take cigarettes, socks...'
It's jarring to see 'was take' because these two words normally would never be next to each other. Really in your mind there should be almost a full stop between them: All the orphans knew how to do was...take- your cigarettes, your socks...
I.e. The only things the orphans knew how to do: take your cigarettes, take your socks, take your candy, etc
I don't think my explanation will help you at all, but there it is.