def rule(event):
    if any(
        [
            any(
                [
                    any(
                        [
                            "get-localgroup " in event.deep_get("Payload", default=""),
                            "get-localgroupmember " in event.deep_get("Payload", default=""),
                        ]
                    ),
                    any(
                        [
                            "get-localgroup " in event.deep_get("ContextInfo", default=""),
                            "get-localgroupmember " in event.deep_get("ContextInfo", default=""),
                        ]
                    ),
                ]
            ),
            all(
                [
                    any(
                        [
                            any(
                                [
                                    "get-wmiobject " in event.deep_get("Payload", default=""),
                                    "gwmi " in event.deep_get("Payload", default=""),
                                    "get-ciminstance " in event.deep_get("Payload", default=""),
                                    "gcim " in event.deep_get("Payload", default=""),
                                ]
                            ),
                            all(
                                [
                                    "get-wmiobject " in event.deep_get("ContextInfo", default=""),
                                    "gwmi " in event.deep_get("ContextInfo", default=""),
                                    "get-ciminstance " in event.deep_get("ContextInfo", default=""),
                                    "gcim " in event.deep_get("ContextInfo", default=""),
                                ]
                            ),
                        ]
                    ),
                    any(
                        [
                            "win32_group" in event.deep_get("Payload", default=""),
                            "win32_group" in event.deep_get("ContextInfo", default=""),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
