Crack a bitmap CM

Source: Internet
Author: User

Article Title: crack a bitmap CM
[Author]: riusksk
[Author Home Page]: http://riusksk.blogbus.com
[Software Download ]:Cm.rar[Who downloads?]
[Protection method]: keyfile
[Operating platform]: windows vista sp1
[Tools]: OD, WinHex
[Author's statement]: I am only interested and have no other purpose. For errors, please enlighten us!
Bytes ------------------------------------------------------------------------------------------------------------------
[Cracking process ]:

Open CM first, click the "Unlock Me" button, and prompt "the system cannot find the specified file". Then, the system automatically closes the file. We can see that this CM is a keyfile CM, so we can break the breakpoint bpx CreateFileA and stop it at the following address after running:
0040149F |. 6A 00 PUSH 0;/hTemplateFile = NULL
004014A1 |. 68 A0000008 PUSH 80000A0; | Attributes = ARCHIVE | NORMAL | SEQUENTIAL_SCAN
004014A6 |. 6A 03 PUSH 3; | Mode = OPEN_EXISTING
004014A8 |. 6A 00 PUSH 0; | pSecurity = NULL
004014AA |. 6A 00 PUSH 0; | idle mode = 0
004014AC |. 68 00000080 PUSH 80000000; | Access = GENERIC_READ
004014B1 |. 68 6C604000 PUSH Imaginat.0040606C; | FileName = "ohmygod.bmp"
004014B6 |. FFD7 call edi; CreateFileA
For this reason, we should first create a new file named Export ohmygod.bmp, then open it with the built-in drawing tool, and click Save directly to save a blank image. Then we can modify the file based on the analyzed content. Next, let's take a look at the relevant information of the BMP file header and information header. I checked Win32 Programmer's Reference. The details are as follows:
Bitmap File Header:
Typedef struct tagBITMAPFILEHEADER {// bmfh
WORD bfType;
DWORD bfSize;
WORD bfReserved1;
WORD bfReserved2;
DWORD bfOffBits;
} BITMAPFILEHEADER;
 

Members

BfType
Specifies the file type. It must be BM.

BfSize
Specifies the size, in bytes, of the bitmap file.

BfReserved1
Reserved; must be zero.

BfReserved2
Reserved; must be zero.

BfOffBits
Specifies the offset, in bytes, from the BITMAPFILEHEADER structure to the bitmap bits.

Bitmap header:
Typedef struct tagBITMAPINFOHEADER {// bmih
DWORD biSize;
LONG biWidth;
LONG biHeight;
WORD biPlanes;
WORD ititcount
DWORD biCompression;
DWORD biSizeImage;
LONG biXPelsPerMeter;
LONG biYPelsPerMeter;
DWORD biClrUsed;
DWORD biClrImportant;
} BITMAPINFOHEADER;
 

Members

BiSize

Specifies the number of bytes required by the structure.

BiWidth

Specifies the width of the bitmap, in pixels.

BiHeight

Specifies the height of the bitmap, in pixels. if biHeight is positive, the bitmap is a bottom-up DIB and its origin is the lower left corner. if biHeight is negative, the bitmap is a top-down DIB and its origin is the upper left corner.

BiPlanes

Specifies the number of planes for the target device. This value must be set to 1.

BiBitCount

Specifies the number of bits per pixel. This value must be 1, 4, 8, 16, 24, or 32.

BiCompression

Specifies the type of compression for a compressed bottom-up bitmap (top-down DIBs cannot be compressed). It can be one of the following values:

Value Description
BI_RGB An uncompressed format.
BI_RLE8 A run-length encoded (RLE) format for bitmaps with 8 bits per pixel. the compression format is a two-byte format consisting of a count byte followed by a byte containing a color index. for more information, see the following Remarks section.
BI_RLE4 An RLE format for bitmaps with 4 bits per pixel. the compression format is a two-byte format consisting of a count byte followed by two word-length color indices. for more information, see the following Remarks section.
BI_BITFIELDS Specifies that the bitmap is not compressed and that the color table consists of three doubleword color masks that specify the red, green, and blue components, respectively, of each pixel. this is valid when used with 16-and 32-bits-per-pixel bitmaps.
 

BiSizeImage

Specifies the size, in bytes, of the image. This may be set to 0 for BI_RGB bitmaps.

BiXPelsPerMeter

Specifies the horizontal resolution, in pixels per meter, of the target device for the bitmap. an application can use this value to select a bitmap from a resource group that best matches the characteristics of the current device.

BiYPelsPerMeter

Specifies the vertical resolution, in pixels per meter, of the target device for the bitmap.

BiClrUsed

Specifies the number of color indices in the color table that are actually used by the bitmap. If this value is zero, the bitmap uses the ma

Related Article

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.