
vbemp.nostrip.sys:     file format pei-i386

Disassembly of section .text:

00011000 <_DriverEntry@8>:
/* PUBLIC AND PRIVATE FUNCTIONS ***********************************************/

VP_STATUS STDCALL
DriverEntry(IN PVOID Context1, IN PVOID Context2)
{
   11000:	55                   	push   %ebp
   11001:	89 e5                	mov    %esp,%ebp
   11003:	53                   	push   %ebx
   11004:	83 ec 6c             	sub    $0x6c,%esp
   VIDEO_HW_INITIALIZATION_DATA InitData;

   VideoPortZeroMemory(&InitData, sizeof(InitData));
   11007:	8d 5d 98             	lea    0xffffff98(%ebp),%ebx
   1100a:	6a 54                	push   $0x54
   1100c:	53                   	push   %ebx
   1100d:	ff 15 94 30 01 00    	call   *0x13094
   InitData.HwInitDataSize = sizeof(VIDEO_HW_INITIALIZATION_DATA);
   InitData.HwFindAdapter = VBEFindAdapter;
   InitData.HwInitialize = VBEInitialize;
   InitData.HwStartIO = VBEStartIO;
   InitData.HwResetHw = VBEResetHw;
   InitData.HwGetPowerState = VBEGetPowerState;
   InitData.HwSetPowerState = VBESetPowerState;
   InitData.HwDeviceExtensionSize = sizeof(VBE_DEVICE_EXTENSION);
  
   return VideoPortInitialize(Context1, Context2, &InitData, NULL);
   11013:	8b 55 0c             	mov    0xc(%ebp),%edx
   11016:	c7 45 98 54 00 00 00 	movl   $0x54,0xffffff98(%ebp)
   1101d:	c7 45 a0 70 10 01 00 	movl   $0x11070,0xffffffa0(%ebp)
   11024:	c7 45 a4 e0 11 01 00 	movl   $0x111e0,0xffffffa4(%ebp)
   1102b:	c7 45 ac 80 1d 01 00 	movl   $0x11d80,0xffffffac(%ebp)
   11032:	c7 45 b8 c0 15 01 00 	movl   $0x115c0,0xffffffb8(%ebp)
   11039:	c7 45 c8 a0 16 01 00 	movl   $0x116a0,0xffffffc8(%ebp)
   11040:	c7 45 c4 c0 17 01 00 	movl   $0x117c0,0xffffffc4(%ebp)
   11047:	c7 45 b0 38 02 00 00 	movl   $0x238,0xffffffb0(%ebp)
   1104e:	59                   	pop    %ecx
   1104f:	58                   	pop    %eax
   11050:	8b 45 08             	mov    0x8(%ebp),%eax
   11053:	6a 00                	push   $0x0
   11055:	53                   	push   %ebx
   11056:	52                   	push   %edx
   11057:	50                   	push   %eax
   11058:	ff 15 7c 30 01 00    	call   *0x1307c
}
   1105e:	8b 5d fc             	mov    0xfffffffc(%ebp),%ebx
   11061:	c9                   	leave  
   11062:	c2 08 00             	ret    $0x8
   11065:	8d 74 26 00          	lea    0x0(%esi),%esi
   11069:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

00011070 <_VBEFindAdapter@20>:

/*
 * VBEFindAdapter
 *
 * Should detect a VBE compatible display adapter, but it's not possible
 * to use video port Int 10 services at this time during initialization,
 * so we always return NO_ERROR and do the real work in VBEInitialize.
 */

VP_STATUS STDCALL
VBEFindAdapter(
   IN PVOID HwDeviceExtension,
   IN PVOID HwContext,
   IN PWSTR ArgumentString,
   IN OUT PVIDEO_PORT_CONFIG_INFO ConfigInfo,
   OUT PUCHAR Again)
{
   11070:	55                   	push   %ebp
   return NO_ERROR;
}
   11071:	31 c0                	xor    %eax,%eax
   11073:	89 e5                	mov    %esp,%ebp
   11075:	5d                   	pop    %ebp
   11076:	c2 14 00             	ret    $0x14
   11079:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi

00011080 <@VBESortModes@4>:

/*
 * VBESortModesCallback
 *
 * Helper function for sorting video mode list.
 */

static int
VBESortModesCallback(PVBE_MODEINFO VbeModeInfoA, PVBE_MODEINFO VbeModeInfoB)
{
   DPRINT(("VBESortModesCallback: %dx%dx%d / %dx%dx%d\n",
      VbeModeInfoA->XResolution, VbeModeInfoA->YResolution,
      VbeModeInfoA->BitsPerPixel,
      VbeModeInfoB->XResolution, VbeModeInfoB->YResolution,
      VbeModeInfoB->BitsPerPixel));
   
   /*
    * FIXME: Until some reasonable method for changing video modes will
    * be available we favor more bits per pixel. It should be changed
    * later.
    */
   if (VbeModeInfoA->BitsPerPixel < VbeModeInfoB->BitsPerPixel) return -1;
   if (VbeModeInfoA->BitsPerPixel > VbeModeInfoB->BitsPerPixel) return 1;
   if (VbeModeInfoA->XResolution < VbeModeInfoB->XResolution) return -1;
   if (VbeModeInfoA->XResolution > VbeModeInfoB->XResolution) return 1;
   if (VbeModeInfoA->YResolution < VbeModeInfoB->YResolution) return -1;
   if (VbeModeInfoA->YResolution > VbeModeInfoB->YResolution) return 1;
   return 0;
}

/*
 * VBESortModes
 *
 * Simple function for sorting the video mode list. Uses bubble sort.
 */

VOID FASTCALL
VBESortModes(PVBE_DEVICE_EXTENSION DeviceExtension)
{
   11080:	55                   	push   %ebp
   11081:	89 e5                	mov    %esp,%ebp
   11083:	57                   	push   %edi
   11084:	56                   	push   %esi
   11085:	53                   	push   %ebx
   11086:	81 ec 1c 01 00 00    	sub    $0x11c,%esp
   1108c:	89 ce                	mov    %ecx,%esi
   1108e:	8b 81 28 02 00 00    	mov    0x228(%ecx),%eax
   11094:	89 85 e0 fe ff ff    	mov    %eax,0xfffffee0(%ebp)
   1109a:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
   BOOLEAN Finished = FALSE;
   ULONG Pos;
   int Result;
   VBE_MODEINFO TempModeInfo;
   WORD TempModeNumber;

   while (!Finished)
   {
      Finished = TRUE;
      for (Pos = 0; Pos < DeviceExtension->ModeCount - 1; Pos++)
   110a0:	31 ff                	xor    %edi,%edi
   110a2:	c6 85 e7 fe ff ff 01 	movb   $0x1,0xfffffee7(%ebp)
   110a9:	83 bd e0 fe ff ff 01 	cmpl   $0x1,0xfffffee0(%ebp)
   110b0:	0f 84 0e 01 00 00    	je     111c4 <@VBESortModes@4+0x144>
   110b6:	c7 85 dc fe ff ff 00 	movl   $0x0,0xfffffedc(%ebp)
   110bd:	00 00 00 
   110c0:	8b 85 dc fe ff ff    	mov    0xfffffedc(%ebp),%eax
   110c6:	8b 9e 30 02 00 00    	mov    0x230(%esi),%ebx
   110cc:	8d 14 03             	lea    (%ebx,%eax,1),%edx
   110cf:	8d 8a ff 00 00 00    	lea    0xff(%edx),%ecx
   110d5:	8a 41 19             	mov    0x19(%ecx),%al
   110d8:	38 42 19             	cmp    %al,0x19(%edx)
   110db:	0f 82 c2 00 00 00    	jb     111a3 <@VBESortModes@4+0x123>
   110e1:	77 24                	ja     11107 <@VBESortModes@4+0x87>
   110e3:	66 8b 41 12          	mov    0x12(%ecx),%ax
   110e7:	66 39 42 12          	cmp    %ax,0x12(%edx)
   110eb:	0f 82 b2 00 00 00    	jb     111a3 <@VBESortModes@4+0x123>
   110f1:	77 14                	ja     11107 <@VBESortModes@4+0x87>
   110f3:	66 8b 41 14          	mov    0x14(%ecx),%ax
   110f7:	66 39 42 14          	cmp    %ax,0x14(%edx)
   110fb:	0f 82 a2 00 00 00    	jb     111a3 <@VBESortModes@4+0x123>
   11101:	0f 86 9c 00 00 00    	jbe    111a3 <@VBESortModes@4+0x123>
      {
         Result = VBESortModesCallback(
            DeviceExtension->ModeInfo + Pos,
            DeviceExtension->ModeInfo + Pos + 1);
         if (Result > 0)
         {
            Finished = FALSE;

            VideoPortMoveMemory(
   11107:	8b 95 dc fe ff ff    	mov    0xfffffedc(%ebp),%edx
   1110d:	50                   	push   %eax
   1110e:	c6 85 e7 fe ff ff 00 	movb   $0x0,0xfffffee7(%ebp)
   11115:	8d 04 13             	lea    (%ebx,%edx,1),%eax
   11118:	68 ff 00 00 00       	push   $0xff
   1111d:	50                   	push   %eax
   1111e:	8d 85 e8 fe ff ff    	lea    0xfffffee8(%ebp),%eax
   11124:	50                   	push   %eax
   11125:	ff 15 84 30 01 00    	call   *0x13084
               &TempModeInfo,
               DeviceExtension->ModeInfo + Pos,
               sizeof(VBE_MODEINFO));
            TempModeNumber = DeviceExtension->ModeNumbers[Pos];

            VideoPortMoveMemory(
   1112b:	8b 8e 30 02 00 00    	mov    0x230(%esi),%ecx
   11131:	8b 95 dc fe ff ff    	mov    0xfffffedc(%ebp),%edx
   11137:	01 ca                	add    %ecx,%edx
   11139:	8b 86 2c 02 00 00    	mov    0x22c(%esi),%eax
   1113f:	66 8b 1c 78          	mov    (%eax,%edi,2),%bx
   11143:	8d 82 ff 00 00 00    	lea    0xff(%edx),%eax
   11149:	68 ff 00 00 00       	push   $0xff
   1114e:	50                   	push   %eax
   1114f:	52                   	push   %edx
   11150:	ff 15 84 30 01 00    	call   *0x13084
               DeviceExtension->ModeInfo + Pos,
               DeviceExtension->ModeInfo + Pos + 1,
               sizeof(VBE_MODEINFO));
            DeviceExtension->ModeNumbers[Pos] =
   11156:	8b 96 2c 02 00 00    	mov    0x22c(%esi),%edx
   1115c:	66 8b 44 7a 02       	mov    0x2(%edx,%edi,2),%ax
   11161:	66 89 04 7a          	mov    %ax,(%edx,%edi,2)
               DeviceExtension->ModeNumbers[Pos + 1];

            VideoPortMoveMemory(
   11165:	8d 95 e8 fe ff ff    	lea    0xfffffee8(%ebp),%edx
   1116b:	68 ff 00 00 00       	push   $0xff
   11170:	8b 85 dc fe ff ff    	mov    0xfffffedc(%ebp),%eax
   11176:	52                   	push   %edx
   11177:	8b 96 30 02 00 00    	mov    0x230(%esi),%edx
   1117d:	01 d0                	add    %edx,%eax
   1117f:	05 ff 00 00 00       	add    $0xff,%eax
   11184:	50                   	push   %eax
   11185:	ff 15 84 30 01 00    	call   *0x13084
               DeviceExtension->ModeInfo + Pos + 1,
               &TempModeInfo,
               sizeof(VBE_MODEINFO));
            DeviceExtension->ModeNumbers[Pos + 1] = TempModeNumber;
   1118b:	8b 86 2c 02 00 00    	mov    0x22c(%esi),%eax
   11191:	66 89 5c 78 02       	mov    %bx,0x2(%eax,%edi,2)
   11196:	58                   	pop    %eax
   11197:	8b 86 28 02 00 00    	mov    0x228(%esi),%eax
   1119d:	89 85 e0 fe ff ff    	mov    %eax,0xfffffee0(%ebp)
   111a3:	8b 85 dc fe ff ff    	mov    0xfffffedc(%ebp),%eax
   111a9:	47                   	inc    %edi
   111aa:	05 ff 00 00 00       	add    $0xff,%eax
   111af:	89 85 dc fe ff ff    	mov    %eax,0xfffffedc(%ebp)
   111b5:	8b 85 e0 fe ff ff    	mov    0xfffffee0(%ebp),%eax
   111bb:	48                   	dec    %eax
   111bc:	39 f8                	cmp    %edi,%eax
   111be:	0f 87 fc fe ff ff    	ja     110c0 <@VBESortModes@4+0x40>
   111c4:	80 bd e7 fe ff ff 00 	cmpb   $0x0,0xfffffee7(%ebp)
   111cb:	0f 84 cf fe ff ff    	je     110a0 <@VBESortModes@4+0x20>
   111d1:	8d 65 f4             	lea    0xfffffff4(%ebp),%esp
   111d4:	5b                   	pop    %ebx
   111d5:	5e                   	pop    %esi
   111d6:	5f                   	pop    %edi
   111d7:	5d                   	pop    %ebp
   111d8:	c3                   	ret    
   111d9:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi

000111e0 <_VBEInitialize@4>:
         }
      }
   }
}

/*
 * VBEInitialize
 *
 * Performs the first initialization of the adapter, after the HAL has given
 * up control of the video hardware to the video port driver.
 *
 * This function performs these steps:
 * - Gets global VBE information and finds if VBE BIOS is present.
 * - Builds the internal mode list using the list of modes provided by
 *   the VBE.
 */

BOOLEAN STDCALL
VBEInitialize(PVOID HwDeviceExtension)
{
   111e0:	55                   	push   %ebp
   111e1:	89 e5                	mov    %esp,%ebp
   111e3:	57                   	push   %edi
   111e4:	56                   	push   %esi
   111e5:	53                   	push   %ebx
   111e6:	83 ec 50             	sub    $0x50,%esp
   111e9:	8b 5d 08             	mov    0x8(%ebp),%ebx
   INT10_BIOS_ARGUMENTS BiosRegisters;
   VP_STATUS Status;
   PVBE_DEVICE_EXTENSION VBEDeviceExtension = 
     (PVBE_DEVICE_EXTENSION)HwDeviceExtension;
   ULONG Length;
   ULONG ModeCount;
   ULONG SuitableModeCount;
   USHORT ModeTemp;
   ULONG CurrentMode;
   PVBE_MODEINFO VbeModeInfo;

   /*
    * Get the Int 10 interface that we will use for allocating real
    * mode memory and calling the video BIOS.
    */

   VBEDeviceExtension->Int10Interface.Version = VIDEO_PORT_INT10_INTERFACE_VERSION_1;
   111ec:	66 c7 43 02 01 00    	movw   $0x1,0x2(%ebx)
   VBEDeviceExtension->Int10Interface.Size = sizeof(VIDEO_PORT_INT10_INTERFACE);
   111f2:	66 c7 03 24 00       	movw   $0x24,(%ebx)
   Status = VideoPortQueryServices(
   111f7:	53                   	push   %ebx
   111f8:	6a 04                	push   $0x4
   111fa:	53                   	push   %ebx
   111fb:	ff 15 88 30 01 00    	call   *0x13088
      HwDeviceExtension,
      VideoPortServicesInt10,
      (PINTERFACE)&VBEDeviceExtension->Int10Interface);

   if (Status != NO_ERROR)
   11201:	5a                   	pop    %edx
   {
      DPRINT(("Failed to get Int 10 service functions (Status %x)\n", Status));
      return FALSE;
   11202:	31 d2                	xor    %edx,%edx
   11204:	85 c0                	test   %eax,%eax
   11206:	74 0c                	je     11214 <_VBEInitialize@4+0x34>
   }
   
   /*
    * Allocate a bit of memory that will be later used for VBE transport
    * buffer. This memory must be accessible from V86 mode so it must fit
    * in the first megabyte of physical memory.
    */

   Length = 0x400;
   Status = VBEDeviceExtension->Int10Interface.Int10AllocateBuffer(
      VBEDeviceExtension->Int10Interface.Context,
      &VBEDeviceExtension->TrampolineMemorySegment,
      &VBEDeviceExtension->TrampolineMemoryOffset,
      &Length);

   if (Status != NO_ERROR)
   {
      DPRINT(("Failed to allocate virtual memory (Status %x)\n", Status));
      return FALSE;
   }

   /*
    * Get the VBE general information.
    */
   
   VBEDeviceExtension->Int10Interface.Int10WriteMemory(
      VBEDeviceExtension->Int10Interface.Context,
      VBEDeviceExtension->TrampolineMemorySegment,
      VBEDeviceExtension->TrampolineMemoryOffset,
      "VBE2",
      4);

   VideoPortZeroMemory(&BiosRegisters, sizeof(BiosRegisters));
   BiosRegisters.Eax = VBE_GET_CONTROLLER_INFORMATION;
   BiosRegisters.Edi = VBEDeviceExtension->TrampolineMemoryOffset;
   BiosRegisters.SegEs = VBEDeviceExtension->TrampolineMemorySegment;
   VBEDeviceExtension->Int10Interface.Int10CallBios(
      VBEDeviceExtension->Int10Interface.Context,
      &BiosRegisters);
   
   if (BiosRegisters.Eax == VBE_SUCCESS)
   {
      VBEDeviceExtension->Int10Interface.Int10ReadMemory(
         VBEDeviceExtension->Int10Interface.Context,
         VBEDeviceExtension->TrampolineMemorySegment,
         VBEDeviceExtension->TrampolineMemoryOffset,
         &VBEDeviceExtension->VbeInfo,
         sizeof(VBEDeviceExtension->VbeInfo));

      DPRINT(("VBE BIOS Present (%d.%d, %8ld Kb)\n",
         VBEDeviceExtension->VbeInfo.Version / 0x100,
         VBEDeviceExtension->VbeInfo.Version & 0xFF,
         VBEDeviceExtension->VbeInfo.TotalMemory * 16));

#ifdef VBE12_SUPPORT
      if (VBEDeviceExtension->VbeInfo.Version < 0x102)
#else
      if (VBEDeviceExtension->VbeInfo.Version < 0x200)
#endif
      {
         DPRINT(("VBE BIOS present, but incompatible version.\n"));
         return FALSE;
      }
   }
   else
   {
      DPRINT(("No VBE BIOS found.\n"));
      return FALSE;
   }

   /*
    * Build a mode list here that can be later used by
    * IOCTL_VIDEO_QUERY_NUM_AVAIL_MODES and IOCTL_VIDEO_QUERY_AVAIL_MODES
    * calls.
    */

   /*
    * Get the number of supported video modes.
    *
    * No need to be map the memory. It's either in the video BIOS memory or
    * in our trampoline memory. In either case the memory is already mapped.
    */

   for (ModeCount = 0; ; ModeCount++)
   {
      /* Read the VBE mode number. */
      VBEDeviceExtension->Int10Interface.Int10ReadMemory(
         VBEDeviceExtension->Int10Interface.Context,
         HIWORD(VBEDeviceExtension->VbeInfo.VideoModePtr),
         LOWORD(VBEDeviceExtension->VbeInfo.VideoModePtr) + (ModeCount << 1),
         &ModeTemp,
         sizeof(ModeTemp));

      /* End of list? */
      if (ModeTemp == 0xFFFF || ModeTemp == 0)
         break;
   }

   /*
    * Allocate space for video modes information.
    */

   VBEDeviceExtension->ModeInfo =
      ExAllocatePool(PagedPool, ModeCount * sizeof(VBE_MODEINFO));
   VBEDeviceExtension->ModeNumbers =
      ExAllocatePool(PagedPool, ModeCount * sizeof(WORD));

   /*
    * Get the actual mode infos.
    */
   
   for (CurrentMode = 0, SuitableModeCount = 0;
        CurrentMode < ModeCount;
        CurrentMode++)
   {
      /* Read the VBE mode number. */
      VBEDeviceExtension->Int10Interface.Int10ReadMemory(
         VBEDeviceExtension->Int10Interface.Context,
         HIWORD(VBEDeviceExtension->VbeInfo.VideoModePtr),
         LOWORD(VBEDeviceExtension->VbeInfo.VideoModePtr) + (CurrentMode << 1),
         &ModeTemp,
         sizeof(ModeTemp));

      /* Call VBE BIOS to read the mode info. */
      VideoPortZeroMemory(&BiosRegisters, sizeof(BiosRegisters));
      BiosRegisters.Eax = VBE_GET_MODE_INFORMATION;
      BiosRegisters.Ecx = ModeTemp;
      BiosRegisters.Edi = VBEDeviceExtension->TrampolineMemoryOffset + 0x200;
      BiosRegisters.SegEs = VBEDeviceExtension->TrampolineMemorySegment;
      VBEDeviceExtension->Int10Interface.Int10CallBios(
         VBEDeviceExtension->Int10Interface.Context,
         &BiosRegisters);

      /* Read the VBE mode info. */
      VBEDeviceExtension->Int10Interface.Int10ReadMemory(
         VBEDeviceExtension->Int10Interface.Context,
         VBEDeviceExtension->TrampolineMemorySegment,
         VBEDeviceExtension->TrampolineMemoryOffset + 0x200,
         VBEDeviceExtension->ModeInfo + SuitableModeCount,
         sizeof(VBE_MODEINFO));

      VbeModeInfo = VBEDeviceExtension->ModeInfo + SuitableModeCount;

      /* Is this mode acceptable? */
      if (BiosRegisters.Eax == VBE_SUCCESS &&
          VbeModeInfo->XResolution >= 640 &&
          VbeModeInfo->YResolution >= 480 &&
          (VbeModeInfo->MemoryModel == VBE_MEMORYMODEL_PACKEDPIXEL ||
           VbeModeInfo->MemoryModel == VBE_MEMORYMODEL_DIRECTCOLOR))
      {
         if (VbeModeInfo->ModeAttributes & VBE_MODEATTR_LINEAR)
         {
            VBEDeviceExtension->ModeNumbers[SuitableModeCount] = ModeTemp | 0x4000;
            SuitableModeCount++;
         }
#ifdef VBE12_SUPPORT
         else
         {
            VBEDeviceExtension->ModeNumbers[SuitableModeCount] = ModeTemp;
            SuitableModeCount++;
         }
#endif
      }
   }

   if (SuitableModeCount == 0)
   {
      DPRINT(("VBEMP: No video modes supported\n"));
      return FALSE;
   }
   
   VBEDeviceExtension->ModeCount = SuitableModeCount;

   /*
    * Sort the video mode list according to resolution and bits per pixel.
    */

   VBESortModes(VBEDeviceExtension);

   /*
    * Print the supported video modes when DBG is set.
    */

#ifdef DBG
   for (CurrentMode = 0;
        CurrentMode < SuitableModeCount;
        CurrentMode++)
   {
      DPRINT(("%dx%dx%d\n",
         VBEDeviceExtension->ModeInfo[CurrentMode].XResolution,
         VBEDeviceExtension->ModeInfo[CurrentMode].YResolution,
         VBEDeviceExtension->ModeInfo[CurrentMode].BitsPerPixel));
   }
#endif

   return TRUE;
}
   11208:	8d 65 f4             	lea    0xfffffff4(%ebp),%esp
   1120b:	89 d0                	mov    %edx,%eax
   1120d:	5b                   	pop    %ebx
   1120e:	5e                   	pop    %esi
   1120f:	5f                   	pop    %edi
   11210:	5d                   	pop    %ebp
   11211:	c2 04 00             	ret    $0x4
   11214:	8d 45 c4             	lea    0xffffffc4(%ebp),%eax
   11217:	c7 45 c4 00 04 00 00 	movl   $0x400,0xffffffc4(%ebp)
   1121e:	50                   	push   %eax
   1121f:	8d 43 26             	lea    0x26(%ebx),%eax
   11222:	50                   	push   %eax
   11223:	8d 43 24             	lea    0x24(%ebx),%eax
   11226:	50                   	push   %eax
   11227:	8b 7b 04             	mov    0x4(%ebx),%edi
   1122a:	57                   	push   %edi
   1122b:	ff 53 10             	call   *0x10(%ebx)
   1122e:	31 d2                	xor    %edx,%edx
   11230:	85 c0                	test   %eax,%eax
   11232:	75 d4                	jne    11208 <_VBEInitialize@4+0x28>
   11234:	83 ec 0c             	sub    $0xc,%esp
   11237:	8d 7d c8             	lea    0xffffffc8(%ebp),%edi
   1123a:	6a 04                	push   $0x4
   1123c:	68 00 20 01 00       	push   $0x12000
   11241:	66 8b 43 26          	mov    0x26(%ebx),%ax
   11245:	25 ff ff 00 00       	and    $0xffff,%eax
   1124a:	50                   	push   %eax
   1124b:	66 8b 43 24          	mov    0x24(%ebx),%ax
   1124f:	25 ff ff 00 00       	and    $0xffff,%eax
   11254:	50                   	push   %eax
   11255:	8b 73 04             	mov    0x4(%ebx),%esi
   11258:	56                   	push   %esi
   11259:	ff 53 1c             	call   *0x1c(%ebx)
   1125c:	c7 04 24 20 00 00 00 	movl   $0x20,(%esp)
   11263:	57                   	push   %edi
   11264:	ff 15 94 30 01 00    	call   *0x13094
   1126a:	66 8b 43 26          	mov    0x26(%ebx),%ax
   1126e:	25 ff ff 00 00       	and    $0xffff,%eax
   11273:	c7 45 c8 00 4f 00 00 	movl   $0x4f00,0xffffffc8(%ebp)
   1127a:	89 45 dc             	mov    %eax,0xffffffdc(%ebp)
   1127d:	66 8b 43 24          	mov    0x24(%ebx),%ax
   11281:	57                   	push   %edi
   11282:	66 89 45 e6          	mov    %ax,0xffffffe6(%ebp)
   11286:	8b 4b 04             	mov    0x4(%ebx),%ecx
   11289:	51                   	push   %ecx
   1128a:	ff 53 20             	call   *0x20(%ebx)
   1128d:	58                   	pop    %eax
   1128e:	5a                   	pop    %edx
   1128f:	31 d2                	xor    %edx,%edx
   11291:	83 7d c8 4f          	cmpl   $0x4f,0xffffffc8(%ebp)
   11295:	0f 85 6d ff ff ff    	jne    11208 <_VBEInitialize@4+0x28>
   1129b:	83 ec 0c             	sub    $0xc,%esp
   1129e:	8d 43 28             	lea    0x28(%ebx),%eax
   112a1:	68 00 02 00 00       	push   $0x200
   112a6:	50                   	push   %eax
   112a7:	66 8b 43 26          	mov    0x26(%ebx),%ax
   112ab:	25 ff ff 00 00       	and    $0xffff,%eax
   112b0:	50                   	push   %eax
   112b1:	66 8b 43 24          	mov    0x24(%ebx),%ax
   112b5:	25 ff ff 00 00       	and    $0xffff,%eax
   112ba:	50                   	push   %eax
   112bb:	8b 43 04             	mov    0x4(%ebx),%eax
   112be:	50                   	push   %eax
   112bf:	ff 53 18             	call   *0x18(%ebx)
   112c2:	31 d2                	xor    %edx,%edx
   112c4:	83 c4 0c             	add    $0xc,%esp
   112c7:	66 81 7b 2c ff 01    	cmpw   $0x1ff,0x2c(%ebx)
   112cd:	0f 86 35 ff ff ff    	jbe    11208 <_VBEInitialize@4+0x28>
   112d3:	31 f6                	xor    %esi,%esi
   112d5:	eb 01                	jmp    112d8 <_VBEInitialize@4+0xf8>
   112d7:	46                   	inc    %esi
   112d8:	83 ec 0c             	sub    $0xc,%esp
   112db:	8d 45 c2             	lea    0xffffffc2(%ebp),%eax
   112de:	6a 02                	push   $0x2
   112e0:	50                   	push   %eax
   112e1:	8b 53 36             	mov    0x36(%ebx),%edx
   112e4:	8d 04 72             	lea    (%edx,%esi,2),%eax
   112e7:	c1 ea 10             	shr    $0x10,%edx
   112ea:	25 ff ff 00 00       	and    $0xffff,%eax
   112ef:	50                   	push   %eax
   112f0:	52                   	push   %edx
   112f1:	8b 43 04             	mov    0x4(%ebx),%eax
   112f4:	50                   	push   %eax
   112f5:	ff 53 18             	call   *0x18(%ebx)
   112f8:	66 8b 45 c2          	mov    0xffffffc2(%ebp),%ax
   112fc:	83 c4 0c             	add    $0xc,%esp
   112ff:	66 83 f8 ff          	cmp    $0xffffffff,%ax
   11303:	0f 94 c2             	sete   %dl
   11306:	66 85 c0             	test   %ax,%ax
   11309:	0f 94 c0             	sete   %al
   1130c:	09 d0                	or     %edx,%eax
   1130e:	a8 01                	test   $0x1,%al
   11310:	74 c5                	je     112d7 <_VBEInitialize@4+0xf7>
   11312:	89 f0                	mov    %esi,%eax
   11314:	c1 e0 08             	shl    $0x8,%eax
   11317:	51                   	push   %ecx
   11318:	29 f0                	sub    %esi,%eax
   1131a:	51                   	push   %ecx
   1131b:	50                   	push   %eax
   1131c:	6a 01                	push   $0x1
   1131e:	ff 15 70 30 01 00    	call   *0x13070
   11324:	89 83 30 02 00 00    	mov    %eax,0x230(%ebx)
   1132a:	8d 04 36             	lea    (%esi,%esi,1),%eax
   1132d:	50                   	push   %eax
   1132e:	6a 01                	push   $0x1
   11330:	ff 15 70 30 01 00    	call   *0x13070
   11336:	c7 45 bc 00 00 00 00 	movl   $0x0,0xffffffbc(%ebp)
   1133d:	c7 45 b8 00 00 00 00 	movl   $0x0,0xffffffb8(%ebp)
   11344:	39 75 bc             	cmp    %esi,0xffffffbc(%ebp)
   11347:	89 83 2c 02 00 00    	mov    %eax,0x22c(%ebx)
   1134d:	58                   	pop    %eax
   1134e:	5a                   	pop    %edx
   1134f:	0f 83 28 01 00 00    	jae    1147d <_VBEInitialize@4+0x29d>
   11355:	c7 45 b4 00 00 00 00 	movl   $0x0,0xffffffb4(%ebp)
   1135c:	eb 10                	jmp    1136e <_VBEInitialize@4+0x18e>
   1135e:	8b 45 b8             	mov    0xffffffb8(%ebp),%eax
   11361:	40                   	inc    %eax
   11362:	89 45 b8             	mov    %eax,0xffffffb8(%ebp)
   11365:	39 75 b8             	cmp    %esi,0xffffffb8(%ebp)
   11368:	0f 83 16 01 00 00    	jae    11484 <_VBEInitialize@4+0x2a4>
   1136e:	83 ec 0c             	sub    $0xc,%esp
   11371:	8d 4d c2             	lea    0xffffffc2(%ebp),%ecx
   11374:	6a 02                	push   $0x2
   11376:	51                   	push   %ecx
   11377:	8b 53 36             	mov    0x36(%ebx),%edx
   1137a:	8b 4d b8             	mov    0xffffffb8(%ebp),%ecx
   1137d:	8d 04 4a             	lea    (%edx,%ecx,2),%eax
   11380:	c1 ea 10             	shr    $0x10,%edx
   11383:	25 ff ff 00 00       	and    $0xffff,%eax
   11388:	50                   	push   %eax
   11389:	52                   	push   %edx
   1138a:	8b 43 04             	mov    0x4(%ebx),%eax
   1138d:	50                   	push   %eax
   1138e:	ff 53 18             	call   *0x18(%ebx)
   11391:	c7 04 24 20 00 00 00 	movl   $0x20,(%esp)
   11398:	57                   	push   %edi
   11399:	ff 15 94 30 01 00    	call   *0x13094
   1139f:	66 8b 45 c2          	mov    0xffffffc2(%ebp),%ax
   113a3:	25 ff ff 00 00       	and    $0xffff,%eax
   113a8:	c7 45 c8 01 4f 00 00 	movl   $0x4f01,0xffffffc8(%ebp)
   113af:	89 45 d0             	mov    %eax,0xffffffd0(%ebp)
   113b2:	66 8b 43 26          	mov    0x26(%ebx),%ax
   113b6:	25 ff ff 00 00       	and    $0xffff,%eax
   113bb:	05 00 02 00 00       	add    $0x200,%eax
   113c0:	89 45 dc             	mov    %eax,0xffffffdc(%ebp)
   113c3:	66 8b 43 24          	mov    0x24(%ebx),%ax
   113c7:	57                   	push   %edi
   113c8:	66 89 45 e6          	mov    %ax,0xffffffe6(%ebp)
   113cc:	8b 43 04             	mov    0x4(%ebx),%eax
   113cf:	50                   	push   %eax
   113d0:	ff 53 20             	call   *0x20(%ebx)
   113d3:	8b 45 b4             	mov    0xffffffb4(%ebp),%eax
   113d6:	51                   	push   %ecx
   113d7:	68 ff 00 00 00       	push   $0xff
   113dc:	8b 93 30 02 00 00    	mov    0x230(%ebx),%edx
   113e2:	01 d0                	add    %edx,%eax
   113e4:	50                   	push   %eax
   113e5:	66 8b 43 26          	mov    0x26(%ebx),%ax
   113e9:	05 00 02 00 00       	add    $0x200,%eax
   113ee:	25 ff ff 00 00       	and    $0xffff,%eax
   113f3:	50                   	push   %eax
   113f4:	66 8b 43 24          	mov    0x24(%ebx),%ax
   113f8:	25 ff ff 00 00       	and    $0xffff,%eax
   113fd:	50                   	push   %eax
   113fe:	8b 43 04             	mov    0x4(%ebx),%eax
   11401:	50                   	push   %eax
   11402:	ff 53 18             	call   *0x18(%ebx)
   11405:	8b 4d b4             	mov    0xffffffb4(%ebp),%ecx
   11408:	8b 83 30 02 00 00    	mov    0x230(%ebx),%eax
   1140e:	01 c1                	add    %eax,%ecx
   11410:	83 c4 0c             	add    $0xc,%esp
   11413:	83 7d c8 4f          	cmpl   $0x4f,0xffffffc8(%ebp)
   11417:	0f 85 41 ff ff ff    	jne    1135e <_VBEInitialize@4+0x17e>
   1141d:	66 81 79 12 7f 02    	cmpw   $0x27f,0x12(%ecx)
   11423:	0f 86 35 ff ff ff    	jbe    1135e <_VBEInitialize@4+0x17e>
   11429:	66 81 79 14 df 01    	cmpw   $0x1df,0x14(%ecx)
   1142f:	0f 86 29 ff ff ff    	jbe    1135e <_VBEInitialize@4+0x17e>
   11435:	8a 41 1b             	mov    0x1b(%ecx),%al
   11438:	3c 04                	cmp    $0x4,%al
   1143a:	0f 94 c2             	sete   %dl
   1143d:	3c 06                	cmp    $0x6,%al
   1143f:	0f 94 c0             	sete   %al
   11442:	09 d0                	or     %edx,%eax
   11444:	a8 01                	test   $0x1,%al
   11446:	0f 84 12 ff ff ff    	je     1135e <_VBEInitialize@4+0x17e>
   1144c:	f6 01 80             	testb  $0x80,(%ecx)
   1144f:	0f 84 09 ff ff ff    	je     1135e <_VBEInitialize@4+0x17e>
   11455:	8b 4d bc             	mov    0xffffffbc(%ebp),%ecx
   11458:	66 8b 45 c2          	mov    0xffffffc2(%ebp),%ax
   1145c:	8b 93 2c 02 00 00    	mov    0x22c(%ebx),%edx
   11462:	80 cc 40             	or     $0x40,%ah
   11465:	66 89 04 4a          	mov    %ax,(%edx,%ecx,2)
   11469:	8b 45 b4             	mov    0xffffffb4(%ebp),%eax
   1146c:	41                   	inc    %ecx
   1146d:	05 ff 00 00 00       	add    $0xff,%eax
   11472:	89 4d bc             	mov    %ecx,0xffffffbc(%ebp)
   11475:	89 45 b4             	mov    %eax,0xffffffb4(%ebp)
   11478:	e9 e1 fe ff ff       	jmp    1135e <_VBEInitialize@4+0x17e>
   1147d:	31 d2                	xor    %edx,%edx
   1147f:	e9 84 fd ff ff       	jmp    11208 <_VBEInitialize@4+0x28>
   11484:	8b 45 bc             	mov    0xffffffbc(%ebp),%eax
   11487:	85 c0                	test   %eax,%eax
   11489:	74 f2                	je     1147d <_VBEInitialize@4+0x29d>
   1148b:	8b 45 bc             	mov    0xffffffbc(%ebp),%eax
   1148e:	89 d9                	mov    %ebx,%ecx
   11490:	89 83 28 02 00 00    	mov    %eax,0x228(%ebx)
   11496:	e8 e5 fb ff ff       	call   11080 <@VBESortModes@4>
   1149b:	ba 01 00 00 00       	mov    $0x1,%edx
   114a0:	e9 63 fd ff ff       	jmp    11208 <_VBEInitialize@4+0x28>
   114a5:	8d 74 26 00          	lea    0x0(%esi),%esi
   114a9:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

000114b0 <@VBESetCurrentMode@12>:

/*
 * VBEStartIO
 *
 * Processes the specified Video Request Packet.
 */

BOOLEAN STDCALL
VBEStartIO(
   PVOID HwDeviceExtension,
   PVIDEO_REQUEST_PACKET RequestPacket)
{
   BOOL Result;

   RequestPacket->StatusBlock->Status = STATUS_UNSUCCESSFUL;

   switch (RequestPacket->IoControlCode)
   {
      case IOCTL_VIDEO_SET_CURRENT_MODE:
         if (RequestPacket->InputBufferLength < sizeof(VIDEO_MODE)) 
         {
            RequestPacket->StatusBlock->Status = ERROR_INSUFFICIENT_BUFFER;
            return TRUE;
         }
         Result = VBESetCurrentMode(
            (PVBE_DEVICE_EXTENSION)HwDeviceExtension,
            (PVIDEO_MODE)RequestPacket->InputBuffer,
            RequestPacket->StatusBlock);
         break;

      case IOCTL_VIDEO_RESET_DEVICE:
         Result = VBEResetDevice(
            (PVBE_DEVICE_EXTENSION)HwDeviceExtension,
            RequestPacket->StatusBlock);
         break;

      case IOCTL_VIDEO_MAP_VIDEO_MEMORY:
         if (RequestPacket->OutputBufferLength < sizeof(VIDEO_MEMORY_INFORMATION) ||
             RequestPacket->InputBufferLength < sizeof(VIDEO_MEMORY)) 
         {
            RequestPacket->StatusBlock->Status = ERROR_INSUFFICIENT_BUFFER;
            return TRUE;
         }
         Result = VBEMapVideoMemory(
            (PVBE_DEVICE_EXTENSION)HwDeviceExtension,
            (PVIDEO_MEMORY)RequestPacket->InputBuffer,
            (PVIDEO_MEMORY_INFORMATION)RequestPacket->OutputBuffer,
            RequestPacket->StatusBlock);
         break;

      case IOCTL_VIDEO_UNMAP_VIDEO_MEMORY:
         if (RequestPacket->InputBufferLength < sizeof(VIDEO_MEMORY)) 
         {
            RequestPacket->StatusBlock->Status = ERROR_INSUFFICIENT_BUFFER;
            return TRUE;
         }
         Result = VBEUnmapVideoMemory(
            (PVBE_DEVICE_EXTENSION)HwDeviceExtension,
            (PVIDEO_MEMORY)RequestPacket->InputBuffer,
            RequestPacket->StatusBlock);
         break;

      case IOCTL_VIDEO_QUERY_NUM_AVAIL_MODES:
         if (RequestPacket->OutputBufferLength < sizeof(VIDEO_NUM_MODES)) 
         {
            RequestPacket->StatusBlock->Status = ERROR_INSUFFICIENT_BUFFER;
            return TRUE;
         }
         Result = VBEQueryNumAvailModes(
            (PVBE_DEVICE_EXTENSION)HwDeviceExtension,
            (PVIDEO_NUM_MODES)RequestPacket->OutputBuffer,
            RequestPacket->StatusBlock);
         break;

      case IOCTL_VIDEO_QUERY_AVAIL_MODES:
         if (RequestPacket->OutputBufferLength <
             ((PVBE_DEVICE_EXTENSION)HwDeviceExtension)->ModeCount * sizeof(VIDEO_MODE_INFORMATION)) 
         {
            RequestPacket->StatusBlock->Status = ERROR_INSUFFICIENT_BUFFER;
            return TRUE;
         }
         Result = VBEQueryAvailModes(
            (PVBE_DEVICE_EXTENSION)HwDeviceExtension,
            (PVIDEO_MODE_INFORMATION)RequestPacket->OutputBuffer,
            RequestPacket->StatusBlock);
         break;

      case IOCTL_VIDEO_SET_COLOR_REGISTERS:
         if (RequestPacket->InputBufferLength < sizeof(VIDEO_CLUT) ||
             RequestPacket->InputBufferLength <
             (((PVIDEO_CLUT)RequestPacket->InputBuffer)->NumEntries * sizeof(ULONG)) +
             sizeof(VIDEO_CLUT))
         {
            RequestPacket->StatusBlock->Status = ERROR_INSUFFICIENT_BUFFER;
            return TRUE;
         }
         Result = VBESetColorRegisters(
            (PVBE_DEVICE_EXTENSION)HwDeviceExtension,
            (PVIDEO_CLUT)RequestPacket->InputBuffer,
            RequestPacket->StatusBlock);
         break;

      case IOCTL_VIDEO_QUERY_CURRENT_MODE:
         if (RequestPacket->OutputBufferLength < sizeof(VIDEO_MODE_INFORMATION)) 
         {
            RequestPacket->StatusBlock->Status = ERROR_INSUFFICIENT_BUFFER;
            return TRUE;
         }
         Result = VBEQueryCurrentMode(
            (PVBE_DEVICE_EXTENSION)HwDeviceExtension,
            (PVIDEO_MODE_INFORMATION)RequestPacket->OutputBuffer,
            RequestPacket->StatusBlock);
         break;
         
      default:
         RequestPacket->StatusBlock->Status = STATUS_NOT_IMPLEMENTED;
         return FALSE;
   }
  
   if (Result)
      RequestPacket->StatusBlock->Status = STATUS_SUCCESS;

   return TRUE;
}

/*
 * VBEResetHw
 *
 * This function is called to reset the hardware to a known state.
 */

BOOLEAN STDCALL
VBEResetHw(
   PVOID DeviceExtension,
   ULONG Columns,
   ULONG Rows)
{
   INT10_BIOS_ARGUMENTS BiosRegisters;
   PVBE_DEVICE_EXTENSION VBEDeviceExtension = 
     (PVBE_DEVICE_EXTENSION)DeviceExtension;
   
   if (!VBEResetDevice(DeviceExtension, NULL))
      return FALSE;
   
   /* Change number of columns/rows */
   VideoPortZeroMemory(&BiosRegisters, sizeof(BiosRegisters));
   
   if (Columns == 80 && Rows == 25)
   {
      /* Default text size, don't change anything. */
      return TRUE;
   }
   else if (Columns == 80 && Rows == 28)
   {
      /* Use 9x14 font (80x28) */
      BiosRegisters.Eax = 0x1111;
   }
   else if (Columns == 80 && Rows == 43)
   {
      /* Use 8x8 font in 350 scans mode (80x43) */
      BiosRegisters.Eax = 0x1201;
      BiosRegisters.Ebx = 0x30;
      VBEDeviceExtension->Int10Interface.Int10CallBios(
         VBEDeviceExtension->Int10Interface.Context,
         &BiosRegisters);

      BiosRegisters.Eax = 0x3;
      BiosRegisters.Ebx = 0;
      VBEDeviceExtension->Int10Interface.Int10CallBios(
         VBEDeviceExtension->Int10Interface.Context,
         &BiosRegisters);
      
      BiosRegisters.Eax = 0x1112;
   }
   else if (Columns == 80 && Rows == 50)
   {
      /* Use 8x8 font (80x50) */
      BiosRegisters.Eax = 0x1112;
   }
   else
      return FALSE;
   
   VBEDeviceExtension->Int10Interface.Int10CallBios(
      VBEDeviceExtension->Int10Interface.Context,
      &BiosRegisters);
   
   return TRUE;
}

/*
 * VBEGetPowerState
 *
 * Queries whether the device can support the requested power state.
 */

VP_STATUS STDCALL
VBEGetPowerState(
   PVOID HwDeviceExtension,
   ULONG HwId,
   PVIDEO_POWER_MANAGEMENT VideoPowerControl)
{
   INT10_BIOS_ARGUMENTS BiosRegisters;
   PVBE_DEVICE_EXTENSION VBEDeviceExtension = 
     (PVBE_DEVICE_EXTENSION)HwDeviceExtension;

   if (HwId != DISPLAY_ADAPTER_HW_ID ||
       VideoPowerControl->Length < sizeof(VIDEO_POWER_MANAGEMENT))
      return ERROR_INVALID_FUNCTION;

   /*
    * Get general power support information.
    */

   VideoPortZeroMemory(&BiosRegisters, sizeof(BiosRegisters));
   BiosRegisters.Eax = VBE_POWER_MANAGEMENT_EXTENSIONS;
   BiosRegisters.Ebx = 0;  
   BiosRegisters.Edi = 0;
   BiosRegisters.SegEs = 0;
   VBEDeviceExtension->Int10Interface.Int10CallBios(
      VBEDeviceExtension->Int10Interface.Context,
      &BiosRegisters);

   if (BiosRegisters.Eax == VBE_NOT_SUPPORTED)
      return ERROR_NOT_SUPPORTED;   
   if (BiosRegisters.Eax != VBE_SUCCESS)
      return ERROR_INVALID_FUNCTION;   
   
   /*
    * Get current power state.
    */

   VideoPortZeroMemory(&BiosRegisters, sizeof(BiosRegisters));
   BiosRegisters.Eax = VBE_POWER_MANAGEMENT_EXTENSIONS;
   BiosRegisters.Ebx = 0x2;
   BiosRegisters.Edi = 0;
   BiosRegisters.SegEs = 0;
   VBEDeviceExtension->Int10Interface.Int10CallBios(
      VBEDeviceExtension->Int10Interface.Context,
      &BiosRegisters);

   if (BiosRegisters.Eax == VBE_SUCCESS)
   {
      VideoPowerControl->DPMSVersion = BiosRegisters.Ebx & 0xFF;
      switch (BiosRegisters.Ebx >> 8)
      {
         case 0: VideoPowerControl->PowerState = VideoPowerOn; break;
         case 1: VideoPowerControl->PowerState = VideoPowerStandBy; break;
         case 2: VideoPowerControl->PowerState = VideoPowerSuspend; break;
         case 4: VideoPowerControl->PowerState = VideoPowerOff; break;
         case 5: VideoPowerControl->PowerState = VideoPowerOn; break;
         default: VideoPowerControl->PowerState = VideoPowerUnspecified;
      }

      return NO_ERROR;
   }

   return ERROR_NOT_SUPPORTED;
}

/*
 * VBESetPowerState
 *
 * Sets the power state of the specified device
 */

VP_STATUS STDCALL
VBESetPowerState(
   PVOID HwDeviceExtension,
   ULONG HwId,
   PVIDEO_POWER_MANAGEMENT VideoPowerControl)
{
   INT10_BIOS_ARGUMENTS BiosRegisters;
   PVBE_DEVICE_EXTENSION VBEDeviceExtension = 
     (PVBE_DEVICE_EXTENSION)HwDeviceExtension;

   if (HwId != DISPLAY_ADAPTER_HW_ID ||
       VideoPowerControl->Length < sizeof(VIDEO_POWER_MANAGEMENT) ||
       VideoPowerControl->PowerState < VideoPowerOn ||
       VideoPowerControl->PowerState > VideoPowerHibernate)
      return ERROR_INVALID_FUNCTION;

   if (VideoPowerControl->PowerState == VideoPowerHibernate)
      return NO_ERROR;

   /*
    * Set current power state.
    */

   VideoPortZeroMemory(&BiosRegisters, sizeof(BiosRegisters));
   BiosRegisters.Eax = VBE_POWER_MANAGEMENT_EXTENSIONS;
   BiosRegisters.Ebx = 1;
   BiosRegisters.Edi = 0;
   BiosRegisters.SegEs = 0;
   switch (VideoPowerControl->PowerState)
   {
      case VideoPowerStandBy: BiosRegisters.Ebx |= 0x100; break;
      case VideoPowerSuspend: BiosRegisters.Ebx |= 0x200; break;
      case VideoPowerOff: BiosRegisters.Ebx |= 0x400; break;
   }

   VBEDeviceExtension->Int10Interface.Int10CallBios(
      VBEDeviceExtension->Int10Interface.Context,
      &BiosRegisters);

   if (BiosRegisters.Eax == VBE_NOT_SUPPORTED)
      return ERROR_NOT_SUPPORTED;   
   if (BiosRegisters.Eax != VBE_SUCCESS)
      return ERROR_INVALID_FUNCTION;   

   return VBE_SUCCESS;
}

/*
 * VBESetCurrentMode
 *
 * Sets the adapter to the specified operating mode.
 */

BOOL FASTCALL
VBESetCurrentMode(
   PVBE_DEVICE_EXTENSION DeviceExtension,
   PVIDEO_MODE RequestedMode,
   PSTATUS_BLOCK StatusBlock)
{
   114b0:	55                   	push   %ebp
   114b1:	89 e5                	mov    %esp,%ebp
   114b3:	57                   	push   %edi
   114b4:	56                   	push   %esi
   114b5:	53                   	push   %ebx
   114b6:	83 ec 2c             	sub    $0x2c,%esp
   114b9:	89 d7                	mov    %edx,%edi
   INT10_BIOS_ARGUMENTS BiosRegisters;

   if (RequestedMode->RequestedMode >= DeviceExtension->ModeCount)
   114bb:	8b 81 28 02 00 00    	mov    0x228(%ecx),%eax
   114c1:	89 ce                	mov    %ecx,%esi
   {
      return ERROR_INVALID_PARAMETER;
   114c3:	ba 57 00 00 00       	mov    $0x57,%edx
   114c8:	39 07                	cmp    %eax,(%edi)
   114ca:	73 4e                	jae    1151a <@VBESetCurrentMode@12+0x6a>
   }

   VideoPortZeroMemory(&BiosRegisters, sizeof(BiosRegisters));
   114cc:	8d 5d c8             	lea    0xffffffc8(%ebp),%ebx
   114cf:	50                   	push   %eax
   114d0:	50                   	push   %eax
   114d1:	6a 20                	push   $0x20
   114d3:	53                   	push   %ebx
   114d4:	ff 15 94 30 01 00    	call   *0x13094
   BiosRegisters.Eax = VBE_SET_VBE_MODE;
   BiosRegisters.Ebx = DeviceExtension->ModeNumbers[RequestedMode->RequestedMode];
   114da:	8b 17                	mov    (%edi),%edx
   114dc:	8b 86 2c 02 00 00    	mov    0x22c(%esi),%eax
   114e2:	c7 45 c8 02 4f 00 00 	movl   $0x4f02,0xffffffc8(%ebp)
   114e9:	66 8b 04 50          	mov    (%eax,%edx,2),%ax
   DeviceExtension->Int10Interface.Int10CallBios(
   114ed:	53                   	push   %ebx
   114ee:	25 ff ff 00 00       	and    $0xffff,%eax
   114f3:	89 45 cc             	mov    %eax,0xffffffcc(%ebp)
   114f6:	8b 46 04             	mov    0x4(%esi),%eax
   114f9:	50                   	push   %eax
   114fa:	ff 56 20             	call   *0x20(%esi)
      DeviceExtension->Int10Interface.Context,
      &BiosRegisters);

   if (BiosRegisters.Eax == VBE_SUCCESS)
   114fd:	8b 4d c8             	mov    0xffffffc8(%ebp),%ecx
   11500:	5b                   	pop    %ebx
   11501:	83 f9 4f             	cmp    $0x4f,%ecx
   11504:	58                   	pop    %eax
   11505:	74 1f                	je     11526 <@VBESetCurrentMode@12+0x76>
   {
      DeviceExtension->CurrentMode = RequestedMode->RequestedMode;
   }
   else
   {
      DPRINT(("VBEMP: VBESetCurrentMode failed (%x)\n", BiosRegisters.Eax));
      DeviceExtension->CurrentMode = -1;
   11507:	66 c7 86 34 02 00 00 	movw   $0xffff,0x234(%esi)
   1150e:	ff ff 
   }

   return BiosRegisters.Eax == VBE_SUCCESS;
   11510:	83 f9 4f             	cmp    $0x4f,%ecx
   11513:	0f 94 c0             	sete   %al
   11516:	31 d2                	xor    %edx,%edx
   11518:	88 c2                	mov    %al,%dl
}
   1151a:	8d 65 f4             	lea    0xfffffff4(%ebp),%esp
   1151d:	89 d0                	mov    %edx,%eax
   1151f:	5b                   	pop    %ebx
   11520:	5e                   	pop    %esi
   11521:	5f                   	pop    %edi
   11522:	5d                   	pop    %ebp
   11523:	c2 04 00             	ret    $0x4
   11526:	8b 07                	mov    (%edi),%eax
   11528:	66 89 86 34 02 00 00 	mov    %ax,0x234(%esi)
   1152f:	eb df                	jmp    11510 <@VBESetCurrentMode@12+0x60>
   11531:	eb 0d                	jmp    11540 <@VBEResetDevice@8>
   11533:	90                   	nop    
   11534:	90                   	nop    
   11535:	90                   	nop    
   11536:	90                   	nop    
   11537:	90                   	nop    
   11538:	90                   	nop    
   11539:	90                   	nop    
   1153a:	90                   	nop    
   1153b:	90                   	nop    
   1153c:	90                   	nop    
   1153d:	90                   	nop    
   1153e:	90                   	nop    
   1153f:	90                   	nop    

00011540 <@VBEResetDevice@8>:

/*
 * VBEResetDevice
 *
 * Resets the video hardware to the default mode, to which it was initialized
 * at system boot. 
 */

BOOL FASTCALL
VBEResetDevice(
   PVBE_DEVICE_EXTENSION DeviceExtension,
   PSTATUS_BLOCK StatusBlock)
{
   11540:	55                   	push   %ebp
   11541:	89 e5                	mov    %esp,%ebp
   11543:	56                   	push   %esi
   11544:	53                   	push   %ebx
   11545:	89 ce                	mov    %ecx,%esi
   11547:	83 ec 28             	sub    $0x28,%esp
   INT10_BIOS_ARGUMENTS BiosRegisters;

   VideoPortZeroMemory(&BiosRegisters, sizeof(BiosRegisters));
   1154a:	8d 5d d8             	lea    0xffffffd8(%ebp),%ebx
   1154d:	6a 20                	push   $0x20
   1154f:	53                   	push   %ebx
   11550:	ff 15 94 30 01 00    	call   *0x13094
   BiosRegisters.Eax = VBE_SET_VBE_MODE;
   BiosRegisters.Ebx = 0x3;
   DeviceExtension->Int10Interface.Int10CallBios(
   11556:	8b 4e 04             	mov    0x4(%esi),%ecx
   11559:	c7 45 d8 02 4f 00 00 	movl   $0x4f02,0xffffffd8(%ebp)
   11560:	c7 45 dc 03 00 00 00 	movl   $0x3,0xffffffdc(%ebp)
   11567:	53                   	push   %ebx
   11568:	51                   	push   %ecx
   11569:	ff 56 20             	call   *0x20(%esi)
      DeviceExtension->Int10Interface.Context,
      &BiosRegisters);

   return BiosRegisters.Eax == VBE_SUCCESS;
   1156c:	83 7d d8 4f          	cmpl   $0x4f,0xffffffd8(%ebp)
   11570:	58                   	pop    %eax
   11571:	5a                   	pop    %edx
   11572:	0f 94 c0             	sete   %al
   11575:	25 ff 00 00 00       	and    $0xff,%eax
}
   1157a:	8d 65 f8             	lea    0xfffffff8(%ebp),%esp
   1157d:	5b                   	pop    %ebx
   1157e:	5e                   	pop    %esi
   1157f:	5d                   	pop    %ebp
   11580:	c3                   	ret    
   11581:	eb 0d                	jmp    11590 <@VBEQueryNumAvailModes@12>
   11583:	90                   	nop    
   11584:	90                   	nop    
   11585:	90                   	nop    
   11586:	90                   	nop    
   11587:	90                   	nop    
   11588:	90                   	nop    
   11589:	90                   	nop    
   1158a:	90                   	nop    
   1158b:	90                   	nop    
   1158c:	90                   	nop    
   1158d:	90                   	nop    
   1158e:	90                   	nop    
   1158f:	90                   	nop    

00011590 <@VBEQueryNumAvailModes@12>:

/*
 * VBEMapVideoMemory
 *
 * Maps the video hardware frame buffer and video RAM into the virtual address
 * space of the requestor. 
 */

BOOL FASTCALL
VBEMapVideoMemory(
   PVBE_DEVICE_EXTENSION DeviceExtension,
   PVIDEO_MEMORY RequestedAddress,
   PVIDEO_MEMORY_INFORMATION MapInformation,
   PSTATUS_BLOCK StatusBlock)
{
   PHYSICAL_ADDRESS FrameBuffer;
   ULONG inIoSpace = VIDEO_MEMORY_SPACE_MEMORY;

   StatusBlock->Information = sizeof(VIDEO_MEMORY_INFORMATION);

   if (DeviceExtension->ModeInfo[DeviceExtension->CurrentMode].ModeAttributes &
       VBE_MODEATTR_LINEAR)
   {    
      FrameBuffer.QuadPart =
         DeviceExtension->ModeInfo[DeviceExtension->CurrentMode].PhysBasePtr;
      MapInformation->VideoRamBase = RequestedAddress->RequestedVirtualAddress;
      if (DeviceExtension->VbeInfo.Version < 0x300)
      {
         MapInformation->VideoRamLength = 
            DeviceExtension->ModeInfo[DeviceExtension->CurrentMode].BytesPerScanLine *
            DeviceExtension->ModeInfo[DeviceExtension->CurrentMode].YResolution;
      }
      else
      {
         MapInformation->VideoRamLength = 
            DeviceExtension->ModeInfo[DeviceExtension->CurrentMode].LinBytesPerScanLine *
            DeviceExtension->ModeInfo[DeviceExtension->CurrentMode].YResolution;
      }
   }
#ifdef VBE12_SUPPORT
   else
   {
      FrameBuffer.QuadPart = 0xA0000;    
      MapInformation->VideoRamBase = RequestedAddress->RequestedVirtualAddress;
      MapInformation->VideoRamLength = 0x10000;
   }
#endif

   VideoPortMapMemory(DeviceExtension, FrameBuffer,
      &MapInformation->VideoRamLength, &inIoSpace,
      &MapInformation->VideoRamBase);

   MapInformation->FrameBufferBase = MapInformation->VideoRamBase;
   MapInformation->FrameBufferLength = MapInformation->VideoRamLength;

   return TRUE;
}

/*
 * VBEUnmapVideoMemory
 *
 * Releases a mapping between the virtual address space and the adapter's
 * frame buffer and video RAM.
 */

BOOL FASTCALL
VBEUnmapVideoMemory(
   PVBE_DEVICE_EXTENSION DeviceExtension,
   PVIDEO_MEMORY VideoMemory,
   PSTATUS_BLOCK StatusBlock)
{
   VideoPortUnmapMemory(DeviceExtension, VideoMemory->RequestedVirtualAddress,
      NULL);
   return TRUE;
}   

/*
 * VBEQueryNumAvailModes
 *
 * Returns the number of video modes supported by the adapter and the size
 * in bytes of the video mode information, which can be used to allocate a
 * buffer for an IOCTL_VIDEO_QUERY_AVAIL_MODES request.
 */

BOOL FASTCALL
VBEQueryNumAvailModes(
   PVBE_DEVICE_EXTENSION DeviceExtension,
   PVIDEO_NUM_MODES Modes,
   PSTATUS_BLOCK StatusBlock)
{
   11590:	55                   	push   %ebp
   Modes->NumModes = DeviceExtension->ModeCount;
   11591:	8b 81 28 02 00 00    	mov    0x228(%ecx),%eax
   11597:	89 e5                	mov    %esp,%ebp
   11599:	89 02                	mov    %eax,(%edx)
   Modes->ModeInformationLength = sizeof(VIDEO_MODE_INFORMATION);
   1159b:	c7 42 04 50 00 00 00 	movl   $0x50,0x4(%edx)
   StatusBlock->Information = sizeof(VIDEO_NUM_MODES);
   115a2:	8b 45 08             	mov    0x8(%ebp),%eax
   115a5:	c7 40 04 08 00 00 00 	movl   $0x8,0x4(%eax)
   return TRUE;
}
   115ac:	b8 01 00 00 00       	mov    $0x1,%eax
   115b1:	5d                   	pop    %ebp
   115b2:	c2 04 00             	ret    $0x4
   115b5:	8d 74 26 00          	lea    0x0(%esi),%esi
   115b9:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

000115c0 <_VBEResetHw@12>:
   115c0:	55                   	push   %ebp
   115c1:	31 d2                	xor    %edx,%edx
   115c3:	89 e5                	mov    %esp,%ebp
   115c5:	57                   	push   %edi
   115c6:	56                   	push   %esi
   115c7:	53                   	push   %ebx
   115c8:	83 ec 2c             	sub    $0x2c,%esp
   115cb:	8b 5d 08             	mov    0x8(%ebp),%ebx
   115ce:	8b 75 10             	mov    0x10(%ebp),%esi
   115d1:	89 d9                	mov    %ebx,%ecx
   115d3:	e8 68 ff ff ff       	call   11540 <@VBEResetDevice@8>
   115d8:	31 d2                	xor    %edx,%edx
   115da:	85 c0                	test   %eax,%eax
   115dc:	75 12                	jne    115f0 <_VBEResetHw@12+0x30>
   115de:	8d 65 f4             	lea    0xfffffff4(%ebp),%esp
   115e1:	89 d0                	mov    %edx,%eax
   115e3:	5b                   	pop    %ebx
   115e4:	5e                   	pop    %esi
   115e5:	5f                   	pop    %edi
   115e6:	5d                   	pop    %ebp
   115e7:	c2 0c 00             	ret    $0xc
   115ea:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
   115f0:	8d 7d c8             	lea    0xffffffc8(%ebp),%edi
   115f3:	51                   	push   %ecx
   115f4:	51                   	push   %ecx
   115f5:	6a 20                	push   $0x20
   115f7:	57                   	push   %edi
   115f8:	ff 15 94 30 01 00    	call   *0x13094
   115fe:	83 7d 0c 50          	cmpl   $0x50,0xc(%ebp)
   11602:	58                   	pop    %eax
   11603:	5a                   	pop    %edx
   11604:	0f 94 c0             	sete   %al
   11607:	31 c9                	xor    %ecx,%ecx
   11609:	83 fe 19             	cmp    $0x19,%esi
   1160c:	88 c1                	mov    %al,%cl
   1160e:	ba 01 00 00 00       	mov    $0x1,%edx
   11613:	0f 94 c0             	sete   %al
   11616:	85 c8                	test   %ecx,%eax
   11618:	75 c4                	jne    115de <_VBEResetHw@12+0x1e>
   1161a:	83 fe 1c             	cmp    $0x1c,%esi
   1161d:	0f 94 c0             	sete   %al
   11620:	85 c8                	test   %ecx,%eax
   11622:	74 22                	je     11646 <_VBEResetHw@12+0x86>
   11624:	c7 45 c8 11 11 00 00 	movl   $0x1111,0xffffffc8(%ebp)
   1162b:	50                   	push   %eax
   1162c:	50                   	push   %eax
   1162d:	57                   	push   %edi
   1162e:	8b 73 04             	mov    0x4(%ebx),%esi
   11631:	56                   	push   %esi
   11632:	ff 53 20             	call   *0x20(%ebx)
   11635:	ba 01 00 00 00       	mov    $0x1,%edx
   1163a:	8d 65 f4             	lea    0xfffffff4(%ebp),%esp
   1163d:	89 d0                	mov    %edx,%eax
   1163f:	5b                   	pop    %ebx
   11640:	5e                   	pop    %esi
   11641:	5f                   	pop    %edi
   11642:	5d                   	pop    %ebp
   11643:	c2 0c 00             	ret    $0xc
   11646:	83 fe 2b             	cmp    $0x2b,%esi
   11649:	0f 94 c0             	sete   %al
   1164c:	85 c8                	test   %ecx,%eax
   1164e:	75 15                	jne    11665 <_VBEResetHw@12+0xa5>
   11650:	83 fe 32             	cmp    $0x32,%esi
   11653:	0f 94 c0             	sete   %al
   11656:	31 d2                	xor    %edx,%edx
   11658:	85 c8                	test   %ecx,%eax
   1165a:	74 82                	je     115de <_VBEResetHw@12+0x1e>
   1165c:	c7 45 c8 12 11 00 00 	movl   $0x1112,0xffffffc8(%ebp)
   11663:	eb c6                	jmp    1162b <_VBEResetHw@12+0x6b>
   11665:	c7 45 c8 01 12 00 00 	movl   $0x1201,0xffffffc8(%ebp)
   1166c:	c7 45 cc 30 00 00 00 	movl   $0x30,0xffffffcc(%ebp)
   11673:	50                   	push   %eax
   11674:	50                   	push   %eax
   11675:	57                   	push   %edi
   11676:	8b 73 04             	mov    0x4(%ebx),%esi
   11679:	56                   	push   %esi
   1167a:	ff 53 20             	call   *0x20(%ebx)
   1167d:	c7 45 c8 03 00 00 00 	movl   $0x3,0xffffffc8(%ebp)
   11684:	c7 45 cc 00 00 00 00 	movl   $0x0,0xffffffcc(%ebp)
   1168b:	57                   	push   %edi
   1168c:	8b 4b 04             	mov    0x4(%ebx),%ecx
   1168f:	51                   	push   %ecx
   11690:	ff 53 20             	call   *0x20(%ebx)
   11693:	c7 45 c8 12 11 00 00 	movl   $0x1112,0xffffffc8(%ebp)
   1169a:	58                   	pop    %eax
   1169b:	5a                   	pop    %edx
   1169c:	eb 8d                	jmp    1162b <_VBEResetHw@12+0x6b>
   1169e:	89 f6                	mov    %esi,%esi

000116a0 <_VBEGetPowerState@12>:
   116a0:	55                   	push   %ebp
   116a1:	89 e5                	mov    %esp,%ebp
   116a3:	57                   	push   %edi
   116a4:	56                   	push   %esi
   116a5:	53                   	push   %ebx
   116a6:	83 ec 2c             	sub    $0x2c,%esp
   116a9:	8b 75 08             	mov    0x8(%ebp),%esi
   116ac:	8b 5d 10             	mov    0x10(%ebp),%ebx
   116af:	83 7d 0c ff          	cmpl   $0xffffffff,0xc(%ebp)
   116b3:	74 0f                	je     116c4 <_VBEGetPowerState@12+0x24>
   116b5:	b8 01 00 00 00       	mov    $0x1,%eax
   116ba:	8d 65 f4             	lea    0xfffffff4(%ebp),%esp
   116bd:	5b                   	pop    %ebx
   116be:	5e                   	pop    %esi
   116bf:	5f                   	pop    %edi
   116c0:	5d                   	pop    %ebp
   116c1:	c2 0c 00             	ret    $0xc
   116c4:	83 3b 0b             	cmpl   $0xb,(%ebx)
   116c7:	76 ec                	jbe    116b5 <_VBEGetPowerState@12+0x15>
   116c9:	8d 7d c8             	lea    0xffffffc8(%ebp),%edi
   116cc:	50                   	push   %eax
   116cd:	50                   	push   %eax
   116ce:	6a 20                	push   $0x20
   116d0:	57                   	push   %edi
   116d1:	ff 15 94 30 01 00    	call   *0x13094
   116d7:	c7 45 c8 10 4f 00 00 	movl   $0x4f10,0xffffffc8(%ebp)
   116de:	c7 45 cc 00 00 00 00 	movl   $0x0,0xffffffcc(%ebp)
   116e5:	c7 45 dc 00 00 00 00 	movl   $0x0,0xffffffdc(%ebp)
   116ec:	57                   	push   %edi
   116ed:	66 c7 45 e6 00 00    	movw   $0x0,0xffffffe6(%ebp)
   116f3:	8b 46 04             	mov    0x4(%esi),%eax
   116f6:	50                   	push   %eax
   116f7:	ff 56 20             	call   *0x20(%esi)
   116fa:	8b 55 c8             	mov    0xffffffc8(%ebp),%edx
   116fd:	58                   	pop    %eax
   116fe:	81 fa 4f 02 00 00    	cmp    $0x24f,%edx
   11704:	59                   	pop    %ecx
   11705:	b8 32 00 00 00       	mov    $0x32,%eax
   1170a:	74 ae                	je     116ba <_VBEGetPowerState@12+0x1a>
   1170c:	b0 01                	mov    $0x1,%al
   1170e:	83 fa 4f             	cmp    $0x4f,%edx
   11711:	75 a7                	jne    116ba <_VBEGetPowerState@12+0x1a>
   11713:	50                   	push   %eax
   11714:	50                   	push   %eax
   11715:	6a 20                	push   $0x20
   11717:	57                   	push   %edi
   11718:	ff 15 94 30 01 00    	call   *0x13094
   1171e:	c7 45 c8 10 4f 00 00 	movl   $0x4f10,0xffffffc8(%ebp)
   11725:	c7 45 cc 02 00 00 00 	movl   $0x2,0xffffffcc(%ebp)
   1172c:	57                   	push   %edi
   1172d:	c7 45 dc 00 00 00 00 	movl   $0x0,0xffffffdc(%ebp)
   11734:	8b 46 04             	mov    0x4(%esi),%eax
   11737:	66 c7 45 e6 00 00    	movw   $0x0,0xffffffe6(%ebp)
   1173d:	50                   	push   %eax
   1173e:	ff 56 20             	call   *0x20(%esi)
   11741:	b8 32 00 00 00       	mov    $0x32,%eax
   11746:	5e                   	pop    %esi
   11747:	83 7d c8 4f          	cmpl   $0x4f,0xffffffc8(%ebp)
   1174b:	5f                   	pop    %edi
   1174c:	0f 85 68 ff ff ff    	jne    116ba <_VBEGetPowerState@12+0x1a>
   11752:	8b 55 cc             	mov    0xffffffcc(%ebp),%edx
   11755:	0f b6 c2             	movzbl %dl,%eax
   11758:	89 43 04             	mov    %eax,0x4(%ebx)
   1175b:	89 d0                	mov    %edx,%eax
   1175d:	c1 e8 08             	shr    $0x8,%eax
   11760:	83 f8 05             	cmp    $0x5,%eax
   11763:	77 15                	ja     1177a <_VBEGetPowerState@12+0xda>
   11765:	ff 24 85 08 20 01 00 	jmp    *0x12008(,%eax,4)
   1176c:	31 c0                	xor    %eax,%eax
   1176e:	c7 43 08 01 00 00 00 	movl   $0x1,0x8(%ebx)
   11775:	e9 40 ff ff ff       	jmp    116ba <_VBEGetPowerState@12+0x1a>
   1177a:	31 c0                	xor    %eax,%eax
   1177c:	c7 43 08 00 00 00 00 	movl   $0x0,0x8(%ebx)
   11783:	e9 32 ff ff ff       	jmp    116ba <_VBEGetPowerState@12+0x1a>
   11788:	31 c0                	xor    %eax,%eax
   1178a:	c7 43 08 02 00 00 00 	movl   $0x2,0x8(%ebx)
   11791:	e9 24 ff ff ff       	jmp    116ba <_VBEGetPowerState@12+0x1a>
   11796:	31 c0                	xor    %eax,%eax
   11798:	c7 43 08 04 00 00 00 	movl   $0x4,0x8(%ebx)
   1179f:	e9 16 ff ff ff       	jmp    116ba <_VBEGetPowerState@12+0x1a>
   117a4:	31 c0                	xor    %eax,%eax
   117a6:	c7 43 08 03 00 00 00 	movl   $0x3,0x8(%ebx)
   117ad:	e9 08 ff ff ff       	jmp    116ba <_VBEGetPowerState@12+0x1a>
   117b2:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi
   117b9:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

000117c0 <_VBESetPowerState@12>:
   117c0:	55                   	push   %ebp
   117c1:	89 e5                	mov    %esp,%ebp
   117c3:	57                   	push   %edi
   117c4:	56                   	push   %esi
   117c5:	53                   	push   %ebx
   117c6:	83 ec 2c             	sub    $0x2c,%esp
   117c9:	8b 75 08             	mov    0x8(%ebp),%esi
   117cc:	8b 5d 10             	mov    0x10(%ebp),%ebx
   117cf:	83 7d 0c ff          	cmpl   $0xffffffff,0xc(%ebp)
   117d3:	74 0f                	je     117e4 <_VBESetPowerState@12+0x24>
   117d5:	b8 01 00 00 00       	mov    $0x1,%eax
   117da:	8d 65 f4             	lea    0xfffffff4(%ebp),%esp
   117dd:	5b                   	pop    %ebx
   117de:	5e                   	pop    %esi
   117df:	5f                   	pop    %edi
   117e0:	5d                   	pop    %ebp
   117e1:	c2 0c 00             	ret    $0xc
   117e4:	83 3b 0b             	cmpl   $0xb,(%ebx)
   117e7:	76 ec                	jbe    117d5 <_VBESetPowerState@12+0x15>
   117e9:	8b 43 08             	mov    0x8(%ebx),%eax
   117ec:	85 c0                	test   %eax,%eax
   117ee:	74 e5                	je     117d5 <_VBESetPowerState@12+0x15>
   117f0:	83 f8 05             	cmp    $0x5,%eax
   117f3:	77 e0                	ja     117d5 <_VBESetPowerState@12+0x15>
   117f5:	75 04                	jne    117fb <_VBESetPowerState@12+0x3b>
   117f7:	31 c0                	xor    %eax,%eax
   117f9:	eb df                	jmp    117da <_VBESetPowerState@12+0x1a>
   117fb:	8d 7d c8             	lea    0xffffffc8(%ebp),%edi
   117fe:	51                   	push   %ecx
   117ff:	51                   	push   %ecx
   11800:	6a 20                	push   $0x20
   11802:	57                   	push   %edi
   11803:	ff 15 94 30 01 00    	call   *0x13094
   11809:	c7 45 c8 10 4f 00 00 	movl   $0x4f10,0xffffffc8(%ebp)
   11810:	c7 45 dc 00 00 00 00 	movl   $0x0,0xffffffdc(%ebp)
   11817:	58                   	pop    %eax
   11818:	8b 43 08             	mov    0x8(%ebx),%eax
   1181b:	66 c7 45 e6 00 00    	movw   $0x0,0xffffffe6(%ebp)
   11821:	5a                   	pop    %edx
   11822:	83 f8 03             	cmp    $0x3,%eax
   11825:	74 4f                	je     11876 <_VBESetPowerState@12+0xb6>
   11827:	77 3f                	ja     11868 <_VBESetPowerState@12+0xa8>
   11829:	83 f8 02             	cmp    $0x2,%eax
   1182c:	74 51                	je     1187f <_VBESetPowerState@12+0xbf>
   1182e:	c7 45 cc 01 00 00 00 	movl   $0x1,0xffffffcc(%ebp)
   11835:	50                   	push   %eax
   11836:	50                   	push   %eax
   11837:	57                   	push   %edi
   11838:	8b 5e 04             	mov    0x4(%esi),%ebx
   1183b:	53                   	push   %ebx
   1183c:	ff 56 20             	call   *0x20(%esi)
   1183f:	8b 55 c8             	mov    0xffffffc8(%ebp),%edx
   11842:	58                   	pop    %eax
   11843:	81 fa 4f 02 00 00    	cmp    $0x24f,%edx
   11849:	59                   	pop    %ecx
   1184a:	b8 32 00 00 00       	mov    $0x32,%eax
   1184f:	74 89                	je     117da <_VBESetPowerState@12+0x1a>
   11851:	83 fa 4f             	cmp    $0x4f,%edx
   11854:	0f 94 c0             	sete   %al
   11857:	25 ff 00 00 00       	and    $0xff,%eax
   1185c:	48                   	dec    %eax
   1185d:	83 e0 b2             	and    $0xffffffb2,%eax
   11860:	83 c0 4f             	add    $0x4f,%eax
   11863:	e9 72 ff ff ff       	jmp    117da <_VBESetPowerState@12+0x1a>
   11868:	83 f8 04             	cmp    $0x4,%eax
   1186b:	75 c1                	jne    1182e <_VBESetPowerState@12+0x6e>
   1186d:	c7 45 cc 01 04 00 00 	movl   $0x401,0xffffffcc(%ebp)
   11874:	eb bf                	jmp    11835 <_VBESetPowerState@12+0x75>
   11876:	c7 45 cc 01 02 00 00 	movl   $0x201,0xffffffcc(%ebp)
   1187d:	eb b6                	jmp    11835 <_VBESetPowerState@12+0x75>
   1187f:	c7 45 cc 01 01 00 00 	movl   $0x101,0xffffffcc(%ebp)
   11886:	eb ad                	jmp    11835 <_VBESetPowerState@12+0x75>
   11888:	90                   	nop    
   11889:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi

00011890 <@VBEMapVideoMemory@16>:
   11890:	55                   	push   %ebp
   11891:	89 e5                	mov    %esp,%ebp
   11893:	57                   	push   %edi
   11894:	56                   	push   %esi
   11895:	53                   	push   %ebx
   11896:	83 ec 1c             	sub    $0x1c,%esp
   11899:	c7 45 ec 00 00 00 00 	movl   $0x0,0xffffffec(%ebp)
   118a0:	8b 45 0c             	mov    0xc(%ebp),%eax
   118a3:	8b 99 30 02 00 00    	mov    0x230(%ecx),%ebx
   118a9:	89 cf                	mov    %ecx,%edi
   118ab:	89 55 dc             	mov    %edx,0xffffffdc(%ebp)
   118ae:	c7 40 04 10 00 00 00 	movl   $0x10,0x4(%eax)
   118b5:	66 8b 81 34 02 00 00 	mov    0x234(%ecx),%ax
   118bc:	25 ff ff 00 00       	and    $0xffff,%eax
   118c1:	8b 75 08             	mov    0x8(%ebp),%esi
   118c4:	89 c1                	mov    %eax,%ecx
   118c6:	c1 e1 08             	shl    $0x8,%ecx
   118c9:	29 c1                	sub    %eax,%ecx
   118cb:	f6 04 19 80          	testb  $0x80,(%ecx,%ebx,1)
   118cf:	74 36                	je     11907 <@VBEMapVideoMemory@16+0x77>
   118d1:	31 d2                	xor    %edx,%edx
   118d3:	8b 44 19 28          	mov    0x28(%ecx,%ebx,1),%eax
   118d7:	89 55 e4             	mov    %edx,0xffffffe4(%ebp)
   118da:	8b 55 dc             	mov    0xffffffdc(%ebp),%edx
   118dd:	89 45 e0             	mov    %eax,0xffffffe0(%ebp)
   118e0:	8b 02                	mov    (%edx),%eax
   118e2:	89 06                	mov    %eax,(%esi)
   118e4:	66 81 7f 2c ff 02    	cmpw   $0x2ff,0x2c(%edi)
   118ea:	76 54                	jbe    11940 <@VBEMapVideoMemory@16+0xb0>
   118ec:	66 8b 54 19 32       	mov    0x32(%ecx,%ebx,1),%dx
   118f1:	66 8b 44 19 14       	mov    0x14(%ecx,%ebx,1),%ax
   118f6:	81 e2 ff ff 00 00    	and    $0xffff,%edx
   118fc:	25 ff ff 00 00       	and    $0xffff,%eax
   11901:	0f af d0             	imul   %eax,%edx
   11904:	89 56 04             	mov    %edx,0x4(%esi)
   11907:	50                   	push   %eax
   11908:	50                   	push   %eax
   11909:	8d 45 ec             	lea    0xffffffec(%ebp),%eax
   1190c:	56                   	push   %esi
   1190d:	50                   	push   %eax
   1190e:	8d 46 04             	lea    0x4(%esi),%eax
   11911:	8b 5d e0             	mov    0xffffffe0(%ebp),%ebx
   11914:	50                   	push   %eax
   11915:	8b 45 e4             	mov    0xffffffe4(%ebp),%eax
   11918:	50                   	push   %eax
   11919:	53                   	push   %ebx
   1191a:	57                   	push   %edi
   1191b:	ff 15 80 30 01 00    	call   *0x13080
   11921:	8b 06                	mov    (%esi),%eax
   11923:	89 46 08             	mov    %eax,0x8(%esi)
   11926:	8b 46 04             	mov    0x4(%esi),%eax
   11929:	89 46 0c             	mov    %eax,0xc(%esi)
   1192c:	8d 65 f4             	lea    0xfffffff4(%ebp),%esp
   1192f:	b8 01 00 00 00       	mov    $0x1,%eax
   11934:	5b                   	pop    %ebx
   11935:	5e                   	pop    %esi
   11936:	5f                   	pop    %edi
   11937:	5d                   	pop    %ebp
   11938:	c2 08 00             	ret    $0x8
   1193b:	90                   	nop    
   1193c:	8d 74 26 00          	lea    0x0(%esi),%esi
   11940:	66 8b 54 19 10       	mov    0x10(%ecx,%ebx,1),%dx
   11945:	eb aa                	jmp    118f1 <@VBEMapVideoMemory@16+0x61>
   11947:	89 f6                	mov    %esi,%esi
   11949:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

00011950 <@VBEUnmapVideoMemory@12>:
   11950:	55                   	push   %ebp
   11951:	89 e5                	mov    %esp,%ebp
   11953:	83 ec 0c             	sub    $0xc,%esp
   11956:	8b 02                	mov    (%edx),%eax
   11958:	6a 00                	push   $0x0
   1195a:	50                   	push   %eax
   1195b:	51                   	push   %ecx
   1195c:	ff 15 8c 30 01 00    	call   *0x1308c
   11962:	b8 01 00 00 00       	mov    $0x1,%eax
   11967:	c9                   	leave  
   11968:	c2 04 00             	ret    $0x4
   1196b:	90                   	nop    
   1196c:	8d 74 26 00          	lea    0x0(%esi),%esi

00011970 <@VBEQueryMode@12>:

/*
 * VBEQueryMode
 *
 * Returns information about one particular video mode.
 */

VOID FASTCALL  
VBEQueryMode(
   PVBE_DEVICE_EXTENSION DeviceExtension,
   PVIDEO_MODE_INFORMATION VideoMode,
   ULONG VideoModeId)
{
   11970:	55                   	push   %ebp
   11971:	89 e5                	mov    %esp,%ebp
   11973:	57                   	push   %edi
   11974:	56                   	push   %esi
   11975:	53                   	push   %ebx
   11976:	50                   	push   %eax
   11977:	50                   	push   %eax
   11978:	8b 45 08             	mov    0x8(%ebp),%eax
   PVBE_MODEINFO VBEMode = &DeviceExtension->ModeInfo[VideoModeId];
   1197b:	8b b9 30 02 00 00    	mov    0x230(%ecx),%edi
   11981:	89 c6                	mov    %eax,%esi

   VideoMode->Length = sizeof(VIDEO_MODE_INFORMATION);
   VideoMode->ModeIndex = VideoModeId;
   11983:	89 42 04             	mov    %eax,0x4(%edx)
   11986:	c1 e6 08             	shl    $0x8,%esi
   11989:	89 d3                	mov    %edx,%ebx
   1198b:	29 c6                	sub    %eax,%esi
   1198d:	c7 02 50 00 00 00    	movl   $0x50,(%edx)
   11993:	01 fe                	add    %edi,%esi
   VideoMode->VisScreenWidth = VBEMode->XResolution;
   11995:	66 8b 46 12          	mov    0x12(%esi),%ax
   11999:	66 89 45 f2          	mov    %ax,0xfffffff2(%ebp)
   1199d:	25 ff ff 00 00       	and    $0xffff,%eax
   119a2:	89 42 08             	mov    %eax,0x8(%edx)
   VideoMode->VisScreenHeight = VBEMode->YResolution;
   119a5:	66 8b 46 14          	mov    0x14(%esi),%ax
   119a9:	66 89 45 f0          	mov    %ax,0xfffffff0(%ebp)
   119ad:	25 ff ff 00 00       	and    $0xffff,%eax
   119b2:	89 42 0c             	mov    %eax,0xc(%edx)
   if (DeviceExtension->VbeInfo.Version < 0x300)
   119b5:	66 8b 51 2c          	mov    0x2c(%ecx),%dx
   119b9:	66 81 fa ff 02       	cmp    $0x2ff,%dx
   119be:	0f 87 bf 00 00 00    	ja     11a83 <@VBEQueryMode@12+0x113>
      VideoMode->ScreenStride = VBEMode->BytesPerScanLine;
   119c4:	66 8b 46 10          	mov    0x10(%esi),%ax
   else
      VideoMode->ScreenStride = VBEMode->LinBytesPerScanLine;
   119c8:	25 ff ff 00 00       	and    $0xffff,%eax
   119cd:	89 43 10             	mov    %eax,0x10(%ebx)
   VideoMode->NumberOfPlanes = VBEMode->NumberOfPlanes;
   119d0:	31 c0                	xor    %eax,%eax
   119d2:	8a 46 18             	mov    0x18(%esi),%al
   119d5:	89 43 14             	mov    %eax,0x14(%ebx)
   VideoMode->BitsPerPlane = VBEMode->BitsPerPixel / VBEMode->NumberOfPlanes;
   119d8:	31 c0                	xor    %eax,%eax
   119da:	8a 46 19             	mov    0x19(%esi),%al
   119dd:	f6 76 18             	divb   0x18(%esi)
   119e0:	25 ff 00 00 00       	and    $0xff,%eax
   VideoMode->Frequency = 1;
   119e5:	c7 43 1c 01 00 00 00 	movl   $0x1,0x1c(%ebx)
   119ec:	89 43 18             	mov    %eax,0x18(%ebx)
   VideoMode->XMillimeter = 0; /* FIXME */
   119ef:	c7 43 20 00 00 00 00 	movl   $0x0,0x20(%ebx)
   VideoMode->YMillimeter = 0; /* FIXME */
   119f6:	c7 43 24 00 00 00 00 	movl   $0x0,0x24(%ebx)
   119fd:	89 c7                	mov    %eax,%edi
   if (VBEMode->BitsPerPixel > 8)
   119ff:	80 7e 19 08          	cmpb   $0x8,0x19(%esi)
   11a03:	0f 86 87 00 00 00    	jbe    11a90 <@VBEQueryMode@12+0x120>
   {
      if (DeviceExtension->VbeInfo.Version < 0x300)
   11a09:	66 81 fa ff 02       	cmp    $0x2ff,%dx
   11a0e:	0f 87 dc 00 00 00    	ja     11af0 <@VBEQueryMode@12+0x180>
      {
         VideoMode->NumberRedBits = VBEMode->RedMaskSize;
   11a14:	31 c0                	xor    %eax,%eax
         VideoMode->NumberGreenBits = VBEMode->GreenMaskSize;
         VideoMode->NumberBlueBits = VBEMode->BlueMaskSize;
         VideoMode->RedMask = ((1 << VBEMode->RedMaskSize) - 1) << VBEMode->RedFieldPosition;
   11a16:	ba 01 00 00 00       	mov    $0x1,%edx
   11a1b:	8a 46 1f             	mov    0x1f(%esi),%al
   11a1e:	31 c9                	xor    %ecx,%ecx
   11a20:	89 43 28             	mov    %eax,0x28(%ebx)
   11a23:	31 c0                	xor    %eax,%eax
   11a25:	8a 46 21             	mov    0x21(%esi),%al
   11a28:	89 43 2c             	mov    %eax,0x2c(%ebx)
   11a2b:	31 c0                	xor    %eax,%eax
   11a2d:	8a 46 23             	mov    0x23(%esi),%al
   11a30:	89 43 30             	mov    %eax,0x30(%ebx)
   11a33:	89 d0                	mov    %edx,%eax
   11a35:	8a 4e 1f             	mov    0x1f(%esi),%cl
   11a38:	d3 e0                	shl    %cl,%eax
   11a3a:	89 c1                	mov    %eax,%ecx
   11a3c:	31 c0                	xor    %eax,%eax
   11a3e:	49                   	dec    %ecx
   11a3f:	89 4d ec             	mov    %ecx,0xffffffec(%ebp)
   11a42:	8a 46 20             	mov    0x20(%esi),%al
   11a45:	88 c1                	mov    %al,%cl
   11a47:	d3 65 ec             	shll   %cl,0xffffffec(%ebp)
   11a4a:	8b 45 ec             	mov    0xffffffec(%ebp),%eax
         VideoMode->GreenMask = ((1 << VBEMode->GreenMaskSize) - 1) << VBEMode->GreenFieldPosition;
   11a4d:	31 c9                	xor    %ecx,%ecx
   11a4f:	89 43 34             	mov    %eax,0x34(%ebx)
   11a52:	89 d0                	mov    %edx,%eax
   11a54:	8a 4e 21             	mov    0x21(%esi),%cl
   11a57:	d3 e0                	shl    %cl,%eax
   11a59:	89 c1                	mov    %eax,%ecx
   11a5b:	31 c0                	xor    %eax,%eax
   11a5d:	49                   	dec    %ecx
   11a5e:	89 4d ec             	mov    %ecx,0xffffffec(%ebp)
   11a61:	8a 46 22             	mov    0x22(%esi),%al
   11a64:	88 c1                	mov    %al,%cl
   11a66:	d3 65 ec             	shll   %cl,0xffffffec(%ebp)
   11a69:	8b 45 ec             	mov    0xffffffec(%ebp),%eax
         VideoMode->BlueMask = ((1 << VBEMode->BlueMaskSize) - 1) << VBEMode->BlueFieldPosition;
   11a6c:	31 c9                	xor    %ecx,%ecx
   11a6e:	89 43 38             	mov    %eax,0x38(%ebx)
   11a71:	8a 4e 23             	mov    0x23(%esi),%cl
   11a74:	d3 e2                	shl    %cl,%edx
   11a76:	31 c9                	xor    %ecx,%ecx
   11a78:	4a                   	dec    %edx
   11a79:	8a 4e 24             	mov    0x24(%esi),%cl
      }
      else
      {
         VideoMode->NumberRedBits = VBEMode->LinRedMaskSize;
         VideoMode->NumberGreenBits = VBEMode->LinGreenMaskSize;
         VideoMode->NumberBlueBits = VBEMode->LinBlueMaskSize;
         VideoMode->RedMask = ((1 << VBEMode->LinRedMaskSize) - 1) << VBEMode->LinRedFieldPosition;
         VideoMode->GreenMask = ((1 << VBEMode->LinGreenMaskSize) - 1) << VBEMode->LinGreenFieldPosition;
         VideoMode->BlueMask = ((1 << VBEMode->LinBlueMaskSize) - 1) << VBEMode->LinBlueFieldPosition;
   11a7c:	d3 e2                	shl    %cl,%edx
   11a7e:	89 53 3c             	mov    %edx,0x3c(%ebx)
   11a81:	eb 37                	jmp    11aba <@VBEQueryMode@12+0x14a>
   11a83:	66 8b 46 32          	mov    0x32(%esi),%ax
   11a87:	e9 3c ff ff ff       	jmp    119c8 <@VBEQueryMode@12+0x58>
   11a8c:	8d 74 26 00          	lea    0x0(%esi),%esi
      }
   }
   else
   {
      VideoMode->NumberRedBits = 
   11a90:	c7 43 30 06 00 00 00 	movl   $0x6,0x30(%ebx)
   11a97:	c7 43 2c 06 00 00 00 	movl   $0x6,0x2c(%ebx)
   11a9e:	c7 43 28 06 00 00 00 	movl   $0x6,0x28(%ebx)
      VideoMode->NumberGreenBits = 
      VideoMode->NumberBlueBits = 6;
      VideoMode->RedMask = 
   11aa5:	c7 43 3c 00 00 00 00 	movl   $0x0,0x3c(%ebx)
   11aac:	c7 43 38 00 00 00 00 	movl   $0x0,0x38(%ebx)
   11ab3:	c7 43 34 00 00 00 00 	movl   $0x0,0x34(%ebx)
      VideoMode->GreenMask = 
      VideoMode->BlueMask = 0;
   }
   VideoMode->VideoMemoryBitmapWidth = VBEMode->XResolution;
   11aba:	66 8b 45 f2          	mov    0xfffffff2(%ebp),%ax
   VideoMode->VideoMemoryBitmapHeight = VBEMode->YResolution;
   VideoMode->AttributeFlags = VIDEO_MODE_GRAPHICS | VIDEO_MODE_COLOR |
      VIDEO_MODE_NO_OFF_SCREEN;
   if (VideoMode->BitsPerPlane <= 8)
      VideoMode->AttributeFlags |= VIDEO_MODE_PALETTE_DRIVEN;
   VideoMode->DriverSpecificAttributeFlags = 0;
   11abe:	c7 43 4c 00 00 00 00 	movl   $0x0,0x4c(%ebx)
   11ac5:	25 ff ff 00 00       	and    $0xffff,%eax
   11aca:	89 43 44             	mov    %eax,0x44(%ebx)
   11acd:	8b 45 f0             	mov    0xfffffff0(%ebp),%eax
   11ad0:	25 ff ff 00 00       	and    $0xffff,%eax
   11ad5:	83 ff 09             	cmp    $0x9,%edi
   11ad8:	89 43 48             	mov    %eax,0x48(%ebx)
   11adb:	19 c0                	sbb    %eax,%eax
   11add:	83 e0 04             	and    $0x4,%eax
   11ae0:	83 c0 23             	add    $0x23,%eax
   11ae3:	89 43 40             	mov    %eax,0x40(%ebx)
   11ae6:	58                   	pop    %eax
   11ae7:	5a                   	pop    %edx
   11ae8:	5b                   	pop    %ebx
   11ae9:	5e                   	pop    %esi
   11aea:	5f                   	pop    %edi
   11aeb:	5d                   	pop    %ebp
   11aec:	c2 04 00             	ret    $0x4
   11aef:	90                   	nop    
   11af0:	31 c0                	xor    %eax,%eax
   11af2:	ba 01 00 00 00       	mov    $0x1,%edx
   11af7:	8a 46 36             	mov    0x36(%esi),%al
   11afa:	31 c9                	xor    %ecx,%ecx
   11afc:	89 43 28             	mov    %eax,0x28(%ebx)
   11aff:	31 c0                	xor    %eax,%eax
   11b01:	8a 46 38             	mov    0x38(%esi),%al
   11b04:	89 43 2c             	mov    %eax,0x2c(%ebx)
   11b07:	31 c0                	xor    %eax,%eax
   11b09:	8a 46 3a             	mov    0x3a(%esi),%al
   11b0c:	89 43 30             	mov    %eax,0x30(%ebx)
   11b0f:	89 d0                	mov    %edx,%eax
   11b11:	8a 4e 36             	mov    0x36(%esi),%cl
   11b14:	d3 e0                	shl    %cl,%eax
   11b16:	89 c1                	mov    %eax,%ecx
   11b18:	31 c0                	xor    %eax,%eax
   11b1a:	49                   	dec    %ecx
   11b1b:	89 4d ec             	mov    %ecx,0xffffffec(%ebp)
   11b1e:	8a 46 37             	mov    0x37(%esi),%al
   11b21:	88 c1                	mov    %al,%cl
   11b23:	d3 65 ec             	shll   %cl,0xffffffec(%ebp)
   11b26:	8b 45 ec             	mov    0xffffffec(%ebp),%eax
   11b29:	31 c9                	xor    %ecx,%ecx
   11b2b:	89 43 34             	mov    %eax,0x34(%ebx)
   11b2e:	89 d0                	mov    %edx,%eax
   11b30:	8a 4e 38             	mov    0x38(%esi),%cl
   11b33:	d3 e0                	shl    %cl,%eax
   11b35:	89 c1                	mov    %eax,%ecx
   11b37:	31 c0                	xor    %eax,%eax
   11b39:	49                   	dec    %ecx
   11b3a:	89 4d ec             	mov    %ecx,0xffffffec(%ebp)
   11b3d:	8a 46 39             	mov    0x39(%esi),%al
   11b40:	88 c1                	mov    %al,%cl
   11b42:	d3 65 ec             	shll   %cl,0xffffffec(%ebp)
   11b45:	8b 45 ec             	mov    0xffffffec(%ebp),%eax
   11b48:	31 c9                	xor    %ecx,%ecx
   11b4a:	89 43 38             	mov    %eax,0x38(%ebx)
   11b4d:	8a 4e 3a             	mov    0x3a(%esi),%cl
   11b50:	d3 e2                	shl    %cl,%edx
   11b52:	31 c9                	xor    %ecx,%ecx
   11b54:	4a                   	dec    %edx
   11b55:	8a 4e 3b             	mov    0x3b(%esi),%cl
   11b58:	d3 e2                	shl    %cl,%edx
   11b5a:	89 53 3c             	mov    %edx,0x3c(%ebx)
   11b5d:	e9 58 ff ff ff       	jmp    11aba <@VBEQueryMode@12+0x14a>
   11b62:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi
   11b69:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

00011b70 <@VBEQueryCurrentMode@12>:
}

/*
 * VBEQueryAvailModes
 *
 * Returns information about each video mode supported by the adapter.
 */

BOOL FASTCALL
VBEQueryAvailModes(
   PVBE_DEVICE_EXTENSION DeviceExtension,
   PVIDEO_MODE_INFORMATION ReturnedModes,
   PSTATUS_BLOCK StatusBlock)
{
   ULONG CurrentModeId;
   PVIDEO_MODE_INFORMATION CurrentMode;
   PVBE_MODEINFO CurrentVBEMode;

   for (CurrentModeId = 0, CurrentMode = ReturnedModes,
        CurrentVBEMode = DeviceExtension->ModeInfo;
        CurrentModeId < DeviceExtension->ModeCount;
        CurrentModeId++, CurrentMode++, CurrentVBEMode++)
   {
      VBEQueryMode(DeviceExtension, CurrentMode, CurrentModeId);
   }

   StatusBlock->Information =
      sizeof(VIDEO_MODE_INFORMATION) * DeviceExtension->ModeCount;

   return TRUE;
}

/*
 * VBEQueryCurrentMode
 *
 * Returns information about current video mode.
 */

BOOL FASTCALL  
VBEQueryCurrentMode(
   PVBE_DEVICE_EXTENSION DeviceExtension,
   PVIDEO_MODE_INFORMATION VideoModeInfo,
   PSTATUS_BLOCK StatusBlock)
{
   11b70:	55                   	push   %ebp
   11b71:	89 e5                	mov    %esp,%ebp
   StatusBlock->Information = sizeof(VIDEO_MODE_INFORMATION);
   11b73:	8b 45 08             	mov    0x8(%ebp),%eax
   11b76:	c7 40 04 50 00 00 00 	movl   $0x50,0x4(%eax)

   VBEQueryMode(
   11b7d:	66 8b 81 34 02 00 00 	mov    0x234(%ecx),%ax
   11b84:	25 ff ff 00 00       	and    $0xffff,%eax
   11b89:	50                   	push   %eax
   11b8a:	e8 e1 fd ff ff       	call   11970 <@VBEQueryMode@12>
      DeviceExtension,
      VideoModeInfo,
      DeviceExtension->CurrentMode);

   return TRUE;
}
   11b8f:	b8 01 00 00 00       	mov    $0x1,%eax
   11b94:	c9                   	leave  
   11b95:	c2 04 00             	ret    $0x4
   11b98:	90                   	nop    
   11b99:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi

00011ba0 <@VBEQueryAvailModes@12>:
   11ba0:	55                   	push   %ebp
   11ba1:	89 e5                	mov    %esp,%ebp
   11ba3:	57                   	push   %edi
   11ba4:	56                   	push   %esi
   11ba5:	53                   	push   %ebx
   11ba6:	8b 81 28 02 00 00    	mov    0x228(%ecx),%eax
   11bac:	31 ff                	xor    %edi,%edi
   11bae:	89 ce                	mov    %ecx,%esi
   11bb0:	89 d3                	mov    %edx,%ebx
   11bb2:	83 f8 00             	cmp    $0x0,%eax
   11bb5:	76 18                	jbe    11bcf <@VBEQueryAvailModes@12+0x2f>
   11bb7:	89 da                	mov    %ebx,%edx
   11bb9:	89 f1                	mov    %esi,%ecx
   11bbb:	57                   	push   %edi
   11bbc:	47                   	inc    %edi
   11bbd:	e8 ae fd ff ff       	call   11970 <@VBEQueryMode@12>
   11bc2:	8b 86 28 02 00 00    	mov    0x228(%esi),%eax
   11bc8:	83 c3 50             	add    $0x50,%ebx
   11bcb:	39 f8                	cmp    %edi,%eax
   11bcd:	77 e8                	ja     11bb7 <@VBEQueryAvailModes@12+0x17>
   11bcf:	8b 55 08             	mov    0x8(%ebp),%edx
   11bd2:	8d 04 80             	lea    (%eax,%eax,4),%eax
   11bd5:	c1 e0 04             	shl    $0x4,%eax
   11bd8:	89 42 04             	mov    %eax,0x4(%edx)
   11bdb:	8d 65 f4             	lea    0xfffffff4(%ebp),%esp
   11bde:	b8 01 00 00 00       	mov    $0x1,%eax
   11be3:	5b                   	pop    %ebx
   11be4:	5e                   	pop    %esi
   11be5:	5f                   	pop    %edi
   11be6:	5d                   	pop    %ebp
   11be7:	c2 04 00             	ret    $0x4
   11bea:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi

00011bf0 <@VBESetColorRegisters@12>:

/*
 * VBESetColorRegisters
 *
 * Sets the adapter's color registers to the specified RGB values. There
 * are code paths in this function, one generic and one for VGA compatible
 * controllers. The latter is needed for Bochs, where the generic one isn't
 * yet implemented.
 */

BOOL FASTCALL
VBESetColorRegisters(
   PVBE_DEVICE_EXTENSION DeviceExtension,
   PVIDEO_CLUT ColorLookUpTable,
   PSTATUS_BLOCK StatusBlock)
{
   11bf0:	55                   	push   %ebp
   11bf1:	89 e5                	mov    %esp,%ebp
   11bf3:	57                   	push   %edi
   11bf4:	56                   	push   %esi
   11bf5:	53                   	push   %ebx
   11bf6:	81 ec 3c 04 00 00    	sub    $0x43c,%esp
   11bfc:	89 d6                	mov    %edx,%esi
   INT10_BIOS_ARGUMENTS BiosRegisters;
   ULONG Entry;
   PULONG OutputEntry;
   ULONG OutputBuffer[256];

   if (ColorLookUpTable->NumEntries + ColorLookUpTable->FirstEntry > 256)
   11bfe:	66 8b 02             	mov    (%edx),%ax
   11c01:	66 8b 52 02          	mov    0x2(%edx),%dx
   11c05:	25 ff ff 00 00       	and    $0xffff,%eax
   11c0a:	81 e2 ff ff 00 00    	and    $0xffff,%edx
   11c10:	01 d0                	add    %edx,%eax
   11c12:	89 cf                	mov    %ecx,%edi
      return FALSE;
   11c14:	31 c9                	xor    %ecx,%ecx
   11c16:	3d 00 01 00 00       	cmp    $0x100,%eax
   11c1b:	7f 7b                	jg     11c98 <@VBESetColorRegisters@12+0xa8>

   /*
    * For VGA compatible adapters program the color registers directly.
    */

   if (!(DeviceExtension->VbeInfo.Capabilities & 2))
   11c1d:	f6 47 32 02          	testb  $0x2,0x32(%edi)
   11c21:	0f 85 7d 00 00 00    	jne    11ca4 <@VBESetColorRegisters@12+0xb4>
   {
      for (Entry = ColorLookUpTable->FirstEntry;
   11c27:	89 d3                	mov    %edx,%ebx
   11c29:	39 d0                	cmp    %edx,%eax
   11c2b:	76 66                	jbe    11c93 <@VBESetColorRegisters@12+0xa3>
   11c2d:	8d 76 00             	lea    0x0(%esi),%esi
           Entry < ColorLookUpTable->NumEntries + ColorLookUpTable->FirstEntry;
           Entry++)
      {
         VideoPortWritePortUchar((PUCHAR)0x03c8, Entry);
   11c30:	50                   	push   %eax
   11c31:	50                   	push   %eax
   11c32:	31 c0                	xor    %eax,%eax
   11c34:	88 d8                	mov    %bl,%al
   11c36:	50                   	push   %eax
   11c37:	68 c8 03 00 00       	push   $0x3c8
   11c3c:	ff 15 90 30 01 00    	call   *0x13090
         VideoPortWritePortUchar((PUCHAR)0x03c9, ColorLookUpTable->LookupTable[Entry].RgbArray.Red);
   11c42:	31 c0                	xor    %eax,%eax
   11c44:	8a 44 9e 04          	mov    0x4(%esi,%ebx,4),%al
   11c48:	50                   	push   %eax
   11c49:	68 c9 03 00 00       	push   $0x3c9
   11c4e:	ff 15 90 30 01 00    	call   *0x13090
         VideoPortWritePortUchar((PUCHAR)0x03c9, ColorLookUpTable->LookupTable[Entry].RgbArray.Green);
   11c54:	31 c0                	xor    %eax,%eax
   11c56:	8a 44 9e 05          	mov    0x5(%esi,%ebx,4),%al
   11c5a:	50                   	push   %eax
   11c5b:	68 c9 03 00 00       	push   $0x3c9
   11c60:	ff 15 90 30 01 00    	call   *0x13090
         VideoPortWritePortUchar((PUCHAR)0x03c9, ColorLookUpTable->LookupTable[Entry].RgbArray.Blue);
   11c66:	31 c0                	xor    %eax,%eax
   11c68:	8a 44 9e 06          	mov    0x6(%esi,%ebx,4),%al
   11c6c:	43                   	inc    %ebx
   11c6d:	50                   	push   %eax
   11c6e:	68 c9 03 00 00       	push   $0x3c9
   11c73:	ff 15 90 30 01 00    	call   *0x13090
   11c79:	66 8b 16             	mov    (%esi),%dx
   11c7c:	5f                   	pop    %edi
   11c7d:	58                   	pop    %eax
   11c7e:	66 8b 46 02          	mov    0x2(%esi),%ax
   11c82:	81 e2 ff ff 00 00    	and    $0xffff,%edx
   11c88:	25 ff ff 00 00       	and    $0xffff,%eax
   11c8d:	01 c2                	add    %eax,%edx
   11c8f:	39 da                	cmp    %ebx,%edx
   11c91:	77 9d                	ja     11c30 <@VBESetColorRegisters@12+0x40>
      }

      return TRUE;
   11c93:	b9 01 00 00 00       	mov    $0x1,%ecx
   }
   else
   {
      /*
       * We can't just copy the values, because we need to swap the Red 
       * and Blue values.
       */

      for (Entry = ColorLookUpTable->FirstEntry,
           OutputEntry = OutputBuffer;
           Entry < ColorLookUpTable->NumEntries + ColorLookUpTable->FirstEntry;
           Entry++, OutputEntry++)
      {
         *OutputEntry =
            (ColorLookUpTable->LookupTable[Entry].RgbArray.Red << 16) |
            (ColorLookUpTable->LookupTable[Entry].RgbArray.Green << 8) |
            (ColorLookUpTable->LookupTable[Entry].RgbArray.Blue);
      }

      DeviceExtension->Int10Interface.Int10WriteMemory(
         DeviceExtension->Int10Interface.Context,
         DeviceExtension->TrampolineMemorySegment,
         DeviceExtension->TrampolineMemoryOffset,
         OutputBuffer,
         (OutputEntry - OutputBuffer) * sizeof(ULONG));

      VideoPortZeroMemory(&BiosRegisters, sizeof(BiosRegisters));
      BiosRegisters.Eax = VBE_SET_GET_PALETTE_DATA;
      BiosRegisters.Ebx = 0;
      BiosRegisters.Ecx = ColorLookUpTable->NumEntries;
      BiosRegisters.Edx = ColorLookUpTable->FirstEntry;
      BiosRegisters.Edi = DeviceExtension->TrampolineMemoryOffset;
      BiosRegisters.SegEs = DeviceExtension->TrampolineMemorySegment;
      DeviceExtension->Int10Interface.Int10CallBios(
         DeviceExtension->Int10Interface.Context,
         &BiosRegisters);

      return BiosRegisters.Eax == VBE_SUCCESS;
   }
}
   11c98:	8d 65 f4             	lea    0xfffffff4(%ebp),%esp
   11c9b:	89 c8                	mov    %ecx,%eax
   11c9d:	5b                   	pop    %ebx
   11c9e:	5e                   	pop    %esi
   11c9f:	5f                   	pop    %edi
   11ca0:	5d                   	pop    %ebp
   11ca1:	c2 04 00             	ret    $0x4
   11ca4:	89 d3                	mov    %edx,%ebx
   11ca6:	8d 8d c8 fb ff ff    	lea    0xfffffbc8(%ebp),%ecx
   11cac:	39 d0                	cmp    %edx,%eax
   11cae:	76 30                	jbe    11ce0 <@VBESetColorRegisters@12+0xf0>
   11cb0:	89 85 c4 fb ff ff    	mov    %eax,0xfffffbc4(%ebp)
   11cb6:	31 c0                	xor    %eax,%eax
   11cb8:	31 d2                	xor    %edx,%edx
   11cba:	8a 44 9e 04          	mov    0x4(%esi,%ebx,4),%al
   11cbe:	8a 54 9e 05          	mov    0x5(%esi,%ebx,4),%dl
   11cc2:	c1 e2 08             	shl    $0x8,%edx
   11cc5:	c1 e0 10             	shl    $0x10,%eax
   11cc8:	09 d0                	or     %edx,%eax
   11cca:	31 d2                	xor    %edx,%edx
   11ccc:	8a 54 9e 06          	mov    0x6(%esi,%ebx,4),%dl
   11cd0:	43                   	inc    %ebx
   11cd1:	09 d0                	or     %edx,%eax
   11cd3:	89 01                	mov    %eax,(%ecx)
   11cd5:	83 c1 04             	add    $0x4,%ecx
   11cd8:	39 9d c4 fb ff ff    	cmp    %ebx,0xfffffbc4(%ebp)
   11cde:	77 d6                	ja     11cb6 <@VBESetColorRegisters@12+0xc6>
   11ce0:	83 ec 0c             	sub    $0xc,%esp
   11ce3:	8d 85 c8 fb ff ff    	lea    0xfffffbc8(%ebp),%eax
   11ce9:	29 c1                	sub    %eax,%ecx
   11ceb:	51                   	push   %ecx
   11cec:	50                   	push   %eax
   11ced:	66 8b 47 26          	mov    0x26(%edi),%ax
   11cf1:	25 ff ff 00 00       	and    $0xffff,%eax
   11cf6:	50                   	push   %eax
   11cf7:	66 8b 47 24          	mov    0x24(%edi),%ax
   11cfb:	25 ff ff 00 00       	and    $0xffff,%eax
   11d00:	50                   	push   %eax
   11d01:	8b 5f 04             	mov    0x4(%edi),%ebx
   11d04:	53                   	push   %ebx
   11d05:	ff 57 1c             	call   *0x1c(%edi)
   11d08:	8d 5d c8             	lea    0xffffffc8(%ebp),%ebx
   11d0b:	c7 04 24 20 00 00 00 	movl   $0x20,(%esp)
   11d12:	53                   	push   %ebx
   11d13:	ff 15 94 30 01 00    	call   *0x13094
   11d19:	66 8b 06             	mov    (%esi),%ax
   11d1c:	25 ff ff 00 00       	and    $0xffff,%eax
   11d21:	c7 45 c8 09 4f 00 00 	movl   $0x4f09,0xffffffc8(%ebp)
   11d28:	89 45 d0             	mov    %eax,0xffffffd0(%ebp)
   11d2b:	66 8b 46 02          	mov    0x2(%esi),%ax
   11d2f:	25 ff ff 00 00       	and    $0xffff,%eax
   11d34:	c7 45 cc 00 00 00 00 	movl   $0x0,0xffffffcc(%ebp)
   11d3b:	89 45 d4             	mov    %eax,0xffffffd4(%ebp)
   11d3e:	66 8b 47 26          	mov    0x26(%edi),%ax
   11d42:	25 ff ff 00 00       	and    $0xffff,%eax
   11d47:	89 45 dc             	mov    %eax,0xffffffdc(%ebp)
   11d4a:	66 8b 47 24          	mov    0x24(%edi),%ax
   11d4e:	66 89 45 e6          	mov    %ax,0xffffffe6(%ebp)
   11d52:	53                   	push   %ebx
   11d53:	8b 4f 04             	mov    0x4(%edi),%ecx
   11d56:	51                   	push   %ecx
   11d57:	ff 57 20             	call   *0x20(%edi)
   11d5a:	83 7d c8 4f          	cmpl   $0x4f,0xffffffc8(%ebp)
   11d5e:	58                   	pop    %eax
   11d5f:	5a                   	pop    %edx
   11d60:	0f 94 c0             	sete   %al
   11d63:	31 c9                	xor    %ecx,%ecx
   11d65:	8d 65 f4             	lea    0xfffffff4(%ebp),%esp
   11d68:	88 c1                	mov    %al,%cl
   11d6a:	5b                   	pop    %ebx
   11d6b:	89 c8                	mov    %ecx,%eax
   11d6d:	5e                   	pop    %esi
   11d6e:	5f                   	pop    %edi
   11d6f:	5d                   	pop    %ebp
   11d70:	c2 04 00             	ret    $0x4
   11d73:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
   11d79:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

00011d80 <_VBEStartIO@8>:
   11d80:	55                   	push   %ebp
   11d81:	89 e5                	mov    %esp,%ebp
   11d83:	56                   	push   %esi
   11d84:	53                   	push   %ebx
   11d85:	8b 5d 0c             	mov    0xc(%ebp),%ebx
   11d88:	8b 4d 08             	mov    0x8(%ebp),%ecx
   11d8b:	8b 43 04             	mov    0x4(%ebx),%eax
   11d8e:	c7 00 01 00 00 c0    	movl   $0xc0000001,(%eax)
   11d94:	8b 03                	mov    (%ebx),%eax
   11d96:	3d 0c 04 23 00       	cmp    $0x23040c,%eax
   11d9b:	0f 84 8f 00 00 00    	je     11e30 <_VBEStartIO@8+0xb0>
   11da1:	77 31                	ja     11dd4 <_VBEStartIO@8+0x54>
   11da3:	3d 04 04 23 00       	cmp    $0x230404,%eax
   11da8:	0f 84 d7 00 00 00    	je     11e85 <_VBEStartIO@8+0x105>
   11dae:	0f 86 91 00 00 00    	jbe    11e45 <_VBEStartIO@8+0xc5>
   11db4:	3d 08 04 23 00       	cmp    $0x230408,%eax
   11db9:	0f 84 57 01 00 00    	je     11f16 <_VBEStartIO@8+0x196>
   11dbf:	90                   	nop    
   11dc0:	8b 43 04             	mov    0x4(%ebx),%eax
   11dc3:	c7 00 02 00 00 c0    	movl   $0xc0000002,(%eax)
   11dc9:	8d 65 f8             	lea    0xfffffff8(%ebp),%esp
   11dcc:	31 c0                	xor    %eax,%eax
   11dce:	5b                   	pop    %ebx
   11dcf:	5e                   	pop    %esi
   11dd0:	5d                   	pop    %ebp
   11dd1:	c2 08 00             	ret    $0x8
   11dd4:	3d 1c 04 23 00       	cmp    $0x23041c,%eax
   11dd9:	0f 84 c1 00 00 00    	je     11ea0 <_VBEStartIO@8+0x120>
   11ddf:	0f 86 8b 00 00 00    	jbe    11e70 <_VBEStartIO@8+0xf0>
   11de5:	3d 58 04 23 00       	cmp    $0x230458,%eax
   11dea:	0f 84 f9 00 00 00    	je     11ee9 <_VBEStartIO@8+0x169>
   11df0:	3d 5c 04 23 00       	cmp    $0x23045c,%eax
   11df5:	75 c9                	jne    11dc0 <_VBEStartIO@8+0x40>
   11df7:	83 7b 0c 03          	cmpl   $0x3,0xc(%ebx)
   11dfb:	76 3d                	jbe    11e3a <_VBEStartIO@8+0xba>
   11dfd:	83 ec 0c             	sub    $0xc,%esp
   11e00:	8b 53 08             	mov    0x8(%ebx),%edx
   11e03:	8b 73 04             	mov    0x4(%ebx),%esi
   11e06:	56                   	push   %esi
   11e07:	e8 44 fb ff ff       	call   11950 <@VBEUnmapVideoMemory@12>
   11e0c:	8d 74 26 00          	lea    0x0(%esi),%esi
   11e10:	83 c4 0c             	add    $0xc,%esp
   11e13:	85 c0                	test   %eax,%eax
   11e15:	74 09                	je     11e20 <_VBEStartIO@8+0xa0>
   11e17:	8b 43 04             	mov    0x4(%ebx),%eax
   11e1a:	c7 00 00 00 00 00    	movl   $0x0,(%eax)
   11e20:	8d 65 f8             	lea    0xfffffff8(%ebp),%esp
   11e23:	b8 01 00 00 00       	mov    $0x1,%eax
   11e28:	5b                   	pop    %ebx
   11e29:	5e                   	pop    %esi
   11e2a:	5d                   	pop    %ebp
   11e2b:	c2 08 00             	ret    $0x8
   11e2e:	89 f6                	mov    %esi,%esi
   11e30:	83 7b 0c 03          	cmpl   $0x3,0xc(%ebx)
   11e34:	0f 87 9b 00 00 00    	ja     11ed5 <_VBEStartIO@8+0x155>
   11e3a:	8b 43 04             	mov    0x4(%ebx),%eax
   11e3d:	c7 00 7a 00 00 00    	movl   $0x7a,(%eax)
   11e43:	eb db                	jmp    11e20 <_VBEStartIO@8+0xa0>
   11e45:	3d 00 04 23 00       	cmp    $0x230400,%eax
   11e4a:	0f 85 70 ff ff ff    	jne    11dc0 <_VBEStartIO@8+0x40>
   11e50:	8b 81 28 02 00 00    	mov    0x228(%ecx),%eax
   11e56:	8d 04 80             	lea    (%eax,%eax,4),%eax
   11e59:	c1 e0 04             	shl    $0x4,%eax
   11e5c:	39 43 14             	cmp    %eax,0x14(%ebx)
   11e5f:	72 d9                	jb     11e3a <_VBEStartIO@8+0xba>
   11e61:	8b 53 10             	mov    0x10(%ebx),%edx
   11e64:	8b 43 04             	mov    0x4(%ebx),%eax
   11e67:	50                   	push   %eax
   11e68:	e8 33 fd ff ff       	call   11ba0 <@VBEQueryAvailModes@12>
   11e6d:	eb a4                	jmp    11e13 <_VBEStartIO@8+0x93>
   11e6f:	90                   	nop    
   11e70:	3d 10 04 23 00       	cmp    $0x230410,%eax
   11e75:	0f 85 45 ff ff ff    	jne    11dc0 <_VBEStartIO@8+0x40>
   11e7b:	8b 53 04             	mov    0x4(%ebx),%edx
   11e7e:	e8 bd f6 ff ff       	call   11540 <@VBEResetDevice@8>
   11e83:	eb 8e                	jmp    11e13 <_VBEStartIO@8+0x93>
   11e85:	83 7b 14 07          	cmpl   $0x7,0x14(%ebx)
   11e89:	76 af                	jbe    11e3a <_VBEStartIO@8+0xba>
   11e8b:	8b 53 10             	mov    0x10(%ebx),%edx
   11e8e:	8b 43 04             	mov    0x4(%ebx),%eax
   11e91:	50                   	push   %eax
   11e92:	e8 f9 f6 ff ff       	call   11590 <@VBEQueryNumAvailModes@12>
   11e97:	e9 77 ff ff ff       	jmp    11e13 <_VBEStartIO@8+0x93>
   11e9c:	8d 74 26 00          	lea    0x0(%esi),%esi
   11ea0:	8b 53 0c             	mov    0xc(%ebx),%edx
   11ea3:	83 fa 07             	cmp    $0x7,%edx
   11ea6:	76 92                	jbe    11e3a <_VBEStartIO@8+0xba>
   11ea8:	8b 73 08             	mov    0x8(%ebx),%esi
   11eab:	66 8b 06             	mov    (%esi),%ax
   11eae:	25 ff ff 00 00       	and    $0xffff,%eax
   11eb3:	8d 04 85 08 00 00 00 	lea    0x8(,%eax,4),%eax
   11eba:	39 c2                	cmp    %eax,%edx
   11ebc:	0f 82 78 ff ff ff    	jb     11e3a <_VBEStartIO@8+0xba>
   11ec2:	83 ec 0c             	sub    $0xc,%esp
   11ec5:	8b 43 04             	mov    0x4(%ebx),%eax
   11ec8:	89 f2                	mov    %esi,%edx
   11eca:	50                   	push   %eax
   11ecb:	e8 20 fd ff ff       	call   11bf0 <@VBESetColorRegisters@12>
   11ed0:	e9 3b ff ff ff       	jmp    11e10 <_VBEStartIO@8+0x90>
   11ed5:	83 ec 0c             	sub    $0xc,%esp
   11ed8:	8b 53 08             	mov    0x8(%ebx),%edx
   11edb:	8b 43 04             	mov    0x4(%ebx),%eax
   11ede:	50                   	push   %eax
   11edf:	e8 cc f5 ff ff       	call   114b0 <@VBESetCurrentMode@12>
   11ee4:	e9 27 ff ff ff       	jmp    11e10 <_VBEStartIO@8+0x90>
   11ee9:	83 7b 14 0f          	cmpl   $0xf,0x14(%ebx)
   11eed:	0f 86 47 ff ff ff    	jbe    11e3a <_VBEStartIO@8+0xba>
   11ef3:	83 7b 0c 03          	cmpl   $0x3,0xc(%ebx)
   11ef7:	0f 86 3d ff ff ff    	jbe    11e3a <_VBEStartIO@8+0xba>
   11efd:	50                   	push   %eax
   11efe:	50                   	push   %eax
   11eff:	8b 43 04             	mov    0x4(%ebx),%eax
   11f02:	8b 53 08             	mov    0x8(%ebx),%edx
   11f05:	50                   	push   %eax
   11f06:	8b 73 10             	mov    0x10(%ebx),%esi
   11f09:	56                   	push   %esi
   11f0a:	e8 81 f9 ff ff       	call   11890 <@VBEMapVideoMemory@16>
   11f0f:	5a                   	pop    %edx
   11f10:	59                   	pop    %ecx
   11f11:	e9 fd fe ff ff       	jmp    11e13 <_VBEStartIO@8+0x93>
   11f16:	83 7b 14 4f          	cmpl   $0x4f,0x14(%ebx)
   11f1a:	0f 86 1a ff ff ff    	jbe    11e3a <_VBEStartIO@8+0xba>
   11f20:	8b 53 10             	mov    0x10(%ebx),%edx
   11f23:	8b 43 04             	mov    0x4(%ebx),%eax
   11f26:	50                   	push   %eax
   11f27:	e8 44 fc ff ff       	call   11b70 <@VBEQueryCurrentMode@12>
   11f2c:	e9 e2 fe ff ff       	jmp    11e13 <_VBEStartIO@8+0x93>
   11f31:	90                   	nop    
   11f32:	90                   	nop    
   11f33:	90                   	nop    
   11f34:	90                   	nop    
   11f35:	90                   	nop    
   11f36:	90                   	nop    
   11f37:	90                   	nop    
   11f38:	90                   	nop    
   11f39:	90                   	nop    
   11f3a:	90                   	nop    
   11f3b:	90                   	nop    
   11f3c:	90                   	nop    
   11f3d:	90                   	nop    
   11f3e:	90                   	nop    
   11f3f:	90                   	nop    

00011f40 <_VideoPortZeroMemory@8>:
   11f40:	ff 25 94 30 01 00    	jmp    *0x13094
   11f46:	90                   	nop    
   11f47:	90                   	nop    
	...

00011f50 <_VideoPortInitialize@16>:
   11f50:	ff 25 7c 30 01 00    	jmp    *0x1307c
   11f56:	90                   	nop    
   11f57:	90                   	nop    
	...

00011f60 <_VideoPortMoveMemory@12>:
   11f60:	ff 25 84 30 01 00    	jmp    *0x13084
   11f66:	90                   	nop    
   11f67:	90                   	nop    
	...

00011f70 <_VideoPortQueryServices@12>:
   11f70:	ff 25 88 30 01 00    	jmp    *0x13088
   11f76:	90                   	nop    
   11f77:	90                   	nop    
	...

00011f80 <_VideoPortMapMemory@24>:
   11f80:	ff 25 80 30 01 00    	jmp    *0x13080
   11f86:	90                   	nop    
   11f87:	90                   	nop    
	...

00011f90 <_VideoPortUnmapMemory@12>:
   11f90:	ff 25 8c 30 01 00    	jmp    *0x1308c
   11f96:	90                   	nop    
   11f97:	90                   	nop    
	...

00011fa0 <_VideoPortWritePortUchar@8>:
   11fa0:	ff 25 90 30 01 00    	jmp    *0x13090
   11fa6:	90                   	nop    
   11fa7:	90                   	nop    
	...

00011fb0 <_ExAllocatePool@8>:
   11fb0:	ff 25 70 30 01 00    	jmp    *0x13070
   11fb6:	90                   	nop    
   11fb7:	90                   	nop    
	...

00011fc0 <__CTOR_LIST__>:
   11fc0:	ff                   	(bad)  
   11fc1:	ff                   	(bad)  
   11fc2:	ff                   	(bad)  
   11fc3:	ff 00                	incl   (%eax)
   11fc5:	00 00                	add    %al,(%eax)
	...

00011fc8 <__DTOR_LIST__>:
   11fc8:	ff                   	(bad)  
   11fc9:	ff                   	(bad)  
   11fca:	ff                   	(bad)  
   11fcb:	ff 00                	incl   (%eax)
   11fcd:	00 00                	add    %al,(%eax)
	...
