def modify_ini_file(file_path):
    with open(file_path, 'r') as file:
        lines = file.readlines()

    with open(file_path, 'w') as file:
        for line in lines:
            # 在这里添加自定义的修改逻辑
            if 'someSetting' in line:
                line = 'someSetting=newValue\n'  # 修改某个设置
            file.write(line)

def modify_sav_file(file_path):
    # 假设SAV文件是二进制文件，进行简单的读写操作
    with open(file_path, 'r+b') as file:
        file.seek(0)  # 定位到文件开头
        data = file.read(4)  # 读取4个字节
        # 在这里添加对SAV文件的处理逻辑
        file.seek(0)  # 回到开头
        file.write(b'\x01\x02\x03\x04')  # 写入修改后的数据

if __name__ == "__main__":
    ini_file_path = 'path/to/your/file.ini'
    sav_file_path = 'path/to/your/file.sav'

    modify_ini_file(ini_file_path)
    modify_sav_file(sav_file_path)