From da70596895d8135e08f8caac6978117697b4c021 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sun, 18 Aug 2024 21:39:29 +0200 Subject: [REFACTOR] Improved project structure. Signed-off-by: Amlal El Mahrouss --- dev/Kernel/CFKit/LoaderUtils.hxx | 54 ---------------------------------------- 1 file changed, 54 deletions(-) delete mode 100644 dev/Kernel/CFKit/LoaderUtils.hxx (limited to 'dev/Kernel/CFKit/LoaderUtils.hxx') diff --git a/dev/Kernel/CFKit/LoaderUtils.hxx b/dev/Kernel/CFKit/LoaderUtils.hxx deleted file mode 100644 index 3edacc67..00000000 --- a/dev/Kernel/CFKit/LoaderUtils.hxx +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef __CFKIT_LOADER_UTILS_HXX__ -#define __CFKIT_LOADER_UTILS_HXX__ - -#include -#include - -namespace Kernel -{ - /// @brief Find the PE header inside the blob. - inline auto ldr_find_exec_header(DosHeaderPtr ptrDos) -> ExecHeaderPtr - { - if (!ptrDos) - return nullptr; - - if (ptrDos->eMagic[0] != kMagMz0) - return nullptr; - - if (ptrDos->eMagic[1] != kMagMz1) - return nullptr; - - return (ExecHeaderPtr)(VoidPtr)(&ptrDos->eLfanew + 1); - } - - /// @brief Find the PE optional header inside the blob. - inline auto ldr_find_opt_exec_header(DosHeaderPtr ptrDos) -> ExecOptionalHeaderPtr - { - if (!ptrDos) - return nullptr; - - auto exec = ldr_find_exec_header(ptrDos); - - if (!exec) - return nullptr; - - return (ExecOptionalHeaderPtr)(VoidPtr)(&exec->mCharacteristics + 1); - } - - /// @brief Find the PE header inside the blob. - /// @note overloaded function. - inline auto ldr_find_exec_header(const Char* ptrDos) -> ExecHeaderPtr - { - return ldr_find_exec_header((DosHeaderPtr)ptrDos); - } - - - /// @brief Find the PE header inside the blob. - /// @note overloaded function. - inline auto ldr_find_opt_exec_header(const Char* ptrDos) -> ExecOptionalHeaderPtr - { - return ldr_find_opt_exec_header((DosHeaderPtr)ptrDos); - } -} // namespace Kernel - -#endif // ifndef __CFKIT_LOADER_UTILS_HXX__ -- cgit v1.2.3