Login Register






Thread Rating:
  • 0 Vote(s) - 0 Average


[FASM] Heaven's gate filter_list
Author
Message
[FASM] Heaven's gate #1
Code:
include 'win32ax.inc' ;We want to run as a x86 process

.data
        szMessageCaption        DB "DeadlyVermilion", 0
        szMessageText32         DB "This seems to be running on a 32 bit operating system.", 0

.code

proc Our64Proc ;This proc is x64 code
     use64
        CALL @F
        DB "This was generated using 64 bit ASM code.", 0
@@:
        POP RAX
        MOV RCX, RAX

     use32
        RETF
endp

start:
        ;invoke DebugBreak ;Used for debugging

        MOV AX, CS
        CMP AL, 1Bh ;1Bh for 32 bits native, 33h if 64 bits native, 23h for wow64
        JE Its32BitsNative
        CMP AL, 33h
        JE ExitCode

        XOR ECX, ECX
        CALL 33h:Our64Proc

        invoke MessageBox, 0, ECX, szMessageCaption, MB_OK
        JMP ExitCode

Its32BitsNative:
        invoke MessageBox, 0, szMessageText32, szMessageCaption, MB_OK


ExitCode:
        invoke ExitProcess, 0
.end start

Author: DeadlyVermillion

Reply







Users browsing this thread: 1 Guest(s)