in reply to Re^4: Byte ranges of binary files
in thread Byte ranges of binary files

I've tried everything...

Well, that code in that patebin doesn't actually show that, for example none of the logic/variable-manipulation from your original question ( Byte ranges of binary files ) shows up in that pastebin

Maybe you'd like to forget about variables for a minute and describe the algorithm you're trying to implement in words?