
tblentry * cmdlookup(char *name,int add)

{
  undefined *puVar1;
  uint uVar2;
  int iVar3;
  uint uVar4;
  byte *pbVar5;
  tblentry *ptVar6;
  tblentry *ptVar7;
  
  uVar4 = (uint)(byte)*name;
  uVar2 = uVar4 << 4;
  if (uVar4 != 0) {
    pbVar5 = (byte *)(name + 1);
    do {
      uVar2 = uVar2 + uVar4;
      uVar4 = (uint)*pbVar5;
      pbVar5 = pbVar5 + 1;
    } while (uVar4 != 0);
    uVar2 = uVar2 & 0x7fff;
  }
  ptVar7 = (tblentry *)
           (*(int *)(PTR_DAT_0012a178 + -0x4d34) +
           (uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f) * 4);
  for (ptVar6 = ptVar7->next; ptVar6 != (tblentry *)0x0; ptVar6 = ptVar6->next) {
    iVar3 = (*(code *)PTR_strcmp_0012b1c8)(ptVar6->cmdname,name);
    if (iVar3 == 0) goto LAB_0006e768;
    ptVar7 = ptVar6;
  }
  ptVar6 = (tblentry *)0x0;
  if (add != 0) {
    iVar3 = (*(code *)PTR_strlen_0012af3c)(name);
    ptVar6 = (tblentry *)(*(code *)PTR_xzalloc_0012a1d0)(iVar3 + 0xc);
    ptVar7->next = ptVar6;
    puVar1 = PTR_strcpy_0012affc;
    ptVar6->cmdtype = -1;
    (*(code *)puVar1)(ptVar6->cmdname,name);
    *(tblentry **)(PTR_DAT_0012a178 + -0x4d38) = ptVar7;
    return ptVar6;
  }
LAB_0006e768:
  *(tblentry **)(PTR_DAT_0012a178 + -0x4d38) = ptVar7;
  return ptVar6;
}



int FUN_0006e6a0(byte *param_1,int param_2)

{
  undefined *puVar1;
  uint uVar2;
  int iVar3;
  uint uVar4;
  byte *pbVar5;
  int *piVar6;
  int *piVar7;
  
  uVar4 = (uint)*param_1;
  uVar2 = uVar4 << 4;
  if (uVar4 != 0) {
    pbVar5 = param_1 + 1;
    do {
      uVar2 = uVar2 + uVar4;
      uVar4 = (uint)*pbVar5;
      pbVar5 = pbVar5 + 1;
    } while (uVar4 != 0);
    uVar2 = uVar2 & 0x7fff;
  }
  piVar7 = (int *)(*(int *)(PTR_DAT_0012a178 + -0x4d34) +
                  (uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f) * 4);
  for (piVar6 = (int *)*piVar7; piVar6 != (int *)0x0; piVar6 = (int *)*piVar6) {
    iVar3 = (*(code *)PTR_strcmp_0012b1c8)((int)piVar6 + 10,param_1);
    if (iVar3 == 0) goto LAB_0006e768;
    piVar7 = piVar6;
  }
  piVar6 = (int *)0x0;
  if (param_2 != 0) {
    iVar3 = (*(code *)PTR_strlen_0012af3c)(param_1);
    iVar3 = (*(code *)PTR_FUN_0012a1d0)(iVar3 + 0xc);
    *piVar7 = iVar3;
    puVar1 = PTR_strcpy_0012affc;
    *(undefined1 *)(iVar3 + 8) = 0xff;
    (*(code *)puVar1)(iVar3 + 10,param_1);
    *(int **)(PTR_DAT_0012a178 + -0x4d38) = piVar7;
    return iVar3;
  }
LAB_0006e768:
  *(int **)(PTR_DAT_0012a178 + -0x4d38) = piVar7;
  return (int)piVar6;
}


lui gp,0xc
addiu gp,gp,0x3ab0
addu gp,gp,t9
addiu sp,sp,-0x30
sw s3,0x28(sp)
or s3,a1,zero
sw s2,0x24(sp)
or s2,a0,zero
sw gp,0x10(sp)
sw ra,0x2c(sp)
sw s1,0x20(sp)
sw s0,0x1c(sp)
lbu v1,0x0(a0)
beq v1,zero,0x0006e6f4
_sll v0,v1,0x4
addiu a0,a0,0x1
addu v0,v0,v1
lbu v1,0x0(a0)
bne v1,zero,0x0006e6e0
_addiu a0,a0,0x1
andi v0,v0,0x7fff
lui v1,0x842
lw a0,-0x7fd8(gp)
addiu v1,v1,0x1085
multu v0,v1
lw s1,-0x4d34(a0)
mfhi v1
subu a0,v0,v1
srl a0,a0,0x1
addu v1,v1,a0
srl v1,v1,0x4
sll a0,v1,0x5
subu v1,a0,v1
subu v0,v0,v1
sll v0,v0,0x2
addu s1,s1,v0
lw s0,0x0(s1)
beq s0,zero,0x0006e760
_lw t9,-0x6f88(gp)
addiu a0,s0,0xa
jalr t9
_or a1,s2,zero
beq v0,zero,0x0006e768
_lw gp,0x10(sp)
or s1,s0,zero
lw s0,0x0(s0)
bne s0,zero,0x0006e73c
_lw t9,-0x6f88(gp)
bne s3,zero,0x0006e790
_or s0,zero,zero
lw v0,-0x7fd8(gp)
lw ra,0x2c(sp)
lw s3,0x28(sp)
lw s2,0x24(sp)
sw s1,-0x4d38(v0)
or v0,s0,zero
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x30
lw t9,-0x7214(gp)
jalr t9
_or a0,s2,zero
lw gp,0x10(sp)
lw t9,-0x7f80(gp)
jalr t9
_addiu a0,v0,0xc
or a1,s2,zero
lw gp,0x10(sp)
or s0,v0,zero
sw v0,0x0(s1)
addiu a0,v0,0xa
li v0,-0x1
lw t9,-0x7154(gp)
jalr t9
_sb v0,0x8(s0)
lw gp,0x10(sp)
lw ra,0x2c(sp)
lw s3,0x28(sp)
lw s2,0x24(sp)
lw v0,-0x7fd8(gp)
sw s1,-0x4d38(v0)
or v0,s0,zero
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x30
(translation_unit "int FUN_0006e6a0(byte *param_1,int param_2)\n\n{\n  undefined *puVar1;\n  uint uVar2;\n  int iVar3;\n  uint uVar4;\n  byte *pbVar5;\n  int *piVar6;\n  int *piVar7;\n  \n  uVar4 = (uint)*param_1;\n  uVar2 = uVar4 << 4;\n  if (uVar4 != 0) {\n    pbVar5 = param_1 + 1;\n    do {\n      uVar2 = uVar2 + uVar4;\n      uVar4 = (uint)*pbVar5;\n      pbVar5 = pbVar5 + 1;\n    } while (uVar4 != 0);\n    uVar2 = uVar2 & 0x7fff;\n  }\n  piVar7 = (int *)(*(int *)(PTR_DAT_0012a178 + -0x4d34) +\n                  (uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f) * 4);\n  for (piVar6 = (int *)*piVar7; piVar6 != (int *)0x0; piVar6 = (int *)*piVar6) {\n    iVar3 = (*(code *)PTR_strcmp_0012b1c8)((int)piVar6 + 10,param_1);\n    if (iVar3 == 0) goto LAB_0006e768;\n    piVar7 = piVar6;\n  }\n  piVar6 = (int *)0x0;\n  if (param_2 != 0) {\n    iVar3 = (*(code *)PTR_strlen_0012af3c)(param_1);\n    iVar3 = (*(code *)PTR_FUN_0012a1d0)(iVar3 + 0xc);\n    *piVar7 = iVar3;\n    puVar1 = PTR_strcpy_0012affc;\n    *(undefined1 *)(iVar3 + 8) = 0xff;\n    (*(code *)puVar1)(iVar3 + 10,param_1);\n    *(int **)(PTR_DAT_0012a178 + -0x4d38) = piVar7;\n    return iVar3;\n  }\nLAB_0006e768:\n  *(int **)(PTR_DAT_0012a178 + -0x4d38) = piVar7;\n  return (int)piVar6;\n}\n\n" (function_definition "int FUN_0006e6a0(byte *param_1,int param_2)\n\n{\n  undefined *puVar1;\n  uint uVar2;\n  int iVar3;\n  uint uVar4;\n  byte *pbVar5;\n  int *piVar6;\n  int *piVar7;\n  \n  uVar4 = (uint)*param_1;\n  uVar2 = uVar4 << 4;\n  if (uVar4 != 0) {\n    pbVar5 = param_1 + 1;\n    do {\n      uVar2 = uVar2 + uVar4;\n      uVar4 = (uint)*pbVar5;\n      pbVar5 = pbVar5 + 1;\n    } while (uVar4 != 0);\n    uVar2 = uVar2 & 0x7fff;\n  }\n  piVar7 = (int *)(*(int *)(PTR_DAT_0012a178 + -0x4d34) +\n                  (uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f) * 4);\n  for (piVar6 = (int *)*piVar7; piVar6 != (int *)0x0; piVar6 = (int *)*piVar6) {\n    iVar3 = (*(code *)PTR_strcmp_0012b1c8)((int)piVar6 + 10,param_1);\n    if (iVar3 == 0) goto LAB_0006e768;\n    piVar7 = piVar6;\n  }\n  piVar6 = (int *)0x0;\n  if (param_2 != 0) {\n    iVar3 = (*(code *)PTR_strlen_0012af3c)(param_1);\n    iVar3 = (*(code *)PTR_FUN_0012a1d0)(iVar3 + 0xc);\n    *piVar7 = iVar3;\n    puVar1 = PTR_strcpy_0012affc;\n    *(undefined1 *)(iVar3 + 8) = 0xff;\n    (*(code *)puVar1)(iVar3 + 10,param_1);\n    *(int **)(PTR_DAT_0012a178 + -0x4d38) = piVar7;\n    return iVar3;\n  }\nLAB_0006e768:\n  *(int **)(PTR_DAT_0012a178 + -0x4d38) = piVar7;\n  return (int)piVar6;\n}" primitive_type (function_declarator "FUN_0006e6a0(byte *param_1,int param_2)" identifier (parameter_list "(byte *param_1,int param_2)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  uint uVar2;\n  int iVar3;\n  uint uVar4;\n  byte *pbVar5;\n  int *piVar6;\n  int *piVar7;\n  \n  uVar4 = (uint)*param_1;\n  uVar2 = uVar4 << 4;\n  if (uVar4 != 0) {\n    pbVar5 = param_1 + 1;\n    do {\n      uVar2 = uVar2 + uVar4;\n      uVar4 = (uint)*pbVar5;\n      pbVar5 = pbVar5 + 1;\n    } while (uVar4 != 0);\n    uVar2 = uVar2 & 0x7fff;\n  }\n  piVar7 = (int *)(*(int *)(PTR_DAT_0012a178 + -0x4d34) +\n                  (uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f) * 4);\n  for (piVar6 = (int *)*piVar7; piVar6 != (int *)0x0; piVar6 = (int *)*piVar6) {\n    iVar3 = (*(code *)PTR_strcmp_0012b1c8)((int)piVar6 + 10,param_1);\n    if (iVar3 == 0) goto LAB_0006e768;\n    piVar7 = piVar6;\n  }\n  piVar6 = (int *)0x0;\n  if (param_2 != 0) {\n    iVar3 = (*(code *)PTR_strlen_0012af3c)(param_1);\n    iVar3 = (*(code *)PTR_FUN_0012a1d0)(iVar3 + 0xc);\n    *piVar7 = iVar3;\n    puVar1 = PTR_strcpy_0012affc;\n    *(undefined1 *)(iVar3 + 8) = 0xff;\n    (*(code *)puVar1)(iVar3 + 10,param_1);\n    *(int **)(PTR_DAT_0012a178 + -0x4d38) = piVar7;\n    return iVar3;\n  }\nLAB_0006e768:\n  *(int **)(PTR_DAT_0012a178 + -0x4d38) = piVar7;\n  return (int)piVar6;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "byte *pbVar5;" type_identifier (pointer_declarator "*pbVar5" * identifier) ;) (declaration "int *piVar6;" primitive_type (pointer_declarator "*piVar6" * identifier) ;) (declaration "int *piVar7;" primitive_type (pointer_declarator "*piVar7" * identifier) ;) (expression_statement "uVar4 = (uint)*param_1;" (assignment_expression "uVar4 = (uint)*param_1" identifier = (binary_expression "(uint)*param_1" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (expression_statement "uVar2 = uVar4 << 4;" (assignment_expression "uVar2 = uVar4 << 4" identifier = (binary_expression "uVar4 << 4" identifier << number_literal)) ;) (if_statement "if (uVar4 != 0) {\n    pbVar5 = param_1 + 1;\n    do {\n      uVar2 = uVar2 + uVar4;\n      uVar4 = (uint)*pbVar5;\n      pbVar5 = pbVar5 + 1;\n    } while (uVar4 != 0);\n    uVar2 = uVar2 & 0x7fff;\n  }" if (parenthesized_expression "(uVar4 != 0)" ( (binary_expression "uVar4 != 0" identifier != number_literal) )) (compound_statement "{\n    pbVar5 = param_1 + 1;\n    do {\n      uVar2 = uVar2 + uVar4;\n      uVar4 = (uint)*pbVar5;\n      pbVar5 = pbVar5 + 1;\n    } while (uVar4 != 0);\n    uVar2 = uVar2 & 0x7fff;\n  }" { (expression_statement "pbVar5 = param_1 + 1;" (assignment_expression "pbVar5 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) (do_statement "do {\n      uVar2 = uVar2 + uVar4;\n      uVar4 = (uint)*pbVar5;\n      pbVar5 = pbVar5 + 1;\n    } while (uVar4 != 0);" do (compound_statement "{\n      uVar2 = uVar2 + uVar4;\n      uVar4 = (uint)*pbVar5;\n      pbVar5 = pbVar5 + 1;\n    }" { (expression_statement "uVar2 = uVar2 + uVar4;" (assignment_expression "uVar2 = uVar2 + uVar4" identifier = (binary_expression "uVar2 + uVar4" identifier + identifier)) ;) (expression_statement "uVar4 = (uint)*pbVar5;" (assignment_expression "uVar4 = (uint)*pbVar5" identifier = (binary_expression "(uint)*pbVar5" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (expression_statement "pbVar5 = pbVar5 + 1;" (assignment_expression "pbVar5 = pbVar5 + 1" identifier = (binary_expression "pbVar5 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar4 != 0)" ( (binary_expression "uVar4 != 0" identifier != number_literal) )) ;) (expression_statement "uVar2 = uVar2 & 0x7fff;" (assignment_expression "uVar2 = uVar2 & 0x7fff" identifier = (binary_expression "uVar2 & 0x7fff" identifier & number_literal)) ;) })) (expression_statement "piVar7 = (int *)(*(int *)(PTR_DAT_0012a178 + -0x4d34) +\n                  (uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f) * 4);" (assignment_expression "piVar7 = (int *)(*(int *)(PTR_DAT_0012a178 + -0x4d34) +\n                  (uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f) * 4)" identifier = (cast_expression "(int *)(*(int *)(PTR_DAT_0012a178 + -0x4d34) +\n                  (uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f) * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(PTR_DAT_0012a178 + -0x4d34) +\n                  (uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f) * 4)" ( (binary_expression "*(int *)(PTR_DAT_0012a178 + -0x4d34) +\n                  (uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f) * 4" (pointer_expression "*(int *)(PTR_DAT_0012a178 + -0x4d34)" * (cast_expression "(int *)(PTR_DAT_0012a178 + -0x4d34)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_0012a178 + -0x4d34)" ( (binary_expression "PTR_DAT_0012a178 + -0x4d34" identifier + number_literal) )))) + (binary_expression "(uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f) * 4" (parenthesized_expression "(uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f)" ( (binary_expression "uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f" identifier + (binary_expression "(uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f" (parenthesized_expression "(uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4)" ( (binary_expression "uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4" (binary_expression "uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1)" (binary_expression "uVar2 / 0x1f" identifier / number_literal) + (parenthesized_expression "(uVar2 - uVar2 / 0x1f >> 1)" ( (binary_expression "uVar2 - uVar2 / 0x1f >> 1" (binary_expression "uVar2 - uVar2 / 0x1f" identifier - (binary_expression "uVar2 / 0x1f" identifier / number_literal)) >> number_literal) ))) >> number_literal) )) * number_literal)) )) * number_literal)) )))) ;) (for_statement "for (piVar6 = (int *)*piVar7; piVar6 != (int *)0x0; piVar6 = (int *)*piVar6) {\n    iVar3 = (*(code *)PTR_strcmp_0012b1c8)((int)piVar6 + 10,param_1);\n    if (iVar3 == 0) goto LAB_0006e768;\n    piVar7 = piVar6;\n  }" for ( (assignment_expression "piVar6 = (int *)*piVar7" identifier = (cast_expression "(int *)*piVar7" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar7" * identifier))) ; (binary_expression "piVar6 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ; (assignment_expression "piVar6 = (int *)*piVar6" identifier = (cast_expression "(int *)*piVar6" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar6" * identifier))) ) (compound_statement "{\n    iVar3 = (*(code *)PTR_strcmp_0012b1c8)((int)piVar6 + 10,param_1);\n    if (iVar3 == 0) goto LAB_0006e768;\n    piVar7 = piVar6;\n  }" { (expression_statement "iVar3 = (*(code *)PTR_strcmp_0012b1c8)((int)piVar6 + 10,param_1);" (assignment_expression "iVar3 = (*(code *)PTR_strcmp_0012b1c8)((int)piVar6 + 10,param_1)" identifier = (call_expression "(*(code *)PTR_strcmp_0012b1c8)((int)piVar6 + 10,param_1)" (parenthesized_expression "(*(code *)PTR_strcmp_0012b1c8)" ( (pointer_expression "*(code *)PTR_strcmp_0012b1c8" * (cast_expression "(code *)PTR_strcmp_0012b1c8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "((int)piVar6 + 10,param_1)" ( (binary_expression "(int)piVar6 + 10" (cast_expression "(int)piVar6" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) , identifier )))) ;) (if_statement "if (iVar3 == 0) goto LAB_0006e768;" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0006e768;" goto statement_identifier ;)) (expression_statement "piVar7 = piVar6;" (assignment_expression "piVar7 = piVar6" identifier = identifier) ;) })) (expression_statement "piVar6 = (int *)0x0;" (assignment_expression "piVar6 = (int *)0x0" identifier = (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (if_statement "if (param_2 != 0) {\n    iVar3 = (*(code *)PTR_strlen_0012af3c)(param_1);\n    iVar3 = (*(code *)PTR_FUN_0012a1d0)(iVar3 + 0xc);\n    *piVar7 = iVar3;\n    puVar1 = PTR_strcpy_0012affc;\n    *(undefined1 *)(iVar3 + 8) = 0xff;\n    (*(code *)puVar1)(iVar3 + 10,param_1);\n    *(int **)(PTR_DAT_0012a178 + -0x4d38) = piVar7;\n    return iVar3;\n  }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar3 = (*(code *)PTR_strlen_0012af3c)(param_1);\n    iVar3 = (*(code *)PTR_FUN_0012a1d0)(iVar3 + 0xc);\n    *piVar7 = iVar3;\n    puVar1 = PTR_strcpy_0012affc;\n    *(undefined1 *)(iVar3 + 8) = 0xff;\n    (*(code *)puVar1)(iVar3 + 10,param_1);\n    *(int **)(PTR_DAT_0012a178 + -0x4d38) = piVar7;\n    return iVar3;\n  }" { (expression_statement "iVar3 = (*(code *)PTR_strlen_0012af3c)(param_1);" (assignment_expression "iVar3 = (*(code *)PTR_strlen_0012af3c)(param_1)" identifier = (call_expression "(*(code *)PTR_strlen_0012af3c)(param_1)" (parenthesized_expression "(*(code *)PTR_strlen_0012af3c)" ( (pointer_expression "*(code *)PTR_strlen_0012af3c" * (cast_expression "(code *)PTR_strlen_0012af3c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "iVar3 = (*(code *)PTR_FUN_0012a1d0)(iVar3 + 0xc);" (assignment_expression "iVar3 = (*(code *)PTR_FUN_0012a1d0)(iVar3 + 0xc)" identifier = (call_expression "(*(code *)PTR_FUN_0012a1d0)(iVar3 + 0xc)" (parenthesized_expression "(*(code *)PTR_FUN_0012a1d0)" ( (pointer_expression "*(code *)PTR_FUN_0012a1d0" * (cast_expression "(code *)PTR_FUN_0012a1d0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar3 + 0xc)" ( (binary_expression "iVar3 + 0xc" identifier + number_literal) )))) ;) (expression_statement "*piVar7 = iVar3;" (assignment_expression "*piVar7 = iVar3" (pointer_expression "*piVar7" * identifier) = identifier) ;) (expression_statement "puVar1 = PTR_strcpy_0012affc;" (assignment_expression "puVar1 = PTR_strcpy_0012affc" identifier = identifier) ;) (expression_statement "*(undefined1 *)(iVar3 + 8) = 0xff;" (assignment_expression "*(undefined1 *)(iVar3 + 8) = 0xff" (pointer_expression "*(undefined1 *)(iVar3 + 8)" * (cast_expression "(undefined1 *)(iVar3 + 8)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 8)" ( (binary_expression "iVar3 + 8" identifier + number_literal) )))) = number_literal) ;) (expression_statement "(*(code *)puVar1)(iVar3 + 10,param_1);" (call_expression "(*(code *)puVar1)(iVar3 + 10,param_1)" (parenthesized_expression "(*(code *)puVar1)" ( (pointer_expression "*(code *)puVar1" * (cast_expression "(code *)puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar3 + 10,param_1)" ( (binary_expression "iVar3 + 10" identifier + number_literal) , identifier ))) ;) (expression_statement "*(int **)(PTR_DAT_0012a178 + -0x4d38) = piVar7;" (assignment_expression "*(int **)(PTR_DAT_0012a178 + -0x4d38) = piVar7" (pointer_expression "*(int **)(PTR_DAT_0012a178 + -0x4d38)" * (cast_expression "(int **)(PTR_DAT_0012a178 + -0x4d38)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(PTR_DAT_0012a178 + -0x4d38)" ( (binary_expression "PTR_DAT_0012a178 + -0x4d38" identifier + number_literal) )))) = identifier) ;) (return_statement "return iVar3;" return identifier ;) })) (labeled_statement "LAB_0006e768:\n  *(int **)(PTR_DAT_0012a178 + -0x4d38) = piVar7;" statement_identifier : (expression_statement "*(int **)(PTR_DAT_0012a178 + -0x4d38) = piVar7;" (assignment_expression "*(int **)(PTR_DAT_0012a178 + -0x4d38) = piVar7" (pointer_expression "*(int **)(PTR_DAT_0012a178 + -0x4d38)" * (cast_expression "(int **)(PTR_DAT_0012a178 + -0x4d38)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(PTR_DAT_0012a178 + -0x4d38)" ( (binary_expression "PTR_DAT_0012a178 + -0x4d38" identifier + number_literal) )))) = identifier) ;)) (return_statement "return (int)piVar6;" return (cast_expression "(int)piVar6" ( (type_descriptor "int" primitive_type) ) identifier) ;) })))
(translation_unit "tblentry * cmdlookup(char *name,int add)\n\n{\n  undefined *puVar1;\n  uint uVar2;\n  int iVar3;\n  uint uVar4;\n  byte *pbVar5;\n  tblentry *ptVar6;\n  tblentry *ptVar7;\n  \n  uVar4 = (uint)(byte)*name;\n  uVar2 = uVar4 << 4;\n  if (uVar4 != 0) {\n    pbVar5 = (byte *)(name + 1);\n    do {\n      uVar2 = uVar2 + uVar4;\n      uVar4 = (uint)*pbVar5;\n      pbVar5 = pbVar5 + 1;\n    } while (uVar4 != 0);\n    uVar2 = uVar2 & 0x7fff;\n  }\n  ptVar7 = (tblentry *)\n           (*(int *)(PTR_DAT_0012a178 + -0x4d34) +\n           (uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f) * 4);\n  for (ptVar6 = ptVar7->next; ptVar6 != (tblentry *)0x0; ptVar6 = ptVar6->next) {\n    iVar3 = (*(code *)PTR_strcmp_0012b1c8)(ptVar6->cmdname,name);\n    if (iVar3 == 0) goto LAB_0006e768;\n    ptVar7 = ptVar6;\n  }\n  ptVar6 = (tblentry *)0x0;\n  if (add != 0) {\n    iVar3 = (*(code *)PTR_strlen_0012af3c)(name);\n    ptVar6 = (tblentry *)(*(code *)PTR_xzalloc_0012a1d0)(iVar3 + 0xc);\n    ptVar7->next = ptVar6;\n    puVar1 = PTR_strcpy_0012affc;\n    ptVar6->cmdtype = -1;\n    (*(code *)puVar1)(ptVar6->cmdname,name);\n    *(tblentry **)(PTR_DAT_0012a178 + -0x4d38) = ptVar7;\n    return ptVar6;\n  }\nLAB_0006e768:\n  *(tblentry **)(PTR_DAT_0012a178 + -0x4d38) = ptVar7;\n  return ptVar6;\n}\n\n" (function_definition "tblentry * cmdlookup(char *name,int add)\n\n{\n  undefined *puVar1;\n  uint uVar2;\n  int iVar3;\n  uint uVar4;\n  byte *pbVar5;\n  tblentry *ptVar6;\n  tblentry *ptVar7;\n  \n  uVar4 = (uint)(byte)*name;\n  uVar2 = uVar4 << 4;\n  if (uVar4 != 0) {\n    pbVar5 = (byte *)(name + 1);\n    do {\n      uVar2 = uVar2 + uVar4;\n      uVar4 = (uint)*pbVar5;\n      pbVar5 = pbVar5 + 1;\n    } while (uVar4 != 0);\n    uVar2 = uVar2 & 0x7fff;\n  }\n  ptVar7 = (tblentry *)\n           (*(int *)(PTR_DAT_0012a178 + -0x4d34) +\n           (uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f) * 4);\n  for (ptVar6 = ptVar7->next; ptVar6 != (tblentry *)0x0; ptVar6 = ptVar6->next) {\n    iVar3 = (*(code *)PTR_strcmp_0012b1c8)(ptVar6->cmdname,name);\n    if (iVar3 == 0) goto LAB_0006e768;\n    ptVar7 = ptVar6;\n  }\n  ptVar6 = (tblentry *)0x0;\n  if (add != 0) {\n    iVar3 = (*(code *)PTR_strlen_0012af3c)(name);\n    ptVar6 = (tblentry *)(*(code *)PTR_xzalloc_0012a1d0)(iVar3 + 0xc);\n    ptVar7->next = ptVar6;\n    puVar1 = PTR_strcpy_0012affc;\n    ptVar6->cmdtype = -1;\n    (*(code *)puVar1)(ptVar6->cmdname,name);\n    *(tblentry **)(PTR_DAT_0012a178 + -0x4d38) = ptVar7;\n    return ptVar6;\n  }\nLAB_0006e768:\n  *(tblentry **)(PTR_DAT_0012a178 + -0x4d38) = ptVar7;\n  return ptVar6;\n}" type_identifier (pointer_declarator "* cmdlookup(char *name,int add)" * (function_declarator "cmdlookup(char *name,int add)" identifier (parameter_list "(char *name,int add)" ( (parameter_declaration "char *name" primitive_type (pointer_declarator "*name" * identifier)) , (parameter_declaration "int add" primitive_type identifier) )))) (compound_statement "{\n  undefined *puVar1;\n  uint uVar2;\n  int iVar3;\n  uint uVar4;\n  byte *pbVar5;\n  tblentry *ptVar6;\n  tblentry *ptVar7;\n  \n  uVar4 = (uint)(byte)*name;\n  uVar2 = uVar4 << 4;\n  if (uVar4 != 0) {\n    pbVar5 = (byte *)(name + 1);\n    do {\n      uVar2 = uVar2 + uVar4;\n      uVar4 = (uint)*pbVar5;\n      pbVar5 = pbVar5 + 1;\n    } while (uVar4 != 0);\n    uVar2 = uVar2 & 0x7fff;\n  }\n  ptVar7 = (tblentry *)\n           (*(int *)(PTR_DAT_0012a178 + -0x4d34) +\n           (uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f) * 4);\n  for (ptVar6 = ptVar7->next; ptVar6 != (tblentry *)0x0; ptVar6 = ptVar6->next) {\n    iVar3 = (*(code *)PTR_strcmp_0012b1c8)(ptVar6->cmdname,name);\n    if (iVar3 == 0) goto LAB_0006e768;\n    ptVar7 = ptVar6;\n  }\n  ptVar6 = (tblentry *)0x0;\n  if (add != 0) {\n    iVar3 = (*(code *)PTR_strlen_0012af3c)(name);\n    ptVar6 = (tblentry *)(*(code *)PTR_xzalloc_0012a1d0)(iVar3 + 0xc);\n    ptVar7->next = ptVar6;\n    puVar1 = PTR_strcpy_0012affc;\n    ptVar6->cmdtype = -1;\n    (*(code *)puVar1)(ptVar6->cmdname,name);\n    *(tblentry **)(PTR_DAT_0012a178 + -0x4d38) = ptVar7;\n    return ptVar6;\n  }\nLAB_0006e768:\n  *(tblentry **)(PTR_DAT_0012a178 + -0x4d38) = ptVar7;\n  return ptVar6;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "byte *pbVar5;" type_identifier (pointer_declarator "*pbVar5" * identifier) ;) (declaration "tblentry *ptVar6;" type_identifier (pointer_declarator "*ptVar6" * identifier) ;) (declaration "tblentry *ptVar7;" type_identifier (pointer_declarator "*ptVar7" * identifier) ;) (expression_statement "uVar4 = (uint)(byte)*name;" (assignment_expression "uVar4 = (uint)(byte)*name" identifier = (binary_expression "(uint)(byte)*name" (call_expression "(uint)(byte)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(byte)" ( identifier ))) * identifier)) ;) (expression_statement "uVar2 = uVar4 << 4;" (assignment_expression "uVar2 = uVar4 << 4" identifier = (binary_expression "uVar4 << 4" identifier << number_literal)) ;) (if_statement "if (uVar4 != 0) {\n    pbVar5 = (byte *)(name + 1);\n    do {\n      uVar2 = uVar2 + uVar4;\n      uVar4 = (uint)*pbVar5;\n      pbVar5 = pbVar5 + 1;\n    } while (uVar4 != 0);\n    uVar2 = uVar2 & 0x7fff;\n  }" if (parenthesized_expression "(uVar4 != 0)" ( (binary_expression "uVar4 != 0" identifier != number_literal) )) (compound_statement "{\n    pbVar5 = (byte *)(name + 1);\n    do {\n      uVar2 = uVar2 + uVar4;\n      uVar4 = (uint)*pbVar5;\n      pbVar5 = pbVar5 + 1;\n    } while (uVar4 != 0);\n    uVar2 = uVar2 & 0x7fff;\n  }" { (expression_statement "pbVar5 = (byte *)(name + 1);" (assignment_expression "pbVar5 = (byte *)(name + 1)" identifier = (cast_expression "(byte *)(name + 1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(name + 1)" ( (binary_expression "name + 1" identifier + number_literal) )))) ;) (do_statement "do {\n      uVar2 = uVar2 + uVar4;\n      uVar4 = (uint)*pbVar5;\n      pbVar5 = pbVar5 + 1;\n    } while (uVar4 != 0);" do (compound_statement "{\n      uVar2 = uVar2 + uVar4;\n      uVar4 = (uint)*pbVar5;\n      pbVar5 = pbVar5 + 1;\n    }" { (expression_statement "uVar2 = uVar2 + uVar4;" (assignment_expression "uVar2 = uVar2 + uVar4" identifier = (binary_expression "uVar2 + uVar4" identifier + identifier)) ;) (expression_statement "uVar4 = (uint)*pbVar5;" (assignment_expression "uVar4 = (uint)*pbVar5" identifier = (binary_expression "(uint)*pbVar5" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (expression_statement "pbVar5 = pbVar5 + 1;" (assignment_expression "pbVar5 = pbVar5 + 1" identifier = (binary_expression "pbVar5 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar4 != 0)" ( (binary_expression "uVar4 != 0" identifier != number_literal) )) ;) (expression_statement "uVar2 = uVar2 & 0x7fff;" (assignment_expression "uVar2 = uVar2 & 0x7fff" identifier = (binary_expression "uVar2 & 0x7fff" identifier & number_literal)) ;) })) (expression_statement "ptVar7 = (tblentry *)\n           (*(int *)(PTR_DAT_0012a178 + -0x4d34) +\n           (uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f) * 4);" (assignment_expression "ptVar7 = (tblentry *)\n           (*(int *)(PTR_DAT_0012a178 + -0x4d34) +\n           (uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f) * 4)" identifier = (cast_expression "(tblentry *)\n           (*(int *)(PTR_DAT_0012a178 + -0x4d34) +\n           (uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f) * 4)" ( (type_descriptor "tblentry *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(PTR_DAT_0012a178 + -0x4d34) +\n           (uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f) * 4)" ( (binary_expression "*(int *)(PTR_DAT_0012a178 + -0x4d34) +\n           (uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f) * 4" (pointer_expression "*(int *)(PTR_DAT_0012a178 + -0x4d34)" * (cast_expression "(int *)(PTR_DAT_0012a178 + -0x4d34)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_0012a178 + -0x4d34)" ( (binary_expression "PTR_DAT_0012a178 + -0x4d34" identifier + number_literal) )))) + (binary_expression "(uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f) * 4" (parenthesized_expression "(uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f)" ( (binary_expression "uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f" identifier + (binary_expression "(uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f" (parenthesized_expression "(uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4)" ( (binary_expression "uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4" (binary_expression "uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1)" (binary_expression "uVar2 / 0x1f" identifier / number_literal) + (parenthesized_expression "(uVar2 - uVar2 / 0x1f >> 1)" ( (binary_expression "uVar2 - uVar2 / 0x1f >> 1" (binary_expression "uVar2 - uVar2 / 0x1f" identifier - (binary_expression "uVar2 / 0x1f" identifier / number_literal)) >> number_literal) ))) >> number_literal) )) * number_literal)) )) * number_literal)) )))) ;) (for_statement "for (ptVar6 = ptVar7->next; ptVar6 != (tblentry *)0x0; ptVar6 = ptVar6->next) {\n    iVar3 = (*(code *)PTR_strcmp_0012b1c8)(ptVar6->cmdname,name);\n    if (iVar3 == 0) goto LAB_0006e768;\n    ptVar7 = ptVar6;\n  }" for ( (assignment_expression "ptVar6 = ptVar7->next" identifier = (field_expression "ptVar7->next" identifier -> field_identifier)) ; (binary_expression "ptVar6 != (tblentry *)0x0" identifier != (cast_expression "(tblentry *)0x0" ( (type_descriptor "tblentry *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ; (assignment_expression "ptVar6 = ptVar6->next" identifier = (field_expression "ptVar6->next" identifier -> field_identifier)) ) (compound_statement "{\n    iVar3 = (*(code *)PTR_strcmp_0012b1c8)(ptVar6->cmdname,name);\n    if (iVar3 == 0) goto LAB_0006e768;\n    ptVar7 = ptVar6;\n  }" { (expression_statement "iVar3 = (*(code *)PTR_strcmp_0012b1c8)(ptVar6->cmdname,name);" (assignment_expression "iVar3 = (*(code *)PTR_strcmp_0012b1c8)(ptVar6->cmdname,name)" identifier = (call_expression "(*(code *)PTR_strcmp_0012b1c8)(ptVar6->cmdname,name)" (parenthesized_expression "(*(code *)PTR_strcmp_0012b1c8)" ( (pointer_expression "*(code *)PTR_strcmp_0012b1c8" * (cast_expression "(code *)PTR_strcmp_0012b1c8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(ptVar6->cmdname,name)" ( (field_expression "ptVar6->cmdname" identifier -> field_identifier) , identifier )))) ;) (if_statement "if (iVar3 == 0) goto LAB_0006e768;" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0006e768;" goto statement_identifier ;)) (expression_statement "ptVar7 = ptVar6;" (assignment_expression "ptVar7 = ptVar6" identifier = identifier) ;) })) (expression_statement "ptVar6 = (tblentry *)0x0;" (assignment_expression "ptVar6 = (tblentry *)0x0" identifier = (cast_expression "(tblentry *)0x0" ( (type_descriptor "tblentry *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (if_statement "if (add != 0) {\n    iVar3 = (*(code *)PTR_strlen_0012af3c)(name);\n    ptVar6 = (tblentry *)(*(code *)PTR_xzalloc_0012a1d0)(iVar3 + 0xc);\n    ptVar7->next = ptVar6;\n    puVar1 = PTR_strcpy_0012affc;\n    ptVar6->cmdtype = -1;\n    (*(code *)puVar1)(ptVar6->cmdname,name);\n    *(tblentry **)(PTR_DAT_0012a178 + -0x4d38) = ptVar7;\n    return ptVar6;\n  }" if (parenthesized_expression "(add != 0)" ( (binary_expression "add != 0" identifier != number_literal) )) (compound_statement "{\n    iVar3 = (*(code *)PTR_strlen_0012af3c)(name);\n    ptVar6 = (tblentry *)(*(code *)PTR_xzalloc_0012a1d0)(iVar3 + 0xc);\n    ptVar7->next = ptVar6;\n    puVar1 = PTR_strcpy_0012affc;\n    ptVar6->cmdtype = -1;\n    (*(code *)puVar1)(ptVar6->cmdname,name);\n    *(tblentry **)(PTR_DAT_0012a178 + -0x4d38) = ptVar7;\n    return ptVar6;\n  }" { (expression_statement "iVar3 = (*(code *)PTR_strlen_0012af3c)(name);" (assignment_expression "iVar3 = (*(code *)PTR_strlen_0012af3c)(name)" identifier = (call_expression "(*(code *)PTR_strlen_0012af3c)(name)" (parenthesized_expression "(*(code *)PTR_strlen_0012af3c)" ( (pointer_expression "*(code *)PTR_strlen_0012af3c" * (cast_expression "(code *)PTR_strlen_0012af3c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(name)" ( identifier )))) ;) (expression_statement "ptVar6 = (tblentry *)(*(code *)PTR_xzalloc_0012a1d0)(iVar3 + 0xc);" (assignment_expression "ptVar6 = (tblentry *)(*(code *)PTR_xzalloc_0012a1d0)(iVar3 + 0xc)" identifier = (cast_expression "(tblentry *)(*(code *)PTR_xzalloc_0012a1d0)(iVar3 + 0xc)" ( (type_descriptor "tblentry *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_xzalloc_0012a1d0)(iVar3 + 0xc)" (parenthesized_expression "(*(code *)PTR_xzalloc_0012a1d0)" ( (pointer_expression "*(code *)PTR_xzalloc_0012a1d0" * (cast_expression "(code *)PTR_xzalloc_0012a1d0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar3 + 0xc)" ( (binary_expression "iVar3 + 0xc" identifier + number_literal) ))))) ;) (expression_statement "ptVar7->next = ptVar6;" (assignment_expression "ptVar7->next = ptVar6" (field_expression "ptVar7->next" identifier -> field_identifier) = identifier) ;) (expression_statement "puVar1 = PTR_strcpy_0012affc;" (assignment_expression "puVar1 = PTR_strcpy_0012affc" identifier = identifier) ;) (expression_statement "ptVar6->cmdtype = -1;" (assignment_expression "ptVar6->cmdtype = -1" (field_expression "ptVar6->cmdtype" identifier -> field_identifier) = number_literal) ;) (expression_statement "(*(code *)puVar1)(ptVar6->cmdname,name);" (call_expression "(*(code *)puVar1)(ptVar6->cmdname,name)" (parenthesized_expression "(*(code *)puVar1)" ( (pointer_expression "*(code *)puVar1" * (cast_expression "(code *)puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(ptVar6->cmdname,name)" ( (field_expression "ptVar6->cmdname" identifier -> field_identifier) , identifier ))) ;) (expression_statement "*(tblentry **)(PTR_DAT_0012a178 + -0x4d38) = ptVar7;" (assignment_expression "*(tblentry **)(PTR_DAT_0012a178 + -0x4d38) = ptVar7" (pointer_expression "*(tblentry **)(PTR_DAT_0012a178 + -0x4d38)" * (cast_expression "(tblentry **)(PTR_DAT_0012a178 + -0x4d38)" ( (type_descriptor "tblentry **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(PTR_DAT_0012a178 + -0x4d38)" ( (binary_expression "PTR_DAT_0012a178 + -0x4d38" identifier + number_literal) )))) = identifier) ;) (return_statement "return ptVar6;" return identifier ;) })) (labeled_statement "LAB_0006e768:\n  *(tblentry **)(PTR_DAT_0012a178 + -0x4d38) = ptVar7;" statement_identifier : (expression_statement "*(tblentry **)(PTR_DAT_0012a178 + -0x4d38) = ptVar7;" (assignment_expression "*(tblentry **)(PTR_DAT_0012a178 + -0x4d38) = ptVar7" (pointer_expression "*(tblentry **)(PTR_DAT_0012a178 + -0x4d38)" * (cast_expression "(tblentry **)(PTR_DAT_0012a178 + -0x4d38)" ( (type_descriptor "tblentry **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(PTR_DAT_0012a178 + -0x4d38)" ( (binary_expression "PTR_DAT_0012a178 + -0x4d38" identifier + number_literal) )))) = identifier) ;)) (return_statement "return ptVar6;" return identifier ;) })))
(translation_unit "int FUN_0006e6a0(byte *param_1,int param_2)\n\n{\n  undefined *puVar1;\n  uint uVar2;\n  int iVar3;\n  uint uVar4;\n  byte *pbVar5;\n  int *piVar6;\n  int *piVar7;\n  \n  uVar4 = (uint)*param_1;\n  uVar2 = uVar4 << 4;\n  if (uVar4 != 0) {\n    pbVar5 = param_1 + 1;\n    do {\n      uVar2 = uVar2 + uVar4;\n      uVar4 = (uint)*pbVar5;\n      pbVar5 = pbVar5 + 1;\n    } while (uVar4 != 0);\n    uVar2 = uVar2 & 0x7fff;\n  }\n  piVar7 = (int *)(*(int *)(PTR_DAT_0012a178 + -0x4d34) +\n                  (uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f) * 4);\n  for (piVar6 = (int *)*piVar7; piVar6 != (int *)0x0; piVar6 = (int *)*piVar6) {\n    iVar3 = (*(code *)PTR_strcmp_0012b1c8)((int)piVar6 + 10,param_1);\n    if (iVar3 == 0) goto LAB_0006e768;\n    piVar7 = piVar6;\n  }\n  piVar6 = (int *)0x0;\n  if (param_2 != 0) {\n    iVar3 = (*(code *)PTR_strlen_0012af3c)(param_1);\n    iVar3 = (*(code *)PTR_FUN_0012a1d0)(iVar3 + 0xc);\n    *piVar7 = iVar3;\n    puVar1 = PTR_strcpy_0012affc;\n    *(undefined1 *)(iVar3 + 8) = 0xff;\n    (*(code *)puVar1)(iVar3 + 10,param_1);\n    *(int **)(PTR_DAT_0012a178 + -0x4d38) = piVar7;\n    return iVar3;\n  }\nLAB_0006e768:\n  *(int **)(PTR_DAT_0012a178 + -0x4d38) = piVar7;\n  return (int)piVar6;\n}\n\n" (function_definition "int FUN_0006e6a0(byte *param_1,int param_2)\n\n{\n  undefined *puVar1;\n  uint uVar2;\n  int iVar3;\n  uint uVar4;\n  byte *pbVar5;\n  int *piVar6;\n  int *piVar7;\n  \n  uVar4 = (uint)*param_1;\n  uVar2 = uVar4 << 4;\n  if (uVar4 != 0) {\n    pbVar5 = param_1 + 1;\n    do {\n      uVar2 = uVar2 + uVar4;\n      uVar4 = (uint)*pbVar5;\n      pbVar5 = pbVar5 + 1;\n    } while (uVar4 != 0);\n    uVar2 = uVar2 & 0x7fff;\n  }\n  piVar7 = (int *)(*(int *)(PTR_DAT_0012a178 + -0x4d34) +\n                  (uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f) * 4);\n  for (piVar6 = (int *)*piVar7; piVar6 != (int *)0x0; piVar6 = (int *)*piVar6) {\n    iVar3 = (*(code *)PTR_strcmp_0012b1c8)((int)piVar6 + 10,param_1);\n    if (iVar3 == 0) goto LAB_0006e768;\n    piVar7 = piVar6;\n  }\n  piVar6 = (int *)0x0;\n  if (param_2 != 0) {\n    iVar3 = (*(code *)PTR_strlen_0012af3c)(param_1);\n    iVar3 = (*(code *)PTR_FUN_0012a1d0)(iVar3 + 0xc);\n    *piVar7 = iVar3;\n    puVar1 = PTR_strcpy_0012affc;\n    *(undefined1 *)(iVar3 + 8) = 0xff;\n    (*(code *)puVar1)(iVar3 + 10,param_1);\n    *(int **)(PTR_DAT_0012a178 + -0x4d38) = piVar7;\n    return iVar3;\n  }\nLAB_0006e768:\n  *(int **)(PTR_DAT_0012a178 + -0x4d38) = piVar7;\n  return (int)piVar6;\n}" primitive_type (function_declarator "FUN_0006e6a0(byte *param_1,int param_2)" identifier (parameter_list "(byte *param_1,int param_2)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  uint uVar2;\n  int iVar3;\n  uint uVar4;\n  byte *pbVar5;\n  int *piVar6;\n  int *piVar7;\n  \n  uVar4 = (uint)*param_1;\n  uVar2 = uVar4 << 4;\n  if (uVar4 != 0) {\n    pbVar5 = param_1 + 1;\n    do {\n      uVar2 = uVar2 + uVar4;\n      uVar4 = (uint)*pbVar5;\n      pbVar5 = pbVar5 + 1;\n    } while (uVar4 != 0);\n    uVar2 = uVar2 & 0x7fff;\n  }\n  piVar7 = (int *)(*(int *)(PTR_DAT_0012a178 + -0x4d34) +\n                  (uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f) * 4);\n  for (piVar6 = (int *)*piVar7; piVar6 != (int *)0x0; piVar6 = (int *)*piVar6) {\n    iVar3 = (*(code *)PTR_strcmp_0012b1c8)((int)piVar6 + 10,param_1);\n    if (iVar3 == 0) goto LAB_0006e768;\n    piVar7 = piVar6;\n  }\n  piVar6 = (int *)0x0;\n  if (param_2 != 0) {\n    iVar3 = (*(code *)PTR_strlen_0012af3c)(param_1);\n    iVar3 = (*(code *)PTR_FUN_0012a1d0)(iVar3 + 0xc);\n    *piVar7 = iVar3;\n    puVar1 = PTR_strcpy_0012affc;\n    *(undefined1 *)(iVar3 + 8) = 0xff;\n    (*(code *)puVar1)(iVar3 + 10,param_1);\n    *(int **)(PTR_DAT_0012a178 + -0x4d38) = piVar7;\n    return iVar3;\n  }\nLAB_0006e768:\n  *(int **)(PTR_DAT_0012a178 + -0x4d38) = piVar7;\n  return (int)piVar6;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "byte *pbVar5;" type_identifier (pointer_declarator "*pbVar5" * identifier) ;) (declaration "int *piVar6;" primitive_type (pointer_declarator "*piVar6" * identifier) ;) (declaration "int *piVar7;" primitive_type (pointer_declarator "*piVar7" * identifier) ;) (expression_statement "uVar4 = (uint)*param_1;" (assignment_expression "uVar4 = (uint)*param_1" identifier = (binary_expression "(uint)*param_1" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (expression_statement "uVar2 = uVar4 << 4;" (assignment_expression "uVar2 = uVar4 << 4" identifier = (binary_expression "uVar4 << 4" identifier << number_literal)) ;) (if_statement "if (uVar4 != 0) {\n    pbVar5 = param_1 + 1;\n    do {\n      uVar2 = uVar2 + uVar4;\n      uVar4 = (uint)*pbVar5;\n      pbVar5 = pbVar5 + 1;\n    } while (uVar4 != 0);\n    uVar2 = uVar2 & 0x7fff;\n  }" if (parenthesized_expression "(uVar4 != 0)" ( (binary_expression "uVar4 != 0" identifier != number_literal) )) (compound_statement "{\n    pbVar5 = param_1 + 1;\n    do {\n      uVar2 = uVar2 + uVar4;\n      uVar4 = (uint)*pbVar5;\n      pbVar5 = pbVar5 + 1;\n    } while (uVar4 != 0);\n    uVar2 = uVar2 & 0x7fff;\n  }" { (expression_statement "pbVar5 = param_1 + 1;" (assignment_expression "pbVar5 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) (do_statement "do {\n      uVar2 = uVar2 + uVar4;\n      uVar4 = (uint)*pbVar5;\n      pbVar5 = pbVar5 + 1;\n    } while (uVar4 != 0);" do (compound_statement "{\n      uVar2 = uVar2 + uVar4;\n      uVar4 = (uint)*pbVar5;\n      pbVar5 = pbVar5 + 1;\n    }" { (expression_statement "uVar2 = uVar2 + uVar4;" (assignment_expression "uVar2 = uVar2 + uVar4" identifier = (binary_expression "uVar2 + uVar4" identifier + identifier)) ;) (expression_statement "uVar4 = (uint)*pbVar5;" (assignment_expression "uVar4 = (uint)*pbVar5" identifier = (binary_expression "(uint)*pbVar5" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (expression_statement "pbVar5 = pbVar5 + 1;" (assignment_expression "pbVar5 = pbVar5 + 1" identifier = (binary_expression "pbVar5 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar4 != 0)" ( (binary_expression "uVar4 != 0" identifier != number_literal) )) ;) (expression_statement "uVar2 = uVar2 & 0x7fff;" (assignment_expression "uVar2 = uVar2 & 0x7fff" identifier = (binary_expression "uVar2 & 0x7fff" identifier & number_literal)) ;) })) (expression_statement "piVar7 = (int *)(*(int *)(PTR_DAT_0012a178 + -0x4d34) +\n                  (uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f) * 4);" (assignment_expression "piVar7 = (int *)(*(int *)(PTR_DAT_0012a178 + -0x4d34) +\n                  (uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f) * 4)" identifier = (cast_expression "(int *)(*(int *)(PTR_DAT_0012a178 + -0x4d34) +\n                  (uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f) * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(PTR_DAT_0012a178 + -0x4d34) +\n                  (uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f) * 4)" ( (binary_expression "*(int *)(PTR_DAT_0012a178 + -0x4d34) +\n                  (uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f) * 4" (pointer_expression "*(int *)(PTR_DAT_0012a178 + -0x4d34)" * (cast_expression "(int *)(PTR_DAT_0012a178 + -0x4d34)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_0012a178 + -0x4d34)" ( (binary_expression "PTR_DAT_0012a178 + -0x4d34" identifier + number_literal) )))) + (binary_expression "(uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f) * 4" (parenthesized_expression "(uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f)" ( (binary_expression "uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f" identifier + (binary_expression "(uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f" (parenthesized_expression "(uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4)" ( (binary_expression "uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4" (binary_expression "uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1)" (binary_expression "uVar2 / 0x1f" identifier / number_literal) + (parenthesized_expression "(uVar2 - uVar2 / 0x1f >> 1)" ( (binary_expression "uVar2 - uVar2 / 0x1f >> 1" (binary_expression "uVar2 - uVar2 / 0x1f" identifier - (binary_expression "uVar2 / 0x1f" identifier / number_literal)) >> number_literal) ))) >> number_literal) )) * number_literal)) )) * number_literal)) )))) ;) (for_statement "for (piVar6 = (int *)*piVar7; piVar6 != (int *)0x0; piVar6 = (int *)*piVar6) {\n    iVar3 = (*(code *)PTR_strcmp_0012b1c8)((int)piVar6 + 10,param_1);\n    if (iVar3 == 0) goto LAB_0006e768;\n    piVar7 = piVar6;\n  }" for ( (assignment_expression "piVar6 = (int *)*piVar7" identifier = (cast_expression "(int *)*piVar7" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar7" * identifier))) ; (binary_expression "piVar6 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ; (assignment_expression "piVar6 = (int *)*piVar6" identifier = (cast_expression "(int *)*piVar6" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar6" * identifier))) ) (compound_statement "{\n    iVar3 = (*(code *)PTR_strcmp_0012b1c8)((int)piVar6 + 10,param_1);\n    if (iVar3 == 0) goto LAB_0006e768;\n    piVar7 = piVar6;\n  }" { (expression_statement "iVar3 = (*(code *)PTR_strcmp_0012b1c8)((int)piVar6 + 10,param_1);" (assignment_expression "iVar3 = (*(code *)PTR_strcmp_0012b1c8)((int)piVar6 + 10,param_1)" identifier = (call_expression "(*(code *)PTR_strcmp_0012b1c8)((int)piVar6 + 10,param_1)" (parenthesized_expression "(*(code *)PTR_strcmp_0012b1c8)" ( (pointer_expression "*(code *)PTR_strcmp_0012b1c8" * (cast_expression "(code *)PTR_strcmp_0012b1c8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "((int)piVar6 + 10,param_1)" ( (binary_expression "(int)piVar6 + 10" (cast_expression "(int)piVar6" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) , identifier )))) ;) (if_statement "if (iVar3 == 0) goto LAB_0006e768;" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0006e768;" goto statement_identifier ;)) (expression_statement "piVar7 = piVar6;" (assignment_expression "piVar7 = piVar6" identifier = identifier) ;) })) (expression_statement "piVar6 = (int *)0x0;" (assignment_expression "piVar6 = (int *)0x0" identifier = (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (if_statement "if (param_2 != 0) {\n    iVar3 = (*(code *)PTR_strlen_0012af3c)(param_1);\n    iVar3 = (*(code *)PTR_FUN_0012a1d0)(iVar3 + 0xc);\n    *piVar7 = iVar3;\n    puVar1 = PTR_strcpy_0012affc;\n    *(undefined1 *)(iVar3 + 8) = 0xff;\n    (*(code *)puVar1)(iVar3 + 10,param_1);\n    *(int **)(PTR_DAT_0012a178 + -0x4d38) = piVar7;\n    return iVar3;\n  }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar3 = (*(code *)PTR_strlen_0012af3c)(param_1);\n    iVar3 = (*(code *)PTR_FUN_0012a1d0)(iVar3 + 0xc);\n    *piVar7 = iVar3;\n    puVar1 = PTR_strcpy_0012affc;\n    *(undefined1 *)(iVar3 + 8) = 0xff;\n    (*(code *)puVar1)(iVar3 + 10,param_1);\n    *(int **)(PTR_DAT_0012a178 + -0x4d38) = piVar7;\n    return iVar3;\n  }" { (expression_statement "iVar3 = (*(code *)PTR_strlen_0012af3c)(param_1);" (assignment_expression "iVar3 = (*(code *)PTR_strlen_0012af3c)(param_1)" identifier = (call_expression "(*(code *)PTR_strlen_0012af3c)(param_1)" (parenthesized_expression "(*(code *)PTR_strlen_0012af3c)" ( (pointer_expression "*(code *)PTR_strlen_0012af3c" * (cast_expression "(code *)PTR_strlen_0012af3c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "iVar3 = (*(code *)PTR_FUN_0012a1d0)(iVar3 + 0xc);" (assignment_expression "iVar3 = (*(code *)PTR_FUN_0012a1d0)(iVar3 + 0xc)" identifier = (call_expression "(*(code *)PTR_FUN_0012a1d0)(iVar3 + 0xc)" (parenthesized_expression "(*(code *)PTR_FUN_0012a1d0)" ( (pointer_expression "*(code *)PTR_FUN_0012a1d0" * (cast_expression "(code *)PTR_FUN_0012a1d0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar3 + 0xc)" ( (binary_expression "iVar3 + 0xc" identifier + number_literal) )))) ;) (expression_statement "*piVar7 = iVar3;" (assignment_expression "*piVar7 = iVar3" (pointer_expression "*piVar7" * identifier) = identifier) ;) (expression_statement "puVar1 = PTR_strcpy_0012affc;" (assignment_expression "puVar1 = PTR_strcpy_0012affc" identifier = identifier) ;) (expression_statement "*(undefined1 *)(iVar3 + 8) = 0xff;" (assignment_expression "*(undefined1 *)(iVar3 + 8) = 0xff" (pointer_expression "*(undefined1 *)(iVar3 + 8)" * (cast_expression "(undefined1 *)(iVar3 + 8)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 8)" ( (binary_expression "iVar3 + 8" identifier + number_literal) )))) = number_literal) ;) (expression_statement "(*(code *)puVar1)(iVar3 + 10,param_1);" (call_expression "(*(code *)puVar1)(iVar3 + 10,param_1)" (parenthesized_expression "(*(code *)puVar1)" ( (pointer_expression "*(code *)puVar1" * (cast_expression "(code *)puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar3 + 10,param_1)" ( (binary_expression "iVar3 + 10" identifier + number_literal) , identifier ))) ;) (expression_statement "*(int **)(PTR_DAT_0012a178 + -0x4d38) = piVar7;" (assignment_expression "*(int **)(PTR_DAT_0012a178 + -0x4d38) = piVar7" (pointer_expression "*(int **)(PTR_DAT_0012a178 + -0x4d38)" * (cast_expression "(int **)(PTR_DAT_0012a178 + -0x4d38)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(PTR_DAT_0012a178 + -0x4d38)" ( (binary_expression "PTR_DAT_0012a178 + -0x4d38" identifier + number_literal) )))) = identifier) ;) (return_statement "return iVar3;" return identifier ;) })) (labeled_statement "LAB_0006e768:\n  *(int **)(PTR_DAT_0012a178 + -0x4d38) = piVar7;" statement_identifier : (expression_statement "*(int **)(PTR_DAT_0012a178 + -0x4d38) = piVar7;" (assignment_expression "*(int **)(PTR_DAT_0012a178 + -0x4d38) = piVar7" (pointer_expression "*(int **)(PTR_DAT_0012a178 + -0x4d38)" * (cast_expression "(int **)(PTR_DAT_0012a178 + -0x4d38)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(PTR_DAT_0012a178 + -0x4d38)" ( (binary_expression "PTR_DAT_0012a178 + -0x4d38" identifier + number_literal) )))) = identifier) ;)) (return_statement "return (int)piVar6;" return (cast_expression "(int)piVar6" ( (type_descriptor "int" primitive_type) ) identifier) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( IDENT )) * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT << LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( IDENT )) * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT & LIT)) ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + (binary_expression (parenthesized_expression ( (binary_expression IDENT + (binary_expression (parenthesized_expression ( (binary_expression (binary_expression (binary_expression IDENT / LIT) + (parenthesized_expression ( (binary_expression (binary_expression IDENT - (binary_expression IDENT / LIT)) >> LIT) ))) >> LIT) )) * LIT)) )) * LIT)) )))) ;) (for_statement for ( (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ; (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ; (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + LIT) , IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (return_statement return IDENT ;) })) (labeled_statement statement_identifier : (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;)) (return_statement return (cast_expression ( (type_descriptor TYPE) ) IDENT) ;) })))
(function_definition "int FUN_0006e6a0(byte *param_1,int param_2)\n\n{\n  undefined *puVar1;\n  uint uVar2;\n  int iVar3;\n  uint uVar4;\n  byte *pbVar5;\n  int *piVar6;\n  int *piVar7;\n  \n  uVar4 = (uint)*param_1;\n  uVar2 = uVar4 << 4;\n  if (uVar4 != 0) {\n    pbVar5 = param_1 + 1;\n    do {\n      uVar2 = uVar2 + uVar4;\n      uVar4 = (uint)*pbVar5;\n      pbVar5 = pbVar5 + 1;\n    } while (uVar4 != 0);\n    uVar2 = uVar2 & 0x7fff;\n  }\n  piVar7 = (int *)(*(int *)(PTR_DAT_0012a178 + -0x4d34) +\n                  (uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f) * 4);\n  for (piVar6 = (int *)*piVar7; piVar6 != (int *)0x0; piVar6 = (int *)*piVar6) {\n    iVar3 = (*(code *)PTR_strcmp_0012b1c8)((int)piVar6 + 10,param_1);\n    if (iVar3 == 0) goto LAB_0006e768;\n    piVar7 = piVar6;\n  }\n  piVar6 = (int *)0x0;\n  if (param_2 != 0) {\n    iVar3 = (*(code *)PTR_strlen_0012af3c)(param_1);\n    iVar3 = (*(code *)PTR_FUN_0012a1d0)(iVar3 + 0xc);\n    *piVar7 = iVar3;\n    puVar1 = PTR_strcpy_0012affc;\n    *(undefined1 *)(iVar3 + 8) = 0xff;\n    (*(code *)puVar1)(iVar3 + 10,param_1);\n    *(int **)(PTR_DAT_0012a178 + -0x4d38) = piVar7;\n    return iVar3;\n  }\nLAB_0006e768:\n  *(int **)(PTR_DAT_0012a178 + -0x4d38) = piVar7;\n  return (int)piVar6;\n}" (primitive_type "int") (function_declarator "FUN_0006e6a0(byte *param_1,int param_2)" (identifier "FUN_0006e6a0") (parameter_list "(byte *param_1,int param_2)" (( "(") (parameter_declaration "byte *param_1" (type_identifier "byte") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  undefined *puVar1;\n  uint uVar2;\n  int iVar3;\n  uint uVar4;\n  byte *pbVar5;\n  int *piVar6;\n  int *piVar7;\n  \n  uVar4 = (uint)*param_1;\n  uVar2 = uVar4 << 4;\n  if (uVar4 != 0) {\n    pbVar5 = param_1 + 1;\n    do {\n      uVar2 = uVar2 + uVar4;\n      uVar4 = (uint)*pbVar5;\n      pbVar5 = pbVar5 + 1;\n    } while (uVar4 != 0);\n    uVar2 = uVar2 & 0x7fff;\n  }\n  piVar7 = (int *)(*(int *)(PTR_DAT_0012a178 + -0x4d34) +\n                  (uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f) * 4);\n  for (piVar6 = (int *)*piVar7; piVar6 != (int *)0x0; piVar6 = (int *)*piVar6) {\n    iVar3 = (*(code *)PTR_strcmp_0012b1c8)((int)piVar6 + 10,param_1);\n    if (iVar3 == 0) goto LAB_0006e768;\n    piVar7 = piVar6;\n  }\n  piVar6 = (int *)0x0;\n  if (param_2 != 0) {\n    iVar3 = (*(code *)PTR_strlen_0012af3c)(param_1);\n    iVar3 = (*(code *)PTR_FUN_0012a1d0)(iVar3 + 0xc);\n    *piVar7 = iVar3;\n    puVar1 = PTR_strcpy_0012affc;\n    *(undefined1 *)(iVar3 + 8) = 0xff;\n    (*(code *)puVar1)(iVar3 + 10,param_1);\n    *(int **)(PTR_DAT_0012a178 + -0x4d38) = piVar7;\n    return iVar3;\n  }\nLAB_0006e768:\n  *(int **)(PTR_DAT_0012a178 + -0x4d38) = piVar7;\n  return (int)piVar6;\n}" ({ "{") (declaration "undefined *puVar1;" (type_identifier "undefined") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "uint uVar4;" (type_identifier "uint") (identifier "uVar4") (; ";")) (declaration "byte *pbVar5;" (type_identifier "byte") (pointer_declarator "*pbVar5" (* "*") (identifier "pbVar5")) (; ";")) (declaration "int *piVar6;" (primitive_type "int") (pointer_declarator "*piVar6" (* "*") (identifier "piVar6")) (; ";")) (declaration "int *piVar7;" (primitive_type "int") (pointer_declarator "*piVar7" (* "*") (identifier "piVar7")) (; ";")) (expression_statement "uVar4 = (uint)*param_1;" (assignment_expression "uVar4 = (uint)*param_1" (identifier "uVar4") (= "=") (binary_expression "(uint)*param_1" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (identifier "param_1"))) (; ";")) (expression_statement "uVar2 = uVar4 << 4;" (assignment_expression "uVar2 = uVar4 << 4" (identifier "uVar2") (= "=") (binary_expression "uVar4 << 4" (identifier "uVar4") (<< "<<") (number_literal "4"))) (; ";")) (if_statement "if (uVar4 != 0) {\n    pbVar5 = param_1 + 1;\n    do {\n      uVar2 = uVar2 + uVar4;\n      uVar4 = (uint)*pbVar5;\n      pbVar5 = pbVar5 + 1;\n    } while (uVar4 != 0);\n    uVar2 = uVar2 & 0x7fff;\n  }" (if "if") (parenthesized_expression "(uVar4 != 0)" (( "(") (binary_expression "uVar4 != 0" (identifier "uVar4") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    pbVar5 = param_1 + 1;\n    do {\n      uVar2 = uVar2 + uVar4;\n      uVar4 = (uint)*pbVar5;\n      pbVar5 = pbVar5 + 1;\n    } while (uVar4 != 0);\n    uVar2 = uVar2 & 0x7fff;\n  }" ({ "{") (expression_statement "pbVar5 = param_1 + 1;" (assignment_expression "pbVar5 = param_1 + 1" (identifier "pbVar5") (= "=") (binary_expression "param_1 + 1" (identifier "param_1") (+ "+") (number_literal "1"))) (; ";")) (do_statement "do {\n      uVar2 = uVar2 + uVar4;\n      uVar4 = (uint)*pbVar5;\n      pbVar5 = pbVar5 + 1;\n    } while (uVar4 != 0);" (do "do") (compound_statement "{\n      uVar2 = uVar2 + uVar4;\n      uVar4 = (uint)*pbVar5;\n      pbVar5 = pbVar5 + 1;\n    }" ({ "{") (expression_statement "uVar2 = uVar2 + uVar4;" (assignment_expression "uVar2 = uVar2 + uVar4" (identifier "uVar2") (= "=") (binary_expression "uVar2 + uVar4" (identifier "uVar2") (+ "+") (identifier "uVar4"))) (; ";")) (expression_statement "uVar4 = (uint)*pbVar5;" (assignment_expression "uVar4 = (uint)*pbVar5" (identifier "uVar4") (= "=") (binary_expression "(uint)*pbVar5" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (identifier "pbVar5"))) (; ";")) (expression_statement "pbVar5 = pbVar5 + 1;" (assignment_expression "pbVar5 = pbVar5 + 1" (identifier "pbVar5") (= "=") (binary_expression "pbVar5 + 1" (identifier "pbVar5") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(uVar4 != 0)" (( "(") (binary_expression "uVar4 != 0" (identifier "uVar4") (!= "!=") (number_literal "0")) () ")")) (; ";")) (expression_statement "uVar2 = uVar2 & 0x7fff;" (assignment_expression "uVar2 = uVar2 & 0x7fff" (identifier "uVar2") (= "=") (binary_expression "uVar2 & 0x7fff" (identifier "uVar2") (& "&") (number_literal "0x7fff"))) (; ";")) (} "}"))) (expression_statement "piVar7 = (int *)(*(int *)(PTR_DAT_0012a178 + -0x4d34) +\n                  (uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f) * 4);" (assignment_expression "piVar7 = (int *)(*(int *)(PTR_DAT_0012a178 + -0x4d34) +\n                  (uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f) * 4)" (identifier "piVar7") (= "=") (cast_expression "(int *)(*(int *)(PTR_DAT_0012a178 + -0x4d34) +\n                  (uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f) * 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(PTR_DAT_0012a178 + -0x4d34) +\n                  (uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f) * 4)" (( "(") (binary_expression "*(int *)(PTR_DAT_0012a178 + -0x4d34) +\n                  (uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f) * 4" (pointer_expression "*(int *)(PTR_DAT_0012a178 + -0x4d34)" (* "*") (cast_expression "(int *)(PTR_DAT_0012a178 + -0x4d34)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(PTR_DAT_0012a178 + -0x4d34)" (( "(") (binary_expression "PTR_DAT_0012a178 + -0x4d34" (identifier "PTR_DAT_0012a178") (+ "+") (number_literal "-0x4d34")) () ")")))) (+ "+") (binary_expression "(uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f) * 4" (parenthesized_expression "(uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f)" (( "(") (binary_expression "uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f" (identifier "uVar2") (+ "+") (binary_expression "(uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f" (parenthesized_expression "(uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4)" (( "(") (binary_expression "uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4" (binary_expression "uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1)" (binary_expression "uVar2 / 0x1f" (identifier "uVar2") (/ "/") (number_literal "0x1f")) (+ "+") (parenthesized_expression "(uVar2 - uVar2 / 0x1f >> 1)" (( "(") (binary_expression "uVar2 - uVar2 / 0x1f >> 1" (binary_expression "uVar2 - uVar2 / 0x1f" (identifier "uVar2") (- "-") (binary_expression "uVar2 / 0x1f" (identifier "uVar2") (/ "/") (number_literal "0x1f"))) (>> ">>") (number_literal "1")) () ")"))) (>> ">>") (number_literal "4")) () ")")) (* "*") (number_literal "-0x1f"))) () ")")) (* "*") (number_literal "4"))) () ")")))) (; ";")) (for_statement "for (piVar6 = (int *)*piVar7; piVar6 != (int *)0x0; piVar6 = (int *)*piVar6) {\n    iVar3 = (*(code *)PTR_strcmp_0012b1c8)((int)piVar6 + 10,param_1);\n    if (iVar3 == 0) goto LAB_0006e768;\n    piVar7 = piVar6;\n  }" (for "for") (( "(") (assignment_expression "piVar6 = (int *)*piVar7" (identifier "piVar6") (= "=") (cast_expression "(int *)*piVar7" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*piVar7" (* "*") (identifier "piVar7")))) (; ";") (binary_expression "piVar6 != (int *)0x0" (identifier "piVar6") (!= "!=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";") (assignment_expression "piVar6 = (int *)*piVar6" (identifier "piVar6") (= "=") (cast_expression "(int *)*piVar6" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*piVar6" (* "*") (identifier "piVar6")))) () ")") (compound_statement "{\n    iVar3 = (*(code *)PTR_strcmp_0012b1c8)((int)piVar6 + 10,param_1);\n    if (iVar3 == 0) goto LAB_0006e768;\n    piVar7 = piVar6;\n  }" ({ "{") (expression_statement "iVar3 = (*(code *)PTR_strcmp_0012b1c8)((int)piVar6 + 10,param_1);" (assignment_expression "iVar3 = (*(code *)PTR_strcmp_0012b1c8)((int)piVar6 + 10,param_1)" (identifier "iVar3") (= "=") (call_expression "(*(code *)PTR_strcmp_0012b1c8)((int)piVar6 + 10,param_1)" (parenthesized_expression "(*(code *)PTR_strcmp_0012b1c8)" (( "(") (pointer_expression "*(code *)PTR_strcmp_0012b1c8" (* "*") (cast_expression "(code *)PTR_strcmp_0012b1c8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_strcmp_0012b1c8"))) () ")")) (argument_list "((int)piVar6 + 10,param_1)" (( "(") (binary_expression "(int)piVar6 + 10" (cast_expression "(int)piVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "piVar6")) (+ "+") (number_literal "10")) (, ",") (identifier "param_1") () ")")))) (; ";")) (if_statement "if (iVar3 == 0) goto LAB_0006e768;" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_0006e768;" (goto "goto") (statement_identifier "LAB_0006e768") (; ";"))) (expression_statement "piVar7 = piVar6;" (assignment_expression "piVar7 = piVar6" (identifier "piVar7") (= "=") (identifier "piVar6")) (; ";")) (} "}"))) (expression_statement "piVar6 = (int *)0x0;" (assignment_expression "piVar6 = (int *)0x0" (identifier "piVar6") (= "=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (if_statement "if (param_2 != 0) {\n    iVar3 = (*(code *)PTR_strlen_0012af3c)(param_1);\n    iVar3 = (*(code *)PTR_FUN_0012a1d0)(iVar3 + 0xc);\n    *piVar7 = iVar3;\n    puVar1 = PTR_strcpy_0012affc;\n    *(undefined1 *)(iVar3 + 8) = 0xff;\n    (*(code *)puVar1)(iVar3 + 10,param_1);\n    *(int **)(PTR_DAT_0012a178 + -0x4d38) = piVar7;\n    return iVar3;\n  }" (if "if") (parenthesized_expression "(param_2 != 0)" (( "(") (binary_expression "param_2 != 0" (identifier "param_2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    iVar3 = (*(code *)PTR_strlen_0012af3c)(param_1);\n    iVar3 = (*(code *)PTR_FUN_0012a1d0)(iVar3 + 0xc);\n    *piVar7 = iVar3;\n    puVar1 = PTR_strcpy_0012affc;\n    *(undefined1 *)(iVar3 + 8) = 0xff;\n    (*(code *)puVar1)(iVar3 + 10,param_1);\n    *(int **)(PTR_DAT_0012a178 + -0x4d38) = piVar7;\n    return iVar3;\n  }" ({ "{") (expression_statement "iVar3 = (*(code *)PTR_strlen_0012af3c)(param_1);" (assignment_expression "iVar3 = (*(code *)PTR_strlen_0012af3c)(param_1)" (identifier "iVar3") (= "=") (call_expression "(*(code *)PTR_strlen_0012af3c)(param_1)" (parenthesized_expression "(*(code *)PTR_strlen_0012af3c)" (( "(") (pointer_expression "*(code *)PTR_strlen_0012af3c" (* "*") (cast_expression "(code *)PTR_strlen_0012af3c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_strlen_0012af3c"))) () ")")) (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (expression_statement "iVar3 = (*(code *)PTR_FUN_0012a1d0)(iVar3 + 0xc);" (assignment_expression "iVar3 = (*(code *)PTR_FUN_0012a1d0)(iVar3 + 0xc)" (identifier "iVar3") (= "=") (call_expression "(*(code *)PTR_FUN_0012a1d0)(iVar3 + 0xc)" (parenthesized_expression "(*(code *)PTR_FUN_0012a1d0)" (( "(") (pointer_expression "*(code *)PTR_FUN_0012a1d0" (* "*") (cast_expression "(code *)PTR_FUN_0012a1d0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_FUN_0012a1d0"))) () ")")) (argument_list "(iVar3 + 0xc)" (( "(") (binary_expression "iVar3 + 0xc" (identifier "iVar3") (+ "+") (number_literal "0xc")) () ")")))) (; ";")) (expression_statement "*piVar7 = iVar3;" (assignment_expression "*piVar7 = iVar3" (pointer_expression "*piVar7" (* "*") (identifier "piVar7")) (= "=") (identifier "iVar3")) (; ";")) (expression_statement "puVar1 = PTR_strcpy_0012affc;" (assignment_expression "puVar1 = PTR_strcpy_0012affc" (identifier "puVar1") (= "=") (identifier "PTR_strcpy_0012affc")) (; ";")) (expression_statement "*(undefined1 *)(iVar3 + 8) = 0xff;" (assignment_expression "*(undefined1 *)(iVar3 + 8) = 0xff" (pointer_expression "*(undefined1 *)(iVar3 + 8)" (* "*") (cast_expression "(undefined1 *)(iVar3 + 8)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 8)" (( "(") (binary_expression "iVar3 + 8" (identifier "iVar3") (+ "+") (number_literal "8")) () ")")))) (= "=") (number_literal "0xff")) (; ";")) (expression_statement "(*(code *)puVar1)(iVar3 + 10,param_1);" (call_expression "(*(code *)puVar1)(iVar3 + 10,param_1)" (parenthesized_expression "(*(code *)puVar1)" (( "(") (pointer_expression "*(code *)puVar1" (* "*") (cast_expression "(code *)puVar1" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar1"))) () ")")) (argument_list "(iVar3 + 10,param_1)" (( "(") (binary_expression "iVar3 + 10" (identifier "iVar3") (+ "+") (number_literal "10")) (, ",") (identifier "param_1") () ")"))) (; ";")) (expression_statement "*(int **)(PTR_DAT_0012a178 + -0x4d38) = piVar7;" (assignment_expression "*(int **)(PTR_DAT_0012a178 + -0x4d38) = piVar7" (pointer_expression "*(int **)(PTR_DAT_0012a178 + -0x4d38)" (* "*") (cast_expression "(int **)(PTR_DAT_0012a178 + -0x4d38)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(PTR_DAT_0012a178 + -0x4d38)" (( "(") (binary_expression "PTR_DAT_0012a178 + -0x4d38" (identifier "PTR_DAT_0012a178") (+ "+") (number_literal "-0x4d38")) () ")")))) (= "=") (identifier "piVar7")) (; ";")) (return_statement "return iVar3;" (return "return") (identifier "iVar3") (; ";")) (} "}"))) (labeled_statement "LAB_0006e768:\n  *(int **)(PTR_DAT_0012a178 + -0x4d38) = piVar7;" (statement_identifier "LAB_0006e768") (: ":") (expression_statement "*(int **)(PTR_DAT_0012a178 + -0x4d38) = piVar7;" (assignment_expression "*(int **)(PTR_DAT_0012a178 + -0x4d38) = piVar7" (pointer_expression "*(int **)(PTR_DAT_0012a178 + -0x4d38)" (* "*") (cast_expression "(int **)(PTR_DAT_0012a178 + -0x4d38)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(PTR_DAT_0012a178 + -0x4d38)" (( "(") (binary_expression "PTR_DAT_0012a178 + -0x4d38" (identifier "PTR_DAT_0012a178") (+ "+") (number_literal "-0x4d38")) () ")")))) (= "=") (identifier "piVar7")) (; ";"))) (return_statement "return (int)piVar6;" (return "return") (cast_expression "(int)piVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "piVar6")) (; ";")) (} "}")))

type_1 * function_1(char *var_1,int var_8)

{
  type_2 *puVar1;
  type_3 var_3;
  int var_7;
  type_3 var_2;
  type_4 *var_4;
  type_1 *var_6;
  type_1 *ptVar7;
  
  var_2 = (type_3)(type_4)*var_1;
  var_3 = var_2 << 4;
  if (var_2 != 0) {
    var_4 = (type_4 *)(var_1 + 1);
    do {
      var_3 = var_3 + var_2;
      var_2 = (type_3)*var_4;
      var_4 = var_4 + 1;
    } while (var_2 != 0);
    var_3 = var_3 & 0x7fff;
  }
  ptVar7 = (type_1 *)
           (*(int *)(var_5 + -0x4d34) +
           (var_3 + (var_3 / 0x1f + (var_3 - var_3 / 0x1f >> 1) >> 4) * -0x1f) * 4);
  for (var_6 = ptVar7->next; var_6 != (type_1 *)0x0; var_6 = var_6->next) {
    var_7 = (*(type_5 *)PTR_strcmp_0012b1c8)(var_6->cmdname,var_1);
    if (var_7 == 0) goto LAB_0006e768;
    ptVar7 = var_6;
  }
  var_6 = (type_1 *)0x0;
  if (var_8 != 0) {
    var_7 = (*(type_5 *)PTR_strlen_0012af3c)(var_1);
    var_6 = (type_1 *)(*(type_5 *)PTR_xzalloc_0012a1d0)(var_7 + 0xc);
    ptVar7->next = var_6;
    puVar1 = PTR_strcpy_0012affc;
    var_6->cmdtype = -1;
    (*(type_5 *)puVar1)(var_6->cmdname,var_1);
    *(type_1 **)(var_5 + -0x4d38) = ptVar7;
    return var_6;
  }
LAB_0006e768:
  *(type_1 **)(var_5 + -0x4d38) = ptVar7;
  return var_6;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (identifier)) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (identifier)) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))) right: (number_literal)))) right: (number_literal))) right: (number_literal)))) right: (number_literal))))))) (for_statement initializer: (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier)))) condition: (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal))) update: (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier)))) body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal)) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (goto_statement label: (statement_identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)) (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (return_statement (identifier)))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier)))) (return_statement (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))))))

int MASKED(byte *param_1,int param_2)

{
  undefined *puVar1;
  uint uVar2;
  int iVar3;
  uint uVar4;
  byte *pbVar5;
  int *piVar6;
  int *piVar7;
  
  uVar4 = (uint)*param_1;
  uVar2 = uVar4 << 4;
  if (uVar4 != 0) {
    pbVar5 = param_1 + 1;
    do {
      uVar2 = uVar2 + uVar4;
      uVar4 = (uint)*pbVar5;
      pbVar5 = pbVar5 + 1;
    } while (uVar4 != 0);
    uVar2 = uVar2 & 0x7fff;
  }
  piVar7 = (int *)(*(int *)(PTR_DAT_0012a178 + -0x4d34) +
                  (uVar2 + (uVar2 / 0x1f + (uVar2 - uVar2 / 0x1f >> 1) >> 4) * -0x1f) * 4);
  for (piVar6 = (int *)*piVar7; piVar6 != (int *)0x0; piVar6 = (int *)*piVar6) {
    iVar3 = (*(code *)PTR_strcmp_0012b1c8)((int)piVar6 + 10,param_1);
    if (iVar3 == 0) goto LAB_0006e768;
    piVar7 = piVar6;
  }
  piVar6 = (int *)0x0;
  if (param_2 != 0) {
    iVar3 = (*(code *)PTR_strlen_0012af3c)(param_1);
    iVar3 = (*(code *)PTR_FUN_0012a1d0)(iVar3 + 0xc);
    *piVar7 = iVar3;
    puVar1 = PTR_strcpy_0012affc;
    *(undefined1 *)(iVar3 + 8) = 0xff;
    (*(code *)puVar1)(iVar3 + 10,param_1);
    *(int **)(PTR_DAT_0012a178 + -0x4d38) = piVar7;
    return iVar3;
  }
LAB_0006e768:
  *(int **)(PTR_DAT_0012a178 + -0x4d38) = piVar7;
  return (int)piVar6;
}

