Using Ida to crack TraceMe.exe

Source: Internet
Author: User

I find it much easier to hack TraceMe.exe with Ida than OD.

After opening Ida, search directly for "serial number" to get



Double-click to jump to Disassembly window, press F5 to convert to Class C + + code

Signed int __stdcall Dialogfunc (HWND hwnd, int A2, unsigned __int16 A3, int A4)
{
signed int v5; [Email protected]
int V6; [Email protected]
HWND V7; [Email protected]
HWND V8; [Email protected]
HWND V9; [Email protected]
Hicon V10; [Email protected]
Const CHAR STRING2[4]; [SP+8H] [bp-f4h]@1
int V12; [Sp+ch] [bp-f0h]@1
int v13; [SP+10H] [bp-ech]@1
__int16 V14; [SP+14H] [bp-e8h]@1
Char V15; [SP+16H] [bp-e6h]@1
Char V16; [sp+18h] [bp-e4h]@1
__int16 v17; [SP+2CH] [bp-d0h]@1
Char v18; [Sp+2eh] [bp-ceh]@1
Char v19; [sp+30h] [bp-cch]@1
__int16 V20; [SP+44H] [bp-b8h]@1
Char v21; [SP+46H] [bp-b6h]@1
CHAR String; [sp+48h] [bp-b4h]@9
Const CHAR STRING1; [SP+98H] [bp-64h]@9


memcpy (&v16, "you enter more than four characters! ", 0x14u);
v17 = * (_word *) "! ";
V12 = dword_405054;
V18 = aufikgb[22];
V15 = byte_40505e;
memcpy (&v19, "Serial number is wrong, come again!") ", 0x14u);
* (_dword *) String2 = dword_405050;
V20 = * (_word *) "! ";
V14 = word_40505c;
V13 = dword_405058;
V21 = aagmgb[22];
if (a2 = = 16)
{
DestroyWindow (HWND);
return 1;
}
if (a2 = = 272)
{
v10 = Loadicona (HInstance, (LPCSTR) 0x70);
SendMessageA (HWnd, 0x80u, 1u, (LPARAM) V10);
Senddlgitemmessagea (HWnd, 0xc5u, 0x50u, 0);
return 1;
}
if (a2! = 273)
return 0;
if ((signed int) A3 > 1013)
{
if (a3 = = 1014 | | a3 = = 40002)
Dialogboxparama (HInstance, (LPCSTR) 0x67, hWnd, sub_401020, 0);
return 0;
}
if (a3! = 1013)
{
if (a3 = = 2 | | a3 = = 1002)
{
SendMessageA (hWnd, 0x10u, 0, 0);
return 0;
}
return 0;
}
V5 = Getdlgitemtexta (HWnd, &string, 81);//username
Getdlgitemtexta (HWnd, LPSTR, &STRING1, 101);//serial number
if (String && v5 >= 5)//Determine if the input username length is greater than 5
{
Lobyte (v6) = sub_401340 (&string1, &string, V5);//This function generates serial numbers based on user name and is compared with the serial number entered
if (V6)//v6==1, indicating user name and serial number match
{
Lstrcpya (:: String1, String2);
V7 = GetDlgItem (hWnd, 110);
EnableWindow (V7, 0);
V8 = GetDlgItem (hWnd, 1000);
EnableWindow (V8, 0);
V9 = GetDlgItem (hWnd, 1000);
}
Else
{
Lstrcpya (:: String1, &v19);
V9 = GetDlgItem (hWnd, 1000);
}
}
Else
{
Lstrcpya (:: String1, &v16);//username is less than 5, prompting "You must enter more than four characters"
V9 = GetDlgItem (hWnd, 110);
}
SetFocus (V9);
MessageBeep (0);
Dialogboxparama (HInstance, (LPCSTR) 0x79, hWnd, sub_401060, 0);
return 0;
}


BOOL __cdecl sub_401340 (LPCSTR lpString1, LPSTR lpString2, signed int A3)
{
signed int v3; [Email protected]
int v4; [Email protected]
signed int i; [Email protected]


V3 = 3;
V4 = 0;
for (i = 0; v3 < A3; ++i)
{
if (i > 7)
i = 0;
V4 + = (unsigned __int8) byte_405030[i] * (unsigned __int8) lpstring2[v3++];
}
WSPRINTFA (LpString2, "%ld", V4);
Return Lstrcmpa (lpString1, lpString2) = = 0;
}

Byte_405030[] Array in the. Data area:

Char byte_405030[8]={0x0c,0x0a,0x13,0x09,0x0c,0x0b,0x0a,0x08}

If I enter the user name: Tanyo

v4=121*12+111*10=2562


Enter user name Tanyo, serial number 2562 for verification:


Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Using Ida to crack TraceMe.exe

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.