Code Monkey home page Code Monkey logo

Comments (3)

mumbel avatar mumbel commented on August 29, 2024

I've been finding bugs and just generic issues in the SLEIGH (also adjusting SLEIGH for improved pcode) with help from a ghidra dev. The sha, extr, and few others (plus their variants) have been problematic translating into SLEIGH with my initial attempts. My current local changes have this as the output:

void FUN_8006f8f4(void)
{
  uint uVar1;
  uint uVar2;
  
  uVar2 = 0;
  do {
    if (true) {
      uVar1 = uVar2 << 2;
    }
    else {
      uVar1 = uVar2;
      if (true) {
        uVar1 = 0;
      }
    }
    uVar2 = uVar2 + 1 & 0xff;
    *(undefined4 *)(&UNK_d00052e0 + uVar1) = 0;
    *(undefined4 *)(&UNK_d0005320 + uVar1) = 0;
  } while (uVar2 < 0x10);
  a0 = &DAT_d000bc00;
  return;
}
void FUN_8006f9be(void)
{
  int iVar1;
  
  a0 = &DAT_d000bc00;
  iVar1 = FUN_800e3c2c();
  if (iVar1 != 1) {
    *(char *)(a0 + -0x1e5b) = *(char *)(a0 + -0x1e5b) + '\x01';
  }
  return;
}

from ghidra.

mumbel avatar mumbel commented on August 29, 2024

29f267b seems like a noticeable improvement.

{
  int iVar1;
  uint uVar2;
  
  uVar2 = 0;
  do {
    iVar1 = uVar2 * 4;
    uVar2 = uVar2 + 1 & 0xff;
    *(undefined4 *)(&UNK_d00052e0 + iVar1) = 0;
    *(undefined4 *)(&UNK_d0005320 + iVar1) = 0;
  } while (uVar2 < 0x10);
  a0 = &DAT_d000bc00;
  return;
}

from ghidra.

esaulenka avatar esaulenka commented on August 29, 2024

Thanks, now decompiled text looks much better!

But unfortunately, problem remains: in FUN_8006f9be, FUN_8006fab2, and many others functions decompiler consider, that a0 is variable.

from ghidra.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.