Skip to content

VirtualAllocEx ¤

deconvert_prot ¤

deconvert_prot(prot)

Convert from a angr bitmask to a windows memory protection constant

Source code in sema_toolchain/sema_scdg/application/procedures/windows/custom_package/VirtualAllocEx.py
36
37
38
39
40
41
42
def deconvert_prot(prot):
    """
    Convert from a angr bitmask to a windows memory protection constant
    """
    if prot in (2, 6):
        raise angr.errors.SimValueError("Invalid memory protection for windows process")
    return [0x01, 0x02, None, 0x04, 0x10, 0x20, None, 0x40][prot]