/** @file ReFlash.h -- Header for ReFlash Copyright (c) HR650X BIOS Decompilation Project **/ #ifndef __REFLASH_H__ #define __REFLASH_H__ #include "../uefi_headers/Uefi.h" // // Function Prototypes // char * EFIAPI InternalCopyMem( char *DestinationBuffer, char *SourceBuffer, UINTN Length ); void * EFIAPI InternalSetMem( void *buf, unsigned __int64 count, char value ); unsigned __int64 EFIAPI InternalCompareMem( char *DestinationBuffer, char *SourceBuffer, __int64 n40 ); char * EFIAPI InternalIsZeroBuffer( char *Buffer, UINTN Length, UINT8 Value ); void EFIAPI fn_addr( VOID ); unsigned __int64 EFIAPI sub_3E0( VOID ); void EFIAPI sub_3F0( VOID ); void EFIAPI sub_400( VOID ); unsigned __int64 EFIAPI sub_410( VOID ); EFI_STATUS EFIAPI ModuleEntryPoint( EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable ); unsigned __int64 EFIAPI ReFlashDriverEntryPoint( __int64 ImageHandle, EFI_SYSTEM_TABLE *SystemTable ); __int64 EFIAPI ReFlashReadHiiString( __int64 a1, __int64 n48, __int64 *p_n29, __int64 *p_DmiVar%02x%04x%02x%02x ); char EFIAPI ReFlashParseVarStore( char a1 ); __int64 EFIAPI ReFlashUpdateBootSettings( __int64 a1, int *p_n0x1000000 ); __int64 EFIAPI ReFlashGetBootDevice( VOID ); unsigned __int64 EFIAPI ReFlashEntry( __int64 ImageHandle, EFI_SYSTEM_TABLE *SystemTable ); __int64 EFIAPI ReFlashShowErrorDialog( wchar_t *Flash_update, wchar_t *Flash_update_completed._Press_any_key_to_reset_the_system ); __int64 EFIAPI ReFlashShowHiiPopup( wchar_t *ERROR____, const wchar_t *Image_is_not_selected ); __int64 EFIAPI ReFlashInitCallback( char a1, char a2 ); unsigned __int64 EFIAPI ReFlashBootCompleteReset( VOID ); __int64 EFIAPI ReFlashIterateRegions( __int64 a1, __int64 a2 ); unsigned __int64 EFIAPI ReFlashCallbackDispatcher( __int64 a1, __int64 a2, __int64 n100, __int64 a4, int a5, _QWORD *a6 ); __int64 EFIAPI ReFlashRegionRead( __int64 a1, __int64 a2 ); __int64 EFIAPI ReFlashRegionWrite( __int64 a1, __int64 a2 ); __int64 EFIAPI ReFlashRegionEraseWrite( __int64 a1, __int64 a2 ); __int64 EFIAPI ReFlashInitFlashRegion( GUID *Guid1, unsigned int a2, int n3 ); __int64 EFIAPI ReFlashEnumerateRegions( VOID ); __int64 EFIAPI ReFlashGetImageFilePath( VOID ); __int64 EFIAPI ReFlashLogImageInfo( const char *a1 ); __int64 EFIAPI ReFlashGetFlashInfo( VOID ); unsigned __int64 EFIAPI ReFlashLoadFirmwareImage( __int64 a1 ); __int64 EFIAPI ReFlashGetDefaultFwVersion( void *DestinationBuffer, __int64 a2, double a3 ); __int64 EFIAPI ReFlashGetFwVersion( const GUID *Guid2_2, __int64 a2, double a3 ); __int64 EFIAPI ReFlashBootFlow( __int64 a1, __int64 a2, double a3 ); __int64 EFIAPI ReFlashCheckAndDispatch( __int64 ImageHandle, EFI_SYSTEM_TABLE *SystemTable, double a3 ); unsigned __int64 EFIAPI ReFlashSubInit( __int64 a1, _QWORD *a2, _QWORD *a3, _QWORD *a4 ); unsigned __int64 EFIAPI ReFlashSubDispatch( VOID ); const GUID * EFIAPI ReFlashFindGuidInLayout( GUID *Guid2 ); const GUID * EFIAPI ReFlashGuidLookup( GUID *Guid2 ); __int64 EFIAPI ReFlashSubProcessor( unsigned int n4 ); const GUID * EFIAPI ReFlashSetBootFlag( __int64 n2 ); char EFIAPI ReFlashCheckBootRegion( VOID ); bool EFIAPI ReFlashCheckFlashState( _DWORD *a1, EFI_SYSTEM_TABLE *SystemTable ); char * EFIAPI ReFlashParseFlashRegions( char a1 ); const GUID * EFIAPI ReFlashFindGuidInTable( GUID *Guid1, char a2 ); unsigned __int64 EFIAPI ReFlashCopyGuidData( VOID ); void EFIAPI nullsub_1( VOID ); __int64 EFIAPI ReFlashShowProgress( __int64 a1, unsigned __int64 n3_1 ); __int64 EFIAPI ReFlashSubCleanup( __int64 a1 ); __int64 EFIAPI ReFlashSubTeardown( __int64 a1, __int64 a2 ); __int64 EFIAPI ReFlashUpdateProgress( __int64 a1 ); __int64 EFIAPI DriverEntryPoint( VOID ); __int64 EFIAPI DebugLibIsDebugEnabled( VOID ); void EFIAPI DebugPrint( UINTN ErrorLevel, const CHAR8 *Format, ... ); void EFIAPI DebugAssert( const CHAR8 *FileName, UINTN LineNumber, const CHAR8 *Description ); char * EFIAPI Assert_46( char *ZeroPool, __int64 a2 ); BOOLEAN EFIAPI CompareGuid( const GUID *Guid1, const GUID *Guid2 ); void * EFIAPI CopyMem( void *DestinationBuffer, const void *SourceBuffer, UINTN Length ); void * EFIAPI ZeroMem( unsigned __int64 buf, unsigned __int64 count ); INTN EFIAPI CompareMem( const void *DestinationBuffer, const void *SourceBuffer, UINTN Length ); UINTN EFIAPI StrLen( const CHAR16 *String ); RETURN_STATUS EFIAPI StrCpyS( CHAR16 *Destination, UINTN DestMax, const CHAR16 *Source ); CHAR16 * EFIAPI Assert_10( __int64 a1, const CHAR16 *Pool ); unsigned __int64 EFIAPI Assert_21( _BYTE *x_UEFI ); __int64 EFIAPI Assert_8( _BYTE *x_UEFI_1, __int64 a2, unsigned __int64 n0xF4240_1 ); __int64 EFIAPI Assert_37( unsigned __int16 *a1 ); __int64 EFIAPI Assert_28( unsigned __int16 *a1, unsigned __int16 a2 ); __int64 EFIAPI Assert_36( unsigned int *FormatString, unsigned __int8 *a2, unsigned __int8 *a3 ); __int64 EFIAPI Assert_34( __int64 a1 ); __int64 EFIAPI Assert_26( _QWORD *ZeroPool, __int64 a2 ); unsigned __int64 EFIAPI Assert_23( unsigned __int8 *FormatString ); unsigned __int64 EFIAPI ReFlashParseVersionString( VOID ); unsigned __int64 EFIAPI AsciiStrLen( unsigned __int8 *FormatString ); unsigned __int64 EFIAPI Assert_27( unsigned __int64 a1, unsigned int a2 ); void * EFIAPI AllocatePool( UINTN AllocationSize ); void * EFIAPI AllocateZeroPool( UINTN AllocationSize ); void * EFIAPI AllocateCopyPool( __int64 a1, UINTN Length, __int64 SourceBuffer ); void EFIAPI AllocatePoolWithAssert( VOID ); UINTN EFIAPI UnicodeSPrint( CHAR16 *StartOfBuffer, UINTN BufferSize, const CHAR16 *FormatString, ... ); _BYTE * EFIAPI StrPad( _BYTE *StartOfBuffer, _BYTE *StartOfBuffer_1, __int64 i_1, __int16 n32, __int64 n2 ); _BYTE * EFIAPI Assert_19( _BYTE *_r_n, unsigned __int64 a2, __int64 n16 ); unsigned __int64 EFIAPI BasePrintLibSPrintMarker( VOID ); unsigned __int64 EFIAPI AsciiSPrint( _BYTE *_r_n, unsigned __int64 n38, __int16 n64, char *%02d_%02d_%04d__%02d:%02d, ... ); bool EFIAPI Assert_17( __int64 i_2 ); char EFIAPI Assert_38( __int64 i ); char EFIAPI Assert_35( __int64 i ); __int64 EFIAPI Assert_30( __int64 i ); __int64 EFIAPI Assert_31( __int64 i ); bool EFIAPI Assert_29( __int64 i ); char EFIAPI Assert_24( __int64 i ); __int64 EFIAPI Assert_22( _WORD *Pool, UINTN AllocationSize ); void * EFIAPI Assert_25( void *DestinationBuffer ); __int64 EFIAPI Assert_44( __int64 i_2 ); char * EFIAPI Assert_42( __int64 SourceBuffer, void *SourceBuffer_2 ); char * EFIAPI Assert_12( __int64 SourceBuffer, const void *i ); unsigned __int64 EFIAPI UefiLibGetConfigTable( GUID *ImageHandle, _QWORD *p_DestinationBuffer ); __int64 EFIAPI PciExpressLibGetPciExpressAddress( __int64 n1024064 ); __int64 EFIAPI HobLibGetHobList( __int64 ImageHandle, EFI_SYSTEM_TABLE *SystemTable ); _WORD * EFIAPI HobLibGetNextHob( __int16 n11, _WORD *i ); _WORD * EFIAPI ReFlashFindFlashDescriptor( const GUID *ImageHandle, EFI_SYSTEM_TABLE *SystemTable ); __int64 EFIAPI Assert_43( unsigned int a1 ); __int64 EFIAPI Assert_49( __int64 n1000000 ); const char * EFIAPI ReFlashGetLanguage( VOID ); __int64 EFIAPI HiiParseNameValuePairs( __int64 a1, unsigned __int64 *p_n32, CHAR16 *Name ); __int64 EFIAPI HiiParseGuidString( __int64 a1, unsigned __int64 n32, _BYTE *n4 ); __int64 EFIAPI HiiParseRoutingData( __int16 *a1, __int64 a2 ); __int64 EFIAPI ReFlashStripHiiConfigValues( char *ReservedPool, UINTN BufferSize ); void * EFIAPI HiiExtractConfigCallback( __int64 a1, unsigned __int64 DestMax, unsigned __int64 *a3, __int64 a4 ); __int64 EFIAPI HiiRouteConfigCallback( __int64 a1, __int16 *a2, __int16 **a3 ); unsigned __int64 EFIAPI HiiUnsupportedCallback( VOID ); __int64 EFIAPI ReFlashInstallProtocol( __int64 a1, __int64 a2, __int64 a3, ... ); char * EFIAPI InternalGetBestLanguage( char *PackageList, char *Language, char *en_US, char *a4 ); void * EFIAPI ReFlashGetPackageList( __int64 a1 ); __int64 EFIAPI HiiSetStringNew( VOID ); __int64 EFIAPI ReFlashInternalGetHiiString( __int64 a1, __int64 n48, __int64 *p_n29, __int64 DmiVar%02x%04x%02x%02x ); __int64 EFIAPI ReFlashSetProgress( __int64 a1, unsigned __int16 n47, wchar_t *________________ ); __int64 EFIAPI ReFlashReadHiiConfig( __int64 *p_n7, __int64 a2, __int64 a3, __int64 a4 ); __int64 EFIAPI ReFlashWriteHiiConfig( __int64 n7, __int64 a2, _WORD *i_2, __int64 a4 ); __int64 EFIAPI ReFlashFindConfigTable( __int64 SystemTable, __int64 a2 ); unsigned __int64 EFIAPI ReFlashInitConsole( VOID ); __int64 EFIAPI DebugPrintErrorLevel( __int64 a1, char *HII_Extract_Config:_Guid_extraction_failed_n, ... ); void * EFIAPI AllocateReservedPool( UINTN AllocationSize ); void * EFIAPI AllocateCopyPool( UINTN AllocationSize, const void *Buffer ); __int64 EFIAPI ReFlashFlashMapGetSize( _BYTE *a1 ); __int64 EFIAPI ReFlashFlashMapAppend( int *a1, __int64 a2 ); void * EFIAPI ReFlashFlashMapClone( _BYTE *a1 ); void * EFIAPI GetVariable( const CHAR16 *Name, const EFI_GUID *Guid ); _BYTE * EFIAPI ValueToString( __int64 a1, _BYTE *n, __int64 n10, char a4 ); __int64 EFIAPI AsciiStrDecimalToUintn( const CHAR8 *FormatString, const CHAR8 **p_FormatString, int n32 ); const char * EFIAPI StatusToString( __int64 n4, __int64 n37, __int64 n32 ); __int64 EFIAPI HiiConstructConfigAltString( wchar_t *________________, const CHAR8 *DmiVar%02x%04x%02x%02x, ... ); __int64 EFIAPI HiiConstructConfigAltStringWorker( VOID ); UINTN EFIAPI UnicodeSPrintAsciiFormat( CHAR16 *StartOfBuffer, UINTN BufferSize, const CHAR8 *FormatString, ... ); __int64 EFIAPI StrnCmp( unsigned __int64 a1, _BYTE *a2, unsigned __int64 n8_1 ); __int64 EFIAPI DevicePathFindAcpiNode( _BYTE *a1, _WORD **a2 ); void * EFIAPI ReFlashParseFirmwareImage( __int64 i, UINTN *p_n0x1000000, _DWORD *a3 ); __int64 EFIAPI Assert_5( __int64 a1, unsigned __int16 n3, wchar_t *Firmware_Update ); void * EFIAPI Assert_14( __int64 a1 ); __int64 EFIAPI Assert_6( __int64 a1, unsigned __int8 *FormatString, ... ); unsigned __int64 EFIAPI ReFlashReadRomLayout( _DWORD *Guid2, _QWORD *p_SourceBuffer ); __int64 EFIAPI ReFlashGetHiiString( __int64 a1 ); char * EFIAPI Assert_13( __int64 a1, const CHAR16 *SourceBuffer ); unsigned __int64 EFIAPI Assert_0( __int64 a1, __int64 a2, __int64 n100, ... ); bool EFIAPI Assert_15( const CHAR16 *a1 ); CHAR16 * EFIAPI Assert_9( CHAR16 *String ); char * EFIAPI StrAllocatePad( const CHAR16 *SourceBuffer, __int64 a2 ); __int64 EFIAPI CharToUpper( unsigned __int16 a1, __int64 a2, const CHAR16 *j ); __int64 EFIAPI Assert_11( const CHAR16 *SourceBuffer_4, CHAR16 *SourceBuffer ); __int64 EFIAPI Assert_41( const CHAR16 *a1, const CHAR16 *a2 ); __int64 EFIAPI Assert_47( __int64 *a1, __int64 *a2 ); _DWORD * EFIAPI Assert_2( __int64 a1 ); unsigned __int64 EFIAPI Assert_3( __int64 a1 ); __int64 EFIAPI Assert_20( __int64 a1 ); __int64 EFIAPI Assert_39( __int64 *a1 ); unsigned __int64 EFIAPI Assert_40( __int64 a1 ); void * EFIAPI Assert_7( unsigned __int64 *p_n0x40000000, _QWORD *a2 ); char EFIAPI Assert_45( __int64 i_1, char a2 ); UINTN EFIAPI StrTruncate( char *DestinationBuffer, const CHAR16 *SourceBuffer, UINTN a3 ); __int64 EFIAPI DeviceTypeToStr( CHAR16 *StartOfBuffer, __int64 a2 ); _DWORD * EFIAPI Assert( VOID ); __int64 EFIAPI Assert_4( VOID ); _DWORD * EFIAPI ListAllocate( int n100, int n120, int n50 ); __int64 EFIAPI Assert_18( _QWORD *p_SourceBuffer, CHAR16 *ZeroPool ); void * EFIAPI ReFlashReadDmiArray( VOID ); _UNKNOWN * EFIAPI *ReFlashSaveDmiArray( VOID ); __int64 EFIAPI ReFlashCheckSmbiosPreserve( VOID ); _UNKNOWN * EFIAPI *ReFlashSaveSmbiosIfNeeded( VOID ); __int64 EFIAPI ReFlashReadSfpRecord( VOID ); __int64 EFIAPI ReFlashReadSfpExtended( VOID ); __int64 EFIAPI ReFlashReadFlashLayoutFromBlockIo( __int64 a1 ); unsigned __int64 EFIAPI ReFlashScanFlashSignature( __int64 a1, unsigned __int64 i_2 ); signed __int64 EFIAPI HiiGetStringAndUpdate( __int64 a1, __int64 a2, __int64 a3, __int64 a4 ); unsigned __int64 EFIAPI ReFlashVerifyUpdate( VOID ); char EFIAPI ReFlashExecuteUpdate( VOID ); __int64 EFIAPI DebugLibGetDebugMask( VOID ); __int64 EFIAPI Assert_32( _WORD *a1 ); unsigned __int32 EFIAPI Assert_33( unsigned __int16 n1288 ); void * EFIAPI SetMem( void *Buffer, UINTN Length, UINT8 Value ); __int64 EFIAPI AssertCpuDeadLoop( VOID ); void EFIAPI Assert_1( VOID ); __int64 EFIAPI Assert_16( __int64 a1, int a2, int a3 ); __int64 EFIAPI Assert_50( int n5 ); char EFIAPI HiiCheckUpdateState( char *a1, char a2 ); __int64 EFIAPI Assert_48( VOID ); unsigned __int64 EFIAPI Assert_51( char *a1 ); unsigned __int64 EFIAPI HiiInitUpdateContext( VOID ); unsigned __int64 EFIAPI HiiInternalApplyUpdate( signed __int64 UnicodeString, _BYTE *a2, __int64 a3, char a4 ); unsigned __int64 EFIAPI HiiInternalGetUnicodeString( signed __int64 UnicodeString, _BYTE *a2, _QWORD *a3 ); char EFIAPI ReFlashSpiCheckControllerId( VOID ); int * EFIAPI InternalSetMem16( int *buf_1, unsigned __int64 n4, int value_2 ); char * EFIAPI InternalCopyMemOverlap( char *dst_1, char *src, unsigned __int64 n8 ); #endif /* __REFLASH_H__ */