/** * Fat.c -- FAT (File Allocation Table) UEFI Filesystem Driver * * PE32+ x86-64, entry point 0x2A8, image size 0x71A0. * 108 functions, all renamed with Fat* prefix. * * Implements the UEFI Simple File System Protocol and File Protocol * on top of Block I/O and Disk I/O protocols. Supports FAT12, FAT16, FAT32. * * See Fat.h for structure definitions and full function prototypes. * See Fat.md for module-level analysis and address map. */ // NOTE: This file serves as an analysis anchor for the Fat.efi module. // Full decompilation is available in the IDB at: // /private/ajax/bios/HR650X_3647_AJAX_BIOS_ORIGINAL.pe_structured/pe_files/0160_Fat_1403fb3fd7f0/Fat.efi // // IDA port: 13342 (currently active) // // Key address ranges: // 0x2A0 - Driver binding thunk // 0x2A8 - _ModuleEntryPoint // 0x360 - DriverBindingStart // 0x534 - DriverBindingStop // 0x5CC - ComponentName handler // 0x7DC - BlockIo2 stop helper // 0x88C - FatCreateOpenFile // 0xC1C - FatDiskIo (core I/O) // 0xE10 - FatAccessFat // 0xE7C - FatAccessDataCluster // 0xF9C - BPB/FAT type detection // 0x1070 - FatOpenDevicePath // 0x1288 - FatAllocateVolume // 0x1E2C - FatOpen (EFI_FILE_PROTOCOL.Open) // 0x1EBC - FatRead (EFI_FILE_PROTOCOL.Read) // 0x2190 - FatGetDirEnt // 0x2340 - FatSetDirEnt // 0x259C - FatGetFileNameFromPath // 0x2D2C - FatGetFatEntry // 0x2DE4 - FatSetFatEntry // 0x3070 - FatOpenVolume / FileOpen // 0x3214 - FatRead // 0x3788 - FatGetClusterSize // 0x398C - FatWrite // 0x3C74 - FatAllocateClusterChain // 0x3ED8 - FatTruncateClusterChain // 0x41A8 - LFN processing // 0x4300 - FatGetDirEnt (multi-entry) // 0x46D4 - FatCreateDirEnt // 0x49E8 - FatDeleteDirEnt // 0x4B64 - FatCreateFile // 0x5038 - FatGetFileInfo // 0x52C8 - FatGetPosition/SetPosition // 0x5374 - FatReadFile // 0x55EC - FatWriteFile // 0x5854 - FatGetFileNameFromDirEnt // 0x5EB8 - FatGetLfnEntry // 0x6060 - FatReadBlockIo // 0x60A4 - FatDriverBindingSupported // 0x6138 - FatGetNextLanguage // 0x632C - FatAsciiToUnicode / FatUnicodeToAscii // 0x6490 - CopyMem // 0x6470 - ZeroMem