woody-woodpacker/print.s

37 lines
729 B
ArmAsm
Raw Normal View History

2024-02-19 10:35:40 +00:00
bits 64
global _start
_start:
2024-03-21 14:44:29 +00:00
push rax
push rdi
push rsi
push rdx
mov rdi, 1
2024-02-23 13:17:23 +00:00
lea rsi, [rel msg]
2024-04-17 10:14:08 +00:00
mov rax, rsi
sub rax, qword [rel text_section] ;text_section address
mov r8, qword [rel section_sisze] ;text_section size
mov r9, 0 ;increment register
xor r10, r10
; encrypt:
; cmp r8, r9
; je end_encrypt
; mov r10b, byte[rax + r9]
; inc r10b ;rot + 1
; mov byte[rax + r9], r10b
; inc r9
; jmp encrypt
; end_encrypt:
2024-02-23 13:17:23 +00:00
mov rdx, 10
mov rax, 1
syscall
2024-03-21 14:44:29 +00:00
pop rdx
2024-02-23 13:17:23 +00:00
pop rsi
pop rdi
pop rax
2024-04-17 10:14:08 +00:00
jmp 0x00000000 ;for now it needs to be the first jmp
2024-03-21 14:44:29 +00:00
msg db "..WOODY..",10
2024-04-15 08:16:28 +00:00
text_section dq 0xbabababababababa
2024-04-11 21:15:15 +00:00
section_sisze dq 0xcacacacacacacaca