Souhail_Hammou

Hacknowledge 2013 Bin500 Keygen

Mar 24th, 2014
324
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; Souhail (Itsecurity.ma)
  2. ; CHECK HOW I DID IT BELOW THIS CODE :)
  3. ; Greetings to Lord Noteworthy
  4. .386
  5. .model flat,stdcall
  6. option casemap:none
  7.  
  8. include windows.inc
  9. include kernel32.inc
  10. includelib kernel32.lib
  11. include user32.inc
  12. includelib user32.lib
  13. include masm32.inc
  14. includelib masm32.lib
  15.  
  16. .data
  17. text db "Saisir un nom :) :",00
  18. SerialIs db "Le Serial pour ce nom est : ",00,0Ah
  19. Quit db 0Ah,"**Appuyer sur Entrer pour quitter**",00
  20. .data?
  21. name1 db 200 dup(?)
  22. serial db 400 dup(?)
  23. exit db 10 dup(?)
  24. .code
  25. start :
  26. invoke StdOut,addr text
  27. invoke StdIn,addr name1,200
  28. lea esi,name1
  29. lea edi,serial
  30. myloop :
  31. cmp byte ptr ds:[esi],00h
  32. je term
  33. movzx eax,byte ptr ds:[esi]
  34. ROR al,3 ; Rotate right 3 times
  35. xor al,43h
  36. mov ebx,10h
  37. xor edx,edx
  38. div ebx ; EAX / 10
  39. ;EAX has the division result (used to retrieve the 1st letter)
  40. ;EDX has the modulo (used to retrieve the 2nd letter)
  41. add al,41h
  42. add dl,41h
  43. mov byte ptr ds:[edi],al
  44. inc edi
  45. mov byte ptr ds:[edi],dl
  46. inc edi
  47. inc esi
  48. jmp myloop
  49. term :
  50. mov byte ptr ds:[edi],00h
  51. invoke StdOut,addr SerialIs
  52. invoke StdOut,addr serial
  53. invoke StdOut,addr Quit
  54. invoke StdIn,addr exit,01
  55. invoke ExitProcess,0
  56. end start
  57.  
  58. ; Name : IJKL
  59. ; Serial : EFGH
  60.  
  61. ; Ptr to name in : ESI
  62. ; Ptr to serial in : EDI
  63.  
  64. ; Steps :
  65. ; Get the 1st character from the serial in "AL". = 45h
  66.  
  67. ; Subsract 41h from AL. = 04h
  68.  
  69. ; Shift left AL by 4 which means (AL * 10h) = 40h
  70.  
  71. ; Get The 2nd character from the serial and store it in AL = 46h
  72. ; Then move it to CL. The result of the shift operation is poped
  73. ; back to AL.
  74.  
  75. ; Substract 41h from CL (2nd character of the serial) CL == 05
  76.  
  77. ; Add CL to AL (AL == 45h)
  78.  
  79. ; XOR AL with 43h (AL == 06)
  80.  
  81. ; Rotate Left AL 3 times ; AL = 30h
  82.  
  83. ; Compare AL with the 1st character of the Name.
  84.  
  85. ; Redo the same steps for the other chars.
  86.  
  87. ; Conclusion : Each 2 letters of the serial gives us 1 letter from the name. len(serial) = len(name)*2
  88.  
  89. ; ===============================
  90. ; The Serial Must be the name*2.
  91. ; ===============================
  92. ==========================
  93. ; THE REVERSING PART :
  94. =========================
  95. ; Getting a serial from the Name :
  96.  
  97. ; Each 2 characters of the serial give us 1 letter of the name , so we must extract 2 letters from one.
  98.  
  99. ; Rotate Right 3 times the letter of the name.
  100. ; xor the letter with 43h.
  101. ; Divide the result by 10 (The MOD will be used to retrieve the 2nd letter) and the division result will be used to retrieve the 1st letter.
  102. ; MOD (2nd letter) : add 41h to the MOD
  103. ; RESULT (1st letter) : Add 41h to the Result
  104.  
  105. ; Do it again with all the other letters and it'd be pwned.
Add Comment
Please, Sign In to add comment