Kuribo64
Views: 20,059,084 Home | Forums | Uploader | Wiki | Object databases | IRC
Rules/FAQ | Memberlist | Calendar | Stats | Online users | Last posts | Search
04-26-24 12:22 PM
Guest:

0 users reading RE'ing the game. | 1 bot

Main - Archived forums - General SMG hacking - RE'ing the game. Hide post layouts | New reply


shibboleet
Posted on 09-27-14 10:13 PM Link | #48729
RE'ing means to reverse-engineer. It means to completely take the game apart, and rip it's code out. In this instance, it's C and C++ code. (With headers, I think.)

Many think it's a grand opportunity. To bring out my opinion, it's not.
Why?

Because once this happens, we can edit EVERYTHING. Bosses, objects, you name it. But the problem is, that can become a horrible issue to deal with.

You have to know SOME C++, and how to compile it in order to really do it. But once people start making stuff, the demand for cooler stuff comes in. You gotta have new objects, characters, bosses, to make your hack ACTUALLY GOOD TO AN AUDIENCE.

And the people who can't do it, they'll be left in the dust.
Which is why I don't think it should be re'd. But it can still happen, but not good things will branch.

Thanks.

____________________
a

Hiccup
Posted on 09-28-14 09:22 AM (rev. 2 of 09-28-14 09:23 AM) Link | #48745
There is such a thing a a good vanilla hack.

Splitwirez
Posted on 09-28-14 09:38 AM Link | #48747
Posted by Hiccup
There is such a thing a a good vanilla hack.

Agreed. They aren't easy, but not impossible either.

shibboleet
Posted on 10-12-14 09:06 PM (rev. 2 of 10-12-14 09:07 PM) Link | #49590
We have good news, and some bad news.

The good news is, we were able to extract some code from the game.

Bad news is....said "code" was a shitspam of variables that say nothing.



struct s0 {
unsigned char f0;
unsigned char f1;
};

struct s1 {
signed char[1] pad1;
unsigned char f1;
};

void** ged782b;

void sub_80006FA0() {
void* esp1;
void* eax2;
void** eax3;
unsigned char* edi4;
unsigned char* edi5;
int32_t* ecx6;
void* ecx7;
void*** edx8;
int16_t bp9;
unsigned char* edx10;
void* tmp32_11;
unsigned char* esi12;
struct s0* esi13;
void* esi14;
unsigned char* esi15;
int32_t ebp16;
int32_t ebp17;
int32_t ecx18;
unsigned char* ebx19;
int32_t ebp20;
int32_t ebp21;
int32_t v22;
void* v23;
unsigned char* esi24;
void* bl25;
struct s1* ebx26;
void* dl27;
int32_t ebp28;
int32_t ebp29;
void* tmp32_30;
void* dh31;
signed char dh32;
unsigned char* esi33;
void* tmp32_34;

esp1 = eax2;
eax3 = (void**)"intrinsic"();
edi4 = edi5;
ecx6 = (int32_t*)((int32_t)ecx7 - 1);
if (0) {
addr_0x80007021_2:
*ecx6 = 0x1ecb2;
*(void***)&edx8 = (void**)((unsigned char)*(void***)&edx8 - *(unsigned char*)&ecx6);
*(void**)(&eax3 + 1) = (void*)((unsigned char)*(void**)(&eax3 + 1) | (unsigned char)*((void**)&ecx6 + 1));
*((unsigned char*)&edx8 + 1) = (unsigned char)(*((unsigned char*)&edx8 + 1) + *(signed char*)(bp9 + 0x26ec));
} else {
*edx10 = 0xff;
tmp32_11 = (void*)(1 - 2 * 0);
*edi4 = *esi12;
edi4 = (unsigned char*)((uint32_t)edi4 + (int32_t)tmp32_11);
esi13 = (struct s0*)((int32_t)esi14 + (int32_t)tmp32_11);
if ((signed char)*esi15 < (signed char)*edi4)
goto addr_0x80007010_7; else
goto addr_0x80006faa_8;
}
addr_0x8000702f_9:
*edx8 = (void**)((unsigned char)*edx8 - (unsigned char)*((void**)&ecx6 + 1));
__asm__("rol dword [ecx], 1");
*(unsigned char*)((int32_t)esp1 + ebp16 * 8) = (unsigned char)(*(signed char*)((int32_t)esp1 + ebp17 * 8) + *(unsigned char*)&ecx6);
*edx8 = (void**)((unsigned char)((unsigned char)*edx8 + (unsigned char)*((void**)&ecx6 + 1)) + (unsigned char)(uint1_t)"intrinsic"());
__asm__("in al, dx");
__asm__("arpl [eax], ax");
ecx18 = (int32_t)ecx6 - 1;
*(signed char*)(ebx19 + -1) = (signed char)((signed char)(*(signed char*)(ebx19 + -1) + *(signed char*)&ecx18) + (signed char)(unsigned char)(uint1_t)((unsigned char)*(void***)&edx8 < (unsigned char)eax3));
*(int32_t*)(ebp20 + 0xffffff80) = *(int32_t*)(ebp21 + 0xffffff80) - 1;
*(void***)eax3 = (void**)((unsigned char)*(void***)eax3 + (unsigned char)eax3);
eax3 = (void**)((unsigned char)eax3 & 0x7c);
*ebx19 = (unsigned char)(*ebx19 | (unsigned char)eax3);
*edi4 = esi13->f0;
*(void***)eax3 = (void**)((unsigned char)*(void***)eax3 + (unsigned char)*(void**)(&eax3 + 1));
*(void***)eax3 = *(void***)eax3 + 32;
addr_0x80007010_7:
esi13->f0 = (unsigned char)0;
__asm__("in al, dx");
++ebx19;
*edx8 = (void**)((unsigned char)((unsigned char)*edx8 + (unsigned char)*((void**)&ecx6 + 1)) + (unsigned char)(uint1_t)"intrinsic"());
__asm__("in al, dx");
*edx8 = eax3;
eax3 = *edx8;
*(void***)eax3 = (void**)((unsigned char)*(void***)eax3 + (unsigned char)eax3);
eax3 = (void**)((unsigned char)eax3 & 0xec);
goto addr_0x80007021_2;
addr_0x80006faa_8:
edi4 = (unsigned char*)((uint32_t)edi4 - (v22 + (int32_t)(uint32_t)(uint1_t)((uint32_t)edi4 < (uint32_t)((int32_t)v23 + (int32_t)(uint32_t)(uint1_t)(*esi24 < *edi4)))));
eax3 = eax3 + 0 + -64;
*(void***)((unsigned char)eax3 + (unsigned char)eax3 * 8) = (void**)((unsigned char)*(void***)((unsigned char)eax3 + (unsigned char)eax3 * 8) + (signed char)bl25);
ebx19 = &ebx26->f1;
*(unsigned char*)((int32_t)esp1 + (uint32_t)edi4 * 2) = (unsigned char)(*(signed char*)((int32_t)esp1 + (uint32_t)edi4 * 2) + *(unsigned char*)&ecx6);
ged782b = eax3;
__asm__("rol byte [esi], 0x0");
*((void**)&ecx6 + 1) = (void*)((unsigned char)*((void**)&ecx6 + 1) - (unsigned char)((unsigned char)*((void**)&ecx6 + 1) + (unsigned char)(uint1_t)((unsigned char)*((void**)&ecx6 + 1) < (unsigned char)((unsigned char)*((void**)&ecx6 + 1) + (unsigned char)(uint1_t)"intrinsic"()))));
eax3 = (void**)((unsigned char)eax3 - (unsigned char)eax3);
esi13 = (struct s0*)&esi13->f1;
*(void***)eax3 = (void**)((unsigned char)*(void***)eax3 + (signed char)dl27);
esi13->f0 = (unsigned char)(esi13->f0 << 0);
eax3 = eax3;
do {
*(unsigned char*)((int32_t)esp1 + ebp28 * 8) = (unsigned char)(*(signed char*)((int32_t)esp1 + ebp29 * 8) + (unsigned char)eax3);
*(void***)eax3 = eax3;
tmp32_30 = (void*)(1 - 2 * 0);
*edi4 = esi13->f0;
edi4 = (unsigned char*)((uint32_t)edi4 + (int32_t)tmp32_30);
esi13 = (struct s0*)((int32_t)esi13 + (int32_t)tmp32_30);
*(void***)eax3 = (void**)((unsigned char)*(void***)eax3 + (unsigned char)eax3);
esi13->f0 = (unsigned char)(esi13->f0 << 20);
__asm__("in al, dx");
*(void***)eax3 = (void**)((unsigned char)*(void***)eax3 - (unsigned char)eax3);
} while ((unsigned char)*(void***)eax3 < (unsigned char)eax3);
*(void***)eax3 = (void**)0xff;
eax3 = (void**)0;
*(void***)eax3 = (void**)44;
__asm__("rol byte [eax+eax+0x8], 0xec");
*(void***)&edx8 = (void**)(-64 + (signed char)dh31);
__asm__("in al, dx");
ecx6 = (int32_t*)((int32_t)ecx6 - 1);
if (ecx6 != 0)
goto addr_0x8000702f_9;
*(void**)(&eax3 + 1) = (void*)((unsigned char)*(void**)(&eax3 + 1) - (unsigned char)*((void**)&ecx6 + 1));
--eax3;
*((unsigned char*)&edx8 + 1) = (unsigned char)(dh32 + (unsigned char)*(void***)&edx8);
__asm__("rol dh, 0x0");
*(unsigned char*)&ecx6 = (unsigned char)(*(unsigned char*)&ecx6 & (unsigned char)eax3);
esi33 = &esi13->f1;
*(void***)eax3 = (void**)((unsigned char)*(void***)eax3 + (unsigned char)*((void**)&ecx6 + 1));
__asm__("in al, dx");
tmp32_34 = (void*)(4 - 8 * 0);
*edi4 = *esi33;
edi4 = (unsigned char*)((uint32_t)edi4 + (int32_t)tmp32_34);
esi13 = (struct s0*)((int32_t)esi33 + (int32_t)tmp32_34);
*edx8 = (void**)((unsigned char)*edx8 & (unsigned char)*((void**)&ecx6 + 1));
goto addr_0x80007010_7;
}


____________________
a

Marionumber1
Posted on 10-12-14 10:29 PM Link | #49594
The decompiler is almost certainly interpreting it as x86 code, given that the register names there (EAX, EDX, ESI, etc.) are x86 ones, not PowerPC ones.

Arisotura
Posted on 10-12-14 10:37 PM Link | #49595
I wonder where it got the in/out instructions from. The Wii doesn't have port-mapped I/O.


You aren't going to obtain the game's original code this way. At best, you can get some legible C-like pseudocode.

____________________
NSMBHD - Kafuka - Jul
melonDS the most fruity DS emulator there is

zafkflzdasd

Marionumber1
Posted on 10-12-14 11:11 PM Link | #49596
Posted by StapleButter
I wonder where it got the in/out instructions from. The Wii doesn't have port-mapped I/O.


That's another reason I believe it's interpreting the code as x86 code. x86 does have port I/O.


Main - Archived forums - General SMG hacking - RE'ing the game. Hide post layouts | New reply

Page rendered in 0.030 seconds. (2048KB of memory used)
MySQL - queries: 28, rows: 206/206, time: 0.010 seconds.
[powered by Acmlm] Acmlmboard 2.064 (2018-07-20)
© 2005-2008 Acmlm, Xkeeper, blackhole89 et al.