Log in

View Full Version : Help-running out of paper- Can anyone help with a 16bit prog. my brain cant get round?


Scally6
February 2nd, 2001, 14:07
Hi all,
I've been playing with a 16bit prog:

ht*p://homepages.force9.net/vastro/astrop.zip

for experience for over a week and am getting nowhere. (Its an old astrology prog which isn't any use to me but its got me beat) I'd really appreciate some guidance.
The prog uses an ini file in /windows & several dll's in windows/system. It writes a temp file out to /windows/temp as it loads & this varies depending on whether the thing is within or outside the 30 days trial. None of the files in /astrop (or the ini) seemed to change when I put the clock forward but as I can't seem to get it back to within the time trial state, I'm poking in the dark. There is an entry in the reg. but I don't think its responsible.
I can't understand how to find out from where the temp file is initially read & dead listing in Wdasm didn't help me.
I guess I may have missed something but would appreciate some help.
Anyone got any ideas?
TIA
Scally

Kayaker
February 2nd, 2001, 18:53
Hi Scally,

Check out win.ini

[Settings]
s1=3501
s2=2502
s3=3502

Cheers,
Kayaker

JimmyClif
February 2nd, 2001, 18:55
Hi Scally,

I had a quick look into it and must say that I have never seen a proggy have sooooo many String refs inside it and somehow I wonder on what day someone has to be born to be ... perverse and neurotic...

Anyway... I went the drunk/bad patcher way and it prints happily showing no nags... now!

First the printing:

The MenuItem is disabled after 30 days! In the whole program there's only 1 call made to EnableMenuItem (guess which one) Here is the definition of that API :
Code:

BOOL EnableMenuItem(

HMENU hMenu, // handle to menu
UINT uIDEnableItem, // menu item to enable, disable, or gray
UINT uEnable // menu item flags
);

flags:
MF_ENABLED equ 0h
MF_GRAYED equ 1h
MF_DISABLED equ 2h

All I did was patching the 3rd last push (the flag) into push 00 (enable always) and noping out the remaining bytes to clean up.

The nags:
For the nags I went an rather unusual way - I deleted them all using a resource editor, thinking about the "no handle - no dialog" way... and yep... it went good.

---------------------------------------------------------------------------------
But don't take my solution as the example! It is possible to register it somewhere
as there is a registered dialog inside the proggy... I'm just unable to find it right
now...

Best Regards,
JimmyClif
(who should stop drinking white russians)

JimmyClif
February 2nd, 2001, 18:58
LOL Kayaker... goes the good way *g*

Kayaker
February 2nd, 2001, 19:04
I like your way better JimmyClif. More creative ^_^

Scally6
February 3rd, 2001, 04:27
Doh! Should have seen the win.ini a mile off! What I stupidly did was rely on a config manager which tells me when system files have changed... Unless of course I reboot into a different config after the changes... so I missed the change to win.ini & even though I looked at the file later, (once I'd reached the lost & brainless stage) I didn't see the changes that were there - probably because I didn't expect to see them.
I couldn't get sice to bpx on enablemenuitem or graystring & was intrigued by the dialog refs you mentioned, Jimmy Clif, - also the fact that there are dialog refs to several different evaluation versions.
I'm gonna play with it some more to see how they're called but thanks guys - the rain forrests are a safer place.

a less perverse & less neurotic Scally


Thanks guys