def rule(event):
    if any(
        [
            any(
                [
                    "windows\\system32\\Physmem.sys" in event.deep_get("Image", default=""),
                    "Windows\\system32\\ime\\SHARED\\WimBootConfigurations.ini"
                    in event.deep_get("Image", default=""),
                    "Windows\\system32\\ime\\IMEJP\\WimBootConfigurations.ini"
                    in event.deep_get("Image", default=""),
                    "Windows\\system32\\ime\\IMETC\\WimBootConfigurations.ini"
                    in event.deep_get("Image", default=""),
                ]
            ),
            all(
                [
                    any(
                        [
                            "windows\\system32\\filepath2" in event.deep_get("Image", default=""),
                            "windows\\system32\\ime" in event.deep_get("Image", default=""),
                        ]
                    ),
                    "reg add" in event.deep_get("CommandLine", default=""),
                    any(
                        [
                            "HKEY_LOCAL_MACHINE\\software\\classes\\clsid\\{7c857801-7381-11cf-884d-00aa004b2e24}\\inprocserver32"
                            in event.deep_get("CommandLine", default=""),
                            "HKEY_LOCAL_MACHINE\\software\\classes\\clsid\\{cf4cc405-e2c5-4ddd-b3ce-5e7582d8c9fa}\\inprocserver32"
                            in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
