; dhae_marker.asm - Dhaedalida RabbitStart / RabbitEnd virtualization markers for
; NASM / YASM (x86-64).
;
; Assembled to a win64 COFF object you link into your PE32+ x64 program. Each
; marker emits `movabs rax, <magic>; ret` (a 64-bit immediate that does not fit
; in 32 bits assembles to 48 B8 + 8 little-endian bytes), so the 8 magic bytes
; land in .text and the Dhaedalida GUI detects a caller exactly like the C
; binding (see sdk/dhae_marker_sig.h). The immediates below MUST equal
; DHAE_SIG_RABBITSTART / DHAE_SIG_RABBITEND there.
;
; Assemble:  nasm -f win64 dhae_marker.asm -o dhae_marker.obj    (yasm: -f win64)
; then link dhae_marker.obj into your program and call RabbitStart / RabbitEnd around the
; code you want protected.

bits 64
section .text

global RabbitStart
global RabbitEnd
global BearStart
global BearEnd

RabbitStart:
    mov rax, 0xD11AE5C0DE765401           ; movabs rax, magic   (48 B8 01 54 76 DE C0 E5 1A D1)
    ret

RabbitEnd:
    mov rax, 0xD11AE5C0DE765402           ; movabs rax, magic   (48 B8 02 54 76 DE C0 E5 1A D1)
    ret

BearStart:
    mov rax, 0xD11AE5C0DE765405           ; movabs rax, magic   (48 B8 05 54 76 DE C0 E5 1A D1)
    ret

BearEnd:
    mov rax, 0xD11AE5C0DE765406           ; movabs rax, magic   (48 B8 06 54 76 DE C0 E5 1A D1)
    ret
