Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

debugxv - how to use I/O watchpoint? (Users)

posted by ecm Homepage E-mail, Düsseldorf, Germany, 13.04.2025, 14:13

> I have quickly found the code I'm fighting with:
>
> PROC Cyrix52method
> cmp     [CPUclass],4
> jnz     Not486instrSupport
> xor     ax,ax
> sahf
> mov     ax,5
> mov     bl,2
> div     bl
> lahf
> cmp     ah,bl
> jne     Not486instrSupport
> mov     [cyrix52detect],1
> mov     si,offset cyrix
> mov     [NumRepCPUVendor],si
> call    colorstr6x8
> cli
> mov     al,0FEh
> out     22h,al
> in      al,23h
> sti
>


Link to that code in the repo: https://github.com/bttrx/speedsys/blob/6e070ee29f0...d50d818793b6f51e4a68441/src/SPEEDSYS.ASM#L10669

You mentioned that the executable that you've used is packed:

> Now I'd like to know how to patch (skip)
> this IO access at runtime by some TSR or
> loader as I cannot patch the EXE coz it's
> encrypted or packed by unknown exe
> packer... Speedsys checks for V86 mode and
> complains about it (can run but very
> limitest tests available)

If it's created by speedin1 then it's just a DOS/EXE UPX with the "UPX!" signature (offset 55h) and the depacked size (offset 6Bh) hacked. You can restore the signature manually then adjust the checksum (offset 6Fh). UPXDUMP can tell you the current and expected checksum. After hacking the size and checksum to mirror the speedin1 modification I was able to unpack an executable using upx-ucl -d test.exe, despite the wrong size field.

---
l

 

Complete thread:

Back to the forum
Board view  Mix view
22477 Postings in 2087 Threads, 400 registered users, 122 users online (0 registered, 122 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum