Hello,
for checking the time of using my tools i use getsystemtime and then cmp ...,offset month
if the time i set in .data is true ,the program should not work.
but i dont understand why it works with :
cmp .... , 01 [01-is january]
and not when i use :
.data
month db '01' ,0
.code
getsystemtime......
cmp ... ,offset month
any ideas how i get it working ?
thx
When you declare month in data, you are declaring a "series" of bytes (as many as are needed to hold the specified data. In your case 3 bytes one for "0", one for "1", and a final one for your null terminator.
You are then comparing your retrieved value (a word presumably) against the address where these 3 bytes are stored!
What you need to do is the following:
invoke GetSystemTime, ADDR SysTime
cmp SysTime.wMonth, 1
;---- Or ----
.data
Month dw 1
.
.
.
invoke GetSystemTime, ADDR SysTime
mov ax, SysTime.wMonth
cmp ax, Month
I think you will need to move SysTime.Month to a register for the second example as you will be comparing mem/mem otherwise.
The first example is ok because its mem/immed.
MirnoYep.. what Mirno said is right... I just felt like sthg was
missing:
Jeronimo:
If you declare
Month db "01",0
The "01",0
gets written as 30 31 00
in your .data section,
as it takes the Ascii value of the chars in between the quotes.
JHello,
so there goes my problem,many thanks for the good help !
btw. did you have any good idea how i can make my tool working a small amount of time.
like trial software.
i think on some different ways like:
check systemtime
check time from different files
make a decrypted regkey who count the program start
is it today possible to make trial software who cant cracked ?
thanks
Everything can be cracked!