Converting 2 x86 opcodes to AArch64 (Switch) - need a bit of help

Maq47

Lord of Pyro
OP
Member
Joined
Jan 7, 2012
Messages
1,262
Trophies
1
Location
Your basement
Website
idont.have.one
XP
3,334
Country
United States
So, I'm trying to port a CheatEngine cheat table code to the Switch version of the game, and found out that the 2 opcodes that revolve around the cheat need to be converted to 2 or 3 opcodes EACH for the Switch. The problem I am having is figuring out how the switch does a store instruction of an immediate value to the address pointed to by a register PLUS an immediate value, like the below:

str 0x3DA3D70A, [w1 + 0x00000330]

The above code isn't valid, presumably because I formatted it wrong, so I am trying to get the hexadecimal representation of this. I have found an article for Cortex A-series CPUs online, which mentions the possibility of placing an immediate value into an address using store opcodes, but looking at other instruction set lists, I cannot find an opcode that does it. The closest that does anything like it doesn't allow any immediate values whatsoever, only using straight registers. I for certain need at least either an immediate value to be stored or an immediate value to be added to the destination address register. Is there no way to get that? If not, making this code could very well be a pipe dream for me without using IDA Pro or Ghidra on the executable and trying to search for specific instruction patterns, because if I have to split this instruction into more than 2 opcodes, it is unlikely that they will be consecutive in the executable. @FAST6191 I saw your post regarding AArch64 ASM from 2022 in the Vita section, maybe you could weigh in? You seem to know your stuff.

P.S.: The 2 x86 opcodes that I am trying to convert are the following:

Code:
[rbx + 00000330], 3DA3D70A
[rbx + 0000034C], 00000002
Their hexadecimal representation is the following:

Code:
C7 83 30 03 00 00 0A D7 A3 3D C7 83 4C 03 00 00 02 00 00 00
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • S @ salazarcosplay:
    hunter x hunter
  • S @ salazarcosplay:
    he has not allowed anyone to continue it for him for example
  • Xdqwerty @ Xdqwerty:
    @salazarcosplay, theres a dragon ball af mod for budokai 3
  • Xdqwerty @ Xdqwerty:
    updated ship of harkinian, gonna install some hd texture pack
  • Xdqwerty @ Xdqwerty:
    I might download rayman revolution for my ps3
  • BigOnYa @ BigOnYa:
    I may try the new ram site, and download more RAM to my Switch. Not sure if ddr3 is the right ram
    for it tho. Edit- no it uses floppy Ram, just like @AncientBoi
    +1
  • Xdqwerty @ Xdqwerty:
    aeiou
  • BigOnYa @ BigOnYa:
    And sometimes Z
  • SylverReZ @ SylverReZ:
    @K3Nv2, MAGA supporters be wearing tin foil hats lol.
    +1
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, whats maga?
  • BigOnYa @ BigOnYa:
    It stands for Maniacs Against General Acceptance
    +1
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, people rejecting general consensus about stuff?
    +1
  • BigOnYa @ BigOnYa:
    Yup, nuh its really just Trump followers
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, im not american so i dont care about trump
    +1
  • Xdqwerty @ Xdqwerty:
    or us elections
  • BigOnYa @ BigOnYa:
    Me niether, us north Koreans don't care
  • Xdqwerty @ Xdqwerty:
    good night
  • BakerMan @ BakerMan:
    i don't care either, even if i'm american
  • BakerMan @ BakerMan:
    truth be told, i agree with psi, i dislike both candidates, but i'd probably vote trump simply because the economy was better during his presidency
  • AngryCinnabon @ AngryCinnabon:
    Just be careful, if trump ends up winning and using project 2025 America might really change...for the worse.
  • AngryCinnabon @ AngryCinnabon:
    I'm not american and even that sends shivers down my spine.
  • AngryCinnabon @ AngryCinnabon:
    anything that offers trump an opportunity to become an actual dictator
    is bad in my book, i could care less if it wasn't for that...
  • K3Nv2 @ K3Nv2:
    Canada: America's Russia
  • NinStar @ NinStar:
    people are so dramatic that I can't even tell if they are being serious
    NinStar @ NinStar: people are so dramatic that I can't even tell if they are being serious