(Oct 28, 2014 03:22 PM)Masm4ever Wrote: WOW! After a decade of programming in assembler, I still haven't found a way to convert assembler code into C code - and you made it in a few days! INCREDIBLE! You are a genius! Pleeeeeeze, share your secret with us....
Its called my hand.
Since I dont know the exact code from the challenge ill make some up and wh.. nvm....
Thought I posted something else.(I got confused, about what this thread i made was for, just now) I was talking about AT&T to Intel syntax asm.
Let me say what really happened.
I lied about getting it.
I did solve the problem, but I DIDNT convert the asm to C.(thought as i show below, its not like for something small its hard)
>_>
The reason i needed help was for a CTF.
I didnt understand AT&T's ASM syntax, so if it was in C, itd make it easier.
Instead I just hand converted (typed in notepad ) the ASM code, then i re-wrote it to Intels syntax,
Then after that it made more sense.
BUT
its easy to convert to C after that.
Example of what I could have done:
(intel)
MOV eax, 57
MOV edx, 2
IMUL edx
; result stored in eax. (right?)
then id write it like this as C: (i think)
int a = 57;
int b = 2;
int res = a*b;
return res;
Its not like i needed some hardcare asm program, it was just a math one from a CTF.
You dont need to be so snippy, sorry if i worded something wrong.
(btw what of Hex-rays thingy. idk what its called, but cant it do something like that from a binary, idk.)
Anyways thanks.
(Oct 28, 2014 03:22 PM)Masm4ever Wrote: WOW! After a decade of programming in assembler, I still haven't found a way to convert assembler code into C code - and you made it in a few days! INCREDIBLE! You are a genius! Pleeeeeeze, share your secret with us....
You know if your as smart as you put off, I would like to work with you some day.
(If you misunderstand something in my above post, I will try and write more clearly, I lose track alot of where im going and my posts get mixed up.)
(Oct 28, 2014 06:02 AM)DaRkReD Wrote: If you are doing a disassembly challenge for C++ you should learn ASM first. If you use the analyse function in olly or immunity you should be able to pull winAPI calls out of the code but other than that you are stuck learning ASM
I like your advice too.
Now I have a list of things, i thought I had down, but where obviously not right about.