Nick: XVilka E-mail: none Board: Dell Vostro V13 (ver 2) Contents: seg000:0000 ZFLPF db 90,'FLPF' seg000:0005 dd 0 seg000:0009 dd 0 seg000:000D dd 0 seg000:0011 dd sub_3FC seg000:0015 dd sub_449 seg000:0019 dd 0 seg000:001D dd 0 seg000:0021 dd sub_4A2 seg000:0025 dd 0 seg000:0029 dd 0 seg000:002D dd check_AC_adaptor ; out(0x600, 0x1c); seg000:002D ; response = in(0x601); seg000:002D ; if ( response == 010000000b) print("Please insert AC adaptor!") seg000:002D ; else return; seg000:0031 dd 0 seg000:0035 dd addr_tbl.dword_4D seg000:0039 dd stru_255.dword_4D seg000:003D MMIOBASE db 77,'MIOBASE' seg000:0045 addr_tbl struct_0 <0FFFFFD00h, 200h, 10000h, 0> ; DATA XREF: seg000:0035o seg000:0055 struct_0 <0FFE00000h, 220000h, 10000h, 10000h> seg000:0065 struct_0 <0FFE10000h, 220000h, 10000h, 20000h> seg000:0075 struct_0 <0FFE20000h, 220000h, 10000h, 30000h> seg000:0085 struct_0 <0FFE30000h, 220000h, 10000h, 40000h> seg000:0095 struct_0 <0FFE40000h, 220000h, 10000h, 50000h> seg000:00A5 struct_0 <0FFE50000h, 220000h, 10000h, 60000h> seg000:00B5 struct_0 <0FFE60000h, 220000h, 10000h, 70000h> seg000:00C5 struct_0 <0FFE70000h, 220000h, 10000h, 80000h> seg000:00D5 struct_0 <0FFE80000h, 220000h, 10000h, 90000h> seg000:00E5 struct_0 <0FFE90000h, 220000h, 10000h, 0A0000h> seg000:00F5 struct_0 <0FFEA0000h, 220000h, 10000h, 0B0000h> seg000:0105 struct_0 <0FFEB0000h, 220000h, 10000h, 0C0000h> seg000:0115 struct_0 <0FFEC0000h, 220000h, 10000h, 0D0000h> seg000:0125 struct_0 <0FFED0000h, 220000h, 10000h, 0E0000h> seg000:0135 struct_0 <0FFEE0000h, 220000h, 10000h, 0F0000h> seg000:0145 struct_0 <0FFEF0000h, 220000h, 10000h, 100000h> seg000:0155 struct_0 <0FFF00000h, 220000h, 10000h, 110000h> seg000:0165 struct_0 <0FFF10000h, 220000h, 10000h, 120000h> seg000:0175 struct_0 <0FFF20000h, 220000h, 10000h, 130000h> seg000:0185 struct_0 <0FFF30000h, 220000h, 10000h, 140000h> seg000:0195 struct_0 <0FFF40000h, 220000h, 10000h, 150000h> seg000:01A5 struct_0 <0FFF50000h, 220000h, 10000h, 160000h> seg000:01B5 struct_0 <0FFF60000h, 220000h, 10000h, 170000h> seg000:01C5 struct_0 <0FFF70000h, 220000h, 10000h, 180000h> seg000:01D5 struct_0 <0FFF80000h, 220000h, 10000h, 190000h> seg000:01E5 struct_0 <0FFF90000h, 220000h, 10000h, 1A0000h> seg000:01F5 struct_0 <0FFFA0000h, 220000h, 10000h, 1B0000h> seg000:0205 struct_0 <0FFFB0000h, 220000h, 10000h, 1C0000h> seg000:0215 struct_0 <0FFFC0000h, 220000h, 10000h, 1D0000h> seg000:0225 struct_0 <0FFFD0000h, 220000h, 10000h, 1E0000h> seg000:0235 struct_0 <0FFFE0000h, 220000h, 10000h, 1F0000h> seg000:0245 struct_0 <0FFFF0000h, 220000h, 0, 0> seg000:0255 stru_255 struct_0 <0, 0, 0FFBF0002h, 1> ; DATA XREF: seg000:0039o seg000:0265 struct_0 <0FFBE0002h, 1, 0FFBD0002h, 1> seg000:0275 struct_0 <0FFBC0002h, 1, 0FFBB0002h, 1> seg000:0285 struct_0 <0FFBA0002h, 1, 0FFB90002h, 1> seg000:0295 struct_0 <0FFB80002h, 1, 0FFB70002h, 1> seg000:02A5 struct_0 <0FFB60002h, 1, 0FFB50002h, 1> seg000:02B5 struct_0 <0FFB40002h, 1, 0FFB30002h, 1> seg000:02C5 struct_0 <0FFB20002h, 1, 0FFB10002h, 1> seg000:02D5 struct_0 <0FFB00002h, 1, 0FFAF0002h, 1> seg000:02E5 struct_0 <0FFAE0002h, 1, 0FFAD0002h, 1> seg000:02F5 struct_0 <0FFAC0002h, 1, 0FFAB0002h, 1> seg000:0305 struct_0 <0FFAA0002h, 1, 0FFA90002h, 1> seg000:0315 struct_0 <0FFA80002h, 1, 0FFA70002h, 1> seg000:0325 struct_0 <0FFA60002h, 1, 0FFA50002h, 1> seg000:0335 struct_0 <0FFA40002h, 1, 0FFA30002h, 1> seg000:0345 struct_0 <0FFA20002h, 1, 0FFA10002h, 1> seg000:0355 struct_0 <0FFA00002h, 1, 0, 0> seg000:0365 seg000:0365 ; =============== S U B R O U T I N E ======================================= seg000:0365 seg000:0365 ; out(0x600, 0x5); seg000:0365 ; delay(); seg000:0365 ; out(0x601, 0x1); seg000:0365 ; delay(); seg000:0365 ; out(0x600, 0x11); seg000:0365 ; delay(); seg000:0365 ; out(0x601, 0x57); seg000:0365 ; delay(); seg000:0365 seg000:0365 ; void __cdecl ec_some_1() seg000:0365 ec_some_1 proc near ; CODE XREF: sub_3FC+9p seg000:0365 mov dx, 600h seg000:0368 mov al, 5 seg000:036A out dx, al seg000:036B out 0EDh, al seg000:036D inc dx ; Increment by 1 seg000:036E mov al, 1 seg000:0370 out dx, al seg000:0371 out 0EDh, al seg000:0373 mov dx, 600h seg000:0376 mov al, 11h seg000:0378 out dx, al seg000:0379 out 0EDh, al seg000:037B inc dx ; Increment by 1 seg000:037C mov al, 57h ; 'W' seg000:037E out dx, al seg000:037F out 0EDh, al seg000:037F seg000:0381 seg000:0381 wait: ; CODE XREF: ec_some_1+28j seg000:0381 mov dx, 600h seg000:0384 mov al, 6 seg000:0386 out dx, al seg000:0387 out 0EDh, al seg000:0389 inc dx ; Increment by 1 seg000:038A in al, dx seg000:038B test al, 1 ; Logical Compare seg000:038D jz short wait ; Jump if Zero (ZF=1) seg000:038D seg000:038F retn ; Return Near from Procedure seg000:038F seg000:038F ec_some_1 endp seg000:038F seg000:0390 seg000:0390 ; =============== S U B R O U T I N E ======================================= seg000:0390 seg000:0390 ; out(0x600, 0x7); seg000:0390 ; delay(); seg000:0390 ; out(0x601, 0x55); seg000:0390 ; delay(); seg000:0390 seg000:0390 ; void __cdecl ec_some_0() seg000:0390 ec_some_0 proc near ; CODE XREF: sub_449+10p seg000:0390 mov dx, 600h seg000:0393 mov al, 7 seg000:0395 out dx, al seg000:0396 out 0EDh, al seg000:0398 inc dx ; Increment by 1 seg000:0399 mov al, 55h ; 'U' seg000:039B out dx, al seg000:039C out 0EDh, al seg000:039E retn ; Return Near from Procedure seg000:039E seg000:039E ec_some_0 endp seg000:039E seg000:039F seg000:039F ; =============== S U B R O U T I N E ======================================= seg000:039F seg000:039F seg000:039F sub_39F proc near seg000:039F out 80h, al ; manufacture's diagnostic checkpoint seg000:03A1 out 80h, al ; manufacture's diagnostic checkpoint seg000:03A3 out 80h, al ; manufacture's diagnostic checkpoint seg000:03A5 cmp dx, 0 ; Compare Two Operands seg000:03A8 jnz short start ; out(0x600, 0x0); seg000:03A8 ; delay(); seg000:03A8 ; out(0x601, 0x8f); seg000:03A8 seg000:03AA seg000:03AA wait_1: ; CODE XREF: sub_39F+1Bj seg000:03AA mov dx, 600h ; while (1) seg000:03AA ; { seg000:03AA ; out(0x600, 0x0); seg000:03AA ; response = in(0x601); seg000:03AA ; if (response == 0) break; seg000:03AA ; }; seg000:03AD mov al, 0 seg000:03AF out dx, al seg000:03B0 inc dx ; Increment by 1 seg000:03B1 in al, dx seg000:03B2 out 80h, al ; manufacture's diagnostic checkpoint seg000:03B4 out 80h, al ; manufacture's diagnostic checkpoint seg000:03B6 out 80h, al ; manufacture's diagnostic checkpoint seg000:03B8 cmp al, 0 ; Compare Two Operands seg000:03BA jnz short wait_1 ; while (1) seg000:03BA ; { seg000:03BA ; out(0x600, 0x0); seg000:03BA ; response = in(0x601); seg000:03BA ; if (response == 0) break; seg000:03BA ; }; seg000:03BA seg000:03BC seg000:03BC wait_2: ; CODE XREF: sub_39F+3Fj seg000:03BC mov dx, 600h ; while (1) seg000:03BC ; { seg000:03BC ; out(0x600, 0x0); seg000:03BC ; delay(); seg000:03BC ; out(0x601, 0x3); seg000:03BC ; delay(); seg000:03BC ; out(0x600, 0x0); seg000:03BC ; response = in(0x601); seg000:03BC ; if (response == 0xfa) return seg000:03BC ; }; seg000:03BF mov al, 0 seg000:03C1 out dx, al seg000:03C2 inc dx ; Increment by 1 seg000:03C3 mov al, 3 seg000:03C5 out 80h, al ; manufacture's diagnostic checkpoint seg000:03C7 out 80h, al ; manufacture's diagnostic checkpoint seg000:03C9 out dx, al seg000:03CA out 80h, al ; manufacture's diagnostic checkpoint seg000:03CC out 80h, al ; manufacture's diagnostic checkpoint seg000:03CE out 80h, al ; manufacture's diagnostic checkpoint seg000:03D0 out 80h, al ; manufacture's diagnostic checkpoint seg000:03D2 out 80h, al ; manufacture's diagnostic checkpoint seg000:03D4 mov dx, 600h seg000:03D7 mov al, 0 seg000:03D9 out dx, al seg000:03DA inc dx ; Increment by 1 seg000:03DB in al, dx seg000:03DC cmp al, 0FAh ; '' ; Compare Two Operands seg000:03DE jnz short wait_2 ; while (1) seg000:03DE ; { seg000:03DE ; out(0x600, 0x0); seg000:03DE ; delay(); seg000:03DE ; out(0x601, 0x3); seg000:03DE ; delay(); seg000:03DE ; out(0x600, 0x0); seg000:03DE ; response = in(0x601); seg000:03DE ; if (response == 0xfa) return seg000:03DE ; }; seg000:03DE seg000:03E0 jmp short post_return ; Jump seg000:03E0 seg000:03E2 ; --------------------------------------------------------------------------- seg000:03E2 seg000:03E2 start: ; CODE XREF: sub_39F+9j seg000:03E2 mov dx, 600h ; out(0x600, 0x0); seg000:03E2 ; delay(); seg000:03E2 ; out(0x601, 0x8f); seg000:03E5 mov al, 0 seg000:03E7 out dx, al seg000:03E8 inc dx ; Increment by 1 seg000:03E9 out 80h, al ; manufacture's diagnostic checkpoint seg000:03EB out 80h, al ; manufacture's diagnostic checkpoint seg000:03ED mov al, 8Fh ; '' seg000:03EF out dx, al seg000:03EF seg000:03F0 seg000:03F0 post_return: ; CODE XREF: sub_39F+41j seg000:03F0 out 80h, al ; manufacture's diagnostic checkpoint seg000:03F2 out 80h, al ; manufacture's diagnostic checkpoint seg000:03F4 out 80h, al ; manufacture's diagnostic checkpoint seg000:03F6 retn ; Return Near from Procedure seg000:03F6 seg000:03F6 sub_39F endp seg000:03F6 seg000:03F6 ; --------------------------------------------------------------------------- seg000:03F7 pci_register db 0 ; DATA XREF: sub_449+9r seg000:03F7 ; sub_56C+2Aw seg000:03F8 db 0 seg000:03F9 db 0 seg000:03FA db 0 seg000:03FB db 0 seg000:03FC seg000:03FC ; =============== S U B R O U T I N E ======================================= seg000:03FC seg000:03FC seg000:03FC sub_3FC proc near ; DATA XREF: seg000:0011o seg000:03FC pushf ; Push Flags Register onto the Stack seg000:03FD pushad ; Push all General Registers (use32) seg000:03FF call nullsub_1 ; Call Procedure seg000:03FF seg000:0402 call sub_4B0 ; Call Procedure seg000:0402 seg000:0405 call ec_some_1 ; out(0x600, 0x5); seg000:0405 ; delay(); seg000:0405 ; out(0x601, 0x1); seg000:0405 ; delay(); seg000:0405 ; out(0x600, 0x11); seg000:0405 ; delay(); seg000:0405 ; out(0x601, 0x57); seg000:0405 ; delay(); seg000:0405 seg000:0408 mov eax, 7FFFFFFFh seg000:040E mov dx, 0CF8h seg000:0411 out dx, al seg000:0412 wbinvd ; Invalidate Data Cache (write changes) seg000:0414 mov ax, 9988h seg000:0417 out 80h, ax ; manufacture's diagnostic checkpoint seg000:0419 mov ecx, 200h seg000:0419 seg000:041F seg000:041F loc_41F: ; CODE XREF: sub_3FC+44j seg000:041F rdmsr ; Read Machine Status Register seg000:0421 cmp eax, 0FFE00005h ; Compare Two Operands seg000:0427 jnz short loc_435 ; Jump if Not Zero (ZF=0) seg000:0427 seg000:0429 cmp edx, 0 ; Compare Two Operands seg000:042D jnz short loc_435 ; Jump if Not Zero (ZF=0) seg000:042D seg000:042F mov al, 0 seg000:0431 wrmsr ; Write Machine Status Register seg000:0433 jmp short return ; Jump seg000:0433 seg000:0435 ; --------------------------------------------------------------------------- seg000:0435 seg000:0435 loc_435: ; CODE XREF: sub_3FC+2Bj seg000:0435 ; sub_3FC+31j seg000:0435 add ecx, 2 ; Add seg000:0439 cmp ecx, 20Eh ; Compare Two Operands seg000:0440 jb short loc_41F ; Jump if Below (CF=1) seg000:0440 seg000:0442 seg000:0442 return: ; CODE XREF: sub_3FC+37j seg000:0442 popad ; Pop all General Registers (use32) seg000:0444 popf ; Pop Stack into Flags Register seg000:0445 xor eax, eax ; Logical Exclusive OR seg000:0448 retn ; Return Near from Procedure seg000:0448 seg000:0448 sub_3FC endp seg000:0448 seg000:0449 seg000:0449 ; =============== S U B R O U T I N E ======================================= seg000:0449 seg000:0449 seg000:0449 sub_449 proc near ; DATA XREF: seg000:0015o seg000:0449 pushf ; Push Flags Register onto the Stack seg000:044A pushad ; Push all General Registers (use32) seg000:044C mov eax, 8000F800h ; pci device 0:1f.0 Intel Corporation ICH9M-E LPC Interface Controller [8086:2917] seg000:0452 mov al, cs:pci_register seg000:0456 call sub_56C ; Call Procedure seg000:0456 seg000:0459 call ec_some_0 ; out(0x600, 0x7); seg000:0459 ; delay(); seg000:0459 ; out(0x601, 0x55); seg000:0459 ; delay(); seg000:0459 seg000:045C mov eax, 7FFFFFFFh seg000:0462 mov dx, 0CF8h seg000:0465 out dx, al seg000:0466 mov eax, 80001800h seg000:046C mov dx, 0CF8h seg000:046F out dx, eax seg000:0471 mov dx, 0CFCh seg000:0474 in eax, dx seg000:0476 cmp eax, 0FFFFFFFFh ; Compare Two Operands seg000:047A jz short loc_48B ; Jump if Zero (ZF=1) seg000:047A seg000:047C mov ax, 21h ; '!' seg000:047F mov dx, 72h ; 'r' seg000:0482 out dx, ax seg000:0483 mov dx, 73h ; 's' seg000:0486 in ax, dx seg000:0487 or ax, 8 ; Logical Inclusive OR seg000:048A out dx, ax seg000:048A seg000:048B seg000:048B loc_48B: ; CODE XREF: sub_449+31j seg000:048B popad ; Pop all General Registers (use32) seg000:048D popf ; Pop Stack into Flags Register seg000:048E mov dx, 600h ; out(0x600, 0x35); seg000:048E ; delay(); seg000:048E ; response = in(0x601); seg000:048E ; if (response == 010b) return; seg000:048E ; else seg000:048E ; call sub_4A2 seg000:0491 mov al, 35h ; '5' seg000:0493 out dx, al seg000:0494 out 0EDh, al seg000:0496 inc dx ; Increment by 1 seg000:0497 in al, dx seg000:0498 test al, 2 ; Logical Compare seg000:049A jz short return ; Jump if Zero (ZF=1) seg000:049A seg000:049C jmp short sub_4A2 ; Jump seg000:049C seg000:049E ; --------------------------------------------------------------------------- seg000:049E seg000:049E return: ; CODE XREF: sub_449+51j seg000:049E xor eax, eax ; Logical Exclusive OR seg000:04A1 retn ; Return Near from Procedure seg000:04A1 seg000:04A1 sub_449 endp seg000:04A1 seg000:04A2 seg000:04A2 ; =============== S U B R O U T I N E ======================================= seg000:04A2 seg000:04A2 ; Attributes: noreturn seg000:04A2 seg000:04A2 sub_4A2 proc near ; CODE XREF: sub_449+53j seg000:04A2 ; DATA XREF: seg000:0021o seg000:04A2 cli ; Clear Interrupt Flag seg000:04A3 mov dx, 0CF9h seg000:04A6 mov al, 2 seg000:04A8 out dx, al seg000:04A9 or al, 4 ; Logical Inclusive OR seg000:04AB out dx, al seg000:04AC hlt ; Halt seg000:04AC seg000:04AC sub_4A2 endp seg000:04AC seg000:04AC ; --------------------------------------------------------------------------- seg000:04AD db 0EBh ; seg000:04AE db 0FDh ; seg000:04AF db 0C3h ; seg000:04B0 seg000:04B0 ; =============== S U B R O U T I N E ======================================= seg000:04B0 seg000:04B0 seg000:04B0 sub_4B0 proc near ; CODE XREF: sub_3FC+6p seg000:04B0 pushad ; Push all General Registers (use32) seg000:04B2 pushf ; Push Flags Register onto the Stack seg000:04B3 mov eax, 8000F800h ; pci device 0:1f.0 Intel Corporation ICH9M-E LPC Interface Controller [8086:2917] seg000:04B9 push eax ; pci_port seg000:04BB xor al, al ; Logical Exclusive OR seg000:04BD call sub_56C ; Call Procedure seg000:04BD seg000:04C0 pop eax seg000:04C2 mov al, 0DCh ; '' seg000:04C4 mov dx, 0CF8h seg000:04C7 out dx, eax seg000:04C9 mov dx, 0CFCh seg000:04CC in al, dx seg000:04CD or al, 1 ; Logical Inclusive OR seg000:04CF out dx, al seg000:04D0 popf ; Pop Stack into Flags Register seg000:04D1 popad ; Pop all General Registers (use32) seg000:04D3 retn ; Return Near from Procedure seg000:04D3 seg000:04D3 sub_4B0 endp seg000:04D3 seg000:04D4 seg000:04D4 ; =============== S U B R O U T I N E ======================================= seg000:04D4 seg000:04D4 seg000:04D4 sub_4D4 proc near seg000:04D4 push eax seg000:04D6 push esi seg000:04D8 xor esi, esi ; Logical Exclusive OR seg000:04D8 seg000:04DB seg000:04DB check_loop: ; CODE XREF: sub_4D4+18j seg000:04DB ; sub_4D4+24j ... seg000:04DB mov eax, [esi+ebx] seg000:04E0 mov es:[eax], cl seg000:04E4 add esi, 8 ; Add seg000:04E8 cmp esi, 38h ; '8' ; Compare Two Operands seg000:04EC jbe short check_loop ; Jump if Below or Equal (CF=1 | ZF=1) seg000:04EC seg000:04EE mov al, 2 seg000:04F0 cmp al, 0 ; Compare Two Operands seg000:04F2 jz short return ; Jump if Zero (ZF=1) seg000:04F2 seg000:04F4 cmp esi, 78h ; 'x' ; Compare Two Operands seg000:04F8 jbe short check_loop ; Jump if Below or Equal (CF=1 | ZF=1) seg000:04F8 seg000:04FA mov al, 2 seg000:04FC cmp al, 1 ; Compare Two Operands seg000:04FE jz short return ; Jump if Zero (ZF=1) seg000:04FE seg000:0500 cmp esi, 0B8h ; '¸' ; Compare Two Operands seg000:0507 jbe short check_loop ; Jump if Below or Equal (CF=1 | ZF=1) seg000:0507 seg000:0509 mov al, 2 seg000:050B cmp al, 4 ; Compare Two Operands seg000:050D jz short return ; Jump if Zero (ZF=1) seg000:050D seg000:050F cmp esi, 0F8h ; '' ; Compare Two Operands seg000:0516 jbe short check_loop ; Jump if Below or Equal (CF=1 | ZF=1) seg000:0516 seg000:0518 seg000:0518 return: ; CODE XREF: sub_4D4+1Ej seg000:0518 ; sub_4D4+2Aj ... seg000:0518 pop esi seg000:051A pop eax seg000:051C retn ; Return Near from Procedure seg000:051C seg000:051C sub_4D4 endp seg000:051C seg000:051D seg000:051D ; =============== S U B R O U T I N E ======================================= seg000:051D seg000:051D seg000:051D sub_51D proc near seg000:051D push ebx seg000:051F push ecx seg000:0521 push edx seg000:0523 and eax, 0FFF0FFFFh ; Logical AND seg000:0529 mov ebx, eax seg000:052C mov ecx, 80000000h seg000:052C seg000:0532 seg000:0532 loc_532: ; CODE XREF: sub_51D+3Dj seg000:0532 mov eax, ecx seg000:0535 mov dx, 0CF8h seg000:0538 out dx, eax seg000:053A mov dx, 0CFCh seg000:053D in eax, dx seg000:053F and eax, 0FFF0FFFFh ; Logical AND seg000:0545 cmp eax, ebx ; Compare Two Operands seg000:0548 jz short return ; Jump if Zero (ZF=1) seg000:0548 seg000:054A cmp ecx, 8000FF00h ; Compare Two Operands seg000:0551 jz short error_POST ; Jump if Zero (ZF=1) seg000:0551 seg000:0553 add ecx, 100h ; Add seg000:055A jmp short loc_532 ; Jump seg000:055A seg000:055C ; --------------------------------------------------------------------------- seg000:055C seg000:055C error_POST: ; CODE XREF: sub_51D+34j seg000:055C ; sub_51D+43j seg000:055C mov al, 58h ; 'X' seg000:055E out 80h, al ; manufacture's diagnostic checkpoint seg000:0560 jmp short error_POST ; Jump seg000:0560 seg000:0562 ; --------------------------------------------------------------------------- seg000:0562 seg000:0562 return: ; CODE XREF: sub_51D+2Bj seg000:0562 mov eax, ecx seg000:0565 pop edx seg000:0567 pop ecx seg000:0569 pop ebx seg000:056B retn ; Return Near from Procedure seg000:056B seg000:056B sub_51D endp seg000:056B seg000:056C seg000:056C ; =============== S U B R O U T I N E ======================================= seg000:056C seg000:056C seg000:056C ; int __cdecl sub_56C(__int32 pci_port) seg000:056C sub_56C proc near ; CODE XREF: sub_449+Dp seg000:056C ; sub_4B0+Dp seg000:056C pushad ; Push all General Registers (use32) seg000:056E and al, 1 ; Logical AND seg000:0570 mov bl, al seg000:0572 mov ecx, eax seg000:0575 mov eax, cr0 ; Move to/from Special Registers seg000:0578 bt eax, 0 ; Bit Test seg000:057D jb short return ; Jump if Below (CF=1) seg000:057D seg000:057F mov eax, ecx seg000:0582 mov al, 40h ; '@' seg000:0584 mov dx, 0CF8h seg000:0587 out dx, eax seg000:0589 mov dx, 0CFCh seg000:058C in ax, dx seg000:058D mov dx, ax seg000:058F and dx, 0FFFEh ; Logical AND seg000:0592 add dx, 30h ; '0' ; Add seg000:0595 in al, dx seg000:0596 mov cs:pci_register, al seg000:059A and al, 0FEh ; Logical AND seg000:059C or al, bl ; Logical Inclusive OR seg000:059E out dx, al seg000:059E seg000:059F seg000:059F return: ; CODE XREF: sub_56C+11j seg000:059F popad ; Pop all General Registers (use32) seg000:05A1 retn ; Return Near from Procedure seg000:05A1 seg000:05A1 sub_56C endp seg000:05A1 seg000:05A2 seg000:05A2 ; =============== S U B R O U T I N E ======================================= seg000:05A2 seg000:05A2 seg000:05A2 sub_5A2 proc near ; DATA XREF: sub_5A2+2w seg000:05A2 add [bx+si], ax ; Add seg000:05A4 mov word ptr fs:sub_5A2, 0 seg000:05AB xor ax, ax ; Logical Exclusive OR seg000:05AD cmp edi, 1 ; Compare Two Operands seg000:05B1 jnz short return ; Jump if Not Zero (ZF=0) seg000:05B1 seg000:05B3 mov ax, 1 seg000:05B3 seg000:05B6 seg000:05B6 return: ; CODE XREF: sub_5A2+Fj seg000:05B6 retn ; Return Near from Procedure seg000:05B6 seg000:05B6 sub_5A2 endp seg000:05B6 seg000:05B6 ; --------------------------------------------------------------------------- seg000:05B7 AC_WARN db 'Please Plug in AC Adapter!!!',0 ; DATA XREF: check_AC_adaptor+19o seg000:05D4 seg000:05D4 ; =============== S U B R O U T I N E ======================================= seg000:05D4 seg000:05D4 ; out(0x600, 0x1c); seg000:05D4 ; response = in(0x601); seg000:05D4 ; if ( response == 010000000b) print("Please insert AC adaptor!") seg000:05D4 ; else return; seg000:05D4 seg000:05D4 ; void __cdecl check_AC_adaptor() seg000:05D4 check_AC_adaptor proc near ; DATA XREF: seg000:002Do seg000:05D4 push edi seg000:05D6 push esi seg000:05D8 push ds seg000:05D9 mov dx, 600h seg000:05DC mov al, 1Ch seg000:05DE out dx, al seg000:05DF inc dx ; Increment by 1 seg000:05E0 in al, dx seg000:05E1 mov bl, al seg000:05E3 xor eax, eax ; Logical Exclusive OR seg000:05E6 test bl, 8 ; Logical Compare seg000:05E9 jnz short return ; Jump if Not Zero (ZF=0) seg000:05E9 seg000:05EB push cs seg000:05EC pop ds seg000:05ED lea esi, AC_WARN ; "Please Plug in AC Adapter!!!" seg000:05F2 mov cx, 1Dh seg000:05F5 mov eax, 0FFFFFFFFh seg000:05FB rep movs byte ptr es:[edi], byte ptr [esi] ; Move Byte(s) from String to String seg000:05FB seg000:05FE seg000:05FE return: ; CODE XREF: check_AC_adaptor+15j seg000:05FE pop ds seg000:05FF pop esi seg000:0601 pop edi seg000:0603 retn ; Return Near from Procedure seg000:0603 seg000:0603 check_AC_adaptor endp seg000:0603 seg000:0603 ; --------------------------------------------------------------------------- seg000:0604