Any idea which version of Cognition you have on there? You can check it by going into settings and looking in the "About Phone" section.
Anyway, first off, you HAVE to get the phone back to stock BEFORE you send it to Samsung - otherwise, as stated, they won't touch it.
The phone shutting off is a problem with the phone - My first Captivate had it. Since I was in my 30 day window, AT&T replaced it w/o any problems. Sounds like whoever sold you the phone new about the problem but probably already had a ROM on it so AT&T wouldn't replace it; or he was out the 30 day window.
Anyway, to take Cognition off and get the thing back to stock, follow this video:
http://www.youtube.com/watch?v=UDtxnH4lFuk&feature=mfu_in_order&list=UL
I will warn you big time here.... I had Cognition v3.04 on my phone and tried to just run ODIN over top of it (didn't watch the video), and seriously bricked my phone (totally, not a soft brick). The ODIN froze, and my phone shut off and WOULD NOT turn back on. I tried EVERYTHING I could find but the phone was toast. I even went as far as making the silly 3 resistor jig and still nothing - It was DEAD.
Watch the video THOROUGHLY before you attempt anything. If you've not used ODIN or some of the other software mentioned in the video, to some research before you attempt anything. I learned the hard way...... It scared me so bad I don't think I'll be messing with the new phone.