📄 modmflow.cod
字号:
; 725 :
; 726 : //
; 727 : // At this point we can simply make sure that entire
; 728 : // handflow structure in the extension is updated.
; 729 : //
; 730 :
; 731 : Extension->HandFlow = New;
0055b 8d be 74 01 00
00 lea edi, DWORD PTR [esi+372]
00561 8d 75 f0 lea esi, DWORD PTR _New$[ebp]
00564 a5 movsd
00565 a5 movsd
00566 a5 movsd
00567 a5 movsd
00568 5f pop edi
00569 5e pop esi
; 732 :
; 733 : return FALSE;
0056a 32 c0 xor al, al
0056c 5b pop ebx
; 734 :
; 735 : }
0056d c9 leave
0056e c2 08 00 ret 8
_SerialSetupNewHandFlow@8 ENDP
_TEXT ENDS
PUBLIC _SerialSetHandFlow@4
PUBLIC _SerialHandleModemUpdate@8
; Function compile flags: /Ogs
; COMDAT _SerialSetHandFlow@4
_TEXT SEGMENT
_Context$ = 8
_SerialSetHandFlow@4 PROC NEAR ; COMDAT
; 761 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
; 762 :
; 763 : PSERIAL_IOCTL_SYNC S = Context;
; 764 : PSERIAL_DEVICE_EXTENSION Extension = S->Extension;
00003 8b 45 08 mov eax, DWORD PTR _Context$[ebp]
00006 56 push esi
; 765 : PSERIAL_HANDFLOW HandFlow = S->Data;
; 766 :
; 767 : SerialSetupNewHandFlow(
; 768 : Extension,
; 769 : HandFlow
; 770 : );
00007 ff 70 04 push DWORD PTR [eax+4]
0000a 8b 30 mov esi, DWORD PTR [eax]
0000c 56 push esi
0000d e8 00 00 00 00 call _SerialSetupNewHandFlow@8
; 771 :
; 772 : SerialHandleModemUpdate(
; 773 : Extension,
; 774 : FALSE
; 775 : );
00012 6a 00 push 0
00014 56 push esi
00015 e8 00 00 00 00 call _SerialHandleModemUpdate@8
; 776 :
; 777 : return FALSE;
0001a 32 c0 xor al, al
0001c 5e pop esi
; 778 :
; 779 : }
0001d 5d pop ebp
0001e c2 04 00 ret 4
_SerialSetHandFlow@4 ENDP
_TEXT ENDS
PUBLIC _SerialTurnOnBreak@4
; Function compile flags: /Ogs
; COMDAT _SerialTurnOnBreak@4
_TEXT SEGMENT
_Context$ = 8
_OldLineControl$ = 8
_SerialTurnOnBreak@4 PROC NEAR ; COMDAT
; 804 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 56 push esi
; 805 :
; 806 : PSERIAL_DEVICE_EXTENSION Extension = Context;
; 807 :
; 808 : UCHAR OldLineControl;
; 809 :
; 810 : if ((Extension->HandFlow.FlowReplace & SERIAL_RTS_MASK) ==
; 811 : SERIAL_TRANSMIT_TOGGLE) {
00004 8b 75 08 mov esi, DWORD PTR _Context$[ebp]
00007 57 push edi
00008 8b 86 78 01 00
00 mov eax, DWORD PTR [esi+376]
0000e 66 25 c0 00 and ax, 192 ; 000000c0H
00012 3c c0 cmp al, 192 ; 000000c0H
00014 75 06 jne SHORT $L15148
; 812 :
; 813 : SerialSetRTS(Extension);
00016 56 push esi
00017 e8 00 00 00 00 call _SerialSetRTS@4
$L15148:
; 814 :
; 815 : }
; 816 :
; 817 : OldLineControl = READ_LINE_CONTROL(Extension->Controller);
0001c 8d be 98 00 00
00 lea edi, DWORD PTR [esi+152]
00022 8b 07 mov eax, DWORD PTR [edi]
00024 83 c0 03 add eax, 3
00027 50 push eax
00028 ff 15 00 00 00
00 call DWORD PTR __imp__READ_PORT_UCHAR@4
; 818 :
; 819 : OldLineControl |= SERIAL_LCR_BREAK;
0002e 0c 40 or al, 64 ; 00000040H
00030 88 45 08 mov BYTE PTR _OldLineControl$[ebp], al
; 820 :
; 821 : WRITE_LINE_CONTROL(
; 822 : Extension->Controller,
; 823 : OldLineControl
; 824 : );
00033 8b 07 mov eax, DWORD PTR [edi]
00035 ff 75 08 push DWORD PTR _OldLineControl$[ebp]
00038 83 c0 03 add eax, 3
0003b 50 push eax
0003c ff 15 00 00 00
00 call DWORD PTR __imp__WRITE_PORT_UCHAR@8
; 825 :
; 826 : Extension->TXHolding |= SERIAL_TX_BREAK;
00042 83 8e 1c 01 00
00 10 or DWORD PTR [esi+284], 16 ; 00000010H
00049 5f pop edi
; 827 :
; 828 : return FALSE;
0004a 32 c0 xor al, al
0004c 5e pop esi
; 829 :
; 830 : }
0004d 5d pop ebp
0004e c2 04 00 ret 4
_SerialTurnOnBreak@4 ENDP
_TEXT ENDS
PUBLIC _SerialTurnOffBreak@4
; Function compile flags: /Ogs
; COMDAT _SerialTurnOffBreak@4
_TEXT SEGMENT
_Context$ = 8
_OldLineControl$ = 8
_SerialTurnOffBreak@4 PROC NEAR ; COMDAT
; 855 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 56 push esi
; 856 :
; 857 : PSERIAL_DEVICE_EXTENSION Extension = Context;
; 858 :
; 859 : UCHAR OldLineControl;
; 860 :
; 861 : if (Extension->TXHolding & SERIAL_TX_BREAK) {
00004 8b 75 08 mov esi, DWORD PTR _Context$[ebp]
00007 57 push edi
00008 f6 86 1c 01 00
00 10 test BYTE PTR [esi+284], 16 ; 00000010H
0000f 74 72 je SHORT $L15185
; 862 :
; 863 : //
; 864 : // We actually have a good reason for testing if transmission
; 865 : // is holding instead of blindly clearing the bit.
; 866 : //
; 867 : // If transmission actually was holding and the result of
; 868 : // clearing the bit is that we should restart transmission
; 869 : // then we will poke the interrupt enable bit, which will
; 870 : // cause an actual interrupt and transmission will then
; 871 : // restart on its own.
; 872 : //
; 873 : // If transmission wasn't holding and we poked the bit
; 874 : // then we would interrupt before a character actually made
; 875 : // it out and we could end up over writing a character in
; 876 : // the transmission hardware.
; 877 :
; 878 : OldLineControl = READ_LINE_CONTROL(Extension->Controller);
00011 8b 86 98 00 00
00 mov eax, DWORD PTR [esi+152]
00017 83 c0 03 add eax, 3
0001a 50 push eax
0001b ff 15 00 00 00
00 call DWORD PTR __imp__READ_PORT_UCHAR@4
; 879 :
; 880 : OldLineControl &= ~SERIAL_LCR_BREAK;
; 881 :
; 882 : WRITE_LINE_CONTROL(
; 883 : Extension->Controller,
; 884 : OldLineControl
; 885 : );
00021 8b 3d 00 00 00
00 mov edi, DWORD PTR __imp__WRITE_PORT_UCHAR@8
00027 24 bf and al, 191 ; 000000bfH
00029 88 45 08 mov BYTE PTR _OldLineControl$[ebp], al
0002c 8b 86 98 00 00
00 mov eax, DWORD PTR [esi+152]
00032 ff 75 08 push DWORD PTR _OldLineControl$[ebp]
00035 83 c0 03 add eax, 3
00038 50 push eax
00039 ff d7 call edi
; 886 :
; 887 : Extension->TXHolding &= ~SERIAL_TX_BREAK;
0003b 83 a6 1c 01 00
00 ef and DWORD PTR [esi+284], -17 ; ffffffefH
; 888 :
; 889 : if (!Extension->TXHolding &&
; 890 : (Extension->TransmitImmediate ||
; 891 : Extension->WriteLength) &&
; 892 : Extension->HoldingEmpty) {
00042 75 33 jne SHORT $L15168
00044 33 c0 xor eax, eax
00046 38 86 a1 01 00
00 cmp BYTE PTR [esi+417], al
0004c 75 08 jne SHORT $L15169
0004e 39 86 e0 00 00
00 cmp DWORD PTR [esi+224], eax
00054 74 21 je SHORT $L15168
$L15169:
00056 38 86 a0 01 00
00 cmp BYTE PTR [esi+416], al
0005c 74 19 je SHORT $L15168
; 893 :
; 894 : DISABLE_ALL_INTERRUPTS(Extension->Controller);
0005e 50 push eax
0005f 8b 86 98 00 00
00 mov eax, DWORD PTR [esi+152]
00065 40 inc eax
00066 50 push eax
00067 ff d7 call edi
; 895 : ENABLE_ALL_INTERRUPTS(Extension->Controller);
00069 8b 86 98 00 00
00 mov eax, DWORD PTR [esi+152]
0006f 6a 0f push 15 ; 0000000fH
00071 40 inc eax
00072 50 push eax
00073 ff d7 call edi
; 896 :
; 897 : } else {
00075 eb 0c jmp SHORT $L15185
$L15168:
; 898 :
; 899 : //
; 900 : // The following routine will lower the rts if we
; 901 : // are doing transmit toggleing and there is no
; 902 : // reason to keep it up.
; 903 : //
; 904 :
; 905 : Extension->CountOfTryingToLowerRTS++;
00077 ff 86 3c 01 00
00 inc DWORD PTR [esi+316]
; 906 : SerialPerhapsLowerRTS(Extension);
0007d 56 push esi
0007e e8 00 00 00 00 call _SerialPerhapsLowerRTS@4
$L15185:
00083 5f pop edi
; 907 :
; 908 : }
; 909 :
; 910 : }
; 911 :
; 912 : return FALSE;
00084 32 c0 xor al, al
00086 5e pop esi
; 913 :
; 914 : }
00087 5d pop ebp
00088 c2 04 00 ret 4
_SerialTurnOffBreak@4 ENDP
_TEXT ENDS
PUBLIC _SerialPretendXoff@4
EXTRN _SerialInsertQueueDpc@16:NEAR
; Function compile flags: /Ogs
; COMDAT _SerialPretendXoff@4
_TEXT SEGMENT
_Context$ = 8
_SerialPretendXoff@4 PROC NEAR ; COMDAT
; 946 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
00003 56 push esi
; 947 :
; 948 : PSERIAL_DEVICE_EXTENSION Extension = Context;
; 949 :
; 950 : Extension->TXHolding |= SERIAL_TX_XOFF;
00004 8b 75 08 mov esi, DWORD PTR _Context$[ebp]
; 951 :
; 952 : if ((Extension->HandFlow.FlowReplace & SERIAL_RTS_MASK) ==
; 953 : SERIAL_TRANSMIT_TOGGLE) {
00007 8b 86 78 01 00
00 mov eax, DWORD PTR [esi+376]
0000d 83 8e 1c 01 00
00 08 or DWORD PTR [esi+284], 8
00014 66 25 c0 00 and ax, 192 ; 000000c0H
00018 3c c0 cmp al, 192 ; 000000c0H
0001a 75 1b jne SHORT $L15508
; 954 :
; 955 : SerialInsertQueueDpc(
; 956 : &Extension->StartTimerLowerRTSDpc,
; 957 : NULL,
; 958 : NULL,
; 959 : Extension
; 960 : )?Extension->CountOfTryingToLowerRTS++:0;
0001c 56 push esi
0001d 6a 00 push 0
0001f 8d 86 4c 03 00
00 lea eax, DWORD PTR [esi+844]
00025 6a 00 push 0
00027 50 push eax
00028 e8 00 00 00 00 call _SerialInsertQueueDpc@16
0002d 84 c0 test al, al
0002f 74 06 je SHORT $L15508
00031 ff 86 3c 01 00
00 inc DWORD PTR [esi+316]
$L15508:
; 961 :
; 962 : }
; 963 :
; 964 : return FALSE;
00037 32 c0 xor al, al
00039 5e pop esi
; 965 :
; 966 : }
0003a 5d pop ebp
0003b c2 04 00 ret 4
_SerialPretendXoff@4 ENDP
_TEXT ENDS
PUBLIC _SerialPretendXon@4
; Function compile flags: /Ogs
; COMDAT _SerialPretendXon@4
_TEXT SEGMENT
_Context$ = 8
_SerialPretendXon@4 PROC NEAR ; COMDAT
; 994 : {
00000 55 push ebp
00001 8b ec mov ebp, esp
; 995 :
; 996 : PSERIAL_DEVICE_EXTENSION Extension = Context;
; 997 :
; 998 : if (Extension->TXHolding) {
00003 8b 45 08 mov eax, DWORD PTR _Context$[ebp]
00006 8d 88 1c 01 00
00 lea ecx, DWORD PTR [eax+284]
0000c 8b 11 mov edx, DWORD PTR [ecx]
0000e 85 d2 test edx, edx
00010 74 42 je SHORT $L15213
; 999 :
; 1000 : //
; 1001 : // We actually have a good reason for testing if transmission
; 1002 : // is holding instead of blindly clearing the bit.
; 1003 : //
; 1004 : // If transmission actually was holding and the result of
; 1005 : // clearing the bit is that we should restart transmission
; 1006 : // then we will poke the interrupt enable bit, which will
; 1007 : // cause an actual interrupt and transmission will then
; 1008 : // restart on its own.
; 1009 : //
; 1010 : // If transmission wasn't holding and we poked the bit
; 1011 : // then we would interrupt before a character actually made
; 1012 : // it out and we could end up over writing a character in
; 1013 : // the transmission hardware.
; 1014 :
; 1015 : Extension->TXHolding &= ~SERIAL_TX_XOFF;
00012 83 e2 f7 and edx, -9 ; fffffff7H
00015 89 11 mov DWORD PTR [ecx], edx
; 1016 :
; 1017 : if (!Extension->TXHolding &&
; 1018 : (Extension->TransmitImmediate ||
; 1019 : Extension->WriteLength) &&
; 1020 : Extension->HoldingEmpty) {
00017 75 3b jne SHORT $L15213
00019 80 b8 a1 01 00
00 00 cmp BYTE PTR [eax+417], 0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -