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

int set_ext_copy(int *copy_type,char *arg)

{
  int iVar1;
  int iVar2;
  
  iVar1 = strcasecmp(arg,"none");
  if (iVar1 == 0) {
    *copy_type = 0;
    iVar1 = 1;
  }
  else {
    iVar1 = strcasecmp(arg,"copy");
    if (iVar1 == 0) {
      *copy_type = 1;
      return 1;
    }
    iVar2 = strcasecmp(arg,"copyall");
    iVar1 = 0;
    if (iVar2 == 0) {
      *copy_type = 2;
      return 1;
    }
  }
  return iVar1;
}



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

undefined4 FUN_00079d50(undefined4 *param_1,char *param_2)

{
  int iVar1;
  undefined4 uVar2;
  
  iVar1 = strcasecmp(param_2,"none");
  if (iVar1 == 0) {
    *param_1 = 0;
    uVar2 = 1;
  }
  else {
    iVar1 = strcasecmp(param_2,"copy");
    if (iVar1 == 0) {
      *param_1 = 1;
      return 1;
    }
    iVar1 = strcasecmp(param_2,"copyall");
    uVar2 = 0;
    if (iVar1 == 0) {
      *param_1 = 2;
      return 1;
    }
  }
  return uVar2;
}


PUSH ESI
PUSH EBX
CALL 0x0002c850
ADD EBX,0x4ad21
SUB ESP,0xc
MOV ESI,dword ptr [ESP + 0x1c]
LEA EAX,[EBX + 0xfffc3d50]
PUSH EAX
PUSH ESI
CALL 0x00029f50
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x00079d90
MOV EAX,dword ptr [ESP + 0x10]
MOV dword ptr [EAX],0x0
MOV EAX,0x1
ADD ESP,0x4
POP EBX
POP ESI
RET
SUB ESP,0x8
LEA EAX,[EBX + 0xfffd2fd8]
PUSH EAX
PUSH ESI
CALL 0x00029f50
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x00079dc0
MOV EAX,dword ptr [ESP + 0x10]
MOV dword ptr [EAX],0x1
ADD ESP,0x4
MOV EAX,0x1
POP EBX
POP ESI
RET
SUB ESP,0x8
LEA EAX,[EBX + 0xfffd2fdd]
PUSH EAX
PUSH ESI
CALL 0x00029f50
ADD ESP,0x10
MOV EDX,EAX
XOR EAX,EAX
TEST EDX,EDX
JNZ 0x00079d87
MOV EAX,dword ptr [ESP + 0x10]
MOV dword ptr [EAX],0x2
ADD ESP,0x4
MOV EAX,0x1
POP EBX
POP ESI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 FUN_00079d50(undefined4 *param_1,char *param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = strcasecmp(param_2,"none");\n  if (iVar1 == 0) {\n    *param_1 = 0;\n    uVar2 = 1;\n  }\n  else {\n    iVar1 = strcasecmp(param_2,"copy");\n    if (iVar1 == 0) {\n      *param_1 = 1;\n      return 1;\n    }\n    iVar1 = strcasecmp(param_2,"copyall");\n    uVar2 = 0;\n    if (iVar1 == 0) {\n      *param_1 = 2;\n      return 1;\n    }\n  }\n  return uVar2;\n}\n\n" comment (function_definition "undefined4 FUN_00079d50(undefined4 *param_1,char *param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = strcasecmp(param_2,"none");\n  if (iVar1 == 0) {\n    *param_1 = 0;\n    uVar2 = 1;\n  }\n  else {\n    iVar1 = strcasecmp(param_2,"copy");\n    if (iVar1 == 0) {\n      *param_1 = 1;\n      return 1;\n    }\n    iVar1 = strcasecmp(param_2,"copyall");\n    uVar2 = 0;\n    if (iVar1 == 0) {\n      *param_1 = 2;\n      return 1;\n    }\n  }\n  return uVar2;\n}" type_identifier (function_declarator "FUN_00079d50(undefined4 *param_1,char *param_2)" identifier (parameter_list "(undefined4 *param_1,char *param_2)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = strcasecmp(param_2,"none");\n  if (iVar1 == 0) {\n    *param_1 = 0;\n    uVar2 = 1;\n  }\n  else {\n    iVar1 = strcasecmp(param_2,"copy");\n    if (iVar1 == 0) {\n      *param_1 = 1;\n      return 1;\n    }\n    iVar1 = strcasecmp(param_2,"copyall");\n    uVar2 = 0;\n    if (iVar1 == 0) {\n      *param_1 = 2;\n      return 1;\n    }\n  }\n  return uVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (expression_statement "iVar1 = strcasecmp(param_2,"none");" (assignment_expression "iVar1 = strcasecmp(param_2,"none")" identifier = (call_expression "strcasecmp(param_2,"none")" identifier (argument_list "(param_2,"none")" ( identifier , (string_literal ""none"" " string_content ") )))) ;) (if_statement "if (iVar1 == 0) {\n    *param_1 = 0;\n    uVar2 = 1;\n  }\n  else {\n    iVar1 = strcasecmp(param_2,"copy");\n    if (iVar1 == 0) {\n      *param_1 = 1;\n      return 1;\n    }\n    iVar1 = strcasecmp(param_2,"copyall");\n    uVar2 = 0;\n    if (iVar1 == 0) {\n      *param_1 = 2;\n      return 1;\n    }\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    *param_1 = 0;\n    uVar2 = 1;\n  }" { (expression_statement "*param_1 = 0;" (assignment_expression "*param_1 = 0" (pointer_expression "*param_1" * identifier) = number_literal) ;) (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" identifier = number_literal) ;) }) (else_clause "else {\n    iVar1 = strcasecmp(param_2,"copy");\n    if (iVar1 == 0) {\n      *param_1 = 1;\n      return 1;\n    }\n    iVar1 = strcasecmp(param_2,"copyall");\n    uVar2 = 0;\n    if (iVar1 == 0) {\n      *param_1 = 2;\n      return 1;\n    }\n  }" else (compound_statement "{\n    iVar1 = strcasecmp(param_2,"copy");\n    if (iVar1 == 0) {\n      *param_1 = 1;\n      return 1;\n    }\n    iVar1 = strcasecmp(param_2,"copyall");\n    uVar2 = 0;\n    if (iVar1 == 0) {\n      *param_1 = 2;\n      return 1;\n    }\n  }" { (expression_statement "iVar1 = strcasecmp(param_2,"copy");" (assignment_expression "iVar1 = strcasecmp(param_2,"copy")" identifier = (call_expression "strcasecmp(param_2,"copy")" identifier (argument_list "(param_2,"copy")" ( identifier , (string_literal ""copy"" " string_content ") )))) ;) (if_statement "if (iVar1 == 0) {\n      *param_1 = 1;\n      return 1;\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      *param_1 = 1;\n      return 1;\n    }" { (expression_statement "*param_1 = 1;" (assignment_expression "*param_1 = 1" (pointer_expression "*param_1" * identifier) = number_literal) ;) (return_statement "return 1;" return number_literal ;) })) (expression_statement "iVar1 = strcasecmp(param_2,"copyall");" (assignment_expression "iVar1 = strcasecmp(param_2,"copyall")" identifier = (call_expression "strcasecmp(param_2,"copyall")" identifier (argument_list "(param_2,"copyall")" ( identifier , (string_literal ""copyall"" " string_content ") )))) ;) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (if_statement "if (iVar1 == 0) {\n      *param_1 = 2;\n      return 1;\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      *param_1 = 2;\n      return 1;\n    }" { (expression_statement "*param_1 = 2;" (assignment_expression "*param_1 = 2" (pointer_expression "*param_1" * identifier) = number_literal) ;) (return_statement "return 1;" return number_literal ;) })) }))) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nint set_ext_copy(int *copy_type,char *arg)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = strcasecmp(arg,"none");\n  if (iVar1 == 0) {\n    *copy_type = 0;\n    iVar1 = 1;\n  }\n  else {\n    iVar1 = strcasecmp(arg,"copy");\n    if (iVar1 == 0) {\n      *copy_type = 1;\n      return 1;\n    }\n    iVar2 = strcasecmp(arg,"copyall");\n    iVar1 = 0;\n    if (iVar2 == 0) {\n      *copy_type = 2;\n      return 1;\n    }\n  }\n  return iVar1;\n}\n\n" comment comment (function_definition "int set_ext_copy(int *copy_type,char *arg)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = strcasecmp(arg,"none");\n  if (iVar1 == 0) {\n    *copy_type = 0;\n    iVar1 = 1;\n  }\n  else {\n    iVar1 = strcasecmp(arg,"copy");\n    if (iVar1 == 0) {\n      *copy_type = 1;\n      return 1;\n    }\n    iVar2 = strcasecmp(arg,"copyall");\n    iVar1 = 0;\n    if (iVar2 == 0) {\n      *copy_type = 2;\n      return 1;\n    }\n  }\n  return iVar1;\n}" primitive_type (function_declarator "set_ext_copy(int *copy_type,char *arg)" identifier (parameter_list "(int *copy_type,char *arg)" ( (parameter_declaration "int *copy_type" primitive_type (pointer_declarator "*copy_type" * identifier)) , (parameter_declaration "char *arg" primitive_type (pointer_declarator "*arg" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = strcasecmp(arg,"none");\n  if (iVar1 == 0) {\n    *copy_type = 0;\n    iVar1 = 1;\n  }\n  else {\n    iVar1 = strcasecmp(arg,"copy");\n    if (iVar1 == 0) {\n      *copy_type = 1;\n      return 1;\n    }\n    iVar2 = strcasecmp(arg,"copyall");\n    iVar1 = 0;\n    if (iVar2 == 0) {\n      *copy_type = 2;\n      return 1;\n    }\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (expression_statement "iVar1 = strcasecmp(arg,"none");" (assignment_expression "iVar1 = strcasecmp(arg,"none")" identifier = (call_expression "strcasecmp(arg,"none")" identifier (argument_list "(arg,"none")" ( identifier , (string_literal ""none"" " string_content ") )))) ;) (if_statement "if (iVar1 == 0) {\n    *copy_type = 0;\n    iVar1 = 1;\n  }\n  else {\n    iVar1 = strcasecmp(arg,"copy");\n    if (iVar1 == 0) {\n      *copy_type = 1;\n      return 1;\n    }\n    iVar2 = strcasecmp(arg,"copyall");\n    iVar1 = 0;\n    if (iVar2 == 0) {\n      *copy_type = 2;\n      return 1;\n    }\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    *copy_type = 0;\n    iVar1 = 1;\n  }" { (expression_statement "*copy_type = 0;" (assignment_expression "*copy_type = 0" (pointer_expression "*copy_type" * identifier) = number_literal) ;) (expression_statement "iVar1 = 1;" (assignment_expression "iVar1 = 1" identifier = number_literal) ;) }) (else_clause "else {\n    iVar1 = strcasecmp(arg,"copy");\n    if (iVar1 == 0) {\n      *copy_type = 1;\n      return 1;\n    }\n    iVar2 = strcasecmp(arg,"copyall");\n    iVar1 = 0;\n    if (iVar2 == 0) {\n      *copy_type = 2;\n      return 1;\n    }\n  }" else (compound_statement "{\n    iVar1 = strcasecmp(arg,"copy");\n    if (iVar1 == 0) {\n      *copy_type = 1;\n      return 1;\n    }\n    iVar2 = strcasecmp(arg,"copyall");\n    iVar1 = 0;\n    if (iVar2 == 0) {\n      *copy_type = 2;\n      return 1;\n    }\n  }" { (expression_statement "iVar1 = strcasecmp(arg,"copy");" (assignment_expression "iVar1 = strcasecmp(arg,"copy")" identifier = (call_expression "strcasecmp(arg,"copy")" identifier (argument_list "(arg,"copy")" ( identifier , (string_literal ""copy"" " string_content ") )))) ;) (if_statement "if (iVar1 == 0) {\n      *copy_type = 1;\n      return 1;\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      *copy_type = 1;\n      return 1;\n    }" { (expression_statement "*copy_type = 1;" (assignment_expression "*copy_type = 1" (pointer_expression "*copy_type" * identifier) = number_literal) ;) (return_statement "return 1;" return number_literal ;) })) (expression_statement "iVar2 = strcasecmp(arg,"copyall");" (assignment_expression "iVar2 = strcasecmp(arg,"copyall")" identifier = (call_expression "strcasecmp(arg,"copyall")" identifier (argument_list "(arg,"copyall")" ( identifier , (string_literal ""copyall"" " string_content ") )))) ;) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) (if_statement "if (iVar2 == 0) {\n      *copy_type = 2;\n      return 1;\n    }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n      *copy_type = 2;\n      return 1;\n    }" { (expression_statement "*copy_type = 2;" (assignment_expression "*copy_type = 2" (pointer_expression "*copy_type" * identifier) = number_literal) ;) (return_statement "return 1;" return number_literal ;) })) }))) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "undefined4 FUN_00079d50(undefined4 *param_1,char *param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = strcasecmp(param_2,"none");\n  if (iVar1 == 0) {\n    *param_1 = 0;\n    uVar2 = 1;\n  }\n  else {\n    iVar1 = strcasecmp(param_2,"copy");\n    if (iVar1 == 0) {\n      *param_1 = 1;\n      return 1;\n    }\n    iVar1 = strcasecmp(param_2,"copyall");\n    uVar2 = 0;\n    if (iVar1 == 0) {\n      *param_1 = 2;\n      return 1;\n    }\n  }\n  return uVar2;\n}\n\n" (function_definition "undefined4 FUN_00079d50(undefined4 *param_1,char *param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = strcasecmp(param_2,"none");\n  if (iVar1 == 0) {\n    *param_1 = 0;\n    uVar2 = 1;\n  }\n  else {\n    iVar1 = strcasecmp(param_2,"copy");\n    if (iVar1 == 0) {\n      *param_1 = 1;\n      return 1;\n    }\n    iVar1 = strcasecmp(param_2,"copyall");\n    uVar2 = 0;\n    if (iVar1 == 0) {\n      *param_1 = 2;\n      return 1;\n    }\n  }\n  return uVar2;\n}" type_identifier (function_declarator "FUN_00079d50(undefined4 *param_1,char *param_2)" identifier (parameter_list "(undefined4 *param_1,char *param_2)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = strcasecmp(param_2,"none");\n  if (iVar1 == 0) {\n    *param_1 = 0;\n    uVar2 = 1;\n  }\n  else {\n    iVar1 = strcasecmp(param_2,"copy");\n    if (iVar1 == 0) {\n      *param_1 = 1;\n      return 1;\n    }\n    iVar1 = strcasecmp(param_2,"copyall");\n    uVar2 = 0;\n    if (iVar1 == 0) {\n      *param_1 = 2;\n      return 1;\n    }\n  }\n  return uVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (expression_statement "iVar1 = strcasecmp(param_2,"none");" (assignment_expression "iVar1 = strcasecmp(param_2,"none")" identifier = (call_expression "strcasecmp(param_2,"none")" identifier (argument_list "(param_2,"none")" ( identifier , (string_literal ""none"" " string_content ") )))) ;) (if_statement "if (iVar1 == 0) {\n    *param_1 = 0;\n    uVar2 = 1;\n  }\n  else {\n    iVar1 = strcasecmp(param_2,"copy");\n    if (iVar1 == 0) {\n      *param_1 = 1;\n      return 1;\n    }\n    iVar1 = strcasecmp(param_2,"copyall");\n    uVar2 = 0;\n    if (iVar1 == 0) {\n      *param_1 = 2;\n      return 1;\n    }\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    *param_1 = 0;\n    uVar2 = 1;\n  }" { (expression_statement "*param_1 = 0;" (assignment_expression "*param_1 = 0" (pointer_expression "*param_1" * identifier) = number_literal) ;) (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" identifier = number_literal) ;) }) (else_clause "else {\n    iVar1 = strcasecmp(param_2,"copy");\n    if (iVar1 == 0) {\n      *param_1 = 1;\n      return 1;\n    }\n    iVar1 = strcasecmp(param_2,"copyall");\n    uVar2 = 0;\n    if (iVar1 == 0) {\n      *param_1 = 2;\n      return 1;\n    }\n  }" else (compound_statement "{\n    iVar1 = strcasecmp(param_2,"copy");\n    if (iVar1 == 0) {\n      *param_1 = 1;\n      return 1;\n    }\n    iVar1 = strcasecmp(param_2,"copyall");\n    uVar2 = 0;\n    if (iVar1 == 0) {\n      *param_1 = 2;\n      return 1;\n    }\n  }" { (expression_statement "iVar1 = strcasecmp(param_2,"copy");" (assignment_expression "iVar1 = strcasecmp(param_2,"copy")" identifier = (call_expression "strcasecmp(param_2,"copy")" identifier (argument_list "(param_2,"copy")" ( identifier , (string_literal ""copy"" " string_content ") )))) ;) (if_statement "if (iVar1 == 0) {\n      *param_1 = 1;\n      return 1;\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      *param_1 = 1;\n      return 1;\n    }" { (expression_statement "*param_1 = 1;" (assignment_expression "*param_1 = 1" (pointer_expression "*param_1" * identifier) = number_literal) ;) (return_statement "return 1;" return number_literal ;) })) (expression_statement "iVar1 = strcasecmp(param_2,"copyall");" (assignment_expression "iVar1 = strcasecmp(param_2,"copyall")" identifier = (call_expression "strcasecmp(param_2,"copyall")" identifier (argument_list "(param_2,"copyall")" ( identifier , (string_literal ""copyall"" " string_content ") )))) ;) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (if_statement "if (iVar1 == 0) {\n      *param_1 = 2;\n      return 1;\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      *param_1 = 2;\n      return 1;\n    }" { (expression_statement "*param_1 = 2;" (assignment_expression "*param_1 = 2" (pointer_expression "*param_1" * identifier) = number_literal) ;) (return_statement "return 1;" return number_literal ;) })) }))) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") )))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (return_statement return LIT ;) })) }))) (return_statement return IDENT ;) })))
(function_definition "undefined4 FUN_00079d50(undefined4 *param_1,char *param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = strcasecmp(param_2,"none");\n  if (iVar1 == 0) {\n    *param_1 = 0;\n    uVar2 = 1;\n  }\n  else {\n    iVar1 = strcasecmp(param_2,"copy");\n    if (iVar1 == 0) {\n      *param_1 = 1;\n      return 1;\n    }\n    iVar1 = strcasecmp(param_2,"copyall");\n    uVar2 = 0;\n    if (iVar1 == 0) {\n      *param_1 = 2;\n      return 1;\n    }\n  }\n  return uVar2;\n}" (type_identifier "undefined4") (function_declarator "FUN_00079d50(undefined4 *param_1,char *param_2)" (identifier "FUN_00079d50") (parameter_list "(undefined4 *param_1,char *param_2)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "char *param_2" (primitive_type "char") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = strcasecmp(param_2,"none");\n  if (iVar1 == 0) {\n    *param_1 = 0;\n    uVar2 = 1;\n  }\n  else {\n    iVar1 = strcasecmp(param_2,"copy");\n    if (iVar1 == 0) {\n      *param_1 = 1;\n      return 1;\n    }\n    iVar1 = strcasecmp(param_2,"copyall");\n    uVar2 = 0;\n    if (iVar1 == 0) {\n      *param_1 = 2;\n      return 1;\n    }\n  }\n  return uVar2;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (expression_statement "iVar1 = strcasecmp(param_2,"none");" (assignment_expression "iVar1 = strcasecmp(param_2,"none")" (identifier "iVar1") (= "=") (call_expression "strcasecmp(param_2,"none")" (identifier "strcasecmp") (argument_list "(param_2,"none")" (( "(") (identifier "param_2") (, ",") (string_literal ""none"" (" """) (string_content "none") (" """)) () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n    *param_1 = 0;\n    uVar2 = 1;\n  }\n  else {\n    iVar1 = strcasecmp(param_2,"copy");\n    if (iVar1 == 0) {\n      *param_1 = 1;\n      return 1;\n    }\n    iVar1 = strcasecmp(param_2,"copyall");\n    uVar2 = 0;\n    if (iVar1 == 0) {\n      *param_1 = 2;\n      return 1;\n    }\n  }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    *param_1 = 0;\n    uVar2 = 1;\n  }" ({ "{") (expression_statement "*param_1 = 0;" (assignment_expression "*param_1 = 0" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" (identifier "uVar2") (= "=") (number_literal "1")) (; ";")) (} "}")) (else_clause "else {\n    iVar1 = strcasecmp(param_2,"copy");\n    if (iVar1 == 0) {\n      *param_1 = 1;\n      return 1;\n    }\n    iVar1 = strcasecmp(param_2,"copyall");\n    uVar2 = 0;\n    if (iVar1 == 0) {\n      *param_1 = 2;\n      return 1;\n    }\n  }" (else "else") (compound_statement "{\n    iVar1 = strcasecmp(param_2,"copy");\n    if (iVar1 == 0) {\n      *param_1 = 1;\n      return 1;\n    }\n    iVar1 = strcasecmp(param_2,"copyall");\n    uVar2 = 0;\n    if (iVar1 == 0) {\n      *param_1 = 2;\n      return 1;\n    }\n  }" ({ "{") (expression_statement "iVar1 = strcasecmp(param_2,"copy");" (assignment_expression "iVar1 = strcasecmp(param_2,"copy")" (identifier "iVar1") (= "=") (call_expression "strcasecmp(param_2,"copy")" (identifier "strcasecmp") (argument_list "(param_2,"copy")" (( "(") (identifier "param_2") (, ",") (string_literal ""copy"" (" """) (string_content "copy") (" """)) () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n      *param_1 = 1;\n      return 1;\n    }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      *param_1 = 1;\n      return 1;\n    }" ({ "{") (expression_statement "*param_1 = 1;" (assignment_expression "*param_1 = 1" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (number_literal "1")) (; ";")) (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (expression_statement "iVar1 = strcasecmp(param_2,"copyall");" (assignment_expression "iVar1 = strcasecmp(param_2,"copyall")" (identifier "iVar1") (= "=") (call_expression "strcasecmp(param_2,"copyall")" (identifier "strcasecmp") (argument_list "(param_2,"copyall")" (( "(") (identifier "param_2") (, ",") (string_literal ""copyall"" (" """) (string_content "copyall") (" """)) () ")")))) (; ";")) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" (identifier "uVar2") (= "=") (number_literal "0")) (; ";")) (if_statement "if (iVar1 == 0) {\n      *param_1 = 2;\n      return 1;\n    }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      *param_1 = 2;\n      return 1;\n    }" ({ "{") (expression_statement "*param_1 = 2;" (assignment_expression "*param_1 = 2" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (number_literal "2")) (; ";")) (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (} "}")))) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}")))

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

int function_1(int *copy_type,char *arg)

{
  int var_2;
  int var_3;
  
  var_2 = var_1(arg,"none");
  if (var_2 == 0) {
    *copy_type = 0;
    var_2 = 1;
  }
  else {
    var_2 = var_1(arg,"copy");
    if (var_2 == 0) {
      *copy_type = 1;
      return 1;
    }
    var_3 = var_1(arg,"copyall");
    var_2 = 0;
    if (var_3 == 0) {
      *copy_type = 2;
      return 1;
    }
  }
  return var_2;
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (string_literal (string_content)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (string_literal (string_content)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (return_statement (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (string_literal (string_content)))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (return_statement (number_literal))))))) (return_statement (identifier)))))

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

undefined4 MASKED(undefined4 *param_1,char *param_2)

{
  int iVar1;
  undefined4 uVar2;
  
  iVar1 = strcasecmp(param_2,"none");
  if (iVar1 == 0) {
    *param_1 = 0;
    uVar2 = 1;
  }
  else {
    iVar1 = strcasecmp(param_2,"copy");
    if (iVar1 == 0) {
      *param_1 = 1;
      return 1;
    }
    iVar1 = strcasecmp(param_2,"copyall");
    uVar2 = 0;
    if (iVar1 == 0) {
      *param_1 = 2;
      return 1;
    }
  }
  return uVar2;
}

