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

What Can This Function Possibly Do?

Name: Anonymous 2011-09-28 5:17

I'm all lost...

libEntity *__cdecl cyLibDataEntry254(libEntity *E, entityPair *P)
{
  libEntity *L; // edx@1
  libEntity *Result; // eax@5
  libEntity *R; // edx@7

  L = E->L;
  if ( L )
  {
    L->R = E->R;
again:
    R = E->R;
    if ( R )
    {
      Result = E->L;
      R->L = Result;
    }
    else
    {
      if ( P->R != E )
        debugfail(254, "cglib/src/cylibdataentry.cpp");
      Result = E->L;
      P->R = Result;
    }
    E->L = 0;
    E->R = 0;
    return Result;
  }
  if ( P->L == E )
  {
    P->L = E->R;
    goto again;
  }
  if ( E->R )
    debugfail(243, "cglib/src/cylibdataentry.cpp");
  return Result;
}

Name: Anonymous 2011-09-28 5:26

Just run a tracking table. Give this program a set of valid inputs and track the current state of each variable for each line of code. If you can't figure it out after the first run, run it a couple more times for different types of input values.

I swear we learned this at 10th grade.

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