I think this vulnerability is caused because, in CInputHandshake::Analyze, it keeps the connection open even if the processed packet fails, so the same connection can send infinite packets increasing the buffer size until it reaches 4gb of ram (32bit binary limit).
Replace every return -1; there with
And that's all.
If you're working on files that don't have c++11 enabled in 2021, you're probably doing something deep wrong.
What is not working?
This is just an example you need edit it and adapt to your needs.
data = ''.join([i for i in f if not i.lower().startswith(selItem.GetText())])