Initial commit

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
dinlo
2026-05-31 18:44:04 +08:00
commit 436a9631fc
8616 changed files with 1389957 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
import { NtExecutableResource, Type } from 'pe-library';
/** Utility class to create / parse String Table resource */
export default class StringTable {
/** Language value */
lang: string | number;
private items;
constructor();
/** Create StringTable instance from resource entries, with specified language. */
static fromEntries(lang: string | number, entries: readonly Type.ResourceEntry[]): StringTable;
/** Return all string entries. */
getAllStrings(): Array<{
id: number;
text: string;
}>;
/** Return the string data for ID value, which can be used for Win32API LoadString. */
getById(id: number): string | null;
/**
* Set/overwide the string data for ID value, which can be used for Win32API LoadString.
* @param id data ID
* @param text string data (entry will be removed if null or empty string is specified)
*/
setById(id: number, text: string | null): void;
/** Generates an array of Entry for resource processings */
generateEntries(): Type.ResourceEntry[];
/**
* Replace all string entries for NtExecutableResource with containing resource data.
* The only entries of same language are replaced.
*/
replaceStringEntriesForExecutable(res: NtExecutableResource): void;
}