
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Switch with 1 destination removed at 0x00017650 */
/* WARNING: Unknown calling convention */

char * sg_get_trans_proto_str(int tpi,int buff_len,char *buff)

{
  char *fmt;
  
  if ((uint)tpi < 0x10) {
    fmt = "%s";
  }
  else {
    fmt = "bad tpi";
  }
  sg_scnpr(buff,buff_len,fmt);
  return buff;
}



/* WARNING: Switch with 1 destination removed at 0x00017650 */

undefined4 __regparm2
sg_get_trans_proto_str(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)

{
  int iVar1;
  undefined **ppuVar2;
  uint unaff_retaddr;
  
  ppuVar2 = &__DT_PLTGOT;
  entry(param_2,0x18a37,&__DT_PLTGOT);
  if (unaff_retaddr < 0x10) {
    iVar1 = (int)ppuVar2 + 0x1877d;
  }
  else {
    iVar1 = (int)ppuVar2 + 0x1872e;
  }
  sg_scnpr(param_4,param_3,iVar1);
  return param_4;
}


JMP dword ptr [EBX + 0x190]
(translation_unit "/* WARNING: Switch with 1 destination removed at 0x00017650 */\n\nundefined4 __regparm2\nsg_get_trans_proto_str(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  int iVar1;\n  undefined **ppuVar2;\n  uint unaff_retaddr;\n  \n  ppuVar2 = &__DT_PLTGOT;\n  entry(param_2,0x18a37,&__DT_PLTGOT);\n  if (unaff_retaddr < 0x10) {\n    iVar1 = (int)ppuVar2 + 0x1877d;\n  }\n  else {\n    iVar1 = (int)ppuVar2 + 0x1872e;\n  }\n  sg_scnpr(param_4,param_3,iVar1);\n  return param_4;\n}\n\n" comment (function_definition "undefined4 __regparm2\nsg_get_trans_proto_str(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  int iVar1;\n  undefined **ppuVar2;\n  uint unaff_retaddr;\n  \n  ppuVar2 = &__DT_PLTGOT;\n  entry(param_2,0x18a37,&__DT_PLTGOT);\n  if (unaff_retaddr < 0x10) {\n    iVar1 = (int)ppuVar2 + 0x1877d;\n  }\n  else {\n    iVar1 = (int)ppuVar2 + 0x1872e;\n  }\n  sg_scnpr(param_4,param_3,iVar1);\n  return param_4;\n}" type_identifier (ERROR "__regparm2" identifier) (function_declarator "sg_get_trans_proto_str(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined **ppuVar2;\n  uint unaff_retaddr;\n  \n  ppuVar2 = &__DT_PLTGOT;\n  entry(param_2,0x18a37,&__DT_PLTGOT);\n  if (unaff_retaddr < 0x10) {\n    iVar1 = (int)ppuVar2 + 0x1877d;\n  }\n  else {\n    iVar1 = (int)ppuVar2 + 0x1872e;\n  }\n  sg_scnpr(param_4,param_3,iVar1);\n  return param_4;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined **ppuVar2;" type_identifier (pointer_declarator "**ppuVar2" * (pointer_declarator "*ppuVar2" * identifier)) ;) (declaration "uint unaff_retaddr;" type_identifier identifier ;) (expression_statement "ppuVar2 = &__DT_PLTGOT;" (assignment_expression "ppuVar2 = &__DT_PLTGOT" identifier = (pointer_expression "&__DT_PLTGOT" & identifier)) ;) (expression_statement "entry(param_2,0x18a37,&__DT_PLTGOT);" (call_expression "entry(param_2,0x18a37,&__DT_PLTGOT)" identifier (argument_list "(param_2,0x18a37,&__DT_PLTGOT)" ( identifier , number_literal , (pointer_expression "&__DT_PLTGOT" & identifier) ))) ;) (if_statement "if (unaff_retaddr < 0x10) {\n    iVar1 = (int)ppuVar2 + 0x1877d;\n  }\n  else {\n    iVar1 = (int)ppuVar2 + 0x1872e;\n  }" if (parenthesized_expression "(unaff_retaddr < 0x10)" ( (binary_expression "unaff_retaddr < 0x10" identifier < number_literal) )) (compound_statement "{\n    iVar1 = (int)ppuVar2 + 0x1877d;\n  }" { (expression_statement "iVar1 = (int)ppuVar2 + 0x1877d;" (assignment_expression "iVar1 = (int)ppuVar2 + 0x1877d" identifier = (binary_expression "(int)ppuVar2 + 0x1877d" (cast_expression "(int)ppuVar2" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal)) ;) }) (else_clause "else {\n    iVar1 = (int)ppuVar2 + 0x1872e;\n  }" else (compound_statement "{\n    iVar1 = (int)ppuVar2 + 0x1872e;\n  }" { (expression_statement "iVar1 = (int)ppuVar2 + 0x1872e;" (assignment_expression "iVar1 = (int)ppuVar2 + 0x1872e" identifier = (binary_expression "(int)ppuVar2 + 0x1872e" (cast_expression "(int)ppuVar2" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal)) ;) }))) (expression_statement "sg_scnpr(param_4,param_3,iVar1);" (call_expression "sg_scnpr(param_4,param_3,iVar1)" identifier (argument_list "(param_4,param_3,iVar1)" ( identifier , identifier , identifier ))) ;) (return_statement "return param_4;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Switch with 1 destination removed at 0x00017650 */\n/* WARNING: Unknown calling convention */\n\nchar * sg_get_trans_proto_str(int tpi,int buff_len,char *buff)\n\n{\n  char *fmt;\n  \n  if ((uint)tpi < 0x10) {\n    fmt = "%s";\n  }\n  else {\n    fmt = "bad tpi";\n  }\n  sg_scnpr(buff,buff_len,fmt);\n  return buff;\n}\n\n" comment comment comment (function_definition "char * sg_get_trans_proto_str(int tpi,int buff_len,char *buff)\n\n{\n  char *fmt;\n  \n  if ((uint)tpi < 0x10) {\n    fmt = "%s";\n  }\n  else {\n    fmt = "bad tpi";\n  }\n  sg_scnpr(buff,buff_len,fmt);\n  return buff;\n}" primitive_type (pointer_declarator "* sg_get_trans_proto_str(int tpi,int buff_len,char *buff)" * (function_declarator "sg_get_trans_proto_str(int tpi,int buff_len,char *buff)" identifier (parameter_list "(int tpi,int buff_len,char *buff)" ( (parameter_declaration "int tpi" primitive_type identifier) , (parameter_declaration "int buff_len" primitive_type identifier) , (parameter_declaration "char *buff" primitive_type (pointer_declarator "*buff" * identifier)) )))) (compound_statement "{\n  char *fmt;\n  \n  if ((uint)tpi < 0x10) {\n    fmt = "%s";\n  }\n  else {\n    fmt = "bad tpi";\n  }\n  sg_scnpr(buff,buff_len,fmt);\n  return buff;\n}" { (declaration "char *fmt;" primitive_type (pointer_declarator "*fmt" * identifier) ;) (if_statement "if ((uint)tpi < 0x10) {\n    fmt = "%s";\n  }\n  else {\n    fmt = "bad tpi";\n  }" if (parenthesized_expression "((uint)tpi < 0x10)" ( (binary_expression "(uint)tpi < 0x10" (cast_expression "(uint)tpi" ( (type_descriptor "uint" type_identifier) ) identifier) < number_literal) )) (compound_statement "{\n    fmt = "%s";\n  }" { (expression_statement "fmt = "%s";" (assignment_expression "fmt = "%s"" identifier = (string_literal ""%s"" " string_content ")) ;) }) (else_clause "else {\n    fmt = "bad tpi";\n  }" else (compound_statement "{\n    fmt = "bad tpi";\n  }" { (expression_statement "fmt = "bad tpi";" (assignment_expression "fmt = "bad tpi"" identifier = (string_literal ""bad tpi"" " string_content ")) ;) }))) (expression_statement "sg_scnpr(buff,buff_len,fmt);" (call_expression "sg_scnpr(buff,buff_len,fmt)" identifier (argument_list "(buff,buff_len,fmt)" ( identifier , identifier , identifier ))) ;) (return_statement "return buff;" return identifier ;) })))
(translation_unit "undefined4 __regparm2\nsg_get_trans_proto_str(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  int iVar1;\n  undefined **ppuVar2;\n  uint unaff_retaddr;\n  \n  ppuVar2 = &__DT_PLTGOT;\n  entry(param_2,0x18a37,&__DT_PLTGOT);\n  if (unaff_retaddr < 0x10) {\n    iVar1 = (int)ppuVar2 + 0x1877d;\n  }\n  else {\n    iVar1 = (int)ppuVar2 + 0x1872e;\n  }\n  sg_scnpr(param_4,param_3,iVar1);\n  return param_4;\n}\n\n" (function_definition "undefined4 __regparm2\nsg_get_trans_proto_str(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  int iVar1;\n  undefined **ppuVar2;\n  uint unaff_retaddr;\n  \n  ppuVar2 = &__DT_PLTGOT;\n  entry(param_2,0x18a37,&__DT_PLTGOT);\n  if (unaff_retaddr < 0x10) {\n    iVar1 = (int)ppuVar2 + 0x1877d;\n  }\n  else {\n    iVar1 = (int)ppuVar2 + 0x1872e;\n  }\n  sg_scnpr(param_4,param_3,iVar1);\n  return param_4;\n}" type_identifier (ERROR "__regparm2" identifier) (function_declarator "sg_get_trans_proto_str(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined **ppuVar2;\n  uint unaff_retaddr;\n  \n  ppuVar2 = &__DT_PLTGOT;\n  entry(param_2,0x18a37,&__DT_PLTGOT);\n  if (unaff_retaddr < 0x10) {\n    iVar1 = (int)ppuVar2 + 0x1877d;\n  }\n  else {\n    iVar1 = (int)ppuVar2 + 0x1872e;\n  }\n  sg_scnpr(param_4,param_3,iVar1);\n  return param_4;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined **ppuVar2;" type_identifier (pointer_declarator "**ppuVar2" * (pointer_declarator "*ppuVar2" * identifier)) ;) (declaration "uint unaff_retaddr;" type_identifier identifier ;) (expression_statement "ppuVar2 = &__DT_PLTGOT;" (assignment_expression "ppuVar2 = &__DT_PLTGOT" identifier = (pointer_expression "&__DT_PLTGOT" & identifier)) ;) (expression_statement "entry(param_2,0x18a37,&__DT_PLTGOT);" (call_expression "entry(param_2,0x18a37,&__DT_PLTGOT)" identifier (argument_list "(param_2,0x18a37,&__DT_PLTGOT)" ( identifier , number_literal , (pointer_expression "&__DT_PLTGOT" & identifier) ))) ;) (if_statement "if (unaff_retaddr < 0x10) {\n    iVar1 = (int)ppuVar2 + 0x1877d;\n  }\n  else {\n    iVar1 = (int)ppuVar2 + 0x1872e;\n  }" if (parenthesized_expression "(unaff_retaddr < 0x10)" ( (binary_expression "unaff_retaddr < 0x10" identifier < number_literal) )) (compound_statement "{\n    iVar1 = (int)ppuVar2 + 0x1877d;\n  }" { (expression_statement "iVar1 = (int)ppuVar2 + 0x1877d;" (assignment_expression "iVar1 = (int)ppuVar2 + 0x1877d" identifier = (binary_expression "(int)ppuVar2 + 0x1877d" (cast_expression "(int)ppuVar2" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal)) ;) }) (else_clause "else {\n    iVar1 = (int)ppuVar2 + 0x1872e;\n  }" else (compound_statement "{\n    iVar1 = (int)ppuVar2 + 0x1872e;\n  }" { (expression_statement "iVar1 = (int)ppuVar2 + 0x1872e;" (assignment_expression "iVar1 = (int)ppuVar2 + 0x1872e" identifier = (binary_expression "(int)ppuVar2 + 0x1872e" (cast_expression "(int)ppuVar2" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal)) ;) }))) (expression_statement "sg_scnpr(param_4,param_3,iVar1);" (call_expression "sg_scnpr(param_4,param_3,iVar1)" identifier (argument_list "(param_4,param_3,iVar1)" ( identifier , identifier , identifier ))) ;) (return_statement "return param_4;" return identifier ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * (pointer_declarator * IDENT)) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , (pointer_expression & IDENT) ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT)) ;) }))) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (return_statement return IDENT ;) })))
(function_definition "undefined4 __regparm2\nsg_get_trans_proto_str(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  int iVar1;\n  undefined **ppuVar2;\n  uint unaff_retaddr;\n  \n  ppuVar2 = &__DT_PLTGOT;\n  entry(param_2,0x18a37,&__DT_PLTGOT);\n  if (unaff_retaddr < 0x10) {\n    iVar1 = (int)ppuVar2 + 0x1877d;\n  }\n  else {\n    iVar1 = (int)ppuVar2 + 0x1872e;\n  }\n  sg_scnpr(param_4,param_3,iVar1);\n  return param_4;\n}" (type_identifier "undefined4") (ERROR "__regparm2" (identifier "__regparm2")) (function_declarator "sg_get_trans_proto_str(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)" (identifier "sg_get_trans_proto_str") (parameter_list "(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) (, ",") (parameter_declaration "undefined4 param_4" (type_identifier "undefined4") (identifier "param_4")) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined **ppuVar2;\n  uint unaff_retaddr;\n  \n  ppuVar2 = &__DT_PLTGOT;\n  entry(param_2,0x18a37,&__DT_PLTGOT);\n  if (unaff_retaddr < 0x10) {\n    iVar1 = (int)ppuVar2 + 0x1877d;\n  }\n  else {\n    iVar1 = (int)ppuVar2 + 0x1872e;\n  }\n  sg_scnpr(param_4,param_3,iVar1);\n  return param_4;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined **ppuVar2;" (type_identifier "undefined") (pointer_declarator "**ppuVar2" (* "*") (pointer_declarator "*ppuVar2" (* "*") (identifier "ppuVar2"))) (; ";")) (declaration "uint unaff_retaddr;" (type_identifier "uint") (identifier "unaff_retaddr") (; ";")) (expression_statement "ppuVar2 = &__DT_PLTGOT;" (assignment_expression "ppuVar2 = &__DT_PLTGOT" (identifier "ppuVar2") (= "=") (pointer_expression "&__DT_PLTGOT" (& "&") (identifier "__DT_PLTGOT"))) (; ";")) (expression_statement "entry(param_2,0x18a37,&__DT_PLTGOT);" (call_expression "entry(param_2,0x18a37,&__DT_PLTGOT)" (identifier "entry") (argument_list "(param_2,0x18a37,&__DT_PLTGOT)" (( "(") (identifier "param_2") (, ",") (number_literal "0x18a37") (, ",") (pointer_expression "&__DT_PLTGOT" (& "&") (identifier "__DT_PLTGOT")) () ")"))) (; ";")) (if_statement "if (unaff_retaddr < 0x10) {\n    iVar1 = (int)ppuVar2 + 0x1877d;\n  }\n  else {\n    iVar1 = (int)ppuVar2 + 0x1872e;\n  }" (if "if") (parenthesized_expression "(unaff_retaddr < 0x10)" (( "(") (binary_expression "unaff_retaddr < 0x10" (identifier "unaff_retaddr") (< "<") (number_literal "0x10")) () ")")) (compound_statement "{\n    iVar1 = (int)ppuVar2 + 0x1877d;\n  }" ({ "{") (expression_statement "iVar1 = (int)ppuVar2 + 0x1877d;" (assignment_expression "iVar1 = (int)ppuVar2 + 0x1877d" (identifier "iVar1") (= "=") (binary_expression "(int)ppuVar2 + 0x1877d" (cast_expression "(int)ppuVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "ppuVar2")) (+ "+") (number_literal "0x1877d"))) (; ";")) (} "}")) (else_clause "else {\n    iVar1 = (int)ppuVar2 + 0x1872e;\n  }" (else "else") (compound_statement "{\n    iVar1 = (int)ppuVar2 + 0x1872e;\n  }" ({ "{") (expression_statement "iVar1 = (int)ppuVar2 + 0x1872e;" (assignment_expression "iVar1 = (int)ppuVar2 + 0x1872e" (identifier "iVar1") (= "=") (binary_expression "(int)ppuVar2 + 0x1872e" (cast_expression "(int)ppuVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "ppuVar2")) (+ "+") (number_literal "0x1872e"))) (; ";")) (} "}")))) (expression_statement "sg_scnpr(param_4,param_3,iVar1);" (call_expression "sg_scnpr(param_4,param_3,iVar1)" (identifier "sg_scnpr") (argument_list "(param_4,param_3,iVar1)" (( "(") (identifier "param_4") (, ",") (identifier "param_3") (, ",") (identifier "iVar1") () ")"))) (; ";")) (return_statement "return param_4;" (return "return") (identifier "param_4") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Switch with 1 destination removed at 0x00017650 */
/* WARNING: Unknown calling convention */

char * function_1(int tpi,int buff_len,char *buff)

{
  char *fmt;
  
  if ((type_1)tpi < 0x10) {
    fmt = "%s";
  }
  else {
    fmt = "bad tpi";
  }
  var_1(buff,buff_len,fmt);
  return buff;
}


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

/* WARNING: Switch with 1 destination removed at 0x00017650 */

undefined4 __regparm2
MASKED(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)

{
  int iVar1;
  undefined **ppuVar2;
  uint unaff_retaddr;
  
  ppuVar2 = &__DT_PLTGOT;
  entry(param_2,0x18a37,&__DT_PLTGOT);
  if (unaff_retaddr < 0x10) {
    iVar1 = (int)ppuVar2 + 0x1877d;
  }
  else {
    iVar1 = (int)ppuVar2 + 0x1872e;
  }
  sg_scnpr(param_4,param_3,iVar1);
  return param_4;
}

