
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

void prompt_set_result(prompt_t *pr,char *newstr)

{
  size_t sVar1;
  
  sVar1 = strlen(newstr);
  if ((int)pr->resultsize < (int)(sVar1 + 1)) {
    prompt_ensure_result_size(pr,sVar1 + 1);
  }
  strcpy(pr->result,newstr);
  return;
}



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

void FUN_0001ad70(int param_1,char *param_2)

{
  size_t sVar1;
  
  sVar1 = strlen(param_2);
  if (*(int *)(param_1 + 0xc) < (int)(sVar1 + 1)) {
    FUN_0001acd0();
  }
  strcpy(*(char **)(param_1 + 8),param_2);
  return;
}


PUSH EDI
PUSH ESI
PUSH EBX
MOV EDI,dword ptr [ESP + 0x14]
CALL 0x00014980
ADD EBX,0x8dff4
MOV ESI,dword ptr [ESP + 0x10]
SUB ESP,0xc
PUSH EDI
CALL 0x00014460
ADD ESP,0x10
LEA EDX,[EAX + 0x1]
CMP EDX,dword ptr [ESI + 0xc]
JG 0x0001adb0
SUB ESP,0x8
PUSH EDI
PUSH dword ptr [ESI + 0x8]
CALL 0x000142f0
ADD ESP,0x10
POP EBX
POP ESI
POP EDI
RET
MOV EAX,ESI
CALL 0x0001acd0
JMP 0x0001ad9a
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_0001ad70(int param_1,char *param_2)\n\n{\n  size_t sVar1;\n  \n  sVar1 = strlen(param_2);\n  if (*(int *)(param_1 + 0xc) < (int)(sVar1 + 1)) {\n    FUN_0001acd0();\n  }\n  strcpy(*(char **)(param_1 + 8),param_2);\n  return;\n}\n\n" comment (function_definition "void FUN_0001ad70(int param_1,char *param_2)\n\n{\n  size_t sVar1;\n  \n  sVar1 = strlen(param_2);\n  if (*(int *)(param_1 + 0xc) < (int)(sVar1 + 1)) {\n    FUN_0001acd0();\n  }\n  strcpy(*(char **)(param_1 + 8),param_2);\n  return;\n}" primitive_type (function_declarator "FUN_0001ad70(int param_1,char *param_2)" identifier (parameter_list "(int param_1,char *param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  size_t sVar1;\n  \n  sVar1 = strlen(param_2);\n  if (*(int *)(param_1 + 0xc) < (int)(sVar1 + 1)) {\n    FUN_0001acd0();\n  }\n  strcpy(*(char **)(param_1 + 8),param_2);\n  return;\n}" { (declaration "size_t sVar1;" primitive_type identifier ;) (expression_statement "sVar1 = strlen(param_2);" (assignment_expression "sVar1 = strlen(param_2)" identifier = (call_expression "strlen(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (if_statement "if (*(int *)(param_1 + 0xc) < (int)(sVar1 + 1)) {\n    FUN_0001acd0();\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0xc) < (int)(sVar1 + 1))" ( (binary_expression "*(int *)(param_1 + 0xc) < (int)(sVar1 + 1)" (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) < (cast_expression "(int)(sVar1 + 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(sVar1 + 1)" ( (binary_expression "sVar1 + 1" identifier + number_literal) )))) )) (compound_statement "{\n    FUN_0001acd0();\n  }" { (expression_statement "FUN_0001acd0();" (call_expression "FUN_0001acd0()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "strcpy(*(char **)(param_1 + 8),param_2);" (call_expression "strcpy(*(char **)(param_1 + 8),param_2)" identifier (argument_list "(*(char **)(param_1 + 8),param_2)" ( (pointer_expression "*(char **)(param_1 + 8)" * (cast_expression "(char **)(param_1 + 8)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) , identifier ))) ;) (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\nvoid prompt_set_result(prompt_t *pr,char *newstr)\n\n{\n  size_t sVar1;\n  \n  sVar1 = strlen(newstr);\n  if ((int)pr->resultsize < (int)(sVar1 + 1)) {\n    prompt_ensure_result_size(pr,sVar1 + 1);\n  }\n  strcpy(pr->result,newstr);\n  return;\n}\n\n" comment comment (function_definition "void prompt_set_result(prompt_t *pr,char *newstr)\n\n{\n  size_t sVar1;\n  \n  sVar1 = strlen(newstr);\n  if ((int)pr->resultsize < (int)(sVar1 + 1)) {\n    prompt_ensure_result_size(pr,sVar1 + 1);\n  }\n  strcpy(pr->result,newstr);\n  return;\n}" primitive_type (function_declarator "prompt_set_result(prompt_t *pr,char *newstr)" identifier (parameter_list "(prompt_t *pr,char *newstr)" ( (parameter_declaration "prompt_t *pr" type_identifier (pointer_declarator "*pr" * identifier)) , (parameter_declaration "char *newstr" primitive_type (pointer_declarator "*newstr" * identifier)) ))) (compound_statement "{\n  size_t sVar1;\n  \n  sVar1 = strlen(newstr);\n  if ((int)pr->resultsize < (int)(sVar1 + 1)) {\n    prompt_ensure_result_size(pr,sVar1 + 1);\n  }\n  strcpy(pr->result,newstr);\n  return;\n}" { (declaration "size_t sVar1;" primitive_type identifier ;) (expression_statement "sVar1 = strlen(newstr);" (assignment_expression "sVar1 = strlen(newstr)" identifier = (call_expression "strlen(newstr)" identifier (argument_list "(newstr)" ( identifier )))) ;) (if_statement "if ((int)pr->resultsize < (int)(sVar1 + 1)) {\n    prompt_ensure_result_size(pr,sVar1 + 1);\n  }" if (parenthesized_expression "((int)pr->resultsize < (int)(sVar1 + 1))" ( (binary_expression "(int)pr->resultsize < (int)(sVar1 + 1)" (cast_expression "(int)pr->resultsize" ( (type_descriptor "int" primitive_type) ) (field_expression "pr->resultsize" identifier -> field_identifier)) < (cast_expression "(int)(sVar1 + 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(sVar1 + 1)" ( (binary_expression "sVar1 + 1" identifier + number_literal) )))) )) (compound_statement "{\n    prompt_ensure_result_size(pr,sVar1 + 1);\n  }" { (expression_statement "prompt_ensure_result_size(pr,sVar1 + 1);" (call_expression "prompt_ensure_result_size(pr,sVar1 + 1)" identifier (argument_list "(pr,sVar1 + 1)" ( identifier , (binary_expression "sVar1 + 1" identifier + number_literal) ))) ;) })) (expression_statement "strcpy(pr->result,newstr);" (call_expression "strcpy(pr->result,newstr)" identifier (argument_list "(pr->result,newstr)" ( (field_expression "pr->result" identifier -> field_identifier) , identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_0001ad70(int param_1,char *param_2)\n\n{\n  size_t sVar1;\n  \n  sVar1 = strlen(param_2);\n  if (*(int *)(param_1 + 0xc) < (int)(sVar1 + 1)) {\n    FUN_0001acd0();\n  }\n  strcpy(*(char **)(param_1 + 8),param_2);\n  return;\n}\n\n" (function_definition "void FUN_0001ad70(int param_1,char *param_2)\n\n{\n  size_t sVar1;\n  \n  sVar1 = strlen(param_2);\n  if (*(int *)(param_1 + 0xc) < (int)(sVar1 + 1)) {\n    FUN_0001acd0();\n  }\n  strcpy(*(char **)(param_1 + 8),param_2);\n  return;\n}" primitive_type (function_declarator "FUN_0001ad70(int param_1,char *param_2)" identifier (parameter_list "(int param_1,char *param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  size_t sVar1;\n  \n  sVar1 = strlen(param_2);\n  if (*(int *)(param_1 + 0xc) < (int)(sVar1 + 1)) {\n    FUN_0001acd0();\n  }\n  strcpy(*(char **)(param_1 + 8),param_2);\n  return;\n}" { (declaration "size_t sVar1;" primitive_type identifier ;) (expression_statement "sVar1 = strlen(param_2);" (assignment_expression "sVar1 = strlen(param_2)" identifier = (call_expression "strlen(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (if_statement "if (*(int *)(param_1 + 0xc) < (int)(sVar1 + 1)) {\n    FUN_0001acd0();\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0xc) < (int)(sVar1 + 1))" ( (binary_expression "*(int *)(param_1 + 0xc) < (int)(sVar1 + 1)" (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) < (cast_expression "(int)(sVar1 + 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(sVar1 + 1)" ( (binary_expression "sVar1 + 1" identifier + number_literal) )))) )) (compound_statement "{\n    FUN_0001acd0();\n  }" { (expression_statement "FUN_0001acd0();" (call_expression "FUN_0001acd0()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "strcpy(*(char **)(param_1 + 8),param_2);" (call_expression "strcpy(*(char **)(param_1 + 8),param_2)" identifier (argument_list "(*(char **)(param_1 + 8),param_2)" ( (pointer_expression "*(char **)(param_1 + 8)" * (cast_expression "(char **)(param_1 + 8)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) , identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) < (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , IDENT ))) ;) (return_statement return ;) })))
(function_definition "void FUN_0001ad70(int param_1,char *param_2)\n\n{\n  size_t sVar1;\n  \n  sVar1 = strlen(param_2);\n  if (*(int *)(param_1 + 0xc) < (int)(sVar1 + 1)) {\n    FUN_0001acd0();\n  }\n  strcpy(*(char **)(param_1 + 8),param_2);\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0001ad70(int param_1,char *param_2)" (identifier "FUN_0001ad70") (parameter_list "(int param_1,char *param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "char *param_2" (primitive_type "char") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  size_t sVar1;\n  \n  sVar1 = strlen(param_2);\n  if (*(int *)(param_1 + 0xc) < (int)(sVar1 + 1)) {\n    FUN_0001acd0();\n  }\n  strcpy(*(char **)(param_1 + 8),param_2);\n  return;\n}" ({ "{") (declaration "size_t sVar1;" (primitive_type "size_t") (identifier "sVar1") (; ";")) (expression_statement "sVar1 = strlen(param_2);" (assignment_expression "sVar1 = strlen(param_2)" (identifier "sVar1") (= "=") (call_expression "strlen(param_2)" (identifier "strlen") (argument_list "(param_2)" (( "(") (identifier "param_2") () ")")))) (; ";")) (if_statement "if (*(int *)(param_1 + 0xc) < (int)(sVar1 + 1)) {\n    FUN_0001acd0();\n  }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0xc) < (int)(sVar1 + 1))" (( "(") (binary_expression "*(int *)(param_1 + 0xc) < (int)(sVar1 + 1)" (pointer_expression "*(int *)(param_1 + 0xc)" (* "*") (cast_expression "(int *)(param_1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) (< "<") (cast_expression "(int)(sVar1 + 1)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(sVar1 + 1)" (( "(") (binary_expression "sVar1 + 1" (identifier "sVar1") (+ "+") (number_literal "1")) () ")")))) () ")")) (compound_statement "{\n    FUN_0001acd0();\n  }" ({ "{") (expression_statement "FUN_0001acd0();" (call_expression "FUN_0001acd0()" (identifier "FUN_0001acd0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "strcpy(*(char **)(param_1 + 8),param_2);" (call_expression "strcpy(*(char **)(param_1 + 8),param_2)" (identifier "strcpy") (argument_list "(*(char **)(param_1 + 8),param_2)" (( "(") (pointer_expression "*(char **)(param_1 + 8)" (* "*") (cast_expression "(char **)(param_1 + 8)" (( "(") (type_descriptor "char **" (primitive_type "char") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")")))) (, ",") (identifier "param_2") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

void function_1(type_1 *pr,char *newstr)

{
  size_t var_2;
  
  var_2 = var_1(newstr);
  if ((int)pr->resultsize < (int)(var_2 + 1)) {
    var_3(pr,var_2 + 1);
  }
  var_4(pr->result,newstr);
  return;
}


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

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

void MASKED(int param_1,char *param_2)

{
  size_t sVar1;
  
  sVar1 = strlen(param_2);
  if (*(int *)(param_1 + 0xc) < (int)(sVar1 + 1)) {
    FUN_0001acd0();
  }
  strcpy(*(char **)(param_1 + 8),param_2);
  return;
}

