?

Log in

No account? Create an account
hehe - “Nightwatch” [entries|archive|friends|userinfo]
"Praxeology rests on the fundamental axiom that human beings engage in conscious actions toward chosen blah blah blah blah blah teh market!"

[ website | Pictures and Stuff ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

hehe [Aug. 12th, 2008|12:00 am]
“Nightwatch”
[Current Mood |dorkydorky]

Whoever ported Cave Story to the Mac left in the symbols!!!

void __cdecl EncryptionBinaryData2(_BYTE *data, signed int in_len)
{
  unsigned __int8 v2; // al@1
  int key_pos; // ebx@1
  signed int len; // edi@1
  int key; // esi@2
  int i; // edx@4
  int n; // eax@6

  len = in_len;
  key_pos = in_len / 2;
  v2 = data[in_len / 2];
  if ( v2 )
    key = -v2;
  else
    key = -7;
  i = 0;
  while ( i < len )
  {
    if ( i != key_pos )
    {
      n = (key + data[i]) & 0x800000FF;
      if ( n < 0 )
        n = ((n - 1) | 0xFFFFFF00) + 1;
      data[i] = n;
    }
    ++i;
  }
}


This is used for most of the data files in the game.
LinkReply