sfl-examples/slide-examples/ex25.asm

42 lines
556 B
NASM

; opaque predicates
bits 64
SECTION .data
; empty
SECTION .text
extern steal_data;
extern google_me;
global _start
_start:
mov rbx, 0
mov rcx, 2
cmp rbx, rcx
je obf1
mov rax, 42
mul rcx
cmp rax, rcx
je obf2
jmp fin
obf1:
xchg rax, rbx
mov rbx, 7
div rbx
; NOTE: call removed, otherwise ld fails to build
;call steal_data
jmp obf2
obf2:
add rax, 13
xor rax, rcx
; NOTE: call removed, otherwise ld fails to build
;call steal_data
;call google_me
fin:
nop