TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
CascRootFile_Mndx.cpp File Reference
#include "CascLib.h"
#include "CascCommon.h"
#include "CascMndx.h"
+ Include dependency graph for CascRootFile_Mndx.cpp:

Classes

struct  _FILE_MNDX_HEADER
 
struct  _FILE_MAR_INFO
 
struct  _CASC_MNDX_INFO
 
struct  _CASC_MNDX_PACKAGE
 
struct  _CASC_MNDX_PACKAGES
 
struct  _CASC_ROOT_ENTRY_MNDX
 
struct  TRootHandler_MNDX
 

Macros

#define __CASCLIB_SELF__
 
#define CASC_MAR_SIGNATURE   0x0052414d
 
#define GetNumbrOfSetBits32(x)   (GetNumberOfSetBits(x) >> 0x18)
 
#define CASC_PACKAGES_INIT   0x10
 
#define CASC_PACKAGES_DELTA   0x10
 

Typedefs

typedef struct _FILE_MNDX_HEADER FILE_MNDX_HEADER
 
typedef struct _FILE_MNDX_HEADERPFILE_MNDX_HEADER
 
typedef struct _FILE_MAR_INFO FILE_MAR_INFO
 
typedef struct _FILE_MAR_INFOPFILE_MAR_INFO
 
typedef struct _CASC_MNDX_INFO CASC_MNDX_INFO
 
typedef struct _CASC_MNDX_INFOPCASC_MNDX_INFO
 
typedef struct _CASC_MNDX_PACKAGE CASC_MNDX_PACKAGE
 
typedef struct _CASC_MNDX_PACKAGEPCASC_MNDX_PACKAGE
 
typedef struct _CASC_MNDX_PACKAGES CASC_MNDX_PACKAGES
 
typedef struct
_CASC_MNDX_PACKAGES
PCASC_MNDX_PACKAGES
 
typedef struct
_CASC_ROOT_ENTRY_MNDX 
CASC_ROOT_ENTRY_MNDX
 
typedef struct
_CASC_ROOT_ENTRY_MNDX
PCASC_ROOT_ENTRY_MNDX
 

Functions

DWORD GetNumberOfSetBits (DWORD Value32)
 
static bool RootFileRead (LPBYTE pbFilePointer, LPBYTE pbFileEnd, void *pvBuffer, size_t dwBytesToRead)
 
static void MAR_FILE_CreateDatabase (PMAR_FILE pMarFile)
 
static int MAR_FILE_SearchFile (PMAR_FILE pMarFile, TMndxFindResult *pStruct1C)
 
static void MAR_FILE_Destructor (PMAR_FILE pMarFile)
 
static PCASC_MNDX_PACKAGES AllocatePackages (size_t nNameEntries, size_t nNameBufferMax)
 
static PCASC_MNDX_PACKAGES InsertToPackageList (PCASC_MNDX_PACKAGES pPackages, const char *szFileName, size_t cchFileName, size_t nPackageIndex)
 
static int LoadPackageNames (PCASC_MNDX_INFO pMndxInfo, PCASC_MNDX_PACKAGES *ppPackages)
 
PCASC_MNDX_PACKAGE FindMndxPackage (TRootHandler_MNDX *pRootHandler, const char *szFileName)
 
int SearchMndxInfo (TRootHandler_MNDX *pRootHandler, const char *szFileName, DWORD dwPackage, PCASC_ROOT_ENTRY_MNDX *ppRootEntry)
 
static LPBYTE FillFindData (TRootHandler_MNDX *pRootHandler, TCascSearch *pSearch, TMndxFindResult *pStruct1C, PDWORD PtrFileSize)
 
static int MndxHandler_Insert (TRootHandler_MNDX *, const char *, LPBYTE)
 
static LPBYTE MndxHandler_Search (TRootHandler_MNDX *pRootHandler, TCascSearch *pSearch, PDWORD PtrFileSize, PDWORD)
 
static void MndxHandler_EndSearch (TRootHandler_MNDX *, TCascSearch *pSearch)
 
static LPBYTE MndxHandler_GetKey (TRootHandler_MNDX *pRootHandler, const char *szFileName)
 
static void MndxHandler_Close (TRootHandler_MNDX *pRootHandler)
 
int RootHandler_CreateMNDX (TCascStorage *hs, LPBYTE pbRootFile, DWORD cbRootFile)
 

Variables

unsigned char table_1BA1818 [0x800]
 

Macro Definition Documentation

#define __CASCLIB_SELF__
#define CASC_MAR_SIGNATURE   0x0052414d
#define CASC_PACKAGES_DELTA   0x10
#define CASC_PACKAGES_INIT   0x10
#define GetNumbrOfSetBits32 (   x)    (GetNumberOfSetBits(x) >> 0x18)

Typedef Documentation

typedef struct _FILE_MAR_INFO FILE_MAR_INFO
typedef struct _CASC_MNDX_INFO * PCASC_MNDX_INFO
typedef struct _FILE_MAR_INFO * PFILE_MAR_INFO

Function Documentation

static PCASC_MNDX_PACKAGES AllocatePackages ( size_t  nNameEntries,
size_t  nNameBufferMax 
)
static
2789 {
2790  PCASC_MNDX_PACKAGES pPackages;
2791  size_t cbToAllocate;
2792 
2793  // Allocate space
2794  cbToAllocate = sizeof(CASC_MNDX_PACKAGES) + (nNameEntries * sizeof(CASC_MNDX_PACKAGE)) + nNameBufferMax;
2795  pPackages = (PCASC_MNDX_PACKAGES)CASC_ALLOC(BYTE, cbToAllocate);
2796  if(pPackages != NULL)
2797  {
2798  // Fill the structure
2799  memset(pPackages, 0, cbToAllocate);
2800 
2801  // Init the list entries
2802  pPackages->szNameBuffer = (char *)(&pPackages->Packages[nNameEntries]);
2803  pPackages->NameEntries = nNameEntries;
2804  pPackages->NameBufferUsed = 0;
2805  pPackages->NameBufferMax = nNameBufferMax;
2806  }
2807 
2808  return pPackages;
2809 }
size_t NameBufferMax
Definition: CascRootFile_Mndx.cpp:77
#define CASC_ALLOC(type, count)
Definition: CascCommon.h:302
char * szNameBuffer
Definition: CascRootFile_Mndx.cpp:74
Definition: CascRootFile_Mndx.cpp:65
arena_t NULL
Definition: jemalloc_internal.h:624
struct _CASC_MNDX_PACKAGES CASC_MNDX_PACKAGES
size_t NameEntries
Definition: CascRootFile_Mndx.cpp:75
CASC_MNDX_PACKAGE Packages[1]
Definition: CascRootFile_Mndx.cpp:79
struct _CASC_MNDX_PACKAGES * PCASC_MNDX_PACKAGES
size_t NameBufferUsed
Definition: CascRootFile_Mndx.cpp:76
unsigned char BYTE
Definition: CascPort.h:136
Definition: CascRootFile_Mndx.cpp:72

+ Here is the caller graph for this function:

static LPBYTE FillFindData ( TRootHandler_MNDX pRootHandler,
TCascSearch pSearch,
TMndxFindResult pStruct1C,
PDWORD  PtrFileSize 
)
static
3005 {
3006  PCASC_ROOT_ENTRY_MNDX pRootEntry = NULL;
3007  PCASC_MNDX_PACKAGE pPackage;
3008  char * szStrippedPtr;
3009  char szStrippedName[MAX_PATH+1];
3010  int nError;
3011 
3012  // Sanity check
3013  assert(pStruct1C->cchFoundPath < MAX_PATH);
3014 
3015  // Fill the file name
3016  memcpy(pSearch->szFileName, pStruct1C->szFoundPath, pStruct1C->cchFoundPath);
3017  pSearch->szFileName[pStruct1C->cchFoundPath] = 0;
3018 
3019  // Fill the file size
3020  pPackage = FindMndxPackage(pRootHandler, pSearch->szFileName);
3021  if(pPackage == NULL)
3022  return NULL;
3023 
3024  // Cut the package name off the full path
3025  szStrippedPtr = pSearch->szFileName + pPackage->nLength;
3026  while(szStrippedPtr[0] == '/')
3027  szStrippedPtr++;
3028 
3029  // We need to convert the stripped name to lowercase, replacing backslashes with slashes
3030  NormalizeFileName_LowerSlash(szStrippedName, szStrippedPtr, MAX_PATH);
3031 
3032  // Search the package
3033  nError = SearchMndxInfo(pRootHandler, szStrippedName, (DWORD)(pPackage - pRootHandler->pPackages->Packages), &pRootEntry);
3034  if(nError != ERROR_SUCCESS)
3035  return NULL;
3036 
3037  // Give the file size
3038  if(PtrFileSize != NULL)
3039  PtrFileSize[0] = pRootEntry->FileSize;
3040  return pRootEntry->EncodingKey;
3041 }
size_t NormalizeFileName_LowerSlash(char *szNormName, const char *szFileName, size_t cchMaxChars)
Definition: Common.cpp:255
Definition: CascRootFile_Mndx.cpp:65
#define MAX_PATH
Definition: CascPort.h:160
arena_t NULL
Definition: jemalloc_internal.h:624
Definition: CascRootFile_Mndx.cpp:85
size_t nLength
Definition: CascRootFile_Mndx.cpp:68
DWORD FileSize
Definition: CascRootFile_Mndx.cpp:89
int SearchMndxInfo(TRootHandler_MNDX *pRootHandler, const char *szFileName, DWORD dwPackage, PCASC_ROOT_ENTRY_MNDX *ppRootEntry)
Definition: CascRootFile_Mndx.cpp:2965
char szFileName[MAX_PATH]
Definition: CascCommon.h:268
unsigned int DWORD
Definition: CascPort.h:139
PCASC_MNDX_PACKAGES pPackages
Definition: CascRootFile_Mndx.cpp:2925
CASC_MNDX_PACKAGE Packages[1]
Definition: CascRootFile_Mndx.cpp:79
const char * szFoundPath
Definition: CascMndx.h:203
size_t cchFoundPath
Definition: CascMndx.h:204
PCASC_MNDX_PACKAGE FindMndxPackage(TRootHandler_MNDX *pRootHandler, const char *szFileName)
Definition: CascRootFile_Mndx.cpp:2928
BYTE EncodingKey[MD5_HASH_SIZE]
Definition: CascRootFile_Mndx.cpp:88
#define ERROR_SUCCESS
Definition: CascPort.h:204

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

PCASC_MNDX_PACKAGE FindMndxPackage ( TRootHandler_MNDX pRootHandler,
const char *  szFileName 
)
2929 {
2930  PCASC_MNDX_PACKAGE pMatching = NULL;
2931  PCASC_MNDX_PACKAGE pPackage;
2932  size_t nMaxLength = 0;
2933  size_t nLength = strlen(szFileName);
2934 
2935  // Packages must be loaded
2936  assert(pRootHandler->pPackages != NULL);
2937  pPackage = pRootHandler->pPackages->Packages;
2938 
2939  //FILE * fp = fopen("E:\\packages.txt", "wt");
2940  //for(size_t i = 0; i < hs->pPackages->NameEntries; i++, pPackage++)
2941  //{
2942  // if(pPackage->szFileName != NULL)
2943  // fprintf(fp, "%s\n", pPackage->szFileName);
2944  //}
2945  //fclose(fp);
2946 
2947  // Find the longest matching name
2948  for(size_t i = 0; i < pRootHandler->pPackages->NameEntries; i++, pPackage++)
2949  {
2950  if(pPackage->szFileName != NULL && pPackage->nLength < nLength && pPackage->nLength > nMaxLength)
2951  {
2952  // Compare the package name
2953  if(!strncmp(szFileName, pPackage->szFileName, pPackage->nLength))
2954  {
2955  pMatching = pPackage;
2956  nMaxLength = pPackage->nLength;
2957  }
2958  }
2959  }
2960 
2961  // Give the package pointer or NULL if not found
2962  return pMatching;
2963 }
Definition: CascRootFile_Mndx.cpp:65
arena_t NULL
Definition: jemalloc_internal.h:624
size_t nLength
Definition: CascRootFile_Mndx.cpp:68
size_t NameEntries
Definition: CascRootFile_Mndx.cpp:75
PCASC_MNDX_PACKAGES pPackages
Definition: CascRootFile_Mndx.cpp:2925
char * szFileName
Definition: CascRootFile_Mndx.cpp:67
CASC_MNDX_PACKAGE Packages[1]
Definition: CascRootFile_Mndx.cpp:79

+ Here is the caller graph for this function:

DWORD GetNumberOfSetBits ( DWORD  Value32)
241 {
242  Value32 = ((Value32 >> 1) & 0x55555555) + (Value32 & 0x55555555);
243  Value32 = ((Value32 >> 2) & 0x33333333) + (Value32 & 0x33333333);
244  Value32 = ((Value32 >> 4) & 0x0F0F0F0F) + (Value32 & 0x0F0F0F0F);
245 
246  return (Value32 * 0x01010101);
247 }

+ Here is the caller graph for this function:

static PCASC_MNDX_PACKAGES InsertToPackageList ( PCASC_MNDX_PACKAGES  pPackages,
const char *  szFileName,
size_t  cchFileName,
size_t  nPackageIndex 
)
static
2816 {
2817  size_t nNewNameEntries = pPackages->NameEntries;
2818  size_t nNewNameBufferMax = pPackages->NameBufferMax;
2819  size_t cbToAllocate;
2820  char * szNameBuffer;
2821 
2822  // Need to reallocate?
2823  while(nPackageIndex >= nNewNameEntries)
2824  nNewNameEntries = nNewNameEntries + CASC_PACKAGES_DELTA;
2825  if((pPackages->NameBufferUsed + cchFileName + 1) > nNewNameBufferMax)
2826  nNewNameBufferMax = nNewNameBufferMax + 0x1000;
2827 
2828  // If any of the two variables overflowed, we need to reallocate the name list
2829  if(nNewNameEntries > pPackages->NameEntries || nNewNameBufferMax > pPackages->NameBufferMax)
2830  {
2831  PCASC_MNDX_PACKAGES pOldPackages = pPackages;
2832 
2833  // Allocate new name list
2834  cbToAllocate = sizeof(CASC_MNDX_PACKAGES) + (nNewNameEntries * sizeof(CASC_MNDX_PACKAGE)) + nNewNameBufferMax;
2835  pPackages = (PCASC_MNDX_PACKAGES)CASC_ALLOC(BYTE, cbToAllocate);
2836  if(pPackages == NULL)
2837  return NULL;
2838 
2839  // Copy the old entries
2840  memset(pPackages, 0, cbToAllocate);
2841  pPackages->szNameBuffer = szNameBuffer = (char *)(&pPackages->Packages[nNewNameEntries]);
2842  memcpy(pPackages->szNameBuffer, pOldPackages->szNameBuffer, pOldPackages->NameBufferUsed);
2843 
2844  // Copy the old entries
2845  for(size_t i = 0; i < pOldPackages->NameEntries; i++)
2846  {
2847  if(pOldPackages->Packages[i].szFileName != NULL)
2848  {
2849  pPackages->Packages[i].szFileName = pPackages->szNameBuffer + (pOldPackages->Packages[i].szFileName - pOldPackages->szNameBuffer);
2850  pPackages->Packages[i].nLength = pOldPackages->Packages[i].nLength;
2851  }
2852  }
2853 
2854  // Fill the limits
2855  pPackages->NameEntries = nNewNameEntries;
2856  pPackages->NameBufferUsed = pOldPackages->NameBufferUsed;
2857  pPackages->NameBufferMax = nNewNameBufferMax;
2858 
2859  // Switch the name lists
2860  CASC_FREE(pOldPackages);
2861  }
2862 
2863  // The slot is expected to be empty at the moment
2864  assert(pPackages->Packages[nPackageIndex].szFileName == NULL);
2865  assert(pPackages->Packages[nPackageIndex].nLength == 0);
2866 
2867  // Set the file name entry
2868  szNameBuffer = pPackages->szNameBuffer + pPackages->NameBufferUsed;
2869  pPackages->Packages[nPackageIndex].szFileName = szNameBuffer;
2870  pPackages->Packages[nPackageIndex].nLength = cchFileName;
2871  memcpy(szNameBuffer, szFileName, cchFileName);
2872  pPackages->NameBufferUsed += (cchFileName + 1);
2873  return pPackages;
2874 }
#define CASC_PACKAGES_DELTA
Definition: CascRootFile_Mndx.cpp:2786
size_t NameBufferMax
Definition: CascRootFile_Mndx.cpp:77
#define CASC_ALLOC(type, count)
Definition: CascCommon.h:302
char * szNameBuffer
Definition: CascRootFile_Mndx.cpp:74
Definition: CascRootFile_Mndx.cpp:65
arena_t NULL
Definition: jemalloc_internal.h:624
size_t nLength
Definition: CascRootFile_Mndx.cpp:68
struct _CASC_MNDX_PACKAGES CASC_MNDX_PACKAGES
#define CASC_FREE(ptr)
Definition: CascCommon.h:303
size_t NameEntries
Definition: CascRootFile_Mndx.cpp:75
char * szFileName
Definition: CascRootFile_Mndx.cpp:67
CASC_MNDX_PACKAGE Packages[1]
Definition: CascRootFile_Mndx.cpp:79
struct _CASC_MNDX_PACKAGES * PCASC_MNDX_PACKAGES
size_t NameBufferUsed
Definition: CascRootFile_Mndx.cpp:76
unsigned char BYTE
Definition: CascPort.h:136
Definition: CascRootFile_Mndx.cpp:72

+ Here is the caller graph for this function:

static int LoadPackageNames ( PCASC_MNDX_INFO  pMndxInfo,
PCASC_MNDX_PACKAGES ppPackages 
)
static
2877 {
2878  TMndxFindResult Struct1C;
2879  PCASC_MNDX_PACKAGES pPackages = NULL;
2880  PMAR_FILE pMarFile;
2881 
2882  // Sanity checks
2883  assert(pMndxInfo != NULL);
2884 
2885  // Prepare the file name search in the top level directory
2886  pMarFile = pMndxInfo->pMarFile1;
2887  Struct1C.SetSearchPath("", 0);
2888 
2889  // Allocate initial name list structure
2890  pPackages = AllocatePackages(CASC_PACKAGES_INIT, 0x1000);
2891  if(pPackages == NULL)
2892  return ERROR_NOT_ENOUGH_MEMORY;
2893 
2894  // Keep searching as long as we find something
2895  for(;;)
2896  {
2897  bool bFindResult = false;
2898 
2899  // Search the next file name
2900  pMarFile->pDatabasePtr->sub_1956CE0(&Struct1C, &bFindResult);
2901  if(bFindResult == false)
2902  break;
2903 
2904  // Insert the found name to the top level directory list
2905  pPackages = InsertToPackageList(pPackages, Struct1C.szFoundPath, Struct1C.cchFoundPath, Struct1C.FileNameIndex);
2906  if(pPackages == NULL)
2907  return ERROR_NOT_ENOUGH_MEMORY;
2908  }
2909 
2910  // Give the packages to the caller
2911  if(ppPackages != NULL)
2912  ppPackages[0] = pPackages;
2913  return ERROR_SUCCESS;
2914 }
int SetSearchPath(const char *szNewSearchPath, size_t cchNewSearchPath)
Definition: CascRootFile_Mndx.cpp:307
#define ERROR_NOT_ENOUGH_MEMORY
Definition: CascPort.h:208
arena_t NULL
Definition: jemalloc_internal.h:624
static PCASC_MNDX_PACKAGES AllocatePackages(size_t nNameEntries, size_t nNameBufferMax)
Definition: CascRootFile_Mndx.cpp:2788
TFileNameDatabasePtr * pDatabasePtr
Definition: CascMndx.h:345
Definition: CascMndx.h:343
Definition: CascMndx.h:188
DWORD FileNameIndex
Definition: CascMndx.h:205
int sub_1956CE0(TMndxFindResult *pStruct1C, bool *pbFindResult)
Definition: CascRootFile_Mndx.cpp:2684
static PCASC_MNDX_PACKAGES InsertToPackageList(PCASC_MNDX_PACKAGES pPackages, const char *szFileName, size_t cchFileName, size_t nPackageIndex)
Definition: CascRootFile_Mndx.cpp:2811
struct _MAR_FILE * pMarFile1
Definition: CascRootFile_Mndx.cpp:56
const char * szFoundPath
Definition: CascMndx.h:203
size_t cchFoundPath
Definition: CascMndx.h:204
#define CASC_PACKAGES_INIT
Definition: CascRootFile_Mndx.cpp:2785
Definition: CascRootFile_Mndx.cpp:72
#define ERROR_SUCCESS
Definition: CascPort.h:204

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void MAR_FILE_CreateDatabase ( PMAR_FILE  pMarFile)
static
2757 {
2758  pMarFile->pDatabasePtr = new TFileNameDatabasePtr;
2759  if(pMarFile->pDatabasePtr != NULL)
2760  pMarFile->pDatabasePtr->CreateDatabase(pMarFile->pbMarData, pMarFile->cbMarData);
2761 }
Definition: CascMndx.h:272
arena_t NULL
Definition: jemalloc_internal.h:624
int CreateDatabase(LPBYTE pbMarData, DWORD cbMarData)
Definition: CascRootFile_Mndx.cpp:2714
TFileNameDatabasePtr * pDatabasePtr
Definition: CascMndx.h:345
DWORD cbMarData
Definition: CascMndx.h:347
LPBYTE pbMarData
Definition: CascMndx.h:346

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void MAR_FILE_Destructor ( PMAR_FILE  pMarFile)
static
2769 {
2770  if(pMarFile != NULL)
2771  {
2772  if(pMarFile->pDatabasePtr != NULL)
2773  delete pMarFile->pDatabasePtr;
2774  if(pMarFile->pbMarData != NULL)
2775  CASC_FREE(pMarFile->pbMarData);
2776 
2777  CASC_FREE(pMarFile);
2778  }
2779 }
arena_t NULL
Definition: jemalloc_internal.h:624
#define CASC_FREE(ptr)
Definition: CascCommon.h:303
TFileNameDatabasePtr * pDatabasePtr
Definition: CascMndx.h:345
LPBYTE pbMarData
Definition: CascMndx.h:346

+ Here is the caller graph for this function:

static int MAR_FILE_SearchFile ( PMAR_FILE  pMarFile,
TMndxFindResult pStruct1C 
)
static
2764 {
2765  return pMarFile->pDatabasePtr->FindFileInDatabase(pStruct1C);
2766 }
int FindFileInDatabase(TMndxFindResult *pStruct1C)
Definition: CascRootFile_Mndx.cpp:2665
TFileNameDatabasePtr * pDatabasePtr
Definition: CascMndx.h:345

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void MndxHandler_Close ( TRootHandler_MNDX pRootHandler)
static
3119 {
3120  if(pRootHandler->MndxInfo.pMarFile1 != NULL)
3121  MAR_FILE_Destructor(pRootHandler->MndxInfo.pMarFile1);
3122  if(pRootHandler->MndxInfo.pMarFile2 != NULL)
3123  MAR_FILE_Destructor(pRootHandler->MndxInfo.pMarFile2);
3124  if(pRootHandler->MndxInfo.pMarFile3 != NULL)
3125  MAR_FILE_Destructor(pRootHandler->MndxInfo.pMarFile3);
3126  if(pRootHandler->ppValidEntries != NULL)
3127  CASC_FREE(pRootHandler->ppValidEntries);
3128  if(pRootHandler->pMndxEntries != NULL)
3129  CASC_FREE(pRootHandler->pMndxEntries);
3130  if(pRootHandler->pPackages != NULL)
3131  CASC_FREE(pRootHandler->pPackages);
3132 
3133  CASC_FREE(pRootHandler);
3134 }
struct _MAR_FILE * pMarFile3
Definition: CascRootFile_Mndx.cpp:58
arena_t NULL
Definition: jemalloc_internal.h:624
#define CASC_FREE(ptr)
Definition: CascCommon.h:303
PCASC_ROOT_ENTRY_MNDX * ppValidEntries
Definition: CascRootFile_Mndx.cpp:2923
CASC_MNDX_INFO MndxInfo
Definition: CascRootFile_Mndx.cpp:2921
PCASC_MNDX_PACKAGES pPackages
Definition: CascRootFile_Mndx.cpp:2925
struct _MAR_FILE * pMarFile1
Definition: CascRootFile_Mndx.cpp:56
PCASC_ROOT_ENTRY_MNDX pMndxEntries
Definition: CascRootFile_Mndx.cpp:2924
struct _MAR_FILE * pMarFile2
Definition: CascRootFile_Mndx.cpp:57
static void MAR_FILE_Destructor(PMAR_FILE pMarFile)
Definition: CascRootFile_Mndx.cpp:2768

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void MndxHandler_EndSearch ( TRootHandler_MNDX ,
TCascSearch pSearch 
)
static
3082 {
3083  if(pSearch != NULL)
3084  delete (TMndxFindResult *)pSearch->pRootContext;
3085  pSearch->pRootContext = NULL;
3086 }
arena_t NULL
Definition: jemalloc_internal.h:624
void * pRootContext
Definition: CascCommon.h:271
Definition: CascMndx.h:188

+ Here is the caller graph for this function:

static LPBYTE MndxHandler_GetKey ( TRootHandler_MNDX pRootHandler,
const char *  szFileName 
)
static
3089 {
3090  PCASC_ROOT_ENTRY_MNDX pRootEntry = NULL;
3091  PCASC_MNDX_PACKAGE pPackage;
3092  char * szStrippedName;
3093  char szNormName[MAX_PATH+1];
3094  int nError;
3095 
3096  // Convert the file name to lowercase + slashes
3097  NormalizeFileName_LowerSlash(szNormName, szFileName, MAX_PATH);
3098 
3099  // Find the package number
3100  pPackage = FindMndxPackage(pRootHandler, szNormName);
3101  if(pPackage == NULL)
3102  return NULL;
3103 
3104  // Cut the package name off the full path
3105  szStrippedName = szNormName + pPackage->nLength;
3106  while(szStrippedName[0] == '/')
3107  szStrippedName++;
3108 
3109  // Find the root entry
3110  nError = SearchMndxInfo(pRootHandler, szStrippedName, (DWORD)(pPackage - pRootHandler->pPackages->Packages), &pRootEntry);
3111  if(nError != ERROR_SUCCESS || pRootEntry == NULL)
3112  return NULL;
3113 
3114  // Return the encoding key
3115  return pRootEntry->EncodingKey;
3116 }
size_t NormalizeFileName_LowerSlash(char *szNormName, const char *szFileName, size_t cchMaxChars)
Definition: Common.cpp:255
Definition: CascRootFile_Mndx.cpp:65
#define MAX_PATH
Definition: CascPort.h:160
arena_t NULL
Definition: jemalloc_internal.h:624
Definition: CascRootFile_Mndx.cpp:85
size_t nLength
Definition: CascRootFile_Mndx.cpp:68
int SearchMndxInfo(TRootHandler_MNDX *pRootHandler, const char *szFileName, DWORD dwPackage, PCASC_ROOT_ENTRY_MNDX *ppRootEntry)
Definition: CascRootFile_Mndx.cpp:2965
unsigned int DWORD
Definition: CascPort.h:139
PCASC_MNDX_PACKAGES pPackages
Definition: CascRootFile_Mndx.cpp:2925
CASC_MNDX_PACKAGE Packages[1]
Definition: CascRootFile_Mndx.cpp:79
PCASC_MNDX_PACKAGE FindMndxPackage(TRootHandler_MNDX *pRootHandler, const char *szFileName)
Definition: CascRootFile_Mndx.cpp:2928
BYTE EncodingKey[MD5_HASH_SIZE]
Definition: CascRootFile_Mndx.cpp:88
#define ERROR_SUCCESS
Definition: CascPort.h:204

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int MndxHandler_Insert ( TRootHandler_MNDX ,
const char *  ,
LPBYTE   
)
static
3044 {
3045  return ERROR_NOT_SUPPORTED;
3046 }
#define ERROR_NOT_SUPPORTED
Definition: CascPort.h:209

+ Here is the caller graph for this function:

static LPBYTE MndxHandler_Search ( TRootHandler_MNDX pRootHandler,
TCascSearch pSearch,
PDWORD  PtrFileSize,
PDWORD   
)
static
3049 {
3050  TMndxFindResult * pStruct1C = NULL;
3051  PCASC_MNDX_INFO pMndxInfo = &pRootHandler->MndxInfo;
3052  PMAR_FILE pMarFile = pMndxInfo->pMarFile3;
3053  bool bFindResult = false;
3054 
3055  // If the first time, allocate the structure for the search result
3056  if(pSearch->pRootContext == NULL)
3057  {
3058  // Create the new search structure
3059  pStruct1C = new TMndxFindResult;
3060  if(pStruct1C == NULL)
3061  return NULL;
3062 
3063  // Setup the search mask
3064  pStruct1C->SetSearchPath("", 0);
3065  pSearch->pRootContext = pStruct1C;
3066  }
3067 
3068  // Make shortcut for the search structure
3069  assert(pSearch->pRootContext != NULL);
3070  pStruct1C = (TMndxFindResult *)pSearch->pRootContext;
3071 
3072  // Search the next file name (our code)
3073  pMarFile->pDatabasePtr->sub_1956CE0(pStruct1C, &bFindResult);
3074  if(bFindResult == false)
3075  return NULL;
3076 
3077  // Give the file size and encoding key
3078  return FillFindData(pRootHandler, pSearch, pStruct1C, PtrFileSize);
3079 }
struct _MAR_FILE * pMarFile3
Definition: CascRootFile_Mndx.cpp:58
int SetSearchPath(const char *szNewSearchPath, size_t cchNewSearchPath)
Definition: CascRootFile_Mndx.cpp:307
arena_t NULL
Definition: jemalloc_internal.h:624
static LPBYTE FillFindData(TRootHandler_MNDX *pRootHandler, TCascSearch *pSearch, TMndxFindResult *pStruct1C, PDWORD PtrFileSize)
Definition: CascRootFile_Mndx.cpp:3004
void * pRootContext
Definition: CascCommon.h:271
TFileNameDatabasePtr * pDatabasePtr
Definition: CascMndx.h:345
Definition: CascMndx.h:343
Definition: CascMndx.h:188
CASC_MNDX_INFO MndxInfo
Definition: CascRootFile_Mndx.cpp:2921
int sub_1956CE0(TMndxFindResult *pStruct1C, bool *pbFindResult)
Definition: CascRootFile_Mndx.cpp:2684
Definition: CascRootFile_Mndx.cpp:42

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static bool RootFileRead ( LPBYTE  pbFilePointer,
LPBYTE  pbFileEnd,
void *  pvBuffer,
size_t  dwBytesToRead 
)
static
255 {
256  // False if the file pointer is beyond the end
257  if(pbFilePointer > pbFileEnd)
258  return false;
259 
260  // False if there is not enough bytes available
261  if((size_t)(pbFileEnd - pbFilePointer) < dwBytesToRead)
262  return false;
263 
264  memcpy(pvBuffer, pbFilePointer, dwBytesToRead);
265  return true;
266 }

+ Here is the caller graph for this function:

int RootHandler_CreateMNDX ( TCascStorage hs,
LPBYTE  pbRootFile,
DWORD  cbRootFile 
)
3140 {
3141  PFILE_MNDX_HEADER pMndxHeader = (PFILE_MNDX_HEADER)pbRootFile;
3142  PCASC_MNDX_INFO pMndxInfo;
3143  TRootHandler_MNDX * pRootHandler;
3144  FILE_MAR_INFO MarInfo;
3145  PMAR_FILE pMarFile;
3146  LPBYTE pbRootFileEnd = pbRootFile + cbRootFile;
3147  DWORD cbToAllocate;
3148  DWORD dwFilePointer = 0;
3149  DWORD i;
3150  int nError = ERROR_SUCCESS;
3151 
3152  // Check signature and the other variables
3153  if(pMndxHeader->Signature != CASC_MNDX_SIGNATURE || pMndxHeader->FormatVersion > 2 || pMndxHeader->FormatVersion < 1)
3154  return ERROR_BAD_FORMAT;
3155 
3156  // Allocate the structure for the MNDX root file
3157  hs->pRootHandler = pRootHandler = CASC_ALLOC(TRootHandler_MNDX, 1);
3158  if(pRootHandler == NULL)
3159  return ERROR_NOT_ENOUGH_MEMORY;
3160 
3161  // Fill-in the handler functions
3162  memset(pRootHandler, 0, sizeof(TRootHandler_MNDX));
3163  pRootHandler->Insert = (ROOT_INSERT)MndxHandler_Insert;
3164  pRootHandler->Search = (ROOT_SEARCH)MndxHandler_Search;
3166  pRootHandler->GetKey = (ROOT_GETKEY)MndxHandler_GetKey;
3167  pRootHandler->Close = (ROOT_CLOSE) MndxHandler_Close;
3168  pMndxInfo = &pRootHandler->MndxInfo;
3169 
3170  // Fill-in the flags
3171  pRootHandler->dwRootFlags |= ROOT_FLAG_HAS_NAMES;
3172 
3173  // Copy the header into the MNDX info
3174  pMndxInfo->HeaderVersion = pMndxHeader->HeaderVersion;
3175  pMndxInfo->FormatVersion = pMndxHeader->FormatVersion;
3176  dwFilePointer += sizeof(FILE_MNDX_HEADER);
3177 
3178  // Header version 2 has 2 extra fields that we need to load
3179  if(pMndxInfo->HeaderVersion == 2)
3180  {
3181  if(!RootFileRead(pbRootFile + dwFilePointer, pbRootFileEnd, &pMndxInfo->field_1C, sizeof(DWORD) + sizeof(DWORD)))
3182  return ERROR_FILE_CORRUPT;
3183  dwFilePointer += sizeof(DWORD) + sizeof(DWORD);
3184  }
3185 
3186  // Load the rest of the file header
3187  if(!RootFileRead(pbRootFile + dwFilePointer, pbRootFileEnd, &pMndxInfo->MarInfoOffset, 0x1C))
3188  return ERROR_FILE_CORRUPT;
3189 
3190  // Verify the structure
3191  if(pMndxInfo->MarInfoCount > CASC_MAX_MAR_FILES || pMndxInfo->MarInfoSize != sizeof(FILE_MAR_INFO))
3192  return ERROR_FILE_CORRUPT;
3193 
3194  // Load all MAR infos
3195  for(i = 0; i < pMndxInfo->MarInfoCount; i++)
3196  {
3197  // Load the n-th MAR info
3198  dwFilePointer = pMndxInfo->MarInfoOffset + (pMndxInfo->MarInfoSize * i);
3199  if(!RootFileRead(pbRootFile + dwFilePointer, pbRootFileEnd, &MarInfo, sizeof(FILE_MAR_INFO)))
3200  return ERROR_FILE_CORRUPT;
3201 
3202  // Allocate MAR_FILE structure
3203  pMarFile = CASC_ALLOC(MAR_FILE, 1);
3204  if(pMarFile == NULL)
3205  {
3206  nError = ERROR_NOT_ENOUGH_MEMORY;
3207  break;
3208  }
3209 
3210  // Allocate space for the MAR data
3211  pMarFile->pDatabasePtr = NULL;
3212  pMarFile->pbMarData = CASC_ALLOC(BYTE, MarInfo.MarDataSize);
3213  pMarFile->cbMarData = MarInfo.MarDataSize;
3214  if(pMarFile->pbMarData == NULL)
3215  {
3216  nError = ERROR_NOT_ENOUGH_MEMORY;
3217  break;
3218  }
3219 
3220  // Read the MAR data
3221  if(!RootFileRead(pbRootFile + MarInfo.MarDataOffset, pbRootFileEnd, pMarFile->pbMarData, pMarFile->cbMarData))
3222  {
3223  nError = ERROR_FILE_CORRUPT;
3224  break;
3225  }
3226 
3227  // HOTS: 00E94FF1
3228  MAR_FILE_CreateDatabase(pMarFile);
3229  if(i == 0)
3230  pMndxInfo->pMarFile1 = pMarFile;
3231  if(i == 1)
3232  pMndxInfo->pMarFile2 = pMarFile;
3233  if(i == 2)
3234  pMndxInfo->pMarFile3 = pMarFile;
3235  }
3236 
3237  // All three MAR files must be loaded
3238  // HOTS: 00E9503B
3239  if(nError == ERROR_SUCCESS)
3240  {
3241  if(pMndxInfo->pMarFile1 == NULL || pMndxInfo->pMarFile2 == NULL || pMndxInfo->pMarFile3 == NULL)
3242  nError = ERROR_BAD_FORMAT;
3243  if(pMndxInfo->MndxEntrySize != sizeof(CASC_ROOT_ENTRY_MNDX))
3244  nError = ERROR_BAD_FORMAT;
3245  }
3246 
3247  // Load the complete array of MNDX entries
3248  if(nError == ERROR_SUCCESS)
3249  {
3250  TFileNameDatabasePtr * pDbPtr = pMndxInfo->pMarFile2->pDatabasePtr;
3251  DWORD FileNameCount;
3252 
3253  nError = pDbPtr->GetFileNameCount(&FileNameCount);
3254  if(nError == ERROR_SUCCESS && FileNameCount == pMndxInfo->MndxEntriesValid)
3255  {
3256  cbToAllocate = pMndxInfo->MndxEntriesTotal * pMndxInfo->MndxEntrySize;
3257  pRootHandler->pMndxEntries = (PCASC_ROOT_ENTRY_MNDX)CASC_ALLOC(BYTE, cbToAllocate);
3258  if(pRootHandler->pMndxEntries != NULL)
3259  {
3260  if(!RootFileRead(pbRootFile + pMndxInfo->MndxEntriesOffset, pbRootFileEnd, pRootHandler->pMndxEntries, cbToAllocate))
3261  nError = ERROR_FILE_CORRUPT;
3262  }
3263  else
3264  nError = ERROR_NOT_ENOUGH_MEMORY;
3265  }
3266  else
3267  nError = ERROR_FILE_CORRUPT;
3268  }
3269 
3270  // Pick the valid MNDX entries and put them to a separate array
3271  if(nError == ERROR_SUCCESS)
3272  {
3273  assert(pMndxInfo->MndxEntriesValid <= pMndxInfo->MndxEntriesTotal);
3274  pRootHandler->ppValidEntries = CASC_ALLOC(PCASC_ROOT_ENTRY_MNDX, pMndxInfo->MndxEntriesValid + 1);
3275  if(pRootHandler->ppValidEntries != NULL)
3276  {
3277  PCASC_ROOT_ENTRY_MNDX pRootEntry = pRootHandler->pMndxEntries;
3278  DWORD ValidEntryCount = 1; // edx
3279  DWORD nIndex1 = 0;
3280 
3281  // The first entry is always valid
3282  pRootHandler->ppValidEntries[nIndex1++] = pRootHandler->pMndxEntries;
3283 
3284  // Put the remaining entries
3285  for(i = 0; i < pMndxInfo->MndxEntriesTotal; i++, pRootEntry++)
3286  {
3287  if(ValidEntryCount > pMndxInfo->MndxEntriesValid)
3288  break;
3289 
3290  if(pRootEntry->Flags & 0x80000000)
3291  {
3292  pRootHandler->ppValidEntries[nIndex1++] = pRootEntry + 1;
3293  ValidEntryCount++;
3294  }
3295  }
3296 
3297  // Verify the final number of valid entries
3298  if((ValidEntryCount - 1) != pMndxInfo->MndxEntriesValid)
3299  nError = ERROR_BAD_FORMAT;
3300  }
3301  else
3302  nError = ERROR_NOT_ENOUGH_MEMORY;
3303  }
3304 
3305  // Load the MNDX packages
3306  if(nError == ERROR_SUCCESS)
3307  {
3308  nError = LoadPackageNames(pMndxInfo, &pRootHandler->pPackages);
3309  pMndxInfo->bRootFileLoaded = (nError == ERROR_SUCCESS);
3310  }
3311 
3312 #if defined(_DEBUG) && defined(_X86_) && defined(CASCLIB_TEST)
3313 // CascDumpNameFragTable("E:\\casc-name-fragment-table.txt", pMndxInfo->pMarFile1);
3314 // CascDumpFileNames("E:\\casc-listfile.txt", pMndxInfo->pMarFile1);
3315 // TestMndxRootFile(pRootHandler);
3316 #endif
3317 
3318  // Return the result
3319  return nError;
3320 }
DWORD field_1C
Definition: CascRootFile_Mndx.cpp:47
TRootHandler * pRootHandler
Definition: CascCommon.h:223
#define CASC_ALLOC(type, count)
Definition: CascCommon.h:302
struct _MAR_FILE * pMarFile3
Definition: CascRootFile_Mndx.cpp:58
DWORD MndxEntriesTotal
Definition: CascRootFile_Mndx.cpp:53
LPBYTE(* ROOT_SEARCH)(struct TRootHandler *pRootHandler, struct _TCascSearch *pSearch, PDWORD PtrFileSize, PDWORD PtrLocaleFlags)
Definition: RootHandler.h:36
#define CASC_MAX_MAR_FILES
Definition: CascMndx.h:16
DWORD dwRootFlags
Definition: RootHandler.h:75
#define ERROR_NOT_ENOUGH_MEMORY
Definition: CascPort.h:208
DWORD Flags
Definition: CascRootFile_Mndx.cpp:87
ROOT_GETKEY GetKey
Definition: RootHandler.h:71
Definition: CascMndx.h:272
ROOT_INSERT Insert
Definition: RootHandler.h:68
static LPBYTE MndxHandler_Search(TRootHandler_MNDX *pRootHandler, TCascSearch *pSearch, PDWORD PtrFileSize, PDWORD)
Definition: CascRootFile_Mndx.cpp:3048
void(* ROOT_ENDSEARCH)(struct TRootHandler *pRootHandler, struct _TCascSearch *pSearch)
Definition: RootHandler.h:43
#define ERROR_FILE_CORRUPT
Definition: CascPort.h:218
#define ROOT_FLAG_HAS_NAMES
Definition: RootHandler.h:21
arena_t NULL
Definition: jemalloc_internal.h:624
Definition: CascRootFile_Mndx.cpp:85
DWORD FormatVersion
Definition: CascRootFile_Mndx.cpp:29
LPBYTE(* ROOT_GETKEY)(struct TRootHandler *pRootHandler, const char *szFileName)
Definition: RootHandler.h:48
DWORD MndxEntrySize
Definition: CascRootFile_Mndx.cpp:55
DWORD MarInfoOffset
Definition: CascRootFile_Mndx.cpp:49
static LPBYTE MndxHandler_GetKey(TRootHandler_MNDX *pRootHandler, const char *szFileName)
Definition: CascRootFile_Mndx.cpp:3088
bool bRootFileLoaded
Definition: CascRootFile_Mndx.cpp:61
BYTE * LPBYTE
Definition: CascPort.h:152
DWORD MarDataOffset
Definition: CascRootFile_Mndx.cpp:38
struct _CASC_ROOT_ENTRY_MNDX * PCASC_ROOT_ENTRY_MNDX
struct _FILE_MNDX_HEADER * PFILE_MNDX_HEADER
DWORD MarDataSize
Definition: CascRootFile_Mndx.cpp:36
TFileNameDatabasePtr * pDatabasePtr
Definition: CascMndx.h:345
Definition: CascMndx.h:343
PCASC_ROOT_ENTRY_MNDX * ppValidEntries
Definition: CascRootFile_Mndx.cpp:2923
DWORD cbMarData
Definition: CascMndx.h:347
int GetFileNameCount(PDWORD PtrFileNameCount)
Definition: CascRootFile_Mndx.cpp:2704
static int MndxHandler_Insert(TRootHandler_MNDX *, const char *, LPBYTE)
Definition: CascRootFile_Mndx.cpp:3043
CASC_MNDX_INFO MndxInfo
Definition: CascRootFile_Mndx.cpp:2921
ROOT_SEARCH Search
Definition: RootHandler.h:69
DWORD HeaderVersion
Definition: CascRootFile_Mndx.cpp:45
ROOT_ENDSEARCH EndSearch
Definition: RootHandler.h:70
unsigned int DWORD
Definition: CascPort.h:139
PCASC_MNDX_PACKAGES pPackages
Definition: CascRootFile_Mndx.cpp:2925
DWORD MarInfoSize
Definition: CascRootFile_Mndx.cpp:51
int(* ROOT_INSERT)(struct TRootHandler *pRootHandler, const char *szFileName, LPBYTE pbEncodingKey)
Definition: RootHandler.h:30
Definition: CascRootFile_Mndx.cpp:42
static void MAR_FILE_CreateDatabase(PMAR_FILE pMarFile)
Definition: CascRootFile_Mndx.cpp:2756
Definition: CascRootFile_Mndx.cpp:33
Definition: CascRootFile_Mndx.cpp:25
struct _FILE_MNDX_HEADER FILE_MNDX_HEADER
DWORD MarInfoCount
Definition: CascRootFile_Mndx.cpp:50
static int LoadPackageNames(PCASC_MNDX_INFO pMndxInfo, PCASC_MNDX_PACKAGES *ppPackages)
Definition: CascRootFile_Mndx.cpp:2876
static void MndxHandler_EndSearch(TRootHandler_MNDX *, TCascSearch *pSearch)
Definition: CascRootFile_Mndx.cpp:3081
#define ERROR_BAD_FORMAT
Definition: CascPort.h:214
static void MndxHandler_Close(TRootHandler_MNDX *pRootHandler)
Definition: CascRootFile_Mndx.cpp:3118
struct _MAR_FILE * pMarFile1
Definition: CascRootFile_Mndx.cpp:56
unsigned char BYTE
Definition: CascPort.h:136
PCASC_ROOT_ENTRY_MNDX pMndxEntries
Definition: CascRootFile_Mndx.cpp:2924
void(* ROOT_CLOSE)(struct TRootHandler *pRootHandler)
Definition: RootHandler.h:62
DWORD MndxEntriesOffset
Definition: CascRootFile_Mndx.cpp:52
DWORD FormatVersion
Definition: CascRootFile_Mndx.cpp:46
DWORD MndxEntriesValid
Definition: CascRootFile_Mndx.cpp:54
#define CASC_MNDX_SIGNATURE
Definition: CascMndx.h:17
struct _MAR_FILE * pMarFile2
Definition: CascRootFile_Mndx.cpp:57
LPBYTE pbMarData
Definition: CascMndx.h:346
DWORD Signature
Definition: CascRootFile_Mndx.cpp:27
ROOT_CLOSE Close
Definition: RootHandler.h:73
Definition: CascRootFile_Mndx.cpp:2919
static bool RootFileRead(LPBYTE pbFilePointer, LPBYTE pbFileEnd, void *pvBuffer, size_t dwBytesToRead)
Definition: CascRootFile_Mndx.cpp:254
#define ERROR_SUCCESS
Definition: CascPort.h:204
DWORD HeaderVersion
Definition: CascRootFile_Mndx.cpp:28

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int SearchMndxInfo ( TRootHandler_MNDX pRootHandler,
const char *  szFileName,
DWORD  dwPackage,
PCASC_ROOT_ENTRY_MNDX ppRootEntry 
)
2966 {
2967  PCASC_ROOT_ENTRY_MNDX pRootEntry;
2968  PCASC_MNDX_INFO pMndxInfo = &pRootHandler->MndxInfo;
2969  TMndxFindResult Struct1C;
2970 
2971  // Search the database for the file name
2972  if(pMndxInfo->bRootFileLoaded)
2973  {
2974  Struct1C.SetSearchPath(szFileName, strlen(szFileName));
2975 
2976  // Search the file name in the second MAR info (the one with stripped package names)
2977  if(MAR_FILE_SearchFile(pMndxInfo->pMarFile2, &Struct1C) != ERROR_SUCCESS)
2978  return ERROR_FILE_NOT_FOUND;
2979 
2980  // The found MNDX index must fall into range of valid MNDX entries
2981  if(Struct1C.FileNameIndex < pMndxInfo->MndxEntriesValid)
2982  {
2983  // HOTS: E945F4
2984  pRootEntry = pRootHandler->ppValidEntries[Struct1C.FileNameIndex];
2985  while((pRootEntry->Flags & 0x00FFFFFF) != dwPackage)
2986  {
2987  // The highest bit serves as a terminator if set
2988  if(pRootEntry->Flags & 0x80000000)
2989  return ERROR_FILE_NOT_FOUND;
2990 
2991  pRootEntry++;
2992  }
2993 
2994  // Give the root entry pointer to the caller
2995  if(ppRootEntry != NULL)
2996  ppRootEntry[0] = pRootEntry;
2997  return ERROR_SUCCESS;
2998  }
2999  }
3000 
3001  return ERROR_FILE_NOT_FOUND;
3002 }
int SetSearchPath(const char *szNewSearchPath, size_t cchNewSearchPath)
Definition: CascRootFile_Mndx.cpp:307
DWORD Flags
Definition: CascRootFile_Mndx.cpp:87
static int MAR_FILE_SearchFile(PMAR_FILE pMarFile, TMndxFindResult *pStruct1C)
Definition: CascRootFile_Mndx.cpp:2763
arena_t NULL
Definition: jemalloc_internal.h:624
Definition: CascRootFile_Mndx.cpp:85
bool bRootFileLoaded
Definition: CascRootFile_Mndx.cpp:61
PCASC_ROOT_ENTRY_MNDX * ppValidEntries
Definition: CascRootFile_Mndx.cpp:2923
#define ERROR_FILE_NOT_FOUND
Definition: CascPort.h:205
Definition: CascMndx.h:188
DWORD FileNameIndex
Definition: CascMndx.h:205
CASC_MNDX_INFO MndxInfo
Definition: CascRootFile_Mndx.cpp:2921
Definition: CascRootFile_Mndx.cpp:42
DWORD MndxEntriesValid
Definition: CascRootFile_Mndx.cpp:54
struct _MAR_FILE * pMarFile2
Definition: CascRootFile_Mndx.cpp:57
#define ERROR_SUCCESS
Definition: CascPort.h:204

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

unsigned char table_1BA1818[0x800]