mirror of
https://github.com/LukeFZ/Il2CppInspectorRedux.git
synced 2025-12-10 13:30:26 +05:00
Fix misc. issues in the generated disassembler scripts (#17)
* attempt to fix ghidra script issues * add ghidra python 3 note to readme * fix binary ninja script erroring on function type parsing * fix ida script not skipping function creation on pe binaries * fix writing of multibyte strings breaking fake string segment * also adjust binja write_string impl
This commit is contained in:
@@ -106,8 +106,8 @@ class IDADisassemblerInterface(BaseDisassemblerInterface):
|
||||
ida_typeinf.set_c_macros(original_macros)
|
||||
|
||||
# Skip make_function on Windows GameAssembly.dll files due to them predefining all functions through pdata which makes the method very slow
|
||||
skip_make_function = ida_segment.get_segm_by_name(".pdata") is not None
|
||||
if skip_make_function:
|
||||
self._skip_function_creation = ida_segment.get_segm_by_name(".pdata") is not None
|
||||
if self._skip_function_creation:
|
||||
print(".pdata section found, skipping function boundaries")
|
||||
|
||||
if FOLDERS_AVAILABLE:
|
||||
@@ -202,11 +202,12 @@ class IDADisassemblerInterface(BaseDisassemblerInterface):
|
||||
|
||||
return start
|
||||
|
||||
def write_string(self, address: int, value: str):
|
||||
def write_string(self, address: int, value: str) -> int:
|
||||
encoded_string = value.encode() + b'\x00'
|
||||
string_length = len(encoded_string)
|
||||
ida_bytes.put_bytes(address, encoded_string)
|
||||
ida_bytes.create_strlit(address, string_length, ida_nalt.STRTYPE_C)
|
||||
return string_length
|
||||
|
||||
def write_address(self, address: int, value: int):
|
||||
if self._is_32_bit:
|
||||
|
||||
Reference in New Issue
Block a user