News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Challenge ?

Started by Magnum, December 15, 2012, 06:31:46 AM

Previous topic - Next topic

Magnum

Is anyone besides Dave interested in a challenge ?

Andy
Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

Gunther

What kind of challenge?

Gunther
You have to know the facts before you can distort them.

Tedd

Is the challenge to guess what the challenge is?
Potato2

Magnum

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

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

Looks like a Christmas present, Andy - I will open it on 24th :icon_mrgreen:

Magnum

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

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

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

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):

.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

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