MinecraftWiiUCodes / MinecraftWiiUPlaza

An all-in-one place for Minecraft: Wii U codes and tools to be stored.
21 stars 10 forks source link

Kind of a question (sorry lol) #6

Closed ghost closed 2 years ago

ghost commented 2 years ago

So about Anti-Kick.md in the RAM edits folder, I saw that you put: (found in PureClient)

That being said is there a way to actually disassemble these .mod files, as I've been trying to figure that out for a while now. My first though would be possibly Ghidra as .mod files seem to be .elf just in another format written in cpp. (sorry if this is a really nooby question xD)

Anyways input would be appreciated, also sorry if I'm issue spamming, I don't really have any other means of contact with you atm.

ghost commented 2 years ago

Mainly asking because if I'm able to learn to add features or better yet make better versions of these "Clients" I can run them out of popularity by releasing better ones without needing a license.

MinecraftWiiUCodes commented 2 years ago

I use IDA Pro 7.6 with the Wii U loader plugin, you just select the .mod file and it should pick "PowerPC Little Endian" as the type

ghost commented 2 years ago

I use IDA Pro 7.6 with the Wii U loader plugin, you just select the .mod file and it should pick "PowerPC Little Endian" as the type

Ah I see, I havent been able to use IDA Pro because as I understand it, it's commercially licensed, I'm also limited by hardware being 32-bit and only Linux.

ghost commented 2 years ago

I use IDA Pro 7.6 with the Wii U loader plugin, you just select the .mod file and it should pick "PowerPC Little Endian" as the type

Ah I see, I havent been able to use IDA Pro because as I understand it, it's commercially licensed, I'm also limited by hardware being 32-bit and only Linux.

Followup, would this be along the lines of DNSpy editing with EXE Files? If so that's helpful but also could end up being a huge pain as things end up horribly named.

MinecraftWiiUCodes commented 2 years ago

Ghidra could work but I find it more confusing to use than IDA Pro personally, and you're required to use specifically version 10.0.1 for Wii U loading (https://github.com/Maschell/GhidraRPXLoader/releases/tag/v0.7-ghidra.10)

Also, dnSpy is specifically for editing exe files that are made in .NET Framework (Winforms/C#) which 99% of modders use (even with obfuscation they usually always use ConfuserEx and it's easily to reverse lmao)

ghost commented 2 years ago

True, I've learned this with several Python programs as obfuscation is common in them. I'm pretty confident if I was able to get actual source code of the plugin I could make alot of my ideas come to fruition but that's my main wonder with editing / decompiling these files. My main point with alluding to DNSpy is that it isnt actual source code, just binaries that can be edited to achieve a similar effect. With decompiling with IDA is it along that line or is it entirely different?

MinecraftWiiUCodes commented 2 years ago

C# decompilation is way, way easier than C++ decompilation, it's possible but really difficult. BUT because these clients still have debug symbols included (you can see the names of functions), you could probably just create one from scratch and use the disassembled code as a reference, since it's unlikely you'll ever get the actual source code back from the compiled .mod file

ghost commented 2 years ago

That's what I was expecting, sending code addresses using plugins isnt the hardest thing, infact from what I've seen it's quite similar to the Python TCP Gecko library I use using tcp.mempoke(address, value) and such. I was never expecting true source although that would be amazing xD

Making from scratch wouldnt be a problem if I can get actual function names and references etc, but I think my main problem would be COMPILING as the main device I use is armhf architecture and like I said 32-bit so I'm not sure DevkitPro / WUT would even work with compiling.

MinecraftWiiUCodes commented 2 years ago

Function names are indeed visible with debug symbols as seen (here), this is the AntiKick module for example.

I'm not 100% sure if being on 32-bit will be an issue yet though

ghost commented 2 years ago

Oh damn they did it in raw assembly xD I've yet to fully learn that format. Although I do have a tool that can convert any code to the bare assembly

MinecraftWiiUCodes commented 2 years ago

They didn't write it in assembly, it's c++ that was compiled into assembly, it even shows the source files up here lol https://i.imgur.com/a3VP4CK.png

ghost commented 2 years ago

They didn't write it in assembly, it's c++ that was compiled into assembly

Ah, I mainly mean the functions with r12 / r6 etc that's raw assembly of cafe codes used in JGecko is what I meant. Or rather it's raw machine codes, but I digress. I could be wrong though, I'm mainly a noob when it comes to anything outside of analyzing RAM or Python, (sometimes C#)

Using this as an example, it's a mod menu I made converted to assembly 2022-05-06_21-54

MinecraftWiiUCodes commented 2 years ago

I acutally do have a bit of PowerPC assembly knowledge myself, been learning it the entire time I was gone lol (8-ish months)

I've also been in touch with the Minecraft Wii U modding community and the mod injector discord and found some interesting stuff like pointers and classes and functions, etc.

ghost commented 2 years ago

most of my knowledge comes from analyzing random codes I found and realizing correlations I can apply to other instances, for example seeing codes with button modifiers and learning to disassemble every line to get all the addresses, etc. It's been slow because there's not much documentation outside of Discord, and I can't even use Discord lol

MinecraftWiiUCodes commented 2 years ago

Funny that you say that because I'm working on a Minecraft Wii U documentation site right now, I'm going to store basically everything I know about the game into there

ghost commented 2 years ago

Yeah I saw that on your newest repo using ReadTheDocs

MinecraftWiiUCodes commented 2 years ago

I thought about using Github's wiki page but I feel like a ReadTheDocs page would be easier to navigate

ghost commented 2 years ago

I agree, imo ReadTheDocs can be a bit of a pain to get started initially but once you get a flow going it becomes easier. Anyways is there a better way to contact you? As I get the feeling GitHub issues might get annoying at some point. It's not necessary, just wondering.

MinecraftWiiUCodes commented 2 years ago

Unfortunately no because as you mentioned, you can't use Discord, and YouTube comments would be a lot slower lmao

ghost commented 2 years ago

Alright that's fine. And yeah I can't use Discord because of network restrictions :sweat_smile:

If you want to though I have instagram or gmail (opting for hangouts / google chat with that) which could allow easier communication. However that's completely up to you.

MinecraftWiiUCodes commented 2 years ago

I guess we could use Google Chat, I've never personally used it before though

ghost commented 2 years ago

It's not half bad, I'll put my gmail here rq and delete it later once you have it.

*

stupid name ik, but it was an autogen name lmao

MinecraftWiiUCodes commented 2 years ago

Just messaged you, you can delete it now if you'd like