Hi Chris,
With o2's automatic register downsize, this will work in both 32bit and 64bit
A few minor alterations:
'2018-03-20 T 06:23:55
'
%filename "t.exe"
uses RTL64
FUNCTION mystr() AS STRING
LOCAL mlabnum AS SYS
LOCAL Secnum AS SYS
LOCAL string ThdSt
local mrbx as sys
def codeptr @ %1
mlabnum = CODEPTR(mainlab)
mov mrbx,rbx
ThdSt = nuls 19
Secnum = STRPTR(ThdSt)
MOV rsi, mlabnum
MOV rdi, Secnum
MOV rcx, 19
REP MOVSB
mlabnum = CODEPTR(seclab)
MOV rsi, Secnum
MOV rbx, 19
MOV rdi, mlabnum
ADD rsi, rbx
ADD rdi, rbx
NEG rbx
dest1:
MOVZX AL, [rdi+rbx]
XOR [rsi+rbx], AL
ADD rbx, 1
JZ dest2
MOVZX AL,[rdi+rbx]
XOR [rsi+rbx], AL
ADD rbx, 1
JZ dest2
MOVZX AL,[rdi+rbx]
XOR [rsi+rbx], AL
ADD rbx, 1
JZ dest2
MOVZX AL,[rdi+rbx]
XOR [rsi+rbx], AL
ADD rbx, 1
JNZ dest1
dest2:
mov rbx,mrbx
FUNCTION = ThdSt
EXIT FUNCTION
NOP
NOP
mainlab:
DB 212,84,249,14,51,10,51,105,185,124,111,140,101,116,200,44
DB 255,120,28,0
NOP
NOP
seclab:
DB 128,60,144,125,19,99,64,73,214,4,22,235,0,26,138,77
DB 140,17,127,0
END FUNCTION
print mystr