So it's in a "boot loop". If that is due to corrupt data then a factory reset should fix, if system software is corrupted then reflashing that will fix it.
You say "custom binary", which I guess means you are rooted and running custom software. If so then as long as you have a custom recovery you can do both of those things from there. But you do need to get into the bootloader or recovery mode, because there's not much can be done otherwise. I'm not a Samsung user, so can't tell you how to do this for sure (though pull the battery, re-insert and boot while pressing and holding volume up would be my guess).