Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Reversing Packet Encryption help

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Discussions
View previous topic :: View next topic  
Author Message
souleaper
Newbie cheater
Reputation: 0

Joined: 08 Jul 2012
Posts: 24

PostPosted: Wed Oct 02, 2019 8:36 pm    Post subject: Reversing Packet Encryption help Reply with quote

Code:
int __stdcall EncrytpionMethod(int a1, __int16 a2, char a3, char a4)
{
  int v4; // ebp@0
  _DWORD *v5; // eax@1
  char Packets[2]; // [sp+0h] [bp-44h]@1
  char v8; // [sp+2h] [bp-42h]@1
  char v9; // [sp+3h] [bp-41h]@1
  char v10; // [sp+4h] [bp-40h]@1
  char v11; // [sp+8h] [bp-3Ch]@1
  char v12; // [sp+9h] [bp-3Bh]@1
  char v13; // [sp+Ah] [bp-3Ah]@1
  char v14; // [sp+Eh] [bp-36h]@1
  int v15; // [sp+10h] [bp-34h]@1
  int v16; // [sp+14h] [bp-30h]@1
  __int16 v17; // [sp+1Ah] [bp-2Ah]@1
  __int16 v18; // [sp+2Ch] [bp-18h]@1
  int v19; // [sp+38h] [bp-Ch]@1
  char v20; // [sp+40h] [bp-4h]@1

  sub_5CBD48((int)dword_5FB73C, v4, Packets[0]);
  sub_5CB8F8((int)Packets, 0, 15u);
  v17 = 17652;
  sub_5CB864(Packets, &v17, 2);
  v8 = 15;
  v9 = 11;
  sub_5CB864(&v10, &a2, 2);
  v11 = a3;
  v12 = a4;
  v16 = sub_4670A4(a1, a2, a4);
  sub_5CB864(&v13, a1 + 4432, 4);
  sub_5CB864(&v14, &v16, 1);
  v18 = 12;
  v5 = sub_5D99DC(&v20);
  ++v19;
  sub_4224C8(a1, (int)Packets, 15, *v5);
  --v19;
  sub_5D9C10(&v20, 2);
  v15 = 0;
  do
  {
    Packets[v15] ^= 15u;
    ++v15;
  }
  while ( v15 < 15 );
  return W32_SendCheckerFunc(*(_DWORD *)(*(_DWORD *)(a1 + 1188) + 144), Packets, 15);
}


A while back I asked a question about the last byte of a game send packet. and I still can't figure it out. I manage to grab that from ida pro.
The eat medicine packet seems to be only 15 bytes long. which seems to make sense in this case. The ^= XOR key is different everytime, but in this case is 15, I don't no clue why. Anyone know how the last byte gets generate from this code above..

Thanks Chelvan.[/code]
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Discussions All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites