
keyboard.nostrip.sys:     file format pei-i386

Disassembly of section .text:

00011000 <___crt_xc_end__>:
static void KbdWrite(int addr,BYTE data)
/*
 * FUNCTION: Write data to keyboard
 */
{
   11000:	55                   	push   %ebp
   11001:	89 e5                	mov    %esp,%ebp
   11003:	56                   	push   %esi
   11004:	89 c6                	mov    %eax,%esi
   11006:	53                   	push   %ebx
   11007:	88 d3                	mov    %dl,%bl
   11009:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi
   BYTE status;

   do
   {
      status=READ_PORT_UCHAR((PUCHAR)KBD_CTRL_PORT); // Wait until input buffer empty
   11010:	83 ec 0c             	sub    $0xc,%esp
   11013:	6a 64                	push   $0x64
   11015:	e8 66 0e 00 00       	call   11e80 <_READ_PORT_UCHAR@4>
   1101a:	83 c4 0c             	add    $0xc,%esp
   } while(status & KBD_IBF);
   1101d:	a8 02                	test   $0x2,%al
   1101f:	75 ef                	jne    11010 <___crt_xc_end__+0x10>
   WRITE_PORT_UCHAR((PUCHAR)addr,data);
   11021:	50                   	push   %eax
   11022:	50                   	push   %eax
   11023:	31 c0                	xor    %eax,%eax
   11025:	88 d8                	mov    %bl,%al
   11027:	50                   	push   %eax
   11028:	56                   	push   %esi
   11029:	e8 62 0e 00 00       	call   11e90 <_WRITE_PORT_UCHAR@8>
   1102e:	8d 65 f8             	lea    0xfffffff8(%ebp),%esp
   11031:	5b                   	pop    %ebx
   11032:	5e                   	pop    %esi
   11033:	5d                   	pop    %ebp
   11034:	c3                   	ret    
   11035:	8d 74 26 00          	lea    0x0(%esi),%esi
   11039:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

00011040 <_KbdReadData>:
}

static int KbdReadData(void)
/*
 * FUNCTION: Read data from port 0x60
 */
{
   11040:	55                   	push   %ebp
   11041:	89 e5                	mov    %esp,%ebp
   11043:	56                   	push   %esi
   int i;
   BYTE status,data;

   i=500000;
   11044:	be 20 a1 07 00       	mov    $0x7a120,%esi
   11049:	53                   	push   %ebx
   1104a:	eb 07                	jmp    11053 <_KbdReadData+0x13>
   1104c:	8d 74 26 00          	lea    0x0(%esi),%esi
   do
   {
      status=READ_PORT_UCHAR((PUCHAR)KBD_CTRL_PORT);
      if (!(status & KBD_OBF))      // Check if data available
         continue;
      data=READ_PORT_UCHAR((PUCHAR)KBD_DATA_PORT);
      if (status & (KBD_GTO | KBD_PERR))  // Check for timeout error
         continue;
      return data;
   } while(--i);
   11050:	4e                   	dec    %esi
   11051:	74 31                	je     11084 <_KbdReadData+0x44>
   11053:	83 ec 0c             	sub    $0xc,%esp
   11056:	6a 64                	push   $0x64
   11058:	e8 23 0e 00 00       	call   11e80 <_READ_PORT_UCHAR@4>
   1105d:	83 c4 0c             	add    $0xc,%esp
   11060:	88 c3                	mov    %al,%bl
   11062:	a8 01                	test   $0x1,%al
   11064:	74 ea                	je     11050 <_KbdReadData+0x10>
   11066:	83 ec 0c             	sub    $0xc,%esp
   11069:	6a 60                	push   $0x60
   1106b:	e8 10 0e 00 00       	call   11e80 <_READ_PORT_UCHAR@4>
   11070:	83 c4 0c             	add    $0xc,%esp
   11073:	80 e3 c0             	and    $0xc0,%bl
   11076:	75 d8                	jne    11050 <_KbdReadData+0x10>
   11078:	25 ff 00 00 00       	and    $0xff,%eax
   return -1;     // Timed out
}
   1107d:	8d 65 f8             	lea    0xfffffff8(%ebp),%esp
   11080:	5b                   	pop    %ebx
   11081:	5e                   	pop    %esi
   11082:	5d                   	pop    %ebp
   11083:	c3                   	ret    
   11084:	83 c8 ff             	or     $0xffffffff,%eax
   11087:	eb f4                	jmp    1107d <_KbdReadData+0x3d>
   11089:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi

00011090 <_SetKeyboardLEDs>:


/*
 * Set keyboard LED's
 */

static void SetKeyboardLEDs(BYTE status)
{
   11090:	55                   	push   %ebp
   KbdWrite(KBD_DATA_PORT,0xED);
   11091:	ba ed 00 00 00       	mov    $0xed,%edx
   11096:	89 e5                	mov    %esp,%ebp
   11098:	53                   	push   %ebx
   11099:	53                   	push   %ebx
   1109a:	88 c3                	mov    %al,%bl
   1109c:	b8 60 00 00 00       	mov    $0x60,%eax
   110a1:	e8 5a ff ff ff       	call   11000 <___crt_xc_end__>
   if (KbdReadData()!=KBD_ACK)      // Error
   110a6:	e8 95 ff ff ff       	call   11040 <_KbdReadData>
   110ab:	3d fa 00 00 00       	cmp    $0xfa,%eax
   110b0:	74 04                	je     110b6 <_SetKeyboardLEDs+0x26>
      return;
   KbdWrite(KBD_DATA_PORT,status);
   KbdReadData();
}
   110b2:	5a                   	pop    %edx
   110b3:	5b                   	pop    %ebx
   110b4:	5d                   	pop    %ebp
   110b5:	c3                   	ret    
   110b6:	31 d2                	xor    %edx,%edx
   110b8:	b0 60                	mov    $0x60,%al
   110ba:	88 da                	mov    %bl,%dl
   110bc:	e8 3f ff ff ff       	call   11000 <___crt_xc_end__>
   110c1:	59                   	pop    %ecx
   110c2:	5b                   	pop    %ebx
   110c3:	5d                   	pop    %ebp
   110c4:	e9 77 ff ff ff       	jmp    11040 <_KbdReadData>
   110c9:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi

000110d0 <_VirtualToAscii>:


/*
 * Process scan code
 */

static void ProcessScanCode(BYTE scanCode,BOOL isDown)
{
   switch(scanCode)
   {
      case 0x1D:  // Ctrl
         if (extKey)
         {
            if (isDown)
               ctrlKeyState|=RIGHT_CTRL_PRESSED;
            else
               ctrlKeyState&=~RIGHT_CTRL_PRESSED;
         }
         else
         {
            if (isDown)
               ctrlKeyState|=LEFT_CTRL_PRESSED;
            else
               ctrlKeyState&=~LEFT_CTRL_PRESSED;
         }
         break;
      case 0x2A:  // Left shift
      case 0x36:  // Right shift
         if (isDown)
            ctrlKeyState|=SHIFT_PRESSED;
         else
            ctrlKeyState&=~SHIFT_PRESSED;
         break;
      case 0x38:  // Alt
         if (extKey)
         {
            if (isDown)
               ctrlKeyState|=RIGHT_ALT_PRESSED;
            else
               ctrlKeyState&=~RIGHT_ALT_PRESSED;
         }
         else
         {
            if (isDown)
               ctrlKeyState|=LEFT_ALT_PRESSED;
            else
               ctrlKeyState&=~LEFT_ALT_PRESSED;
         }
         break;
      case 0x3A:  // CapsLock
         if (ctrlKeyState & CTRL_PRESSED)
            break;
         if (isDown)
         {
            if (!capsDown)
            {
               capsDown=1;
               if (ctrlKeyState & CAPSLOCK_ON)
               {
                  ledStatus&=~KBD_LED_CAPS;
                  ctrlKeyState&=~CAPSLOCK_ON;
               }
               else
               {
                  ledStatus|=KBD_LED_CAPS;
                  ctrlKeyState|=CAPSLOCK_ON;
               }
               SetKeyboardLEDs(ledStatus);
            }
         }
         else
         {
            capsDown=0;
         }
         break;
      case 0x45:  // NumLock
         if (ctrlKeyState & CTRL_PRESSED)
            break;
         if (isDown)
         {
            if (!numDown)
            {
               numDown=1;
               if (ctrlKeyState & NUMLOCK_ON)
               {
                  ledStatus&=~KBD_LED_NUM;
                  ctrlKeyState&=~NUMLOCK_ON;
               }
               else
               {
                  ledStatus|=KBD_LED_NUM;
                  ctrlKeyState|=NUMLOCK_ON;
               }
               SetKeyboardLEDs(ledStatus);
            }
         }
         else
         {
            numDown=0;
         }
         break;
      case 0x46:  // ScrollLock
         if (ctrlKeyState & CTRL_PRESSED)
            break;
         if (isDown)
         {
            if (!scrollDown)
            {
               scrollDown=1;
               if (ctrlKeyState & SCROLLLOCK_ON)
               {
                  ledStatus&=~KBD_LED_SCROLL;
                  ctrlKeyState&=~SCROLLLOCK_ON;
               }
               else
               {
                  ledStatus|=KBD_LED_SCROLL;
                  ctrlKeyState|=SCROLLLOCK_ON;
               }
               SetKeyboardLEDs(ledStatus);
            }
         }
         else
         {
            scrollDown=0;
         }
         break;
      default:
         break;
   }
}


/*
 * Translate virtual key code to ASCII
 */

static BYTE VirtualToAscii(WORD keyCode,BOOL isDown)
{
   110d0:	55                   	push   %ebp
   if ((ctrlKeyState & ALT_PRESSED)&&(ctrlKeyState & CTRL_PRESSED))
   110d1:	8b 0d c0 42 01 00    	mov    0x142c0,%ecx
   110d7:	89 e5                	mov    %esp,%ebp
   110d9:	56                   	push   %esi
   110da:	f6 c1 03             	test   $0x3,%cl
   110dd:	53                   	push   %ebx
   110de:	89 c3                	mov    %eax,%ebx
   110e0:	74 07                	je     110e9 <_VirtualToAscii+0x19>
      return 0;		// Ctrl+Alt+char always 0
   110e2:	31 f6                	xor    %esi,%esi
   110e4:	f6 c1 0c             	test   $0xc,%cl
   110e7:	75 3d                	jne    11126 <_VirtualToAscii+0x56>
   if ((!isDown)&&(ctrlKeyState & ALT_PRESSED))
   110e9:	85 d2                	test   %edx,%edx
   110eb:	74 43                	je     11130 <_VirtualToAscii+0x60>
      return 0;		// Alt+char is 0 when key is released

   if (ctrlKeyState & CTRL_PRESSED)
   110ed:	f6 c1 0c             	test   $0xc,%cl
   110f0:	74 4a                	je     1113c <_VirtualToAscii+0x6c>
   {
      if ((keyCode>=VK_A)&&(keyCode<=VK_Z))
   110f2:	8d 43 bf             	lea    0xffffffbf(%ebx),%eax
   110f5:	66 83 f8 19          	cmp    $0x19,%ax
   110f9:	76 79                	jbe    11174 <_VirtualToAscii+0xa4>
         return keyCode-VK_A+1;
      switch(keyCode)
   110fb:	89 d8                	mov    %ebx,%eax
      {
         case VK_SPACE:
            return ' ';
   110fd:	be 20 00 00 00       	mov    $0x20,%esi
   11102:	25 ff ff 00 00       	and    $0xffff,%eax
   11107:	83 f8 20             	cmp    $0x20,%eax
   1110a:	74 1a                	je     11126 <_VirtualToAscii+0x56>
   1110c:	0f 8f ac 00 00 00    	jg     111be <_VirtualToAscii+0xee>
         case VK_BACK:
            return 127;
   11112:	66 be 7f 00          	mov    $0x7f,%si
   11116:	83 f8 08             	cmp    $0x8,%eax
   11119:	74 0b                	je     11126 <_VirtualToAscii+0x56>
         case VK_RETURN:
            return '\r';                     
   1111b:	66 be 0d 00          	mov    $0xd,%si
   1111f:	83 f8 0d             	cmp    $0xd,%eax
         case 219:                      /* [ */
            if (ctrlKeyState & SHIFT_PRESSED)
               return 0;
            return 27;
         case 220:         /* \ */
            if (ctrlKeyState & SHIFT_PRESSED)
               return 0;
            return 28;
         case 221:         /* ] */
            if (ctrlKeyState & SHIFT_PRESSED)
               return 0;
             return 29;
         default:
            return 0;
      }
   }

   if ((keyCode>=VK_A)&&(keyCode<=VK_Z))
   {
      if (ctrlKeyState & CAPSLOCK_ON)
         if (ctrlKeyState & SHIFT_PRESSED)
            return keyCode-VK_A+'a';
         else
            return keyCode-VK_A+'A';
      else
         if (ctrlKeyState & SHIFT_PRESSED)
            return keyCode-VK_A+'A';
         else
            return keyCode-VK_A+'a';
   }

   if ((keyCode>=VK_0)&&(keyCode<=VK_9))
   {
      if (ctrlKeyState & SHIFT_PRESSED)
         return asciiTable1[keyCode-VK_0];
      else
         return keyCode-VK_0+'0';
   }

   if ((keyCode>=VK_NUMPAD0)&&(keyCode<=VK_DIVIDE))
      return asciiTable2[keyCode-VK_NUMPAD0];

   if ((keyCode>=186)&&(keyCode<=222))
  {
      if (ctrlKeyState & SHIFT_PRESSED)
         return asciiTable4[keyCode-186];
      else
         return asciiTable3[keyCode-186];
   }

   switch(keyCode)
   11122:	74 02                	je     11126 <_VirtualToAscii+0x56>
   {
      case VK_SPACE:
         return ' ';
      case VK_RETURN:
         return '\r';
      case VK_BACK:
         return 8;
      case VK_TAB:
         return 9;
   }
   return 0;
   11124:	31 f6                	xor    %esi,%esi
}
   11126:	89 f0                	mov    %esi,%eax
   11128:	5b                   	pop    %ebx
   11129:	5e                   	pop    %esi
   1112a:	5d                   	pop    %ebp
   1112b:	c3                   	ret    
   1112c:	8d 74 26 00          	lea    0x0(%esi),%esi
   11130:	31 f6                	xor    %esi,%esi
   11132:	f6 c1 03             	test   $0x3,%cl
   11135:	75 ef                	jne    11126 <_VirtualToAscii+0x56>
   11137:	f6 c1 0c             	test   $0xc,%cl
   1113a:	75 b6                	jne    110f2 <_VirtualToAscii+0x22>
   1113c:	8d 43 bf             	lea    0xffffffbf(%ebx),%eax
   1113f:	66 83 f8 19          	cmp    $0x19,%ax
   11143:	77 12                	ja     11157 <_VirtualToAscii+0x87>
   11145:	f7 c1 80 00 00 00    	test   $0x80,%ecx
   1114b:	74 68                	je     111b5 <_VirtualToAscii+0xe5>
   1114d:	83 e1 10             	and    $0x10,%ecx
   11150:	74 68                	je     111ba <_VirtualToAscii+0xea>
   11152:	8d 43 20             	lea    0x20(%ebx),%eax
   11155:	eb 20                	jmp    11177 <_VirtualToAscii+0xa7>
   11157:	8d 43 d0             	lea    0xffffffd0(%ebx),%eax
   1115a:	66 83 f8 09          	cmp    $0x9,%ax
   1115e:	77 24                	ja     11184 <_VirtualToAscii+0xb4>
   11160:	83 e1 10             	and    $0x10,%ecx
   11163:	74 55                	je     111ba <_VirtualToAscii+0xea>
   11165:	89 d8                	mov    %ebx,%eax
   11167:	25 ff ff 00 00       	and    $0xffff,%eax
   1116c:	8a 80 65 31 01 00    	mov    0x13165(%eax),%al
   11172:	eb 03                	jmp    11177 <_VirtualToAscii+0xa7>
   11174:	8d 43 c0             	lea    0xffffffc0(%ebx),%eax
   11177:	25 ff 00 00 00       	and    $0xff,%eax
   1117c:	5b                   	pop    %ebx
   1117d:	89 c6                	mov    %eax,%esi
   1117f:	89 f0                	mov    %esi,%eax
   11181:	5e                   	pop    %esi
   11182:	5d                   	pop    %ebp
   11183:	c3                   	ret    
   11184:	8d 43 a0             	lea    0xffffffa0(%ebx),%eax
   11187:	66 83 f8 0f          	cmp    $0xf,%ax
   1118b:	76 58                	jbe    111e5 <_VirtualToAscii+0x115>
   1118d:	8d 83 46 ff ff ff    	lea    0xffffff46(%ebx),%eax
   11193:	66 83 f8 24          	cmp    $0x24,%ax
   11197:	0f 87 88 00 00 00    	ja     11225 <_VirtualToAscii+0x155>
   1119d:	83 e1 10             	and    $0x10,%ecx
   111a0:	0f 84 a2 00 00 00    	je     11248 <_VirtualToAscii+0x178>
   111a6:	89 d8                	mov    %ebx,%eax
   111a8:	25 ff ff 00 00       	and    $0xffff,%eax
   111ad:	8a 80 a6 30 01 00    	mov    0x130a6(%eax),%al
   111b3:	eb c2                	jmp    11177 <_VirtualToAscii+0xa7>
   111b5:	83 e1 10             	and    $0x10,%ecx
   111b8:	74 98                	je     11152 <_VirtualToAscii+0x82>
   111ba:	88 d8                	mov    %bl,%al
   111bc:	eb b9                	jmp    11177 <_VirtualToAscii+0xa7>
   111be:	3d dc 00 00 00       	cmp    $0xdc,%eax
   111c3:	74 2f                	je     111f4 <_VirtualToAscii+0x124>
   111c5:	7f 40                	jg     11207 <_VirtualToAscii+0x137>
   111c7:	3d db 00 00 00       	cmp    $0xdb,%eax
   111cc:	0f 85 52 ff ff ff    	jne    11124 <_VirtualToAscii+0x54>
   111d2:	c1 e9 04             	shr    $0x4,%ecx
   111d5:	83 e1 01             	and    $0x1,%ecx
   111d8:	83 f9 01             	cmp    $0x1,%ecx
   111db:	19 f6                	sbb    %esi,%esi
   111dd:	83 e6 1b             	and    $0x1b,%esi
   111e0:	e9 41 ff ff ff       	jmp    11126 <_VirtualToAscii+0x56>
   111e5:	89 d8                	mov    %ebx,%eax
   111e7:	25 ff ff 00 00       	and    $0xffff,%eax
   111ec:	8a 80 25 31 01 00    	mov    0x13125(%eax),%al
   111f2:	eb 83                	jmp    11177 <_VirtualToAscii+0xa7>
   111f4:	c1 e9 04             	shr    $0x4,%ecx
   111f7:	83 e1 01             	and    $0x1,%ecx
   111fa:	83 f9 01             	cmp    $0x1,%ecx
   111fd:	19 f6                	sbb    %esi,%esi
   111ff:	83 e6 1c             	and    $0x1c,%esi
   11202:	e9 1f ff ff ff       	jmp    11126 <_VirtualToAscii+0x56>
   11207:	3d dd 00 00 00       	cmp    $0xdd,%eax
   1120c:	0f 85 12 ff ff ff    	jne    11124 <_VirtualToAscii+0x54>
   11212:	c1 e9 04             	shr    $0x4,%ecx
   11215:	83 e1 01             	and    $0x1,%ecx
   11218:	83 f9 01             	cmp    $0x1,%ecx
   1121b:	19 f6                	sbb    %esi,%esi
   1121d:	83 e6 1d             	and    $0x1d,%esi
   11220:	e9 01 ff ff ff       	jmp    11126 <_VirtualToAscii+0x56>
   11225:	89 d8                	mov    %ebx,%eax
   11227:	be 09 00 00 00       	mov    $0x9,%esi
   1122c:	25 ff ff 00 00       	and    $0xffff,%eax
   11231:	83 f8 09             	cmp    $0x9,%eax
   11234:	0f 84 ec fe ff ff    	je     11126 <_VirtualToAscii+0x56>
   1123a:	7f 1e                	jg     1125a <_VirtualToAscii+0x18a>
   1123c:	66 be 08 00          	mov    $0x8,%si
   11240:	83 f8 08             	cmp    $0x8,%eax
   11243:	e9 da fe ff ff       	jmp    11122 <_VirtualToAscii+0x52>
   11248:	89 d8                	mov    %ebx,%eax
   1124a:	25 ff ff 00 00       	and    $0xffff,%eax
   1124f:	8a 80 66 30 01 00    	mov    0x13066(%eax),%al
   11255:	e9 1d ff ff ff       	jmp    11177 <_VirtualToAscii+0xa7>
   1125a:	be 0d 00 00 00       	mov    $0xd,%esi
   1125f:	83 f8 0d             	cmp    $0xd,%eax
   11262:	0f 84 be fe ff ff    	je     11126 <_VirtualToAscii+0x56>
   11268:	66 be 20 00          	mov    $0x20,%si
   1126c:	83 f8 20             	cmp    $0x20,%eax
   1126f:	e9 ae fe ff ff       	jmp    11122 <_VirtualToAscii+0x52>
   11274:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
   1127a:	8d bf 00 00 00 00    	lea    0x0(%edi),%edi

00011280 <_ScanToVirtual>:


/*
 * Translate scan code to virtual key code
 */

static WORD ScanToVirtual(BYTE scanCode)
{
   11280:	88 c2                	mov    %al,%dl
   11282:	55                   	push   %ebp
   11283:	89 e5                	mov    %esp,%ebp
   if ((scanCode>=0x47)&&(scanCode<=0x53)&&(ctrlKeyState & NUMLOCK_ON)&&
   11285:	8d 42 b9             	lea    0xffffffb9(%edx),%eax
   11288:	3c 0c                	cmp    $0xc,%al
   1128a:	77 09                	ja     11295 <_ScanToVirtual+0x15>
   1128c:	a1 c0 42 01 00       	mov    0x142c0,%eax
   11291:	a8 20                	test   $0x20,%al
   11293:	75 22                	jne    112b7 <_ScanToVirtual+0x37>
       (!extKey)&&(!(ctrlKeyState & SHIFT_PRESSED)))
      return vkKeypadTable[scanCode-0x47];
   if ((scanCode==0x35)&&(extKey))		// Gray divide
      return VK_DIVIDE;
   11295:	b8 6f 00 00 00       	mov    $0x6f,%eax
   1129a:	80 fa 35             	cmp    $0x35,%dl
   1129d:	74 39                	je     112d8 <_ScanToVirtual+0x58>
   if ((scanCode==0x37)&&(extKey))     // Print screen
   1129f:	80 fa 37             	cmp    $0x37,%dl
   112a2:	74 2f                	je     112d3 <_ScanToVirtual+0x53>
      return VK_PRINT;
   return vkTable[scanCode];
   112a4:	31 c0                	xor    %eax,%eax
   112a6:	88 d0                	mov    %dl,%al
   112a8:	66 8b 84 00 00 30 01 	mov    0x13000(%eax,%eax,1),%ax
   112af:	00 
   112b0:	25 ff ff 00 00       	and    $0xffff,%eax
}
   112b5:	5d                   	pop    %ebp
   112b6:	c3                   	ret    
   112b7:	8b 0d 70 42 01 00    	mov    0x14270,%ecx
   112bd:	85 c9                	test   %ecx,%ecx
   112bf:	75 d4                	jne    11295 <_ScanToVirtual+0x15>
   112c1:	a8 10                	test   $0x10,%al
   112c3:	75 d0                	jne    11295 <_ScanToVirtual+0x15>
   112c5:	31 c0                	xor    %eax,%eax
   112c7:	88 d0                	mov    %dl,%al
   112c9:	66 8b 84 00 72 30 01 	mov    0x13072(%eax,%eax,1),%ax
   112d0:	00 
   112d1:	eb dd                	jmp    112b0 <_ScanToVirtual+0x30>
   112d3:	b8 2a 00 00 00       	mov    $0x2a,%eax
   112d8:	8b 0d 70 42 01 00    	mov    0x14270,%ecx
   112de:	85 c9                	test   %ecx,%ecx
   112e0:	74 c2                	je     112a4 <_ScanToVirtual+0x24>
   112e2:	5d                   	pop    %ebp
   112e3:	c3                   	ret    
   112e4:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
   112ea:	8d bf 00 00 00 00    	lea    0x0(%edi),%edi

000112f0 <_KbdWorkItemRoutine@8>:


/*
 * Debug request handler
 */

static VOID STDCALL
KbdWorkItemRoutine(IN PDEVICE_OBJECT DeviceObject,
                   IN PVOID Context)
{
   112f0:	55                   	push   %ebp
   LONG Debug;

   Debug = InterlockedExchange(&DoSystemDebug, -1);
   112f1:	83 ca ff             	or     $0xffffffff,%edx
   112f4:	89 e5                	mov    %esp,%ebp
   112f6:	b9 00 20 01 00       	mov    $0x12000,%ecx
   112fb:	50                   	push   %eax
   112fc:	50                   	push   %eax
   112fd:	e8 8e 0a 00 00       	call   11d90 <@InterlockedExchange@8>
   if (Debug != -1)
   11302:	83 f8 ff             	cmp    $0xffffffff,%eax
   11305:	74 0c                	je     11313 <_KbdWorkItemRoutine@8+0x23>
     {
       KdSystemDebugControl(Debug);
   11307:	83 ec 0c             	sub    $0xc,%esp
   1130a:	50                   	push   %eax
   1130b:	e8 90 0a 00 00       	call   11da0 <_KdSystemDebugControl@4>
   11310:	83 c4 0c             	add    $0xc,%esp
     }
}
   11313:	c9                   	leave  
   11314:	c2 08 00             	ret    $0x8
   11317:	89 f6                	mov    %esi,%esi
   11319:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

00011320 <_KbdDpcRoutine@16>:


/*
 * Keyboard IRQ handler
 */

static VOID STDCALL
KbdDpcRoutine(PKDPC Dpc,
	      PVOID DeferredContext,
	      PVOID SystemArgument1,
	      PVOID SystemArgument2)
{
   11320:	55                   	push   %ebp
   11321:	89 e5                	mov    %esp,%ebp
   11323:	53                   	push   %ebx
   11324:	51                   	push   %ecx
   11325:	8b 5d 10             	mov    0x10(%ebp),%ebx
   11328:	8b 45 14             	mov    0x14(%ebp),%eax
   PIRP Irp = (PIRP)SystemArgument2;
   PDEVICE_OBJECT DeviceObject = (PDEVICE_OBJECT)SystemArgument1;

   if (SystemArgument1 == NULL && DoSystemDebug != -1)
   1132b:	85 db                	test   %ebx,%ebx
   1132d:	74 27                	je     11356 <_KbdDpcRoutine@16+0x36>
     {
       if (KbdWorkItem != NULL)
         {
           IoQueueWorkItem(KbdWorkItem, (PIO_WORKITEM_ROUTINE)KbdWorkItemRoutine, DelayedWorkQueue, NULL);
         }
       else
         {
           KdSystemDebugControl(DoSystemDebug);
           DoSystemDebug = -1;
         }
       return;
     }
     
   CHECKPOINT;
   DPRINT("KbdDpcRoutine(DeviceObject %x, Irp %x)\n",
	    DeviceObject,Irp);
   Irp->IoStatus.Status = STATUS_SUCCESS;
   1132f:	c7 40 18 00 00 00 00 	movl   $0x0,0x18(%eax)
   Irp->IoStatus.Information = 0;
   11336:	c7 40 1c 00 00 00 00 	movl   $0x0,0x1c(%eax)
   IoCompleteRequest(Irp,IO_NO_INCREMENT);
   1133d:	52                   	push   %edx
   1133e:	52                   	push   %edx
   1133f:	6a 00                	push   $0x0
   11341:	50                   	push   %eax
   11342:	e8 69 0a 00 00       	call   11db0 <_IoCompleteRequest@8>
   IoStartNextPacket(DeviceObject,FALSE);
   11347:	6a 00                	push   $0x0
   11349:	53                   	push   %ebx
   1134a:	e8 71 0a 00 00       	call   11dc0 <_IoStartNextPacket@8>
}
   1134f:	8b 5d fc             	mov    0xfffffffc(%ebp),%ebx
   11352:	c9                   	leave  
   11353:	c2 10 00             	ret    $0x10
   11356:	8b 15 00 20 01 00    	mov    0x12000,%edx
   1135c:	83 fa ff             	cmp    $0xffffffff,%edx
   1135f:	74 ce                	je     1132f <_KbdDpcRoutine@16+0xf>
   11361:	a1 00 40 01 00       	mov    0x14000,%eax
   11366:	85 c0                	test   %eax,%eax
   11368:	74 21                	je     1138b <_KbdDpcRoutine@16+0x6b>
   1136a:	c7 45 14 00 00 00 00 	movl   $0x0,0x14(%ebp)
   11371:	c7 45 10 01 00 00 00 	movl   $0x1,0x10(%ebp)
   11378:	c7 45 0c f0 12 01 00 	movl   $0x112f0,0xc(%ebp)
   1137f:	89 45 08             	mov    %eax,0x8(%ebp)
   11382:	8b 5d fc             	mov    0xfffffffc(%ebp),%ebx
   11385:	c9                   	leave  
   11386:	e9 45 0a 00 00       	jmp    11dd0 <_IoQueueWorkItem@16>
   1138b:	83 ec 0c             	sub    $0xc,%esp
   1138e:	52                   	push   %edx
   1138f:	e8 0c 0a 00 00       	call   11da0 <_KdSystemDebugControl@4>
   11394:	83 c4 0c             	add    $0xc,%esp
   11397:	c7 05 00 20 01 00 ff 	movl   $0xffffffff,0x12000
   1139e:	ff ff ff 
   113a1:	eb ac                	jmp    1134f <_KbdDpcRoutine@16+0x2f>
   113a3:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
   113a9:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

000113b0 <_KeyboardHandler@8>:


static BOOLEAN STDCALL
KeyboardHandler(PKINTERRUPT Interrupt,
		PVOID Context)
{
   113b0:	55                   	push   %ebp
   113b1:	89 e5                	mov    %esp,%ebp
   113b3:	57                   	push   %edi
   113b4:	56                   	push   %esi
   113b5:	53                   	push   %ebx
   113b6:	83 ec 18             	sub    $0x18,%esp
   BYTE thisKey;
   BOOL isDown;
   static BYTE lastKey;
   CHAR Status;
   PDEVICE_OBJECT deviceObject = (PDEVICE_OBJECT) Context;
   PDEVICE_EXTENSION deviceExtension = (PDEVICE_EXTENSION) deviceObject->DeviceExtension;
   113b9:	8b 45 0c             	mov    0xc(%ebp),%eax
   113bc:	8b 70 28             	mov    0x28(%eax),%esi
   		
   CHECKPOINT;

   /*
    * Check status
    */
   Status = READ_PORT_UCHAR((PUCHAR)KBD_CTRL_PORT);
   113bf:	6a 64                	push   $0x64
   113c1:	e8 ba 0a 00 00       	call   11e80 <_READ_PORT_UCHAR@4>
   113c6:	88 c3                	mov    %al,%bl
   if (!(Status & KBD_OBF))
   113c8:	83 c4 0c             	add    $0xc,%esp
     {
       return (FALSE);
   113cb:	31 c0                	xor    %eax,%eax
   113cd:	f6 c3 01             	test   $0x1,%bl
   113d0:	75 0e                	jne    113e0 <_KeyboardHandler@8+0x30>
     }

   // Read scan code
   thisKey=READ_PORT_UCHAR((PUCHAR)KBD_DATA_PORT);

	// Call hook routine. May change scancode value.
   if (deviceExtension->IsrHookCallback) {
   	BOOLEAN cont = FALSE, ret;
	//BUG BUG: rewrite to have valid CurrentScanState!!!
	ret = (*deviceExtension->IsrHookCallback)(
                	deviceObject,
                	NULL,//&deviceExtension->CurrentInput,
                	NULL,//&deviceExtension->CurrentOutput,
                	Status,
                	&thisKey, //&scanCode,
                	&cont,
                	NULL //&deviceExtension->CurrentScanState
                	);

    	if (!cont) {
        	return ret;
    	}
	}       


   if ((thisKey==0xE0)||(thisKey==0xE1))   // Extended key
   {
      extKey=1;         // Wait for next byte
      lastKey=thisKey;
      return FALSE;
   }

   isDown=!(thisKey & 0x80);
   thisKey&=0x7F;

   // The keyboard maintains its own internal caps lock and num lock
   // statuses.  In caps lock mode E0 AA precedes make code and
   // E0 2A follow break code.  In num lock mode, E0 2A precedes
   // make code and E0 AA follow break code.  We maintain our own caps lock
   // and num lock statuses, so we will just ignore these.
   // Some keyboards have L-Shift/R-Shift modes instead of caps lock
   // mode.  If right shift pressed, E0 B6 / E0 36 pairs generated.
   if (extKey & ((thisKey==0x2A)||(thisKey==0x36)))
   {
      extKey=0;
      return FALSE;
   }

   // Check for PAUSE sequence
   if (extKey && (lastKey==0xE1))
   {
      if (thisKey==0x1D)
         lastKey=0xFF;     // Sequence is OK
      else
         extKey=0;
      return FALSE;
   }
   if (extKey && (lastKey==0xFF))
   {
      if (thisKey!=0x45)
      {
         extKey=0;         // Bad sequence
         return FALSE;
      }
      thisKey=0x7F;        // Pseudo-code for PAUSE
   }

   ProcessScanCode(thisKey,isDown);

//   DbgPrint("Key: %c\n",VirtualToAscii(ScanToVirtual(thisKey),isDown));
//   DbgPrint("Key: %x\n",ScanToVirtual(thisKey));
   if (ScanToVirtual(thisKey) == VK_TAB && isDown)
     {
       InSysRq = TRUE;
     }
   else if (ScanToVirtual(thisKey) == VK_TAB && !isDown)
     {
       InSysRq = FALSE;
     }
   else if (InSysRq == TRUE && ScanToVirtual(thisKey) >= VK_A &&
	    ScanToVirtual(thisKey) <= VK_Z && isDown)
     {
       InterlockedExchange(&DoSystemDebug, ScanToVirtual(thisKey) - VK_A);
       KeInsertQueueDpc(&KbdDpc, NULL, NULL);
       return(TRUE);
     }

   if (CurrentIrp!=NULL)
     {
	KEY_EVENT_RECORD* rec = (KEY_EVENT_RECORD *)
	  CurrentIrp->AssociatedIrp.SystemBuffer;
	
	CHECKPOINT;
	
	rec[KeysRead].bKeyDown=isDown;
	rec[KeysRead].wRepeatCount=1;
	rec[KeysRead].wVirtualKeyCode=ScanToVirtual(thisKey);
	rec[KeysRead].wVirtualScanCode=thisKey;
        rec[KeysRead].uChar.AsciiChar=VirtualToAscii(rec->wVirtualKeyCode,isDown);
	rec[KeysRead].dwControlKeyState=ctrlKeyState;
	if (extKey)
	  {
	     rec[KeysRead].dwControlKeyState|=ENHANCED_KEY;
	     extKey = 0;
	  }
	KeysRead++;
	DPRINT("KeysRequired %d KeysRead %x\n",KeysRequired,KeysRead);
	if (KeysRead==KeysRequired)
	  {
	  	 PDEVICE_OBJECT DeviceObject = (PDEVICE_OBJECT) Context;
	     KeInsertQueueDpc(&KbdDpc,DeviceObject,CurrentIrp);
	     CurrentIrp=NULL;
	  }
	CHECKPOINT;
	return TRUE;
     }
   
   // Buffer is full ?
   if (keysInBuffer==KBD_BUFFER_SIZE)      // Buffer is full
   {
      extKey=0;
      return(TRUE);
   }
   kbdBuffer[bufHead].bKeyDown=isDown;
   kbdBuffer[bufHead].wRepeatCount=1;
   kbdBuffer[bufHead].wVirtualKeyCode=ScanToVirtual(thisKey);
   kbdBuffer[bufHead].wVirtualScanCode=thisKey;
   kbdBuffer[bufHead].uChar.UnicodeChar=0;
   // kbdBuffer[bufHead].uChar.AsciiChar=TranslateScanCode(thisKey);
   kbdBuffer[bufHead].uChar.AsciiChar=VirtualToAscii(kbdBuffer[bufHead].wVirtualKeyCode,isDown);
   kbdBuffer[bufHead].dwControlKeyState=ctrlKeyState;
   if (extKey) 
      kbdBuffer[bufHead].dwControlKeyState|=ENHANCED_KEY;
   bufHead++;
   bufHead&=KBD_WRAP_MASK;    // Modulo KBD_BUFFER_SIZE
   keysInBuffer++;
   extKey=0;
   return TRUE;
}
   113d2:	8d 65 f4             	lea    0xfffffff4(%ebp),%esp
   113d5:	5b                   	pop    %ebx
   113d6:	5e                   	pop    %esi
   113d7:	5f                   	pop    %edi
   113d8:	5d                   	pop    %ebp
   113d9:	c2 08 00             	ret    $0x8
   113dc:	8d 74 26 00          	lea    0x0(%esi),%esi
   113e0:	83 ec 0c             	sub    $0xc,%esp
   113e3:	6a 60                	push   $0x60
   113e5:	e8 96 0a 00 00       	call   11e80 <_READ_PORT_UCHAR@4>
   113ea:	83 c4 0c             	add    $0xc,%esp
   113ed:	88 45 f2             	mov    %al,0xfffffff2(%ebp)
   113f0:	8b 46 04             	mov    0x4(%esi),%eax
   113f3:	85 c0                	test   %eax,%eax
   113f5:	0f 85 97 00 00 00    	jne    11492 <_KeyboardHandler@8+0xe2>
   113fb:	8a 55 f2             	mov    0xfffffff2(%ebp),%dl
   113fe:	8d 42 20             	lea    0x20(%edx),%eax
   11401:	3c 01                	cmp    $0x1,%al
   11403:	76 71                	jbe    11476 <_KeyboardHandler@8+0xc6>
   11405:	0f be c2             	movsbl %dl,%eax
   11408:	83 f0 ff             	xor    $0xffffffff,%eax
   1140b:	c1 e8 1f             	shr    $0x1f,%eax
   1140e:	89 45 ec             	mov    %eax,0xffffffec(%ebp)
   11411:	88 d0                	mov    %dl,%al
   11413:	83 e0 7f             	and    $0x7f,%eax
   11416:	3c 2a                	cmp    $0x2a,%al
   11418:	88 45 f2             	mov    %al,0xfffffff2(%ebp)
   1141b:	0f 94 c2             	sete   %dl
   1141e:	89 c6                	mov    %eax,%esi
   11420:	3c 36                	cmp    $0x36,%al
   11422:	0f 94 c0             	sete   %al
   11425:	09 d0                	or     %edx,%eax
   11427:	8b 15 70 42 01 00    	mov    0x14270,%edx
   1142d:	83 e0 01             	and    $0x1,%eax
   11430:	85 c2                	test   %eax,%edx
   11432:	0f 85 8e 00 00 00    	jne    114c6 <_KeyboardHandler@8+0x116>
   11438:	85 d2                	test   %edx,%edx
   1143a:	74 20                	je     1145c <_KeyboardHandler@8+0xac>
   1143c:	a0 30 40 01 00       	mov    0x14030,%al
   11441:	3c e1                	cmp    $0xe1,%al
   11443:	0f 84 27 04 00 00    	je     11870 <_KeyboardHandler@8+0x4c0>
   11449:	fe c0                	inc    %al
   1144b:	75 0f                	jne    1145c <_KeyboardHandler@8+0xac>
   1144d:	89 f0                	mov    %esi,%eax
   1144f:	3c 45                	cmp    $0x45,%al
   11451:	75 73                	jne    114c6 <_KeyboardHandler@8+0x116>
   11453:	c6 45 f2 7f          	movb   $0x7f,0xfffffff2(%ebp)
   11457:	be 7f 00 00 00       	mov    $0x7f,%esi
   1145c:	89 f0                	mov    %esi,%eax
   1145e:	25 ff 00 00 00       	and    $0xff,%eax
   11463:	83 e8 1d             	sub    $0x1d,%eax
   11466:	83 f8 29             	cmp    $0x29,%eax
   11469:	0f 87 b8 00 00 00    	ja     11527 <_KeyboardHandler@8+0x177>
   1146f:	ff 24 85 a0 31 01 00 	jmp    *0x131a0(,%eax,4)
   11476:	c7 05 70 42 01 00 01 	movl   $0x1,0x14270
   1147d:	00 00 00 
   11480:	88 15 30 40 01 00    	mov    %dl,0x14030
   11486:	31 c0                	xor    %eax,%eax
   11488:	8d 65 f4             	lea    0xfffffff4(%ebp),%esp
   1148b:	5b                   	pop    %ebx
   1148c:	5e                   	pop    %esi
   1148d:	5f                   	pop    %edi
   1148e:	5d                   	pop    %ebp
   1148f:	c2 08 00             	ret    $0x8
   11492:	8d 45 f3             	lea    0xfffffff3(%ebp),%eax
   11495:	c6 45 f3 00          	movb   $0x0,0xfffffff3(%ebp)
   11499:	57                   	push   %edi
   1149a:	6a 00                	push   $0x0
   1149c:	50                   	push   %eax
   1149d:	8d 45 f2             	lea    0xfffffff2(%ebp),%eax
   114a0:	50                   	push   %eax
   114a1:	31 c0                	xor    %eax,%eax
   114a3:	88 d8                	mov    %bl,%al
   114a5:	50                   	push   %eax
   114a6:	6a 00                	push   $0x0
   114a8:	6a 00                	push   $0x0
   114aa:	8b 4d 0c             	mov    0xc(%ebp),%ecx
   114ad:	51                   	push   %ecx
   114ae:	ff 56 04             	call   *0x4(%esi)
   114b1:	80 7d f3 00          	cmpb   $0x0,0xfffffff3(%ebp)
   114b5:	5a                   	pop    %edx
   114b6:	0f 85 3f ff ff ff    	jne    113fb <_KeyboardHandler@8+0x4b>
   114bc:	25 ff 00 00 00       	and    $0xff,%eax
   114c1:	e9 0c ff ff ff       	jmp    113d2 <_KeyboardHandler@8+0x22>
   114c6:	31 c0                	xor    %eax,%eax
   114c8:	c7 05 70 42 01 00 00 	movl   $0x0,0x14270
   114cf:	00 00 00 
   114d2:	eb b4                	jmp    11488 <_KeyboardHandler@8+0xd8>
   114d4:	8b 15 c0 42 01 00    	mov    0x142c0,%edx
   114da:	f6 c2 0c             	test   $0xc,%dl
   114dd:	75 48                	jne    11527 <_KeyboardHandler@8+0x177>
   114df:	8b 45 ec             	mov    0xffffffec(%ebp),%eax
   114e2:	85 c0                	test   %eax,%eax
   114e4:	0f 84 0c 04 00 00    	je     118f6 <_KeyboardHandler@8+0x546>
   114ea:	80 3d b0 42 01 00 00 	cmpb   $0x0,0x142b0
   114f1:	75 34                	jne    11527 <_KeyboardHandler@8+0x177>
   114f3:	c6 05 b0 42 01 00 01 	movb   $0x1,0x142b0
   114fa:	f6 c2 40             	test   $0x40,%dl
   114fd:	0f 84 47 04 00 00    	je     1194a <_KeyboardHandler@8+0x59a>
   11503:	a0 80 42 01 00       	mov    0x14280,%al
   11508:	83 e2 bf             	and    $0xffffffbf,%edx
   1150b:	83 e0 fe             	and    $0xfffffffe,%eax
   1150e:	a2 80 42 01 00       	mov    %al,0x14280
   11513:	25 ff 00 00 00       	and    $0xff,%eax
   11518:	89 15 c0 42 01 00    	mov    %edx,0x142c0
   1151e:	e8 6d fb ff ff       	call   11090 <_SetKeyboardLEDs>
   11523:	0f b6 75 f2          	movzbl 0xfffffff2(%ebp),%esi
   11527:	89 f0                	mov    %esi,%eax
   11529:	25 ff 00 00 00       	and    $0xff,%eax
   1152e:	e8 4d fd ff ff       	call   11280 <_ScanToVirtual>
   11533:	66 83 f8 09          	cmp    $0x9,%ax
   11537:	0f 84 9f 02 00 00    	je     117dc <_KeyboardHandler@8+0x42c>
   1153d:	89 f0                	mov    %esi,%eax
   1153f:	25 ff 00 00 00       	and    $0xff,%eax
   11544:	e8 37 fd ff ff       	call   11280 <_ScanToVirtual>
   11549:	66 83 f8 09          	cmp    $0x9,%ax
   1154d:	0f 84 a0 02 00 00    	je     117f3 <_KeyboardHandler@8+0x443>
   11553:	80 3d 10 40 01 00 01 	cmpb   $0x1,0x14010
   1155a:	0f 84 b3 02 00 00    	je     11813 <_KeyboardHandler@8+0x463>
   11560:	a1 00 43 01 00       	mov    0x14300,%eax
   11565:	85 c0                	test   %eax,%eax
   11567:	0f 84 c4 01 00 00    	je     11731 <_KeyboardHandler@8+0x381>
   1156d:	8b 35 10 43 01 00    	mov    0x14310,%esi
   11573:	8b 78 0c             	mov    0xc(%eax),%edi
   11576:	c1 e6 04             	shl    $0x4,%esi
   11579:	8b 45 ec             	mov    0xffffffec(%ebp),%eax
   1157c:	8a 5d f2             	mov    0xfffffff2(%ebp),%bl
   1157f:	89 04 3e             	mov    %eax,(%esi,%edi,1)
   11582:	31 c0                	xor    %eax,%eax
   11584:	88 d8                	mov    %bl,%al
   11586:	66 c7 44 3e 04 01 00 	movw   $0x1,0x4(%esi,%edi,1)
   1158d:	e8 ee fc ff ff       	call   11280 <_ScanToVirtual>
   11592:	81 e3 ff 00 00 00    	and    $0xff,%ebx
   11598:	8b 55 ec             	mov    0xffffffec(%ebp),%edx
   1159b:	66 89 5c 3e 08       	mov    %bx,0x8(%esi,%edi,1)
   115a0:	66 89 44 3e 06       	mov    %ax,0x6(%esi,%edi,1)
   115a5:	66 8b 47 06          	mov    0x6(%edi),%ax
   115a9:	25 ff ff 00 00       	and    $0xffff,%eax
   115ae:	e8 1d fb ff ff       	call   110d0 <_VirtualToAscii>
   115b3:	88 44 3e 0a          	mov    %al,0xa(%esi,%edi,1)
   115b7:	a1 10 43 01 00       	mov    0x14310,%eax
   115bc:	8b 0d 70 42 01 00    	mov    0x14270,%ecx
   115c2:	c1 e0 04             	shl    $0x4,%eax
   115c5:	8b 15 c0 42 01 00    	mov    0x142c0,%edx
   115cb:	85 c9                	test   %ecx,%ecx
   115cd:	0f 84 37 02 00 00    	je     1180a <_KeyboardHandler@8+0x45a>
   115d3:	80 ce 01             	or     $0x1,%dh
   115d6:	c7 05 70 42 01 00 00 	movl   $0x0,0x14270
   115dd:	00 00 00 
   115e0:	89 54 38 0c          	mov    %edx,0xc(%eax,%edi,1)
   115e4:	a1 10 43 01 00       	mov    0x14310,%eax
   115e9:	40                   	inc    %eax
   115ea:	a3 10 43 01 00       	mov    %eax,0x14310
   115ef:	3b 05 20 43 01 00    	cmp    0x14320,%eax
   115f5:	74 0a                	je     11601 <_KeyboardHandler@8+0x251>
   115f7:	b8 01 00 00 00       	mov    $0x1,%eax
   115fc:	e9 d1 fd ff ff       	jmp    113d2 <_KeyboardHandler@8+0x22>
   11601:	50                   	push   %eax
   11602:	a1 00 43 01 00       	mov    0x14300,%eax
   11607:	50                   	push   %eax
   11608:	8b 45 0c             	mov    0xc(%ebp),%eax
   1160b:	50                   	push   %eax
   1160c:	68 e0 42 01 00       	push   $0x142e0
   11611:	e8 ca 07 00 00       	call   11de0 <_KeInsertQueueDpc@12>
   11616:	c7 05 00 43 01 00 00 	movl   $0x0,0x14300
   1161d:	00 00 00 
   11620:	5f                   	pop    %edi
   11621:	b8 01 00 00 00       	mov    $0x1,%eax
   11626:	e9 a7 fd ff ff       	jmp    113d2 <_KeyboardHandler@8+0x22>
   1162b:	8b 15 c0 42 01 00    	mov    0x142c0,%edx
   11631:	f6 c2 0c             	test   $0xc,%dl
   11634:	0f 85 ed fe ff ff    	jne    11527 <_KeyboardHandler@8+0x177>
   1163a:	8b 45 ec             	mov    0xffffffec(%ebp),%eax
   1163d:	85 c0                	test   %eax,%eax
   1163f:	0f 84 bd 02 00 00    	je     11902 <_KeyboardHandler@8+0x552>
   11645:	80 3d a0 42 01 00 00 	cmpb   $0x0,0x142a0
   1164c:	0f 85 d5 fe ff ff    	jne    11527 <_KeyboardHandler@8+0x177>
   11652:	c6 05 a0 42 01 00 01 	movb   $0x1,0x142a0
   11659:	f6 c2 20             	test   $0x20,%dl
   1165c:	0f 84 fd 02 00 00    	je     1195f <_KeyboardHandler@8+0x5af>
   11662:	a0 80 42 01 00       	mov    0x14280,%al
   11667:	83 e2 df             	and    $0xffffffdf,%edx
   1166a:	83 e0 fd             	and    $0xfffffffd,%eax
   1166d:	a2 80 42 01 00       	mov    %al,0x14280
   11672:	e9 9c fe ff ff       	jmp    11513 <_KeyboardHandler@8+0x163>
   11677:	8b 15 c0 42 01 00    	mov    0x142c0,%edx
   1167d:	f6 c2 0c             	test   $0xc,%dl
   11680:	0f 85 a1 fe ff ff    	jne    11527 <_KeyboardHandler@8+0x177>
   11686:	8b 45 ec             	mov    0xffffffec(%ebp),%eax
   11689:	85 c0                	test   %eax,%eax
   1168b:	0f 84 7d 02 00 00    	je     1190e <_KeyboardHandler@8+0x55e>
   11691:	80 3d 90 42 01 00 00 	cmpb   $0x0,0x14290
   11698:	0f 85 89 fe ff ff    	jne    11527 <_KeyboardHandler@8+0x177>
   1169e:	c6 05 90 42 01 00 01 	movb   $0x1,0x14290
   116a5:	f7 c2 80 00 00 00    	test   $0x80,%edx
   116ab:	0f 84 84 02 00 00    	je     11935 <_KeyboardHandler@8+0x585>
   116b1:	a0 80 42 01 00       	mov    0x14280,%al
   116b6:	80 e2 7f             	and    $0x7f,%dl
   116b9:	83 e0 fb             	and    $0xfffffffb,%eax
   116bc:	a2 80 42 01 00       	mov    %al,0x14280
   116c1:	e9 4d fe ff ff       	jmp    11513 <_KeyboardHandler@8+0x163>
   116c6:	85 d2                	test   %edx,%edx
   116c8:	0f 84 ec 01 00 00    	je     118ba <_KeyboardHandler@8+0x50a>
   116ce:	8b 45 ec             	mov    0xffffffec(%ebp),%eax
   116d1:	85 c0                	test   %eax,%eax
   116d3:	0f 84 41 02 00 00    	je     1191a <_KeyboardHandler@8+0x56a>
   116d9:	8b 3d c0 42 01 00    	mov    0x142c0,%edi
   116df:	83 cf 01             	or     $0x1,%edi
   116e2:	89 3d c0 42 01 00    	mov    %edi,0x142c0
   116e8:	e9 3a fe ff ff       	jmp    11527 <_KeyboardHandler@8+0x177>
   116ed:	8b 45 ec             	mov    0xffffffec(%ebp),%eax
   116f0:	85 c0                	test   %eax,%eax
   116f2:	0f 84 a1 01 00 00    	je     11899 <_KeyboardHandler@8+0x4e9>
   116f8:	a1 c0 42 01 00       	mov    0x142c0,%eax
   116fd:	83 c8 10             	or     $0x10,%eax
   11700:	a3 c0 42 01 00       	mov    %eax,0x142c0
   11705:	e9 1d fe ff ff       	jmp    11527 <_KeyboardHandler@8+0x177>
   1170a:	85 d2                	test   %edx,%edx
   1170c:	0f 84 94 01 00 00    	je     118a6 <_KeyboardHandler@8+0x4f6>
   11712:	8b 7d ec             	mov    0xffffffec(%ebp),%edi
   11715:	85 ff                	test   %edi,%edi
   11717:	0f 84 b8 01 00 00    	je     118d5 <_KeyboardHandler@8+0x525>
   1171d:	8b 1d c0 42 01 00    	mov    0x142c0,%ebx
   11723:	83 cb 04             	or     $0x4,%ebx
   11726:	89 1d c0 42 01 00    	mov    %ebx,0x142c0
   1172c:	e9 f6 fd ff ff       	jmp    11527 <_KeyboardHandler@8+0x177>
   11731:	a1 60 42 01 00       	mov    0x14260,%eax
   11736:	89 45 e8             	mov    %eax,0xffffffe8(%ebp)
   11739:	83 f8 20             	cmp    $0x20,%eax
   1173c:	0f 84 46 01 00 00    	je     11888 <_KeyboardHandler@8+0x4d8>
   11742:	8b 3d 40 42 01 00    	mov    0x14240,%edi
   11748:	8b 45 ec             	mov    0xffffffec(%ebp),%eax
   1174b:	89 fb                	mov    %edi,%ebx
   1174d:	c1 e3 04             	shl    $0x4,%ebx
   11750:	89 83 40 40 01 00    	mov    %eax,0x14040(%ebx)
   11756:	89 f0                	mov    %esi,%eax
   11758:	25 ff 00 00 00       	and    $0xff,%eax
   1175d:	66 c7 83 44 40 01 00 	movw   $0x1,0x14044(%ebx)
   11764:	01 00 
   11766:	e8 15 fb ff ff       	call   11280 <_ScanToVirtual>
   1176b:	89 f2                	mov    %esi,%edx
   1176d:	81 e2 ff 00 00 00    	and    $0xff,%edx
   11773:	66 c7 83 4a 40 01 00 	movw   $0x0,0x1404a(%ebx)
   1177a:	00 00 
   1177c:	66 89 83 46 40 01 00 	mov    %ax,0x14046(%ebx)
   11783:	66 89 93 48 40 01 00 	mov    %dx,0x14048(%ebx)
   1178a:	25 ff ff 00 00       	and    $0xffff,%eax
   1178f:	8b 55 ec             	mov    0xffffffec(%ebp),%edx
   11792:	e8 39 f9 ff ff       	call   110d0 <_VirtualToAscii>
   11797:	8b 35 70 42 01 00    	mov    0x14270,%esi
   1179d:	85 f6                	test   %esi,%esi
   1179f:	88 83 4a 40 01 00    	mov    %al,0x1404a(%ebx)
   117a5:	a1 c0 42 01 00       	mov    0x142c0,%eax
   117aa:	74 03                	je     117af <_KeyboardHandler@8+0x3ff>
   117ac:	80 cc 01             	or     $0x1,%ah
   117af:	89 83 4c 40 01 00    	mov    %eax,0x1404c(%ebx)
   117b5:	8b 45 e8             	mov    0xffffffe8(%ebp),%eax
   117b8:	40                   	inc    %eax
   117b9:	47                   	inc    %edi
   117ba:	83 e7 1f             	and    $0x1f,%edi
   117bd:	a3 60 42 01 00       	mov    %eax,0x14260
   117c2:	b8 01 00 00 00       	mov    $0x1,%eax
   117c7:	89 3d 40 42 01 00    	mov    %edi,0x14240
   117cd:	c7 05 70 42 01 00 00 	movl   $0x0,0x14270
   117d4:	00 00 00 
   117d7:	e9 f6 fb ff ff       	jmp    113d2 <_KeyboardHandler@8+0x22>
   117dc:	8b 45 ec             	mov    0xffffffec(%ebp),%eax
   117df:	85 c0                	test   %eax,%eax
   117e1:	0f 84 56 fd ff ff    	je     1153d <_KeyboardHandler@8+0x18d>
   117e7:	c6 05 10 40 01 00 01 	movb   $0x1,0x14010
   117ee:	e9 6d fd ff ff       	jmp    11560 <_KeyboardHandler@8+0x1b0>
   117f3:	8b 45 ec             	mov    0xffffffec(%ebp),%eax
   117f6:	85 c0                	test   %eax,%eax
   117f8:	0f 85 55 fd ff ff    	jne    11553 <_KeyboardHandler@8+0x1a3>
   117fe:	c6 05 10 40 01 00 00 	movb   $0x0,0x14010
   11805:	e9 56 fd ff ff       	jmp    11560 <_KeyboardHandler@8+0x1b0>
   1180a:	89 54 38 0c          	mov    %edx,0xc(%eax,%edi,1)
   1180e:	e9 d1 fd ff ff       	jmp    115e4 <_KeyboardHandler@8+0x234>
   11813:	89 f0                	mov    %esi,%eax
   11815:	25 ff 00 00 00       	and    $0xff,%eax
   1181a:	e8 61 fa ff ff       	call   11280 <_ScanToVirtual>
   1181f:	66 83 f8 40          	cmp    $0x40,%ax
   11823:	0f 86 37 fd ff ff    	jbe    11560 <_KeyboardHandler@8+0x1b0>
   11829:	66 83 f8 5a          	cmp    $0x5a,%ax
   1182d:	0f 87 2d fd ff ff    	ja     11560 <_KeyboardHandler@8+0x1b0>
   11833:	8b 7d ec             	mov    0xffffffec(%ebp),%edi
   11836:	85 ff                	test   %edi,%edi
   11838:	0f 84 22 fd ff ff    	je     11560 <_KeyboardHandler@8+0x1b0>
   1183e:	89 c2                	mov    %eax,%edx
   11840:	b9 00 20 01 00       	mov    $0x12000,%ecx
   11845:	81 e2 ff ff 00 00    	and    $0xffff,%edx
   1184b:	83 ea 41             	sub    $0x41,%edx
   1184e:	e8 3d 05 00 00       	call   11d90 <@InterlockedExchange@8>
   11853:	53                   	push   %ebx
   11854:	6a 00                	push   $0x0
   11856:	6a 00                	push   $0x0
   11858:	68 e0 42 01 00       	push   $0x142e0
   1185d:	e8 7e 05 00 00       	call   11de0 <_KeInsertQueueDpc@12>
   11862:	b8 01 00 00 00       	mov    $0x1,%eax
   11867:	e9 66 fb ff ff       	jmp    113d2 <_KeyboardHandler@8+0x22>
   1186c:	8d 74 26 00          	lea    0x0(%esi),%esi
   11870:	89 f0                	mov    %esi,%eax
   11872:	3c 1d                	cmp    $0x1d,%al
   11874:	0f 85 4c fc ff ff    	jne    114c6 <_KeyboardHandler@8+0x116>
   1187a:	31 c0                	xor    %eax,%eax
   1187c:	c6 05 30 40 01 00 ff 	movb   $0xff,0x14030
   11883:	e9 00 fc ff ff       	jmp    11488 <_KeyboardHandler@8+0xd8>
   11888:	b0 01                	mov    $0x1,%al
   1188a:	c7 05 70 42 01 00 00 	movl   $0x0,0x14270
   11891:	00 00 00 
   11894:	e9 39 fb ff ff       	jmp    113d2 <_KeyboardHandler@8+0x22>
   11899:	a1 c0 42 01 00       	mov    0x142c0,%eax
   1189e:	83 e0 ef             	and    $0xffffffef,%eax
   118a1:	e9 5a fe ff ff       	jmp    11700 <_KeyboardHandler@8+0x350>
   118a6:	8b 55 ec             	mov    0xffffffec(%ebp),%edx
   118a9:	85 d2                	test   %edx,%edx
   118ab:	74 7b                	je     11928 <_KeyboardHandler@8+0x578>
   118ad:	a1 c0 42 01 00       	mov    0x142c0,%eax
   118b2:	83 c8 08             	or     $0x8,%eax
   118b5:	e9 46 fe ff ff       	jmp    11700 <_KeyboardHandler@8+0x350>
   118ba:	8b 4d ec             	mov    0xffffffec(%ebp),%ecx
   118bd:	85 c9                	test   %ecx,%ecx
   118bf:	74 28                	je     118e9 <_KeyboardHandler@8+0x539>
   118c1:	8b 15 c0 42 01 00    	mov    0x142c0,%edx
   118c7:	83 ca 02             	or     $0x2,%edx
   118ca:	89 15 c0 42 01 00    	mov    %edx,0x142c0
   118d0:	e9 52 fc ff ff       	jmp    11527 <_KeyboardHandler@8+0x177>
   118d5:	8b 0d c0 42 01 00    	mov    0x142c0,%ecx
   118db:	83 e1 fb             	and    $0xfffffffb,%ecx
   118de:	89 0d c0 42 01 00    	mov    %ecx,0x142c0
   118e4:	e9 3e fc ff ff       	jmp    11527 <_KeyboardHandler@8+0x177>
   118e9:	a1 c0 42 01 00       	mov    0x142c0,%eax
   118ee:	83 e0 fd             	and    $0xfffffffd,%eax
   118f1:	e9 0a fe ff ff       	jmp    11700 <_KeyboardHandler@8+0x350>
   118f6:	c6 05 b0 42 01 00 00 	movb   $0x0,0x142b0
   118fd:	e9 25 fc ff ff       	jmp    11527 <_KeyboardHandler@8+0x177>
   11902:	c6 05 a0 42 01 00 00 	movb   $0x0,0x142a0
   11909:	e9 19 fc ff ff       	jmp    11527 <_KeyboardHandler@8+0x177>
   1190e:	c6 05 90 42 01 00 00 	movb   $0x0,0x14290
   11915:	e9 0d fc ff ff       	jmp    11527 <_KeyboardHandler@8+0x177>
   1191a:	8b 1d c0 42 01 00    	mov    0x142c0,%ebx
   11920:	83 e3 fe             	and    $0xfffffffe,%ebx
   11923:	e9 fe fd ff ff       	jmp    11726 <_KeyboardHandler@8+0x376>
   11928:	a1 c0 42 01 00       	mov    0x142c0,%eax
   1192d:	83 e0 f7             	and    $0xfffffff7,%eax
   11930:	e9 cb fd ff ff       	jmp    11700 <_KeyboardHandler@8+0x350>
   11935:	a0 80 42 01 00       	mov    0x14280,%al
   1193a:	80 ca 80             	or     $0x80,%dl
   1193d:	83 c8 04             	or     $0x4,%eax
   11940:	a2 80 42 01 00       	mov    %al,0x14280
   11945:	e9 c9 fb ff ff       	jmp    11513 <_KeyboardHandler@8+0x163>
   1194a:	a0 80 42 01 00       	mov    0x14280,%al
   1194f:	83 ca 40             	or     $0x40,%edx
   11952:	83 c8 01             	or     $0x1,%eax
   11955:	a2 80 42 01 00       	mov    %al,0x14280
   1195a:	e9 b4 fb ff ff       	jmp    11513 <_KeyboardHandler@8+0x163>
   1195f:	a0 80 42 01 00       	mov    0x14280,%al
   11964:	83 ca 20             	or     $0x20,%edx
   11967:	83 c8 02             	or     $0x2,%eax
   1196a:	a2 80 42 01 00       	mov    %al,0x14280
   1196f:	e9 9f fb ff ff       	jmp    11513 <_KeyboardHandler@8+0x163>
   11974:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
   1197a:	8d bf 00 00 00 00    	lea    0x0(%edi),%edi

00011980 <_KbdClearInput>:


//
// Initialize keyboard
//
static void KeyboardConnectInterrupt(PDEVICE_OBJECT DeviceObject)
{
   ULONG MappedIrq;
   KIRQL Dirql;
   KAFFINITY Affinity;
   NTSTATUS Status;
   
   MappedIrq = HalGetInterruptVector(Internal,
				     0,
				     0,
				     KEYBOARD_IRQ,
				     &Dirql,
				     &Affinity);
   Status = IoConnectInterrupt(&KbdInterrupt,
			       KeyboardHandler,
			       (PVOID)DeviceObject,
			       NULL,
			       MappedIrq,
			       Dirql,
			       Dirql,
			       0,
			       FALSE,
			       Affinity,
			       FALSE);
}

VOID
KbdClearInput(VOID)
{
   11980:	55                   	push   %ebp
   11981:	89 e5                	mov    %esp,%ebp
   11983:	53                   	push   %ebx
  ULONG i;
  CHAR Status;

  for (i = 0; i < 100; i++)
   11984:	31 db                	xor    %ebx,%ebx
   11986:	50                   	push   %eax
   11987:	eb 1a                	jmp    119a3 <_KbdClearInput+0x23>
   11989:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi
    {
      Status = READ_PORT_UCHAR((PUCHAR)KBD_CTRL_PORT);
      if (!(Status & KBD_OBF))
	{
	  return;
	}
      (VOID)READ_PORT_UCHAR((PUCHAR)KBD_DATA_PORT);
   11990:	83 ec 0c             	sub    $0xc,%esp
   11993:	43                   	inc    %ebx
   11994:	6a 60                	push   $0x60
   11996:	e8 e5 04 00 00       	call   11e80 <_READ_PORT_UCHAR@4>
   1199b:	83 c4 0c             	add    $0xc,%esp
   1199e:	83 fb 63             	cmp    $0x63,%ebx
   119a1:	77 11                	ja     119b4 <_KbdClearInput+0x34>
   119a3:	83 ec 0c             	sub    $0xc,%esp
   119a6:	6a 64                	push   $0x64
   119a8:	e8 d3 04 00 00       	call   11e80 <_READ_PORT_UCHAR@4>
   119ad:	83 c4 0c             	add    $0xc,%esp
   119b0:	a8 01                	test   $0x1,%al
   119b2:	75 dc                	jne    11990 <_KbdClearInput+0x10>
    }
}
   119b4:	8b 5d fc             	mov    0xfffffffc(%ebp),%ebx
   119b7:	c9                   	leave  
   119b8:	c3                   	ret    
   119b9:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi

000119c0 <_KbdSynchronizeRoutine@4>:

static int InitializeKeyboard(PDEVICE_OBJECT DeviceObject)
{
   // Initialize variables
   bufHead=0;
   bufTail=0;
   keysInBuffer=0;
   ledStatus=0;
   capsDown=0;
   numDown=0;
   scrollDown=0;
   ctrlKeyState=0;
   extKey=0;

   KbdClearInput();
   KeyboardConnectInterrupt(DeviceObject);
   KeInitializeDpc(&KbdDpc,KbdDpcRoutine,NULL);
   KbdWorkItem = IoAllocateWorkItem(DeviceObject);
   if (KbdWorkItem == NULL)
     {
        DPRINT("Warning: Couldn't allocate work item!\n");
     }
   return 0;
}

/*
 * Read data from keyboard buffer
 */
BOOLEAN STDCALL
KbdSynchronizeRoutine(PVOID Context)
{
   119c0:	55                   	push   %ebp
   119c1:	89 e5                	mov    %esp,%ebp
   119c3:	57                   	push   %edi
   119c4:	56                   	push   %esi
   119c5:	53                   	push   %ebx
   119c6:	53                   	push   %ebx
   PIRP Irp = (PIRP)Context;
   KEY_EVENT_RECORD* rec = (KEY_EVENT_RECORD *)Irp->AssociatedIrp.SystemBuffer;
   119c7:	8b 45 08             	mov    0x8(%ebp),%eax
   PIO_STACK_LOCATION stk = IoGetCurrentIrpStackLocation(Irp);
   119ca:	8b 50 60             	mov    0x60(%eax),%edx
   119cd:	8b 58 0c             	mov    0xc(%eax),%ebx
   119d0:	89 55 f0             	mov    %edx,0xfffffff0(%ebp)
   ULONG NrToRead = stk->Parameters.Read.Length/sizeof(KEY_EVENT_RECORD);
   119d3:	8b 42 04             	mov    0x4(%edx),%eax
   int i;

   DPRINT("NrToRead %d keysInBuffer %d\n",NrToRead,keysInBuffer);
   NrToRead = min(NrToRead,keysInBuffer);
   119d6:	8b 15 60 42 01 00    	mov    0x14260,%edx
   119dc:	89 c7                	mov    %eax,%edi
   119de:	c1 ef 04             	shr    $0x4,%edi
   119e1:	39 d7                	cmp    %edx,%edi
   119e3:	76 02                	jbe    119e7 <_KbdSynchronizeRoutine@4+0x27>
   119e5:	89 d7                	mov    %edx,%edi

   DPRINT("NrToRead %d stk->Parameters.Read.Length %d\n",
	  NrToRead,stk->Parameters.Read.Length);
   DPRINT("sizeof(KEY_EVENT_RECORD) %d\n",sizeof(KEY_EVENT_RECORD));
   for (i=0;i<NrToRead;i++)
   119e7:	31 f6                	xor    %esi,%esi
   119e9:	39 fe                	cmp    %edi,%esi
   119eb:	73 5c                	jae    11a49 <_KbdSynchronizeRoutine@4+0x89>
   119ed:	a1 50 42 01 00       	mov    0x14250,%eax
     {
	memcpy(&rec[i],&kbdBuffer[bufTail],sizeof(KEY_EVENT_RECORD));
   119f2:	89 c2                	mov    %eax,%edx
   119f4:	89 f1                	mov    %esi,%ecx
   119f6:	c1 e2 04             	shl    $0x4,%edx
   119f9:	46                   	inc    %esi
   119fa:	c1 e1 04             	shl    $0x4,%ecx
   119fd:	8b 82 40 40 01 00    	mov    0x14040(%edx),%eax
   11a03:	89 04 19             	mov    %eax,(%ecx,%ebx,1)
   11a06:	8b 82 44 40 01 00    	mov    0x14044(%edx),%eax
   11a0c:	89 44 19 04          	mov    %eax,0x4(%ecx,%ebx,1)
   11a10:	8b 82 48 40 01 00    	mov    0x14048(%edx),%eax
   11a16:	89 44 19 08          	mov    %eax,0x8(%ecx,%ebx,1)
   11a1a:	8b 82 4c 40 01 00    	mov    0x1404c(%edx),%eax
   11a20:	89 44 19 0c          	mov    %eax,0xc(%ecx,%ebx,1)
	bufTail++;
   11a24:	a1 50 42 01 00       	mov    0x14250,%eax
	bufTail&=KBD_WRAP_MASK;
	keysInBuffer--;
   11a29:	8b 0d 60 42 01 00    	mov    0x14260,%ecx
   11a2f:	40                   	inc    %eax
   11a30:	49                   	dec    %ecx
   11a31:	83 e0 1f             	and    $0x1f,%eax
   11a34:	89 0d 60 42 01 00    	mov    %ecx,0x14260
   11a3a:	a3 50 42 01 00       	mov    %eax,0x14250
   11a3f:	39 fe                	cmp    %edi,%esi
   11a41:	72 af                	jb     119f2 <_KbdSynchronizeRoutine@4+0x32>
   11a43:	8b 55 f0             	mov    0xfffffff0(%ebp),%edx
   11a46:	8b 42 04             	mov    0x4(%edx),%eax
    }
   if ((stk->Parameters.Read.Length/sizeof(KEY_EVENT_RECORD))==NrToRead)
   11a49:	89 c2                	mov    %eax,%edx
     {
	return(TRUE);
   11a4b:	b8 01 00 00 00       	mov    $0x1,%eax
   11a50:	c1 ea 04             	shr    $0x4,%edx
   11a53:	39 fa                	cmp    %edi,%edx
   11a55:	74 16                	je     11a6d <_KbdSynchronizeRoutine@4+0xad>
     }

   KeysRequired=stk->Parameters.Read.Length/sizeof(KEY_EVENT_RECORD);
   KeysRead=NrToRead;
   CurrentIrp=Irp;
   11a57:	8b 45 08             	mov    0x8(%ebp),%eax
   11a5a:	89 15 20 43 01 00    	mov    %edx,0x14320
   11a60:	a3 00 43 01 00       	mov    %eax,0x14300
   11a65:	89 3d 10 43 01 00    	mov    %edi,0x14310

   return(FALSE);
   11a6b:	31 c0                	xor    %eax,%eax
}
   11a6d:	5a                   	pop    %edx
   11a6e:	5b                   	pop    %ebx
   11a6f:	5e                   	pop    %esi
   11a70:	5f                   	pop    %edi
   11a71:	5d                   	pop    %ebp
   11a72:	c2 04 00             	ret    $0x4
   11a75:	8d 74 26 00          	lea    0x0(%esi),%esi
   11a79:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

00011a80 <_KbdStartIo@8>:

VOID STDCALL KbdStartIo(PDEVICE_OBJECT DeviceObject, PIRP Irp)
{
   11a80:	55                   	push   %ebp
   11a81:	89 e5                	mov    %esp,%ebp
   11a83:	56                   	push   %esi
   11a84:	53                   	push   %ebx
   11a85:	83 ec 14             	sub    $0x14,%esp
   11a88:	8b 5d 0c             	mov    0xc(%ebp),%ebx
   11a8b:	8b 75 08             	mov    0x8(%ebp),%esi
#ifndef NDEBUG
   PIO_STACK_LOCATION stk = IoGetCurrentIrpStackLocation(Irp);
#endif

   DPRINT("KeyboardStartIo(DeviceObject %x Irp %x)\n",DeviceObject,Irp);
   
   if (KeSynchronizeExecution(KbdInterrupt, KbdSynchronizeRoutine, Irp))
   11a8e:	53                   	push   %ebx
   11a8f:	68 c0 19 01 00       	push   $0x119c0
   11a94:	8b 0d d0 42 01 00    	mov    0x142d0,%ecx
   11a9a:	51                   	push   %ecx
   11a9b:	e8 50 03 00 00       	call   11df0 <_KeSynchronizeExecution@12>
   11aa0:	5a                   	pop    %edx
   11aa1:	84 c0                	test   %al,%al
   11aa3:	75 0b                	jne    11ab0 <_KbdStartIo@8+0x30>
     {
        KIRQL oldIrql;
	Irp->IoStatus.Status = STATUS_SUCCESS;
	Irp->IoStatus.Information = 0;
	IoCompleteRequest(Irp, IO_NO_INCREMENT);
	oldIrql = KeGetCurrentIrql();
        if (oldIrql < DISPATCH_LEVEL)
          {
            KeRaiseIrql (DISPATCH_LEVEL, &oldIrql);
            IoStartNextPacket (DeviceObject, FALSE);
            KeLowerIrql(oldIrql);
	  }
        else
          {
            IoStartNextPacket (DeviceObject, FALSE);
	  }
     }
   
   DPRINT("stk->Parameters.Read.Length %d\n",stk->Parameters.Read.Length);
   DPRINT("KeysRequired %d\n",KeysRequired);     
}
   11aa5:	8d 65 f8             	lea    0xfffffff8(%ebp),%esp
   11aa8:	5b                   	pop    %ebx
   11aa9:	5e                   	pop    %esi
   11aaa:	5d                   	pop    %ebp
   11aab:	c2 08 00             	ret    $0x8
   11aae:	89 f6                	mov    %esi,%esi
   11ab0:	c7 43 18 00 00 00 00 	movl   $0x0,0x18(%ebx)
   11ab7:	c7 43 1c 00 00 00 00 	movl   $0x0,0x1c(%ebx)
   11abe:	51                   	push   %ecx
   11abf:	51                   	push   %ecx
   11ac0:	6a 00                	push   $0x0
   11ac2:	53                   	push   %ebx
   11ac3:	e8 e8 02 00 00       	call   11db0 <_IoCompleteRequest@8>
   11ac8:	58                   	pop    %eax
   11ac9:	5a                   	pop    %edx
   11aca:	e8 d1 03 00 00       	call   11ea0 <_KeGetCurrentIrql@0>
   11acf:	3c 01                	cmp    $0x1,%al
   11ad1:	88 45 f7             	mov    %al,0xfffffff7(%ebp)
   11ad4:	77 2d                	ja     11b03 <_KbdStartIo@8+0x83>
   11ad6:	50                   	push   %eax
   11ad7:	50                   	push   %eax
   11ad8:	8d 45 f7             	lea    0xfffffff7(%ebp),%eax
   11adb:	50                   	push   %eax
   11adc:	6a 02                	push   $0x2
   11ade:	e8 cd 03 00 00       	call   11eb0 <_KeRaiseIrql@8>
   11ae3:	6a 00                	push   $0x0
   11ae5:	56                   	push   %esi
   11ae6:	e8 d5 02 00 00       	call   11dc0 <_IoStartNextPacket@8>
   11aeb:	50                   	push   %eax
   11aec:	31 c0                	xor    %eax,%eax
   11aee:	8a 45 f7             	mov    0xfffffff7(%ebp),%al
   11af1:	50                   	push   %eax
   11af2:	e8 c9 03 00 00       	call   11ec0 <_KeLowerIrql@4>
   11af7:	83 c4 0c             	add    $0xc,%esp
   11afa:	8d 65 f8             	lea    0xfffffff8(%ebp),%esp
   11afd:	5b                   	pop    %ebx
   11afe:	5e                   	pop    %esi
   11aff:	5d                   	pop    %ebp
   11b00:	c2 08 00             	ret    $0x8
   11b03:	50                   	push   %eax
   11b04:	50                   	push   %eax
   11b05:	6a 00                	push   $0x0
   11b07:	56                   	push   %esi
   11b08:	e8 b3 02 00 00       	call   11dc0 <_IoStartNextPacket@8>
   11b0d:	5e                   	pop    %esi
   11b0e:	58                   	pop    %eax
   11b0f:	8d 65 f8             	lea    0xfffffff8(%ebp),%esp
   11b12:	5b                   	pop    %ebx
   11b13:	5e                   	pop    %esi
   11b14:	5d                   	pop    %ebp
   11b15:	c2 08 00             	ret    $0x8
   11b18:	90                   	nop    
   11b19:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi

00011b20 <_KbdInternalDeviceControl@8>:

NTSTATUS STDCALL KbdInternalDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp)
{
   11b20:	55                   	push   %ebp
   11b21:	89 e5                	mov    %esp,%ebp
   11b23:	57                   	push   %edi
   11b24:	56                   	push   %esi
   11b25:	53                   	push   %ebx
   11b26:	83 ec 0c             	sub    $0xc,%esp
    PIO_STACK_LOCATION                  stk;
	PINTERNAL_I8042_HOOK_KEYBOARD      	hookKeyboard;
    PDEVICE_EXTENSION					DevExt = (PDEVICE_EXTENSION) DeviceObject->DeviceExtension;
	NTSTATUS                    		status = STATUS_INVALID_DEVICE_REQUEST;
   11b29:	bb 10 00 00 c0       	mov    $0xc0000010,%ebx
   11b2e:	8b 75 0c             	mov    0xc(%ebp),%esi
   11b31:	8b 45 08             	mov    0x8(%ebp),%eax
   11b34:	8b 78 28             	mov    0x28(%eax),%edi

	Irp->IoStatus.Information = 0;
    stk = IoGetCurrentIrpStackLocation(Irp);
   11b37:	8b 46 60             	mov    0x60(%esi),%eax
   11b3a:	c7 46 1c 00 00 00 00 	movl   $0x0,0x1c(%esi)
    
	switch (stk->Parameters.DeviceIoControl.IoControlCode) 
   11b41:	81 78 0c c3 3f 0b 00 	cmpl   $0xb3fc3,0xc(%eax)
   11b48:	74 19                	je     11b63 <_KbdInternalDeviceControl@8+0x43>
	{
		/*-----------------11/29/2001 4:12PM----------------
		 * This internal ioctrl belongs in i8042 driver. Should be
		 * moved to the appropriate driver later.
		 * --------------------------------------------------*/
    	case IOCTL_INTERNAL_I8042_HOOK_KEYBOARD:
        	
			if (stk->Parameters.DeviceIoControl.InputBufferLength < sizeof(INTERNAL_I8042_HOOK_KEYBOARD)) 
			{
				DPRINT(("Keyboard IOCTL_INTERNAL_I8042_HOOK_KEYBOARD invalid buffer size\n"));
            	status = STATUS_INVALID_PARAMETER;
        	}
        	else {
            	//
            	// Copy the values if they are filled in
            	//
            	hookKeyboard = (PINTERNAL_I8042_HOOK_KEYBOARD)
                	stk->Parameters.DeviceIoControl.Type3InputBuffer;

            	DevExt->HookContext = hookKeyboard->Context;
            	if (hookKeyboard->InitializationRoutine) {
					DbgPrint("Keyboard: InitializationHookCallback NOT IMPLEMENTED\n");
                	DevExt->InitializationHookCallback =
                    	hookKeyboard->InitializationRoutine;
            	}
    
            	if (hookKeyboard->IsrRoutine) {
                	DevExt->IsrHookCallback = hookKeyboard->IsrRoutine;
            	}
    
            	status = STATUS_SUCCESS;
        	}
        	break;
		default:
        	status = STATUS_INVALID_DEVICE_REQUEST;
			break;
	}
    
	Irp->IoStatus.Status = status;
   11b4a:	89 5e 18             	mov    %ebx,0x18(%esi)
    IoCompleteRequest(Irp, IO_NO_INCREMENT);
   11b4d:	57                   	push   %edi
   11b4e:	57                   	push   %edi
   11b4f:	6a 00                	push   $0x0
   11b51:	56                   	push   %esi
   11b52:	e8 59 02 00 00       	call   11db0 <_IoCompleteRequest@8>
	return status;
}			   
   11b57:	8d 65 f4             	lea    0xfffffff4(%ebp),%esp
   11b5a:	89 d8                	mov    %ebx,%eax
   11b5c:	5b                   	pop    %ebx
   11b5d:	5e                   	pop    %esi
   11b5e:	5f                   	pop    %edi
   11b5f:	5d                   	pop    %ebp
   11b60:	c2 08 00             	ret    $0x8
   11b63:	b3 0d                	mov    $0xd,%bl
   11b65:	83 78 08 0b          	cmpl   $0xb,0x8(%eax)
   11b69:	76 df                	jbe    11b4a <_KbdInternalDeviceControl@8+0x2a>
   11b6b:	8b 58 10             	mov    0x10(%eax),%ebx
   11b6e:	8b 03                	mov    (%ebx),%eax
   11b70:	89 47 08             	mov    %eax,0x8(%edi)
   11b73:	8b 43 04             	mov    0x4(%ebx),%eax
   11b76:	85 c0                	test   %eax,%eax
   11b78:	75 25                	jne    11b9f <_KbdInternalDeviceControl@8+0x7f>
   11b7a:	8b 43 08             	mov    0x8(%ebx),%eax
   11b7d:	85 c0                	test   %eax,%eax
   11b7f:	74 03                	je     11b84 <_KbdInternalDeviceControl@8+0x64>
   11b81:	89 47 04             	mov    %eax,0x4(%edi)
   11b84:	31 db                	xor    %ebx,%ebx
   11b86:	89 5e 18             	mov    %ebx,0x18(%esi)
   11b89:	57                   	push   %edi
   11b8a:	57                   	push   %edi
   11b8b:	6a 00                	push   $0x0
   11b8d:	56                   	push   %esi
   11b8e:	e8 1d 02 00 00       	call   11db0 <_IoCompleteRequest@8>
   11b93:	8d 65 f4             	lea    0xfffffff4(%ebp),%esp
   11b96:	89 d8                	mov    %ebx,%eax
   11b98:	5b                   	pop    %ebx
   11b99:	5e                   	pop    %esi
   11b9a:	5f                   	pop    %edi
   11b9b:	5d                   	pop    %ebp
   11b9c:	c2 08 00             	ret    $0x8
   11b9f:	83 ec 0c             	sub    $0xc,%esp
   11ba2:	68 48 32 01 00       	push   $0x13248
   11ba7:	e8 c4 02 00 00       	call   11e70 <_DbgPrint>
   11bac:	8b 43 04             	mov    0x4(%ebx),%eax
   11baf:	83 c4 10             	add    $0x10,%esp
   11bb2:	89 07                	mov    %eax,(%edi)
   11bb4:	eb c4                	jmp    11b7a <_KbdInternalDeviceControl@8+0x5a>
   11bb6:	8d 76 00             	lea    0x0(%esi),%esi
   11bb9:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

00011bc0 <_KbdDispatch@8>:

NTSTATUS STDCALL KbdDispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp)
{
   11bc0:	55                   	push   %ebp
   11bc1:	89 e5                	mov    %esp,%ebp
   11bc3:	53                   	push   %ebx
   11bc4:	50                   	push   %eax
   PIO_STACK_LOCATION stk = IoGetCurrentIrpStackLocation(Irp);
   NTSTATUS Status;

   DPRINT("DeviceObject %x\n",DeviceObject);
   DPRINT("Irp %x\n",Irp);
   
   DPRINT("IRP_MJ_CREATE %d stk->MajorFunction %d\n",
	  IRP_MJ_CREATE, stk->MajorFunction);
   DPRINT("AlreadyOpened %d\n",AlreadyOpened);
   
   switch (stk->MajorFunction)
   11bc5:	31 c0                	xor    %eax,%eax
   11bc7:	8b 4d 0c             	mov    0xc(%ebp),%ecx
   11bca:	8b 51 60             	mov    0x60(%ecx),%edx
   11bcd:	8a 02                	mov    (%edx),%al
   11bcf:	83 f8 02             	cmp    $0x2,%eax
   11bd2:	74 4c                	je     11c20 <_KbdDispatch@8+0x60>
   11bd4:	7f 2a                	jg     11c00 <_KbdDispatch@8+0x40>
   11bd6:	85 c0                	test   %eax,%eax
   11bd8:	74 4a                	je     11c24 <_KbdDispatch@8+0x64>
     {
      case IRP_MJ_CREATE:
	if (AlreadyOpened == TRUE)
	  {
	     CHECKPOINT;
//	     Status = STATUS_UNSUCCESSFUL;
	     Status = STATUS_SUCCESS;
	  }
	else
	  {
	     CHECKPOINT;
	     Status = STATUS_SUCCESS;
	     AlreadyOpened = TRUE;
	  }
	break;
	
      case IRP_MJ_CLOSE:
        Status = STATUS_SUCCESS;
	break;

      case IRP_MJ_READ:
        DPRINT("Handling Read request\n");
	DPRINT("Queueing packet\n");
	IoMarkIrpPending(Irp);
	IoStartPacket(DeviceObject,Irp,NULL,NULL);
	return(STATUS_PENDING);

      default:
        Status = STATUS_NOT_IMPLEMENTED;
   11bda:	bb 02 00 00 c0       	mov    $0xc0000002,%ebx
	break;
     }

   Irp->IoStatus.Status = Status;
   11bdf:	89 59 18             	mov    %ebx,0x18(%ecx)
   Irp->IoStatus.Information = 0;
   11be2:	c7 41 1c 00 00 00 00 	movl   $0x0,0x1c(%ecx)
   IoCompleteRequest(Irp,IO_NO_INCREMENT);
   11be9:	50                   	push   %eax
   11bea:	50                   	push   %eax
   11beb:	6a 00                	push   $0x0
   11bed:	51                   	push   %ecx
   11bee:	e8 bd 01 00 00       	call   11db0 <_IoCompleteRequest@8>
   DPRINT("Status %d\n",Status);
   return(Status);
   11bf3:	89 d8                	mov    %ebx,%eax
}
   11bf5:	8b 5d fc             	mov    0xfffffffc(%ebp),%ebx
   11bf8:	c9                   	leave  
   11bf9:	c2 08 00             	ret    $0x8
   11bfc:	8d 74 26 00          	lea    0x0(%esi),%esi
   11c00:	83 f8 03             	cmp    $0x3,%eax
   11c03:	75 d5                	jne    11bda <_KbdDispatch@8+0x1a>
   11c05:	80 4a 03 01          	orb    $0x1,0x3(%edx)
   11c09:	8b 45 08             	mov    0x8(%ebp),%eax
   11c0c:	6a 00                	push   $0x0
   11c0e:	6a 00                	push   $0x0
   11c10:	51                   	push   %ecx
   11c11:	50                   	push   %eax
   11c12:	e8 e9 01 00 00       	call   11e00 <_IoStartPacket@16>
   11c17:	b8 03 01 00 00       	mov    $0x103,%eax
   11c1c:	eb d7                	jmp    11bf5 <_KbdDispatch@8+0x35>
   11c1e:	89 f6                	mov    %esi,%esi
   11c20:	31 db                	xor    %ebx,%ebx
   11c22:	eb bb                	jmp    11bdf <_KbdDispatch@8+0x1f>
   11c24:	31 db                	xor    %ebx,%ebx
   11c26:	80 3d 20 40 01 00 01 	cmpb   $0x1,0x14020
   11c2d:	74 b0                	je     11bdf <_KbdDispatch@8+0x1f>
   11c2f:	c6 05 20 40 01 00 01 	movb   $0x1,0x14020
   11c36:	eb a7                	jmp    11bdf <_KbdDispatch@8+0x1f>
   11c38:	90                   	nop    
   11c39:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi

00011c40 <_DriverEntry@8>:

NTSTATUS STDCALL DriverEntry(PDRIVER_OBJECT DriverObject, 
			     PUNICODE_STRING RegistryPath)
/*
 * FUNCTION: Module entry point
 */
{
   11c40:	55                   	push   %ebp
   11c41:	89 e5                	mov    %esp,%ebp
   11c43:	56                   	push   %esi
   11c44:	53                   	push   %ebx
   11c45:	83 ec 24             	sub    $0x24,%esp
   PDEVICE_OBJECT DeviceObject;
   UNICODE_STRING DeviceName = ROS_STRING_INITIALIZER(L"\\Device\\Keyboard");
   11c48:	8d 75 f0             	lea    0xfffffff0(%ebp),%esi
   11c4b:	8b 55 08             	mov    0x8(%ebp),%edx
   UNICODE_STRING SymlinkName = ROS_STRING_INITIALIZER(L"\\??\\Keyboard");
   
   DPRINT("Keyboard Driver 0.0.4\n");

   DriverObject->MajorFunction[IRP_MJ_CREATE] = KbdDispatch;
   DriverObject->MajorFunction[IRP_MJ_CLOSE] = KbdDispatch;
   DriverObject->MajorFunction[IRP_MJ_READ] = KbdDispatch;
   DriverObject->MajorFunction[IRP_MJ_INTERNAL_DEVICE_CONTROL] = 
         KbdInternalDeviceControl;  

   DriverObject->DriverStartIo = KbdStartIo;

   IoCreateDevice(DriverObject,
   11c4e:	8d 45 e4             	lea    0xffffffe4(%ebp),%eax
   11c51:	66 c7 45 f0 20 00    	movw   $0x20,0xfffffff0(%ebp)
   11c57:	66 c7 45 f2 22 00    	movw   $0x22,0xfffffff2(%ebp)
   11c5d:	c7 42 38 c0 1b 01 00 	movl   $0x11bc0,0x38(%edx)
   11c64:	c7 42 40 c0 1b 01 00 	movl   $0x11bc0,0x40(%edx)
   11c6b:	c7 42 44 c0 1b 01 00 	movl   $0x11bc0,0x44(%edx)
   11c72:	c7 42 74 20 1b 01 00 	movl   $0x11b20,0x74(%edx)
   11c79:	c7 42 30 80 1a 01 00 	movl   $0x11a80,0x30(%edx)
   11c80:	c7 45 f4 80 32 01 00 	movl   $0x13280,0xfffffff4(%ebp)
   11c87:	50                   	push   %eax
   11c88:	66 c7 45 e8 18 00    	movw   $0x18,0xffffffe8(%ebp)
   11c8e:	6a 01                	push   $0x1
   11c90:	66 c7 45 ea 1a 00    	movw   $0x1a,0xffffffea(%ebp)
   11c96:	6a 00                	push   $0x0
   11c98:	c7 45 ec a2 32 01 00 	movl   $0x132a2,0xffffffec(%ebp)
   11c9f:	6a 0b                	push   $0xb
   11ca1:	56                   	push   %esi
   11ca2:	6a 0c                	push   $0xc
   11ca4:	52                   	push   %edx
   11ca5:	e8 66 01 00 00       	call   11e10 <_IoCreateDevice@28>
		  sizeof(DEVICE_EXTENSION),
		  &DeviceName,
		  FILE_DEVICE_KEYBOARD,
		  0,
		  TRUE,
		  &DeviceObject);
	
   RtlZeroMemory(DeviceObject->DeviceExtension, sizeof(DEVICE_EXTENSION));
   11caa:	50                   	push   %eax
   11cab:	8b 45 e4             	mov    0xffffffe4(%ebp),%eax
   11cae:	6a 0c                	push   $0xc
   11cb0:	8b 58 28             	mov    0x28(%eax),%ebx
   11cb3:	53                   	push   %ebx
   11cb4:	e8 67 01 00 00       	call   11e20 <_RtlZeroMemory@8>

   DeviceObject->Flags = DeviceObject->Flags | DO_BUFFERED_IO;
   11cb9:	8b 5d e4             	mov    0xffffffe4(%ebp),%ebx
   11cbc:	c7 05 40 42 01 00 00 	movl   $0x0,0x14240
   11cc3:	00 00 00 
   11cc6:	c7 05 50 42 01 00 00 	movl   $0x0,0x14250
   11ccd:	00 00 00 
   11cd0:	c7 05 60 42 01 00 00 	movl   $0x0,0x14260
   11cd7:	00 00 00 
   11cda:	8b 4b 1c             	mov    0x1c(%ebx),%ecx
   11cdd:	c7 05 70 42 01 00 00 	movl   $0x0,0x14270
   11ce4:	00 00 00 
   11ce7:	83 c9 04             	or     $0x4,%ecx
   11cea:	89 4b 1c             	mov    %ecx,0x1c(%ebx)
   11ced:	c6 05 80 42 01 00 00 	movb   $0x0,0x14280
   11cf4:	58                   	pop    %eax
   11cf5:	c6 05 90 42 01 00 00 	movb   $0x0,0x14290
   11cfc:	5a                   	pop    %edx
   11cfd:	c6 05 a0 42 01 00 00 	movb   $0x0,0x142a0
   11d04:	c6 05 b0 42 01 00 00 	movb   $0x0,0x142b0
   11d0b:	c7 05 c0 42 01 00 00 	movl   $0x0,0x142c0
   11d12:	00 00 00 
   11d15:	e8 66 fc ff ff       	call   11980 <_KbdClearInput>
   11d1a:	8d 45 e0             	lea    0xffffffe0(%ebp),%eax
   11d1d:	51                   	push   %ecx
   11d1e:	51                   	push   %ecx
   11d1f:	50                   	push   %eax
   11d20:	8d 45 df             	lea    0xffffffdf(%ebp),%eax
   11d23:	50                   	push   %eax
   11d24:	6a 01                	push   $0x1
   11d26:	6a 00                	push   $0x0
   11d28:	6a 00                	push   $0x0
   11d2a:	6a 00                	push   $0x0
   11d2c:	e8 9f 01 00 00       	call   11ed0 <_HalGetInterruptVector@24>
   11d31:	8b 55 e0             	mov    0xffffffe0(%ebp),%edx
   11d34:	c7 04 24 00 00 00 00 	movl   $0x0,(%esp)
   11d3b:	52                   	push   %edx
   11d3c:	31 d2                	xor    %edx,%edx
   11d3e:	6a 00                	push   $0x0
   11d40:	8a 55 df             	mov    0xffffffdf(%ebp),%dl
   11d43:	6a 00                	push   $0x0
   11d45:	52                   	push   %edx
   11d46:	52                   	push   %edx
   11d47:	50                   	push   %eax
   11d48:	6a 00                	push   $0x0
   11d4a:	53                   	push   %ebx
   11d4b:	68 b0 13 01 00       	push   $0x113b0
   11d50:	68 d0 42 01 00       	push   $0x142d0
   11d55:	e8 d6 00 00 00       	call   11e30 <_IoConnectInterrupt@44>
   11d5a:	6a 00                	push   $0x0
   11d5c:	68 20 13 01 00       	push   $0x11320
   11d61:	68 e0 42 01 00       	push   $0x142e0
   11d66:	e8 d5 00 00 00       	call   11e40 <_KeInitializeDpc@12>
   11d6b:	50                   	push   %eax
   11d6c:	50                   	push   %eax
   11d6d:	53                   	push   %ebx
   11d6e:	e8 dd 00 00 00       	call   11e50 <_IoAllocateWorkItem@4>
   11d73:	a3 00 40 01 00       	mov    %eax,0x14000
   InitializeKeyboard( DeviceObject );
   
   IoCreateSymbolicLink(&SymlinkName, &DeviceName);
   11d78:	8d 45 e8             	lea    0xffffffe8(%ebp),%eax
   11d7b:	89 34 24             	mov    %esi,(%esp)
   11d7e:	50                   	push   %eax
   11d7f:	e8 dc 00 00 00       	call   11e60 <_IoCreateSymbolicLink@8>
   
   return(STATUS_SUCCESS);
}
   11d84:	8d 65 f8             	lea    0xfffffff8(%ebp),%esp
   11d87:	31 c0                	xor    %eax,%eax
   11d89:	5b                   	pop    %ebx
   11d8a:	5e                   	pop    %esi
   11d8b:	5d                   	pop    %ebp
   11d8c:	c2 08 00             	ret    $0x8
   11d8f:	90                   	nop    

00011d90 <@InterlockedExchange@8>:
   11d90:	ff 25 c4 50 01 00    	jmp    *0x150c4
   11d96:	90                   	nop    
   11d97:	90                   	nop    
	...

00011da0 <_KdSystemDebugControl@4>:
   11da0:	ff 25 ec 50 01 00    	jmp    *0x150ec
   11da6:	90                   	nop    
   11da7:	90                   	nop    
	...

00011db0 <_IoCompleteRequest@8>:
   11db0:	ff 25 d0 50 01 00    	jmp    *0x150d0
   11db6:	90                   	nop    
   11db7:	90                   	nop    
	...

00011dc0 <_IoStartNextPacket@8>:
   11dc0:	ff 25 e4 50 01 00    	jmp    *0x150e4
   11dc6:	90                   	nop    
   11dc7:	90                   	nop    
	...

00011dd0 <_IoQueueWorkItem@16>:
   11dd0:	ff 25 e0 50 01 00    	jmp    *0x150e0
   11dd6:	90                   	nop    
   11dd7:	90                   	nop    
	...

00011de0 <_KeInsertQueueDpc@12>:
   11de0:	ff 25 f4 50 01 00    	jmp    *0x150f4
   11de6:	90                   	nop    
   11de7:	90                   	nop    
	...

00011df0 <_KeSynchronizeExecution@12>:
   11df0:	ff 25 f8 50 01 00    	jmp    *0x150f8
   11df6:	90                   	nop    
   11df7:	90                   	nop    
	...

00011e00 <_IoStartPacket@16>:
   11e00:	ff 25 e8 50 01 00    	jmp    *0x150e8
   11e06:	90                   	nop    
   11e07:	90                   	nop    
	...

00011e10 <_IoCreateDevice@28>:
   11e10:	ff 25 d8 50 01 00    	jmp    *0x150d8
   11e16:	90                   	nop    
   11e17:	90                   	nop    
	...

00011e20 <_RtlZeroMemory@8>:
   11e20:	ff 25 fc 50 01 00    	jmp    *0x150fc
   11e26:	90                   	nop    
   11e27:	90                   	nop    
	...

00011e30 <_IoConnectInterrupt@44>:
   11e30:	ff 25 d4 50 01 00    	jmp    *0x150d4
   11e36:	90                   	nop    
   11e37:	90                   	nop    
	...

00011e40 <_KeInitializeDpc@12>:
   11e40:	ff 25 f0 50 01 00    	jmp    *0x150f0
   11e46:	90                   	nop    
   11e47:	90                   	nop    
	...

00011e50 <_IoAllocateWorkItem@4>:
   11e50:	ff 25 cc 50 01 00    	jmp    *0x150cc
   11e56:	90                   	nop    
   11e57:	90                   	nop    
	...

00011e60 <_IoCreateSymbolicLink@8>:
   11e60:	ff 25 dc 50 01 00    	jmp    *0x150dc
   11e66:	90                   	nop    
   11e67:	90                   	nop    
	...

00011e70 <_DbgPrint>:
   11e70:	ff 25 c8 50 01 00    	jmp    *0x150c8
   11e76:	90                   	nop    
   11e77:	90                   	nop    
	...

00011e80 <_READ_PORT_UCHAR@4>:
   11e80:	ff 25 b4 50 01 00    	jmp    *0x150b4
   11e86:	90                   	nop    
   11e87:	90                   	nop    
	...

00011e90 <_WRITE_PORT_UCHAR@8>:
   11e90:	ff 25 b8 50 01 00    	jmp    *0x150b8
   11e96:	90                   	nop    
   11e97:	90                   	nop    
	...

00011ea0 <_KeGetCurrentIrql@0>:
   11ea0:	ff 25 a8 50 01 00    	jmp    *0x150a8
   11ea6:	90                   	nop    
   11ea7:	90                   	nop    
	...

00011eb0 <_KeRaiseIrql@8>:
   11eb0:	ff 25 b0 50 01 00    	jmp    *0x150b0
   11eb6:	90                   	nop    
   11eb7:	90                   	nop    
	...

00011ec0 <_KeLowerIrql@4>:
   11ec0:	ff 25 ac 50 01 00    	jmp    *0x150ac
   11ec6:	90                   	nop    
   11ec7:	90                   	nop    
	...

00011ed0 <_HalGetInterruptVector@24>:
   11ed0:	ff 25 a4 50 01 00    	jmp    *0x150a4
   11ed6:	90                   	nop    
   11ed7:	90                   	nop    
	...

00011ee0 <__CTOR_LIST__>:
   11ee0:	ff                   	(bad)  
   11ee1:	ff                   	(bad)  
   11ee2:	ff                   	(bad)  
   11ee3:	ff 00                	incl   (%eax)
   11ee5:	00 00                	add    %al,(%eax)
	...

00011ee8 <__DTOR_LIST__>:
   11ee8:	ff                   	(bad)  
   11ee9:	ff                   	(bad)  
   11eea:	ff                   	(bad)  
   11eeb:	ff 00                	incl   (%eax)
   11eed:	00 00                	add    %al,(%eax)
	...
