Guys, Thank you for your responses.
Well I've started analysing of this code, but I think I'm stuck.
Here is my problem:
ntfs IPL program contains:
At this address there is a code that is finally calling address 0x3c5 where is code:
And now is code:
Maybe my analysis till now is completly wrong?
~~~~~~~~
thanks!
~~~~~~~~
Well I've started analysing of this code, but I think I'm stuck.
Here is my problem:
ntfs IPL program contains:
Code: Select all
so after initial default actions it is moving to 0d00:26A where extended ipl should be.seg000:0054 ntfs_start: ; CODE XREF: seg000:loc_0j
seg000:0054 cli ; disable interrupts
seg000:0055 xor ax, ax ; ax =0
seg000:0057 mov ss, ax ; ss=0
seg000:0059 mov sp, 7C00h ; sp=7c00
seg000:005C sti ; enable interrupts
seg000:005D mov ax, 7C0h ; ax= 7c0
seg000:0060 mov ds, ax ; ds=0x7c0
seg000:0062 assume ds:nothing
seg000:0062 call calculate_drivers_total_sectors ; load BIOS drive number (80h) to dl
seg000:0065 mov ax, 0D00h
seg000:0068 mov es, ax ; es=0xd00
seg000:006A assume es:nothing
seg000:006A xor bx, bx
seg000:006C mov byte ptr ds:0Eh, 10h ; store read count index
seg000:0071 call read_disk ; save registers on stack
seg000:0074 push 0D00h ; segment for retf
seg000:0077 push 26Ah ; offset for retf
seg000:007A retf
At this address there is a code that is finally calling address 0x3c5 where is code:
Code: Select all
eb contains 0x3c5 so instruction at seg000:03CE should be invoked. push ax
seg000:03C6 test bp, bp
seg000:03C8 push 359h
seg000:03CB xor ax, ax
seg000:03CD pop ax
seg000:03CE jnz short loc_3F3
And now is code:
Code: Select all
can you tell me where code shoud go next? ax is first zeroed, then dec 3 times?seg000:03F3 loc_3F3: ; CODE XREF: seg000:03CEj
seg000:03F3 pop ax
seg000:03F4 inc word ptr [si]
seg000:03F6 and al, 58h
seg000:03F8 push ax
seg000:03F9 push cx
seg000:03FA push bx
seg000:03FB push 359h
seg000:03FE xor ax, ax
seg000:0400 pop bx
seg000:0401 movzx cx, byte ptr [bx+si-1]
seg000:0405 dec ax
seg000:0406 movsx bx, bx
seg000:0409 shl cx, 1
seg000:040B dec ax
seg000:040C add bx, cx
seg000:040E dec ax
seg000:040F movsx bx, word ptr [si]
seg000:0412 sub cx, [bx+si+3]
seg000:0415 fisttp qword ptr [bx+si-6Dh]
seg000:0418 pop bx
seg000:0419 pop cx
seg000:041A push ax
seg000:041B retn
Maybe my analysis till now is completly wrong?
~~~~~~~~
thanks!
~~~~~~~~