Thread: StartWithDate
View Single Post
  #9  
Old 08-24-2021, 22:42
CodeCracker CodeCracker is offline
VIP
 
Join Date: Jun 2011
Posts: 466
Rept. Given: 27
Rept. Rcvd 407 Times in 134 Posts
Thanks Given: 21
Thanks Rcvd at 1,890 Times in 359 Posts
CodeCracker Reputation: 400-499 CodeCracker Reputation: 400-499 CodeCracker Reputation: 400-499 CodeCracker Reputation: 400-499 CodeCracker Reputation: 400-499
https://forums.codeguru.com/showthread.php?417758-Assertion-in-GetCurrentTime%28%29-why
the only way was to link it statically (MFC Static Library)
this bug was on VC v6 debug mode, fixed now.

Another bug was due to fact that Apis have only a jmp dword [...] on their body
so writing directly to Api address would lead to corrupting code after jmp dword [...].
Fixed.

00437298 6815E636 /CALL to GetSystemTime from wpdshext.6815E630
0043729C 004372C4 \pSystemTime = 004372C4
004372A0 00437390
Registers are altered on hooks so I got to use pushad (60) and popad (61) instructions.
Fixed.

Attached final version and source code.
Attached Files
File Type: zip StartWithDate_srcVC6.zip (64.8 KB, 45 views)
File Type: zip StartWithDateExe.zip (10.4 KB, 52 views)
Reply With Quote
The Following 13 Users Say Thank You to CodeCracker For This Useful Post:
aldente (02-26-2022), backdoor_b (04-28-2022), besoeso (10-12-2023), dnvthv (02-15-2022), Doit (09-07-2021), Fyyre (02-22-2022), Mendax47 (08-24-2021), niculaita (08-25-2021), NoneForce (02-13-2022), sh3dow (02-23-2022), Stingered (08-25-2021), wilson bibe (08-25-2021), zeuscane (08-26-2021)