$ ndisasm -k 0x230,12 -s 0x227c -k 0x22c,4 -k 0x1f6,54 -k 0x1b26,6 \ -s 0x1b2c -s 0x1af5 -s 0x1a92 -s 0x1a4c -s 0x1b30 \ BIOSCOD1.rom -e 27 | tr [A-F] [a-f] | less -S 00001b05 50 push ax 00001b06 b86402 mov ax,0x264 00001b09 e8692d call 0x4875 00001b0c 7516 jnz 0x1b24 00001b0e e81b00 call 0x1b2c ; check_authorised_minipci_card() 00001b11 7306 jnc 0x1b19 00001b13 b89a00 mov ax,0x9a 00001b16 e83230 call 0x4b4b 00001b19 e8a400 call 0x1bc0 00001b1c 7306 jnc 0x1b24 00001b1e b89b00 mov ax,0x9b 00001b21 e82730 call 0x4b4b 00001b24 58 pop ax 00001b25 c3 ret classes: 00001b26 10022002ffff dw 0x0210, 0x0220, 0xffff check_authorised_minipci_card() 00001b2c 60 pusha 00001b2d be261b mov si,0x1b26 ; si = &PCI class list .loop: 00001b30 2e8b1c mov bx,[cs:si] 00001b33 81fbffff cmp bx,0xffff 00001b37 0f848200 je near 0x1bbd ; end of classes (return carry = 0;) .pci_id_loop: 00001b3b ba0a01 mov dx,0x10a ; dx = PCI_CLASS 00001b3e 9a115400f0 call 0xf000:0x5411 ; fetch_pci_register() 00001b43 83f8ff cmp ax,byte -0x1 00001b46 746f je 0x1bb7 ; if (0xffff) goto .next_class 00001b48 80fc02 cmp ah,0x2 ; pci_class == PCI_CLASS_NETWORK (02xx) 00001b4b 7557 jne 0x1ba4 00001b4d bff601 mov di,0x1f6 ; di = &PCI Vendor/ID/Subsystem list[0] .authorised_loop: 00001b50 2e833d00 cmp word [cs:di],byte +0x0 00001b54 7503 jnz 0x1b59 ; if (!end of list) 00001b56 f9 stc 00001b57 eb65 jmp short 0x1bbe ; else (end of list) return carry = 1; 00001b59 ba0001 mov dx,0x100 ; dx = PCI_VENDOR 00001b5c 9a115400f0 call 0xf000:0x5411 ; fetch_pci_register() 00001b61 2e3b05 cmp ax,[cs:di] ; if( ax == authorised->vendor ) 00001b64 7539 jne 0x1b9f ; continue; 00001b66 ba0201 mov dx,0x102 ; dx = PCI_DEVICE 00001b69 9a115400f0 call 0xf000:0x5411 ; fetch_pci_register() 00001b6e 2e3b4502 cmp ax,[cs:di+0x2] ; if( ax == authorised->device ) 00001b72 752b jne 0x1b9f ; continue; 00001b74 ba2c01 mov dx,0x12c ; dx = PCI_SUBSYSTEM_VENDOR 00001b77 9a115400f0 call 0xf000:0x5411 ; ax = fetch_pci_register() 00001b7c 2e3b4504 cmp ax,[cs:di+0x4] ; if( ax == authorised->subsystem_vendor ) 00001b80 751d jne 0x1b9f ; continue; 00001b82 ba2e01 mov dx,0x12e ; dx = PCI_SUBSYSTEM_DEVICE 00001b85 9a115400f0 call 0xf000:0x5411 ; fetch_pci_register() 00001b8a 2e3b4506 cmp ax,[cs:di+0x6] ; authorised->subsystem_device 00001b8e 750f jne 0x1b9f ; continue; 00001b90 e8fd35 call 0x5190 ; left over debugging command? (clc; ret) 00001b93 720a jc 0x1b9f ; if(carry) goto .next_authorised: 00001b95 e854eb call 0x6ec 00001b98 9afc1a5671 call 0x7156:0x1afc 00001b9d eb18 jmp short 0x1bb7 .next_authorised: 00001b9f 83c709 add di,byte +0x9 ; authorised++; 00001ba2 ebac jmp short 0x1b50 ; goto .authoised_loop; .bist?: 00001ba4 ba0e00 mov dx,0xe ; dx = PCI_BIST (??) 00001ba7 9a115400f0 call 0xf000:0x5411 ; fetch_pci_register() 00001bac a880 test al,0x80 ; supports Built-In-Self-Test (BIST) (??) 00001bae 7407 jz 0x1bb7 ; 00001bb0 43 inc bx 00001bb1 8bc3 mov ax,bx 00001bb3 2407 and al,0x7 00001bb5 7584 jnz 0x1b3b .next-class: 00001bb7 83c602 add si,byte +0x2 ; classes++; 00001bba e973ff jmp 0x1b30 ; goto 00001bbd f8 clc 00001bbe 61 popa 00001bbf c3 ret 00001b05 50 push ax 00001b06 b86402 mov ax,0x264 00001b09 e8692d call 0x4875 00001b0c 7516 jnz 0x1b24 ; return 00001b0e e81b00 call 0x1b2c 00001b11 7306 jnc 0x1b19 00001b13 b89a00 mov ax,0x9a 00001b16 e83230 call 0x4b4b 00001b19 e8a400 call 0x1bc0 00001b1c 7306 jnc 0x1b24 00001b1e b89b00 mov ax,0x9b 00001b21 e82730 call 0x4b4b 00001b24 58 pop ax 00001b25 c3 ret check_atheros_near: 000006ec 9c pushf 000006ed 6660 pushad 000006ef e80400 call 0x6f6 ; check_atheros_far(); 000006f2 6661 popad 000006f4 9d popf 000006f5 c3 ret check_atheros_far: 000006f6 9c pushf 000006f7 1e push ds 000006f8 6660 pushad 000006fa 81fb1002 cmp bx,0x210 000006fe 753c jne 0x73c ; if(class != PCI_SUBCLASS_ETHERNET) goto quick_exit; 00000700 2e813d8c16 cmp word [cs:di],0x168c 00000705 7535 jne 0x73c ; if(vendor != ATHEROS_VENDOR) goto quick_exit; 00000707 2e817d021410 cmp word [cs:di+0x2],0x1014 0000070d 752d jne 0x73c ; if(device != ATHEROS_DEVICE) goto quick_exit; 0000070f 2e817d04ab17 cmp word [cs:di+0x4],0x17ab 00000715 7525 jne 0x73c ; if(sub_vendor != ATHEROS_SUB_VENDOR) goto quick_exit; 00000717 2e817d063183 cmp word [cs:di+0x6],0x8331 0000071d 751d jne 0x73c ; if(sub_device != ATHEROS_SUB_DEVICE) goto quick_exit; 0000071f ba1002 mov dx,0x210 ; PCI_REGISTER_?? 00000722 9a115400f0 call 0xf000:0x5411 00000727 660518400000 add eax,0x4018 ; Pointer 0000072d 668bf0 mov esi,eax 00000730 33c0 xor ax,ax 00000732 8ed8 mov ds,ax ; ds = 0 00000734 678026cf and byte [esi],0xcf ; turn off bits 87--4321 00xx0000 00000738 67800e20 or byte [esi],0x20 ; turn on bit --6----- 001x0000 .quick_exit: 0000073c 6661 popad ; 0000073e 1f pop ds 0000073f 9d popf 00000740 c3 ret