
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

void ssh1_send_ttymode(void *data,ssh_ttymode *mode,char *val)

{
  char cVar1;
  uint uVar2;
  int in_GS_OFFSET;
  char *next;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x30bc9;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (mode->type == ADDRTYPE_UNSPEC) {
    if (*val == '\0') {
      cVar1 = -1;
    }
    else {
      next = (char *)0x0;
      cVar1 = ctrlparse(val,&next);
      if (next == (char *)0x0) {
        cVar1 = *val;
      }
    }
  }
  else if (mode->type == ADDRTYPE_IPV4) {
    uVar2 = ssh_tty_parse_boolean(val);
    cVar1 = (char)uVar2;
  }
  else {
    cVar1 = '\0';
  }
  next = (char *)CONCAT31(next._1_3_,(char)mode->opcode);
  ssh_pkt_adddata((Packet *)data,&next,1);
  next = (char *)CONCAT31(next._1_3_,cVar1);
  ssh_pkt_adddata((Packet *)data,&next,1);
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail_local();
  }
  return;
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void FUN_00030bc0(undefined4 param_1,int param_2,char *param_3)

{
  char cVar1;
  int in_GS_OFFSET;
  int local_24;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x30bc9;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (*(int *)(param_2 + 8) == 0) {
    if (*param_3 == '\0') {
      cVar1 = -1;
    }
    else {
      local_24 = 0;
      cVar1 = FUN_0001a180(param_3,&local_24);
      if (local_24 == 0) {
        cVar1 = *param_3;
      }
    }
  }
  else if (*(int *)(param_2 + 8) == 1) {
    cVar1 = FUN_00030ab0();
  }
  else {
    cVar1 = '\0';
  }
  local_24._0_1_ = (char)*(undefined4 *)(param_2 + 4);
  FUN_0002e190();
  local_24 = CONCAT31(local_24._1_3_,cVar1);
  FUN_0002e190();
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_0006f2a0();
  }
  return;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00014980
ADD EBX,0x781a7
SUB ESP,0x2c
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x1c],EAX
XOR EAX,EAX
MOV EBP,dword ptr [ESP + 0x44]
MOV EDI,dword ptr [ESP + 0x40]
MOV EDX,dword ptr [ESP + 0x48]
MOV EAX,dword ptr [EBP + 0x8]
TEST EAX,EAX
JZ 0x00030c50
CMP EAX,0x1
JNZ 0x00030c40
MOV EAX,EDX
LEA ESI,[ESP + 0x18]
CALL 0x00030ab0
MOV EBX,EAX
MOV EAX,dword ptr [EBP + 0x4]
MOV ECX,0x1
MOV EDX,ESI
MOV byte ptr [ESP + 0x18],AL
MOV EAX,EDI
CALL 0x0002e190
MOV EAX,EDI
MOV ECX,0x1
MOV EDX,ESI
MOV byte ptr [ESP + 0x18],BL
CALL 0x0002e190
MOV EAX,dword ptr [ESP + 0x1c]
XOR EAX,dword ptr GS:[0x14]
JNZ 0x00030c9a
ADD ESP,0x2c
POP EBX
POP ESI
POP EDI
POP EBP
RET
XOR EBX,EBX
LEA ESI,[ESP + 0x18]
JMP 0x00030c03
CMP byte ptr [EDX],0x0
JNZ 0x00030c60
MOV EBX,0xffffffff
LEA ESI,[ESP + 0x18]
JMP 0x00030c03
MOV dword ptr [ESP + 0x18],0x0
SUB ESP,0x8
LEA ESI,[ESP + 0x20]
PUSH ESI
PUSH EDX
MOV dword ptr [ESP + 0x1c],EDX
CALL 0x0001a180
ADD ESP,0x10
MOV EDX,dword ptr [ESP + 0x18]
TEST EDX,EDX
MOV EDX,dword ptr [ESP + 0xc]
JZ 0x00030c90
MOV EBX,EAX
JMP 0x00030c03
MOVZX EAX,byte ptr [EDX]
MOV EBX,EAX
JMP 0x00030c03
CALL 0x0006f2a0
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_00030bc0(undefined4 param_1,int param_2,char *param_3)\n\n{\n  char cVar1;\n  int in_GS_OFFSET;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x30bc9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (*(int *)(param_2 + 8) == 0) {\n    if (*param_3 == '\0') {\n      cVar1 = -1;\n    }\n    else {\n      local_24 = 0;\n      cVar1 = FUN_0001a180(param_3,&local_24);\n      if (local_24 == 0) {\n        cVar1 = *param_3;\n      }\n    }\n  }\n  else if (*(int *)(param_2 + 8) == 1) {\n    cVar1 = FUN_00030ab0();\n  }\n  else {\n    cVar1 = '\0';\n  }\n  local_24._0_1_ = (char)*(undefined4 *)(param_2 + 4);\n  FUN_0002e190();\n  local_24 = CONCAT31(local_24._1_3_,cVar1);\n  FUN_0002e190();\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0006f2a0();\n  }\n  return;\n}\n\n" comment (function_definition "void FUN_00030bc0(undefined4 param_1,int param_2,char *param_3)\n\n{\n  char cVar1;\n  int in_GS_OFFSET;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x30bc9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (*(int *)(param_2 + 8) == 0) {\n    if (*param_3 == '\0') {\n      cVar1 = -1;\n    }\n    else {\n      local_24 = 0;\n      cVar1 = FUN_0001a180(param_3,&local_24);\n      if (local_24 == 0) {\n        cVar1 = *param_3;\n      }\n    }\n  }\n  else if (*(int *)(param_2 + 8) == 1) {\n    cVar1 = FUN_00030ab0();\n  }\n  else {\n    cVar1 = '\0';\n  }\n  local_24._0_1_ = (char)*(undefined4 *)(param_2 + 4);\n  FUN_0002e190();\n  local_24 = CONCAT31(local_24._1_3_,cVar1);\n  FUN_0002e190();\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0006f2a0();\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00030bc0(undefined4 param_1,int param_2,char *param_3)" identifier (parameter_list "(undefined4 param_1,int param_2,char *param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "char *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  char cVar1;\n  int in_GS_OFFSET;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x30bc9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (*(int *)(param_2 + 8) == 0) {\n    if (*param_3 == '\0') {\n      cVar1 = -1;\n    }\n    else {\n      local_24 = 0;\n      cVar1 = FUN_0001a180(param_3,&local_24);\n      if (local_24 == 0) {\n        cVar1 = *param_3;\n      }\n    }\n  }\n  else if (*(int *)(param_2 + 8) == 1) {\n    cVar1 = FUN_00030ab0();\n  }\n  else {\n    cVar1 = '\0';\n  }\n  local_24._0_1_ = (char)*(undefined4 *)(param_2 + 4);\n  FUN_0002e190();\n  local_24 = CONCAT31(local_24._1_3_,cVar1);\n  FUN_0002e190();\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0006f2a0();\n  }\n  return;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "int local_24;" primitive_type identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x30bc9;" (assignment_expression "uStack_14 = 0x30bc9" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (*(int *)(param_2 + 8) == 0) {\n    if (*param_3 == '\0') {\n      cVar1 = -1;\n    }\n    else {\n      local_24 = 0;\n      cVar1 = FUN_0001a180(param_3,&local_24);\n      if (local_24 == 0) {\n        cVar1 = *param_3;\n      }\n    }\n  }\n  else if (*(int *)(param_2 + 8) == 1) {\n    cVar1 = FUN_00030ab0();\n  }\n  else {\n    cVar1 = '\0';\n  }" if (parenthesized_expression "(*(int *)(param_2 + 8) == 0)" ( (binary_expression "*(int *)(param_2 + 8) == 0" (pointer_expression "*(int *)(param_2 + 8)" * (cast_expression "(int *)(param_2 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    if (*param_3 == '\0') {\n      cVar1 = -1;\n    }\n    else {\n      local_24 = 0;\n      cVar1 = FUN_0001a180(param_3,&local_24);\n      if (local_24 == 0) {\n        cVar1 = *param_3;\n      }\n    }\n  }" { (if_statement "if (*param_3 == '\0') {\n      cVar1 = -1;\n    }\n    else {\n      local_24 = 0;\n      cVar1 = FUN_0001a180(param_3,&local_24);\n      if (local_24 == 0) {\n        cVar1 = *param_3;\n      }\n    }" if (parenthesized_expression "(*param_3 == '\0')" ( (binary_expression "*param_3 == '\0'" (pointer_expression "*param_3" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      cVar1 = -1;\n    }" { (expression_statement "cVar1 = -1;" (assignment_expression "cVar1 = -1" identifier = number_literal) ;) }) (else_clause "else {\n      local_24 = 0;\n      cVar1 = FUN_0001a180(param_3,&local_24);\n      if (local_24 == 0) {\n        cVar1 = *param_3;\n      }\n    }" else (compound_statement "{\n      local_24 = 0;\n      cVar1 = FUN_0001a180(param_3,&local_24);\n      if (local_24 == 0) {\n        cVar1 = *param_3;\n      }\n    }" { (expression_statement "local_24 = 0;" (assignment_expression "local_24 = 0" identifier = number_literal) ;) (expression_statement "cVar1 = FUN_0001a180(param_3,&local_24);" (assignment_expression "cVar1 = FUN_0001a180(param_3,&local_24)" identifier = (call_expression "FUN_0001a180(param_3,&local_24)" identifier (argument_list "(param_3,&local_24)" ( identifier , (pointer_expression "&local_24" & identifier) )))) ;) (if_statement "if (local_24 == 0) {\n        cVar1 = *param_3;\n      }" if (parenthesized_expression "(local_24 == 0)" ( (binary_expression "local_24 == 0" identifier == number_literal) )) (compound_statement "{\n        cVar1 = *param_3;\n      }" { (expression_statement "cVar1 = *param_3;" (assignment_expression "cVar1 = *param_3" identifier = (pointer_expression "*param_3" * identifier)) ;) })) }))) }) (else_clause "else if (*(int *)(param_2 + 8) == 1) {\n    cVar1 = FUN_00030ab0();\n  }\n  else {\n    cVar1 = '\0';\n  }" else (if_statement "if (*(int *)(param_2 + 8) == 1) {\n    cVar1 = FUN_00030ab0();\n  }\n  else {\n    cVar1 = '\0';\n  }" if (parenthesized_expression "(*(int *)(param_2 + 8) == 1)" ( (binary_expression "*(int *)(param_2 + 8) == 1" (pointer_expression "*(int *)(param_2 + 8)" * (cast_expression "(int *)(param_2 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    cVar1 = FUN_00030ab0();\n  }" { (expression_statement "cVar1 = FUN_00030ab0();" (assignment_expression "cVar1 = FUN_00030ab0()" identifier = (call_expression "FUN_00030ab0()" identifier (argument_list "()" ( )))) ;) }) (else_clause "else {\n    cVar1 = '\0';\n  }" else (compound_statement "{\n    cVar1 = '\0';\n  }" { (expression_statement "cVar1 = '\0';" (assignment_expression "cVar1 = '\0'" identifier = (char_literal "'\0'" ' escape_sequence ')) ;) }))))) (expression_statement "local_24._0_1_ = (char)*(undefined4 *)(param_2 + 4);" (assignment_expression "local_24._0_1_ = (char)*(undefined4 *)(param_2 + 4)" (field_expression "local_24._0_1_" identifier . field_identifier) = (cast_expression "(char)*(undefined4 *)(param_2 + 4)" ( (type_descriptor "char" primitive_type) ) (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) )))))) ;) (expression_statement "FUN_0002e190();" (call_expression "FUN_0002e190()" identifier (argument_list "()" ( ))) ;) (expression_statement "local_24 = CONCAT31(local_24._1_3_,cVar1);" (assignment_expression "local_24 = CONCAT31(local_24._1_3_,cVar1)" identifier = (call_expression "CONCAT31(local_24._1_3_,cVar1)" identifier (argument_list "(local_24._1_3_,cVar1)" ( (field_expression "local_24._1_3_" identifier . field_identifier) , identifier )))) ;) (expression_statement "FUN_0002e190();" (call_expression "FUN_0002e190()" identifier (argument_list "()" ( ))) ;) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0006f2a0();\n  }" if (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    FUN_0006f2a0();\n  }" { comment (expression_statement "FUN_0006f2a0();" (call_expression "FUN_0006f2a0()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nvoid ssh1_send_ttymode(void *data,ssh_ttymode *mode,char *val)\n\n{\n  char cVar1;\n  uint uVar2;\n  int in_GS_OFFSET;\n  char *next;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x30bc9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (mode->type == ADDRTYPE_UNSPEC) {\n    if (*val == '\0') {\n      cVar1 = -1;\n    }\n    else {\n      next = (char *)0x0;\n      cVar1 = ctrlparse(val,&next);\n      if (next == (char *)0x0) {\n        cVar1 = *val;\n      }\n    }\n  }\n  else if (mode->type == ADDRTYPE_IPV4) {\n    uVar2 = ssh_tty_parse_boolean(val);\n    cVar1 = (char)uVar2;\n  }\n  else {\n    cVar1 = '\0';\n  }\n  next = (char *)CONCAT31(next._1_3_,(char)mode->opcode);\n  ssh_pkt_adddata((Packet *)data,&next,1);\n  next = (char *)CONCAT31(next._1_3_,cVar1);\n  ssh_pkt_adddata((Packet *)data,&next,1);\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return;\n}\n\n" comment comment comment (function_definition "void ssh1_send_ttymode(void *data,ssh_ttymode *mode,char *val)\n\n{\n  char cVar1;\n  uint uVar2;\n  int in_GS_OFFSET;\n  char *next;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x30bc9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (mode->type == ADDRTYPE_UNSPEC) {\n    if (*val == '\0') {\n      cVar1 = -1;\n    }\n    else {\n      next = (char *)0x0;\n      cVar1 = ctrlparse(val,&next);\n      if (next == (char *)0x0) {\n        cVar1 = *val;\n      }\n    }\n  }\n  else if (mode->type == ADDRTYPE_IPV4) {\n    uVar2 = ssh_tty_parse_boolean(val);\n    cVar1 = (char)uVar2;\n  }\n  else {\n    cVar1 = '\0';\n  }\n  next = (char *)CONCAT31(next._1_3_,(char)mode->opcode);\n  ssh_pkt_adddata((Packet *)data,&next,1);\n  next = (char *)CONCAT31(next._1_3_,cVar1);\n  ssh_pkt_adddata((Packet *)data,&next,1);\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return;\n}" primitive_type (function_declarator "ssh1_send_ttymode(void *data,ssh_ttymode *mode,char *val)" identifier (parameter_list "(void *data,ssh_ttymode *mode,char *val)" ( (parameter_declaration "void *data" primitive_type (pointer_declarator "*data" * identifier)) , (parameter_declaration "ssh_ttymode *mode" type_identifier (pointer_declarator "*mode" * identifier)) , (parameter_declaration "char *val" primitive_type (pointer_declarator "*val" * identifier)) ))) (compound_statement "{\n  char cVar1;\n  uint uVar2;\n  int in_GS_OFFSET;\n  char *next;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x30bc9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (mode->type == ADDRTYPE_UNSPEC) {\n    if (*val == '\0') {\n      cVar1 = -1;\n    }\n    else {\n      next = (char *)0x0;\n      cVar1 = ctrlparse(val,&next);\n      if (next == (char *)0x0) {\n        cVar1 = *val;\n      }\n    }\n  }\n  else if (mode->type == ADDRTYPE_IPV4) {\n    uVar2 = ssh_tty_parse_boolean(val);\n    cVar1 = (char)uVar2;\n  }\n  else {\n    cVar1 = '\0';\n  }\n  next = (char *)CONCAT31(next._1_3_,(char)mode->opcode);\n  ssh_pkt_adddata((Packet *)data,&next,1);\n  next = (char *)CONCAT31(next._1_3_,cVar1);\n  ssh_pkt_adddata((Packet *)data,&next,1);\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char *next;" primitive_type (pointer_declarator "*next" * identifier) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x30bc9;" (assignment_expression "uStack_14 = 0x30bc9" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (mode->type == ADDRTYPE_UNSPEC) {\n    if (*val == '\0') {\n      cVar1 = -1;\n    }\n    else {\n      next = (char *)0x0;\n      cVar1 = ctrlparse(val,&next);\n      if (next == (char *)0x0) {\n        cVar1 = *val;\n      }\n    }\n  }\n  else if (mode->type == ADDRTYPE_IPV4) {\n    uVar2 = ssh_tty_parse_boolean(val);\n    cVar1 = (char)uVar2;\n  }\n  else {\n    cVar1 = '\0';\n  }" if (parenthesized_expression "(mode->type == ADDRTYPE_UNSPEC)" ( (binary_expression "mode->type == ADDRTYPE_UNSPEC" (field_expression "mode->type" identifier -> field_identifier) == identifier) )) (compound_statement "{\n    if (*val == '\0') {\n      cVar1 = -1;\n    }\n    else {\n      next = (char *)0x0;\n      cVar1 = ctrlparse(val,&next);\n      if (next == (char *)0x0) {\n        cVar1 = *val;\n      }\n    }\n  }" { (if_statement "if (*val == '\0') {\n      cVar1 = -1;\n    }\n    else {\n      next = (char *)0x0;\n      cVar1 = ctrlparse(val,&next);\n      if (next == (char *)0x0) {\n        cVar1 = *val;\n      }\n    }" if (parenthesized_expression "(*val == '\0')" ( (binary_expression "*val == '\0'" (pointer_expression "*val" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      cVar1 = -1;\n    }" { (expression_statement "cVar1 = -1;" (assignment_expression "cVar1 = -1" identifier = number_literal) ;) }) (else_clause "else {\n      next = (char *)0x0;\n      cVar1 = ctrlparse(val,&next);\n      if (next == (char *)0x0) {\n        cVar1 = *val;\n      }\n    }" else (compound_statement "{\n      next = (char *)0x0;\n      cVar1 = ctrlparse(val,&next);\n      if (next == (char *)0x0) {\n        cVar1 = *val;\n      }\n    }" { (expression_statement "next = (char *)0x0;" (assignment_expression "next = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "cVar1 = ctrlparse(val,&next);" (assignment_expression "cVar1 = ctrlparse(val,&next)" identifier = (call_expression "ctrlparse(val,&next)" identifier (argument_list "(val,&next)" ( identifier , (pointer_expression "&next" & identifier) )))) ;) (if_statement "if (next == (char *)0x0) {\n        cVar1 = *val;\n      }" if (parenthesized_expression "(next == (char *)0x0)" ( (binary_expression "next == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        cVar1 = *val;\n      }" { (expression_statement "cVar1 = *val;" (assignment_expression "cVar1 = *val" identifier = (pointer_expression "*val" * identifier)) ;) })) }))) }) (else_clause "else if (mode->type == ADDRTYPE_IPV4) {\n    uVar2 = ssh_tty_parse_boolean(val);\n    cVar1 = (char)uVar2;\n  }\n  else {\n    cVar1 = '\0';\n  }" else (if_statement "if (mode->type == ADDRTYPE_IPV4) {\n    uVar2 = ssh_tty_parse_boolean(val);\n    cVar1 = (char)uVar2;\n  }\n  else {\n    cVar1 = '\0';\n  }" if (parenthesized_expression "(mode->type == ADDRTYPE_IPV4)" ( (binary_expression "mode->type == ADDRTYPE_IPV4" (field_expression "mode->type" identifier -> field_identifier) == identifier) )) (compound_statement "{\n    uVar2 = ssh_tty_parse_boolean(val);\n    cVar1 = (char)uVar2;\n  }" { (expression_statement "uVar2 = ssh_tty_parse_boolean(val);" (assignment_expression "uVar2 = ssh_tty_parse_boolean(val)" identifier = (call_expression "ssh_tty_parse_boolean(val)" identifier (argument_list "(val)" ( identifier )))) ;) (expression_statement "cVar1 = (char)uVar2;" (assignment_expression "cVar1 = (char)uVar2" identifier = (cast_expression "(char)uVar2" ( (type_descriptor "char" primitive_type) ) identifier)) ;) }) (else_clause "else {\n    cVar1 = '\0';\n  }" else (compound_statement "{\n    cVar1 = '\0';\n  }" { (expression_statement "cVar1 = '\0';" (assignment_expression "cVar1 = '\0'" identifier = (char_literal "'\0'" ' escape_sequence ')) ;) }))))) (expression_statement "next = (char *)CONCAT31(next._1_3_,(char)mode->opcode);" (assignment_expression "next = (char *)CONCAT31(next._1_3_,(char)mode->opcode)" identifier = (cast_expression "(char *)CONCAT31(next._1_3_,(char)mode->opcode)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "CONCAT31(next._1_3_,(char)mode->opcode)" identifier (argument_list "(next._1_3_,(char)mode->opcode)" ( (field_expression "next._1_3_" identifier . field_identifier) , (cast_expression "(char)mode->opcode" ( (type_descriptor "char" primitive_type) ) (field_expression "mode->opcode" identifier -> field_identifier)) ))))) ;) (expression_statement "ssh_pkt_adddata((Packet *)data,&next,1);" (call_expression "ssh_pkt_adddata((Packet *)data,&next,1)" identifier (argument_list "((Packet *)data,&next,1)" ( (cast_expression "(Packet *)data" ( (type_descriptor "Packet *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , (pointer_expression "&next" & identifier) , number_literal ))) ;) (expression_statement "next = (char *)CONCAT31(next._1_3_,cVar1);" (assignment_expression "next = (char *)CONCAT31(next._1_3_,cVar1)" identifier = (cast_expression "(char *)CONCAT31(next._1_3_,cVar1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "CONCAT31(next._1_3_,cVar1)" identifier (argument_list "(next._1_3_,cVar1)" ( (field_expression "next._1_3_" identifier . field_identifier) , identifier ))))) ;) (expression_statement "ssh_pkt_adddata((Packet *)data,&next,1);" (call_expression "ssh_pkt_adddata((Packet *)data,&next,1)" identifier (argument_list "((Packet *)data,&next,1)" ( (cast_expression "(Packet *)data" ( (type_descriptor "Packet *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , (pointer_expression "&next" & identifier) , number_literal ))) ;) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" if (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" { comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00030bc0(undefined4 param_1,int param_2,char *param_3)\n\n{\n  char cVar1;\n  int in_GS_OFFSET;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x30bc9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (*(int *)(param_2 + 8) == 0) {\n    if (*param_3 == '\0') {\n      cVar1 = -1;\n    }\n    else {\n      local_24 = 0;\n      cVar1 = FUN_0001a180(param_3,&local_24);\n      if (local_24 == 0) {\n        cVar1 = *param_3;\n      }\n    }\n  }\n  else if (*(int *)(param_2 + 8) == 1) {\n    cVar1 = FUN_00030ab0();\n  }\n  else {\n    cVar1 = '\0';\n  }\n  local_24._0_1_ = (char)*(undefined4 *)(param_2 + 4);\n  FUN_0002e190();\n  local_24 = CONCAT31(local_24._1_3_,cVar1);\n  FUN_0002e190();\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0006f2a0();\n  }\n  return;\n}\n\n" (function_definition "void FUN_00030bc0(undefined4 param_1,int param_2,char *param_3)\n\n{\n  char cVar1;\n  int in_GS_OFFSET;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x30bc9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (*(int *)(param_2 + 8) == 0) {\n    if (*param_3 == '\0') {\n      cVar1 = -1;\n    }\n    else {\n      local_24 = 0;\n      cVar1 = FUN_0001a180(param_3,&local_24);\n      if (local_24 == 0) {\n        cVar1 = *param_3;\n      }\n    }\n  }\n  else if (*(int *)(param_2 + 8) == 1) {\n    cVar1 = FUN_00030ab0();\n  }\n  else {\n    cVar1 = '\0';\n  }\n  local_24._0_1_ = (char)*(undefined4 *)(param_2 + 4);\n  FUN_0002e190();\n  local_24 = CONCAT31(local_24._1_3_,cVar1);\n  FUN_0002e190();\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0006f2a0();\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00030bc0(undefined4 param_1,int param_2,char *param_3)" identifier (parameter_list "(undefined4 param_1,int param_2,char *param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "char *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  char cVar1;\n  int in_GS_OFFSET;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x30bc9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (*(int *)(param_2 + 8) == 0) {\n    if (*param_3 == '\0') {\n      cVar1 = -1;\n    }\n    else {\n      local_24 = 0;\n      cVar1 = FUN_0001a180(param_3,&local_24);\n      if (local_24 == 0) {\n        cVar1 = *param_3;\n      }\n    }\n  }\n  else if (*(int *)(param_2 + 8) == 1) {\n    cVar1 = FUN_00030ab0();\n  }\n  else {\n    cVar1 = '\0';\n  }\n  local_24._0_1_ = (char)*(undefined4 *)(param_2 + 4);\n  FUN_0002e190();\n  local_24 = CONCAT31(local_24._1_3_,cVar1);\n  FUN_0002e190();\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0006f2a0();\n  }\n  return;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "int local_24;" primitive_type identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x30bc9;" (assignment_expression "uStack_14 = 0x30bc9" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (*(int *)(param_2 + 8) == 0) {\n    if (*param_3 == '\0') {\n      cVar1 = -1;\n    }\n    else {\n      local_24 = 0;\n      cVar1 = FUN_0001a180(param_3,&local_24);\n      if (local_24 == 0) {\n        cVar1 = *param_3;\n      }\n    }\n  }\n  else if (*(int *)(param_2 + 8) == 1) {\n    cVar1 = FUN_00030ab0();\n  }\n  else {\n    cVar1 = '\0';\n  }" if (parenthesized_expression "(*(int *)(param_2 + 8) == 0)" ( (binary_expression "*(int *)(param_2 + 8) == 0" (pointer_expression "*(int *)(param_2 + 8)" * (cast_expression "(int *)(param_2 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    if (*param_3 == '\0') {\n      cVar1 = -1;\n    }\n    else {\n      local_24 = 0;\n      cVar1 = FUN_0001a180(param_3,&local_24);\n      if (local_24 == 0) {\n        cVar1 = *param_3;\n      }\n    }\n  }" { (if_statement "if (*param_3 == '\0') {\n      cVar1 = -1;\n    }\n    else {\n      local_24 = 0;\n      cVar1 = FUN_0001a180(param_3,&local_24);\n      if (local_24 == 0) {\n        cVar1 = *param_3;\n      }\n    }" if (parenthesized_expression "(*param_3 == '\0')" ( (binary_expression "*param_3 == '\0'" (pointer_expression "*param_3" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      cVar1 = -1;\n    }" { (expression_statement "cVar1 = -1;" (assignment_expression "cVar1 = -1" identifier = number_literal) ;) }) (else_clause "else {\n      local_24 = 0;\n      cVar1 = FUN_0001a180(param_3,&local_24);\n      if (local_24 == 0) {\n        cVar1 = *param_3;\n      }\n    }" else (compound_statement "{\n      local_24 = 0;\n      cVar1 = FUN_0001a180(param_3,&local_24);\n      if (local_24 == 0) {\n        cVar1 = *param_3;\n      }\n    }" { (expression_statement "local_24 = 0;" (assignment_expression "local_24 = 0" identifier = number_literal) ;) (expression_statement "cVar1 = FUN_0001a180(param_3,&local_24);" (assignment_expression "cVar1 = FUN_0001a180(param_3,&local_24)" identifier = (call_expression "FUN_0001a180(param_3,&local_24)" identifier (argument_list "(param_3,&local_24)" ( identifier , (pointer_expression "&local_24" & identifier) )))) ;) (if_statement "if (local_24 == 0) {\n        cVar1 = *param_3;\n      }" if (parenthesized_expression "(local_24 == 0)" ( (binary_expression "local_24 == 0" identifier == number_literal) )) (compound_statement "{\n        cVar1 = *param_3;\n      }" { (expression_statement "cVar1 = *param_3;" (assignment_expression "cVar1 = *param_3" identifier = (pointer_expression "*param_3" * identifier)) ;) })) }))) }) (else_clause "else if (*(int *)(param_2 + 8) == 1) {\n    cVar1 = FUN_00030ab0();\n  }\n  else {\n    cVar1 = '\0';\n  }" else (if_statement "if (*(int *)(param_2 + 8) == 1) {\n    cVar1 = FUN_00030ab0();\n  }\n  else {\n    cVar1 = '\0';\n  }" if (parenthesized_expression "(*(int *)(param_2 + 8) == 1)" ( (binary_expression "*(int *)(param_2 + 8) == 1" (pointer_expression "*(int *)(param_2 + 8)" * (cast_expression "(int *)(param_2 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    cVar1 = FUN_00030ab0();\n  }" { (expression_statement "cVar1 = FUN_00030ab0();" (assignment_expression "cVar1 = FUN_00030ab0()" identifier = (call_expression "FUN_00030ab0()" identifier (argument_list "()" ( )))) ;) }) (else_clause "else {\n    cVar1 = '\0';\n  }" else (compound_statement "{\n    cVar1 = '\0';\n  }" { (expression_statement "cVar1 = '\0';" (assignment_expression "cVar1 = '\0'" identifier = (char_literal "'\0'" ' escape_sequence ')) ;) }))))) (expression_statement "local_24._0_1_ = (char)*(undefined4 *)(param_2 + 4);" (assignment_expression "local_24._0_1_ = (char)*(undefined4 *)(param_2 + 4)" (field_expression "local_24._0_1_" identifier . field_identifier) = (cast_expression "(char)*(undefined4 *)(param_2 + 4)" ( (type_descriptor "char" primitive_type) ) (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) )))))) ;) (expression_statement "FUN_0002e190();" (call_expression "FUN_0002e190()" identifier (argument_list "()" ( ))) ;) (expression_statement "local_24 = CONCAT31(local_24._1_3_,cVar1);" (assignment_expression "local_24 = CONCAT31(local_24._1_3_,cVar1)" identifier = (call_expression "CONCAT31(local_24._1_3_,cVar1)" identifier (argument_list "(local_24._1_3_,cVar1)" ( (field_expression "local_24._1_3_" identifier . field_identifier) , identifier )))) ;) (expression_statement "FUN_0002e190();" (call_expression "FUN_0002e190()" identifier (argument_list "()" ( ))) ;) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0006f2a0();\n  }" if (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    \n    FUN_0006f2a0();\n  }" { (expression_statement "FUN_0006f2a0();" (call_expression "FUN_0006f2a0()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (pointer_expression & IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) })) }))) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (char_literal ' escape_sequence ')) ;) }))))) (expression_statement (assignment_expression (field_expression IDENT . field_identifier) = (cast_expression ( (type_descriptor TYPE) ) (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (field_expression IDENT . field_identifier) , IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (return_statement return ;) })))
(function_definition "void FUN_00030bc0(undefined4 param_1,int param_2,char *param_3)\n\n{\n  char cVar1;\n  int in_GS_OFFSET;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x30bc9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (*(int *)(param_2 + 8) == 0) {\n    if (*param_3 == '\0') {\n      cVar1 = -1;\n    }\n    else {\n      local_24 = 0;\n      cVar1 = FUN_0001a180(param_3,&local_24);\n      if (local_24 == 0) {\n        cVar1 = *param_3;\n      }\n    }\n  }\n  else if (*(int *)(param_2 + 8) == 1) {\n    cVar1 = FUN_00030ab0();\n  }\n  else {\n    cVar1 = '\0';\n  }\n  local_24._0_1_ = (char)*(undefined4 *)(param_2 + 4);\n  FUN_0002e190();\n  local_24 = CONCAT31(local_24._1_3_,cVar1);\n  FUN_0002e190();\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0006f2a0();\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00030bc0(undefined4 param_1,int param_2,char *param_3)" (identifier "FUN_00030bc0") (parameter_list "(undefined4 param_1,int param_2,char *param_3)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "char *param_3" (primitive_type "char") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) () ")"))) (compound_statement "{\n  char cVar1;\n  int in_GS_OFFSET;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x30bc9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (*(int *)(param_2 + 8) == 0) {\n    if (*param_3 == '\0') {\n      cVar1 = -1;\n    }\n    else {\n      local_24 = 0;\n      cVar1 = FUN_0001a180(param_3,&local_24);\n      if (local_24 == 0) {\n        cVar1 = *param_3;\n      }\n    }\n  }\n  else if (*(int *)(param_2 + 8) == 1) {\n    cVar1 = FUN_00030ab0();\n  }\n  else {\n    cVar1 = '\0';\n  }\n  local_24._0_1_ = (char)*(undefined4 *)(param_2 + 4);\n  FUN_0002e190();\n  local_24 = CONCAT31(local_24._1_3_,cVar1);\n  FUN_0002e190();\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0006f2a0();\n  }\n  return;\n}" ({ "{") (declaration "char cVar1;" (primitive_type "char") (identifier "cVar1") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "int local_24;" (primitive_type "int") (identifier "local_24") (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x30bc9;" (assignment_expression "uStack_14 = 0x30bc9" (identifier "uStack_14") (= "=") (number_literal "0x30bc9")) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (if_statement "if (*(int *)(param_2 + 8) == 0) {\n    if (*param_3 == '\0') {\n      cVar1 = -1;\n    }\n    else {\n      local_24 = 0;\n      cVar1 = FUN_0001a180(param_3,&local_24);\n      if (local_24 == 0) {\n        cVar1 = *param_3;\n      }\n    }\n  }\n  else if (*(int *)(param_2 + 8) == 1) {\n    cVar1 = FUN_00030ab0();\n  }\n  else {\n    cVar1 = '\0';\n  }" (if "if") (parenthesized_expression "(*(int *)(param_2 + 8) == 0)" (( "(") (binary_expression "*(int *)(param_2 + 8) == 0" (pointer_expression "*(int *)(param_2 + 8)" (* "*") (cast_expression "(int *)(param_2 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 8)" (( "(") (binary_expression "param_2 + 8" (identifier "param_2") (+ "+") (number_literal "8")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    if (*param_3 == '\0') {\n      cVar1 = -1;\n    }\n    else {\n      local_24 = 0;\n      cVar1 = FUN_0001a180(param_3,&local_24);\n      if (local_24 == 0) {\n        cVar1 = *param_3;\n      }\n    }\n  }" ({ "{") (if_statement "if (*param_3 == '\0') {\n      cVar1 = -1;\n    }\n    else {\n      local_24 = 0;\n      cVar1 = FUN_0001a180(param_3,&local_24);\n      if (local_24 == 0) {\n        cVar1 = *param_3;\n      }\n    }" (if "if") (parenthesized_expression "(*param_3 == '\0')" (( "(") (binary_expression "*param_3 == '\0'" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n      cVar1 = -1;\n    }" ({ "{") (expression_statement "cVar1 = -1;" (assignment_expression "cVar1 = -1" (identifier "cVar1") (= "=") (number_literal "-1")) (; ";")) (} "}")) (else_clause "else {\n      local_24 = 0;\n      cVar1 = FUN_0001a180(param_3,&local_24);\n      if (local_24 == 0) {\n        cVar1 = *param_3;\n      }\n    }" (else "else") (compound_statement "{\n      local_24 = 0;\n      cVar1 = FUN_0001a180(param_3,&local_24);\n      if (local_24 == 0) {\n        cVar1 = *param_3;\n      }\n    }" ({ "{") (expression_statement "local_24 = 0;" (assignment_expression "local_24 = 0" (identifier "local_24") (= "=") (number_literal "0")) (; ";")) (expression_statement "cVar1 = FUN_0001a180(param_3,&local_24);" (assignment_expression "cVar1 = FUN_0001a180(param_3,&local_24)" (identifier "cVar1") (= "=") (call_expression "FUN_0001a180(param_3,&local_24)" (identifier "FUN_0001a180") (argument_list "(param_3,&local_24)" (( "(") (identifier "param_3") (, ",") (pointer_expression "&local_24" (& "&") (identifier "local_24")) () ")")))) (; ";")) (if_statement "if (local_24 == 0) {\n        cVar1 = *param_3;\n      }" (if "if") (parenthesized_expression "(local_24 == 0)" (( "(") (binary_expression "local_24 == 0" (identifier "local_24") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        cVar1 = *param_3;\n      }" ({ "{") (expression_statement "cVar1 = *param_3;" (assignment_expression "cVar1 = *param_3" (identifier "cVar1") (= "=") (pointer_expression "*param_3" (* "*") (identifier "param_3"))) (; ";")) (} "}"))) (} "}")))) (} "}")) (else_clause "else if (*(int *)(param_2 + 8) == 1) {\n    cVar1 = FUN_00030ab0();\n  }\n  else {\n    cVar1 = '\0';\n  }" (else "else") (if_statement "if (*(int *)(param_2 + 8) == 1) {\n    cVar1 = FUN_00030ab0();\n  }\n  else {\n    cVar1 = '\0';\n  }" (if "if") (parenthesized_expression "(*(int *)(param_2 + 8) == 1)" (( "(") (binary_expression "*(int *)(param_2 + 8) == 1" (pointer_expression "*(int *)(param_2 + 8)" (* "*") (cast_expression "(int *)(param_2 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 8)" (( "(") (binary_expression "param_2 + 8" (identifier "param_2") (+ "+") (number_literal "8")) () ")")))) (== "==") (number_literal "1")) () ")")) (compound_statement "{\n    cVar1 = FUN_00030ab0();\n  }" ({ "{") (expression_statement "cVar1 = FUN_00030ab0();" (assignment_expression "cVar1 = FUN_00030ab0()" (identifier "cVar1") (= "=") (call_expression "FUN_00030ab0()" (identifier "FUN_00030ab0") (argument_list "()" (( "(") () ")")))) (; ";")) (} "}")) (else_clause "else {\n    cVar1 = '\0';\n  }" (else "else") (compound_statement "{\n    cVar1 = '\0';\n  }" ({ "{") (expression_statement "cVar1 = '\0';" (assignment_expression "cVar1 = '\0'" (identifier "cVar1") (= "=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) (; ";")) (} "}")))))) (expression_statement "local_24._0_1_ = (char)*(undefined4 *)(param_2 + 4);" (assignment_expression "local_24._0_1_ = (char)*(undefined4 *)(param_2 + 4)" (field_expression "local_24._0_1_" (identifier "local_24") (. ".") (field_identifier "_0_1_")) (= "=") (cast_expression "(char)*(undefined4 *)(param_2 + 4)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (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")) () ")")))))) (; ";")) (expression_statement "FUN_0002e190();" (call_expression "FUN_0002e190()" (identifier "FUN_0002e190") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "local_24 = CONCAT31(local_24._1_3_,cVar1);" (assignment_expression "local_24 = CONCAT31(local_24._1_3_,cVar1)" (identifier "local_24") (= "=") (call_expression "CONCAT31(local_24._1_3_,cVar1)" (identifier "CONCAT31") (argument_list "(local_24._1_3_,cVar1)" (( "(") (field_expression "local_24._1_3_" (identifier "local_24") (. ".") (field_identifier "_1_3_")) (, ",") (identifier "cVar1") () ")")))) (; ";")) (expression_statement "FUN_0002e190();" (call_expression "FUN_0002e190()" (identifier "FUN_0002e190") (argument_list "()" (( "(") () ")"))) (; ";")) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0006f2a0();\n  }" (if "if") (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (!= "!=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n                    \n    FUN_0006f2a0();\n  }" ({ "{") (expression_statement "FUN_0006f2a0();" (call_expression "FUN_0006f2a0()" (identifier "FUN_0006f2a0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

void function_1(void *data,type_1 *mode,char *val)

{
  char cVar1;
  type_2 uVar2;
  int var_1;
  char *var_4;
  int var_9;
  type_3 uStack_14;
  
  uStack_14 = 0x30bc9;
  var_9 = *(int *)(var_1 + 0x14);
  if (mode->type == var_2) {
    if (*val == '\0') {
      cVar1 = -1;
    }
    else {
      var_4 = (char *)0x0;
      cVar1 = var_3(val,&var_4);
      if (var_4 == (char *)0x0) {
        cVar1 = *val;
      }
    }
  }
  else if (mode->type == var_5) {
    uVar2 = var_6(val);
    cVar1 = (char)uVar2;
  }
  else {
    cVar1 = '\0';
  }
  var_4 = (char *)var_7(var_4._1_3_,(char)mode->opcode);
  var_8((type_4 *)data,&var_4,1);
  var_4 = (char *)var_7(var_4._1_3_,cVar1);
  var_8((type_4 *)data,&var_4,1);
  if (var_9 != *(int *)(var_1 + 0x14)) {
                    /* WARNING: Subroutine does not return */
    var_10();
  }
  return;
}


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

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void MASKED(undefined4 param_1,int param_2,char *param_3)

{
  char cVar1;
  int in_GS_OFFSET;
  int local_24;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x30bc9;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (*(int *)(param_2 + 8) == 0) {
    if (*param_3 == '\0') {
      cVar1 = -1;
    }
    else {
      local_24 = 0;
      cVar1 = FUN_0001a180(param_3,&local_24);
      if (local_24 == 0) {
        cVar1 = *param_3;
      }
    }
  }
  else if (*(int *)(param_2 + 8) == 1) {
    cVar1 = FUN_00030ab0();
  }
  else {
    cVar1 = '\0';
  }
  local_24._0_1_ = (char)*(undefined4 *)(param_2 + 4);
  FUN_0002e190();
  local_24 = CONCAT31(local_24._1_3_,cVar1);
  FUN_0002e190();
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_0006f2a0();
  }
  return;
}

