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

int do_sftp_init(void)

{
  int iVar1;
  sftp_request *req;
  sftp_packet *pktin;
  char *pcVar2;
  
  iVar1 = fxp_init();
  if (iVar1 != 0) {
    req = fxp_realpath_send(".");
    pktin = sftp_wait_for_reply(req);
    homedir = fxp_realpath_recv(pktin,req);
    if (homedir == (char *)0x0) {
      pcVar2 = fxp_error();
      __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,
                    "Warning: failed to resolve home directory: %s\n",pcVar2);
      homedir = dupstr(".");
    }
    else {
      __printf_chk(1,"Remote working directory is %s\n",homedir);
    }
    pwd = dupstr(homedir);
    return 0;
  }
  pcVar2 = fxp_error();
  __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,"Fatal: unable to initialise SFTP: %s\n",pcVar2
               );
  return 1;
}



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

undefined4 FUN_00023eb0(void)

{
  int iVar1;
  undefined4 uVar2;
  undefined4 uVar3;
  
  iVar1 = FUN_00029600();
  if (iVar1 != 0) {
    uVar2 = FUN_00029710(".");
    uVar3 = FUN_00020cb0(uVar2);
    DAT_000aab2c = FUN_00029790(uVar3,uVar2);
    if (DAT_000aab2c == 0) {
      uVar2 = FUN_000295c0();
      __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,
                    "Warning: failed to resolve home directory: %s\n",uVar2);
      DAT_000aab2c = FUN_0001aac0(".");
    }
    else {
      __printf_chk(1,"Remote working directory is %s\n",DAT_000aab2c);
    }
    DAT_000aab18 = FUN_0001aac0(DAT_000aab2c);
    return 0;
  }
  uVar2 = FUN_000295c0();
  __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,"Fatal: unable to initialise SFTP: %s\n",uVar2)
  ;
  return 1;
}


PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00014970
ADD EBX,0x85ed8
CALL 0x00029600
TEST EAX,EAX
JZ 0x00023f30
SUB ESP,0xc
LEA ESI,[EBX + 0xfffc7c79]
PUSH ESI
CALL 0x00029710
MOV dword ptr [ESP],EAX
MOV EDI,EAX
CALL 0x00020cb0
POP EDX
POP ECX
PUSH EDI
PUSH EAX
CALL 0x00029790
LEA EDI,[EBX + 0xd9c]
ADD ESP,0x10
MOV dword ptr [EDI],EAX
TEST EAX,EAX
JZ 0x00023f60
SUB ESP,0x4
PUSH EAX
LEA EAX,[EBX + 0xfffc8c90]
PUSH EAX
PUSH 0x1
CALL 0x00014610
MOV EAX,dword ptr [EDI]
ADD ESP,0x10
SUB ESP,0xc
PUSH EAX
CALL 0x0001aac0
LEA EDX,[EBX + 0xd88]
ADD ESP,0x10
MOV dword ptr [EDX],EAX
XOR EAX,EAX
POP EBX
POP ESI
POP EDI
RET
CALL 0x000295c0
PUSH EAX
LEA EAX,[EBX + 0xfffc8c38]
PUSH EAX
MOV EAX,dword ptr [EBX + 0x230]
PUSH 0x1
PUSH dword ptr [EAX]
CALL 0x00014740
ADD ESP,0x10
MOV EAX,0x1
POP EBX
POP ESI
POP EDI
RET
CALL 0x000295c0
PUSH EAX
LEA EAX,[EBX + 0xfffc8c60]
PUSH EAX
MOV EAX,dword ptr [EBX + 0x230]
PUSH 0x1
PUSH dword ptr [EAX]
CALL 0x00014740
MOV dword ptr [ESP],ESI
CALL 0x0001aac0
ADD ESP,0x10
MOV dword ptr [EDI],EAX
JMP 0x00023f0f
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 FUN_00023eb0(void)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 uVar3;\n  \n  iVar1 = FUN_00029600();\n  if (iVar1 != 0) {\n    uVar2 = FUN_00029710(".");\n    uVar3 = FUN_00020cb0(uVar2);\n    DAT_000aab2c = FUN_00029790(uVar3,uVar2);\n    if (DAT_000aab2c == 0) {\n      uVar2 = FUN_000295c0();\n      __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,\n                    "Warning: failed to resolve home directory: %s\n",uVar2);\n      DAT_000aab2c = FUN_0001aac0(".");\n    }\n    else {\n      __printf_chk(1,"Remote working directory is %s\n",DAT_000aab2c);\n    }\n    DAT_000aab18 = FUN_0001aac0(DAT_000aab2c);\n    return 0;\n  }\n  uVar2 = FUN_000295c0();\n  __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,"Fatal: unable to initialise SFTP: %s\n",uVar2)\n  ;\n  return 1;\n}\n\n" comment (function_definition "undefined4 FUN_00023eb0(void)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 uVar3;\n  \n  iVar1 = FUN_00029600();\n  if (iVar1 != 0) {\n    uVar2 = FUN_00029710(".");\n    uVar3 = FUN_00020cb0(uVar2);\n    DAT_000aab2c = FUN_00029790(uVar3,uVar2);\n    if (DAT_000aab2c == 0) {\n      uVar2 = FUN_000295c0();\n      __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,\n                    "Warning: failed to resolve home directory: %s\n",uVar2);\n      DAT_000aab2c = FUN_0001aac0(".");\n    }\n    else {\n      __printf_chk(1,"Remote working directory is %s\n",DAT_000aab2c);\n    }\n    DAT_000aab18 = FUN_0001aac0(DAT_000aab2c);\n    return 0;\n  }\n  uVar2 = FUN_000295c0();\n  __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,"Fatal: unable to initialise SFTP: %s\n",uVar2)\n  ;\n  return 1;\n}" type_identifier (function_declarator "FUN_00023eb0(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 uVar3;\n  \n  iVar1 = FUN_00029600();\n  if (iVar1 != 0) {\n    uVar2 = FUN_00029710(".");\n    uVar3 = FUN_00020cb0(uVar2);\n    DAT_000aab2c = FUN_00029790(uVar3,uVar2);\n    if (DAT_000aab2c == 0) {\n      uVar2 = FUN_000295c0();\n      __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,\n                    "Warning: failed to resolve home directory: %s\n",uVar2);\n      DAT_000aab2c = FUN_0001aac0(".");\n    }\n    else {\n      __printf_chk(1,"Remote working directory is %s\n",DAT_000aab2c);\n    }\n    DAT_000aab18 = FUN_0001aac0(DAT_000aab2c);\n    return 0;\n  }\n  uVar2 = FUN_000295c0();\n  __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,"Fatal: unable to initialise SFTP: %s\n",uVar2)\n  ;\n  return 1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (expression_statement "iVar1 = FUN_00029600();" (assignment_expression "iVar1 = FUN_00029600()" identifier = (call_expression "FUN_00029600()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar1 != 0) {\n    uVar2 = FUN_00029710(".");\n    uVar3 = FUN_00020cb0(uVar2);\n    DAT_000aab2c = FUN_00029790(uVar3,uVar2);\n    if (DAT_000aab2c == 0) {\n      uVar2 = FUN_000295c0();\n      __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,\n                    "Warning: failed to resolve home directory: %s\n",uVar2);\n      DAT_000aab2c = FUN_0001aac0(".");\n    }\n    else {\n      __printf_chk(1,"Remote working directory is %s\n",DAT_000aab2c);\n    }\n    DAT_000aab18 = FUN_0001aac0(DAT_000aab2c);\n    return 0;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    uVar2 = FUN_00029710(".");\n    uVar3 = FUN_00020cb0(uVar2);\n    DAT_000aab2c = FUN_00029790(uVar3,uVar2);\n    if (DAT_000aab2c == 0) {\n      uVar2 = FUN_000295c0();\n      __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,\n                    "Warning: failed to resolve home directory: %s\n",uVar2);\n      DAT_000aab2c = FUN_0001aac0(".");\n    }\n    else {\n      __printf_chk(1,"Remote working directory is %s\n",DAT_000aab2c);\n    }\n    DAT_000aab18 = FUN_0001aac0(DAT_000aab2c);\n    return 0;\n  }" { (expression_statement "uVar2 = FUN_00029710(".");" (assignment_expression "uVar2 = FUN_00029710(".")" identifier = (call_expression "FUN_00029710(".")" identifier (argument_list "(".")" ( (string_literal ""."" " string_content ") )))) ;) (expression_statement "uVar3 = FUN_00020cb0(uVar2);" (assignment_expression "uVar3 = FUN_00020cb0(uVar2)" identifier = (call_expression "FUN_00020cb0(uVar2)" identifier (argument_list "(uVar2)" ( identifier )))) ;) (expression_statement "DAT_000aab2c = FUN_00029790(uVar3,uVar2);" (assignment_expression "DAT_000aab2c = FUN_00029790(uVar3,uVar2)" identifier = (call_expression "FUN_00029790(uVar3,uVar2)" identifier (argument_list "(uVar3,uVar2)" ( identifier , identifier )))) ;) (if_statement "if (DAT_000aab2c == 0) {\n      uVar2 = FUN_000295c0();\n      __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,\n                    "Warning: failed to resolve home directory: %s\n",uVar2);\n      DAT_000aab2c = FUN_0001aac0(".");\n    }\n    else {\n      __printf_chk(1,"Remote working directory is %s\n",DAT_000aab2c);\n    }" if (parenthesized_expression "(DAT_000aab2c == 0)" ( (binary_expression "DAT_000aab2c == 0" identifier == number_literal) )) (compound_statement "{\n      uVar2 = FUN_000295c0();\n      __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,\n                    "Warning: failed to resolve home directory: %s\n",uVar2);\n      DAT_000aab2c = FUN_0001aac0(".");\n    }" { (expression_statement "uVar2 = FUN_000295c0();" (assignment_expression "uVar2 = FUN_000295c0()" identifier = (call_expression "FUN_000295c0()" identifier (argument_list "()" ( )))) ;) (expression_statement "__fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,\n                    "Warning: failed to resolve home directory: %s\n",uVar2);" (call_expression "__fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,\n                    "Warning: failed to resolve home directory: %s\n",uVar2)" identifier (argument_list "(*(undefined4 *)PTR_stderr_000a9fc0,1,\n                    "Warning: failed to resolve home directory: %s\n",uVar2)" ( (pointer_expression "*(undefined4 *)PTR_stderr_000a9fc0" * (cast_expression "(undefined4 *)PTR_stderr_000a9fc0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) , number_literal , (string_literal ""Warning: failed to resolve home directory: %s\n"" " string_content escape_sequence ") , identifier ))) ;) (expression_statement "DAT_000aab2c = FUN_0001aac0(".");" (assignment_expression "DAT_000aab2c = FUN_0001aac0(".")" identifier = (call_expression "FUN_0001aac0(".")" identifier (argument_list "(".")" ( (string_literal ""."" " string_content ") )))) ;) }) (else_clause "else {\n      __printf_chk(1,"Remote working directory is %s\n",DAT_000aab2c);\n    }" else (compound_statement "{\n      __printf_chk(1,"Remote working directory is %s\n",DAT_000aab2c);\n    }" { (expression_statement "__printf_chk(1,"Remote working directory is %s\n",DAT_000aab2c);" (call_expression "__printf_chk(1,"Remote working directory is %s\n",DAT_000aab2c)" identifier (argument_list "(1,"Remote working directory is %s\n",DAT_000aab2c)" ( number_literal , (string_literal ""Remote working directory is %s\n"" " string_content escape_sequence ") , identifier ))) ;) }))) (expression_statement "DAT_000aab18 = FUN_0001aac0(DAT_000aab2c);" (assignment_expression "DAT_000aab18 = FUN_0001aac0(DAT_000aab2c)" identifier = (call_expression "FUN_0001aac0(DAT_000aab2c)" identifier (argument_list "(DAT_000aab2c)" ( identifier )))) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "uVar2 = FUN_000295c0();" (assignment_expression "uVar2 = FUN_000295c0()" identifier = (call_expression "FUN_000295c0()" identifier (argument_list "()" ( )))) ;) (expression_statement "__fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,"Fatal: unable to initialise SFTP: %s\n",uVar2)\n  ;" (call_expression "__fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,"Fatal: unable to initialise SFTP: %s\n",uVar2)" identifier (argument_list "(*(undefined4 *)PTR_stderr_000a9fc0,1,"Fatal: unable to initialise SFTP: %s\n",uVar2)" ( (pointer_expression "*(undefined4 *)PTR_stderr_000a9fc0" * (cast_expression "(undefined4 *)PTR_stderr_000a9fc0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) , number_literal , (string_literal ""Fatal: unable to initialise SFTP: %s\n"" " string_content escape_sequence ") , identifier ))) ;) (return_statement "return 1;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nint do_sftp_init(void)\n\n{\n  int iVar1;\n  sftp_request *req;\n  sftp_packet *pktin;\n  char *pcVar2;\n  \n  iVar1 = fxp_init();\n  if (iVar1 != 0) {\n    req = fxp_realpath_send(".");\n    pktin = sftp_wait_for_reply(req);\n    homedir = fxp_realpath_recv(pktin,req);\n    if (homedir == (char *)0x0) {\n      pcVar2 = fxp_error();\n      __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,\n                    "Warning: failed to resolve home directory: %s\n",pcVar2);\n      homedir = dupstr(".");\n    }\n    else {\n      __printf_chk(1,"Remote working directory is %s\n",homedir);\n    }\n    pwd = dupstr(homedir);\n    return 0;\n  }\n  pcVar2 = fxp_error();\n  __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,"Fatal: unable to initialise SFTP: %s\n",pcVar2\n               );\n  return 1;\n}\n\n" comment comment (function_definition "int do_sftp_init(void)\n\n{\n  int iVar1;\n  sftp_request *req;\n  sftp_packet *pktin;\n  char *pcVar2;\n  \n  iVar1 = fxp_init();\n  if (iVar1 != 0) {\n    req = fxp_realpath_send(".");\n    pktin = sftp_wait_for_reply(req);\n    homedir = fxp_realpath_recv(pktin,req);\n    if (homedir == (char *)0x0) {\n      pcVar2 = fxp_error();\n      __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,\n                    "Warning: failed to resolve home directory: %s\n",pcVar2);\n      homedir = dupstr(".");\n    }\n    else {\n      __printf_chk(1,"Remote working directory is %s\n",homedir);\n    }\n    pwd = dupstr(homedir);\n    return 0;\n  }\n  pcVar2 = fxp_error();\n  __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,"Fatal: unable to initialise SFTP: %s\n",pcVar2\n               );\n  return 1;\n}" primitive_type (function_declarator "do_sftp_init(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int iVar1;\n  sftp_request *req;\n  sftp_packet *pktin;\n  char *pcVar2;\n  \n  iVar1 = fxp_init();\n  if (iVar1 != 0) {\n    req = fxp_realpath_send(".");\n    pktin = sftp_wait_for_reply(req);\n    homedir = fxp_realpath_recv(pktin,req);\n    if (homedir == (char *)0x0) {\n      pcVar2 = fxp_error();\n      __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,\n                    "Warning: failed to resolve home directory: %s\n",pcVar2);\n      homedir = dupstr(".");\n    }\n    else {\n      __printf_chk(1,"Remote working directory is %s\n",homedir);\n    }\n    pwd = dupstr(homedir);\n    return 0;\n  }\n  pcVar2 = fxp_error();\n  __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,"Fatal: unable to initialise SFTP: %s\n",pcVar2\n               );\n  return 1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "sftp_request *req;" type_identifier (pointer_declarator "*req" * identifier) ;) (declaration "sftp_packet *pktin;" type_identifier (pointer_declarator "*pktin" * identifier) ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (expression_statement "iVar1 = fxp_init();" (assignment_expression "iVar1 = fxp_init()" identifier = (call_expression "fxp_init()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar1 != 0) {\n    req = fxp_realpath_send(".");\n    pktin = sftp_wait_for_reply(req);\n    homedir = fxp_realpath_recv(pktin,req);\n    if (homedir == (char *)0x0) {\n      pcVar2 = fxp_error();\n      __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,\n                    "Warning: failed to resolve home directory: %s\n",pcVar2);\n      homedir = dupstr(".");\n    }\n    else {\n      __printf_chk(1,"Remote working directory is %s\n",homedir);\n    }\n    pwd = dupstr(homedir);\n    return 0;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    req = fxp_realpath_send(".");\n    pktin = sftp_wait_for_reply(req);\n    homedir = fxp_realpath_recv(pktin,req);\n    if (homedir == (char *)0x0) {\n      pcVar2 = fxp_error();\n      __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,\n                    "Warning: failed to resolve home directory: %s\n",pcVar2);\n      homedir = dupstr(".");\n    }\n    else {\n      __printf_chk(1,"Remote working directory is %s\n",homedir);\n    }\n    pwd = dupstr(homedir);\n    return 0;\n  }" { (expression_statement "req = fxp_realpath_send(".");" (assignment_expression "req = fxp_realpath_send(".")" identifier = (call_expression "fxp_realpath_send(".")" identifier (argument_list "(".")" ( (string_literal ""."" " string_content ") )))) ;) (expression_statement "pktin = sftp_wait_for_reply(req);" (assignment_expression "pktin = sftp_wait_for_reply(req)" identifier = (call_expression "sftp_wait_for_reply(req)" identifier (argument_list "(req)" ( identifier )))) ;) (expression_statement "homedir = fxp_realpath_recv(pktin,req);" (assignment_expression "homedir = fxp_realpath_recv(pktin,req)" identifier = (call_expression "fxp_realpath_recv(pktin,req)" identifier (argument_list "(pktin,req)" ( identifier , identifier )))) ;) (if_statement "if (homedir == (char *)0x0) {\n      pcVar2 = fxp_error();\n      __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,\n                    "Warning: failed to resolve home directory: %s\n",pcVar2);\n      homedir = dupstr(".");\n    }\n    else {\n      __printf_chk(1,"Remote working directory is %s\n",homedir);\n    }" if (parenthesized_expression "(homedir == (char *)0x0)" ( (binary_expression "homedir == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      pcVar2 = fxp_error();\n      __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,\n                    "Warning: failed to resolve home directory: %s\n",pcVar2);\n      homedir = dupstr(".");\n    }" { (expression_statement "pcVar2 = fxp_error();" (assignment_expression "pcVar2 = fxp_error()" identifier = (call_expression "fxp_error()" identifier (argument_list "()" ( )))) ;) (expression_statement "__fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,\n                    "Warning: failed to resolve home directory: %s\n",pcVar2);" (call_expression "__fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,\n                    "Warning: failed to resolve home directory: %s\n",pcVar2)" identifier (argument_list "(*(undefined4 *)PTR_stderr_000a9fc0,1,\n                    "Warning: failed to resolve home directory: %s\n",pcVar2)" ( (pointer_expression "*(undefined4 *)PTR_stderr_000a9fc0" * (cast_expression "(undefined4 *)PTR_stderr_000a9fc0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) , number_literal , (string_literal ""Warning: failed to resolve home directory: %s\n"" " string_content escape_sequence ") , identifier ))) ;) (expression_statement "homedir = dupstr(".");" (assignment_expression "homedir = dupstr(".")" identifier = (call_expression "dupstr(".")" identifier (argument_list "(".")" ( (string_literal ""."" " string_content ") )))) ;) }) (else_clause "else {\n      __printf_chk(1,"Remote working directory is %s\n",homedir);\n    }" else (compound_statement "{\n      __printf_chk(1,"Remote working directory is %s\n",homedir);\n    }" { (expression_statement "__printf_chk(1,"Remote working directory is %s\n",homedir);" (call_expression "__printf_chk(1,"Remote working directory is %s\n",homedir)" identifier (argument_list "(1,"Remote working directory is %s\n",homedir)" ( number_literal , (string_literal ""Remote working directory is %s\n"" " string_content escape_sequence ") , identifier ))) ;) }))) (expression_statement "pwd = dupstr(homedir);" (assignment_expression "pwd = dupstr(homedir)" identifier = (call_expression "dupstr(homedir)" identifier (argument_list "(homedir)" ( identifier )))) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "pcVar2 = fxp_error();" (assignment_expression "pcVar2 = fxp_error()" identifier = (call_expression "fxp_error()" identifier (argument_list "()" ( )))) ;) (expression_statement "__fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,"Fatal: unable to initialise SFTP: %s\n",pcVar2\n               );" (call_expression "__fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,"Fatal: unable to initialise SFTP: %s\n",pcVar2\n               )" identifier (argument_list "(*(undefined4 *)PTR_stderr_000a9fc0,1,"Fatal: unable to initialise SFTP: %s\n",pcVar2\n               )" ( (pointer_expression "*(undefined4 *)PTR_stderr_000a9fc0" * (cast_expression "(undefined4 *)PTR_stderr_000a9fc0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) , number_literal , (string_literal ""Fatal: unable to initialise SFTP: %s\n"" " string_content escape_sequence ") , identifier ))) ;) (return_statement "return 1;" return number_literal ;) })))
(translation_unit "undefined4 FUN_00023eb0(void)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 uVar3;\n  \n  iVar1 = FUN_00029600();\n  if (iVar1 != 0) {\n    uVar2 = FUN_00029710(".");\n    uVar3 = FUN_00020cb0(uVar2);\n    DAT_000aab2c = FUN_00029790(uVar3,uVar2);\n    if (DAT_000aab2c == 0) {\n      uVar2 = FUN_000295c0();\n      __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,\n                    "Warning: failed to resolve home directory: %s\n",uVar2);\n      DAT_000aab2c = FUN_0001aac0(".");\n    }\n    else {\n      __printf_chk(1,"Remote working directory is %s\n",DAT_000aab2c);\n    }\n    DAT_000aab18 = FUN_0001aac0(DAT_000aab2c);\n    return 0;\n  }\n  uVar2 = FUN_000295c0();\n  __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,"Fatal: unable to initialise SFTP: %s\n",uVar2)\n  ;\n  return 1;\n}\n\n" (function_definition "undefined4 FUN_00023eb0(void)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 uVar3;\n  \n  iVar1 = FUN_00029600();\n  if (iVar1 != 0) {\n    uVar2 = FUN_00029710(".");\n    uVar3 = FUN_00020cb0(uVar2);\n    DAT_000aab2c = FUN_00029790(uVar3,uVar2);\n    if (DAT_000aab2c == 0) {\n      uVar2 = FUN_000295c0();\n      __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,\n                    "Warning: failed to resolve home directory: %s\n",uVar2);\n      DAT_000aab2c = FUN_0001aac0(".");\n    }\n    else {\n      __printf_chk(1,"Remote working directory is %s\n",DAT_000aab2c);\n    }\n    DAT_000aab18 = FUN_0001aac0(DAT_000aab2c);\n    return 0;\n  }\n  uVar2 = FUN_000295c0();\n  __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,"Fatal: unable to initialise SFTP: %s\n",uVar2)\n  ;\n  return 1;\n}" type_identifier (function_declarator "FUN_00023eb0(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 uVar3;\n  \n  iVar1 = FUN_00029600();\n  if (iVar1 != 0) {\n    uVar2 = FUN_00029710(".");\n    uVar3 = FUN_00020cb0(uVar2);\n    DAT_000aab2c = FUN_00029790(uVar3,uVar2);\n    if (DAT_000aab2c == 0) {\n      uVar2 = FUN_000295c0();\n      __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,\n                    "Warning: failed to resolve home directory: %s\n",uVar2);\n      DAT_000aab2c = FUN_0001aac0(".");\n    }\n    else {\n      __printf_chk(1,"Remote working directory is %s\n",DAT_000aab2c);\n    }\n    DAT_000aab18 = FUN_0001aac0(DAT_000aab2c);\n    return 0;\n  }\n  uVar2 = FUN_000295c0();\n  __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,"Fatal: unable to initialise SFTP: %s\n",uVar2)\n  ;\n  return 1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (expression_statement "iVar1 = FUN_00029600();" (assignment_expression "iVar1 = FUN_00029600()" identifier = (call_expression "FUN_00029600()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar1 != 0) {\n    uVar2 = FUN_00029710(".");\n    uVar3 = FUN_00020cb0(uVar2);\n    DAT_000aab2c = FUN_00029790(uVar3,uVar2);\n    if (DAT_000aab2c == 0) {\n      uVar2 = FUN_000295c0();\n      __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,\n                    "Warning: failed to resolve home directory: %s\n",uVar2);\n      DAT_000aab2c = FUN_0001aac0(".");\n    }\n    else {\n      __printf_chk(1,"Remote working directory is %s\n",DAT_000aab2c);\n    }\n    DAT_000aab18 = FUN_0001aac0(DAT_000aab2c);\n    return 0;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    uVar2 = FUN_00029710(".");\n    uVar3 = FUN_00020cb0(uVar2);\n    DAT_000aab2c = FUN_00029790(uVar3,uVar2);\n    if (DAT_000aab2c == 0) {\n      uVar2 = FUN_000295c0();\n      __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,\n                    "Warning: failed to resolve home directory: %s\n",uVar2);\n      DAT_000aab2c = FUN_0001aac0(".");\n    }\n    else {\n      __printf_chk(1,"Remote working directory is %s\n",DAT_000aab2c);\n    }\n    DAT_000aab18 = FUN_0001aac0(DAT_000aab2c);\n    return 0;\n  }" { (expression_statement "uVar2 = FUN_00029710(".");" (assignment_expression "uVar2 = FUN_00029710(".")" identifier = (call_expression "FUN_00029710(".")" identifier (argument_list "(".")" ( (string_literal ""."" " string_content ") )))) ;) (expression_statement "uVar3 = FUN_00020cb0(uVar2);" (assignment_expression "uVar3 = FUN_00020cb0(uVar2)" identifier = (call_expression "FUN_00020cb0(uVar2)" identifier (argument_list "(uVar2)" ( identifier )))) ;) (expression_statement "DAT_000aab2c = FUN_00029790(uVar3,uVar2);" (assignment_expression "DAT_000aab2c = FUN_00029790(uVar3,uVar2)" identifier = (call_expression "FUN_00029790(uVar3,uVar2)" identifier (argument_list "(uVar3,uVar2)" ( identifier , identifier )))) ;) (if_statement "if (DAT_000aab2c == 0) {\n      uVar2 = FUN_000295c0();\n      __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,\n                    "Warning: failed to resolve home directory: %s\n",uVar2);\n      DAT_000aab2c = FUN_0001aac0(".");\n    }\n    else {\n      __printf_chk(1,"Remote working directory is %s\n",DAT_000aab2c);\n    }" if (parenthesized_expression "(DAT_000aab2c == 0)" ( (binary_expression "DAT_000aab2c == 0" identifier == number_literal) )) (compound_statement "{\n      uVar2 = FUN_000295c0();\n      __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,\n                    "Warning: failed to resolve home directory: %s\n",uVar2);\n      DAT_000aab2c = FUN_0001aac0(".");\n    }" { (expression_statement "uVar2 = FUN_000295c0();" (assignment_expression "uVar2 = FUN_000295c0()" identifier = (call_expression "FUN_000295c0()" identifier (argument_list "()" ( )))) ;) (expression_statement "__fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,\n                    "Warning: failed to resolve home directory: %s\n",uVar2);" (call_expression "__fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,\n                    "Warning: failed to resolve home directory: %s\n",uVar2)" identifier (argument_list "(*(undefined4 *)PTR_stderr_000a9fc0,1,\n                    "Warning: failed to resolve home directory: %s\n",uVar2)" ( (pointer_expression "*(undefined4 *)PTR_stderr_000a9fc0" * (cast_expression "(undefined4 *)PTR_stderr_000a9fc0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) , number_literal , (string_literal ""Warning: failed to resolve home directory: %s\n"" " string_content escape_sequence ") , identifier ))) ;) (expression_statement "DAT_000aab2c = FUN_0001aac0(".");" (assignment_expression "DAT_000aab2c = FUN_0001aac0(".")" identifier = (call_expression "FUN_0001aac0(".")" identifier (argument_list "(".")" ( (string_literal ""."" " string_content ") )))) ;) }) (else_clause "else {\n      __printf_chk(1,"Remote working directory is %s\n",DAT_000aab2c);\n    }" else (compound_statement "{\n      __printf_chk(1,"Remote working directory is %s\n",DAT_000aab2c);\n    }" { (expression_statement "__printf_chk(1,"Remote working directory is %s\n",DAT_000aab2c);" (call_expression "__printf_chk(1,"Remote working directory is %s\n",DAT_000aab2c)" identifier (argument_list "(1,"Remote working directory is %s\n",DAT_000aab2c)" ( number_literal , (string_literal ""Remote working directory is %s\n"" " string_content escape_sequence ") , identifier ))) ;) }))) (expression_statement "DAT_000aab18 = FUN_0001aac0(DAT_000aab2c);" (assignment_expression "DAT_000aab18 = FUN_0001aac0(DAT_000aab2c)" identifier = (call_expression "FUN_0001aac0(DAT_000aab2c)" identifier (argument_list "(DAT_000aab2c)" ( identifier )))) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "uVar2 = FUN_000295c0();" (assignment_expression "uVar2 = FUN_000295c0()" identifier = (call_expression "FUN_000295c0()" identifier (argument_list "()" ( )))) ;) (expression_statement "__fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,"Fatal: unable to initialise SFTP: %s\n",uVar2)\n  ;" (call_expression "__fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,"Fatal: unable to initialise SFTP: %s\n",uVar2)" identifier (argument_list "(*(undefined4 *)PTR_stderr_000a9fc0,1,"Fatal: unable to initialise SFTP: %s\n",uVar2)" ( (pointer_expression "*(undefined4 *)PTR_stderr_000a9fc0" * (cast_expression "(undefined4 *)PTR_stderr_000a9fc0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) , number_literal , (string_literal ""Fatal: unable to initialise SFTP: %s\n"" " string_content escape_sequence ") , identifier ))) ;) (return_statement "return 1;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) , LIT , (string_literal " string_content escape_sequence ") , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") )))) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( LIT , (string_literal " string_content escape_sequence ") , IDENT ))) ;) }))) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) , LIT , (string_literal " string_content escape_sequence ") , IDENT ))) ;) (return_statement return LIT ;) })))
(function_definition "undefined4 FUN_00023eb0(void)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 uVar3;\n  \n  iVar1 = FUN_00029600();\n  if (iVar1 != 0) {\n    uVar2 = FUN_00029710(".");\n    uVar3 = FUN_00020cb0(uVar2);\n    DAT_000aab2c = FUN_00029790(uVar3,uVar2);\n    if (DAT_000aab2c == 0) {\n      uVar2 = FUN_000295c0();\n      __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,\n                    "Warning: failed to resolve home directory: %s\n",uVar2);\n      DAT_000aab2c = FUN_0001aac0(".");\n    }\n    else {\n      __printf_chk(1,"Remote working directory is %s\n",DAT_000aab2c);\n    }\n    DAT_000aab18 = FUN_0001aac0(DAT_000aab2c);\n    return 0;\n  }\n  uVar2 = FUN_000295c0();\n  __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,"Fatal: unable to initialise SFTP: %s\n",uVar2)\n  ;\n  return 1;\n}" (type_identifier "undefined4") (function_declarator "FUN_00023eb0(void)" (identifier "FUN_00023eb0") (parameter_list "(void)" (( "(") (parameter_declaration "void" (primitive_type "void")) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 uVar3;\n  \n  iVar1 = FUN_00029600();\n  if (iVar1 != 0) {\n    uVar2 = FUN_00029710(".");\n    uVar3 = FUN_00020cb0(uVar2);\n    DAT_000aab2c = FUN_00029790(uVar3,uVar2);\n    if (DAT_000aab2c == 0) {\n      uVar2 = FUN_000295c0();\n      __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,\n                    "Warning: failed to resolve home directory: %s\n",uVar2);\n      DAT_000aab2c = FUN_0001aac0(".");\n    }\n    else {\n      __printf_chk(1,"Remote working directory is %s\n",DAT_000aab2c);\n    }\n    DAT_000aab18 = FUN_0001aac0(DAT_000aab2c);\n    return 0;\n  }\n  uVar2 = FUN_000295c0();\n  __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,"Fatal: unable to initialise SFTP: %s\n",uVar2)\n  ;\n  return 1;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (expression_statement "iVar1 = FUN_00029600();" (assignment_expression "iVar1 = FUN_00029600()" (identifier "iVar1") (= "=") (call_expression "FUN_00029600()" (identifier "FUN_00029600") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar1 != 0) {\n    uVar2 = FUN_00029710(".");\n    uVar3 = FUN_00020cb0(uVar2);\n    DAT_000aab2c = FUN_00029790(uVar3,uVar2);\n    if (DAT_000aab2c == 0) {\n      uVar2 = FUN_000295c0();\n      __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,\n                    "Warning: failed to resolve home directory: %s\n",uVar2);\n      DAT_000aab2c = FUN_0001aac0(".");\n    }\n    else {\n      __printf_chk(1,"Remote working directory is %s\n",DAT_000aab2c);\n    }\n    DAT_000aab18 = FUN_0001aac0(DAT_000aab2c);\n    return 0;\n  }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    uVar2 = FUN_00029710(".");\n    uVar3 = FUN_00020cb0(uVar2);\n    DAT_000aab2c = FUN_00029790(uVar3,uVar2);\n    if (DAT_000aab2c == 0) {\n      uVar2 = FUN_000295c0();\n      __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,\n                    "Warning: failed to resolve home directory: %s\n",uVar2);\n      DAT_000aab2c = FUN_0001aac0(".");\n    }\n    else {\n      __printf_chk(1,"Remote working directory is %s\n",DAT_000aab2c);\n    }\n    DAT_000aab18 = FUN_0001aac0(DAT_000aab2c);\n    return 0;\n  }" ({ "{") (expression_statement "uVar2 = FUN_00029710(".");" (assignment_expression "uVar2 = FUN_00029710(".")" (identifier "uVar2") (= "=") (call_expression "FUN_00029710(".")" (identifier "FUN_00029710") (argument_list "(".")" (( "(") (string_literal ""."" (" """) (string_content ".") (" """)) () ")")))) (; ";")) (expression_statement "uVar3 = FUN_00020cb0(uVar2);" (assignment_expression "uVar3 = FUN_00020cb0(uVar2)" (identifier "uVar3") (= "=") (call_expression "FUN_00020cb0(uVar2)" (identifier "FUN_00020cb0") (argument_list "(uVar2)" (( "(") (identifier "uVar2") () ")")))) (; ";")) (expression_statement "DAT_000aab2c = FUN_00029790(uVar3,uVar2);" (assignment_expression "DAT_000aab2c = FUN_00029790(uVar3,uVar2)" (identifier "DAT_000aab2c") (= "=") (call_expression "FUN_00029790(uVar3,uVar2)" (identifier "FUN_00029790") (argument_list "(uVar3,uVar2)" (( "(") (identifier "uVar3") (, ",") (identifier "uVar2") () ")")))) (; ";")) (if_statement "if (DAT_000aab2c == 0) {\n      uVar2 = FUN_000295c0();\n      __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,\n                    "Warning: failed to resolve home directory: %s\n",uVar2);\n      DAT_000aab2c = FUN_0001aac0(".");\n    }\n    else {\n      __printf_chk(1,"Remote working directory is %s\n",DAT_000aab2c);\n    }" (if "if") (parenthesized_expression "(DAT_000aab2c == 0)" (( "(") (binary_expression "DAT_000aab2c == 0" (identifier "DAT_000aab2c") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      uVar2 = FUN_000295c0();\n      __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,\n                    "Warning: failed to resolve home directory: %s\n",uVar2);\n      DAT_000aab2c = FUN_0001aac0(".");\n    }" ({ "{") (expression_statement "uVar2 = FUN_000295c0();" (assignment_expression "uVar2 = FUN_000295c0()" (identifier "uVar2") (= "=") (call_expression "FUN_000295c0()" (identifier "FUN_000295c0") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "__fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,\n                    "Warning: failed to resolve home directory: %s\n",uVar2);" (call_expression "__fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,\n                    "Warning: failed to resolve home directory: %s\n",uVar2)" (identifier "__fprintf_chk") (argument_list "(*(undefined4 *)PTR_stderr_000a9fc0,1,\n                    "Warning: failed to resolve home directory: %s\n",uVar2)" (( "(") (pointer_expression "*(undefined4 *)PTR_stderr_000a9fc0" (* "*") (cast_expression "(undefined4 *)PTR_stderr_000a9fc0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_stderr_000a9fc0"))) (, ",") (number_literal "1") (, ",") (string_literal ""Warning: failed to resolve home directory: %s\n"" (" """) (string_content "Warning: failed to resolve home directory: %s") (escape_sequence "\n") (" """)) (, ",") (identifier "uVar2") () ")"))) (; ";")) (expression_statement "DAT_000aab2c = FUN_0001aac0(".");" (assignment_expression "DAT_000aab2c = FUN_0001aac0(".")" (identifier "DAT_000aab2c") (= "=") (call_expression "FUN_0001aac0(".")" (identifier "FUN_0001aac0") (argument_list "(".")" (( "(") (string_literal ""."" (" """) (string_content ".") (" """)) () ")")))) (; ";")) (} "}")) (else_clause "else {\n      __printf_chk(1,"Remote working directory is %s\n",DAT_000aab2c);\n    }" (else "else") (compound_statement "{\n      __printf_chk(1,"Remote working directory is %s\n",DAT_000aab2c);\n    }" ({ "{") (expression_statement "__printf_chk(1,"Remote working directory is %s\n",DAT_000aab2c);" (call_expression "__printf_chk(1,"Remote working directory is %s\n",DAT_000aab2c)" (identifier "__printf_chk") (argument_list "(1,"Remote working directory is %s\n",DAT_000aab2c)" (( "(") (number_literal "1") (, ",") (string_literal ""Remote working directory is %s\n"" (" """) (string_content "Remote working directory is %s") (escape_sequence "\n") (" """)) (, ",") (identifier "DAT_000aab2c") () ")"))) (; ";")) (} "}")))) (expression_statement "DAT_000aab18 = FUN_0001aac0(DAT_000aab2c);" (assignment_expression "DAT_000aab18 = FUN_0001aac0(DAT_000aab2c)" (identifier "DAT_000aab18") (= "=") (call_expression "FUN_0001aac0(DAT_000aab2c)" (identifier "FUN_0001aac0") (argument_list "(DAT_000aab2c)" (( "(") (identifier "DAT_000aab2c") () ")")))) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "uVar2 = FUN_000295c0();" (assignment_expression "uVar2 = FUN_000295c0()" (identifier "uVar2") (= "=") (call_expression "FUN_000295c0()" (identifier "FUN_000295c0") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "__fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,"Fatal: unable to initialise SFTP: %s\n",uVar2)\n  ;" (call_expression "__fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,"Fatal: unable to initialise SFTP: %s\n",uVar2)" (identifier "__fprintf_chk") (argument_list "(*(undefined4 *)PTR_stderr_000a9fc0,1,"Fatal: unable to initialise SFTP: %s\n",uVar2)" (( "(") (pointer_expression "*(undefined4 *)PTR_stderr_000a9fc0" (* "*") (cast_expression "(undefined4 *)PTR_stderr_000a9fc0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_stderr_000a9fc0"))) (, ",") (number_literal "1") (, ",") (string_literal ""Fatal: unable to initialise SFTP: %s\n"" (" """) (string_content "Fatal: unable to initialise SFTP: %s") (escape_sequence "\n") (" """)) (, ",") (identifier "uVar2") () ")"))) (; ";")) (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}")))

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

int function_1(void)

{
  int var_2;
  type_1 *req;
  type_2 *pktin;
  char *pcVar2;
  
  var_2 = var_1();
  if (var_2 != 0) {
    req = var_3(".");
    pktin = var_4(req);
    var_6 = var_5(pktin,req);
    if (var_6 == (char *)0x0) {
      pcVar2 = var_7();
      var_8(*(type_3 *)PTR_stderr_000a9fc0,1,
                    "Warning: failed to resolve home directory: %s\n",pcVar2);
      var_6 = var_9(".");
    }
    else {
      var_10(1,"Remote working directory is %s\n",var_6);
    }
    pwd = var_9(var_6);
    return 0;
  }
  pcVar2 = var_7();
  var_8(*(type_3 *)PTR_stderr_000a9fc0,1,"Fatal: unable to initialise SFTP: %s\n",pcVar2
               );
  return 1;
}


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

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

undefined4 MASKED(void)

{
  int iVar1;
  undefined4 uVar2;
  undefined4 uVar3;
  
  iVar1 = FUN_00029600();
  if (iVar1 != 0) {
    uVar2 = FUN_00029710(".");
    uVar3 = FUN_00020cb0(uVar2);
    DAT_000aab2c = FUN_00029790(uVar3,uVar2);
    if (DAT_000aab2c == 0) {
      uVar2 = FUN_000295c0();
      __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,
                    "Warning: failed to resolve home directory: %s\n",uVar2);
      DAT_000aab2c = FUN_0001aac0(".");
    }
    else {
      __printf_chk(1,"Remote working directory is %s\n",DAT_000aab2c);
    }
    DAT_000aab18 = FUN_0001aac0(DAT_000aab2c);
    return 0;
  }
  uVar2 = FUN_000295c0();
  __fprintf_chk(*(undefined4 *)PTR_stderr_000a9fc0,1,"Fatal: unable to initialise SFTP: %s\n",uVar2)
  ;
  return 1;
}

