23-10-2018, 02:11 PM
اقتباس من الموضوع الأصلي لــ esso_x
Hi again
How to set pos chars by array to_avoid repeat code
We have simple algo to test that technique
How to set pos chars by array to_avoid repeat code
We have simple algo to test that technique
Target
3zovo Pdf to All Cre@tor&Converter
Original Code:
we start from the last to reverse algorithm
at last That to check char #20
Key gen Code:
PLS. read comments carefully & if any question pls let me know
BR
Esso_x
3zovo Pdf to All Cre@tor&Converter
Original Code:
we start from the last to reverse algorithm
Serial Len
0063EA76 . 83F8 14 CMP EAX,14
Fixed value
404776160439687935164412629846106354571819
we Take that
404 ,776 ,160
loop 1
MOV ECX,4 ; // copy 4 chars
MOV EDX,1 ; // from 1 to 4
MOV EAX,DWORD PTR SS:[EBP-4]
CALL @ezovecon_0040531C ;<= Jump/Call Address Not Resolved
MOV EAX,DWORD PTR SS:[EBP-0Ch] ; // mov first 4 chars to eax
CALL @ezovecon_0040A5F0 ;<= Jump/Call Address Not Resolved ; // convert that values into Hex
MOV EBX,EAX
LEA EAX,DWORD PTR SS:[EBP-010h]
MOV EDX,DWORD PTR SS:[EBP-4] ; // mov fake serial to edx
MOV DL,BYTE PTR DS:[EDX+EDI-1] ; // CHAR 5
CALL @ezovecon_00404FE4 ;<= Jump/Call Address Not Resolved
MOV EAX,DWORD PTR SS:[EBP-010h]
CALL @ezovecon_0040A5F0 ;<= Jump/Call Address Not Resolved
MOV ECX,EAX ; // CHAR 5
MOV EAX,EBX ; // 4d2 = FIRST 4 CHAR
CDQ
IDIV ESI ; // 194 = 404
MOV EDI,EAX ; mov div operation result to eax
MOV EAX,EBX ; // FIRST 4 CHARs
CDQ
IDIV ESI ; // ESI = fixed value
ADD EDI,EDX ; // mov MOD operation result to edx
MOV EAX,EDI ; // mov ADD operation result to EAX
MOV EBX,0Ah ; // EBX == $A
CDQ
IDIV EBX ; // $A
CMP ECX,EDX ; // CMP result oeration with chars pos[5,6,7]
loop2
MOV ECX,4 ; // copy 4 chars
MOV EDX,1 ; // from 1 to 4
MOV EAX,DWORD PTR SS:[EBP-4]
CALL @ezovecon_0040531C ;<= Jump/Call Address Not Resolved
MOV EAX,DWORD PTR SS:[EBP-0Ch] ; // mov first 4 chars to eax
CALL @ezovecon_0040A5F0 ;<= Jump/Call Address Not Resolved ; // convert that values into Hex
MOV EBX,EAX
LEA EAX,DWORD PTR SS:[EBP-010h]
MOV EDX,DWORD PTR SS:[EBP-4] ; // mov fake serial to edx
MOV DL,BYTE PTR DS:[EDX+EDI-1] ; // CHAR 5
CALL @ezovecon_00404FE4 ;<= Jump/Call Address Not Resolved
MOV EAX,DWORD PTR SS:[EBP-010h]
CALL @ezovecon_0040A5F0 ;<= Jump/Call Address Not Resolved
MOV ECX,EAX ; // CHAR 5
MOV EAX,EBX ; // 4d2 = FIRST 4 CHAR
CDQ
IDIV ESI ; // 308 = 776
MOV EDI,EAX ; mov div operation result to eax
MOV EAX,EBX ; // FIRST 4 CHARs
CDQ
IDIV ESI ; // ESI = fixed value
ADD EDI,EDX ; // mov MOD operation result to edx
MOV EAX,EDI ; // mov ADD operation result to EAX
MOV EBX,0Ah ; // EBX == $A
CDQ
IDIV EBX ; // $A
CMP ECX,EDX
loop3
MOV ECX,4 ; // copy 4 chars
MOV EDX,1 ; // from 1 to 4
MOV EAX,DWORD PTR SS:[EBP-4]
CALL @ezovecon_0040531C ;<= Jump/Call Address Not Resolved
MOV EAX,DWORD PTR SS:[EBP-0Ch] ; // mov first 4 chars to eax
CALL @ezovecon_0040A5F0 ;<= Jump/Call Address Not Resolved ; // convert that values into Hex
MOV EBX,EAX
LEA EAX,DWORD PTR SS:[EBP-010h]
MOV EDX,DWORD PTR SS:[EBP-4] ; // mov fake serial to edx
MOV DL,BYTE PTR DS:[EDX+EDI-1] ; // CHAR 5
CALL @ezovecon_00404FE4 ;<= Jump/Call Address Not Resolved
MOV EAX,DWORD PTR SS:[EBP-010h]
CALL @ezovecon_0040A5F0 ;<= Jump/Call Address Not Resolved
MOV ECX,EAX ; // CHAR 5
MOV EAX,EBX ; // 4d2 = FIRST 4 CHAR
CDQ
IDIV ESI ; // A0 = 160
MOV EDI,EAX ; mov div operation result to eax
MOV EAX,EBX ; // FIRST 4 CHARs
CDQ
IDIV ESI ; // ESI = fixed value
ADD EDI,EDX ; // mov MOD operation result to edx
MOV EAX,EDI ; // mov ADD operation result to EAX
MOV EBX,0Ah ; // EBX == $A
CDQ
IDIV EBX ; // $A
CMP ECX,EDX ; // CMP result oeration with chars pos[5,6,7]
at last That to check char #20
@ezovecon_0063EAE0:
CMP ESI,014h
JGE @ezovecon_0063EAE8
ADD DWORD PTR SS:[EBP-8],EDI
@ezovecon_0063EAE8:
CMP ESI,014h
JNZ @ezovecon_0063EB08 ;<= Jump/Call Address Not Resolved
MOV EAX,DWORD PTR SS:[EBP-8]
MOV ECX,0Ah
CDQ
IDIV ECX
CMP EDI,EDX
JE @ezovecon_0063EB08
Key gen Code:
procedure TForm1.btn1Click(Sender: TObject);
Const
_v : array [1..3] of Integer = (404, 776 , 160); // set array by fixed values
_R : array [1..3] of Integer = ( 5, 6 , 7); // pos chars That CMP in algo
var
Serial,x , a : string;
i , k : Integer;
begin
Randomize; k := 0 ;
for i := 1 to 19 do
Serial:= Serial + IntToStr(Random(8)+1);// get random number : len=19
x := Copy(Serial,1,4);
//----------- Start code ------------------
for i := 1 to 3 do // start loop to get 3 values that algo check
begin
a := IntToStr((( StrToInt( x ) div _v[i] )+(StrToInt( x ) mod _v[i] )) mod $A);
Serial[_R[i]] := Char(a[1]); // replace old chars[5,6,7] with new
end;
//----------- End code -------------------
for i := 1 to 19 do // get Char NO. 20
begin
k := k + StrToInt(serial[i]); // calculate random num one by one
if i = 19 then
k := k mod 10 ; // k = char no. 20
end;
edt1.Text := serial + IntToStr(k); // display Serial at textBox
end;
PLS. read comments carefully & if any question pls let me know
BR
Esso_x
implicit conversion (think forward)