Skip to content

Instantly share code, notes, and snippets.

@defufna
Created January 6, 2021 14:26
Show Gist options
  • Save defufna/47e5b2ccccb2c7ba8027443f8de91468 to your computer and use it in GitHub Desktop.
Save defufna/47e5b2ccccb2c7ba8027443f8de91468 to your computer and use it in GitHub Desktop.
code:
org 0x100
mov dx, msg
mov ah, 9
int 0x21
;get int2f dos handler
mov ax, 0x352f
int 0x21
mov [old_addr_seg], es
mov [old_addr_off], bx
;set handler 2f
mov ax, 0x252f
mov dx, handler_dos
int 0x21
;set handler 7a
mov ax, 0x257a
mov dx, handler
int 0x21
;Terminate and stay resident
mov dx, (((end - code)+15)/16)+16
mov ax, 0x3100
int 0x21
handler:
sti
mov ax, 0
iret
handler_dos:
;override ipx test ax==0x7a00
pushf
cmp ax,0x7a00
je override
;call old interupt handler
popf
jmp far dword [cs:old_addr_off]
override:
mov ax, 0xff
sti
popf
iret
old_addr_off dw 0
dummy dw 0
old_addr_seg dw 0
end:
msg db "FakeIPX Installed :) to uninstall, restart :(", 10, 13, '$'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment