Author Topic: Challenge ?  (Read 6316 times)

Magnum

  • Member
  • *****
  • Posts: 2367
Challenge ?
« on: December 15, 2012, 06:31:46 AM »
Is anyone besides Dave interested in a challenge ?

Andy
Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

Gunther

  • Member
  • *****
  • Posts: 4090
  • Forgive your enemies, but never forget their names
Re: Challenge ?
« Reply #1 on: December 15, 2012, 09:20:19 AM »
What kind of challenge?

Gunther
Get your facts first, and then you can distort them.

Tedd

  • Member
  • ***
  • Posts: 377
  • Procrastinor Extraordinaire
Re: Challenge ?
« Reply #2 on: December 18, 2012, 01:24:00 AM »
Is the challenge to guess what the challenge is?
Potato2

Magnum

  • Member
  • *****
  • Posts: 2367
Re: Challenge ?
« Reply #3 on: December 18, 2012, 01:57:11 AM »
Will get back to you Tedd.

I am very busy.

Andy
Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

Magnum

  • Member
  • *****
  • Posts: 2367
Re: Challenge ?
« Reply #4 on: December 23, 2012, 01:15:30 AM »
Challenge is attached.

I have looked at it previously in Olly and IDA.

Open it in a debugger.

What is it doing ?

Try to produce a source code capable of being assembled by masm.

Andy
Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

jj2007

  • Member
  • *****
  • Posts: 13029
  • Assembler is fun ;-)
    • MasmBasic
Re: Challenge ?
« Reply #5 on: December 23, 2012, 01:51:14 AM »
Looks like a Christmas present, Andy - I will open it on 24th :icon_mrgreen:

Magnum

  • Member
  • *****
  • Posts: 2367
Re: Challenge ?
« Reply #6 on: December 23, 2012, 03:01:06 AM »
Ich ersetzte einen String mit einem mit Weihnachten in der Zeichenkette.

Ich will nicht, um es zu einfach.

Sprischt du mit Ihnen sp├Ąter.

Es tut mir leid meine Grammatik ist schlecht

Andy

Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

qWord

  • Member
  • *****
  • Posts: 1475
  • The base type of a type is the type itself
    • SmplMath macros
Re: Challenge ?
« Reply #7 on: December 23, 2012, 05:01:48 AM »
Copy & Paste from a Dissasmbler or Debugger is surely no challenge for anyone here :t
MREAL macros - when you need floating point arithmetic while assembling!

Magnum

  • Member
  • *****
  • Posts: 2367
Re: Challenge ?
« Reply #8 on: December 23, 2012, 05:22:43 AM »
Can we see what you come up with that will assembly with masm ?

Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

Tedd

  • Member
  • ***
  • Posts: 377
  • Procrastinor Extraordinaire
Re: Challenge ?
« Reply #9 on: December 24, 2012, 05:49:19 AM »
This wasn't a 'challenge,' it was an attempt at getting someone else to do what you apparently couldn't. Don't try to pass it off as anything else.

It took 5 minutes, and a little longer to make it pretty. It's just standard exception handling code - there's nothing particularly interesting. And you could learn much more effectively through research rather than trying to hack away at code you don't really understand.
Try http://www.microsoft.com/msj/0197/Exception/Exception.aspx


For what it's worth (not a whole lot):
Code: [Select]
.586
.model flat, stdcall
option casemap:none
include windows.inc
include kernel32.inc
includelib kernel32.lib
include user32.inc
includelib user32.lib

;***************************************************************************************************

.const
msg1        db "abcdefgh",0
msg2        db "           ",0
msg3        db "merry christmas",0

.code
ALIGN 16
exception_handler proc C pExceptionRecord:PTR EXCEPTION_RECORD,EstablisherFrame:DWORD,pContext:PTR CONTEXT,DispatcherContext:DWORD
    LOCAL vara[40h]:BYTE
    push ebx
    push esi
    push edi

    mov eax,pExceptionRecord
    cmp DWORD PTR [eax],80000003h
    jne @out

    mov ecx,pContext
    mov edx,[ecx+0B8h]
    add edx,1
    mov eax,pContext
    mov [eax+0B8h],edx

    invoke MessageBox, NULL,ADDR msg1,ADDR msg2,MB_OK
    invoke ExitProcess, 0

  @out:
    xor eax,eax
    pop edi
    pop esi
    pop ebx
    ret
exception_handler endp

ALIGN 16
start:
main proc C
    LOCAL vara[40h]:BYTE
    push ebx
    push esi
    push edi

    assume fs:nothing   
    push OFFSET exception_handler
    push DWORD PTR fs:[0]
    mov fs:[0],esp

    invoke RaiseException, 80000003h,EXCEPTION_CONTINUABLE,1,NULL

    pop fs:[0]
    pop eax
    assume fs:error

    invoke MessageBox, NULL,ADDR msg3,ADDR msg2,MB_OK

    pop edi
    pop esi
    pop ebx
    ret
main endp

;***************************************************************************************************
end start
Potato2

Magnum

  • Member
  • *****
  • Posts: 2367
Re: Challenge ?
« Reply #10 on: December 24, 2012, 06:23:59 AM »
It was posted because I found it interesting and thought others might also.

You jumped to conclusions.

Andy

Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org