Legend source code analysis-client (analysis and comparison of Legend 2 and 3 file formats)

Source: Internet
Author: User

I hope you can avoid detours. The version downloaded online should have been changed from Legend 2 to legend 3. Analyze the source code. g_xloginproc.load (); load m_image.newload (image_interface_1, true, true );

Continue reading the WIX file,
Readfile (hwixfile, & m_stnewwiximgaeinfo, sizeof (newwiximageinfo)-sizeof (int *), & dwreadlen, null );

// Wix Header Format (56 bytes) (new)
Typedef struct tagnewwixfileimageinfo
{
Char sztitle [20]; // library file title 'wemade Entertainment Inc. 'wil File Header
Int nindexcount; // number of images
Int * pnposition; // The position.
} Newwiximageinfo, * lpnewwiximageinfo;

I don't know. I was shocked. You can see it. This is the definition of Wix, not legend 2. I have analyzed the image of Legend 2 before: the previous content of 0x23 address (including this address) is the same, namely: # indx V1.0-wemade Entertainment Inc. where ofs44 0x2c is stored: The 0b 00 00 is stored. After the high and low bits are converted to: 0xb, the decimal number is 11 (number of images) ofs48 0x30: where 38 00 00 is stored, after high/low bit conversion: 0x438 = 1080, this is the starting position of the image data. Here, only 20 titles are in length. Not at all. So if you get the online legend 3 Format and try to read the Legend 2 image, it is incorrect. For details, you can debug it. After debugging, the number of images in it is not correct.

Khan, even depressing: // Wix File Header Format (56 bytes)
Typedef struct tagwixfileimageinfo
{
Char sztmp [40]; // library file title 'wemade Entertainment Inc. 'wil File Header
Int nindexcount; // number of images
Int * pnposition; // The position.
} Wiximageinfo, * lpwiximageinfo; I used this format. Why is it wrong, because I have analyzed it before, 0xb converts the decimal number to 11 (number of images) ofs48 0x30, and you can see no, where the number of images is stored. So hurry up and change the data structure. I don't know why. Is there a problem with my version? I downloaded several resource files and found that the problem still exists. It does not seem like an image problem.

In addition, if you want to run the image in the following project without modifying the data structure, please download it from the official website of legend 3 client. I downloaded the 1.5 Resource file. Is a resource file of Legend 2. Good luck!

 

  Discussion on the format of legendary file types (II ):// Wix File Header Format (new) typedef struct tagnewwixfileimageinfo {char sztitle [20]; // library file title 'wemade Entertainment Inc. 'wil File Header int nindexcount; // number of images int * pnposition; // position} newwiximageinfo, * lpnewwiximageinfo; let's download a hedit editor to open a wil file and analyze it. We found that in the WIX file, the content before the address 0x13 (including this address) is the same, that is, it is: ''20 spaces. Number of images: nindexcount 18    OFS 20, 0x14 location, the stored data is 12 00 00 00, after the High and Low Bit conversion: 0x12 10 number is 18 (number of images ). Where ofs28 0x1c is stored: 20 00 00 00, after high/low bit conversion: 0x20 = 32, this is the starting position of the image data. We used wil editing to open the corresponding wil file and found that there were 17 images (minus 1 ). In addition, we found that the data between 28 and 31 in ofs28 0x1c is always 20 00 00 00, and finally we understand that the starting position of all images is the same. Capture the graph analysis and analyze it by yourself. The structure is similar to that of Legend 2.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.