Newer
Older
AMI-Aptio-BIOS-Reversed / LenovoServerPkg / Driver / LnvDriverPei / LnvDriverPei.c
@Ajax Dong Ajax Dong 2 days ago 32 KB Full restructure
//
// LnvDriverPei.efi - Full Decompilation
// Source: IDA Pro MCP port 13390
// Functions: 37
//

#include <Uefi.h>
#include <PiPei.h>

{"addr":"0xffe3bf94","code":"void *MemSet(void *buf, unsigned int count, char value)\n{\n memset(buf, value, count); /*0xffe3bfa1*/\n return buf; /*0xffe3bfa7*/\n}"}

{"addr":"0xffe3bfb4","code":"int CopyMem(int a1, int a2, int a3, int a4)\n{\n do /*0xffe3bfcd*/\n {\n *(_DWORD *)(a1 + 8 *a2 - 8) = a3; /*0xffe3bfc5*/\n *(_DWORD *)(a1 + 8 *a2-- - 4) = a4; /*0xffe3bfc9*/\n }\n while ( a2 ); /*0xffe3bfcd*/\n return a1; /*0xffe3bfd1*/\n}"}

{"addr":"0xffe3bfd4","code":"void *MemZero(void *buf, unsigned int count, int value)\n{\n memset32(buf, value, count); /*0xffe3bfe1*/\n return buf; /*0xffe3bfe7*/\n}"}

{"addr":"0xffe3bff4","code":"char *AsciiStrCpyS(char *dst, char *src, unsigned int count)\n{\n unsigned int count_1; // edx\n char *dst_1; // edi\n char *src_1; // esi\n\n count_1 = count; /*0xffe3bffe*/\n if ( src < dst && &src[count - 1] >= dst ) /*0xffe3c00c*/\n {\n src_1 = &src[count - 1]; /*0xffe3c020*/\n dst_1 = &dst[count - 1]; /*0xffe3c022*/\n }\n else\n {\n count_1 = count & 3; /*0xffe3c010*/\n qmemcpy(dst, src, 4 * (count >> 2)); /*0xffe3c019*/\n src_1 = &src[4 * (count >> 2)]; /*0xffe3c019*/\n dst_1 = &dst[4 * (count >> 2)]; /*0xffe3c019*/\n }\n qmemcpy(dst_1, src_1, count_1); /*0xffe3c029*/\n return dst; /*0xffe3c030*/\n}"}

{"addr":"0xffe3c054","code":"EFI_STATUS ModuleEntryPoint(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)\n{\n int NotifyStatus; // eax\n int ConstructorStatus; // edi\n int InitStatus; // eax\n EFI_STATUS FinalStatus; // edi\n\n if ( (*(int ( **)(EFI_SYSTEM_TABLE *, void *, _DWORD, _DWORD, void *))(LODWORD(SystemTable->Hdr.Signature) + 32))( /*0xffe3c073*/\n SystemTable,\n &unk_FFE3E344,\n 0,\n 0,\n &unk_FFE3E3C8) < 0 )\n {\n NotifyStatus = (*(int ( **)(EFI_SYSTEM_TABLE *, void *))(LODWORD(SystemTable->Hdr.Signature) + 36))( /*0xffe3c07d*/\n SystemTable,\n &unk_FFE3E3B8);\n ConstructorStatus = NotifyStatus; /*0xffe3c080*/\n if ( NotifyStatus < 0 ) /*0xffe3c086*/\n {\n DebugPrint(-1, \"PEI - PeiLnvSendIpmiCmdLibConstructor NotifyPpi Status = %r \\n\", NotifyStatus); /*0xffe3c090*/\n DebugPrint(-1, \"PeiLnvSendIpmiCmdLibConstructor Status = %r \\n\", ConstructorStatus); /*0xffe3c09d*/\n }\n }\n InitStatus = (*(int ( **)(EFI_SYSTEM_TABLE *, void *))(LODWORD(SystemTable->Hdr.Signature) + 36))( /*0xffe3c0ad*/\n SystemTable,\n &unk_FFE3E394);\n FinalStatus = InitStatus; /*0xffe3c0b0*/\n if ( InitStatus < 0 ) /*0xffe3c0b6*/\n DebugPrint(-1, \"PEI - LnvDriverPEI_Init NotifyPpi Status = %r \\n\", InitStatus); /*0xffe3c0c0*/\n LnvDebugSwitchInit(SystemTable); /*0xffe3c0ca*/\n return FinalStatus; /*0xffe3c0d1*/\n}","refs":[{"addr":"0xffe3e3b8","name":"unk_FFE3E3B8"},{"addr":"0xffe3c296","name":"DebugPrint"},{"addr":"0xffe3da04","name":"aPeiPeilnvsendi","string":"PEI - PeiLnvSendIpmiCmdLibConstructor NotifyPpi Status = %r \n"},{"addr":"0xffe3da44","name":"aPeilnvsendipmi","string":"PeiLnvSendIpmiCmdLibConstructor Status = %r \n"},{"addr":"0xffe3e344","name":"unk_FFE3E344"},{"addr":"0xffe3e3c8","name":"unk_FFE3E3C8"},{"addr":"0xffe3e394","name":"unk_FFE3E394"},{"addr":"0xffe3d8e8","name":"aPeiLnvdriverpe","string":"PEI - LnvDriverPEI_Init NotifyPpi Status = %r \n"},{"addr":"0xffe3c0fe","name":"LnvDebugSwitchInit"}]}

{"addr":"0xffe3c0d4","code":"int MemoryDiscoveredPpiCallback()\n{\n LnvDebugSwitchPpiCallback(\"PEI - gEfiPeiMemoryDiscoveredPpiGuid Signaled\"); /*0xffe3c0d9*/\n return 0; /*0xffe3c0e1*/\n}","refs":[{"addr":"0xffe3c406","name":"LnvDebugSwitchPpiCallback"},{"addr":"0xffe3d72c","name":"aPeiGefipeimemo","string":"PEI - gEfiPeiMemoryDiscoveredPpiGuid Signaled"}]}

{"addr":"0xffe3c0e2","code":"int BootInRecoveryModePpiCallback()\n{\n LnvDebugSwitchPpiCallback(\"PEI - gEfiPeiBootInRecoveryModePpiGuid Signaled\"); /*0xffe3c0e7*/\n return 0; /*0xffe3c0ef*/\n}","refs":[{"addr":"0xffe3c406","name":"LnvDebugSwitchPpiCallback"},{"addr":"0xffe3d75c","name":"aPeiGefipeiboot","string":"PEI - gEfiPeiBootInRecoveryModePpiGuid Signaled"}]}

{"addr":"0xffe3c0f0","code":"int EndOfPeiSignalPpiCallback()\n{\n LnvDebugSwitchPpiCallback(\"PEI - gEfiEndOfPeiSignalPpiGuid Signaled\"); /*0xffe3c0f5*/\n return 0; /*0xffe3c0fd*/\n}","refs":[{"addr":"0xffe3c406","name":"LnvDebugSwitchPpiCallback"},{"addr":"0xffe3d78c","name":"aPeiGefiendofpe","string":"PEI - gEfiEndOfPeiSignalPpiGuid Signaled"}]}

{"addr":"0xffe3c0fe","code":"int __thiscall LnvDebugSwitchInit(EFI_SYSTEM_TABLE *SystemTable)\n{\n int Signature; // eax\n int result; // eax\n int PeiSwitchValue; // edx\n int CmosStatus; // eax\n int HobGuid; // ecx\n int DebugValue; // edx\n int DxeCmosStatus; // eax\n int DxeDebugValue; // edx\n int PeiCmosStatus; // eax\n int HobGuid_1; // ecx\n int DxeSwitchByte; // edx\n int DxeCmosStatus2; // eax\n int SmmDebugByte; // edx\n _BYTE ConfigData[3]; // [esp+8h] [ebp-18h] BYREF\n unsigned __int8 PeiDebugSwitch; // [esp+Bh] [ebp-15h]\n char src[4]; // [esp+Ch] [ebp-14h] BYREF\n unsigned __int8 SmmDebugSwitch; // [esp+10h] [ebp-10h]\n int DataSize; // [esp+14h] [ebp-Ch] BYREF\n int ( **GetVariableProtocol)(_DWORD, const __int16 *, void *, _DWORD, int *, _BYTE *); // [esp+18h] [ebp-8h] BYREF\n char DefaultDebugSwitch; // [esp+1Fh] [ebp-1h] BYREF\n\n Signature = SystemTable->Hdr.Signature; /*0xffe3c104*/\n DataSize = 10; /*0xffe3c10d*/\n GetVariableProtocol = 0; /*0xffe3c11c*/\n DefaultDebugSwitch = 0x80; /*0xffe3c11f*/\n result = (*(int ( **)(EFI_SYSTEM_TABLE *, void *, _DWORD, _DWORD, int ( ***)(_DWORD, const __int16 *, void *, _DWORD, int *, _BYTE *)))(Signature + 32))( /*0xffe3c123*/\n SystemTable,\n &unk_FFE3E324,\n 0,\n 0,\n &GetVariableProtocol);\n if ( !result ) /*0xffe3c12b*/\n {\n result = (*GetVariableProtocol)(GetVariableProtocol, L\"LnvSetup\", &unk_FFE3E374, 0, &DataSize, ConfigData); /*0xffe3c148*/\n if ( !result ) /*0xffe3c14f*/\n {\n if ( ConfigData[2] ) /*0xffe3c15d*/\n {\n LOBYTE(PeiSwitchValue) = PeiDebugSwitch; /*0xffe3c1db*/\n PeiCmosStatus = CmosWriteByte(33360, PeiSwitchValue); /*0xffe3c1de*/\n if ( PeiCmosStatus < 0 ) /*0xffe3c1e8*/\n DebugPrint( /*0xffe3c1f6*/\n -1,\n \"RDBG CmosWriteByte PEI_DEBUG_SWITCH_BY_NVRAM_OFFSET , %x , Status = %r \\n\",\n PeiDebugSwitch,\n PeiCmosStatus);\n InternalBuildGuidHob(HobGuid_1, src); /*0xffe3c202*/\n DebugPrint(-1, \"RDBG BuildGuidDataHob gLnvDebugSwitchHobGuid \\n\"); /*0xffe3c20f*/\n LOBYTE(DxeSwitchByte) = src[0]; /*0xffe3c214*/\n DxeCmosStatus2 = CmosWriteByte(33368, DxeSwitchByte); /*0xffe3c21e*/\n if ( DxeCmosStatus2 < 0 ) /*0xffe3c225*/\n DebugPrint( /*0xffe3c233*/\n -1,\n \"RDBG CmosWriteByte DXE_DEBUG_SWITCH_BY_NVRAM_OFFSET , %x , Status = %r \\n\",\n (unsigned __int8)src[0],\n DxeCmosStatus2);\n LOBYTE(SmmDebugByte) = SmmDebugSwitch; /*0xffe3c23b*/\n result = CmosWriteByte(33376, SmmDebugByte); /*0xffe3c243*/\n if ( result < 0 ) /*0xffe3c24a*/\n return DebugPrint( /*0xffe3c258*/\n -1,\n \"RDBG CmosWriteByte SMM_DEBUG_SWITCH_BY_NVRAM_OFFSET , %x , Status = %r \\n\",\n SmmDebugSwitch,\n result);\n }\n else\n {\n LOBYTE(PeiSwitchValue) = DefaultDebugSwitch; /*0xffe3c15f*/\n CmosStatus = CmosWriteByte(33360, PeiSwitchValue); /*0xffe3c162*/\n if ( CmosStatus < 0 ) /*0xffe3c16c*/\n DebugPrint( /*0xffe3c17a*/\n -1,\n \"RDBG CmosWriteByte PEI_DEBUG_SWITCH_BY_NVRAM_OFFSET , %x , Status = %r \\n\",\n (unsigned __int8)DefaultDebugSwitch,\n CmosStatus);\n InternalBuildGuidHob(HobGuid, &DefaultDebugSwitch); /*0xffe3c186*/\n DebugPrint(-1, \"RDBG BuildGuidDataHob gLnvDebugSwitchHobGuid \\n\"); /*0xffe3c193*/\n LOBYTE(DebugValue) = DefaultDebugSwitch; /*0xffe3c198*/\n DxeCmosStatus = CmosWriteByte(33368, DebugValue); /*0xffe3c1a2*/\n if ( DxeCmosStatus < 0 ) /*0xffe3c1a9*/\n DebugPrint( /*0xffe3c1b7*/\n -1,\n \"RDBG CmosWriteByte DXE_DEBUG_SWITCH_BY_NVRAM_OFFSET , %x , Status = %r \\n\",\n (unsigned __int8)DefaultDebugSwitch,\n DxeCmosStatus);\n LOBYTE(DxeDebugValue) = DefaultDebugSwitch; /*0xffe3c1bf*/\n result = CmosWriteByte(33376, DxeDebugValue); /*0xffe3c1c7*/\n if ( result < 0 ) /*0xffe3c1ce*/\n return DebugPrint( /*0xffe3c1d9*/\n -1,\n \"RDBG CmosWriteByte SMM_DEBUG_SWITCH_BY_NVRAM_OFFSET , %x , Status = %r \\n\",\n (unsigned __int8)DefaultDebugSwitch,\n result);\n }\n }\n }\n return result; /*0xffe3c260*/\n}","refs":[{"addr":"0xffe3e324","name":"unk_FFE3E324"},{"addr":"0xffe3e374","name":"unk_FFE3E374"},{"addr":"0xffe3c3da","name":"CmosWriteByte"},{"addr":"0xffe3c296","name":"DebugPrint"},{"addr":"0xffe3c32e","name":"InternalBuildGuidHob"}]}

{"addr":"0xffe3c265","code":"int GetDebugService()\n{\n int PpiServices; // eax\n int Guid; // [esp+0h] [ebp-8h] BYREF\n int DebugServicePtr; // [esp+4h] [ebp-4h] BYREF\n\n PpiServices = PeiServicesGetPointer(); /*0xffe3c26a*/\n if ( (*(int ( **)(int, void *, _DWORD, int *, int *))(*(_DWORD *)PpiServices + 32))( /*0xffe3c289*/\n PpiServices,\n &unk_FFE3E334,\n 0,\n &Guid,\n &DebugServicePtr) >= 0 )\n return DebugServicePtr; /*0xffe3c28f*/\n else\n return 0; /*0xffe3c28b*/\n}","refs":[{"addr":"0xffe3c596","name":"PeiServicesGetPointer"},{"addr":"0xffe3e334","name":"unk_FFE3E334"}]}

{"addr":"0xffe3c296","code":"int DebugPrint(int a1, const char *a2, ...)\n{\n int result; // eax\n int ( **v3)(int, const char *, char *); // esi\n va_list va; // [esp+10h] [ebp+Ch] BYREF\n\n va_start(va, a2);\n result = GetDebugService(); /*0xffe3c297*/\n v3 = (int ( **)(int, const char *, char *))result; /*0xffe3c29c*/\n if ( result ) /*0xffe3c2a0*/\n {\n result = DebugPrintLevelEnabled(); /*0xffe3c2a2*/\n if ( (result & a1) != 0 ) /*0xffe3c2ad*/\n return (*v3)(a1, a2, (char *)va); /*0xffe3c2b9*/\n }\n return result; /*0xffe3c2be*/\n}","refs":[{"addr":"0xffe3c265","name":"GetDebugService"},{"addr":"0xffe3c547","name":"DebugPrintLevelEnabled"}]}

{"addr":"0xffe3c2c0","code":"int PeiServicesGetIdt(\n int e:__hs__MdePkg__Library__PeiServicesTablePointerLibIdt__PeiServ,\n int n48,\n int PeiServices____((void__)_0))\n{\n int result; // eax\n\n result = GetDebugService(); /*0xffe3c2c6*/\n if ( result ) /*0xffe3c2cd*/\n return (*(int ( **)(int, int, int))(result + 4))( /*0xffe3c2d5*/\n e:__hs__MdePkg__Library__PeiServicesTablePointerLibIdt__PeiServ,\n n48,\n PeiServices____((void__)_0));\n return result; /*0xffe3c2db*/\n}","refs":[{"addr":"0xffe3c265","name":"GetDebugService"}]}

{"addr":"0xffe3c2de","code":"int InternalHobConstructor(int HobGuid, int HobType)\n{\n int PpiServices; // eax\n int DebugService; // eax\n int HobPtr; // [esp+4h] [ebp-4h] BYREF\n\n PpiServices = PeiServicesGetPointer(); /*0xffe3c2e5*/\n if ( (*(int ( **)(int, int, int, int *))(*(_DWORD *)PpiServices + 52))(PpiServices, 4, HobType, &HobPtr) < 0 ) /*0xffe3c2fd*/\n HobPtr = 0; /*0xffe3c2ff*/\n if ( !HobPtr ) /*0xffe3c307*/\n {\n DebugService = GetDebugService(); /*0xffe3c309*/\n if ( DebugService ) /*0xffe3c310*/\n (*(void ( **)(const char *, int, const char *))(DebugService + 4))( /*0xffe3c321*/\n \"e:\\\\hs\\\\MdePkg\\\\Library\\\\PeiHobLib\\\\HobLib.c\",\n 250,\n \"Hob != ((void *) 0)\");\n }\n return HobPtr; /*0xffe3c2fa*/\n}","refs":[{"addr":"0xffe3c596","name":"PeiServicesGetPointer"},{"addr":"0xffe3c265","name":"GetDebugService"}]}

{"addr":"0xffe3c32e","code":"char *InternalBuildGuidHob(int HobGuid, char *DataBuffer)\n{\n int DebugService; // eax\n int HobPtr; // eax\n int HobCopy; // esi\n\n if ( !DataBuffer ) /*0xffe3c334*/\n {\n DebugService = GetDebugService(); /*0xffe3c336*/\n if ( DebugService ) /*0xffe3c33d*/\n (*(void ( **)(const char *, int, const char *))(DebugService + 4))( /*0xffe3c34e*/\n \"e:\\\\hs\\\\MdePkg\\\\Library\\\\PeiHobLib\\\\HobLib.c\",\n 466,\n \"Data != ((void *) 0) || DataLength == 0\");\n }\n HobPtr = InternalHobConstructor(HobGuid, 25); /*0xffe3c357*/\n HobCopy = HobPtr; /*0xffe3c35c*/\n if ( !HobPtr ) /*0xffe3c360*/\n return 0; /*0xffe3c360*/\n HobConstructorInternal((void *)(HobPtr + 8)); /*0xffe3c365*/\n if ( HobCopy == -24 ) /*0xffe3c36f*/\n return 0; /*0xffe3c37c*/\n else\n return StrCpySInternal((char *)(HobCopy + 24), DataBuffer); /*0xffe3c374*/\n}","refs":[{"addr":"0xffe3c265","name":"GetDebugService"},{"addr":"0xffe3c2de","name":"InternalHobConstructor"},{"addr":"0xffe3c5c8","name":"HobConstructorInternal"},{"addr":"0xffe3c5f9","name":"StrCpySInternal"}]}

{"addr":"0xffe3c381","code":"int __thiscall GetCmosService(void *this)\n{\n int PpiServices; // eax\n _DWORD CmosProtocolGuid[4]; // [esp+4h] [ebp-10h] BYREF\n\n CmosProtocolGuid[0] = -859887738; /*0xffe3c38a*/\n CmosProtocolGuid[1] = 1124650348; /*0xffe3c391*/\n CmosProtocolGuid[2] = 1482881725; /*0xffe3c398*/\n CmosProtocolGuid[3] = -2118136208; /*0xffe3c39f*/\n if ( !this ) /*0xffe3c3a8*/\n return -2147483646; /*0xffe3c3aa*/\n PpiServices = PeiServicesGetPointer(); /*0xffe3c3b1*/\n if ( PpiServices ) /*0xffe3c3ba*/\n return (*(int ( **)(int, _DWORD *, _DWORD, _DWORD, void *))(*(_DWORD *)PpiServices + 32))( /*0xffe3c3cf*/\n PpiServices,\n CmosProtocolGuid,\n 0,\n 0,\n this);\n else\n return -2147483645; /*0xffe3c3bc*/\n}","refs":[{"addr":"0xffe3c596","name":"PeiServicesGetPointer"}]}

{"addr":"0xffe3c3da","code":"int CmosWriteByte(int CmosAddress, int DataValue)\n{\n int Status; // eax\n int CmosProtocol; // [esp+8h] [ebp-4h] BYREF\n\n CmosProtocol = 0; /*0xffe3c3de*/\n Status = GetCmosService(&CmosProtocol); /*0xffe3c3eb*/\n if ( Status >= 0 ) /*0xffe3c3f2*/\n return (*(int ( **)(int, int, int))(CmosProtocol + 8))(CmosProtocol, CmosAddress, DataValue); /*0xffe3c3fa*/\n return Status; /*0xffe3c400*/\n}","refs":[{"addr":"0xffe3c381","name":"GetCmosService"}]}

{"addr":"0xffe3c406","code":"int LnvDebugSwitchPpiCallback(char *%04d_%02d_%02d_%02d:%02d:%02d_:_%a., ...)\n{\n int Status; // eax\n unsigned int SprintLength; // eax\n unsigned int FormatLength; // ebx\n int PpiServices; // eax\n double DebugBuffer; // [esp-14h] [ebp-22Ch]\n char DebugStatus; // [esp+4h] [ebp-214h] BYREF\n _BYTE LogBuffer[255]; // [esp+5h] [ebp-213h] BYREF\n _BYTE _r_n[230]; // [esp+104h] [ebp-114h] BYREF\n char PrintStatus; // [esp+1EAh] [ebp-2Eh]\n unsigned __int16 RtcYear; // [esp+204h] [ebp-14h] BYREF\n unsigned __int8 RtcMonth; // [esp+206h] [ebp-12h]\n unsigned __int8 RtcDay; // [esp+207h] [ebp-11h]\n unsigned __int8 RtcHour; // [esp+208h] [ebp-10h]\n unsigned __int8 RtcMinute; // [esp+209h] [ebp-Fh]\n unsigned __int8 RtcSecond; // [esp+20Ah] [ebp-Eh]\n char OutputByte; // [esp+217h] [ebp-1h] BYREF\n va_list va; // [esp+224h] [ebp+Ch] BYREF\n\n va_start(va, %04d_%02d_%02d_%02d:%02d:%02d_:_%a.);\n OutputByte = 0; /*0xffe3c412*/\n if ( !%04d_%02d_%02d_%02d:%02d:%02d_:_%a. ) /*0xffe3c418*/\n return -2147483646; /*0xffe3c41a*/\n SprintLength = AsciiSPrint(_r_n, 0x100u, 0, %04d_%02d_%02d_%02d:%02d:%02d_:_%a., (char *)va); /*0xffe3c438*/\n PrintStatus = SprintLength <= 0xE6 ? PrintStatus : 0;\n ReadRtcDateTime(&RtcYear); /*0xffe3c44e*/\n DebugStatus = 0; /*0xffe3c459*/\n LODWORD(DebugBuffer) = _r_n; /*0xffe3c45f*/\n FormatLength = AsciiSPrintFormat(\n LogBuffer,\n 0xFEu,\n \"%04d/%02d/%02d-%02d:%02d:%02d : %a.\",\n RtcYear,\n RtcMonth,\n RtcDay,\n RtcHour,\n RtcMinute,\n RtcSecond,\n DebugBuffer);\n if ( FormatLength > 0xFD ) /*0xffe3c49f*/\n return -2147483643; /*0xffe3c4a1*/\n PpiServices = PeiServicesGetPointer(); /*0xffe3c4a9*/\n Status = (*(int ( **)(int, void *, _DWORD, _DWORD, char **))(*(_DWORD *)PpiServices + 32))( /*0xffe3c4be*/\n PpiServices,\n &unk_FFE3E344,\n 0,\n 0,\n &%04d_%02d_%02d_%02d:%02d:%02d_:_%a.);\n if ( Status >= 0 ) /*0xffe3c4c6*/\n return (*((int ( **)(char *, int, _DWORD, int, char *, _DWORD, _DWORD, char *))%04d_%02d_%02d_%02d:%02d:%02d_:_%a. /*0xffe3c4e4*/\n + 3))(\n %04d_%02d_%02d_%02d:%02d:%02d_:_%a.,\n 46,\n 0,\n 71,\n &DebugStatus,\n (unsigned __int8)(FormatLength + 2),\n 0,\n &OutputByte);\n return Status; /*0xffe3c4eb*/\n}","refs":[{"addr":"0xffe3c949","name":"AsciiSPrint"},{"addr":"0xffe3c7a4","name":"ReadRtcDateTime"},{"addr":"0xffe3c88b","name":"AsciiSPrintFormat"},{"addr":"0xffe3d994","name":"%04d_%02d_%02d_%02d:%02d:%02d_:_%a.","string":"%04d/%02d/%02d-%02d:%02d:%02d : %a."},{"addr":"0xffe3c596","name":"PeiServicesGetPointer"},{"addr":"0xffe3e344","name":"unk_FFE3E344"}]}

{"addr":"0xffe3c4f0","code":"int PeiLnvSendIpmiCmdConstructor(int PeiServices)\n{\n int LocateStatus; // eax\n int ReturnStatus; // esi\n int DebugService; // eax\n\n LocateStatus = (*(int ( **)(int, void *, _DWORD, _DWORD, void *))(*(_DWORD *)PeiServices + 32))( /*0xffe3c506*/\n PeiServices,\n &unk_FFE3E344,\n 0,\n 0,\n &unk_FFE3E3C8);\n ReturnStatus = LocateStatus; /*0xffe3c509*/\n if ( LocateStatus < 0 ) /*0xffe3c510*/\n {\n DebugPrint(0x80000000, \"\\nASSERT_EFI_ERROR (Status = %r)\\n\", LocateStatus); /*0xffe3c51d*/\n DebugService = GetDebugService(); /*0xffe3c525*/\n if ( DebugService ) /*0xffe3c52c*/\n (*(void ( **)(const char *, int, const char *))(DebugService + 4))( /*0xffe3c53d*/\n \"e:\\\\hs\\\\LenovoServerPkg\\\\Library\\\\LnvIpmiLib\\\\IpmiCmd\\\\PeiLnvSendIpmiCmdLib.c\",\n 218,\n \"!EFI_ERROR (Status)\");\n }\n return ReturnStatus; /*0xffe3c545*/\n}","refs":[{"addr":"0xffe3e344","name":"unk_FFE3E344"},{"addr":"0xffe3e3c8","name":"unk_FFE3E3C8"},{"addr":"0xffe3c296","name":"DebugPrint"},{"addr":"0xffe3d6f4","name":"aAssertEfiError","string":"\nASSERT_EFI_ERROR (Status = %r)\n"},{"addr":"0xffe3c265","name":"GetDebugService"},{"addr":"0xffe3d9bc","name":"aEHsLenovoserve","string":"e:\\hs\\LenovoServerPkg\\Library\\LnvIpmiLib\\IpmiCmd\\PeiLnvSendIpmiCmdLib.c"},{"addr":"0xffe3d718","name":"aEfiErrorStatus","string":"!EFI_ERROR (Status)"}]}

{"addr":"0xffe3c547","code":"int DebugPrintLevelEnabled()\n{\n unsigned __int8 RtcIndexReg; // al\n char DebugLevel; // al\n char LevelCheck; // cl\n\n RtcIndexReg = __inbyte(0x70u); /*0xffe3c54d*/\n __outbyte(0x70u, RtcIndexReg & 0x80 | 0x4A); /*0xffe3c552*/\n DebugLevel = __inbyte(0x71u); /*0xffe3c559*/\n LevelCheck = DebugLevel; /*0xffe3c55a*/\n if ( (unsigned __int8)DebugLevel <= 3u ) /*0xffe3c55f*/\n {\nLABEL_4:\n if ( !LevelCheck ) /*0xffe3c57a*/\n return 0; /*0xffe3c57a*/\n goto LABEL_5; /*0xffe3c57a*/\n }\n LevelCheck = n3; /*0xffe3c561*/\n if ( !n3 ) /*0xffe3c569*/\n {\n LevelCheck = MEMORY[0xFDAF0490] & 2 | 1; /*0xffe3c575*/\n goto LABEL_4; /*0xffe3c575*/\n }\nLABEL_5:\n if ( LevelCheck != -1 )\n return LevelCheck != 1 ? -2147483578 : -2147483644;\n return 0; /*0xffe3c592*/\n}","refs":[{"addr":"0xffe3e3c4","name":"n3"}]}

{"addr":"0xffe3c596","code":"int PeiServicesGetPointer()\n{\n int PeiServicesPtr; // esi\n _BYTE Idtr[2]; // [esp+4h] [ebp-8h] BYREF\n int IdtrBase; // [esp+6h] [ebp-6h]\n\n X86ReadIdtr(Idtr); /*0xffe3c59f*/\n PeiServicesPtr = *(_DWORD *)(IdtrBase - 4); /*0xffe3c5a7*/\n if ( !PeiServicesPtr ) /*0xffe3c5ac*/\n PeiServicesGetIdt( /*0xffe3c5bb*/\n (int)\"e:\\\\hs\\\\MdePkg\\\\Library\\\\PeiServicesTablePointerLibIdt\\\\PeiServicesTablePointer.c\",\n 48,\n (int)\"PeiServices != ((void *) 0)\");\n return PeiServicesPtr; /*0xffe3c5c3*/\n}","refs":[{"addr":"0xffe3d5c0","name":"X86ReadIdtr"},{"addr":"0xffe3c2c0","name":"PeiServicesGetIdt"}]}

{"addr":"0xffe3c5c8","code":"void *__thiscall HobConstructorInternal(void *this)\n{\n __int64 Unaligned64; // rax\n __int64 Unaligned64_1; // rax\n\n Unaligned64 = ReadUnaligned64(&unk_FFE3E314); /*0xffe3c5d0*/\n WriteUnaligned32(Unaligned64, SHIDWORD(Unaligned64)); /*0xffe3c5d9*/\n Unaligned64_1 = ReadUnaligned64(&unk_FFE3E31C); /*0xffe3c5e3*/\n WriteUnaligned32(Unaligned64_1, SHIDWORD(Unaligned64_1)); /*0xffe3c5ed*/\n return this; /*0xffe3c5f7*/\n}","refs":[{"addr":"0xffe3d60a","name":"ReadUnaligned64"},{"addr":"0xffe3e314","name":"unk_FFE3E314"},{"addr":"0xffe3d636","name":"WriteUnaligned32"},{"addr":"0xffe3e31c","name":"unk_FFE3E31C"}]}

{"addr":"0xffe3c5f9","code":"char *StrCpySInternal(char *dst, char *src)\n{\n if ( dst == src ) /*0xffe3c5fb*/\n return dst; /*0xffe3c5fd*/\n else\n return AsciiStrCpyS(dst, src, 1u); /*0xffe3c604*/\n}","refs":[{"addr":"0xffe3bff4","name":"AsciiStrCpyS"}]}

{"addr":"0xffe3c60d","code":"int RtcCenturySet(char CenturyByte)\n{\n int RtcDataPtr; // ecx\n int RtcDataPtr_1; // esi\n unsigned __int8 CenturyBcd; // bh\n unsigned __int8 CenturyMsb; // ah\n char CenturyBcd2; // bh\n unsigned __int8 CenturyLsb; // bl\n unsigned int CenturyDec; // edx\n char CenturyDec2; // cl\n unsigned int CenturyDec3; // edx\n int CenturyResult; // edx\n unsigned __int8 RtcIndexRead; // al\n\n RtcDataPtr_1 = RtcDataPtr; /*0xffe3c613*/\n CenturyBcd = *(_BYTE *)(RtcDataPtr + 4); /*0xffe3c618*/\n CenturyMsb = CenturyBcd & 0x7F; /*0xffe3c61a*/\n CenturyBcd2 = CenturyBcd >> 7; /*0xffe3c61d*/\n *(_BYTE *)(RtcDataPtr + 4) = CenturyMsb; /*0xffe3c620*/\n if ( (CenturyByte & 4) == 0 ) /*0xffe3c625*/\n {\n CenturyLsb = *(_BYTE *)(RtcDataPtr + 6); /*0xffe3c63a*/\n CenturyDec = *(unsigned __int8 *)(RtcDataPtr + 2); /*0xffe3c63f*/\n *(_WORD *)RtcDataPtr = (unsigned __int8)(*(_BYTE *)RtcDataPtr - 6 * (*(_BYTE *)RtcDataPtr >> 4)); /*0xffe3c648*/\n CenturyDec2 = -6 * (CenturyDec >> 4); /*0xffe3c657*/\n CenturyDec3 = *(unsigned __int8 *)(RtcDataPtr_1 + 3); /*0xffe3c659*/\n *(_BYTE *)(RtcDataPtr_1 + 2) += CenturyDec2; /*0xffe3c65d*/\n *(_BYTE *)(RtcDataPtr_1 + 3) += -6 * (CenturyDec3 >> 4); /*0xffe3c671*/\n CenturyResult = *(unsigned __int8 *)(RtcDataPtr_1 + 5) >> 4; /*0xffe3c688*/\n *(_BYTE *)(RtcDataPtr_1 + 4) = CenturyMsb - 6 * (CenturyMsb >> 4); /*0xffe3c68b*/\n *(_BYTE *)(RtcDataPtr_1 + 5) += -6 *CenturyResult; /*0xffe3c69c*/\n *(_BYTE *)(RtcDataPtr_1 + 6) = CenturyLsb - 6 * (CenturyLsb >> 4); /*0xffe3c6af*/\n }\n if ( (CenturyByte & 2) == 0 ) /*0xffe3c6b6*/\n {\n if ( CenturyBcd2 ) /*0xffe3c6ba*/\n {\n RtcIndexRead = *(_BYTE *)(RtcDataPtr_1 + 4); /*0xffe3c6bc*/\n if ( RtcIndexRead < 0xCu ) /*0xffe3c6c1*/\n *(_BYTE *)(RtcDataPtr_1 + 4) = RtcIndexRead + 12; /*0xffe3c6c5*/\n }\n else if ( *(_BYTE *)(RtcDataPtr_1 + 4) == 12 ) /*0xffe3c6ce*/\n {\n *(_BYTE *)(RtcDataPtr_1 + 4) = 0; /*0xffe3c6d0*/\n }\n }\n *(_DWORD *)(RtcDataPtr_1 + 8) = 0; /*0xffe3c6d8*/\n *(_WORD *)(RtcDataPtr_1 + 12) = 2047; /*0xffe3c6db*/\n *(_BYTE *)(RtcDataPtr_1 + 14) = 0; /*0xffe3c6df*/\n return 2047; /*0xffe3c6e2*/\n}"}

{"addr":"0xffe3c6e5","code":"bool IsLeapYear()\n{\n unsigned __int8 RtcIndexReg; // al\n unsigned __int8 CenturyReg; // al\n unsigned __int8 CenturyReg_1; // cl\n unsigned __int8 RtcIndexReg2; // al\n unsigned __int8 YearReg; // al\n unsigned __int8 RtcIndexReg3; // al\n char CenturyCalc; // bl\n unsigned __int8 RtcIndexReg4; // al\n\n RtcIndexReg = __inbyte(0x70u); /*0xffe3c6ee*/\n __outbyte(0x70u, RtcIndexReg & 0x80 | 0x32); /*0xffe3c6f3*/\n CenturyReg = __inbyte(0x71u); /*0xffe3c6fa*/\n CenturyReg_1 = CenturyReg; /*0xffe3c6fb*/\n RtcIndexReg2 = __inbyte(0x70u); /*0xffe3c700*/\n __outbyte(0x70u, RtcIndexReg2 & 0x80 | 0x32); /*0xffe3c705*/\n __outbyte(0x71u, 0); /*0xffe3c70b*/\n YearReg = __inbyte(0x70u); /*0xffe3c70f*/\n __outbyte(0x70u, YearReg & 0x80 | 0x32); /*0xffe3c714*/\n RtcIndexReg3 = __inbyte(0x71u); /*0xffe3c718*/\n CenturyCalc = RtcIndexReg3 & 0x7F; /*0xffe3c71b*/\n RtcIndexReg4 = __inbyte(0x70u); /*0xffe3c721*/\n __outbyte(0x70u, RtcIndexReg4 & 0x80 | 0x32); /*0xffe3c726*/\n __outbyte(0x71u, CenturyReg_1); /*0xffe3c72c*/\n return CenturyCalc == 25 || CenturyCalc == 32; /*0xffe3c73d*/\n}"}

{"addr":"0xffe3c741","code":"bool IsHobInitialized()\n{\n unsigned __int8 RtcIndexReg; // al\n unsigned __int8 HobInitFlag; // al\n int TimeoutCount; // ecx\n unsigned __int8 RtcIndexReg2; // al\n char RtcUpdateFlag; // al\n unsigned __int8 RtcIndexReg3; // al\n unsigned __int8 RtcIndexReg4; // al\n unsigned __int8 n0x80; // al\n\n RtcIndexReg = __inbyte(0x70u); /*0xffe3c74a*/\n __outbyte(0x70u, RtcIndexReg & 0x80 | 0xD); /*0xffe3c74f*/\n HobInitFlag = __inbyte(0x71u); /*0xffe3c756*/\n if ( HobInitFlag < 0x80u ) /*0xffe3c759*/\n return 0; /*0xffe3c759*/\n TimeoutCount = 10001; /*0xffe3c75b*/\n RtcIndexReg2 = __inbyte(0x70u); /*0xffe3c763*/\n __outbyte(0x70u, RtcIndexReg2 & 0x80 | 0xA); /*0xffe3c768*/\n RtcUpdateFlag = __inbyte(0x71u); /*0xffe3c76c*/\n while ( RtcUpdateFlag < 0 && TimeoutCount ) /*0xffe3c771*/\n {\n RtcIndexReg3 = __inbyte(0x70u); /*0xffe3c776*/\n __outbyte(0x70u, RtcIndexReg3 & 0x80 | 0xA); /*0xffe3c77b*/\n RtcUpdateFlag = __inbyte(0x71u); /*0xffe3c77f*/\n --TimeoutCount; /*0xffe3c780*/\n }\n RtcIndexReg4 = __inbyte(0x70u); /*0xffe3c788*/\n __outbyte(0x70u, RtcIndexReg4 & 0x80 | 0xD); /*0xffe3c78d*/\n n0x80 = __inbyte(0x71u); /*0xffe3c791*/\n return TimeoutCount && n0x80 >= 0x80u; /*0xffe3c79a*/\n}"}

{"addr":"0xffe3c7a4","code":"char __thiscall ReadRtcDateTime(_BYTE *this)\n{\n unsigned __int8 RtcIndexVal; // al\n char CenturyByte; // al\n unsigned __int8 SecIndexVal; // al\n unsigned __int8 RtcSecond; // al\n unsigned __int8 MinIndexVal; // al\n unsigned __int8 RtcMinute; // al\n unsigned __int8 HourIndexVal; // al\n unsigned __int8 RtcHour; // al\n unsigned __int8 DayIndexVal; // al\n unsigned __int8 RtcDay; // al\n unsigned __int8 MonthIndexVal; // al\n unsigned __int8 RtcMonth; // al\n unsigned __int8 YearIndexVal; // al\n unsigned __int8 RtcYearLow; // al\n bool IsLeapYear; // zf\n unsigned __int8 CentIndexVal; // al\n unsigned __int8 RtcCentury; // al\n char CenturyByte_1; // [esp+4h] [ebp-4h]\n\n if ( !this || !IsHobInitialized() ) /*0xffe3c7b6*/\n return 0; /*0xffe3c7af*/\n RtcIndexVal = __inbyte(0x70u); /*0xffe3c7c7*/\n __outbyte(0x70u, RtcIndexVal & 0x80 | 0xB); /*0xffe3c7cc*/\n CenturyByte = __inbyte(0x71u); /*0xffe3c7d3*/\n CenturyByte_1 = CenturyByte; /*0xffe3c7d4*/\n SecIndexVal = __inbyte(0x70u); /*0xffe3c7da*/\n __outbyte(0x70u, SecIndexVal & 0x80); /*0xffe3c7dd*/\n RtcSecond = __inbyte(0x71u); /*0xffe3c7e1*/\n *(this + 6) = RtcSecond; /*0xffe3c7e2*/\n MinIndexVal = __inbyte(0x70u); /*0xffe3c7e8*/\n __outbyte(0x70u, MinIndexVal & 0x80 | 2); /*0xffe3c7ed*/\n RtcMinute = __inbyte(0x71u); /*0xffe3c7f1*/\n *(this + 5) = RtcMinute; /*0xffe3c7f2*/\n HourIndexVal = __inbyte(0x70u); /*0xffe3c7f8*/\n __outbyte(0x70u, HourIndexVal & 0x80 | 4); /*0xffe3c7fd*/\n RtcHour = __inbyte(0x71u); /*0xffe3c801*/\n *(this + 4) = RtcHour; /*0xffe3c802*/\n DayIndexVal = __inbyte(0x70u); /*0xffe3c808*/\n __outbyte(0x70u, DayIndexVal & 0x80 | 7); /*0xffe3c80d*/\n RtcDay = __inbyte(0x71u); /*0xffe3c811*/\n *(this + 3) = RtcDay; /*0xffe3c812*/\n MonthIndexVal = __inbyte(0x70u); /*0xffe3c818*/\n __outbyte(0x70u, MonthIndexVal & 0x80 | 8); /*0xffe3c81d*/\n RtcMonth = __inbyte(0x71u); /*0xffe3c821*/\n *(this + 2) = RtcMonth; /*0xffe3c822*/\n YearIndexVal = __inbyte(0x70u); /*0xffe3c828*/\n __outbyte(0x70u, YearIndexVal & 0x80 | 9); /*0xffe3c82d*/\n RtcYearLow = __inbyte(0x71u); /*0xffe3c831*/\n *(_WORD *)this = RtcYearLow; /*0xffe3c83a*/\n RtcCenturySet(CenturyByte_1); /*0xffe3c83d*/\n IsLeapYear = ::IsLeapYear(); /*0xffe3c84b*/\n CentIndexVal = __inbyte(0x70u); /*0xffe3c84d*/\n __outbyte(0x70u, CentIndexVal & 0x80 | 0x32); /*0xffe3c854*/\n RtcCentury = __inbyte(0x71u); /*0xffe3c858*/\n if ( IsLeapYear ) /*0xffe3c84e*/\n RtcCentury &= ~0x80u; /*0xffe3c859*/\n *(_WORD *)this += 100 * (unsigned __int8)(RtcCentury - 6 * (RtcCentury >> 4)); /*0xffe3c881*/\n return 1; /*0xffe3c886*/\n}","refs":[{"addr":"0xffe3c741","name":"IsHobInitialized"},{"addr":"0xffe3c60d","name":"RtcCenturySet"},{"addr":"0xffe3c6e5","name":"IsLeapYear"}]}

{"addr":"0xffe3c88b","code":"unsigned int AsciiSPrintFormat(_BYTE *_r_n, unsigned int n254, char *%04d_%02d_%02d_%02d:%02d:%02d_:_%a., ...)\n{\n va_list va; // [esp+10h] [ebp+10h] BYREF\n\n va_start(va, %04d_%02d_%02d_%02d:%02d:%02d_:_%a.);\n return AsciiSPrint(_r_n, n254, 0, %04d_%02d_%02d_%02d:%02d:%02d_:_%a., (char *)va); /*0xffe3c8a7*/\n}","refs":[{"addr":"0xffe3c949","name":"AsciiSPrint"}]}

{"addr":"0xffe3c8a8","code":"_BYTE *BasePrintLibSPrintMarker(_BYTE *a1, unsigned int a2, int i, __int16 a4, int a5)\n{\n int j; // esi\n\n for ( j = 0; j < i; ++j ) /*0xffe3c8b4*/\n {\n if ( (unsigned int)a1 >= a2 ) /*0xffe3c8bb*/\n break; /*0xffe3c8bb*/\n *a1 = a4; /*0xffe3c8c1*/\n if ( a5 != 1 ) /*0xffe3c8c3*/\n a1[1] = HIBYTE(a4); /*0xffe3c8ca*/\n a1 += a5; /*0xffe3c8cd*/\n }\n return a1; /*0xffe3c8d6*/\n}"}

{"addr":"0xffe3c8dc","code":"_BYTE *DivU64x32Remainder(_BYTE *_r_n, unsigned int n16, int a3, unsigned int a4)\n{\n _BYTE *_r_n_1; // esi\n int DebugService; // eax\n int v7; // eax\n int v8; // edx\n unsigned __int64 v9; // rtt\n unsigned int v11; // [esp-4h] [ebp-1Ch]\n int v12; // [esp+Ch] [ebp-Ch] BYREF\n int *v13; // [esp+10h] [ebp-8h]\n unsigned int n16_1; // [esp+14h] [ebp-4h]\n\n _r_n_1 = _r_n; /*0xffe3c8e3*/\n v13 = &v12; /*0xffe3c8eb*/\n n16_1 = n16; /*0xffe3c8ee*/\n *_r_n = 0; /*0xffe3c8f1*/\n do /*0xffe3c932*/\n {\n if ( !n16 ) /*0xffe3c8f6*/\n {\n DebugService = GetDebugService(); /*0xffe3c8f8*/\n if ( DebugService ) /*0xffe3c8ff*/\n (*(void ( **)(const char *, int, const char *))(DebugService + 4))( /*0xffe3c90d*/\n \"e:\\\\hs\\\\MdePkg\\\\Library\\\\BaseLib\\\\DivU64x32Remainder.c\",\n 47,\n \"Divisor != 0\");\n }\n v11 = a4 / n16_1; /*0xffe3c91d*/\n LODWORD(v9) = a3; /*0xffe3c921*/\n HIDWORD(v9) = a4 % n16_1; /*0xffe3c921*/\n v7 = v9 / n16_1; /*0xffe3c921*/\n v8 = v9 % n16_1; /*0xffe3c921*/\n if ( v13 ) /*0xffe3c926*/\n *v13 = v8; /*0xffe3c928*/\n ++_r_n_1; /*0xffe3c92e*/\n a3 = v7; /*0xffe3c92f*/\n a4 = v11; /*0xffe3c934*/\n *_r_n_1 = byte_FFE3E094[v12]; /*0xffe3c93d*/\n }\n while ( v11 | v7 ); /*0xffe3c932*/\n return _r_n_1; /*0xffe3c941*/\n}","refs":[{"addr":"0xffe3c265","name":"GetDebugService"},{"addr":"0xffe3e094","name":"byte_FFE3E094"}]}

Output truncated. Run: curl -o .ida-mcp/0b8a686b-3f89-4e9f-afda-7d760be8fb15.json http://127.0.0.1:13390/output/0b8a686b-3f89-4e9f-afda-7d760be8fb15.json

{"addr":"0xffe3d5a1","code":"unsigned int AsciiSPrintUnicode(_BYTE *_r_n, unsigned int n38, __int16 a3, char *%02d_%02d_%04d__%02d:%02d, ...)\n{\n va_list va; // [esp+18h] [ebp+18h] BYREF\n\n va_start(va, %02d_%02d_%04d__%02d:%02d);\n return AsciiSPrint(_r_n, n38, a3, %02d_%02d_%04d__%02d:%02d, (char *)va); /*0xffe3d5be*/\n}","refs":[{"addr":"0xffe3c949","name":"AsciiSPrint"}]}

{"addr":"0xffe3d5c0","code":"void *__thiscall X86ReadIdtr(void *this)\n{\n void *this_1; // eax\n\n if ( !this ) /*0xffe3d5c6*/\n PeiServicesGetIdt((int)\"e:\\\\hs\\\\MdePkg\\\\Library\\\\BaseLib\\\\X86ReadIdtr.c\", 37, (int)\"Idtr != ((void *) 0)\"); /*0xffe3d5d5*/\n this_1 = this; /*0xffe3d5db*/\n __sidt(this); /*0xffe3d5de*/\n return this_1; /*0xffe3d5e2*/\n}","refs":[{"addr":"0xffe3c2c0","name":"PeiServicesGetIdt"},{"addr":"0xffe3e095","name":"a123456789abcde","string":"123456789ABCDEFIdtr != ((void *) 0)"}]}

{"addr":"0xffe3d5e3","code":"__int16 __thiscall ReadUnaligned16(void *this)\n{\n int DebugService; // eax\n\n if ( !this ) /*0xffe3d5e8*/\n {\n DebugService = GetDebugService(); /*0xffe3d5ea*/\n if ( DebugService ) /*0xffe3d5f1*/\n (*(void ( **)(const char *, int, const char *))(DebugService + 4))( /*0xffe3d5ff*/\n \"e:\\\\hs\\\\MdePkg\\\\Library\\\\BaseLib\\\\Unaligned.c\",\n 38,\n \"Buffer != ((void *) 0)\");\n }\n return *(_WORD *)this; /*0xffe3d608*/\n}","refs":[{"addr":"0xffe3c265","name":"GetDebugService"}]}

{"addr":"0xffe3d60a","code":"__int64 __thiscall ReadUnaligned64(void *this)\n{\n int DebugService; // eax\n\n if ( !this ) /*0xffe3d60f*/\n {\n DebugService = GetDebugService(); /*0xffe3d611*/\n if ( DebugService ) /*0xffe3d618*/\n (*(void ( **)(const char *, int, const char *))(DebugService + 4))( /*0xffe3d629*/\n \"e:\\\\hs\\\\MdePkg\\\\Library\\\\BaseLib\\\\Unaligned.c\",\n 192,\n \"Buffer != ((void *) 0)\");\n }\n return *(_QWORD *)this; /*0xffe3d634*/\n}","refs":[{"addr":"0xffe3c265","name":"GetDebugService"}]}

{"addr":"0xffe3d636","code":"int WriteUnaligned32(int Unaligned64, int a2)\n{\n _DWORD *v2; // ecx\n _DWORD *v3; // esi\n int DebugService; // eax\n\n v3 = v2; /*0xffe3d637*/\n if ( !v2 ) /*0xffe3d63b*/\n {\n DebugService = GetDebugService(); /*0xffe3d63d*/\n if ( DebugService ) /*0xffe3d644*/\n (*(void ( **)(const char *, int, const char *))(DebugService + 4))( /*0xffe3d655*/\n \"e:\\\\hs\\\\MdePkg\\\\Library\\\\BaseLib\\\\Unaligned.c\",\n 219,\n \"Buffer != ((void *) 0)\");\n }\n *v3 = Unaligned64; /*0xffe3d663*/\n v3[1] = a2; /*0xffe3d665*/\n return Unaligned64; /*0xffe3d668*/\n}","refs":[{"addr":"0xffe3c265","name":"GetDebugService"}]}

{"addr":"0xffe3d66a","code":"unsigned int __thiscall StrLenInternal(char *%04d_%02d_%02d_%02d:%02d:%02d_:_%a.)\n{\n int DebugService; // eax\n unsigned int StrIndex; // eax\n\n if ( ((unsigned __int8)%04d_%02d_%02d_%02d:%02d:%02d_:_%a. & 1) != 0 ) /*0xffe3d670*/\n {\n DebugService = GetDebugService(); /*0xffe3d672*/\n if ( DebugService ) /*0xffe3d679*/\n (*(void ( **)(const char *, int, const char *))(DebugService + 4))( /*0xffe3d68a*/\n \"e:\\\\hs\\\\MdePkg\\\\Library\\\\BaseLib\\\\SafeString.c\",\n 128,\n \"((UINTN) String & 0x00000001) == 0\");\n }\n if ( !%04d_%02d_%02d_%02d:%02d:%02d_:_%a. ) /*0xffe3d692*/\n return 0; /*0xffe3d6b4*/\n StrIndex = 0; /*0xffe3d696*/\n if ( *(_WORD *)%04d_%02d_%02d_%02d:%02d:%02d_:_%a. ) /*0xffe3d698*/\n {\n while ( StrIndex < 0xF4240 ) /*0xffe3d6a2*/\n {\n ++StrIndex; /*0xffe3d6a4*/\n if ( !*((_WORD *)%04d_%02d_%02d_%02d:%02d:%02d_:_%a. + StrIndex) ) /*0xffe3d6a5*/\n return StrIndex; /*0xffe3d6a9*/\n }\n return 1000001; /*0xffe3d6ad*/\n }\n return StrIndex; /*0xffe3d6ab*/\n}","refs":[{"addr":"0xffe3c265","name":"GetDebugService"}]}

{"addr":"0xffe3d6b8","code":"unsigned int __thiscall StrSizeInternal(char *%04d_%02d_%02d_%02d:%02d:%02d_:_%a.)\n{\n unsigned int n0xF4240; // eax\n\n n0xF4240 = 0; /*0xffe3d6b8*/\n if ( %04d_%02d_%02d_%02d:%02d:%02d_:_%a. && *%04d_%02d_%02d_%02d:%02d:%02d_:_%a. ) /*0xffe3d6be*/\n {\n while ( n0xF4240 < 0xF4240 ) /*0xffe3d6c7*/\n {\n if ( !*(%04d_%02d_%02d_%02d:%02d:%02d_:_%a. + ++n0xF4240) ) /*0xffe3d6ca*/\n return n0xF4240; /*0xffe3d6ce*/\n }\n return 1000001; /*0xffe3d6d1*/\n }\n return n0xF4240; /*0xffe3d6d0*/\n}"}