
int __frame_state_for(int param_1,int param_2)

{
  char cVar1;
  undefined4 uVar2;
  int iVar3;
  undefined4 *puVar4;
  char *pcVar5;
  char *pcVar6;
  char local_a00 [7];
  char local_9f9 [1509];
  undefined4 local_414;
  undefined2 uStack_40e;
  int local_408;
  undefined2 uStack_3f2;
  undefined4 local_3ec;
  undefined1 auStack_3e8 [760];
  int local_f0;
  undefined4 local_dc;
  undefined4 local_d4;
  
  uVar2 = (*(code *)PTR_memset_00436850)(auStack_3e8,0,0x3d8);
  pcVar6 = local_a00;
  local_f0 = param_1 + 1;
  local_dc = 0x40000000;
  iVar3 = uw_frame_state_for(uVar2,pcVar6);
  if ((iVar3 != 0) || (pcVar5 = (char *)(param_2 + 0x308), local_408 == 2)) {
    return 0;
  }
  puVar4 = (undefined4 *)(param_2 + 0x10);
  do {
    while( true ) {
      cVar1 = pcVar6[7];
      *pcVar5 = cVar1;
      if ((cVar1 != '\x01') && (cVar1 != '\x02')) break;
      uVar2 = *(undefined4 *)pcVar6;
      pcVar6 = pcVar6 + 8;
      pcVar5 = pcVar5 + 1;
      *puVar4 = uVar2;
      puVar4 = puVar4 + 1;
      if (pcVar6 == local_9f9 + 0x5e1) goto LAB_003709f4;
    }
    pcVar6 = pcVar6 + 8;
    *puVar4 = 0;
    pcVar5 = pcVar5 + 1;
    puVar4 = puVar4 + 1;
  } while (pcVar6 != local_9f9 + 0x5e1);
LAB_003709f4:
  *(undefined4 *)(param_2 + 8) = local_414;
  *(undefined2 *)(param_2 + 0x304) = uStack_40e;
  *(undefined2 *)(param_2 + 0x306) = uStack_3f2;
  *(undefined4 *)(param_2 + 0xc) = local_d4;
  *(undefined4 *)(param_2 + 4) = local_3ec;
  return param_2;
}



int FUN_00370914(int param_1,int param_2)

{
  char cVar1;
  undefined4 uVar2;
  int iVar3;
  undefined4 *puVar4;
  char *pcVar5;
  char *pcVar6;
  char local_a00 [7];
  char local_9f9 [1509];
  undefined4 local_414;
  undefined2 uStack_40e;
  int local_408;
  undefined2 uStack_3f2;
  undefined4 local_3ec;
  undefined1 auStack_3e8 [760];
  int local_f0;
  undefined4 local_dc;
  undefined4 local_d4;
  
  uVar2 = (*(code *)PTR_memset_00436850)(auStack_3e8,0,0x3d8);
  pcVar6 = local_a00;
  local_f0 = param_1 + 1;
  local_dc = 0x40000000;
  iVar3 = FUN_0036e7d0(uVar2,pcVar6);
  if ((iVar3 != 0) || (pcVar5 = (char *)(param_2 + 0x308), local_408 == 2)) {
    return 0;
  }
  puVar4 = (undefined4 *)(param_2 + 0x10);
  do {
    while( true ) {
      cVar1 = pcVar6[7];
      *pcVar5 = cVar1;
      if ((cVar1 != '\x01') && (cVar1 != '\x02')) break;
      uVar2 = *(undefined4 *)pcVar6;
      pcVar6 = pcVar6 + 8;
      pcVar5 = pcVar5 + 1;
      *puVar4 = uVar2;
      puVar4 = puVar4 + 1;
      if (pcVar6 == local_9f9 + 0x5e1) goto LAB_003709f4;
    }
    pcVar6 = pcVar6 + 8;
    *puVar4 = 0;
    pcVar5 = pcVar5 + 1;
    puVar4 = puVar4 + 1;
  } while (pcVar6 != local_9f9 + 0x5e1);
LAB_003709f4:
  *(undefined4 *)(param_2 + 8) = local_414;
  *(undefined2 *)(param_2 + 0x304) = uStack_40e;
  *(undefined2 *)(param_2 + 0x306) = uStack_3f2;
  *(undefined4 *)(param_2 + 0xc) = local_d4;
  *(undefined4 *)(param_2 + 4) = local_3ec;
  return param_2;
}


lui gp,0xd
addiu gp,gp,-0x6744
addu gp,gp,t9
addiu sp,sp,-0xa18
lw t9,-0x3980(gp)
li a2,0x3d8
addiu v1,sp,0x630
sw s1,0xa0c(sp)
or s1,a1,zero
or a1,zero,zero
sw gp,0x10(sp)
sw ra,0xa14(sp)
sw s2,0xa10(sp)
or s2,a0,zero
sw s0,0xa08(sp)
jalr t9
_or a0,v1,zero
addiu s0,sp,0x18
lw gp,0x10(sp)
or v1,v0,zero
addiu s2,s2,0x1
lui v0,0x4000
or a1,s0,zero
sw s2,0x928(sp)
sw v0,0x93c(sp)
lw t9,-0x7fc4(gp)
addiu t9,t9,-0x1830
bal 0x0036e7d0
_or a0,v1,zero
bne v0,zero,0x00370a38
_lw v1,0x610(sp)
li v0,0x2
beq v1,v0,0x00370a38
_addiu a0,s1,0x308
addiu v1,s1,0x10
addiu t0,sp,0x600
li a3,0x1
li a2,0x2
b 0x003709c8
_or a1,s0,zero
addiu a1,a1,0x8
sw zero,0x0(v1)
addiu a0,a0,0x1
beq a1,t0,0x003709f4
_addiu v1,v1,0x4
lb v0,0x7(a1)
beq v0,a3,0x003709dc
_sb v0,0x0(a0)
bne v0,a2,0x003709b4
_nop
lw v0,0x0(a1)
addiu a1,a1,0x8
addiu a0,a0,0x1
addiu v1,v1,0x4
bne a1,t0,0x003709c8
_sw v0,-0x4(v1)
lw v1,0x604(sp)
or v0,s1,zero
lw ra,0xa14(sp)
lw s2,0xa10(sp)
sw v1,0x8(s1)
lw v1,0x608(sp)
lw s0,0xa08(sp)
sh v1,0x304(s1)
lw v1,0x624(sp)
sh v1,0x306(s1)
lw v1,0x944(sp)
sw v1,0xc(s1)
lw v1,0x62c(sp)
sw v1,0x4(s1)
lw s1,0xa0c(sp)
jr ra
_addiu sp,sp,0xa18
lw ra,0xa14(sp)
or v0,zero,zero
lw s2,0xa10(sp)
lw s1,0xa0c(sp)
lw s0,0xa08(sp)
jr ra
_addiu sp,sp,0xa18
(translation_unit "int FUN_00370914(int param_1,int param_2)\n\n{\n  char cVar1;\n  undefined4 uVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  char *pcVar5;\n  char *pcVar6;\n  char local_a00 [7];\n  char local_9f9 [1509];\n  undefined4 local_414;\n  undefined2 uStack_40e;\n  int local_408;\n  undefined2 uStack_3f2;\n  undefined4 local_3ec;\n  undefined1 auStack_3e8 [760];\n  int local_f0;\n  undefined4 local_dc;\n  undefined4 local_d4;\n  \n  uVar2 = (*(code *)PTR_memset_00436850)(auStack_3e8,0,0x3d8);\n  pcVar6 = local_a00;\n  local_f0 = param_1 + 1;\n  local_dc = 0x40000000;\n  iVar3 = FUN_0036e7d0(uVar2,pcVar6);\n  if ((iVar3 != 0) || (pcVar5 = (char *)(param_2 + 0x308), local_408 == 2)) {\n    return 0;\n  }\n  puVar4 = (undefined4 *)(param_2 + 0x10);\n  do {\n    while( true ) {\n      cVar1 = pcVar6[7];\n      *pcVar5 = cVar1;\n      if ((cVar1 != '\x01') && (cVar1 != '\x02')) break;\n      uVar2 = *(undefined4 *)pcVar6;\n      pcVar6 = pcVar6 + 8;\n      pcVar5 = pcVar5 + 1;\n      *puVar4 = uVar2;\n      puVar4 = puVar4 + 1;\n      if (pcVar6 == local_9f9 + 0x5e1) goto LAB_003709f4;\n    }\n    pcVar6 = pcVar6 + 8;\n    *puVar4 = 0;\n    pcVar5 = pcVar5 + 1;\n    puVar4 = puVar4 + 1;\n  } while (pcVar6 != local_9f9 + 0x5e1);\nLAB_003709f4:\n  *(undefined4 *)(param_2 + 8) = local_414;\n  *(undefined2 *)(param_2 + 0x304) = uStack_40e;\n  *(undefined2 *)(param_2 + 0x306) = uStack_3f2;\n  *(undefined4 *)(param_2 + 0xc) = local_d4;\n  *(undefined4 *)(param_2 + 4) = local_3ec;\n  return param_2;\n}\n\n" (function_definition "int FUN_00370914(int param_1,int param_2)\n\n{\n  char cVar1;\n  undefined4 uVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  char *pcVar5;\n  char *pcVar6;\n  char local_a00 [7];\n  char local_9f9 [1509];\n  undefined4 local_414;\n  undefined2 uStack_40e;\n  int local_408;\n  undefined2 uStack_3f2;\n  undefined4 local_3ec;\n  undefined1 auStack_3e8 [760];\n  int local_f0;\n  undefined4 local_dc;\n  undefined4 local_d4;\n  \n  uVar2 = (*(code *)PTR_memset_00436850)(auStack_3e8,0,0x3d8);\n  pcVar6 = local_a00;\n  local_f0 = param_1 + 1;\n  local_dc = 0x40000000;\n  iVar3 = FUN_0036e7d0(uVar2,pcVar6);\n  if ((iVar3 != 0) || (pcVar5 = (char *)(param_2 + 0x308), local_408 == 2)) {\n    return 0;\n  }\n  puVar4 = (undefined4 *)(param_2 + 0x10);\n  do {\n    while( true ) {\n      cVar1 = pcVar6[7];\n      *pcVar5 = cVar1;\n      if ((cVar1 != '\x01') && (cVar1 != '\x02')) break;\n      uVar2 = *(undefined4 *)pcVar6;\n      pcVar6 = pcVar6 + 8;\n      pcVar5 = pcVar5 + 1;\n      *puVar4 = uVar2;\n      puVar4 = puVar4 + 1;\n      if (pcVar6 == local_9f9 + 0x5e1) goto LAB_003709f4;\n    }\n    pcVar6 = pcVar6 + 8;\n    *puVar4 = 0;\n    pcVar5 = pcVar5 + 1;\n    puVar4 = puVar4 + 1;\n  } while (pcVar6 != local_9f9 + 0x5e1);\nLAB_003709f4:\n  *(undefined4 *)(param_2 + 8) = local_414;\n  *(undefined2 *)(param_2 + 0x304) = uStack_40e;\n  *(undefined2 *)(param_2 + 0x306) = uStack_3f2;\n  *(undefined4 *)(param_2 + 0xc) = local_d4;\n  *(undefined4 *)(param_2 + 4) = local_3ec;\n  return param_2;\n}" primitive_type (function_declarator "FUN_00370914(int param_1,int param_2)" identifier (parameter_list "(int param_1,int param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  char cVar1;\n  undefined4 uVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  char *pcVar5;\n  char *pcVar6;\n  char local_a00 [7];\n  char local_9f9 [1509];\n  undefined4 local_414;\n  undefined2 uStack_40e;\n  int local_408;\n  undefined2 uStack_3f2;\n  undefined4 local_3ec;\n  undefined1 auStack_3e8 [760];\n  int local_f0;\n  undefined4 local_dc;\n  undefined4 local_d4;\n  \n  uVar2 = (*(code *)PTR_memset_00436850)(auStack_3e8,0,0x3d8);\n  pcVar6 = local_a00;\n  local_f0 = param_1 + 1;\n  local_dc = 0x40000000;\n  iVar3 = FUN_0036e7d0(uVar2,pcVar6);\n  if ((iVar3 != 0) || (pcVar5 = (char *)(param_2 + 0x308), local_408 == 2)) {\n    return 0;\n  }\n  puVar4 = (undefined4 *)(param_2 + 0x10);\n  do {\n    while( true ) {\n      cVar1 = pcVar6[7];\n      *pcVar5 = cVar1;\n      if ((cVar1 != '\x01') && (cVar1 != '\x02')) break;\n      uVar2 = *(undefined4 *)pcVar6;\n      pcVar6 = pcVar6 + 8;\n      pcVar5 = pcVar5 + 1;\n      *puVar4 = uVar2;\n      puVar4 = puVar4 + 1;\n      if (pcVar6 == local_9f9 + 0x5e1) goto LAB_003709f4;\n    }\n    pcVar6 = pcVar6 + 8;\n    *puVar4 = 0;\n    pcVar5 = pcVar5 + 1;\n    puVar4 = puVar4 + 1;\n  } while (pcVar6 != local_9f9 + 0x5e1);\nLAB_003709f4:\n  *(undefined4 *)(param_2 + 8) = local_414;\n  *(undefined2 *)(param_2 + 0x304) = uStack_40e;\n  *(undefined2 *)(param_2 + 0x306) = uStack_3f2;\n  *(undefined4 *)(param_2 + 0xc) = local_d4;\n  *(undefined4 *)(param_2 + 4) = local_3ec;\n  return param_2;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "char *pcVar5;" primitive_type (pointer_declarator "*pcVar5" * identifier) ;) (declaration "char *pcVar6;" primitive_type (pointer_declarator "*pcVar6" * identifier) ;) (declaration "char local_a00 [7];" primitive_type (array_declarator "local_a00 [7]" identifier [ number_literal ]) ;) (declaration "char local_9f9 [1509];" primitive_type (array_declarator "local_9f9 [1509]" identifier [ number_literal ]) ;) (declaration "undefined4 local_414;" type_identifier identifier ;) (declaration "undefined2 uStack_40e;" type_identifier identifier ;) (declaration "int local_408;" primitive_type identifier ;) (declaration "undefined2 uStack_3f2;" type_identifier identifier ;) (declaration "undefined4 local_3ec;" type_identifier identifier ;) (declaration "undefined1 auStack_3e8 [760];" type_identifier (array_declarator "auStack_3e8 [760]" identifier [ number_literal ]) ;) (declaration "int local_f0;" primitive_type identifier ;) (declaration "undefined4 local_dc;" type_identifier identifier ;) (declaration "undefined4 local_d4;" type_identifier identifier ;) (expression_statement "uVar2 = (*(code *)PTR_memset_00436850)(auStack_3e8,0,0x3d8);" (assignment_expression "uVar2 = (*(code *)PTR_memset_00436850)(auStack_3e8,0,0x3d8)" identifier = (call_expression "(*(code *)PTR_memset_00436850)(auStack_3e8,0,0x3d8)" (parenthesized_expression "(*(code *)PTR_memset_00436850)" ( (pointer_expression "*(code *)PTR_memset_00436850" * (cast_expression "(code *)PTR_memset_00436850" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(auStack_3e8,0,0x3d8)" ( identifier , number_literal , number_literal )))) ;) (expression_statement "pcVar6 = local_a00;" (assignment_expression "pcVar6 = local_a00" identifier = identifier) ;) (expression_statement "local_f0 = param_1 + 1;" (assignment_expression "local_f0 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) (expression_statement "local_dc = 0x40000000;" (assignment_expression "local_dc = 0x40000000" identifier = number_literal) ;) (expression_statement "iVar3 = FUN_0036e7d0(uVar2,pcVar6);" (assignment_expression "iVar3 = FUN_0036e7d0(uVar2,pcVar6)" identifier = (call_expression "FUN_0036e7d0(uVar2,pcVar6)" identifier (argument_list "(uVar2,pcVar6)" ( identifier , identifier )))) ;) (if_statement "if ((iVar3 != 0) || (pcVar5 = (char *)(param_2 + 0x308), local_408 == 2)) {\n    return 0;\n  }" if (parenthesized_expression "((iVar3 != 0) || (pcVar5 = (char *)(param_2 + 0x308), local_408 == 2))" ( (binary_expression "(iVar3 != 0) || (pcVar5 = (char *)(param_2 + 0x308), local_408 == 2)" (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) || (parenthesized_expression "(pcVar5 = (char *)(param_2 + 0x308), local_408 == 2)" ( (comma_expression "pcVar5 = (char *)(param_2 + 0x308), local_408 == 2" (assignment_expression "pcVar5 = (char *)(param_2 + 0x308)" identifier = (cast_expression "(char *)(param_2 + 0x308)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x308)" ( (binary_expression "param_2 + 0x308" identifier + number_literal) )))) , (binary_expression "local_408 == 2" identifier == number_literal)) ))) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "puVar4 = (undefined4 *)(param_2 + 0x10);" (assignment_expression "puVar4 = (undefined4 *)(param_2 + 0x10)" identifier = (cast_expression "(undefined4 *)(param_2 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x10)" ( (binary_expression "param_2 + 0x10" identifier + number_literal) )))) ;) (do_statement "do {\n    while( true ) {\n      cVar1 = pcVar6[7];\n      *pcVar5 = cVar1;\n      if ((cVar1 != '\x01') && (cVar1 != '\x02')) break;\n      uVar2 = *(undefined4 *)pcVar6;\n      pcVar6 = pcVar6 + 8;\n      pcVar5 = pcVar5 + 1;\n      *puVar4 = uVar2;\n      puVar4 = puVar4 + 1;\n      if (pcVar6 == local_9f9 + 0x5e1) goto LAB_003709f4;\n    }\n    pcVar6 = pcVar6 + 8;\n    *puVar4 = 0;\n    pcVar5 = pcVar5 + 1;\n    puVar4 = puVar4 + 1;\n  } while (pcVar6 != local_9f9 + 0x5e1);" do (compound_statement "{\n    while( true ) {\n      cVar1 = pcVar6[7];\n      *pcVar5 = cVar1;\n      if ((cVar1 != '\x01') && (cVar1 != '\x02')) break;\n      uVar2 = *(undefined4 *)pcVar6;\n      pcVar6 = pcVar6 + 8;\n      pcVar5 = pcVar5 + 1;\n      *puVar4 = uVar2;\n      puVar4 = puVar4 + 1;\n      if (pcVar6 == local_9f9 + 0x5e1) goto LAB_003709f4;\n    }\n    pcVar6 = pcVar6 + 8;\n    *puVar4 = 0;\n    pcVar5 = pcVar5 + 1;\n    puVar4 = puVar4 + 1;\n  }" { (while_statement "while( true ) {\n      cVar1 = pcVar6[7];\n      *pcVar5 = cVar1;\n      if ((cVar1 != '\x01') && (cVar1 != '\x02')) break;\n      uVar2 = *(undefined4 *)pcVar6;\n      pcVar6 = pcVar6 + 8;\n      pcVar5 = pcVar5 + 1;\n      *puVar4 = uVar2;\n      puVar4 = puVar4 + 1;\n      if (pcVar6 == local_9f9 + 0x5e1) goto LAB_003709f4;\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      cVar1 = pcVar6[7];\n      *pcVar5 = cVar1;\n      if ((cVar1 != '\x01') && (cVar1 != '\x02')) break;\n      uVar2 = *(undefined4 *)pcVar6;\n      pcVar6 = pcVar6 + 8;\n      pcVar5 = pcVar5 + 1;\n      *puVar4 = uVar2;\n      puVar4 = puVar4 + 1;\n      if (pcVar6 == local_9f9 + 0x5e1) goto LAB_003709f4;\n    }" { (expression_statement "cVar1 = pcVar6[7];" (assignment_expression "cVar1 = pcVar6[7]" identifier = (subscript_expression "pcVar6[7]" identifier [ number_literal ])) ;) (expression_statement "*pcVar5 = cVar1;" (assignment_expression "*pcVar5 = cVar1" (pointer_expression "*pcVar5" * identifier) = identifier) ;) (if_statement "if ((cVar1 != '\x01') && (cVar1 != '\x02')) break;" if (parenthesized_expression "((cVar1 != '\x01') && (cVar1 != '\x02'))" ( (binary_expression "(cVar1 != '\x01') && (cVar1 != '\x02')" (parenthesized_expression "(cVar1 != '\x01')" ( (binary_expression "cVar1 != '\x01'" identifier != (char_literal "'\x01'" ' escape_sequence ')) )) && (parenthesized_expression "(cVar1 != '\x02')" ( (binary_expression "cVar1 != '\x02'" identifier != (char_literal "'\x02'" ' escape_sequence ')) ))) )) (break_statement "break;" break ;)) (expression_statement "uVar2 = *(undefined4 *)pcVar6;" (assignment_expression "uVar2 = *(undefined4 *)pcVar6" identifier = (pointer_expression "*(undefined4 *)pcVar6" * (cast_expression "(undefined4 *)pcVar6" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "pcVar6 = pcVar6 + 8;" (assignment_expression "pcVar6 = pcVar6 + 8" identifier = (binary_expression "pcVar6 + 8" identifier + number_literal)) ;) (expression_statement "pcVar5 = pcVar5 + 1;" (assignment_expression "pcVar5 = pcVar5 + 1" identifier = (binary_expression "pcVar5 + 1" identifier + number_literal)) ;) (expression_statement "*puVar4 = uVar2;" (assignment_expression "*puVar4 = uVar2" (pointer_expression "*puVar4" * identifier) = identifier) ;) (expression_statement "puVar4 = puVar4 + 1;" (assignment_expression "puVar4 = puVar4 + 1" identifier = (binary_expression "puVar4 + 1" identifier + number_literal)) ;) (if_statement "if (pcVar6 == local_9f9 + 0x5e1) goto LAB_003709f4;" if (parenthesized_expression "(pcVar6 == local_9f9 + 0x5e1)" ( (binary_expression "pcVar6 == local_9f9 + 0x5e1" identifier == (binary_expression "local_9f9 + 0x5e1" identifier + number_literal)) )) (goto_statement "goto LAB_003709f4;" goto statement_identifier ;)) })) (expression_statement "pcVar6 = pcVar6 + 8;" (assignment_expression "pcVar6 = pcVar6 + 8" identifier = (binary_expression "pcVar6 + 8" identifier + number_literal)) ;) (expression_statement "*puVar4 = 0;" (assignment_expression "*puVar4 = 0" (pointer_expression "*puVar4" * identifier) = number_literal) ;) (expression_statement "pcVar5 = pcVar5 + 1;" (assignment_expression "pcVar5 = pcVar5 + 1" identifier = (binary_expression "pcVar5 + 1" identifier + number_literal)) ;) (expression_statement "puVar4 = puVar4 + 1;" (assignment_expression "puVar4 = puVar4 + 1" identifier = (binary_expression "puVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(pcVar6 != local_9f9 + 0x5e1)" ( (binary_expression "pcVar6 != local_9f9 + 0x5e1" identifier != (binary_expression "local_9f9 + 0x5e1" identifier + number_literal)) )) ;) (labeled_statement "LAB_003709f4:\n  *(undefined4 *)(param_2 + 8) = local_414;" statement_identifier : (expression_statement "*(undefined4 *)(param_2 + 8) = local_414;" (assignment_expression "*(undefined4 *)(param_2 + 8) = local_414" (pointer_expression "*(undefined4 *)(param_2 + 8)" * (cast_expression "(undefined4 *)(param_2 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) )))) = identifier) ;)) (expression_statement "*(undefined2 *)(param_2 + 0x304) = uStack_40e;" (assignment_expression "*(undefined2 *)(param_2 + 0x304) = uStack_40e" (pointer_expression "*(undefined2 *)(param_2 + 0x304)" * (cast_expression "(undefined2 *)(param_2 + 0x304)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x304)" ( (binary_expression "param_2 + 0x304" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined2 *)(param_2 + 0x306) = uStack_3f2;" (assignment_expression "*(undefined2 *)(param_2 + 0x306) = uStack_3f2" (pointer_expression "*(undefined2 *)(param_2 + 0x306)" * (cast_expression "(undefined2 *)(param_2 + 0x306)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x306)" ( (binary_expression "param_2 + 0x306" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(param_2 + 0xc) = local_d4;" (assignment_expression "*(undefined4 *)(param_2 + 0xc) = local_d4" (pointer_expression "*(undefined4 *)(param_2 + 0xc)" * (cast_expression "(undefined4 *)(param_2 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0xc)" ( (binary_expression "param_2 + 0xc" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(param_2 + 4) = local_3ec;" (assignment_expression "*(undefined4 *)(param_2 + 4) = local_3ec" (pointer_expression "*(undefined4 *)(param_2 + 4)" * (cast_expression "(undefined4 *)(param_2 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 4)" ( (binary_expression "param_2 + 4" identifier + number_literal) )))) = identifier) ;) (return_statement "return param_2;" return identifier ;) })))
(translation_unit "int __frame_state_for(int param_1,int param_2)\n\n{\n  char cVar1;\n  undefined4 uVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  char *pcVar5;\n  char *pcVar6;\n  char local_a00 [7];\n  char local_9f9 [1509];\n  undefined4 local_414;\n  undefined2 uStack_40e;\n  int local_408;\n  undefined2 uStack_3f2;\n  undefined4 local_3ec;\n  undefined1 auStack_3e8 [760];\n  int local_f0;\n  undefined4 local_dc;\n  undefined4 local_d4;\n  \n  uVar2 = (*(code *)PTR_memset_00436850)(auStack_3e8,0,0x3d8);\n  pcVar6 = local_a00;\n  local_f0 = param_1 + 1;\n  local_dc = 0x40000000;\n  iVar3 = uw_frame_state_for(uVar2,pcVar6);\n  if ((iVar3 != 0) || (pcVar5 = (char *)(param_2 + 0x308), local_408 == 2)) {\n    return 0;\n  }\n  puVar4 = (undefined4 *)(param_2 + 0x10);\n  do {\n    while( true ) {\n      cVar1 = pcVar6[7];\n      *pcVar5 = cVar1;\n      if ((cVar1 != '\x01') && (cVar1 != '\x02')) break;\n      uVar2 = *(undefined4 *)pcVar6;\n      pcVar6 = pcVar6 + 8;\n      pcVar5 = pcVar5 + 1;\n      *puVar4 = uVar2;\n      puVar4 = puVar4 + 1;\n      if (pcVar6 == local_9f9 + 0x5e1) goto LAB_003709f4;\n    }\n    pcVar6 = pcVar6 + 8;\n    *puVar4 = 0;\n    pcVar5 = pcVar5 + 1;\n    puVar4 = puVar4 + 1;\n  } while (pcVar6 != local_9f9 + 0x5e1);\nLAB_003709f4:\n  *(undefined4 *)(param_2 + 8) = local_414;\n  *(undefined2 *)(param_2 + 0x304) = uStack_40e;\n  *(undefined2 *)(param_2 + 0x306) = uStack_3f2;\n  *(undefined4 *)(param_2 + 0xc) = local_d4;\n  *(undefined4 *)(param_2 + 4) = local_3ec;\n  return param_2;\n}\n\n" (function_definition "int __frame_state_for(int param_1,int param_2)\n\n{\n  char cVar1;\n  undefined4 uVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  char *pcVar5;\n  char *pcVar6;\n  char local_a00 [7];\n  char local_9f9 [1509];\n  undefined4 local_414;\n  undefined2 uStack_40e;\n  int local_408;\n  undefined2 uStack_3f2;\n  undefined4 local_3ec;\n  undefined1 auStack_3e8 [760];\n  int local_f0;\n  undefined4 local_dc;\n  undefined4 local_d4;\n  \n  uVar2 = (*(code *)PTR_memset_00436850)(auStack_3e8,0,0x3d8);\n  pcVar6 = local_a00;\n  local_f0 = param_1 + 1;\n  local_dc = 0x40000000;\n  iVar3 = uw_frame_state_for(uVar2,pcVar6);\n  if ((iVar3 != 0) || (pcVar5 = (char *)(param_2 + 0x308), local_408 == 2)) {\n    return 0;\n  }\n  puVar4 = (undefined4 *)(param_2 + 0x10);\n  do {\n    while( true ) {\n      cVar1 = pcVar6[7];\n      *pcVar5 = cVar1;\n      if ((cVar1 != '\x01') && (cVar1 != '\x02')) break;\n      uVar2 = *(undefined4 *)pcVar6;\n      pcVar6 = pcVar6 + 8;\n      pcVar5 = pcVar5 + 1;\n      *puVar4 = uVar2;\n      puVar4 = puVar4 + 1;\n      if (pcVar6 == local_9f9 + 0x5e1) goto LAB_003709f4;\n    }\n    pcVar6 = pcVar6 + 8;\n    *puVar4 = 0;\n    pcVar5 = pcVar5 + 1;\n    puVar4 = puVar4 + 1;\n  } while (pcVar6 != local_9f9 + 0x5e1);\nLAB_003709f4:\n  *(undefined4 *)(param_2 + 8) = local_414;\n  *(undefined2 *)(param_2 + 0x304) = uStack_40e;\n  *(undefined2 *)(param_2 + 0x306) = uStack_3f2;\n  *(undefined4 *)(param_2 + 0xc) = local_d4;\n  *(undefined4 *)(param_2 + 4) = local_3ec;\n  return param_2;\n}" primitive_type (function_declarator "__frame_state_for(int param_1,int param_2)" identifier (parameter_list "(int param_1,int param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  char cVar1;\n  undefined4 uVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  char *pcVar5;\n  char *pcVar6;\n  char local_a00 [7];\n  char local_9f9 [1509];\n  undefined4 local_414;\n  undefined2 uStack_40e;\n  int local_408;\n  undefined2 uStack_3f2;\n  undefined4 local_3ec;\n  undefined1 auStack_3e8 [760];\n  int local_f0;\n  undefined4 local_dc;\n  undefined4 local_d4;\n  \n  uVar2 = (*(code *)PTR_memset_00436850)(auStack_3e8,0,0x3d8);\n  pcVar6 = local_a00;\n  local_f0 = param_1 + 1;\n  local_dc = 0x40000000;\n  iVar3 = uw_frame_state_for(uVar2,pcVar6);\n  if ((iVar3 != 0) || (pcVar5 = (char *)(param_2 + 0x308), local_408 == 2)) {\n    return 0;\n  }\n  puVar4 = (undefined4 *)(param_2 + 0x10);\n  do {\n    while( true ) {\n      cVar1 = pcVar6[7];\n      *pcVar5 = cVar1;\n      if ((cVar1 != '\x01') && (cVar1 != '\x02')) break;\n      uVar2 = *(undefined4 *)pcVar6;\n      pcVar6 = pcVar6 + 8;\n      pcVar5 = pcVar5 + 1;\n      *puVar4 = uVar2;\n      puVar4 = puVar4 + 1;\n      if (pcVar6 == local_9f9 + 0x5e1) goto LAB_003709f4;\n    }\n    pcVar6 = pcVar6 + 8;\n    *puVar4 = 0;\n    pcVar5 = pcVar5 + 1;\n    puVar4 = puVar4 + 1;\n  } while (pcVar6 != local_9f9 + 0x5e1);\nLAB_003709f4:\n  *(undefined4 *)(param_2 + 8) = local_414;\n  *(undefined2 *)(param_2 + 0x304) = uStack_40e;\n  *(undefined2 *)(param_2 + 0x306) = uStack_3f2;\n  *(undefined4 *)(param_2 + 0xc) = local_d4;\n  *(undefined4 *)(param_2 + 4) = local_3ec;\n  return param_2;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "char *pcVar5;" primitive_type (pointer_declarator "*pcVar5" * identifier) ;) (declaration "char *pcVar6;" primitive_type (pointer_declarator "*pcVar6" * identifier) ;) (declaration "char local_a00 [7];" primitive_type (array_declarator "local_a00 [7]" identifier [ number_literal ]) ;) (declaration "char local_9f9 [1509];" primitive_type (array_declarator "local_9f9 [1509]" identifier [ number_literal ]) ;) (declaration "undefined4 local_414;" type_identifier identifier ;) (declaration "undefined2 uStack_40e;" type_identifier identifier ;) (declaration "int local_408;" primitive_type identifier ;) (declaration "undefined2 uStack_3f2;" type_identifier identifier ;) (declaration "undefined4 local_3ec;" type_identifier identifier ;) (declaration "undefined1 auStack_3e8 [760];" type_identifier (array_declarator "auStack_3e8 [760]" identifier [ number_literal ]) ;) (declaration "int local_f0;" primitive_type identifier ;) (declaration "undefined4 local_dc;" type_identifier identifier ;) (declaration "undefined4 local_d4;" type_identifier identifier ;) (expression_statement "uVar2 = (*(code *)PTR_memset_00436850)(auStack_3e8,0,0x3d8);" (assignment_expression "uVar2 = (*(code *)PTR_memset_00436850)(auStack_3e8,0,0x3d8)" identifier = (call_expression "(*(code *)PTR_memset_00436850)(auStack_3e8,0,0x3d8)" (parenthesized_expression "(*(code *)PTR_memset_00436850)" ( (pointer_expression "*(code *)PTR_memset_00436850" * (cast_expression "(code *)PTR_memset_00436850" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(auStack_3e8,0,0x3d8)" ( identifier , number_literal , number_literal )))) ;) (expression_statement "pcVar6 = local_a00;" (assignment_expression "pcVar6 = local_a00" identifier = identifier) ;) (expression_statement "local_f0 = param_1 + 1;" (assignment_expression "local_f0 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) (expression_statement "local_dc = 0x40000000;" (assignment_expression "local_dc = 0x40000000" identifier = number_literal) ;) (expression_statement "iVar3 = uw_frame_state_for(uVar2,pcVar6);" (assignment_expression "iVar3 = uw_frame_state_for(uVar2,pcVar6)" identifier = (call_expression "uw_frame_state_for(uVar2,pcVar6)" identifier (argument_list "(uVar2,pcVar6)" ( identifier , identifier )))) ;) (if_statement "if ((iVar3 != 0) || (pcVar5 = (char *)(param_2 + 0x308), local_408 == 2)) {\n    return 0;\n  }" if (parenthesized_expression "((iVar3 != 0) || (pcVar5 = (char *)(param_2 + 0x308), local_408 == 2))" ( (binary_expression "(iVar3 != 0) || (pcVar5 = (char *)(param_2 + 0x308), local_408 == 2)" (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) || (parenthesized_expression "(pcVar5 = (char *)(param_2 + 0x308), local_408 == 2)" ( (comma_expression "pcVar5 = (char *)(param_2 + 0x308), local_408 == 2" (assignment_expression "pcVar5 = (char *)(param_2 + 0x308)" identifier = (cast_expression "(char *)(param_2 + 0x308)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x308)" ( (binary_expression "param_2 + 0x308" identifier + number_literal) )))) , (binary_expression "local_408 == 2" identifier == number_literal)) ))) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "puVar4 = (undefined4 *)(param_2 + 0x10);" (assignment_expression "puVar4 = (undefined4 *)(param_2 + 0x10)" identifier = (cast_expression "(undefined4 *)(param_2 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x10)" ( (binary_expression "param_2 + 0x10" identifier + number_literal) )))) ;) (do_statement "do {\n    while( true ) {\n      cVar1 = pcVar6[7];\n      *pcVar5 = cVar1;\n      if ((cVar1 != '\x01') && (cVar1 != '\x02')) break;\n      uVar2 = *(undefined4 *)pcVar6;\n      pcVar6 = pcVar6 + 8;\n      pcVar5 = pcVar5 + 1;\n      *puVar4 = uVar2;\n      puVar4 = puVar4 + 1;\n      if (pcVar6 == local_9f9 + 0x5e1) goto LAB_003709f4;\n    }\n    pcVar6 = pcVar6 + 8;\n    *puVar4 = 0;\n    pcVar5 = pcVar5 + 1;\n    puVar4 = puVar4 + 1;\n  } while (pcVar6 != local_9f9 + 0x5e1);" do (compound_statement "{\n    while( true ) {\n      cVar1 = pcVar6[7];\n      *pcVar5 = cVar1;\n      if ((cVar1 != '\x01') && (cVar1 != '\x02')) break;\n      uVar2 = *(undefined4 *)pcVar6;\n      pcVar6 = pcVar6 + 8;\n      pcVar5 = pcVar5 + 1;\n      *puVar4 = uVar2;\n      puVar4 = puVar4 + 1;\n      if (pcVar6 == local_9f9 + 0x5e1) goto LAB_003709f4;\n    }\n    pcVar6 = pcVar6 + 8;\n    *puVar4 = 0;\n    pcVar5 = pcVar5 + 1;\n    puVar4 = puVar4 + 1;\n  }" { (while_statement "while( true ) {\n      cVar1 = pcVar6[7];\n      *pcVar5 = cVar1;\n      if ((cVar1 != '\x01') && (cVar1 != '\x02')) break;\n      uVar2 = *(undefined4 *)pcVar6;\n      pcVar6 = pcVar6 + 8;\n      pcVar5 = pcVar5 + 1;\n      *puVar4 = uVar2;\n      puVar4 = puVar4 + 1;\n      if (pcVar6 == local_9f9 + 0x5e1) goto LAB_003709f4;\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      cVar1 = pcVar6[7];\n      *pcVar5 = cVar1;\n      if ((cVar1 != '\x01') && (cVar1 != '\x02')) break;\n      uVar2 = *(undefined4 *)pcVar6;\n      pcVar6 = pcVar6 + 8;\n      pcVar5 = pcVar5 + 1;\n      *puVar4 = uVar2;\n      puVar4 = puVar4 + 1;\n      if (pcVar6 == local_9f9 + 0x5e1) goto LAB_003709f4;\n    }" { (expression_statement "cVar1 = pcVar6[7];" (assignment_expression "cVar1 = pcVar6[7]" identifier = (subscript_expression "pcVar6[7]" identifier [ number_literal ])) ;) (expression_statement "*pcVar5 = cVar1;" (assignment_expression "*pcVar5 = cVar1" (pointer_expression "*pcVar5" * identifier) = identifier) ;) (if_statement "if ((cVar1 != '\x01') && (cVar1 != '\x02')) break;" if (parenthesized_expression "((cVar1 != '\x01') && (cVar1 != '\x02'))" ( (binary_expression "(cVar1 != '\x01') && (cVar1 != '\x02')" (parenthesized_expression "(cVar1 != '\x01')" ( (binary_expression "cVar1 != '\x01'" identifier != (char_literal "'\x01'" ' escape_sequence ')) )) && (parenthesized_expression "(cVar1 != '\x02')" ( (binary_expression "cVar1 != '\x02'" identifier != (char_literal "'\x02'" ' escape_sequence ')) ))) )) (break_statement "break;" break ;)) (expression_statement "uVar2 = *(undefined4 *)pcVar6;" (assignment_expression "uVar2 = *(undefined4 *)pcVar6" identifier = (pointer_expression "*(undefined4 *)pcVar6" * (cast_expression "(undefined4 *)pcVar6" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "pcVar6 = pcVar6 + 8;" (assignment_expression "pcVar6 = pcVar6 + 8" identifier = (binary_expression "pcVar6 + 8" identifier + number_literal)) ;) (expression_statement "pcVar5 = pcVar5 + 1;" (assignment_expression "pcVar5 = pcVar5 + 1" identifier = (binary_expression "pcVar5 + 1" identifier + number_literal)) ;) (expression_statement "*puVar4 = uVar2;" (assignment_expression "*puVar4 = uVar2" (pointer_expression "*puVar4" * identifier) = identifier) ;) (expression_statement "puVar4 = puVar4 + 1;" (assignment_expression "puVar4 = puVar4 + 1" identifier = (binary_expression "puVar4 + 1" identifier + number_literal)) ;) (if_statement "if (pcVar6 == local_9f9 + 0x5e1) goto LAB_003709f4;" if (parenthesized_expression "(pcVar6 == local_9f9 + 0x5e1)" ( (binary_expression "pcVar6 == local_9f9 + 0x5e1" identifier == (binary_expression "local_9f9 + 0x5e1" identifier + number_literal)) )) (goto_statement "goto LAB_003709f4;" goto statement_identifier ;)) })) (expression_statement "pcVar6 = pcVar6 + 8;" (assignment_expression "pcVar6 = pcVar6 + 8" identifier = (binary_expression "pcVar6 + 8" identifier + number_literal)) ;) (expression_statement "*puVar4 = 0;" (assignment_expression "*puVar4 = 0" (pointer_expression "*puVar4" * identifier) = number_literal) ;) (expression_statement "pcVar5 = pcVar5 + 1;" (assignment_expression "pcVar5 = pcVar5 + 1" identifier = (binary_expression "pcVar5 + 1" identifier + number_literal)) ;) (expression_statement "puVar4 = puVar4 + 1;" (assignment_expression "puVar4 = puVar4 + 1" identifier = (binary_expression "puVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(pcVar6 != local_9f9 + 0x5e1)" ( (binary_expression "pcVar6 != local_9f9 + 0x5e1" identifier != (binary_expression "local_9f9 + 0x5e1" identifier + number_literal)) )) ;) (labeled_statement "LAB_003709f4:\n  *(undefined4 *)(param_2 + 8) = local_414;" statement_identifier : (expression_statement "*(undefined4 *)(param_2 + 8) = local_414;" (assignment_expression "*(undefined4 *)(param_2 + 8) = local_414" (pointer_expression "*(undefined4 *)(param_2 + 8)" * (cast_expression "(undefined4 *)(param_2 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) )))) = identifier) ;)) (expression_statement "*(undefined2 *)(param_2 + 0x304) = uStack_40e;" (assignment_expression "*(undefined2 *)(param_2 + 0x304) = uStack_40e" (pointer_expression "*(undefined2 *)(param_2 + 0x304)" * (cast_expression "(undefined2 *)(param_2 + 0x304)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x304)" ( (binary_expression "param_2 + 0x304" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined2 *)(param_2 + 0x306) = uStack_3f2;" (assignment_expression "*(undefined2 *)(param_2 + 0x306) = uStack_3f2" (pointer_expression "*(undefined2 *)(param_2 + 0x306)" * (cast_expression "(undefined2 *)(param_2 + 0x306)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x306)" ( (binary_expression "param_2 + 0x306" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(param_2 + 0xc) = local_d4;" (assignment_expression "*(undefined4 *)(param_2 + 0xc) = local_d4" (pointer_expression "*(undefined4 *)(param_2 + 0xc)" * (cast_expression "(undefined4 *)(param_2 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0xc)" ( (binary_expression "param_2 + 0xc" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(param_2 + 4) = local_3ec;" (assignment_expression "*(undefined4 *)(param_2 + 4) = local_3ec" (pointer_expression "*(undefined4 *)(param_2 + 4)" * (cast_expression "(undefined4 *)(param_2 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 4)" ( (binary_expression "param_2 + 4" identifier + number_literal) )))) = identifier) ;) (return_statement "return param_2;" return identifier ;) })))
(translation_unit "int FUN_00370914(int param_1,int param_2)\n\n{\n  char cVar1;\n  undefined4 uVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  char *pcVar5;\n  char *pcVar6;\n  char local_a00 [7];\n  char local_9f9 [1509];\n  undefined4 local_414;\n  undefined2 uStack_40e;\n  int local_408;\n  undefined2 uStack_3f2;\n  undefined4 local_3ec;\n  undefined1 auStack_3e8 [760];\n  int local_f0;\n  undefined4 local_dc;\n  undefined4 local_d4;\n  \n  uVar2 = (*(code *)PTR_memset_00436850)(auStack_3e8,0,0x3d8);\n  pcVar6 = local_a00;\n  local_f0 = param_1 + 1;\n  local_dc = 0x40000000;\n  iVar3 = FUN_0036e7d0(uVar2,pcVar6);\n  if ((iVar3 != 0) || (pcVar5 = (char *)(param_2 + 0x308), local_408 == 2)) {\n    return 0;\n  }\n  puVar4 = (undefined4 *)(param_2 + 0x10);\n  do {\n    while( true ) {\n      cVar1 = pcVar6[7];\n      *pcVar5 = cVar1;\n      if ((cVar1 != '\x01') && (cVar1 != '\x02')) break;\n      uVar2 = *(undefined4 *)pcVar6;\n      pcVar6 = pcVar6 + 8;\n      pcVar5 = pcVar5 + 1;\n      *puVar4 = uVar2;\n      puVar4 = puVar4 + 1;\n      if (pcVar6 == local_9f9 + 0x5e1) goto LAB_003709f4;\n    }\n    pcVar6 = pcVar6 + 8;\n    *puVar4 = 0;\n    pcVar5 = pcVar5 + 1;\n    puVar4 = puVar4 + 1;\n  } while (pcVar6 != local_9f9 + 0x5e1);\nLAB_003709f4:\n  *(undefined4 *)(param_2 + 8) = local_414;\n  *(undefined2 *)(param_2 + 0x304) = uStack_40e;\n  *(undefined2 *)(param_2 + 0x306) = uStack_3f2;\n  *(undefined4 *)(param_2 + 0xc) = local_d4;\n  *(undefined4 *)(param_2 + 4) = local_3ec;\n  return param_2;\n}\n\n" (function_definition "int FUN_00370914(int param_1,int param_2)\n\n{\n  char cVar1;\n  undefined4 uVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  char *pcVar5;\n  char *pcVar6;\n  char local_a00 [7];\n  char local_9f9 [1509];\n  undefined4 local_414;\n  undefined2 uStack_40e;\n  int local_408;\n  undefined2 uStack_3f2;\n  undefined4 local_3ec;\n  undefined1 auStack_3e8 [760];\n  int local_f0;\n  undefined4 local_dc;\n  undefined4 local_d4;\n  \n  uVar2 = (*(code *)PTR_memset_00436850)(auStack_3e8,0,0x3d8);\n  pcVar6 = local_a00;\n  local_f0 = param_1 + 1;\n  local_dc = 0x40000000;\n  iVar3 = FUN_0036e7d0(uVar2,pcVar6);\n  if ((iVar3 != 0) || (pcVar5 = (char *)(param_2 + 0x308), local_408 == 2)) {\n    return 0;\n  }\n  puVar4 = (undefined4 *)(param_2 + 0x10);\n  do {\n    while( true ) {\n      cVar1 = pcVar6[7];\n      *pcVar5 = cVar1;\n      if ((cVar1 != '\x01') && (cVar1 != '\x02')) break;\n      uVar2 = *(undefined4 *)pcVar6;\n      pcVar6 = pcVar6 + 8;\n      pcVar5 = pcVar5 + 1;\n      *puVar4 = uVar2;\n      puVar4 = puVar4 + 1;\n      if (pcVar6 == local_9f9 + 0x5e1) goto LAB_003709f4;\n    }\n    pcVar6 = pcVar6 + 8;\n    *puVar4 = 0;\n    pcVar5 = pcVar5 + 1;\n    puVar4 = puVar4 + 1;\n  } while (pcVar6 != local_9f9 + 0x5e1);\nLAB_003709f4:\n  *(undefined4 *)(param_2 + 8) = local_414;\n  *(undefined2 *)(param_2 + 0x304) = uStack_40e;\n  *(undefined2 *)(param_2 + 0x306) = uStack_3f2;\n  *(undefined4 *)(param_2 + 0xc) = local_d4;\n  *(undefined4 *)(param_2 + 4) = local_3ec;\n  return param_2;\n}" primitive_type (function_declarator "FUN_00370914(int param_1,int param_2)" identifier (parameter_list "(int param_1,int param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  char cVar1;\n  undefined4 uVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  char *pcVar5;\n  char *pcVar6;\n  char local_a00 [7];\n  char local_9f9 [1509];\n  undefined4 local_414;\n  undefined2 uStack_40e;\n  int local_408;\n  undefined2 uStack_3f2;\n  undefined4 local_3ec;\n  undefined1 auStack_3e8 [760];\n  int local_f0;\n  undefined4 local_dc;\n  undefined4 local_d4;\n  \n  uVar2 = (*(code *)PTR_memset_00436850)(auStack_3e8,0,0x3d8);\n  pcVar6 = local_a00;\n  local_f0 = param_1 + 1;\n  local_dc = 0x40000000;\n  iVar3 = FUN_0036e7d0(uVar2,pcVar6);\n  if ((iVar3 != 0) || (pcVar5 = (char *)(param_2 + 0x308), local_408 == 2)) {\n    return 0;\n  }\n  puVar4 = (undefined4 *)(param_2 + 0x10);\n  do {\n    while( true ) {\n      cVar1 = pcVar6[7];\n      *pcVar5 = cVar1;\n      if ((cVar1 != '\x01') && (cVar1 != '\x02')) break;\n      uVar2 = *(undefined4 *)pcVar6;\n      pcVar6 = pcVar6 + 8;\n      pcVar5 = pcVar5 + 1;\n      *puVar4 = uVar2;\n      puVar4 = puVar4 + 1;\n      if (pcVar6 == local_9f9 + 0x5e1) goto LAB_003709f4;\n    }\n    pcVar6 = pcVar6 + 8;\n    *puVar4 = 0;\n    pcVar5 = pcVar5 + 1;\n    puVar4 = puVar4 + 1;\n  } while (pcVar6 != local_9f9 + 0x5e1);\nLAB_003709f4:\n  *(undefined4 *)(param_2 + 8) = local_414;\n  *(undefined2 *)(param_2 + 0x304) = uStack_40e;\n  *(undefined2 *)(param_2 + 0x306) = uStack_3f2;\n  *(undefined4 *)(param_2 + 0xc) = local_d4;\n  *(undefined4 *)(param_2 + 4) = local_3ec;\n  return param_2;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "char *pcVar5;" primitive_type (pointer_declarator "*pcVar5" * identifier) ;) (declaration "char *pcVar6;" primitive_type (pointer_declarator "*pcVar6" * identifier) ;) (declaration "char local_a00 [7];" primitive_type (array_declarator "local_a00 [7]" identifier [ number_literal ]) ;) (declaration "char local_9f9 [1509];" primitive_type (array_declarator "local_9f9 [1509]" identifier [ number_literal ]) ;) (declaration "undefined4 local_414;" type_identifier identifier ;) (declaration "undefined2 uStack_40e;" type_identifier identifier ;) (declaration "int local_408;" primitive_type identifier ;) (declaration "undefined2 uStack_3f2;" type_identifier identifier ;) (declaration "undefined4 local_3ec;" type_identifier identifier ;) (declaration "undefined1 auStack_3e8 [760];" type_identifier (array_declarator "auStack_3e8 [760]" identifier [ number_literal ]) ;) (declaration "int local_f0;" primitive_type identifier ;) (declaration "undefined4 local_dc;" type_identifier identifier ;) (declaration "undefined4 local_d4;" type_identifier identifier ;) (expression_statement "uVar2 = (*(code *)PTR_memset_00436850)(auStack_3e8,0,0x3d8);" (assignment_expression "uVar2 = (*(code *)PTR_memset_00436850)(auStack_3e8,0,0x3d8)" identifier = (call_expression "(*(code *)PTR_memset_00436850)(auStack_3e8,0,0x3d8)" (parenthesized_expression "(*(code *)PTR_memset_00436850)" ( (pointer_expression "*(code *)PTR_memset_00436850" * (cast_expression "(code *)PTR_memset_00436850" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(auStack_3e8,0,0x3d8)" ( identifier , number_literal , number_literal )))) ;) (expression_statement "pcVar6 = local_a00;" (assignment_expression "pcVar6 = local_a00" identifier = identifier) ;) (expression_statement "local_f0 = param_1 + 1;" (assignment_expression "local_f0 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) (expression_statement "local_dc = 0x40000000;" (assignment_expression "local_dc = 0x40000000" identifier = number_literal) ;) (expression_statement "iVar3 = FUN_0036e7d0(uVar2,pcVar6);" (assignment_expression "iVar3 = FUN_0036e7d0(uVar2,pcVar6)" identifier = (call_expression "FUN_0036e7d0(uVar2,pcVar6)" identifier (argument_list "(uVar2,pcVar6)" ( identifier , identifier )))) ;) (if_statement "if ((iVar3 != 0) || (pcVar5 = (char *)(param_2 + 0x308), local_408 == 2)) {\n    return 0;\n  }" if (parenthesized_expression "((iVar3 != 0) || (pcVar5 = (char *)(param_2 + 0x308), local_408 == 2))" ( (binary_expression "(iVar3 != 0) || (pcVar5 = (char *)(param_2 + 0x308), local_408 == 2)" (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) || (parenthesized_expression "(pcVar5 = (char *)(param_2 + 0x308), local_408 == 2)" ( (comma_expression "pcVar5 = (char *)(param_2 + 0x308), local_408 == 2" (assignment_expression "pcVar5 = (char *)(param_2 + 0x308)" identifier = (cast_expression "(char *)(param_2 + 0x308)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x308)" ( (binary_expression "param_2 + 0x308" identifier + number_literal) )))) , (binary_expression "local_408 == 2" identifier == number_literal)) ))) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "puVar4 = (undefined4 *)(param_2 + 0x10);" (assignment_expression "puVar4 = (undefined4 *)(param_2 + 0x10)" identifier = (cast_expression "(undefined4 *)(param_2 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x10)" ( (binary_expression "param_2 + 0x10" identifier + number_literal) )))) ;) (do_statement "do {\n    while( true ) {\n      cVar1 = pcVar6[7];\n      *pcVar5 = cVar1;\n      if ((cVar1 != '\x01') && (cVar1 != '\x02')) break;\n      uVar2 = *(undefined4 *)pcVar6;\n      pcVar6 = pcVar6 + 8;\n      pcVar5 = pcVar5 + 1;\n      *puVar4 = uVar2;\n      puVar4 = puVar4 + 1;\n      if (pcVar6 == local_9f9 + 0x5e1) goto LAB_003709f4;\n    }\n    pcVar6 = pcVar6 + 8;\n    *puVar4 = 0;\n    pcVar5 = pcVar5 + 1;\n    puVar4 = puVar4 + 1;\n  } while (pcVar6 != local_9f9 + 0x5e1);" do (compound_statement "{\n    while( true ) {\n      cVar1 = pcVar6[7];\n      *pcVar5 = cVar1;\n      if ((cVar1 != '\x01') && (cVar1 != '\x02')) break;\n      uVar2 = *(undefined4 *)pcVar6;\n      pcVar6 = pcVar6 + 8;\n      pcVar5 = pcVar5 + 1;\n      *puVar4 = uVar2;\n      puVar4 = puVar4 + 1;\n      if (pcVar6 == local_9f9 + 0x5e1) goto LAB_003709f4;\n    }\n    pcVar6 = pcVar6 + 8;\n    *puVar4 = 0;\n    pcVar5 = pcVar5 + 1;\n    puVar4 = puVar4 + 1;\n  }" { (while_statement "while( true ) {\n      cVar1 = pcVar6[7];\n      *pcVar5 = cVar1;\n      if ((cVar1 != '\x01') && (cVar1 != '\x02')) break;\n      uVar2 = *(undefined4 *)pcVar6;\n      pcVar6 = pcVar6 + 8;\n      pcVar5 = pcVar5 + 1;\n      *puVar4 = uVar2;\n      puVar4 = puVar4 + 1;\n      if (pcVar6 == local_9f9 + 0x5e1) goto LAB_003709f4;\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      cVar1 = pcVar6[7];\n      *pcVar5 = cVar1;\n      if ((cVar1 != '\x01') && (cVar1 != '\x02')) break;\n      uVar2 = *(undefined4 *)pcVar6;\n      pcVar6 = pcVar6 + 8;\n      pcVar5 = pcVar5 + 1;\n      *puVar4 = uVar2;\n      puVar4 = puVar4 + 1;\n      if (pcVar6 == local_9f9 + 0x5e1) goto LAB_003709f4;\n    }" { (expression_statement "cVar1 = pcVar6[7];" (assignment_expression "cVar1 = pcVar6[7]" identifier = (subscript_expression "pcVar6[7]" identifier [ number_literal ])) ;) (expression_statement "*pcVar5 = cVar1;" (assignment_expression "*pcVar5 = cVar1" (pointer_expression "*pcVar5" * identifier) = identifier) ;) (if_statement "if ((cVar1 != '\x01') && (cVar1 != '\x02')) break;" if (parenthesized_expression "((cVar1 != '\x01') && (cVar1 != '\x02'))" ( (binary_expression "(cVar1 != '\x01') && (cVar1 != '\x02')" (parenthesized_expression "(cVar1 != '\x01')" ( (binary_expression "cVar1 != '\x01'" identifier != (char_literal "'\x01'" ' escape_sequence ')) )) && (parenthesized_expression "(cVar1 != '\x02')" ( (binary_expression "cVar1 != '\x02'" identifier != (char_literal "'\x02'" ' escape_sequence ')) ))) )) (break_statement "break;" break ;)) (expression_statement "uVar2 = *(undefined4 *)pcVar6;" (assignment_expression "uVar2 = *(undefined4 *)pcVar6" identifier = (pointer_expression "*(undefined4 *)pcVar6" * (cast_expression "(undefined4 *)pcVar6" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "pcVar6 = pcVar6 + 8;" (assignment_expression "pcVar6 = pcVar6 + 8" identifier = (binary_expression "pcVar6 + 8" identifier + number_literal)) ;) (expression_statement "pcVar5 = pcVar5 + 1;" (assignment_expression "pcVar5 = pcVar5 + 1" identifier = (binary_expression "pcVar5 + 1" identifier + number_literal)) ;) (expression_statement "*puVar4 = uVar2;" (assignment_expression "*puVar4 = uVar2" (pointer_expression "*puVar4" * identifier) = identifier) ;) (expression_statement "puVar4 = puVar4 + 1;" (assignment_expression "puVar4 = puVar4 + 1" identifier = (binary_expression "puVar4 + 1" identifier + number_literal)) ;) (if_statement "if (pcVar6 == local_9f9 + 0x5e1) goto LAB_003709f4;" if (parenthesized_expression "(pcVar6 == local_9f9 + 0x5e1)" ( (binary_expression "pcVar6 == local_9f9 + 0x5e1" identifier == (binary_expression "local_9f9 + 0x5e1" identifier + number_literal)) )) (goto_statement "goto LAB_003709f4;" goto statement_identifier ;)) })) (expression_statement "pcVar6 = pcVar6 + 8;" (assignment_expression "pcVar6 = pcVar6 + 8" identifier = (binary_expression "pcVar6 + 8" identifier + number_literal)) ;) (expression_statement "*puVar4 = 0;" (assignment_expression "*puVar4 = 0" (pointer_expression "*puVar4" * identifier) = number_literal) ;) (expression_statement "pcVar5 = pcVar5 + 1;" (assignment_expression "pcVar5 = pcVar5 + 1" identifier = (binary_expression "pcVar5 + 1" identifier + number_literal)) ;) (expression_statement "puVar4 = puVar4 + 1;" (assignment_expression "puVar4 = puVar4 + 1" identifier = (binary_expression "puVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(pcVar6 != local_9f9 + 0x5e1)" ( (binary_expression "pcVar6 != local_9f9 + 0x5e1" identifier != (binary_expression "local_9f9 + 0x5e1" identifier + number_literal)) )) ;) (labeled_statement "LAB_003709f4:\n  *(undefined4 *)(param_2 + 8) = local_414;" statement_identifier : (expression_statement "*(undefined4 *)(param_2 + 8) = local_414;" (assignment_expression "*(undefined4 *)(param_2 + 8) = local_414" (pointer_expression "*(undefined4 *)(param_2 + 8)" * (cast_expression "(undefined4 *)(param_2 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) )))) = identifier) ;)) (expression_statement "*(undefined2 *)(param_2 + 0x304) = uStack_40e;" (assignment_expression "*(undefined2 *)(param_2 + 0x304) = uStack_40e" (pointer_expression "*(undefined2 *)(param_2 + 0x304)" * (cast_expression "(undefined2 *)(param_2 + 0x304)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x304)" ( (binary_expression "param_2 + 0x304" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined2 *)(param_2 + 0x306) = uStack_3f2;" (assignment_expression "*(undefined2 *)(param_2 + 0x306) = uStack_3f2" (pointer_expression "*(undefined2 *)(param_2 + 0x306)" * (cast_expression "(undefined2 *)(param_2 + 0x306)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x306)" ( (binary_expression "param_2 + 0x306" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(param_2 + 0xc) = local_d4;" (assignment_expression "*(undefined4 *)(param_2 + 0xc) = local_d4" (pointer_expression "*(undefined4 *)(param_2 + 0xc)" * (cast_expression "(undefined4 *)(param_2 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0xc)" ( (binary_expression "param_2 + 0xc" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(param_2 + 4) = local_3ec;" (assignment_expression "*(undefined4 *)(param_2 + 4) = local_3ec" (pointer_expression "*(undefined4 *)(param_2 + 4)" * (cast_expression "(undefined4 *)(param_2 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 4)" ( (binary_expression "param_2 + 4" identifier + number_literal) )))) = identifier) ;) (return_statement "return param_2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , LIT , LIT )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != LIT) )) || (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (binary_expression IDENT == LIT)) ))) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) (do_statement do (compound_statement { (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != (char_literal ' escape_sequence ')) )) && (parenthesized_expression ( (binary_expression IDENT != (char_literal ' escape_sequence ')) ))) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (binary_expression IDENT + LIT)) )) (goto_statement goto statement_identifier ;)) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != (binary_expression IDENT + LIT)) )) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;)) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (return_statement return IDENT ;) })))
(function_definition "int FUN_00370914(int param_1,int param_2)\n\n{\n  char cVar1;\n  undefined4 uVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  char *pcVar5;\n  char *pcVar6;\n  char local_a00 [7];\n  char local_9f9 [1509];\n  undefined4 local_414;\n  undefined2 uStack_40e;\n  int local_408;\n  undefined2 uStack_3f2;\n  undefined4 local_3ec;\n  undefined1 auStack_3e8 [760];\n  int local_f0;\n  undefined4 local_dc;\n  undefined4 local_d4;\n  \n  uVar2 = (*(code *)PTR_memset_00436850)(auStack_3e8,0,0x3d8);\n  pcVar6 = local_a00;\n  local_f0 = param_1 + 1;\n  local_dc = 0x40000000;\n  iVar3 = FUN_0036e7d0(uVar2,pcVar6);\n  if ((iVar3 != 0) || (pcVar5 = (char *)(param_2 + 0x308), local_408 == 2)) {\n    return 0;\n  }\n  puVar4 = (undefined4 *)(param_2 + 0x10);\n  do {\n    while( true ) {\n      cVar1 = pcVar6[7];\n      *pcVar5 = cVar1;\n      if ((cVar1 != '\x01') && (cVar1 != '\x02')) break;\n      uVar2 = *(undefined4 *)pcVar6;\n      pcVar6 = pcVar6 + 8;\n      pcVar5 = pcVar5 + 1;\n      *puVar4 = uVar2;\n      puVar4 = puVar4 + 1;\n      if (pcVar6 == local_9f9 + 0x5e1) goto LAB_003709f4;\n    }\n    pcVar6 = pcVar6 + 8;\n    *puVar4 = 0;\n    pcVar5 = pcVar5 + 1;\n    puVar4 = puVar4 + 1;\n  } while (pcVar6 != local_9f9 + 0x5e1);\nLAB_003709f4:\n  *(undefined4 *)(param_2 + 8) = local_414;\n  *(undefined2 *)(param_2 + 0x304) = uStack_40e;\n  *(undefined2 *)(param_2 + 0x306) = uStack_3f2;\n  *(undefined4 *)(param_2 + 0xc) = local_d4;\n  *(undefined4 *)(param_2 + 4) = local_3ec;\n  return param_2;\n}" (primitive_type "int") (function_declarator "FUN_00370914(int param_1,int param_2)" (identifier "FUN_00370914") (parameter_list "(int param_1,int param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  char cVar1;\n  undefined4 uVar2;\n  int iVar3;\n  undefined4 *puVar4;\n  char *pcVar5;\n  char *pcVar6;\n  char local_a00 [7];\n  char local_9f9 [1509];\n  undefined4 local_414;\n  undefined2 uStack_40e;\n  int local_408;\n  undefined2 uStack_3f2;\n  undefined4 local_3ec;\n  undefined1 auStack_3e8 [760];\n  int local_f0;\n  undefined4 local_dc;\n  undefined4 local_d4;\n  \n  uVar2 = (*(code *)PTR_memset_00436850)(auStack_3e8,0,0x3d8);\n  pcVar6 = local_a00;\n  local_f0 = param_1 + 1;\n  local_dc = 0x40000000;\n  iVar3 = FUN_0036e7d0(uVar2,pcVar6);\n  if ((iVar3 != 0) || (pcVar5 = (char *)(param_2 + 0x308), local_408 == 2)) {\n    return 0;\n  }\n  puVar4 = (undefined4 *)(param_2 + 0x10);\n  do {\n    while( true ) {\n      cVar1 = pcVar6[7];\n      *pcVar5 = cVar1;\n      if ((cVar1 != '\x01') && (cVar1 != '\x02')) break;\n      uVar2 = *(undefined4 *)pcVar6;\n      pcVar6 = pcVar6 + 8;\n      pcVar5 = pcVar5 + 1;\n      *puVar4 = uVar2;\n      puVar4 = puVar4 + 1;\n      if (pcVar6 == local_9f9 + 0x5e1) goto LAB_003709f4;\n    }\n    pcVar6 = pcVar6 + 8;\n    *puVar4 = 0;\n    pcVar5 = pcVar5 + 1;\n    puVar4 = puVar4 + 1;\n  } while (pcVar6 != local_9f9 + 0x5e1);\nLAB_003709f4:\n  *(undefined4 *)(param_2 + 8) = local_414;\n  *(undefined2 *)(param_2 + 0x304) = uStack_40e;\n  *(undefined2 *)(param_2 + 0x306) = uStack_3f2;\n  *(undefined4 *)(param_2 + 0xc) = local_d4;\n  *(undefined4 *)(param_2 + 4) = local_3ec;\n  return param_2;\n}" ({ "{") (declaration "char cVar1;" (primitive_type "char") (identifier "cVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "undefined4 *puVar4;" (type_identifier "undefined4") (pointer_declarator "*puVar4" (* "*") (identifier "puVar4")) (; ";")) (declaration "char *pcVar5;" (primitive_type "char") (pointer_declarator "*pcVar5" (* "*") (identifier "pcVar5")) (; ";")) (declaration "char *pcVar6;" (primitive_type "char") (pointer_declarator "*pcVar6" (* "*") (identifier "pcVar6")) (; ";")) (declaration "char local_a00 [7];" (primitive_type "char") (array_declarator "local_a00 [7]" (identifier "local_a00") ([ "[") (number_literal "7") (] "]")) (; ";")) (declaration "char local_9f9 [1509];" (primitive_type "char") (array_declarator "local_9f9 [1509]" (identifier "local_9f9") ([ "[") (number_literal "1509") (] "]")) (; ";")) (declaration "undefined4 local_414;" (type_identifier "undefined4") (identifier "local_414") (; ";")) (declaration "undefined2 uStack_40e;" (type_identifier "undefined2") (identifier "uStack_40e") (; ";")) (declaration "int local_408;" (primitive_type "int") (identifier "local_408") (; ";")) (declaration "undefined2 uStack_3f2;" (type_identifier "undefined2") (identifier "uStack_3f2") (; ";")) (declaration "undefined4 local_3ec;" (type_identifier "undefined4") (identifier "local_3ec") (; ";")) (declaration "undefined1 auStack_3e8 [760];" (type_identifier "undefined1") (array_declarator "auStack_3e8 [760]" (identifier "auStack_3e8") ([ "[") (number_literal "760") (] "]")) (; ";")) (declaration "int local_f0;" (primitive_type "int") (identifier "local_f0") (; ";")) (declaration "undefined4 local_dc;" (type_identifier "undefined4") (identifier "local_dc") (; ";")) (declaration "undefined4 local_d4;" (type_identifier "undefined4") (identifier "local_d4") (; ";")) (expression_statement "uVar2 = (*(code *)PTR_memset_00436850)(auStack_3e8,0,0x3d8);" (assignment_expression "uVar2 = (*(code *)PTR_memset_00436850)(auStack_3e8,0,0x3d8)" (identifier "uVar2") (= "=") (call_expression "(*(code *)PTR_memset_00436850)(auStack_3e8,0,0x3d8)" (parenthesized_expression "(*(code *)PTR_memset_00436850)" (( "(") (pointer_expression "*(code *)PTR_memset_00436850" (* "*") (cast_expression "(code *)PTR_memset_00436850" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_memset_00436850"))) () ")")) (argument_list "(auStack_3e8,0,0x3d8)" (( "(") (identifier "auStack_3e8") (, ",") (number_literal "0") (, ",") (number_literal "0x3d8") () ")")))) (; ";")) (expression_statement "pcVar6 = local_a00;" (assignment_expression "pcVar6 = local_a00" (identifier "pcVar6") (= "=") (identifier "local_a00")) (; ";")) (expression_statement "local_f0 = param_1 + 1;" (assignment_expression "local_f0 = param_1 + 1" (identifier "local_f0") (= "=") (binary_expression "param_1 + 1" (identifier "param_1") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "local_dc = 0x40000000;" (assignment_expression "local_dc = 0x40000000" (identifier "local_dc") (= "=") (number_literal "0x40000000")) (; ";")) (expression_statement "iVar3 = FUN_0036e7d0(uVar2,pcVar6);" (assignment_expression "iVar3 = FUN_0036e7d0(uVar2,pcVar6)" (identifier "iVar3") (= "=") (call_expression "FUN_0036e7d0(uVar2,pcVar6)" (identifier "FUN_0036e7d0") (argument_list "(uVar2,pcVar6)" (( "(") (identifier "uVar2") (, ",") (identifier "pcVar6") () ")")))) (; ";")) (if_statement "if ((iVar3 != 0) || (pcVar5 = (char *)(param_2 + 0x308), local_408 == 2)) {\n    return 0;\n  }" (if "if") (parenthesized_expression "((iVar3 != 0) || (pcVar5 = (char *)(param_2 + 0x308), local_408 == 2))" (( "(") (binary_expression "(iVar3 != 0) || (pcVar5 = (char *)(param_2 + 0x308), local_408 == 2)" (parenthesized_expression "(iVar3 != 0)" (( "(") (binary_expression "iVar3 != 0" (identifier "iVar3") (!= "!=") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(pcVar5 = (char *)(param_2 + 0x308), local_408 == 2)" (( "(") (comma_expression "pcVar5 = (char *)(param_2 + 0x308), local_408 == 2" (assignment_expression "pcVar5 = (char *)(param_2 + 0x308)" (identifier "pcVar5") (= "=") (cast_expression "(char *)(param_2 + 0x308)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x308)" (( "(") (binary_expression "param_2 + 0x308" (identifier "param_2") (+ "+") (number_literal "0x308")) () ")")))) (, ",") (binary_expression "local_408 == 2" (identifier "local_408") (== "==") (number_literal "2"))) () ")"))) () ")")) (compound_statement "{\n    return 0;\n  }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "puVar4 = (undefined4 *)(param_2 + 0x10);" (assignment_expression "puVar4 = (undefined4 *)(param_2 + 0x10)" (identifier "puVar4") (= "=") (cast_expression "(undefined4 *)(param_2 + 0x10)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x10)" (( "(") (binary_expression "param_2 + 0x10" (identifier "param_2") (+ "+") (number_literal "0x10")) () ")")))) (; ";")) (do_statement "do {\n    while( true ) {\n      cVar1 = pcVar6[7];\n      *pcVar5 = cVar1;\n      if ((cVar1 != '\x01') && (cVar1 != '\x02')) break;\n      uVar2 = *(undefined4 *)pcVar6;\n      pcVar6 = pcVar6 + 8;\n      pcVar5 = pcVar5 + 1;\n      *puVar4 = uVar2;\n      puVar4 = puVar4 + 1;\n      if (pcVar6 == local_9f9 + 0x5e1) goto LAB_003709f4;\n    }\n    pcVar6 = pcVar6 + 8;\n    *puVar4 = 0;\n    pcVar5 = pcVar5 + 1;\n    puVar4 = puVar4 + 1;\n  } while (pcVar6 != local_9f9 + 0x5e1);" (do "do") (compound_statement "{\n    while( true ) {\n      cVar1 = pcVar6[7];\n      *pcVar5 = cVar1;\n      if ((cVar1 != '\x01') && (cVar1 != '\x02')) break;\n      uVar2 = *(undefined4 *)pcVar6;\n      pcVar6 = pcVar6 + 8;\n      pcVar5 = pcVar5 + 1;\n      *puVar4 = uVar2;\n      puVar4 = puVar4 + 1;\n      if (pcVar6 == local_9f9 + 0x5e1) goto LAB_003709f4;\n    }\n    pcVar6 = pcVar6 + 8;\n    *puVar4 = 0;\n    pcVar5 = pcVar5 + 1;\n    puVar4 = puVar4 + 1;\n  }" ({ "{") (while_statement "while( true ) {\n      cVar1 = pcVar6[7];\n      *pcVar5 = cVar1;\n      if ((cVar1 != '\x01') && (cVar1 != '\x02')) break;\n      uVar2 = *(undefined4 *)pcVar6;\n      pcVar6 = pcVar6 + 8;\n      pcVar5 = pcVar5 + 1;\n      *puVar4 = uVar2;\n      puVar4 = puVar4 + 1;\n      if (pcVar6 == local_9f9 + 0x5e1) goto LAB_003709f4;\n    }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n      cVar1 = pcVar6[7];\n      *pcVar5 = cVar1;\n      if ((cVar1 != '\x01') && (cVar1 != '\x02')) break;\n      uVar2 = *(undefined4 *)pcVar6;\n      pcVar6 = pcVar6 + 8;\n      pcVar5 = pcVar5 + 1;\n      *puVar4 = uVar2;\n      puVar4 = puVar4 + 1;\n      if (pcVar6 == local_9f9 + 0x5e1) goto LAB_003709f4;\n    }" ({ "{") (expression_statement "cVar1 = pcVar6[7];" (assignment_expression "cVar1 = pcVar6[7]" (identifier "cVar1") (= "=") (subscript_expression "pcVar6[7]" (identifier "pcVar6") ([ "[") (number_literal "7") (] "]"))) (; ";")) (expression_statement "*pcVar5 = cVar1;" (assignment_expression "*pcVar5 = cVar1" (pointer_expression "*pcVar5" (* "*") (identifier "pcVar5")) (= "=") (identifier "cVar1")) (; ";")) (if_statement "if ((cVar1 != '\x01') && (cVar1 != '\x02')) break;" (if "if") (parenthesized_expression "((cVar1 != '\x01') && (cVar1 != '\x02'))" (( "(") (binary_expression "(cVar1 != '\x01') && (cVar1 != '\x02')" (parenthesized_expression "(cVar1 != '\x01')" (( "(") (binary_expression "cVar1 != '\x01'" (identifier "cVar1") (!= "!=") (char_literal "'\x01'" (' "'") (escape_sequence "\x01") (' "'"))) () ")")) (&& "&&") (parenthesized_expression "(cVar1 != '\x02')" (( "(") (binary_expression "cVar1 != '\x02'" (identifier "cVar1") (!= "!=") (char_literal "'\x02'" (' "'") (escape_sequence "\x02") (' "'"))) () ")"))) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "uVar2 = *(undefined4 *)pcVar6;" (assignment_expression "uVar2 = *(undefined4 *)pcVar6" (identifier "uVar2") (= "=") (pointer_expression "*(undefined4 *)pcVar6" (* "*") (cast_expression "(undefined4 *)pcVar6" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "pcVar6")))) (; ";")) (expression_statement "pcVar6 = pcVar6 + 8;" (assignment_expression "pcVar6 = pcVar6 + 8" (identifier "pcVar6") (= "=") (binary_expression "pcVar6 + 8" (identifier "pcVar6") (+ "+") (number_literal "8"))) (; ";")) (expression_statement "pcVar5 = pcVar5 + 1;" (assignment_expression "pcVar5 = pcVar5 + 1" (identifier "pcVar5") (= "=") (binary_expression "pcVar5 + 1" (identifier "pcVar5") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "*puVar4 = uVar2;" (assignment_expression "*puVar4 = uVar2" (pointer_expression "*puVar4" (* "*") (identifier "puVar4")) (= "=") (identifier "uVar2")) (; ";")) (expression_statement "puVar4 = puVar4 + 1;" (assignment_expression "puVar4 = puVar4 + 1" (identifier "puVar4") (= "=") (binary_expression "puVar4 + 1" (identifier "puVar4") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (pcVar6 == local_9f9 + 0x5e1) goto LAB_003709f4;" (if "if") (parenthesized_expression "(pcVar6 == local_9f9 + 0x5e1)" (( "(") (binary_expression "pcVar6 == local_9f9 + 0x5e1" (identifier "pcVar6") (== "==") (binary_expression "local_9f9 + 0x5e1" (identifier "local_9f9") (+ "+") (number_literal "0x5e1"))) () ")")) (goto_statement "goto LAB_003709f4;" (goto "goto") (statement_identifier "LAB_003709f4") (; ";"))) (} "}"))) (expression_statement "pcVar6 = pcVar6 + 8;" (assignment_expression "pcVar6 = pcVar6 + 8" (identifier "pcVar6") (= "=") (binary_expression "pcVar6 + 8" (identifier "pcVar6") (+ "+") (number_literal "8"))) (; ";")) (expression_statement "*puVar4 = 0;" (assignment_expression "*puVar4 = 0" (pointer_expression "*puVar4" (* "*") (identifier "puVar4")) (= "=") (number_literal "0")) (; ";")) (expression_statement "pcVar5 = pcVar5 + 1;" (assignment_expression "pcVar5 = pcVar5 + 1" (identifier "pcVar5") (= "=") (binary_expression "pcVar5 + 1" (identifier "pcVar5") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "puVar4 = puVar4 + 1;" (assignment_expression "puVar4 = puVar4 + 1" (identifier "puVar4") (= "=") (binary_expression "puVar4 + 1" (identifier "puVar4") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(pcVar6 != local_9f9 + 0x5e1)" (( "(") (binary_expression "pcVar6 != local_9f9 + 0x5e1" (identifier "pcVar6") (!= "!=") (binary_expression "local_9f9 + 0x5e1" (identifier "local_9f9") (+ "+") (number_literal "0x5e1"))) () ")")) (; ";")) (labeled_statement "LAB_003709f4:\n  *(undefined4 *)(param_2 + 8) = local_414;" (statement_identifier "LAB_003709f4") (: ":") (expression_statement "*(undefined4 *)(param_2 + 8) = local_414;" (assignment_expression "*(undefined4 *)(param_2 + 8) = local_414" (pointer_expression "*(undefined4 *)(param_2 + 8)" (* "*") (cast_expression "(undefined4 *)(param_2 + 8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 8)" (( "(") (binary_expression "param_2 + 8" (identifier "param_2") (+ "+") (number_literal "8")) () ")")))) (= "=") (identifier "local_414")) (; ";"))) (expression_statement "*(undefined2 *)(param_2 + 0x304) = uStack_40e;" (assignment_expression "*(undefined2 *)(param_2 + 0x304) = uStack_40e" (pointer_expression "*(undefined2 *)(param_2 + 0x304)" (* "*") (cast_expression "(undefined2 *)(param_2 + 0x304)" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x304)" (( "(") (binary_expression "param_2 + 0x304" (identifier "param_2") (+ "+") (number_literal "0x304")) () ")")))) (= "=") (identifier "uStack_40e")) (; ";")) (expression_statement "*(undefined2 *)(param_2 + 0x306) = uStack_3f2;" (assignment_expression "*(undefined2 *)(param_2 + 0x306) = uStack_3f2" (pointer_expression "*(undefined2 *)(param_2 + 0x306)" (* "*") (cast_expression "(undefined2 *)(param_2 + 0x306)" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x306)" (( "(") (binary_expression "param_2 + 0x306" (identifier "param_2") (+ "+") (number_literal "0x306")) () ")")))) (= "=") (identifier "uStack_3f2")) (; ";")) (expression_statement "*(undefined4 *)(param_2 + 0xc) = local_d4;" (assignment_expression "*(undefined4 *)(param_2 + 0xc) = local_d4" (pointer_expression "*(undefined4 *)(param_2 + 0xc)" (* "*") (cast_expression "(undefined4 *)(param_2 + 0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0xc)" (( "(") (binary_expression "param_2 + 0xc" (identifier "param_2") (+ "+") (number_literal "0xc")) () ")")))) (= "=") (identifier "local_d4")) (; ";")) (expression_statement "*(undefined4 *)(param_2 + 4) = local_3ec;" (assignment_expression "*(undefined4 *)(param_2 + 4) = local_3ec" (pointer_expression "*(undefined4 *)(param_2 + 4)" (* "*") (cast_expression "(undefined4 *)(param_2 + 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 4)" (( "(") (binary_expression "param_2 + 4" (identifier "param_2") (+ "+") (number_literal "4")) () ")")))) (= "=") (identifier "local_3ec")) (; ";")) (return_statement "return param_2;" (return "return") (identifier "param_2") (; ";")) (} "}")))
(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) 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))) (declaration type: (primitive_type) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (primitive_type) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (type_identifier) 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: (identifier)) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (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 (identifier) (number_literal) (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (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: (identifier) right: (number_literal)))))) consequence: (compound_statement (return_statement (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) (do_statement body: (compound_statement (while_statement condition: (parenthesized_expression (true)) body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (escape_sequence)))) right: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (escape_sequence)))))) consequence: (break_statement)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (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: (pointer_expression argument: (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: (binary_expression left: (identifier) right: (number_literal)))) consequence: (goto_statement label: (statement_identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (pointer_expression argument: (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: (binary_expression left: (identifier) right: (number_literal))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) (labeled_statement label: (statement_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: (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: (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: (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: (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: (identifier))) (return_statement (identifier)))))

int MASKED(int param_1,int param_2)

{
  char cVar1;
  undefined4 uVar2;
  int iVar3;
  undefined4 *puVar4;
  char *pcVar5;
  char *pcVar6;
  char local_a00 [7];
  char local_9f9 [1509];
  undefined4 local_414;
  undefined2 uStack_40e;
  int local_408;
  undefined2 uStack_3f2;
  undefined4 local_3ec;
  undefined1 auStack_3e8 [760];
  int local_f0;
  undefined4 local_dc;
  undefined4 local_d4;
  
  uVar2 = (*(code *)PTR_memset_00436850)(auStack_3e8,0,0x3d8);
  pcVar6 = local_a00;
  local_f0 = param_1 + 1;
  local_dc = 0x40000000;
  iVar3 = FUN_0036e7d0(uVar2,pcVar6);
  if ((iVar3 != 0) || (pcVar5 = (char *)(param_2 + 0x308), local_408 == 2)) {
    return 0;
  }
  puVar4 = (undefined4 *)(param_2 + 0x10);
  do {
    while( true ) {
      cVar1 = pcVar6[7];
      *pcVar5 = cVar1;
      if ((cVar1 != '\x01') && (cVar1 != '\x02')) break;
      uVar2 = *(undefined4 *)pcVar6;
      pcVar6 = pcVar6 + 8;
      pcVar5 = pcVar5 + 1;
      *puVar4 = uVar2;
      puVar4 = puVar4 + 1;
      if (pcVar6 == local_9f9 + 0x5e1) goto LAB_003709f4;
    }
    pcVar6 = pcVar6 + 8;
    *puVar4 = 0;
    pcVar5 = pcVar5 + 1;
    puVar4 = puVar4 + 1;
  } while (pcVar6 != local_9f9 + 0x5e1);
LAB_003709f4:
  *(undefined4 *)(param_2 + 8) = local_414;
  *(undefined2 *)(param_2 + 0x304) = uStack_40e;
  *(undefined2 *)(param_2 + 0x306) = uStack_3f2;
  *(undefined4 *)(param_2 + 0xc) = local_d4;
  *(undefined4 *)(param_2 + 4) = local_3ec;
  return param_2;
}

