Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Machine Language

Name: Cudder !MhMRSATORI!vzR1SbE7g/KHqrb 2010-06-12 7:59

What machine language do you think this looks closest to?


00000797 cspush 2
00000799 push $1
00000801 finv &2:3, 0
00000804 push t.1
00000806 push t.2
00000808 gosub $54
00000810 cspop 2
00000812 push $1
00000814 push $2000
00000816 push $6
00000818 finv &22:0, 0
00000821 ret
00000822 cspush 1
00000824 mov r1, t.1
00000827 mov r0, $95
00000830 mov m1.r0, r1
00000833 mov r0, m1.r0
00000836 ret
00000837 mov r1, $0
00000840 mov r0, $96
00000843 mov m1.r0, r1
00000846 mov r0, m1.r0
00000849 ret
00000850 mov r1, $1
00000853 mov r0, $96
00000856 mov m1.r0, r1
00000859 mov r0, m1.r0
00000862 ret


Hard mode: Try to figure out what it does.

Name: Anonymous 2010-06-14 11:58

>>40
Forgot you're sage

Name: Anonymous 2010-06-14 13:19

>>1
Where's the rest? There's no telling what it does when you can't see where the gosub goes

Name: Anonymous 2010-06-14 13:55

>>40
Or you know, just about anything CISC.

Name: Anonymous 2010-06-14 15:05

Anyone who thinks this is a real CPU language is being silly. It's obviously some bytecode for a game, which is most likely interpreted by the game executable.

Name: Cudder !MhMRSATORI!vzR1SbE7g/KHqrb 2010-06-15 21:52

>>31,44
Correct. Well, we outsourced most of the brute work but that's part of the result.

>>33
Ask HAHAHaruhi.

>>42
The rest is under NDA.

Name: Anonymous 2010-06-15 22:33

>>45
The rest is under NDA.
I bet that makes you feel important.

Name: Anonymous 2010-06-15 22:59

The rest is under NDA.
You wish

Name: Anonymous 2010-06-15 23:40

Oh god the self-importance.

I'm going back to my Dwarfs.

Name: Anonymous 2010-06-16 2:04

>>46-48
You're visibly upset.

Name: Anonymous 2010-06-16 2:11

>>30
00034679 negrv 2
IHBT

Name: Anonymous 2010-06-16 16:25

>>49
Back to /lounge/, please.

Name: Anonymous 2010-06-17 0:32

>51
Back to please.

Name: Anonymous 2010-06-17 2:04

V8 intermediate bytecode.

Name: Anonymous 2010-06-17 21:02

>>46
I bet that makes you feel important.
I bet that made you feel important.

Name: Anonymous 2010-06-17 21:04

>>52
[b][o]New York Mets win back-to-back games on the road for first time.[/b][/o]

Name: Anonymous 2010-06-18 5:03

>>55
I bet that made you feel incompetent.

Name: air max shoes 2010-07-23 10:59

http://www.cheapairmaxs.com air max
http://www.cheapairmaxs.com air max shoes
http://www.cheapairmaxs.com/nike-air-max-2012-c-111.html nike air max 2012
http://www.cheapairmaxs.com/mens-air-max-2010-c-93.html mens nike air max 2010
http://www.cheapairmaxs.com/womens-air-max-2010-c-96.html womens nike air max 2010
http://www.cheapairmaxs.com/mens-air-max-2009-c-95.html mens nike air max 2009
http://www.cheapairmaxs.com/womens-air-max-2009-c-98.html womens nike air max 2009
http://www.cheapairmaxs.com/nike-air-max-2003-c-101.html nike air max 2003
http://www.cheapairmaxs.com/nike-air-max-97-c-94.html nike air max 97
http://www.cheapairmaxs.com/mens-air-max-95-c-102.html mens nike air max 95
http://www.cheapairmaxs.com/womens-air-max-95-c-103.html womens nike air max 95
http://www.cheapairmaxs.com/nike-air-max-93-c-106.html nike air max 93
http://www.cheapairmaxs.com/mens-air-max-91-c-104.html mens nike air max 91
http://www.cheapairmaxs.com/womens-air-max-91-c-105.html womens nike air max 91
http://www.cheapairmaxs.com/nike-air-max-89-c-121.html nike air max 89
http://www.cheapairmaxs.com/nike-air-max-88-c-112.html nike air max 88
http://www.cheapairmaxs.com/mens-air-max-87-c-108.html mens nike air max 87
http://www.cheapairmaxs.com/womens-air-max-87-c-109.html womens nike air max 87
http://www.cheapairmaxs.com/nike-air-max-180-c-123.html nike air max 180
http://www.cheapairmaxs.com/nike-air-max-360-c-124.html nike air max 360
http://www.cheapairmaxs.com/mens-air-max-ltd-c-122.html mens air max ltd
http://www.cheapairmaxs.com/womens-air-max-ltd-c-116.html womens air max ltd
http://www.cheapairmaxs.com/nike-air-max-bw-c-117.html nike air max bw
http://www.cheapairmaxs.com/air-max-premium-c-118.html air max premium
http://www.cheapairmaxs.com/air-max-skyline-c-114.html air max skyline
http://www.cheapairmaxs.com/air-max-zenyth-c-125.html air max zenyth
http://www.cheapairmaxs.com/nike-air-max-tn-c-115.html nike air max tn
http://www.cheapairmaxs.com/kids-air-max-90-c-119.html kids air max 90
http://www.cheapairmaxs.com/kids-air-max-bw-c-120.html kids air max bw

Name: Cudder !MhMRSATORI!FBeUS42x4uM+kgp 2010-08-15 4:11


00043191 mov r1, $2
00043194 mov r0, $112
00043197 or unk.r0, r1
00043200 mov r0, unk.r0
00043203 mov r0, $112
00043206 mov r0, m1.r0
00043209 setnl r0, $10
00043212 mov r0, r0
00043215 mov r2, $113
00043218 mov r2, m1.r2
00043221 setnl r2, $10
00043224 mov r2, r2
00043227 mov r2, r2
00043230 mov r1, r2
00043233 lor r0, r1
00043236 jpz L_00001179, r0
00043239 gosub xxxx
00043241 mov r0, $143
00043244 mov r0, m1.r0
00043247 mov r1, r0
00043250 jp L_00001181

First to reverse this back into a C expression wins.

Name: Anonymous 2010-08-15 4:28

>>58
Kind of hard to do that without knowing the syntax and semantics.

Name: Anonymous 2010-08-15 4:38

>>59
Anyone who can't figure out what mov does shouldn't be posting here anyway.

Name: Anonymous 2010-08-15 4:49

>>60
Of course that's clear, but it's not like mov is everything there is to it. I'll start giving examples:
unk.r0
Which r0, what's the significance? Is it the same as r0 or different?
setnl
If I had to guess, it sets SOMETHING(the first operand??) to a TRUE or FALSE value (0,1?) if the first operand is not lower than the second one (immediate value).
lor
What is the difference between or and lor? Is LOR logical OR? The semantics are obviously not clear.
jp/jpz
Some kind of conditional jump, probably depending on a flag? If zero, if parity set? what? Again, unclear semantics.
mov r0, r0
mov r2, r2
Nops?

Also, labels don't point to any of the given code (jump and gosub labels)
gosub
I'm assuming it's some form of call, probably places the return value on a stack and jumps to that address.

So even if I can guess what some instructions MAY mean, without proper documentation (or in this case, the original executable which interprets these instructions, as Cudder is probably reversing some game's bytecode), it's not possible to properly interpret these instructions, unless you want me to give a dumb unoptimized asm->C conversion, but those are dumb and pointless (Reverse engineering something is supposed to give a meaning to the code, not translate mov a,b into a = b; ).

Name: Anonymous 2010-08-15 12:35

>>61
Nops?
Might be some way of setting flags...

Name: Anonymous 2010-08-15 13:18

>>62
Looks like a really shitty compiler that doesn't do peephole optimization

Name: Anonymous 2010-08-15 13:46

>>58
Here goes. I found out that the code makes perfect sense. That assembly language was designed by a professional

unsigned char x[143];

unsigned char DoSomething(void)
{
   x[112] |= 2;
   if((x[112] >= 10) || (x[113] >= 10))
      xxxx();
   return x[143];
}

Name: Anonymous 2010-08-15 14:34

>>64
Hello RETRANS staff member.

Name: Anonymous 2010-08-15 14:41

>>65
I'm sorry, you must have mistaken me for someone, you level-3 mainframe programmer

Name: Anonymous 2010-08-15 15:41

>>64-66
SAGE FOR ANONIX DEVS

Name: Cudder !MhMRSATORI!FBeUS42x4uM+kgp 2010-08-15 20:41

>>59-61
This isn't even half as hard as ICFP (which we did manage to get a /jp/ reference into the hall of fame this year), you just need to do some educated guesses.

>>64
Almost got it, with two minor exceptions: it's not a function and there's no return.

>>67
U MAD?

Name: Anonymous 2010-08-15 21:26

>>68
U MAD?
Fuck off, ``Cudder''.

Name: Anonymous 2010-08-15 22:54

>>67-69
back to /b/, please.

Name: Fuck off, !Ep8pui8Vw2 2010-08-15 23:17

>>70
Fuck off, ``faggot''.

Name: Anonymous 2010-08-16 0:43

>>68
ICFP is not nearly half as hard as my dick and /prog/ programming contests.

Name: Anonymous 2010-08-16 4:18

>>68
Well that was what I thought first, the last 4 instructions just seemed weird. Like it was some sort of semi inlined function that returned something in r1

Name: Anonymous 2013-01-19 23:39

/prog/ will be spammed continuously until further notice. we apologize for any inconvenience this may cause.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List