Enemies location in map

09/03/2022 22:35 zer0byte#1
Hello
In conquer online private server the versions before 3D
the X and Y Axis of player is encrypted

for examle when I located at twin city at location (330,252)
the memory values is equal X:28864 and Y:9312

how to decrypt it to get enemies entitylist real locations?
09/08/2022 19:49 Spirited#2
From the other threads you keep creating on this topic, it sounds like you're using a proxy. Look at private server source code... they usually have the answers you seek. Idk if this is true for the most updated version of Conquer 3.0 (not 3D), but here's how it's done in 6090 according to [Only registered and activated users can see links. Click Here To Register...]:

Code:
private void DecodeSkill()
        {
            SkillId = (ushort) ( ExchangeShortBits(( SkillId ^ ObjectId ^ 0x915d ), 13) + 0x14be );
            var sl = SkillLevel = ( (ushort) ( (byte) SkillLevel ^ 0x21 ) ); // fix for .net 4.6 overflow issue
            TargetObjectId = ( ExchangeLongBits(TargetObjectId, 13) ^ ObjectId ^ 0x5f2d2463 ) + 0x8b90b51a;
            PositionX = (ushort) ( ExchangeShortBits(( PositionX ^ ObjectId ^ 0x2ed6 ), 15) + 0xdd12 );
            PositionY = (ushort) ( ExchangeShortBits(( PositionY ^ ObjectId ^ 0xb99b ), 11) + 0x76de );
        }

        private void EncodeSkill()
        {
            SkillId = (ushort) ( ExchangeShortBits(ObjectId - 0x14be, 3) ^ ObjectId ^ 0x915d );
            SkillLevel = (ushort) ( ( SkillLevel + 0x100 * ( Timestamp % 0x100 ) ) ^ 0x3721 );
            Arg1 = MathUtils.BitFold32(SkillId, SkillLevel);
            TargetObjectId = ExchangeLongBits(( ( TargetObjectId - 0x8b90b51a ) ^ ObjectId ^ 0x5f2d2463u ), 19);
            PositionX = (ushort) ( ExchangeShortBits((uint) PositionX - 0xdd12, 1) ^ ObjectId ^ 0x2ed6 );
            PositionY = (ushort) ( ExchangeShortBits((uint) PositionY - 0x76de, 5) ^ ObjectId ^ 0xb99b );
        }

private static uint ExchangeShortBits(uint data, int bits)
        {
            data &= 0xffff;
            return ( data >> bits | data << ( 16 - bits ) ) & 65535;
        }

        private static uint ExchangeLongBits(uint data, int bits) { return data >> bits | data << ( 32 - bits ); }
09/08/2022 23:36 zer0byte#3
Quote:
Originally Posted by Spirited View Post
From the other threads you keep creating on this topic, it sounds like you're using a proxy. Look at private server source code... they usually have the answers you seek. Idk if this is true for the most updated version of Conquer 3.0 (not 3D), but here's how it's done in 6090 according to [Only registered and activated users can see links. Click Here To Register...]:

Code:
private void DecodeSkill()
        {
            SkillId = (ushort) ( ExchangeShortBits(( SkillId ^ ObjectId ^ 0x915d ), 13) + 0x14be );
            var sl = SkillLevel = ( (ushort) ( (byte) SkillLevel ^ 0x21 ) ); // fix for .net 4.6 overflow issue
            TargetObjectId = ( ExchangeLongBits(TargetObjectId, 13) ^ ObjectId ^ 0x5f2d2463 ) + 0x8b90b51a;
            PositionX = (ushort) ( ExchangeShortBits(( PositionX ^ ObjectId ^ 0x2ed6 ), 15) + 0xdd12 );
            PositionY = (ushort) ( ExchangeShortBits(( PositionY ^ ObjectId ^ 0xb99b ), 11) + 0x76de );
        }

        private void EncodeSkill()
        {
            SkillId = (ushort) ( ExchangeShortBits(ObjectId - 0x14be, 3) ^ ObjectId ^ 0x915d );
            SkillLevel = (ushort) ( ( SkillLevel + 0x100 * ( Timestamp % 0x100 ) ) ^ 0x3721 );
            Arg1 = MathUtils.BitFold32(SkillId, SkillLevel);
            TargetObjectId = ExchangeLongBits(( ( TargetObjectId - 0x8b90b51a ) ^ ObjectId ^ 0x5f2d2463u ), 19);
            PositionX = (ushort) ( ExchangeShortBits((uint) PositionX - 0xdd12, 1) ^ ObjectId ^ 0x2ed6 );
            PositionY = (ushort) ( ExchangeShortBits((uint) PositionY - 0x76de, 5) ^ ObjectId ^ 0xb99b );
        }

private static uint ExchangeShortBits(uint data, int bits)
        {
            data &= 0xffff;
            return ( data >> bits | data << ( 16 - bits ) ) & 65535;
        }

        private static uint ExchangeLongBits(uint data, int bits) { return data >> bits | data << ( 32 - bits ); }

This reply contains answer for my question:
[Only registered and activated users can see links. Click Here To Register...]

(x-32)>>6
(y-32)>>6

but these mathematics changes every huge update in Conquer.exe and not working for the client what I deal with

so how to get actual X,Y values from memory ?
09/09/2022 16:14 OELABOELA#4
Best way to find out what encryption they are using is by reversing it. Open up conquer in your disassembler and look for the CMsgInteract packet with interactType UseSkill. Look around for string refs/packet IDs and you will find it.

Try to use pseudocode generators to make it 'readable' and convert it to your langauge.
09/09/2022 16:43 zer0byte#5
Quote:
Originally Posted by OELABOELA View Post
Best way to find out what encryption they are using is by reversing it. Open up conquer in your disassembler and look for the CMsgInteract packet with interactType UseSkill. Look around for string refs/packet IDs and you will find it.

Try to use pseudocode generators to make it 'readable' and convert it to your langauge.
Where can i find this Class ByteBuffer.cpp in this video