[Delphi - Source] decrypt MuError.log

Results 1 to 8 of 8
  1. #1
    NN - Nord & Noob mauka is offline
    MemberRank
    Jul 2004 Join Date
    1,735Posts

    [Delphi - Source] decrypt MuError.log

    And here goes another LOLCODE..


    Code:
    unit Unit16;
    
    interface
    
    uses
      Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
      Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;
    
    type
      TForm16 = class(TForm)
        Memo1: TMemo;
        Button1: TButton;
        procedure FormCreate(Sender: TObject);
        procedure Button1Click(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;
    
    var
      Form16: TForm16;
    
    implementation
    
    {$R *.dfm}
    
    function Decrypt (var Buffer: TBytes): string;
    const
     XorKey: array [0 .. 15] of Byte = ($7C, $BD, $81, $9F, $3D, $93, $E2, $56, $2A, $73, $D2, $3E, $F2, $83, $95, $BF);
    var
     b: Byte;
     e: Integer;
    begin
     e := 0;
     for b in Buffer do
      begin
       Result := Result + Chr(b xor XorKey[e mod 16]);
       inc(e, 1)
      end;
    end;
    
    procedure TForm16.Button1Click(Sender: TObject);
    const
     MuError = 'C:\Program Files (x86)\WEBZEN\Mu\MuError.log';
    var
     Fs: TStream;
     Buffer: TBytes;
    begin
     try
      Fs := TFileStream.Create(MuError, fmOpenRead);
       try
        SetLength(Buffer, Fs.Size);
        Fs.Read(Buffer[0], Length(Buffer));
       finally
        Fs.Free;
       end;
    
      Memo1.Lines.Add(Decrypt(Buffer));
     except
      On E: Exception do
       Memo1.Lines.Add(Format('Failed to Open file with error: ',[E.Message]));
     end;
    end;
    
    procedure TForm16.FormCreate(Sender: TObject);
    begin
     Memo1.Lines.Clear;
    end;
    
    end.
    Did it for my own needs
    Attached Files Attached Files


  2. #2
    NN - Nord & Noob mauka is offline
    MemberRank
    Jul 2004 Join Date
    1,735Posts

    Re: [Delphi - Source] decrypt MuError.log

    :Space:

    I noted that reversing this crap was a only waste of time!
    Chck: http://forum.ragezone.com/f196/log-d...or-log-804682/

  3. #3

    Re: [Delphi - Source] decrypt MuError.log

    lol why you don't use this:

    uses
    Windows, Messages, SysUtils, Variants, Classes, Graphics,
    Controls, Forms, Dialogs, StdCtrls;

    instead of xxx.yyy ?

    another thips for lazy peoples like me:

    const
    MuError = 'MuError.log';

    Fs := TFileStream.Create(ExtractFilePath(paramstr(0))+MuError, fmOpenRead);
    Last edited by vcorp; 27-12-11 at 09:27 AM.

  4. #4
    NN - Nord & Noob mauka is offline
    MemberRank
    Jul 2004 Join Date
    1,735Posts

    Re: [Delphi - Source] decrypt MuError.log

    Ide auto add prefix to the Units
    Code:
    program Project10;
    
    {$APPTYPE CONSOLE}
    
    {$R *.res}
    
    uses
      System.SysUtils;
    
    begin
      try
        { TODO -oUser -cConsole Main : Insert code here }
      except
        on E: Exception do
          Writeln(E.ClassName, ': ', E.Message);
      end;
    end.
    Code:
    library Project10;
    
    { Important note about DLL memory management: ShareMem must be the
      first unit in your library's USES clause AND your project's (select
      Project-View Source) USES clause if your DLL exports any procedures or
      functions that pass strings as parameters or function results. This
      applies to all strings passed to and from your DLL--even those that
      are nested in records and classes. ShareMem is the interface unit to
      the BORLNDMM.DLL shared memory manager, which must be deployed along
      with your DLL. To avoid using BORLNDMM.DLL, pass string information
      using PChar or ShortString parameters. }
    
    uses
      System.SysUtils,
      System.Classes;
    
    {$R *.res}
    
    begin
    end.
    U where thinking im add prefix manualy? xD

  5. #5

    Re: [Delphi - Source] decrypt MuError.log

    no i mean "why" asd :)

    in all my project i always used only the class name like:
    uses
    SysUtils, Classes;

    without the prefix (system.)

  6. #6
    NN - Nord & Noob mauka is offline
    MemberRank
    Jul 2004 Join Date
    1,735Posts

    Re: [Delphi - Source] decrypt MuError.log

    Im layze to explain, but prefixes is be cause of xPlatform etc..
    reffer to this guide if u wanna understand it


    FM:
    Code:
    unit Unit18;
    
    interface
    
    uses
      System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
      FMX.Types, FMX.Controls, FMX.Forms, FMX.Dialogs;
    
    type
      TForm18 = class(TForm3D)
      private
        { Private declarations }
      public
        { Public declarations }
      end;
    
    var
      Form18: TForm18;
    
    implementation
    
    {$R *.fmx}
    
    end.
    Win:
    Code:
    unit Unit18;
    
    interface
    
    uses
      Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
      Vcl.Controls, Vcl.Forms, Vcl.Dialogs;
    
    type
      TForm18 = class(TForm)
      private
        { Private declarations }
      public
        { Public declarations }
      end;
    
    var
      Form18: TForm18;
    
    implementation
    
    {$R *.dfm}
    
    end.
    Last edited by mauka; 28-12-11 at 09:28 AM.

  7. #7

    Re: [Delphi - Source] decrypt MuError.log

    i know that i mean why you still use the classes with the prefix fo their root :)
    i'm coding with delphi from first release some thigs about it is known well :)
    btw thanks for your share.

  8. #8
    Member DeathArmy is offline
    MemberRank
    Dec 2009 Join Date
    84Posts

    Re: [Delphi - Source] decrypt MuError.log

    we love u mauka, u know it :D



Advertisement