
Packet * ssh2_pkt_init(int pkt_type)

{
  Packet *pkt;
  undefined1 uStack_15;
  undefined4 local_14;
  
  local_14 = *(undefined4 *)PTR___stack_chk_guard_000b2f04;
  pkt = (Packet *)safemalloc(1,0x2c);
  pkt->data = (uchar *)0x0;
  pkt->length = 5;
  pkt->body = (uchar *)0x0;
  pkt->maxlen = 0;
  pkt->forcepad = 0;
  pkt->type = pkt_type;
  uStack_15 = (undefined1)pkt_type;
                    /* WARNING: Subroutine does not return */
  ssh_pkt_adddata(pkt,&uStack_15,1);
}



int * FUN_0003b04c(int param_1)

{
  undefined *puVar1;
  int *piVar2;
  int *piVar3;
  undefined1 local_15;
  int *local_14;
  
  puVar1 = PTR___stack_chk_guard_000b2f04;
  local_14 = *(int **)PTR___stack_chk_guard_000b2f04;
  piVar2 = (int *)safemalloc(1,0x2c);
  piVar2[4] = 0;
  *piVar2 = 5;
  piVar2[5] = 0;
  piVar2[7] = 0;
  piVar2[1] = 0;
  piVar2[2] = param_1;
  local_15 = (undefined1)param_1;
  FUN_0003aef4(piVar2,&local_15,1);
  piVar3 = *(int **)puVar1;
  piVar2[9] = 0;
  piVar2[10] = 0;
  piVar2[5] = piVar2[4] + *piVar2;
  if (local_14 == piVar3) {
    return piVar2;
  }
  (*(code *)PTR___stack_chk_fail_000b2ed8)();
  FUN_0003aef4();
  *(char *)(piVar3[4] + piVar3[6] + -4) = (char)((uint)(*piVar3 - piVar3[6]) >> 0x18);
  *(char *)(piVar3[4] + piVar3[6] + -3) = (char)((uint)(*piVar3 - piVar3[6]) >> 0x10);
  *(char *)(piVar3[4] + piVar3[6] + -2) = (char)((uint)(*piVar3 - piVar3[6]) >> 8);
  piVar2 = (int *)(piVar3[4] + piVar3[6]);
  *(char *)((int)piVar2 + -1) = (char)*piVar3 - (char)piVar3[6];
  return piVar2;
}


lui gp,0x8
addiu gp,gp,-0xcdc
addu gp,gp,t9
addiu sp,sp,-0x30
lw t9,-0x7f68(gp)
li a1,0x2c
sw s1,0x24(sp)
lw s1,-0x746c(gp)
sw s2,0x28(sp)
or s2,a0,zero
li a0,0x1
sw gp,0x10(sp)
sw ra,0x2c(sp)
sw s0,0x20(sp)
lw v0,0x0(s1)
sw v0,0x1c(sp)
bal 0x00020904
_nop
li a2,0x1
lw gp,0x10(sp)
or s0,v0,zero
li v0,0x5
addiu a1,sp,0x1b
sw zero,0x10(s0)
sw v0,0x0(s0)
or a0,s0,zero
sw zero,0x14(s0)
sw zero,0x1c(s0)
sw zero,0x4(s0)
sw s2,0x8(s0)
lw t9,-0x7adc(gp)
addiu t9,t9,-0x510c
bal 0x0003aef4
_sb s2,0x1b(sp)
lw v1,0x10(s0)
lw a2,0x0(s0)
lw a1,0x1c(sp)
lw a0,0x0(s1)
addu v1,v1,a2
lw gp,0x10(sp)
sw zero,0x24(s0)
sw zero,0x28(s0)
bne a1,a0,0x0003b118
_sw v1,0x14(s0)
lw ra,0x2c(sp)
or v0,s0,zero
lw s2,0x28(sp)
lw s1,0x24(sp)
lw s0,0x20(sp)
jr ra
_addiu sp,sp,0x30
lw t9,-0x7498(gp)
jalr t9
_nop
(translation_unit "int * FUN_0003b04c(int param_1)\n\n{\n  undefined *puVar1;\n  int *piVar2;\n  int *piVar3;\n  undefined1 local_15;\n  int *local_14;\n  \n  puVar1 = PTR___stack_chk_guard_000b2f04;\n  local_14 = *(int **)PTR___stack_chk_guard_000b2f04;\n  piVar2 = (int *)safemalloc(1,0x2c);\n  piVar2[4] = 0;\n  *piVar2 = 5;\n  piVar2[5] = 0;\n  piVar2[7] = 0;\n  piVar2[1] = 0;\n  piVar2[2] = param_1;\n  local_15 = (undefined1)param_1;\n  FUN_0003aef4(piVar2,&local_15,1);\n  piVar3 = *(int **)puVar1;\n  piVar2[9] = 0;\n  piVar2[10] = 0;\n  piVar2[5] = piVar2[4] + *piVar2;\n  if (local_14 == piVar3) {\n    return piVar2;\n  }\n  (*(code *)PTR___stack_chk_fail_000b2ed8)();\n  FUN_0003aef4();\n  *(char *)(piVar3[4] + piVar3[6] + -4) = (char)((uint)(*piVar3 - piVar3[6]) >> 0x18);\n  *(char *)(piVar3[4] + piVar3[6] + -3) = (char)((uint)(*piVar3 - piVar3[6]) >> 0x10);\n  *(char *)(piVar3[4] + piVar3[6] + -2) = (char)((uint)(*piVar3 - piVar3[6]) >> 8);\n  piVar2 = (int *)(piVar3[4] + piVar3[6]);\n  *(char *)((int)piVar2 + -1) = (char)*piVar3 - (char)piVar3[6];\n  return piVar2;\n}\n\n" (function_definition "int * FUN_0003b04c(int param_1)\n\n{\n  undefined *puVar1;\n  int *piVar2;\n  int *piVar3;\n  undefined1 local_15;\n  int *local_14;\n  \n  puVar1 = PTR___stack_chk_guard_000b2f04;\n  local_14 = *(int **)PTR___stack_chk_guard_000b2f04;\n  piVar2 = (int *)safemalloc(1,0x2c);\n  piVar2[4] = 0;\n  *piVar2 = 5;\n  piVar2[5] = 0;\n  piVar2[7] = 0;\n  piVar2[1] = 0;\n  piVar2[2] = param_1;\n  local_15 = (undefined1)param_1;\n  FUN_0003aef4(piVar2,&local_15,1);\n  piVar3 = *(int **)puVar1;\n  piVar2[9] = 0;\n  piVar2[10] = 0;\n  piVar2[5] = piVar2[4] + *piVar2;\n  if (local_14 == piVar3) {\n    return piVar2;\n  }\n  (*(code *)PTR___stack_chk_fail_000b2ed8)();\n  FUN_0003aef4();\n  *(char *)(piVar3[4] + piVar3[6] + -4) = (char)((uint)(*piVar3 - piVar3[6]) >> 0x18);\n  *(char *)(piVar3[4] + piVar3[6] + -3) = (char)((uint)(*piVar3 - piVar3[6]) >> 0x10);\n  *(char *)(piVar3[4] + piVar3[6] + -2) = (char)((uint)(*piVar3 - piVar3[6]) >> 8);\n  piVar2 = (int *)(piVar3[4] + piVar3[6]);\n  *(char *)((int)piVar2 + -1) = (char)*piVar3 - (char)piVar3[6];\n  return piVar2;\n}" primitive_type (pointer_declarator "* FUN_0003b04c(int param_1)" * (function_declarator "FUN_0003b04c(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) )))) (compound_statement "{\n  undefined *puVar1;\n  int *piVar2;\n  int *piVar3;\n  undefined1 local_15;\n  int *local_14;\n  \n  puVar1 = PTR___stack_chk_guard_000b2f04;\n  local_14 = *(int **)PTR___stack_chk_guard_000b2f04;\n  piVar2 = (int *)safemalloc(1,0x2c);\n  piVar2[4] = 0;\n  *piVar2 = 5;\n  piVar2[5] = 0;\n  piVar2[7] = 0;\n  piVar2[1] = 0;\n  piVar2[2] = param_1;\n  local_15 = (undefined1)param_1;\n  FUN_0003aef4(piVar2,&local_15,1);\n  piVar3 = *(int **)puVar1;\n  piVar2[9] = 0;\n  piVar2[10] = 0;\n  piVar2[5] = piVar2[4] + *piVar2;\n  if (local_14 == piVar3) {\n    return piVar2;\n  }\n  (*(code *)PTR___stack_chk_fail_000b2ed8)();\n  FUN_0003aef4();\n  *(char *)(piVar3[4] + piVar3[6] + -4) = (char)((uint)(*piVar3 - piVar3[6]) >> 0x18);\n  *(char *)(piVar3[4] + piVar3[6] + -3) = (char)((uint)(*piVar3 - piVar3[6]) >> 0x10);\n  *(char *)(piVar3[4] + piVar3[6] + -2) = (char)((uint)(*piVar3 - piVar3[6]) >> 8);\n  piVar2 = (int *)(piVar3[4] + piVar3[6]);\n  *(char *)((int)piVar2 + -1) = (char)*piVar3 - (char)piVar3[6];\n  return piVar2;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "undefined1 local_15;" type_identifier identifier ;) (declaration "int *local_14;" primitive_type (pointer_declarator "*local_14" * identifier) ;) (expression_statement "puVar1 = PTR___stack_chk_guard_000b2f04;" (assignment_expression "puVar1 = PTR___stack_chk_guard_000b2f04" identifier = identifier) ;) (expression_statement "local_14 = *(int **)PTR___stack_chk_guard_000b2f04;" (assignment_expression "local_14 = *(int **)PTR___stack_chk_guard_000b2f04" identifier = (pointer_expression "*(int **)PTR___stack_chk_guard_000b2f04" * (cast_expression "(int **)PTR___stack_chk_guard_000b2f04" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (expression_statement "piVar2 = (int *)safemalloc(1,0x2c);" (assignment_expression "piVar2 = (int *)safemalloc(1,0x2c)" identifier = (cast_expression "(int *)safemalloc(1,0x2c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "safemalloc(1,0x2c)" identifier (argument_list "(1,0x2c)" ( number_literal , number_literal ))))) ;) (expression_statement "piVar2[4] = 0;" (assignment_expression "piVar2[4] = 0" (subscript_expression "piVar2[4]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*piVar2 = 5;" (assignment_expression "*piVar2 = 5" (pointer_expression "*piVar2" * identifier) = number_literal) ;) (expression_statement "piVar2[5] = 0;" (assignment_expression "piVar2[5] = 0" (subscript_expression "piVar2[5]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "piVar2[7] = 0;" (assignment_expression "piVar2[7] = 0" (subscript_expression "piVar2[7]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "piVar2[1] = 0;" (assignment_expression "piVar2[1] = 0" (subscript_expression "piVar2[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "piVar2[2] = param_1;" (assignment_expression "piVar2[2] = param_1" (subscript_expression "piVar2[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "local_15 = (undefined1)param_1;" (assignment_expression "local_15 = (undefined1)param_1" identifier = (cast_expression "(undefined1)param_1" ( (type_descriptor "undefined1" type_identifier) ) identifier)) ;) (expression_statement "FUN_0003aef4(piVar2,&local_15,1);" (call_expression "FUN_0003aef4(piVar2,&local_15,1)" identifier (argument_list "(piVar2,&local_15,1)" ( identifier , (pointer_expression "&local_15" & identifier) , number_literal ))) ;) (expression_statement "piVar3 = *(int **)puVar1;" (assignment_expression "piVar3 = *(int **)puVar1" identifier = (pointer_expression "*(int **)puVar1" * (cast_expression "(int **)puVar1" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (expression_statement "piVar2[9] = 0;" (assignment_expression "piVar2[9] = 0" (subscript_expression "piVar2[9]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "piVar2[10] = 0;" (assignment_expression "piVar2[10] = 0" (subscript_expression "piVar2[10]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "piVar2[5] = piVar2[4] + *piVar2;" (assignment_expression "piVar2[5] = piVar2[4] + *piVar2" (subscript_expression "piVar2[5]" identifier [ number_literal ]) = (binary_expression "piVar2[4] + *piVar2" (subscript_expression "piVar2[4]" identifier [ number_literal ]) + (pointer_expression "*piVar2" * identifier))) ;) (if_statement "if (local_14 == piVar3) {\n    return piVar2;\n  }" if (parenthesized_expression "(local_14 == piVar3)" ( (binary_expression "local_14 == piVar3" identifier == identifier) )) (compound_statement "{\n    return piVar2;\n  }" { (return_statement "return piVar2;" return identifier ;) })) (expression_statement "(*(code *)PTR___stack_chk_fail_000b2ed8)();" (call_expression "(*(code *)PTR___stack_chk_fail_000b2ed8)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_000b2ed8)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_000b2ed8" * (cast_expression "(code *)PTR___stack_chk_fail_000b2ed8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "FUN_0003aef4();" (call_expression "FUN_0003aef4()" identifier (argument_list "()" ( ))) ;) (expression_statement "*(char *)(piVar3[4] + piVar3[6] + -4) = (char)((uint)(*piVar3 - piVar3[6]) >> 0x18);" (assignment_expression "*(char *)(piVar3[4] + piVar3[6] + -4) = (char)((uint)(*piVar3 - piVar3[6]) >> 0x18)" (pointer_expression "*(char *)(piVar3[4] + piVar3[6] + -4)" * (cast_expression "(char *)(piVar3[4] + piVar3[6] + -4)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar3[4] + piVar3[6] + -4)" ( (binary_expression "piVar3[4] + piVar3[6] + -4" (binary_expression "piVar3[4] + piVar3[6]" (subscript_expression "piVar3[4]" identifier [ number_literal ]) + (subscript_expression "piVar3[6]" identifier [ number_literal ])) + number_literal) )))) = (cast_expression "(char)((uint)(*piVar3 - piVar3[6]) >> 0x18)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)(*piVar3 - piVar3[6]) >> 0x18)" ( (binary_expression "(uint)(*piVar3 - piVar3[6]) >> 0x18" (call_expression "(uint)(*piVar3 - piVar3[6])" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*piVar3 - piVar3[6])" ( (binary_expression "*piVar3 - piVar3[6]" (pointer_expression "*piVar3" * identifier) - (subscript_expression "piVar3[6]" identifier [ number_literal ])) ))) >> number_literal) )))) ;) (expression_statement "*(char *)(piVar3[4] + piVar3[6] + -3) = (char)((uint)(*piVar3 - piVar3[6]) >> 0x10);" (assignment_expression "*(char *)(piVar3[4] + piVar3[6] + -3) = (char)((uint)(*piVar3 - piVar3[6]) >> 0x10)" (pointer_expression "*(char *)(piVar3[4] + piVar3[6] + -3)" * (cast_expression "(char *)(piVar3[4] + piVar3[6] + -3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar3[4] + piVar3[6] + -3)" ( (binary_expression "piVar3[4] + piVar3[6] + -3" (binary_expression "piVar3[4] + piVar3[6]" (subscript_expression "piVar3[4]" identifier [ number_literal ]) + (subscript_expression "piVar3[6]" identifier [ number_literal ])) + number_literal) )))) = (cast_expression "(char)((uint)(*piVar3 - piVar3[6]) >> 0x10)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)(*piVar3 - piVar3[6]) >> 0x10)" ( (binary_expression "(uint)(*piVar3 - piVar3[6]) >> 0x10" (call_expression "(uint)(*piVar3 - piVar3[6])" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*piVar3 - piVar3[6])" ( (binary_expression "*piVar3 - piVar3[6]" (pointer_expression "*piVar3" * identifier) - (subscript_expression "piVar3[6]" identifier [ number_literal ])) ))) >> number_literal) )))) ;) (expression_statement "*(char *)(piVar3[4] + piVar3[6] + -2) = (char)((uint)(*piVar3 - piVar3[6]) >> 8);" (assignment_expression "*(char *)(piVar3[4] + piVar3[6] + -2) = (char)((uint)(*piVar3 - piVar3[6]) >> 8)" (pointer_expression "*(char *)(piVar3[4] + piVar3[6] + -2)" * (cast_expression "(char *)(piVar3[4] + piVar3[6] + -2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar3[4] + piVar3[6] + -2)" ( (binary_expression "piVar3[4] + piVar3[6] + -2" (binary_expression "piVar3[4] + piVar3[6]" (subscript_expression "piVar3[4]" identifier [ number_literal ]) + (subscript_expression "piVar3[6]" identifier [ number_literal ])) + number_literal) )))) = (cast_expression "(char)((uint)(*piVar3 - piVar3[6]) >> 8)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)(*piVar3 - piVar3[6]) >> 8)" ( (binary_expression "(uint)(*piVar3 - piVar3[6]) >> 8" (call_expression "(uint)(*piVar3 - piVar3[6])" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*piVar3 - piVar3[6])" ( (binary_expression "*piVar3 - piVar3[6]" (pointer_expression "*piVar3" * identifier) - (subscript_expression "piVar3[6]" identifier [ number_literal ])) ))) >> number_literal) )))) ;) (expression_statement "piVar2 = (int *)(piVar3[4] + piVar3[6]);" (assignment_expression "piVar2 = (int *)(piVar3[4] + piVar3[6])" identifier = (cast_expression "(int *)(piVar3[4] + piVar3[6])" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar3[4] + piVar3[6])" ( (binary_expression "piVar3[4] + piVar3[6]" (subscript_expression "piVar3[4]" identifier [ number_literal ]) + (subscript_expression "piVar3[6]" identifier [ number_literal ])) )))) ;) (expression_statement "*(char *)((int)piVar2 + -1) = (char)*piVar3 - (char)piVar3[6];" (assignment_expression "*(char *)((int)piVar2 + -1) = (char)*piVar3 - (char)piVar3[6]" (pointer_expression "*(char *)((int)piVar2 + -1)" * (cast_expression "(char *)((int)piVar2 + -1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)piVar2 + -1)" ( (binary_expression "(int)piVar2 + -1" (cast_expression "(int)piVar2" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = (binary_expression "(char)*piVar3 - (char)piVar3[6]" (cast_expression "(char)*piVar3" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*piVar3" * identifier)) - (cast_expression "(char)piVar3[6]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "piVar3[6]" identifier [ number_literal ])))) ;) (return_statement "return piVar2;" return identifier ;) })))
(translation_unit "Packet * ssh2_pkt_init(int pkt_type)\n\n{\n  Packet *pkt;\n  undefined1 uStack_15;\n  undefined4 local_14;\n  \n  local_14 = *(undefined4 *)PTR___stack_chk_guard_000b2f04;\n  pkt = (Packet *)safemalloc(1,0x2c);\n  pkt->data = (uchar *)0x0;\n  pkt->length = 5;\n  pkt->body = (uchar *)0x0;\n  pkt->maxlen = 0;\n  pkt->forcepad = 0;\n  pkt->type = pkt_type;\n  uStack_15 = (undefined1)pkt_type;\n                    /* WARNING: Subroutine does not return */\n  ssh_pkt_adddata(pkt,&uStack_15,1);\n}\n\n" (function_definition "Packet * ssh2_pkt_init(int pkt_type)\n\n{\n  Packet *pkt;\n  undefined1 uStack_15;\n  undefined4 local_14;\n  \n  local_14 = *(undefined4 *)PTR___stack_chk_guard_000b2f04;\n  pkt = (Packet *)safemalloc(1,0x2c);\n  pkt->data = (uchar *)0x0;\n  pkt->length = 5;\n  pkt->body = (uchar *)0x0;\n  pkt->maxlen = 0;\n  pkt->forcepad = 0;\n  pkt->type = pkt_type;\n  uStack_15 = (undefined1)pkt_type;\n                    /* WARNING: Subroutine does not return */\n  ssh_pkt_adddata(pkt,&uStack_15,1);\n}" type_identifier (pointer_declarator "* ssh2_pkt_init(int pkt_type)" * (function_declarator "ssh2_pkt_init(int pkt_type)" identifier (parameter_list "(int pkt_type)" ( (parameter_declaration "int pkt_type" primitive_type identifier) )))) (compound_statement "{\n  Packet *pkt;\n  undefined1 uStack_15;\n  undefined4 local_14;\n  \n  local_14 = *(undefined4 *)PTR___stack_chk_guard_000b2f04;\n  pkt = (Packet *)safemalloc(1,0x2c);\n  pkt->data = (uchar *)0x0;\n  pkt->length = 5;\n  pkt->body = (uchar *)0x0;\n  pkt->maxlen = 0;\n  pkt->forcepad = 0;\n  pkt->type = pkt_type;\n  uStack_15 = (undefined1)pkt_type;\n                    /* WARNING: Subroutine does not return */\n  ssh_pkt_adddata(pkt,&uStack_15,1);\n}" { (declaration "Packet *pkt;" type_identifier (pointer_declarator "*pkt" * identifier) ;) (declaration "undefined1 uStack_15;" type_identifier identifier ;) (declaration "undefined4 local_14;" type_identifier identifier ;) (expression_statement "local_14 = *(undefined4 *)PTR___stack_chk_guard_000b2f04;" (assignment_expression "local_14 = *(undefined4 *)PTR___stack_chk_guard_000b2f04" identifier = (pointer_expression "*(undefined4 *)PTR___stack_chk_guard_000b2f04" * (cast_expression "(undefined4 *)PTR___stack_chk_guard_000b2f04" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "pkt = (Packet *)safemalloc(1,0x2c);" (assignment_expression "pkt = (Packet *)safemalloc(1,0x2c)" identifier = (cast_expression "(Packet *)safemalloc(1,0x2c)" ( (type_descriptor "Packet *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "safemalloc(1,0x2c)" identifier (argument_list "(1,0x2c)" ( number_literal , number_literal ))))) ;) (expression_statement "pkt->data = (uchar *)0x0;" (assignment_expression "pkt->data = (uchar *)0x0" (field_expression "pkt->data" identifier -> field_identifier) = (cast_expression "(uchar *)0x0" ( (type_descriptor "uchar *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "pkt->length = 5;" (assignment_expression "pkt->length = 5" (field_expression "pkt->length" identifier -> field_identifier) = number_literal) ;) (expression_statement "pkt->body = (uchar *)0x0;" (assignment_expression "pkt->body = (uchar *)0x0" (field_expression "pkt->body" identifier -> field_identifier) = (cast_expression "(uchar *)0x0" ( (type_descriptor "uchar *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "pkt->maxlen = 0;" (assignment_expression "pkt->maxlen = 0" (field_expression "pkt->maxlen" identifier -> field_identifier) = number_literal) ;) (expression_statement "pkt->forcepad = 0;" (assignment_expression "pkt->forcepad = 0" (field_expression "pkt->forcepad" identifier -> field_identifier) = number_literal) ;) (expression_statement "pkt->type = pkt_type;" (assignment_expression "pkt->type = pkt_type" (field_expression "pkt->type" identifier -> field_identifier) = identifier) ;) (expression_statement "uStack_15 = (undefined1)pkt_type;" (assignment_expression "uStack_15 = (undefined1)pkt_type" identifier = (cast_expression "(undefined1)pkt_type" ( (type_descriptor "undefined1" type_identifier) ) identifier)) ;) comment (expression_statement "ssh_pkt_adddata(pkt,&uStack_15,1);" (call_expression "ssh_pkt_adddata(pkt,&uStack_15,1)" identifier (argument_list "(pkt,&uStack_15,1)" ( identifier , (pointer_expression "&uStack_15" & identifier) , number_literal ))) ;) })))
(translation_unit "int * FUN_0003b04c(int param_1)\n\n{\n  undefined *puVar1;\n  int *piVar2;\n  int *piVar3;\n  undefined1 local_15;\n  int *local_14;\n  \n  puVar1 = PTR___stack_chk_guard_000b2f04;\n  local_14 = *(int **)PTR___stack_chk_guard_000b2f04;\n  piVar2 = (int *)safemalloc(1,0x2c);\n  piVar2[4] = 0;\n  *piVar2 = 5;\n  piVar2[5] = 0;\n  piVar2[7] = 0;\n  piVar2[1] = 0;\n  piVar2[2] = param_1;\n  local_15 = (undefined1)param_1;\n  FUN_0003aef4(piVar2,&local_15,1);\n  piVar3 = *(int **)puVar1;\n  piVar2[9] = 0;\n  piVar2[10] = 0;\n  piVar2[5] = piVar2[4] + *piVar2;\n  if (local_14 == piVar3) {\n    return piVar2;\n  }\n  (*(code *)PTR___stack_chk_fail_000b2ed8)();\n  FUN_0003aef4();\n  *(char *)(piVar3[4] + piVar3[6] + -4) = (char)((uint)(*piVar3 - piVar3[6]) >> 0x18);\n  *(char *)(piVar3[4] + piVar3[6] + -3) = (char)((uint)(*piVar3 - piVar3[6]) >> 0x10);\n  *(char *)(piVar3[4] + piVar3[6] + -2) = (char)((uint)(*piVar3 - piVar3[6]) >> 8);\n  piVar2 = (int *)(piVar3[4] + piVar3[6]);\n  *(char *)((int)piVar2 + -1) = (char)*piVar3 - (char)piVar3[6];\n  return piVar2;\n}\n\n" (function_definition "int * FUN_0003b04c(int param_1)\n\n{\n  undefined *puVar1;\n  int *piVar2;\n  int *piVar3;\n  undefined1 local_15;\n  int *local_14;\n  \n  puVar1 = PTR___stack_chk_guard_000b2f04;\n  local_14 = *(int **)PTR___stack_chk_guard_000b2f04;\n  piVar2 = (int *)safemalloc(1,0x2c);\n  piVar2[4] = 0;\n  *piVar2 = 5;\n  piVar2[5] = 0;\n  piVar2[7] = 0;\n  piVar2[1] = 0;\n  piVar2[2] = param_1;\n  local_15 = (undefined1)param_1;\n  FUN_0003aef4(piVar2,&local_15,1);\n  piVar3 = *(int **)puVar1;\n  piVar2[9] = 0;\n  piVar2[10] = 0;\n  piVar2[5] = piVar2[4] + *piVar2;\n  if (local_14 == piVar3) {\n    return piVar2;\n  }\n  (*(code *)PTR___stack_chk_fail_000b2ed8)();\n  FUN_0003aef4();\n  *(char *)(piVar3[4] + piVar3[6] + -4) = (char)((uint)(*piVar3 - piVar3[6]) >> 0x18);\n  *(char *)(piVar3[4] + piVar3[6] + -3) = (char)((uint)(*piVar3 - piVar3[6]) >> 0x10);\n  *(char *)(piVar3[4] + piVar3[6] + -2) = (char)((uint)(*piVar3 - piVar3[6]) >> 8);\n  piVar2 = (int *)(piVar3[4] + piVar3[6]);\n  *(char *)((int)piVar2 + -1) = (char)*piVar3 - (char)piVar3[6];\n  return piVar2;\n}" primitive_type (pointer_declarator "* FUN_0003b04c(int param_1)" * (function_declarator "FUN_0003b04c(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) )))) (compound_statement "{\n  undefined *puVar1;\n  int *piVar2;\n  int *piVar3;\n  undefined1 local_15;\n  int *local_14;\n  \n  puVar1 = PTR___stack_chk_guard_000b2f04;\n  local_14 = *(int **)PTR___stack_chk_guard_000b2f04;\n  piVar2 = (int *)safemalloc(1,0x2c);\n  piVar2[4] = 0;\n  *piVar2 = 5;\n  piVar2[5] = 0;\n  piVar2[7] = 0;\n  piVar2[1] = 0;\n  piVar2[2] = param_1;\n  local_15 = (undefined1)param_1;\n  FUN_0003aef4(piVar2,&local_15,1);\n  piVar3 = *(int **)puVar1;\n  piVar2[9] = 0;\n  piVar2[10] = 0;\n  piVar2[5] = piVar2[4] + *piVar2;\n  if (local_14 == piVar3) {\n    return piVar2;\n  }\n  (*(code *)PTR___stack_chk_fail_000b2ed8)();\n  FUN_0003aef4();\n  *(char *)(piVar3[4] + piVar3[6] + -4) = (char)((uint)(*piVar3 - piVar3[6]) >> 0x18);\n  *(char *)(piVar3[4] + piVar3[6] + -3) = (char)((uint)(*piVar3 - piVar3[6]) >> 0x10);\n  *(char *)(piVar3[4] + piVar3[6] + -2) = (char)((uint)(*piVar3 - piVar3[6]) >> 8);\n  piVar2 = (int *)(piVar3[4] + piVar3[6]);\n  *(char *)((int)piVar2 + -1) = (char)*piVar3 - (char)piVar3[6];\n  return piVar2;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "undefined1 local_15;" type_identifier identifier ;) (declaration "int *local_14;" primitive_type (pointer_declarator "*local_14" * identifier) ;) (expression_statement "puVar1 = PTR___stack_chk_guard_000b2f04;" (assignment_expression "puVar1 = PTR___stack_chk_guard_000b2f04" identifier = identifier) ;) (expression_statement "local_14 = *(int **)PTR___stack_chk_guard_000b2f04;" (assignment_expression "local_14 = *(int **)PTR___stack_chk_guard_000b2f04" identifier = (pointer_expression "*(int **)PTR___stack_chk_guard_000b2f04" * (cast_expression "(int **)PTR___stack_chk_guard_000b2f04" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (expression_statement "piVar2 = (int *)safemalloc(1,0x2c);" (assignment_expression "piVar2 = (int *)safemalloc(1,0x2c)" identifier = (cast_expression "(int *)safemalloc(1,0x2c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "safemalloc(1,0x2c)" identifier (argument_list "(1,0x2c)" ( number_literal , number_literal ))))) ;) (expression_statement "piVar2[4] = 0;" (assignment_expression "piVar2[4] = 0" (subscript_expression "piVar2[4]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*piVar2 = 5;" (assignment_expression "*piVar2 = 5" (pointer_expression "*piVar2" * identifier) = number_literal) ;) (expression_statement "piVar2[5] = 0;" (assignment_expression "piVar2[5] = 0" (subscript_expression "piVar2[5]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "piVar2[7] = 0;" (assignment_expression "piVar2[7] = 0" (subscript_expression "piVar2[7]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "piVar2[1] = 0;" (assignment_expression "piVar2[1] = 0" (subscript_expression "piVar2[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "piVar2[2] = param_1;" (assignment_expression "piVar2[2] = param_1" (subscript_expression "piVar2[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "local_15 = (undefined1)param_1;" (assignment_expression "local_15 = (undefined1)param_1" identifier = (cast_expression "(undefined1)param_1" ( (type_descriptor "undefined1" type_identifier) ) identifier)) ;) (expression_statement "FUN_0003aef4(piVar2,&local_15,1);" (call_expression "FUN_0003aef4(piVar2,&local_15,1)" identifier (argument_list "(piVar2,&local_15,1)" ( identifier , (pointer_expression "&local_15" & identifier) , number_literal ))) ;) (expression_statement "piVar3 = *(int **)puVar1;" (assignment_expression "piVar3 = *(int **)puVar1" identifier = (pointer_expression "*(int **)puVar1" * (cast_expression "(int **)puVar1" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (expression_statement "piVar2[9] = 0;" (assignment_expression "piVar2[9] = 0" (subscript_expression "piVar2[9]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "piVar2[10] = 0;" (assignment_expression "piVar2[10] = 0" (subscript_expression "piVar2[10]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "piVar2[5] = piVar2[4] + *piVar2;" (assignment_expression "piVar2[5] = piVar2[4] + *piVar2" (subscript_expression "piVar2[5]" identifier [ number_literal ]) = (binary_expression "piVar2[4] + *piVar2" (subscript_expression "piVar2[4]" identifier [ number_literal ]) + (pointer_expression "*piVar2" * identifier))) ;) (if_statement "if (local_14 == piVar3) {\n    return piVar2;\n  }" if (parenthesized_expression "(local_14 == piVar3)" ( (binary_expression "local_14 == piVar3" identifier == identifier) )) (compound_statement "{\n    return piVar2;\n  }" { (return_statement "return piVar2;" return identifier ;) })) (expression_statement "(*(code *)PTR___stack_chk_fail_000b2ed8)();" (call_expression "(*(code *)PTR___stack_chk_fail_000b2ed8)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_000b2ed8)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_000b2ed8" * (cast_expression "(code *)PTR___stack_chk_fail_000b2ed8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (expression_statement "FUN_0003aef4();" (call_expression "FUN_0003aef4()" identifier (argument_list "()" ( ))) ;) (expression_statement "*(char *)(piVar3[4] + piVar3[6] + -4) = (char)((uint)(*piVar3 - piVar3[6]) >> 0x18);" (assignment_expression "*(char *)(piVar3[4] + piVar3[6] + -4) = (char)((uint)(*piVar3 - piVar3[6]) >> 0x18)" (pointer_expression "*(char *)(piVar3[4] + piVar3[6] + -4)" * (cast_expression "(char *)(piVar3[4] + piVar3[6] + -4)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar3[4] + piVar3[6] + -4)" ( (binary_expression "piVar3[4] + piVar3[6] + -4" (binary_expression "piVar3[4] + piVar3[6]" (subscript_expression "piVar3[4]" identifier [ number_literal ]) + (subscript_expression "piVar3[6]" identifier [ number_literal ])) + number_literal) )))) = (cast_expression "(char)((uint)(*piVar3 - piVar3[6]) >> 0x18)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)(*piVar3 - piVar3[6]) >> 0x18)" ( (binary_expression "(uint)(*piVar3 - piVar3[6]) >> 0x18" (call_expression "(uint)(*piVar3 - piVar3[6])" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*piVar3 - piVar3[6])" ( (binary_expression "*piVar3 - piVar3[6]" (pointer_expression "*piVar3" * identifier) - (subscript_expression "piVar3[6]" identifier [ number_literal ])) ))) >> number_literal) )))) ;) (expression_statement "*(char *)(piVar3[4] + piVar3[6] + -3) = (char)((uint)(*piVar3 - piVar3[6]) >> 0x10);" (assignment_expression "*(char *)(piVar3[4] + piVar3[6] + -3) = (char)((uint)(*piVar3 - piVar3[6]) >> 0x10)" (pointer_expression "*(char *)(piVar3[4] + piVar3[6] + -3)" * (cast_expression "(char *)(piVar3[4] + piVar3[6] + -3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar3[4] + piVar3[6] + -3)" ( (binary_expression "piVar3[4] + piVar3[6] + -3" (binary_expression "piVar3[4] + piVar3[6]" (subscript_expression "piVar3[4]" identifier [ number_literal ]) + (subscript_expression "piVar3[6]" identifier [ number_literal ])) + number_literal) )))) = (cast_expression "(char)((uint)(*piVar3 - piVar3[6]) >> 0x10)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)(*piVar3 - piVar3[6]) >> 0x10)" ( (binary_expression "(uint)(*piVar3 - piVar3[6]) >> 0x10" (call_expression "(uint)(*piVar3 - piVar3[6])" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*piVar3 - piVar3[6])" ( (binary_expression "*piVar3 - piVar3[6]" (pointer_expression "*piVar3" * identifier) - (subscript_expression "piVar3[6]" identifier [ number_literal ])) ))) >> number_literal) )))) ;) (expression_statement "*(char *)(piVar3[4] + piVar3[6] + -2) = (char)((uint)(*piVar3 - piVar3[6]) >> 8);" (assignment_expression "*(char *)(piVar3[4] + piVar3[6] + -2) = (char)((uint)(*piVar3 - piVar3[6]) >> 8)" (pointer_expression "*(char *)(piVar3[4] + piVar3[6] + -2)" * (cast_expression "(char *)(piVar3[4] + piVar3[6] + -2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar3[4] + piVar3[6] + -2)" ( (binary_expression "piVar3[4] + piVar3[6] + -2" (binary_expression "piVar3[4] + piVar3[6]" (subscript_expression "piVar3[4]" identifier [ number_literal ]) + (subscript_expression "piVar3[6]" identifier [ number_literal ])) + number_literal) )))) = (cast_expression "(char)((uint)(*piVar3 - piVar3[6]) >> 8)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)(*piVar3 - piVar3[6]) >> 8)" ( (binary_expression "(uint)(*piVar3 - piVar3[6]) >> 8" (call_expression "(uint)(*piVar3 - piVar3[6])" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*piVar3 - piVar3[6])" ( (binary_expression "*piVar3 - piVar3[6]" (pointer_expression "*piVar3" * identifier) - (subscript_expression "piVar3[6]" identifier [ number_literal ])) ))) >> number_literal) )))) ;) (expression_statement "piVar2 = (int *)(piVar3[4] + piVar3[6]);" (assignment_expression "piVar2 = (int *)(piVar3[4] + piVar3[6])" identifier = (cast_expression "(int *)(piVar3[4] + piVar3[6])" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar3[4] + piVar3[6])" ( (binary_expression "piVar3[4] + piVar3[6]" (subscript_expression "piVar3[4]" identifier [ number_literal ]) + (subscript_expression "piVar3[6]" identifier [ number_literal ])) )))) ;) (expression_statement "*(char *)((int)piVar2 + -1) = (char)*piVar3 - (char)piVar3[6];" (assignment_expression "*(char *)((int)piVar2 + -1) = (char)*piVar3 - (char)piVar3[6]" (pointer_expression "*(char *)((int)piVar2 + -1)" * (cast_expression "(char *)((int)piVar2 + -1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)piVar2 + -1)" ( (binary_expression "(int)piVar2 + -1" (cast_expression "(int)piVar2" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = (binary_expression "(char)*piVar3 - (char)piVar3[6]" (cast_expression "(char)*piVar3" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*piVar3" * identifier)) - (cast_expression "(char)piVar3[6]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "piVar3[6]" identifier [ number_literal ])))) ;) (return_statement "return piVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) IDENT))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT , LIT ))))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (pointer_expression & IDENT) , LIT ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) IDENT))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression (subscript_expression IDENT [ LIT ]) + (pointer_expression * IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (subscript_expression IDENT [ LIT ]) + (subscript_expression IDENT [ LIT ])) + LIT) )))) = (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (pointer_expression * IDENT) - (subscript_expression IDENT [ LIT ])) ))) >> LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (subscript_expression IDENT [ LIT ]) + (subscript_expression IDENT [ LIT ])) + LIT) )))) = (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (pointer_expression * IDENT) - (subscript_expression IDENT [ LIT ])) ))) >> LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (subscript_expression IDENT [ LIT ]) + (subscript_expression IDENT [ LIT ])) + LIT) )))) = (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (pointer_expression * IDENT) - (subscript_expression IDENT [ LIT ])) ))) >> LIT) )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + (subscript_expression IDENT [ LIT ])) )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) = (binary_expression (cast_expression ( (type_descriptor TYPE) ) (pointer_expression * IDENT)) - (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])))) ;) (return_statement return IDENT ;) })))
(function_definition "int * FUN_0003b04c(int param_1)\n\n{\n  undefined *puVar1;\n  int *piVar2;\n  int *piVar3;\n  undefined1 local_15;\n  int *local_14;\n  \n  puVar1 = PTR___stack_chk_guard_000b2f04;\n  local_14 = *(int **)PTR___stack_chk_guard_000b2f04;\n  piVar2 = (int *)safemalloc(1,0x2c);\n  piVar2[4] = 0;\n  *piVar2 = 5;\n  piVar2[5] = 0;\n  piVar2[7] = 0;\n  piVar2[1] = 0;\n  piVar2[2] = param_1;\n  local_15 = (undefined1)param_1;\n  FUN_0003aef4(piVar2,&local_15,1);\n  piVar3 = *(int **)puVar1;\n  piVar2[9] = 0;\n  piVar2[10] = 0;\n  piVar2[5] = piVar2[4] + *piVar2;\n  if (local_14 == piVar3) {\n    return piVar2;\n  }\n  (*(code *)PTR___stack_chk_fail_000b2ed8)();\n  FUN_0003aef4();\n  *(char *)(piVar3[4] + piVar3[6] + -4) = (char)((uint)(*piVar3 - piVar3[6]) >> 0x18);\n  *(char *)(piVar3[4] + piVar3[6] + -3) = (char)((uint)(*piVar3 - piVar3[6]) >> 0x10);\n  *(char *)(piVar3[4] + piVar3[6] + -2) = (char)((uint)(*piVar3 - piVar3[6]) >> 8);\n  piVar2 = (int *)(piVar3[4] + piVar3[6]);\n  *(char *)((int)piVar2 + -1) = (char)*piVar3 - (char)piVar3[6];\n  return piVar2;\n}" (primitive_type "int") (pointer_declarator "* FUN_0003b04c(int param_1)" (* "*") (function_declarator "FUN_0003b04c(int param_1)" (identifier "FUN_0003b04c") (parameter_list "(int param_1)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) () ")")))) (compound_statement "{\n  undefined *puVar1;\n  int *piVar2;\n  int *piVar3;\n  undefined1 local_15;\n  int *local_14;\n  \n  puVar1 = PTR___stack_chk_guard_000b2f04;\n  local_14 = *(int **)PTR___stack_chk_guard_000b2f04;\n  piVar2 = (int *)safemalloc(1,0x2c);\n  piVar2[4] = 0;\n  *piVar2 = 5;\n  piVar2[5] = 0;\n  piVar2[7] = 0;\n  piVar2[1] = 0;\n  piVar2[2] = param_1;\n  local_15 = (undefined1)param_1;\n  FUN_0003aef4(piVar2,&local_15,1);\n  piVar3 = *(int **)puVar1;\n  piVar2[9] = 0;\n  piVar2[10] = 0;\n  piVar2[5] = piVar2[4] + *piVar2;\n  if (local_14 == piVar3) {\n    return piVar2;\n  }\n  (*(code *)PTR___stack_chk_fail_000b2ed8)();\n  FUN_0003aef4();\n  *(char *)(piVar3[4] + piVar3[6] + -4) = (char)((uint)(*piVar3 - piVar3[6]) >> 0x18);\n  *(char *)(piVar3[4] + piVar3[6] + -3) = (char)((uint)(*piVar3 - piVar3[6]) >> 0x10);\n  *(char *)(piVar3[4] + piVar3[6] + -2) = (char)((uint)(*piVar3 - piVar3[6]) >> 8);\n  piVar2 = (int *)(piVar3[4] + piVar3[6]);\n  *(char *)((int)piVar2 + -1) = (char)*piVar3 - (char)piVar3[6];\n  return piVar2;\n}" ({ "{") (declaration "undefined *puVar1;" (type_identifier "undefined") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (declaration "int *piVar3;" (primitive_type "int") (pointer_declarator "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (declaration "undefined1 local_15;" (type_identifier "undefined1") (identifier "local_15") (; ";")) (declaration "int *local_14;" (primitive_type "int") (pointer_declarator "*local_14" (* "*") (identifier "local_14")) (; ";")) (expression_statement "puVar1 = PTR___stack_chk_guard_000b2f04;" (assignment_expression "puVar1 = PTR___stack_chk_guard_000b2f04" (identifier "puVar1") (= "=") (identifier "PTR___stack_chk_guard_000b2f04")) (; ";")) (expression_statement "local_14 = *(int **)PTR___stack_chk_guard_000b2f04;" (assignment_expression "local_14 = *(int **)PTR___stack_chk_guard_000b2f04" (identifier "local_14") (= "=") (pointer_expression "*(int **)PTR___stack_chk_guard_000b2f04" (* "*") (cast_expression "(int **)PTR___stack_chk_guard_000b2f04" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (identifier "PTR___stack_chk_guard_000b2f04")))) (; ";")) (expression_statement "piVar2 = (int *)safemalloc(1,0x2c);" (assignment_expression "piVar2 = (int *)safemalloc(1,0x2c)" (identifier "piVar2") (= "=") (cast_expression "(int *)safemalloc(1,0x2c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "safemalloc(1,0x2c)" (identifier "safemalloc") (argument_list "(1,0x2c)" (( "(") (number_literal "1") (, ",") (number_literal "0x2c") () ")"))))) (; ";")) (expression_statement "piVar2[4] = 0;" (assignment_expression "piVar2[4] = 0" (subscript_expression "piVar2[4]" (identifier "piVar2") ([ "[") (number_literal "4") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "*piVar2 = 5;" (assignment_expression "*piVar2 = 5" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (= "=") (number_literal "5")) (; ";")) (expression_statement "piVar2[5] = 0;" (assignment_expression "piVar2[5] = 0" (subscript_expression "piVar2[5]" (identifier "piVar2") ([ "[") (number_literal "5") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "piVar2[7] = 0;" (assignment_expression "piVar2[7] = 0" (subscript_expression "piVar2[7]" (identifier "piVar2") ([ "[") (number_literal "7") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "piVar2[1] = 0;" (assignment_expression "piVar2[1] = 0" (subscript_expression "piVar2[1]" (identifier "piVar2") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "piVar2[2] = param_1;" (assignment_expression "piVar2[2] = param_1" (subscript_expression "piVar2[2]" (identifier "piVar2") ([ "[") (number_literal "2") (] "]")) (= "=") (identifier "param_1")) (; ";")) (expression_statement "local_15 = (undefined1)param_1;" (assignment_expression "local_15 = (undefined1)param_1" (identifier "local_15") (= "=") (cast_expression "(undefined1)param_1" (( "(") (type_descriptor "undefined1" (type_identifier "undefined1")) () ")") (identifier "param_1"))) (; ";")) (expression_statement "FUN_0003aef4(piVar2,&local_15,1);" (call_expression "FUN_0003aef4(piVar2,&local_15,1)" (identifier "FUN_0003aef4") (argument_list "(piVar2,&local_15,1)" (( "(") (identifier "piVar2") (, ",") (pointer_expression "&local_15" (& "&") (identifier "local_15")) (, ",") (number_literal "1") () ")"))) (; ";")) (expression_statement "piVar3 = *(int **)puVar1;" (assignment_expression "piVar3 = *(int **)puVar1" (identifier "piVar3") (= "=") (pointer_expression "*(int **)puVar1" (* "*") (cast_expression "(int **)puVar1" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (identifier "puVar1")))) (; ";")) (expression_statement "piVar2[9] = 0;" (assignment_expression "piVar2[9] = 0" (subscript_expression "piVar2[9]" (identifier "piVar2") ([ "[") (number_literal "9") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "piVar2[10] = 0;" (assignment_expression "piVar2[10] = 0" (subscript_expression "piVar2[10]" (identifier "piVar2") ([ "[") (number_literal "10") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "piVar2[5] = piVar2[4] + *piVar2;" (assignment_expression "piVar2[5] = piVar2[4] + *piVar2" (subscript_expression "piVar2[5]" (identifier "piVar2") ([ "[") (number_literal "5") (] "]")) (= "=") (binary_expression "piVar2[4] + *piVar2" (subscript_expression "piVar2[4]" (identifier "piVar2") ([ "[") (number_literal "4") (] "]")) (+ "+") (pointer_expression "*piVar2" (* "*") (identifier "piVar2")))) (; ";")) (if_statement "if (local_14 == piVar3) {\n    return piVar2;\n  }" (if "if") (parenthesized_expression "(local_14 == piVar3)" (( "(") (binary_expression "local_14 == piVar3" (identifier "local_14") (== "==") (identifier "piVar3")) () ")")) (compound_statement "{\n    return piVar2;\n  }" ({ "{") (return_statement "return piVar2;" (return "return") (identifier "piVar2") (; ";")) (} "}"))) (expression_statement "(*(code *)PTR___stack_chk_fail_000b2ed8)();" (call_expression "(*(code *)PTR___stack_chk_fail_000b2ed8)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_000b2ed8)" (( "(") (pointer_expression "*(code *)PTR___stack_chk_fail_000b2ed8" (* "*") (cast_expression "(code *)PTR___stack_chk_fail_000b2ed8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___stack_chk_fail_000b2ed8"))) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "FUN_0003aef4();" (call_expression "FUN_0003aef4()" (identifier "FUN_0003aef4") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "*(char *)(piVar3[4] + piVar3[6] + -4) = (char)((uint)(*piVar3 - piVar3[6]) >> 0x18);" (assignment_expression "*(char *)(piVar3[4] + piVar3[6] + -4) = (char)((uint)(*piVar3 - piVar3[6]) >> 0x18)" (pointer_expression "*(char *)(piVar3[4] + piVar3[6] + -4)" (* "*") (cast_expression "(char *)(piVar3[4] + piVar3[6] + -4)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(piVar3[4] + piVar3[6] + -4)" (( "(") (binary_expression "piVar3[4] + piVar3[6] + -4" (binary_expression "piVar3[4] + piVar3[6]" (subscript_expression "piVar3[4]" (identifier "piVar3") ([ "[") (number_literal "4") (] "]")) (+ "+") (subscript_expression "piVar3[6]" (identifier "piVar3") ([ "[") (number_literal "6") (] "]"))) (+ "+") (number_literal "-4")) () ")")))) (= "=") (cast_expression "(char)((uint)(*piVar3 - piVar3[6]) >> 0x18)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (parenthesized_expression "((uint)(*piVar3 - piVar3[6]) >> 0x18)" (( "(") (binary_expression "(uint)(*piVar3 - piVar3[6]) >> 0x18" (call_expression "(uint)(*piVar3 - piVar3[6])" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(*piVar3 - piVar3[6])" (( "(") (binary_expression "*piVar3 - piVar3[6]" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (- "-") (subscript_expression "piVar3[6]" (identifier "piVar3") ([ "[") (number_literal "6") (] "]"))) () ")"))) (>> ">>") (number_literal "0x18")) () ")")))) (; ";")) (expression_statement "*(char *)(piVar3[4] + piVar3[6] + -3) = (char)((uint)(*piVar3 - piVar3[6]) >> 0x10);" (assignment_expression "*(char *)(piVar3[4] + piVar3[6] + -3) = (char)((uint)(*piVar3 - piVar3[6]) >> 0x10)" (pointer_expression "*(char *)(piVar3[4] + piVar3[6] + -3)" (* "*") (cast_expression "(char *)(piVar3[4] + piVar3[6] + -3)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(piVar3[4] + piVar3[6] + -3)" (( "(") (binary_expression "piVar3[4] + piVar3[6] + -3" (binary_expression "piVar3[4] + piVar3[6]" (subscript_expression "piVar3[4]" (identifier "piVar3") ([ "[") (number_literal "4") (] "]")) (+ "+") (subscript_expression "piVar3[6]" (identifier "piVar3") ([ "[") (number_literal "6") (] "]"))) (+ "+") (number_literal "-3")) () ")")))) (= "=") (cast_expression "(char)((uint)(*piVar3 - piVar3[6]) >> 0x10)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (parenthesized_expression "((uint)(*piVar3 - piVar3[6]) >> 0x10)" (( "(") (binary_expression "(uint)(*piVar3 - piVar3[6]) >> 0x10" (call_expression "(uint)(*piVar3 - piVar3[6])" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(*piVar3 - piVar3[6])" (( "(") (binary_expression "*piVar3 - piVar3[6]" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (- "-") (subscript_expression "piVar3[6]" (identifier "piVar3") ([ "[") (number_literal "6") (] "]"))) () ")"))) (>> ">>") (number_literal "0x10")) () ")")))) (; ";")) (expression_statement "*(char *)(piVar3[4] + piVar3[6] + -2) = (char)((uint)(*piVar3 - piVar3[6]) >> 8);" (assignment_expression "*(char *)(piVar3[4] + piVar3[6] + -2) = (char)((uint)(*piVar3 - piVar3[6]) >> 8)" (pointer_expression "*(char *)(piVar3[4] + piVar3[6] + -2)" (* "*") (cast_expression "(char *)(piVar3[4] + piVar3[6] + -2)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(piVar3[4] + piVar3[6] + -2)" (( "(") (binary_expression "piVar3[4] + piVar3[6] + -2" (binary_expression "piVar3[4] + piVar3[6]" (subscript_expression "piVar3[4]" (identifier "piVar3") ([ "[") (number_literal "4") (] "]")) (+ "+") (subscript_expression "piVar3[6]" (identifier "piVar3") ([ "[") (number_literal "6") (] "]"))) (+ "+") (number_literal "-2")) () ")")))) (= "=") (cast_expression "(char)((uint)(*piVar3 - piVar3[6]) >> 8)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (parenthesized_expression "((uint)(*piVar3 - piVar3[6]) >> 8)" (( "(") (binary_expression "(uint)(*piVar3 - piVar3[6]) >> 8" (call_expression "(uint)(*piVar3 - piVar3[6])" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(*piVar3 - piVar3[6])" (( "(") (binary_expression "*piVar3 - piVar3[6]" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (- "-") (subscript_expression "piVar3[6]" (identifier "piVar3") ([ "[") (number_literal "6") (] "]"))) () ")"))) (>> ">>") (number_literal "8")) () ")")))) (; ";")) (expression_statement "piVar2 = (int *)(piVar3[4] + piVar3[6]);" (assignment_expression "piVar2 = (int *)(piVar3[4] + piVar3[6])" (identifier "piVar2") (= "=") (cast_expression "(int *)(piVar3[4] + piVar3[6])" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(piVar3[4] + piVar3[6])" (( "(") (binary_expression "piVar3[4] + piVar3[6]" (subscript_expression "piVar3[4]" (identifier "piVar3") ([ "[") (number_literal "4") (] "]")) (+ "+") (subscript_expression "piVar3[6]" (identifier "piVar3") ([ "[") (number_literal "6") (] "]"))) () ")")))) (; ";")) (expression_statement "*(char *)((int)piVar2 + -1) = (char)*piVar3 - (char)piVar3[6];" (assignment_expression "*(char *)((int)piVar2 + -1) = (char)*piVar3 - (char)piVar3[6]" (pointer_expression "*(char *)((int)piVar2 + -1)" (* "*") (cast_expression "(char *)((int)piVar2 + -1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)piVar2 + -1)" (( "(") (binary_expression "(int)piVar2 + -1" (cast_expression "(int)piVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "piVar2")) (+ "+") (number_literal "-1")) () ")")))) (= "=") (binary_expression "(char)*piVar3 - (char)piVar3[6]" (cast_expression "(char)*piVar3" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (pointer_expression "*piVar3" (* "*") (identifier "piVar3"))) (- "-") (cast_expression "(char)piVar3[6]" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (subscript_expression "piVar3[6]" (identifier "piVar3") ([ "[") (number_literal "6") (] "]"))))) (; ";")) (return_statement "return piVar2;" (return "return") (identifier "piVar2") (; ";")) (} "}")))

type_1 * function_1(int pkt_type)

{
  type_1 *pkt;
  type_2 uStack_15;
  type_3 local_14;
  
  local_14 = *(type_3 *)PTR___stack_chk_guard_000b2f04;
  pkt = (type_1 *)var_1(1,0x2c);
  pkt->data = (type_4 *)0x0;
  pkt->length = 5;
  pkt->body = (type_4 *)0x0;
  pkt->maxlen = 0;
  pkt->forcepad = 0;
  pkt->type = pkt_type;
  uStack_15 = (type_2)pkt_type;
                    /* WARNING: Subroutine does not return */
  var_2(pkt,&uStack_15,1);
}


(translation_unit (function_definition type: (primitive_type) declarator: (pointer_declarator declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier))))) body: (compound_statement (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: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (number_literal) (number_literal)))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (pointer_expression argument: (identifier)) (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (identifier))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (pointer_expression argument: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (return_statement (identifier)))) (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))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (subscript_expression argument: (identifier) index: (number_literal))) right: (number_literal))))) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (pointer_expression argument: (identifier)) right: (subscript_expression argument: (identifier) index: (number_literal))))) right: (number_literal)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (subscript_expression argument: (identifier) index: (number_literal))) right: (number_literal))))) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (pointer_expression argument: (identifier)) right: (subscript_expression argument: (identifier) index: (number_literal))))) right: (number_literal)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (subscript_expression argument: (identifier) index: (number_literal))) right: (number_literal))))) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (pointer_expression argument: (identifier)) right: (subscript_expression argument: (identifier) index: (number_literal))))) 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: (subscript_expression argument: (identifier) index: (number_literal)) right: (subscript_expression argument: (identifier) index: (number_literal))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))))) right: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (pointer_expression argument: (identifier))) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (subscript_expression argument: (identifier) index: (number_literal)))))) (return_statement (identifier)))))

int * MASKED(int param_1)

{
  undefined *puVar1;
  int *piVar2;
  int *piVar3;
  undefined1 local_15;
  int *local_14;
  
  puVar1 = PTR___stack_chk_guard_000b2f04;
  local_14 = *(int **)PTR___stack_chk_guard_000b2f04;
  piVar2 = (int *)safemalloc(1,0x2c);
  piVar2[4] = 0;
  *piVar2 = 5;
  piVar2[5] = 0;
  piVar2[7] = 0;
  piVar2[1] = 0;
  piVar2[2] = param_1;
  local_15 = (undefined1)param_1;
  FUN_0003aef4(piVar2,&local_15,1);
  piVar3 = *(int **)puVar1;
  piVar2[9] = 0;
  piVar2[10] = 0;
  piVar2[5] = piVar2[4] + *piVar2;
  if (local_14 == piVar3) {
    return piVar2;
  }
  (*(code *)PTR___stack_chk_fail_000b2ed8)();
  FUN_0003aef4();
  *(char *)(piVar3[4] + piVar3[6] + -4) = (char)((uint)(*piVar3 - piVar3[6]) >> 0x18);
  *(char *)(piVar3[4] + piVar3[6] + -3) = (char)((uint)(*piVar3 - piVar3[6]) >> 0x10);
  *(char *)(piVar3[4] + piVar3[6] + -2) = (char)((uint)(*piVar3 - piVar3[6]) >> 8);
  piVar2 = (int *)(piVar3[4] + piVar3[6]);
  *(char *)((int)piVar2 + -1) = (char)*piVar3 - (char)piVar3[6];
  return piVar2;
}

