const kernel32 = Process.getModuleByName('kernel32.dll');
const GetModuleHandleW = new NativeFunction(Module.getExportByName('kernel32.dll', 'GetModuleHandleW'), 'pointer', ['pointer']);
const FindResourceW = new NativeFunction(Module.getExportByName('kernel32.dll', 'FindResourceW'), 'pointer', ['pointer', 'pointer', 'pointer']);
const LoadResource = new NativeFunction(Module.getExportByName('kernel32.dll', 'LoadResource'), 'pointer', ['pointer', 'pointer']);
const LockResource = new NativeFunction(Module.getExportByName('kernel32.dll', 'LockResource'), 'pointer', ['pointer']);
const SizeofResource = new NativeFunction(Module.getExportByName('kernel32.dll', 'SizeofResource'), 'uint', ['pointer', 'pointer']);
const hModule = GetModuleHandleW(ptr(0));
const hResource = FindResourceW(hModule, ptr(0x65), ptr(0xA)); // 0x65는 리스소 ID, 0xA는 타입입니다. 리소스 ID는 변경될 수 있으니 찾아서 쓰십셔
if (hResource.isNull()) {
console.log('리소스를 찾을 수 없습니다.');
} else {
const hGlobal = LoadResource(hModule, hResource);
const lpResource = LockResource(hGlobal);
const size = SizeofResource(hModule, hResource);
console.log('리소스 주소:', lpResource);
console.log('리소스 크기:', size);
// 리소스 덤프
const resourceData = Memory.readByteArray(lpResource, size);
const filePath = 'D:\\Games\\testgame\\global-metadata.dat';
const file = new File(filePath, 'wb');
file.write(resourceData);
file.flush();
file.close();
console.log('리소스를 덤프했습니다:', filePath);
}
위 코드를 frida에 물리면 된다.
frida -f ".\게임이름.exe" -l simple_dumper.js
'한글패치 관련 짧은 글들' 카테고리의 다른 글
UnityPy 텍스쳐 삽입 시 "params must be an instance of BC7CompressBlockParams" 오류 해결 (0) | 2025.03.31 |
---|---|
UnityPy를 이용한 유니티 게임 MonoBehaviour 특정 텍스트 필드 추출/삽입 (0) | 2025.03.04 |
IoStore를 사용하며 sig우회가 안되는 언리얼 게임 모드 로딩 방지 우회하기 (0) | 2025.01.20 |
유니티 게임에서 대사 검색 쉽게 하기 (UnityPy 이용) (0) | 2025.01.01 |
catalog.json과 catalog.hash가 있는 유니티 게임의 수정법 (1) | 2024.12.18 |