MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / peCopyString

Function peCopyString

emmy_hook/src/libpe/libpe.cpp:101–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99#pragma region Utilities
100
101inline void peCopyString( char *pszDest, char *pszSource, uint32_t dwSize )
102{
103 char *pd = pszDest, *ps = pszSource;
104 uint8_t b;
105 uint32_t i;
106
107 ZeroMemory( pszDest, dwSize );
108
109 for( i = 0; i < dwSize; ++i, ++pd, ++ps )
110 {
111 __try
112 {
113 b = (uint8_t)*ps;
114 }
115 __except(EXCEPTION_EXECUTE_HANDLER)
116 {
117 b = 0x00;
118 }
119
120 if( b == 0x00 )
121 break;
122
123 else if( isprint(b) == false )
124 break;
125
126 else
127 *pd = b;
128 }
129}
130
131bool peIsValidSectionHeader( PIMAGE_SECTION_HEADER pHeader )
132{

Callers 2

peParseExportTableFunction · 0.85
peParseImportTableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected