Welcome to the GBF Test Portal

This was built to track decompiler and CFG progress.

Decompiler Output

Backtrace

{
  "frames": [
    {
      "line": 282,
      "file": ".\\gbf_core\\src\\decompiler\\function_decompiler_context.rs",
      "function": "gbf_core::decompiler::function_decompiler_context::FunctionDecompilerContext::pop_assignable"
    },
    {
      "line": 33,
      "file": ".\\gbf_core\\src\\decompiler\\handlers\\special_two_operand.rs",
      "function": "gbf_core::decompiler::handlers::special_two_operand::impl$0::handle_instruction"
    },
    {
      "line": 171,
      "file": ".\\gbf_core\\src\\decompiler\\function_decompiler_context.rs",
      "function": "gbf_core::decompiler::function_decompiler_context::FunctionDecompilerContext::process_instruction"
    },
    {
      "line": 467,
      "file": ".\\gbf_core\\src\\decompiler\\function_decompiler.rs",
      "function": "gbf_core::decompiler::function_decompiler::FunctionDecompiler::process_regions"
    },
    {
      "line": 286,
      "file": ".\\gbf_core\\src\\decompiler\\function_decompiler.rs",
      "function": "gbf_core::decompiler::function_decompiler::FunctionDecompiler::decompile"
    }
  ]
}

Context

{
  "current_block_id": {
    "index": 3,
    "block_type": "Normal",
    "address": 17353
  },
  "current_ast_node_stack": [
    {
      "StandaloneNode": {
        "Expression": {
          "Assignable": {
            "MemberAccess": {
              "metadata": {
                "properties": {},
                "comments": []
              },
              "node_id": 235308,
              "ptr": {
                "rhs": {
                  "Identifier": {
                    "metadata": {
                      "properties": {},
                      "comments": []
                    },
                    "ptr": {
                      "ssa_version": null,
                      "id": "text"
                    },
                    "node_id": 235307
                  }
                },
                "ssa_version": 2,
                "lhs": {
                  "Identifier": {
                    "metadata": {
                      "properties": {},
                      "comments": []
                    },
                    "ptr": {
                      "ssa_version": null,
                      "id": "obj"
                    },
                    "node_id": 235306
                  }
                }
              }
            }
          }
        }
      }
    },
    {
      "StandaloneNode": {
        "Expression": {
          "Assignable": {
            "MemberAccess": {
              "metadata": {
                "properties": {},
                "comments": []
              },
              "ptr": {
                "rhs": {
                  "Identifier": {
                    "metadata": {
                      "properties": {},
                      "comments": []
                    },
                    "ptr": {
                      "ssa_version": null,
                      "id": "textlines"
                    },
                    "node_id": 235310
                  }
                },
                "ssa_version": 9,
                "lhs": {
                  "Identifier": {
                    "metadata": {
                      "properties": {},
                      "comments": []
                    },
                    "ptr": {
                      "ssa_version": null,
                      "id": "temp"
                    },
                    "node_id": 235309
                  }
                }
              },
              "node_id": 235311
            }
          }
        }
      }
    }
  ],
  "current_instruction": {
    "opcode": "AccessMember",
    "operand": null,
    "address": 17368
  }
}
function onTextEditorButton(obj#0)
{
    lit#2 = "&Apply";
    // RegionId(0)
    // RegionId(1)
    if (!(obj.text == lit#2)) 
    {
        lit#5 = null;
        // RegionId(2)
        if (obj.parent.tags != lit#5) 
        {
            lit#6 = 0;
            lit#7 = "editastext";
            // RegionId(3)
            if (obj.parent.tags[lit#6] == lit#7) 
            {
                lit#10 = "ScriptedRCTextEditor_TextEdit";
                temp.textlines = lit#10 @ obj.parent.windowid.plaintext;
                lit#13 = 0;
                lit#14 = "scriptfiles/";
                lit#15 = 1;
                fn_call#17 = temp.textlines.savestring(lit#14 @ obj.parent.tags[lit#15], lit#13);
                lit#18 = "scriptfiles/";
                lit#19 = 1;
                fn_call#21 = uploadfile#20(lit#18 @ obj.parent.tags[lit#19]);
                fn_call#23 = obj.parent.destroy();
                lit#24 = 0;
                return lit#24;
            }
            // RegionId(4)
            else
            {
                lit#25 = "ScriptedRCTextEditor_TextEdit";
                fn_call#27 = lit#25 @ obj.parent.windowid.getLines();
                lit#28 = 1;
                lit#29 = 0;
                fn_call#31 = sendtext#30(obj.parent.tags[lit#29], obj.parent.tags[lit#28], fn_call#27);
                goto RegionId(6);
            }
        }
    }
    lit#32 = 0;
    return lit#32;
}