Is anyone besides Dave interested in a challenge ?
Andy
What kind of challenge?
Gunther
Is the challenge to guess what the challenge is?
Will get back to you Tedd.
I am very busy.
Andy
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
Looks like a Christmas present, Andy - I will open it on 24th :icon_mrgreen:
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
Copy & Paste from a Dissasmbler or Debugger is surely no challenge for anyone here :t
Can we see what you come up with that will assembly with masm ?
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 (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
It was posted because I found it interesting and thought others might also.
You jumped to conclusions.
Andy