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

int ftpfilemethod(OperationConfig *config,char *str)

{
  int iVar1;
  int iVar2;
  
  iVar2 = 3;
  iVar1 = curl_strequal("singlecwd",str);
  if (iVar1 == 0) {
    iVar2 = 2;
    iVar1 = curl_strequal("nocwd",str);
    if (iVar1 == 0) {
      iVar2 = 1;
      iVar1 = curl_strequal("multicwd",str);
      if (iVar1 == 0) {
        warnf(config->global,"unrecognized ftp file method \'%s\', using default\n",str);
      }
    }
  }
  return iVar2;
}



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

undefined4 FUN_000248d0(int param_1,undefined4 param_2)

{
  int iVar1;
  undefined4 uVar2;
  
  uVar2 = 3;
  iVar1 = curl_strequal("singlecwd",param_2);
  if (iVar1 == 0) {
    uVar2 = 2;
    iVar1 = curl_strequal("nocwd",param_2);
    if (iVar1 == 0) {
      uVar2 = 1;
      iVar1 = curl_strequal("multicwd",param_2);
      if (iVar1 == 0) {
        FUN_0001ed70(*(undefined4 *)(param_1 + 0x290),
                     "unrecognized ftp file method \'%s\', using default\n",param_2);
      }
    }
  }
  return uVar2;
}


PUSH EDI
MOV EDI,0x3
PUSH ESI
PUSH EBX
MOV ESI,dword ptr [ESP + 0x14]
CALL 0x00014a30
ADD EBX,0x254d7
SUB ESP,0x8
PUSH ESI
LEA EAX,[EBX + 0xffff4b7f]
PUSH EAX
CALL 0x00014710
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x00024953
SUB ESP,0x8
LEA EAX,[EBX + 0xffff4b89]
MOV EDI,0x2
PUSH ESI
PUSH EAX
CALL 0x00014710
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x00024953
SUB ESP,0x8
LEA EAX,[EBX + 0xffff4b8f]
MOV EDI,0x1
PUSH ESI
PUSH EAX
CALL 0x00014710
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x00024953
SUB ESP,0x4
LEA EAX,[EBX + 0xffff4ac8]
PUSH ESI
PUSH EAX
MOV EAX,dword ptr [ESP + 0x1c]
PUSH dword ptr [EAX + 0x290]
CALL 0x0001ed70
ADD ESP,0x10
MOV EAX,EDI
POP EBX
POP ESI
POP EDI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 FUN_000248d0(int param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  uVar2 = 3;\n  iVar1 = curl_strequal("singlecwd",param_2);\n  if (iVar1 == 0) {\n    uVar2 = 2;\n    iVar1 = curl_strequal("nocwd",param_2);\n    if (iVar1 == 0) {\n      uVar2 = 1;\n      iVar1 = curl_strequal("multicwd",param_2);\n      if (iVar1 == 0) {\n        FUN_0001ed70(*(undefined4 *)(param_1 + 0x290),\n                     "unrecognized ftp file method \'%s\', using default\n",param_2);\n      }\n    }\n  }\n  return uVar2;\n}\n\n" comment (function_definition "undefined4 FUN_000248d0(int param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  uVar2 = 3;\n  iVar1 = curl_strequal("singlecwd",param_2);\n  if (iVar1 == 0) {\n    uVar2 = 2;\n    iVar1 = curl_strequal("nocwd",param_2);\n    if (iVar1 == 0) {\n      uVar2 = 1;\n      iVar1 = curl_strequal("multicwd",param_2);\n      if (iVar1 == 0) {\n        FUN_0001ed70(*(undefined4 *)(param_1 + 0x290),\n                     "unrecognized ftp file method \'%s\', using default\n",param_2);\n      }\n    }\n  }\n  return uVar2;\n}" type_identifier (function_declarator "FUN_000248d0(int param_1,undefined4 param_2)" identifier (parameter_list "(int param_1,undefined4 param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  \n  uVar2 = 3;\n  iVar1 = curl_strequal("singlecwd",param_2);\n  if (iVar1 == 0) {\n    uVar2 = 2;\n    iVar1 = curl_strequal("nocwd",param_2);\n    if (iVar1 == 0) {\n      uVar2 = 1;\n      iVar1 = curl_strequal("multicwd",param_2);\n      if (iVar1 == 0) {\n        FUN_0001ed70(*(undefined4 *)(param_1 + 0x290),\n                     "unrecognized ftp file method \'%s\', using default\n",param_2);\n      }\n    }\n  }\n  return uVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (expression_statement "uVar2 = 3;" (assignment_expression "uVar2 = 3" identifier = number_literal) ;) (expression_statement "iVar1 = curl_strequal("singlecwd",param_2);" (assignment_expression "iVar1 = curl_strequal("singlecwd",param_2)" identifier = (call_expression "curl_strequal("singlecwd",param_2)" identifier (argument_list "("singlecwd",param_2)" ( (string_literal ""singlecwd"" " string_content ") , identifier )))) ;) (if_statement "if (iVar1 == 0) {\n    uVar2 = 2;\n    iVar1 = curl_strequal("nocwd",param_2);\n    if (iVar1 == 0) {\n      uVar2 = 1;\n      iVar1 = curl_strequal("multicwd",param_2);\n      if (iVar1 == 0) {\n        FUN_0001ed70(*(undefined4 *)(param_1 + 0x290),\n                     "unrecognized ftp file method \'%s\', using default\n",param_2);\n      }\n    }\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    uVar2 = 2;\n    iVar1 = curl_strequal("nocwd",param_2);\n    if (iVar1 == 0) {\n      uVar2 = 1;\n      iVar1 = curl_strequal("multicwd",param_2);\n      if (iVar1 == 0) {\n        FUN_0001ed70(*(undefined4 *)(param_1 + 0x290),\n                     "unrecognized ftp file method \'%s\', using default\n",param_2);\n      }\n    }\n  }" { (expression_statement "uVar2 = 2;" (assignment_expression "uVar2 = 2" identifier = number_literal) ;) (expression_statement "iVar1 = curl_strequal("nocwd",param_2);" (assignment_expression "iVar1 = curl_strequal("nocwd",param_2)" identifier = (call_expression "curl_strequal("nocwd",param_2)" identifier (argument_list "("nocwd",param_2)" ( (string_literal ""nocwd"" " string_content ") , identifier )))) ;) (if_statement "if (iVar1 == 0) {\n      uVar2 = 1;\n      iVar1 = curl_strequal("multicwd",param_2);\n      if (iVar1 == 0) {\n        FUN_0001ed70(*(undefined4 *)(param_1 + 0x290),\n                     "unrecognized ftp file method \'%s\', using default\n",param_2);\n      }\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar2 = 1;\n      iVar1 = curl_strequal("multicwd",param_2);\n      if (iVar1 == 0) {\n        FUN_0001ed70(*(undefined4 *)(param_1 + 0x290),\n                     "unrecognized ftp file method \'%s\', using default\n",param_2);\n      }\n    }" { (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" identifier = number_literal) ;) (expression_statement "iVar1 = curl_strequal("multicwd",param_2);" (assignment_expression "iVar1 = curl_strequal("multicwd",param_2)" identifier = (call_expression "curl_strequal("multicwd",param_2)" identifier (argument_list "("multicwd",param_2)" ( (string_literal ""multicwd"" " string_content ") , identifier )))) ;) (if_statement "if (iVar1 == 0) {\n        FUN_0001ed70(*(undefined4 *)(param_1 + 0x290),\n                     "unrecognized ftp file method \'%s\', using default\n",param_2);\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        FUN_0001ed70(*(undefined4 *)(param_1 + 0x290),\n                     "unrecognized ftp file method \'%s\', using default\n",param_2);\n      }" { (expression_statement "FUN_0001ed70(*(undefined4 *)(param_1 + 0x290),\n                     "unrecognized ftp file method \'%s\', using default\n",param_2);" (call_expression "FUN_0001ed70(*(undefined4 *)(param_1 + 0x290),\n                     "unrecognized ftp file method \'%s\', using default\n",param_2)" identifier (argument_list "(*(undefined4 *)(param_1 + 0x290),\n                     "unrecognized ftp file method \'%s\', using default\n",param_2)" ( (pointer_expression "*(undefined4 *)(param_1 + 0x290)" * (cast_expression "(undefined4 *)(param_1 + 0x290)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x290)" ( (binary_expression "param_1 + 0x290" identifier + number_literal) )))) , (string_literal ""unrecognized ftp file method \'%s\', using default\n"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence ") , identifier ))) ;) })) })) })) (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 ftpfilemethod(OperationConfig *config,char *str)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  iVar2 = 3;\n  iVar1 = curl_strequal("singlecwd",str);\n  if (iVar1 == 0) {\n    iVar2 = 2;\n    iVar1 = curl_strequal("nocwd",str);\n    if (iVar1 == 0) {\n      iVar2 = 1;\n      iVar1 = curl_strequal("multicwd",str);\n      if (iVar1 == 0) {\n        warnf(config->global,"unrecognized ftp file method \'%s\', using default\n",str);\n      }\n    }\n  }\n  return iVar2;\n}\n\n" comment comment (function_definition "int ftpfilemethod(OperationConfig *config,char *str)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  iVar2 = 3;\n  iVar1 = curl_strequal("singlecwd",str);\n  if (iVar1 == 0) {\n    iVar2 = 2;\n    iVar1 = curl_strequal("nocwd",str);\n    if (iVar1 == 0) {\n      iVar2 = 1;\n      iVar1 = curl_strequal("multicwd",str);\n      if (iVar1 == 0) {\n        warnf(config->global,"unrecognized ftp file method \'%s\', using default\n",str);\n      }\n    }\n  }\n  return iVar2;\n}" primitive_type (function_declarator "ftpfilemethod(OperationConfig *config,char *str)" identifier (parameter_list "(OperationConfig *config,char *str)" ( (parameter_declaration "OperationConfig *config" type_identifier (pointer_declarator "*config" * identifier)) , (parameter_declaration "char *str" primitive_type (pointer_declarator "*str" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  \n  iVar2 = 3;\n  iVar1 = curl_strequal("singlecwd",str);\n  if (iVar1 == 0) {\n    iVar2 = 2;\n    iVar1 = curl_strequal("nocwd",str);\n    if (iVar1 == 0) {\n      iVar2 = 1;\n      iVar1 = curl_strequal("multicwd",str);\n      if (iVar1 == 0) {\n        warnf(config->global,"unrecognized ftp file method \'%s\', using default\n",str);\n      }\n    }\n  }\n  return iVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (expression_statement "iVar2 = 3;" (assignment_expression "iVar2 = 3" identifier = number_literal) ;) (expression_statement "iVar1 = curl_strequal("singlecwd",str);" (assignment_expression "iVar1 = curl_strequal("singlecwd",str)" identifier = (call_expression "curl_strequal("singlecwd",str)" identifier (argument_list "("singlecwd",str)" ( (string_literal ""singlecwd"" " string_content ") , identifier )))) ;) (if_statement "if (iVar1 == 0) {\n    iVar2 = 2;\n    iVar1 = curl_strequal("nocwd",str);\n    if (iVar1 == 0) {\n      iVar2 = 1;\n      iVar1 = curl_strequal("multicwd",str);\n      if (iVar1 == 0) {\n        warnf(config->global,"unrecognized ftp file method \'%s\', using default\n",str);\n      }\n    }\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar2 = 2;\n    iVar1 = curl_strequal("nocwd",str);\n    if (iVar1 == 0) {\n      iVar2 = 1;\n      iVar1 = curl_strequal("multicwd",str);\n      if (iVar1 == 0) {\n        warnf(config->global,"unrecognized ftp file method \'%s\', using default\n",str);\n      }\n    }\n  }" { (expression_statement "iVar2 = 2;" (assignment_expression "iVar2 = 2" identifier = number_literal) ;) (expression_statement "iVar1 = curl_strequal("nocwd",str);" (assignment_expression "iVar1 = curl_strequal("nocwd",str)" identifier = (call_expression "curl_strequal("nocwd",str)" identifier (argument_list "("nocwd",str)" ( (string_literal ""nocwd"" " string_content ") , identifier )))) ;) (if_statement "if (iVar1 == 0) {\n      iVar2 = 1;\n      iVar1 = curl_strequal("multicwd",str);\n      if (iVar1 == 0) {\n        warnf(config->global,"unrecognized ftp file method \'%s\', using default\n",str);\n      }\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar2 = 1;\n      iVar1 = curl_strequal("multicwd",str);\n      if (iVar1 == 0) {\n        warnf(config->global,"unrecognized ftp file method \'%s\', using default\n",str);\n      }\n    }" { (expression_statement "iVar2 = 1;" (assignment_expression "iVar2 = 1" identifier = number_literal) ;) (expression_statement "iVar1 = curl_strequal("multicwd",str);" (assignment_expression "iVar1 = curl_strequal("multicwd",str)" identifier = (call_expression "curl_strequal("multicwd",str)" identifier (argument_list "("multicwd",str)" ( (string_literal ""multicwd"" " string_content ") , identifier )))) ;) (if_statement "if (iVar1 == 0) {\n        warnf(config->global,"unrecognized ftp file method \'%s\', using default\n",str);\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        warnf(config->global,"unrecognized ftp file method \'%s\', using default\n",str);\n      }" { (expression_statement "warnf(config->global,"unrecognized ftp file method \'%s\', using default\n",str);" (call_expression "warnf(config->global,"unrecognized ftp file method \'%s\', using default\n",str)" identifier (argument_list "(config->global,"unrecognized ftp file method \'%s\', using default\n",str)" ( (field_expression "config->global" identifier -> field_identifier) , (string_literal ""unrecognized ftp file method \'%s\', using default\n"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence ") , identifier ))) ;) })) })) })) (return_statement "return iVar2;" return identifier ;) })))
(translation_unit "undefined4 FUN_000248d0(int param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  uVar2 = 3;\n  iVar1 = curl_strequal("singlecwd",param_2);\n  if (iVar1 == 0) {\n    uVar2 = 2;\n    iVar1 = curl_strequal("nocwd",param_2);\n    if (iVar1 == 0) {\n      uVar2 = 1;\n      iVar1 = curl_strequal("multicwd",param_2);\n      if (iVar1 == 0) {\n        FUN_0001ed70(*(undefined4 *)(param_1 + 0x290),\n                     "unrecognized ftp file method \'%s\', using default\n",param_2);\n      }\n    }\n  }\n  return uVar2;\n}\n\n" (function_definition "undefined4 FUN_000248d0(int param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  uVar2 = 3;\n  iVar1 = curl_strequal("singlecwd",param_2);\n  if (iVar1 == 0) {\n    uVar2 = 2;\n    iVar1 = curl_strequal("nocwd",param_2);\n    if (iVar1 == 0) {\n      uVar2 = 1;\n      iVar1 = curl_strequal("multicwd",param_2);\n      if (iVar1 == 0) {\n        FUN_0001ed70(*(undefined4 *)(param_1 + 0x290),\n                     "unrecognized ftp file method \'%s\', using default\n",param_2);\n      }\n    }\n  }\n  return uVar2;\n}" type_identifier (function_declarator "FUN_000248d0(int param_1,undefined4 param_2)" identifier (parameter_list "(int param_1,undefined4 param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  \n  uVar2 = 3;\n  iVar1 = curl_strequal("singlecwd",param_2);\n  if (iVar1 == 0) {\n    uVar2 = 2;\n    iVar1 = curl_strequal("nocwd",param_2);\n    if (iVar1 == 0) {\n      uVar2 = 1;\n      iVar1 = curl_strequal("multicwd",param_2);\n      if (iVar1 == 0) {\n        FUN_0001ed70(*(undefined4 *)(param_1 + 0x290),\n                     "unrecognized ftp file method \'%s\', using default\n",param_2);\n      }\n    }\n  }\n  return uVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (expression_statement "uVar2 = 3;" (assignment_expression "uVar2 = 3" identifier = number_literal) ;) (expression_statement "iVar1 = curl_strequal("singlecwd",param_2);" (assignment_expression "iVar1 = curl_strequal("singlecwd",param_2)" identifier = (call_expression "curl_strequal("singlecwd",param_2)" identifier (argument_list "("singlecwd",param_2)" ( (string_literal ""singlecwd"" " string_content ") , identifier )))) ;) (if_statement "if (iVar1 == 0) {\n    uVar2 = 2;\n    iVar1 = curl_strequal("nocwd",param_2);\n    if (iVar1 == 0) {\n      uVar2 = 1;\n      iVar1 = curl_strequal("multicwd",param_2);\n      if (iVar1 == 0) {\n        FUN_0001ed70(*(undefined4 *)(param_1 + 0x290),\n                     "unrecognized ftp file method \'%s\', using default\n",param_2);\n      }\n    }\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    uVar2 = 2;\n    iVar1 = curl_strequal("nocwd",param_2);\n    if (iVar1 == 0) {\n      uVar2 = 1;\n      iVar1 = curl_strequal("multicwd",param_2);\n      if (iVar1 == 0) {\n        FUN_0001ed70(*(undefined4 *)(param_1 + 0x290),\n                     "unrecognized ftp file method \'%s\', using default\n",param_2);\n      }\n    }\n  }" { (expression_statement "uVar2 = 2;" (assignment_expression "uVar2 = 2" identifier = number_literal) ;) (expression_statement "iVar1 = curl_strequal("nocwd",param_2);" (assignment_expression "iVar1 = curl_strequal("nocwd",param_2)" identifier = (call_expression "curl_strequal("nocwd",param_2)" identifier (argument_list "("nocwd",param_2)" ( (string_literal ""nocwd"" " string_content ") , identifier )))) ;) (if_statement "if (iVar1 == 0) {\n      uVar2 = 1;\n      iVar1 = curl_strequal("multicwd",param_2);\n      if (iVar1 == 0) {\n        FUN_0001ed70(*(undefined4 *)(param_1 + 0x290),\n                     "unrecognized ftp file method \'%s\', using default\n",param_2);\n      }\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar2 = 1;\n      iVar1 = curl_strequal("multicwd",param_2);\n      if (iVar1 == 0) {\n        FUN_0001ed70(*(undefined4 *)(param_1 + 0x290),\n                     "unrecognized ftp file method \'%s\', using default\n",param_2);\n      }\n    }" { (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" identifier = number_literal) ;) (expression_statement "iVar1 = curl_strequal("multicwd",param_2);" (assignment_expression "iVar1 = curl_strequal("multicwd",param_2)" identifier = (call_expression "curl_strequal("multicwd",param_2)" identifier (argument_list "("multicwd",param_2)" ( (string_literal ""multicwd"" " string_content ") , identifier )))) ;) (if_statement "if (iVar1 == 0) {\n        FUN_0001ed70(*(undefined4 *)(param_1 + 0x290),\n                     "unrecognized ftp file method \'%s\', using default\n",param_2);\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        FUN_0001ed70(*(undefined4 *)(param_1 + 0x290),\n                     "unrecognized ftp file method \'%s\', using default\n",param_2);\n      }" { (expression_statement "FUN_0001ed70(*(undefined4 *)(param_1 + 0x290),\n                     "unrecognized ftp file method \'%s\', using default\n",param_2);" (call_expression "FUN_0001ed70(*(undefined4 *)(param_1 + 0x290),\n                     "unrecognized ftp file method \'%s\', using default\n",param_2)" identifier (argument_list "(*(undefined4 *)(param_1 + 0x290),\n                     "unrecognized ftp file method \'%s\', using default\n",param_2)" ( (pointer_expression "*(undefined4 *)(param_1 + 0x290)" * (cast_expression "(undefined4 *)(param_1 + 0x290)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x290)" ( (binary_expression "param_1 + 0x290" identifier + number_literal) )))) , (string_literal ""unrecognized ftp file method \'%s\', using default\n"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence ") , identifier ))) ;) })) })) })) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (string_literal " string_content escape_sequence string_content escape_sequence string_content escape_sequence ") , IDENT ))) ;) })) })) })) (return_statement return IDENT ;) })))
(function_definition "undefined4 FUN_000248d0(int param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  uVar2 = 3;\n  iVar1 = curl_strequal("singlecwd",param_2);\n  if (iVar1 == 0) {\n    uVar2 = 2;\n    iVar1 = curl_strequal("nocwd",param_2);\n    if (iVar1 == 0) {\n      uVar2 = 1;\n      iVar1 = curl_strequal("multicwd",param_2);\n      if (iVar1 == 0) {\n        FUN_0001ed70(*(undefined4 *)(param_1 + 0x290),\n                     "unrecognized ftp file method \'%s\', using default\n",param_2);\n      }\n    }\n  }\n  return uVar2;\n}" (type_identifier "undefined4") (function_declarator "FUN_000248d0(int param_1,undefined4 param_2)" (identifier "FUN_000248d0") (parameter_list "(int param_1,undefined4 param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  \n  uVar2 = 3;\n  iVar1 = curl_strequal("singlecwd",param_2);\n  if (iVar1 == 0) {\n    uVar2 = 2;\n    iVar1 = curl_strequal("nocwd",param_2);\n    if (iVar1 == 0) {\n      uVar2 = 1;\n      iVar1 = curl_strequal("multicwd",param_2);\n      if (iVar1 == 0) {\n        FUN_0001ed70(*(undefined4 *)(param_1 + 0x290),\n                     "unrecognized ftp file method \'%s\', using default\n",param_2);\n      }\n    }\n  }\n  return uVar2;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (expression_statement "uVar2 = 3;" (assignment_expression "uVar2 = 3" (identifier "uVar2") (= "=") (number_literal "3")) (; ";")) (expression_statement "iVar1 = curl_strequal("singlecwd",param_2);" (assignment_expression "iVar1 = curl_strequal("singlecwd",param_2)" (identifier "iVar1") (= "=") (call_expression "curl_strequal("singlecwd",param_2)" (identifier "curl_strequal") (argument_list "("singlecwd",param_2)" (( "(") (string_literal ""singlecwd"" (" """) (string_content "singlecwd") (" """)) (, ",") (identifier "param_2") () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n    uVar2 = 2;\n    iVar1 = curl_strequal("nocwd",param_2);\n    if (iVar1 == 0) {\n      uVar2 = 1;\n      iVar1 = curl_strequal("multicwd",param_2);\n      if (iVar1 == 0) {\n        FUN_0001ed70(*(undefined4 *)(param_1 + 0x290),\n                     "unrecognized ftp file method \'%s\', using default\n",param_2);\n      }\n    }\n  }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    uVar2 = 2;\n    iVar1 = curl_strequal("nocwd",param_2);\n    if (iVar1 == 0) {\n      uVar2 = 1;\n      iVar1 = curl_strequal("multicwd",param_2);\n      if (iVar1 == 0) {\n        FUN_0001ed70(*(undefined4 *)(param_1 + 0x290),\n                     "unrecognized ftp file method \'%s\', using default\n",param_2);\n      }\n    }\n  }" ({ "{") (expression_statement "uVar2 = 2;" (assignment_expression "uVar2 = 2" (identifier "uVar2") (= "=") (number_literal "2")) (; ";")) (expression_statement "iVar1 = curl_strequal("nocwd",param_2);" (assignment_expression "iVar1 = curl_strequal("nocwd",param_2)" (identifier "iVar1") (= "=") (call_expression "curl_strequal("nocwd",param_2)" (identifier "curl_strequal") (argument_list "("nocwd",param_2)" (( "(") (string_literal ""nocwd"" (" """) (string_content "nocwd") (" """)) (, ",") (identifier "param_2") () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n      uVar2 = 1;\n      iVar1 = curl_strequal("multicwd",param_2);\n      if (iVar1 == 0) {\n        FUN_0001ed70(*(undefined4 *)(param_1 + 0x290),\n                     "unrecognized ftp file method \'%s\', using default\n",param_2);\n      }\n    }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      uVar2 = 1;\n      iVar1 = curl_strequal("multicwd",param_2);\n      if (iVar1 == 0) {\n        FUN_0001ed70(*(undefined4 *)(param_1 + 0x290),\n                     "unrecognized ftp file method \'%s\', using default\n",param_2);\n      }\n    }" ({ "{") (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" (identifier "uVar2") (= "=") (number_literal "1")) (; ";")) (expression_statement "iVar1 = curl_strequal("multicwd",param_2);" (assignment_expression "iVar1 = curl_strequal("multicwd",param_2)" (identifier "iVar1") (= "=") (call_expression "curl_strequal("multicwd",param_2)" (identifier "curl_strequal") (argument_list "("multicwd",param_2)" (( "(") (string_literal ""multicwd"" (" """) (string_content "multicwd") (" """)) (, ",") (identifier "param_2") () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n        FUN_0001ed70(*(undefined4 *)(param_1 + 0x290),\n                     "unrecognized ftp file method \'%s\', using default\n",param_2);\n      }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        FUN_0001ed70(*(undefined4 *)(param_1 + 0x290),\n                     "unrecognized ftp file method \'%s\', using default\n",param_2);\n      }" ({ "{") (expression_statement "FUN_0001ed70(*(undefined4 *)(param_1 + 0x290),\n                     "unrecognized ftp file method \'%s\', using default\n",param_2);" (call_expression "FUN_0001ed70(*(undefined4 *)(param_1 + 0x290),\n                     "unrecognized ftp file method \'%s\', using default\n",param_2)" (identifier "FUN_0001ed70") (argument_list "(*(undefined4 *)(param_1 + 0x290),\n                     "unrecognized ftp file method \'%s\', using default\n",param_2)" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 0x290)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x290)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x290)" (( "(") (binary_expression "param_1 + 0x290" (identifier "param_1") (+ "+") (number_literal "0x290")) () ")")))) (, ",") (string_literal ""unrecognized ftp file method \'%s\', using default\n"" (" """) (string_content "unrecognized ftp file method ") (escape_sequence "\'") (string_content "%s") (escape_sequence "\'") (string_content ", using default") (escape_sequence "\n") (" """)) (, ",") (identifier "param_2") () ")"))) (; ";")) (} "}"))) (} "}"))) (} "}"))) (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(type_1 *config,char *str)

{
  int var_2;
  int iVar2;
  
  iVar2 = 3;
  var_2 = var_1("singlecwd",str);
  if (var_2 == 0) {
    iVar2 = 2;
    var_2 = var_1("nocwd",str);
    if (var_2 == 0) {
      iVar2 = 1;
      var_2 = var_1("multicwd",str);
      if (var_2 == 0) {
        var_3(config->global,"unrecognized ftp file method \'%s\', using default\n",str);
      }
    }
  }
  return iVar2;
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (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: (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (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 (string_literal (string_content)) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (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 (string_literal (string_content)) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (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))))) (string_literal (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence)) (identifier)))))))))) (return_statement (identifier)))))

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

undefined4 MASKED(int param_1,undefined4 param_2)

{
  int iVar1;
  undefined4 uVar2;
  
  uVar2 = 3;
  iVar1 = curl_strequal("singlecwd",param_2);
  if (iVar1 == 0) {
    uVar2 = 2;
    iVar1 = curl_strequal("nocwd",param_2);
    if (iVar1 == 0) {
      uVar2 = 1;
      iVar1 = curl_strequal("multicwd",param_2);
      if (iVar1 == 0) {
        FUN_0001ed70(*(undefined4 *)(param_1 + 0x290),
                     "unrecognized ftp file method \'%s\', using default\n",param_2);
      }
    }
  }
  return uVar2;
}

