Forums WoW Modding Support Archives WoWModding Support Archives [DiscordArchive] so something wrong with memory layout again?

[DiscordArchive] so something wrong with memory layout again?

[DiscordArchive] so something wrong with memory layout again?

Pages (5): Previous 1 2 3 4 5 Next
rektbyfaith
Administrator
0
03-12-2025, 05:10 PM
#21
Archived author: Aleist3r • Posted: 2025-03-12T17:10:24.166000+00:00
Original source

i've made chatgpt do that for me
rektbyfaith
03-12-2025, 05:10 PM #21

Archived author: Aleist3r • Posted: 2025-03-12T17:10:24.166000+00:00
Original source

i've made chatgpt do that for me

rektbyfaith
Administrator
0
03-12-2025, 05:10 PM
#22
Archived author: Aleist3r • Posted: 2025-03-12T17:10:37.644000+00:00
Original source

gimme a sec
rektbyfaith
03-12-2025, 05:10 PM #22

Archived author: Aleist3r • Posted: 2025-03-12T17:10:37.644000+00:00
Original source

gimme a sec

rektbyfaith
Administrator
0
03-12-2025, 05:11 PM
#23
Archived author: Aleist3r • Posted: 2025-03-12T17:11:31.027000+00:00
Original source

```python
import idaapi
import idc

def import_function_names(file_path):
"""
Imports function names from a text file.

Each line in the file should contain:
- Address in hex (e.g., 0x401000)
- Function name (e.g., MyFunction1)
"""
with open(file_path, "r") as file:
for line in file:
line = line.strip() # Remove any leading/trailing whitespace
if not line:
continue # Skip empty lines

# Split each line into address and function name
parts = line.split()
if len(parts) != 2:
print(f"Skipping invalid line: {line}")
continue

try:
# Convert the address to an integer (from hex to decimal)
addr = int(parts[0], 16) # Convert address from hex to integer
func_name = parts[1] # Get function name

# Check if there's already a function at this address
if idaapi.get_func(addr) is None:
# If no function exists, create one at the address
idaapi.add_func(addr)

# Rename the function at the given address
idc.set_name(addr, func_name)

print(f"Function '{func_name}' imported at address {hex(addr)}")

except ValueError as e:
print(f"Error processing line: {line}. Error: {e}")

# Example usage
file_path = "D:\\Clients\\3.3.5a_IDB\\function_list.txt"
import_function_names(file_path)```
rektbyfaith
03-12-2025, 05:11 PM #23

Archived author: Aleist3r • Posted: 2025-03-12T17:11:31.027000+00:00
Original source

```python
import idaapi
import idc

def import_function_names(file_path):
"""
Imports function names from a text file.

Each line in the file should contain:
- Address in hex (e.g., 0x401000)
- Function name (e.g., MyFunction1)
"""
with open(file_path, "r") as file:
for line in file:
line = line.strip() # Remove any leading/trailing whitespace
if not line:
continue # Skip empty lines

# Split each line into address and function name
parts = line.split()
if len(parts) != 2:
print(f"Skipping invalid line: {line}")
continue

try:
# Convert the address to an integer (from hex to decimal)
addr = int(parts[0], 16) # Convert address from hex to integer
func_name = parts[1] # Get function name

# Check if there's already a function at this address
if idaapi.get_func(addr) is None:
# If no function exists, create one at the address
idaapi.add_func(addr)

# Rename the function at the given address
idc.set_name(addr, func_name)

print(f"Function '{func_name}' imported at address {hex(addr)}")

except ValueError as e:
print(f"Error processing line: {line}. Error: {e}")

# Example usage
file_path = "D:\\Clients\\3.3.5a_IDB\\function_list.txt"
import_function_names(file_path)```

rektbyfaith
Administrator
0
03-12-2025, 05:13 PM
#24
Archived author: Aleist3r • Posted: 2025-03-12T17:13:00.994000+00:00
Original source

and the function txt basically looks like this
```0x401010 CDataStore__Alloc
0x401030 CDataStore__Free```
rektbyfaith
03-12-2025, 05:13 PM #24

Archived author: Aleist3r • Posted: 2025-03-12T17:13:00.994000+00:00
Original source

and the function txt basically looks like this
```0x401010 CDataStore__Alloc
0x401030 CDataStore__Free```

rektbyfaith
Administrator
0
03-12-2025, 05:13 PM
#25
Archived author: Aleist3r • Posted: 2025-03-12T17:13:16.737000+00:00
Original source

and so on, addresses can be grabbed from threads on ownedcore for example
rektbyfaith
03-12-2025, 05:13 PM #25

Archived author: Aleist3r • Posted: 2025-03-12T17:13:16.737000+00:00
Original source

and so on, addresses can be grabbed from threads on ownedcore for example

rektbyfaith
Administrator
0
03-12-2025, 05:13 PM
#26
Archived author: Aleist3r • Posted: 2025-03-12T17:13:50.757000+00:00
Original source

(just be sure to check if they're correctly offset ;])
rektbyfaith
03-12-2025, 05:13 PM #26

Archived author: Aleist3r • Posted: 2025-03-12T17:13:50.757000+00:00
Original source

(just be sure to check if they're correctly offset ;])

rektbyfaith
Administrator
0
03-12-2025, 05:16 PM
#27
Archived author: robinsch • Posted: 2025-03-12T17:16:31.898000+00:00
Original source

I can just recommend going the C++ to IDA route with your own parser. Saved me atleast 100h
rektbyfaith
03-12-2025, 05:16 PM #27

Archived author: robinsch • Posted: 2025-03-12T17:16:31.898000+00:00
Original source

I can just recommend going the C++ to IDA route with your own parser. Saved me atleast 100h

rektbyfaith
Administrator
0
03-12-2025, 05:17 PM
#28
Archived author: robinsch • Posted: 2025-03-12T17:17:04.418000+00:00
Original source

And you can just wipe your IDB in case you might fuck up calling conventions or other things and just reimport it from C++
rektbyfaith
03-12-2025, 05:17 PM #28

Archived author: robinsch • Posted: 2025-03-12T17:17:04.418000+00:00
Original source

And you can just wipe your IDB in case you might fuck up calling conventions or other things and just reimport it from C++

rektbyfaith
Administrator
0
03-12-2025, 05:18 PM
#29
Archived author: Aleist3r • Posted: 2025-03-12T17:18:16.807000+00:00
Original source

well yeah it's a good advice
rektbyfaith
03-12-2025, 05:18 PM #29

Archived author: Aleist3r • Posted: 2025-03-12T17:18:16.807000+00:00
Original source

well yeah it's a good advice

rektbyfaith
Administrator
0
03-12-2025, 05:25 PM
#30
Archived author: Peacy • Posted: 2025-03-12T17:25:50.312000+00:00
Original source

sounds good, thanks!
rektbyfaith
03-12-2025, 05:25 PM #30

Archived author: Peacy • Posted: 2025-03-12T17:25:50.312000+00:00
Original source

sounds good, thanks!

Pages (5): Previous 1 2 3 4 5 Next
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)