Skip to content

if with Array instead of ifgoto #180

@Maijin

Description

@Maijin

In some binary there is a huge list of if/goto which should be replaced by a if on array elements e.g:

ch15.exe.zip
pddi.txt

Current Behavior

    if (arg_ch == 7) {
        eax = arg_8h;
        eax = *(eax);
        if (al != 0x53) {
            goto label_0;
        }
        eax = arg_8h;
        eax++;
        eax = *(eax);
        if (al != 0x50) {
            goto label_0;
        }
...

Expected Behavior

if ( arg_ch == 7 && *a1 == 0x53 && a1[1] == 0x50 && a1[2] == 0x61 && a1[3] == 0x43 && a1[4] == 0x49 && a1[5] == 0x6f && a1[6] == 0x53 )

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions