Kodewerx

Our culture has advanced beyond all that you could possibly comprehend with one hundred percent of your brain.
It is currently Thu Mar 28, 2024 4:35 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: Assembly Beautifier
PostPosted: Sun Aug 10, 2008 6:54 pm 
Offline
Komrade
Komrade

Joined: Tue Mar 27, 2007 10:18 am
Posts: 1328
....................................................................................................................................................................................................................................................................................Enjoy - http://pastebin.com/f7ff980ee

_________________
Image


Last edited by Hextator on Tue Oct 14, 2008 1:31 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Assembly Beautifier
PostPosted: Thu Aug 14, 2008 11:30 am 
Offline
Kommunist
Kommunist

Joined: Sat Nov 18, 2006 10:11 am
Posts: 108
Hm... C++?

_________________
Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Aug 14, 2008 5:45 pm 
Offline
Komrade
Komrade

Joined: Tue Mar 27, 2007 10:18 am
Posts: 1328
No, it's written in FORTRAN.

Compile it and throw an assembly script on it. See what happens.

Funny thing, I designed it for MIPS, tested it with ARM, and have no idea what it does with shit like x86.

_________________
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: Assembly Beautifier
PostPosted: Thu Aug 14, 2008 5:49 pm 
Offline
Kommunist
Kommunist

Joined: Sat Nov 18, 2006 10:11 am
Posts: 108
Compiles fine in C++ >_> don't be a smartass zeld.. XD

_________________
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: Assembly Beautifier
PostPosted: Sat Aug 16, 2008 8:09 pm 
Offline
Krew (Admin)
Krew (Admin)
User avatar

Joined: Sun Oct 01, 2006 9:26 pm
Posts: 3768
Title: All in a day's work.
"Assembly script?" I think your semantics are broken.

_________________
I have to return some video tapes.

Feed me a stray cat.


Top
 Profile  
Reply with quote  
 Post subject: Re: Assembly Beautifier
PostPosted: Sun Aug 17, 2008 5:11 pm 
Offline
Kommunist
Kommunist
User avatar

Joined: Tue Dec 18, 2007 5:27 pm
Posts: 34
I compiled it in C++, works great.

_________________
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: Assembly Beautifier
PostPosted: Mon Aug 18, 2008 9:36 am 
Offline
Kommunist
Kommunist

Joined: Sat Nov 18, 2006 10:11 am
Posts: 108
Eh I tried it on a 100 Line code in assembly >_> took forever. rofl.

_________________
Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Aug 18, 2008 12:21 pm 
Offline
Komrade
Komrade

Joined: Tue Mar 27, 2007 10:18 am
Posts: 1328
It has bugs. That's why I released the source.

If it gets stuck like that it's because it's trying to add new line characters to the file and can't stop. You have to end it yourself after a few seconds when that happens and delete all those extra new line characters.

_________________
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: Assembly Beautifier
PostPosted: Tue Aug 26, 2008 11:22 pm 
Offline
Komrade
Komrade
User avatar

Joined: Tue Mar 27, 2007 6:23 pm
Posts: 1354
Location: Mario Raceway, 1509.831, 217.198, -564.429
Title: Mario Kart 64 Hacker
Parasyte wrote:
"Assembly script?" I think your semantics are broken.
Did you see the goto in there? >_> Watch out man, the raptors are coming for you now.

_________________
Image 143
HyperNova Software is now live (but may take a few tries to load) currently down; check out my PSP/DS/Game Boy/Windows/Linux homebrew, ROM hacks, and Gameshark codes!


Top
 Profile  
Reply with quote  
 Post subject: Re: Assembly Beautifier
PostPosted: Wed Aug 27, 2008 8:49 pm 
Offline
Krew (Admin)
Krew (Admin)
User avatar

Joined: Sun Oct 01, 2006 9:26 pm
Posts: 3768
Title: All in a day's work.
Yes. Bad coding practices never escape the watchful eye of a hacker that's been doing this crap for years. But sometimes, they don't care.

_________________
I have to return some video tapes.

Feed me a stray cat.


Top
 Profile  
Reply with quote  
 Post subject: Re: Assembly Beautifier
PostPosted: Thu Sep 11, 2008 6:07 pm 
Offline
Kommunist
Kommunist

Joined: Fri Feb 16, 2007 10:09 pm
Posts: 36
DOS text files will work fine but for Windows text files there is a crlf instead of the non-Windows lf that the program doesn't like.

A minor change to the source corrects this:

#ifdef WIN32
#define RETURN_CHAR 0xD
#else
#define RETURN_CHAR 0xA
#endif
.
.
.
247. if (inputChar[0] == RETURN_CHAR)

_________________
Want to cheat in *any* DS game on *any* cart? - Get DSATM
For more tools visit cracker's crap!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Sep 11, 2008 7:40 pm 
Offline
Komrade
Komrade

Joined: Tue Mar 27, 2007 10:18 am
Posts: 1328
I was under the impression that it wouldn't make a difference because I didn't open the file in binary mode.

The program does fudge up and your fix probably keeps it from doing that, but I thought the whole point of text mode was to handle newline characters properly. Otherwise there's no difference between the modes that I've seen.

_________________
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: Assembly Beautifier
PostPosted: Fri Sep 12, 2008 5:01 am 
Offline
Kommunist
Kommunist

Joined: Fri Feb 16, 2007 10:09 pm
Posts: 36
Yeah I'm not sure why it doesn't work as it should either. I've run into this problem a few times when parsing text from a file. What's really strange is how an feof never occurs if you don't use the workaround on Windows formatted text.

Edit: Found this page while searching for the bug. Does a good job at showing why feof usage isn't always the best method of testing for the end of a file.

_________________
Want to cheat in *any* DS game on *any* cart? - Get DSATM
For more tools visit cracker's crap!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 125 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group