home *** CD-ROM | disk | FTP | other *** search
/ The Elite Hackers Toolkit / TheEliteHackersToolkitVolume1_1998.rar / HACKERS.BIN / appcraks / UNXORER.ZIP / UNXORER.ASM < prev    next >
Assembly Source File  |  1998-01-23  |  7KB  |  184 lines

  1. ; UnXorer v0.1 (c) MERLiN // Delirium Tremens 1998
  2. .386p
  3. cseg            segment         use16
  4.                 assume          cs:cseg,ds:cseg,es:cseg
  5.                 org             100h
  6. begin           proc
  7.                 mov             ah,9
  8.                 lea             dx,id
  9.                 int             21h
  10.                 mov             si,81h
  11.                 lodsb
  12.                 cmp             al,13
  13.                 jz              bad_usage
  14. _keep_scan:
  15.                 lodsb
  16.                 cmp             al,32
  17.                 jz              _keep_scan
  18.                 dec             si
  19.                 push            si si si si
  20.                 pop             di
  21.                 mov             al,13
  22.                 repne           scasb
  23.                 dec             di
  24.                 mov             ax,2400h
  25.                 stosw
  26.  
  27.                 mov             seg01,cs
  28.  
  29.                 mov             bh,10h
  30.                 mov             ah,4ah
  31.                 int             21h
  32.                 pop             dx
  33.                 mov             ax,3d02h
  34.                 int             21h
  35.                 jnc             c1
  36.                 lea             dx,not_found
  37. view_n_exit:
  38.                 mov             ah,9
  39.                 int             21h
  40.                 mov             ah,4ch
  41.                 int             21h
  42. c1:
  43.                 xchg            bx,ax
  44.                 lea             dx,process
  45.                 mov             ah,9
  46.                 int             21h
  47.                 pop             dx
  48.                 int             21h
  49.                 mov             ax,4202h
  50.                 xor             cx,cx
  51.                 push            cx cx
  52.                 xor             dx,dx
  53.                 int             21h
  54.                 sub             ax,505
  55.                 mov             sz,ax
  56.                 pop             cx dx
  57.                 mov             ax,4200h
  58.                 int             21h
  59.                 lea             dx,area_4_reading
  60.                 mov             si,dx
  61.                 push            si
  62.                 mov             ah,3fh
  63.                 mov             cx,3
  64.                 int             21h
  65.                 lodsb
  66.                 cmp             al,0e9h
  67.                 jne             not_xorer
  68.                 lodsw
  69.                 add             ax,3
  70.                 xchg            dx,ax
  71.                 xor             cx,cx
  72.                 mov             ax,4200h
  73.                 int             21h
  74.                 mov             ah,3fh
  75.                 pop             dx
  76.                 mov             cx,6
  77.                 int             21h
  78.                 mov             si,dx
  79.                 lodsb
  80.                 cmp             al,0beh
  81.                 jne             not_xorer
  82.                 lodsw
  83.                 lodsw
  84.                 cmp             ax,0fe8bh
  85.                 jne             not_xorer
  86.                 lodsb
  87.                 cmp             al,0b9h
  88.                 jne             not_xorer
  89.                 mov             ah,3eh
  90.                 int             21h
  91.                 push            0
  92.                 pop             ds
  93.                 mov             word ptr ds:[1*4],offset int1
  94.                 mov             word ptr ds:[1*4+2],cs
  95.                 mov             eax,ds:[84h]
  96.                 mov             word ptr ds:[84h],offset int21
  97.                 mov             word ptr ds:[86h],cs
  98.                 push            cs
  99.                 pop             ds
  100.                 mov             old21,eax
  101.                 pop             dx
  102.                 mov             ax,4b00h
  103.                 lea             bx,params
  104.                 int             21h
  105.                 mov             eax,old21
  106.                 push            0
  107.                 pop             ds
  108.                 mov             dword ptr ds:[84h],eax
  109.                 push            cs
  110.                 pop             ds
  111.                 lea             dx,done
  112.                 jmp             view_n_exit
  113. not_xorer:
  114.                 mov             ah,3eh
  115.                 int             21h
  116.                 lea             dx,_not_xorer
  117.                 jmp             view_n_exit
  118. int21:
  119.                 cmp             ax,2501h
  120.                 jne             ret_2_dos
  121.                 push            bp
  122.                 mov             bp,sp
  123.                 or              word ptr [bp+6],256
  124.                 pop             bp
  125.                 iret
  126. ret_2_dos:
  127.                 db              0eah
  128. old21           dd              ?
  129. int1:
  130.                 push            bp
  131.                 mov             bp,sp
  132.                 cmp             word ptr [bp+2],256
  133.                 je              got_it
  134. go_back:
  135.                 pop             bp
  136.                 iret
  137. got_it:
  138.                 or              ax,ax
  139.                 jnz             go_back
  140.                 or              bx,bx
  141.                 jnz             go_back
  142.                 push            cs
  143.                 pop             ds
  144.                 lea             dx,_out
  145.                 xor             cx,cx
  146.                 mov             ah,3ch
  147.                 int             21h
  148.                 xchg            bx,ax
  149.                 mov             ah,40h
  150.                 mov             ds,[bp+4]
  151.                 mov             dx,256
  152.                 mov             cx,cs:sz
  153.                 int             21h
  154.                 mov             ah,3eh
  155.                 int             21h
  156.                 mov             ah,4ch
  157.                 int             21h
  158. bad_usage:
  159.                 lea             dx,usage
  160.                 jmp             view_n_exit
  161.  
  162. _out            db              'UNXORED.COM'
  163.                 db              0
  164. id              db              'UNXORER v0.1, Unpacks files crypted with XORER vl.0',13,10
  165.                 db              'Copyright (c) 1998 by MERLiN // Delirium Tremens',13,10,'$'
  166. usage           db              13,10,'Usage: UNXORER crypted_file',13,10,'$'
  167. not_found       db              'File not found$'
  168. _not_xorer      db              13,10,'Specified file doesn''t seem to be crypted with XORER vl.0$'
  169. process         db              'Processing file: $'
  170. done            db              '... Done$'
  171. params:
  172.           dw            0
  173.           dw            offset param01
  174. seg01     dw            ?
  175.           dd            ?
  176.           dd            ?
  177.           dd            ?
  178.           dd            ?
  179. param01   dd            ?
  180. sz              dw              ?
  181. area_4_reading:
  182. begin           endp
  183. cseg            ends
  184.                 end             begin