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

uerr_t ftp_cwd(int csock,char *dir)

{
  char *__s;
  size_t bufsize;
  int iVar1;
  uerr_t uVar2;
  int in_GS_OFFSET;
  char *respline;
  int local_10;
  
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  __s = ftp_request("CWD",dir);
  bufsize = strlen(__s);
  iVar1 = fd_write(csock,__s,bufsize,-1.0);
  if (iVar1 < 0) {
    free(__s);
    uVar2 = WRITEFAILED;
  }
  else {
    free(__s);
    uVar2 = ftp_response(csock,&respline);
    if (uVar2 == FTPOK) {
      if (*respline == '5') {
        free(respline);
        uVar2 = FTPNSFOD;
      }
      else if (*respline == '2') {
        free(respline);
      }
      else {
        free(respline);
        uVar2 = FTPRERR;
      }
    }
  }
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return uVar2;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



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

int FUN_00026550(undefined4 param_1)

{
  char *__s;
  size_t sVar1;
  int iVar2;
  int in_GS_OFFSET;
  char *local_14;
  int local_10;
  
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  __s = (char *)FUN_00024cd0();
  sVar1 = strlen(__s);
  iVar2 = FUN_00019c40(param_1,__s,sVar1,0,0xbff00000);
  if (iVar2 < 0) {
    free(__s);
    iVar2 = 0x2c;
  }
  else {
    free(__s);
    iVar2 = FUN_00024ec0(param_1,&local_14);
    if (iVar2 == 7) {
      if (*local_14 == '5') {
        free(local_14);
        iVar2 = 0xc;
      }
      else if (*local_14 == '2') {
        free(local_14);
      }
      else {
        free(local_14);
        iVar2 = 0xe;
      }
    }
  }
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar2;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0006da50();
}


PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00019070
ADD EBX,0x7a678
SUB ESP,0x20
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x1c],EAX
XOR EAX,EAX
MOV EDX,dword ptr [ESP + 0x34]
MOV EDI,dword ptr [ESP + 0x30]
LEA EAX,[EBX + 0xfffd7e97]
CALL 0x00024cd0
SUB ESP,0xc
PUSH EAX
MOV ESI,EAX
CALL 0x000168c0
MOV dword ptr [ESP],0xbff00000
PUSH 0x0
PUSH EAX
PUSH ESI
PUSH EDI
CALL 0x00019c40
ADD ESP,0x20
TEST EAX,EAX
JS 0x00026620
SUB ESP,0xc
PUSH ESI
CALL 0x00016670
POP EAX
POP EDX
LEA EAX,[ESP + 0x20]
PUSH EAX
PUSH EDI
CALL 0x00024ec0
ADD ESP,0x10
CMP EAX,0x7
JZ 0x000265e0
MOV ECX,dword ptr [ESP + 0x1c]
XOR ECX,dword ptr GS:[0x14]
JNZ 0x0002664e
ADD ESP,0x20
POP EBX
POP ESI
POP EDI
RET
MOV EDX,dword ptr [ESP + 0x18]
MOVZX ECX,byte ptr [EDX]
CMP CL,0x35
JZ 0x00026638
CMP CL,0x32
JZ 0x00026608
SUB ESP,0xc
PUSH EDX
CALL 0x00016670
ADD ESP,0x10
MOV EAX,0xe
JMP 0x000265c1
MOV dword ptr [ESP + 0xc],EAX
SUB ESP,0xc
PUSH EDX
CALL 0x00016670
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0xc]
JMP 0x000265c1
SUB ESP,0xc
PUSH ESI
CALL 0x00016670
ADD ESP,0x10
MOV EAX,0x2c
JMP 0x000265c1
SUB ESP,0xc
PUSH EDX
CALL 0x00016670
ADD ESP,0x10
MOV EAX,0xc
JMP 0x000265c1
CALL 0x0006da50
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint FUN_00026550(undefined4 param_1)\n\n{\n  char *__s;\n  size_t sVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  char *local_14;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  __s = (char *)FUN_00024cd0();\n  sVar1 = strlen(__s);\n  iVar2 = FUN_00019c40(param_1,__s,sVar1,0,0xbff00000);\n  if (iVar2 < 0) {\n    free(__s);\n    iVar2 = 0x2c;\n  }\n  else {\n    free(__s);\n    iVar2 = FUN_00024ec0(param_1,&local_14);\n    if (iVar2 == 7) {\n      if (*local_14 == '5') {\n        free(local_14);\n        iVar2 = 0xc;\n      }\n      else if (*local_14 == '2') {\n        free(local_14);\n      }\n      else {\n        free(local_14);\n        iVar2 = 0xe;\n      }\n    }\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0006da50();\n}\n\n" comment (function_definition "int FUN_00026550(undefined4 param_1)\n\n{\n  char *__s;\n  size_t sVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  char *local_14;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  __s = (char *)FUN_00024cd0();\n  sVar1 = strlen(__s);\n  iVar2 = FUN_00019c40(param_1,__s,sVar1,0,0xbff00000);\n  if (iVar2 < 0) {\n    free(__s);\n    iVar2 = 0x2c;\n  }\n  else {\n    free(__s);\n    iVar2 = FUN_00024ec0(param_1,&local_14);\n    if (iVar2 == 7) {\n      if (*local_14 == '5') {\n        free(local_14);\n        iVar2 = 0xc;\n      }\n      else if (*local_14 == '2') {\n        free(local_14);\n      }\n      else {\n        free(local_14);\n        iVar2 = 0xe;\n      }\n    }\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0006da50();\n}" primitive_type (function_declarator "FUN_00026550(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  char *__s;\n  size_t sVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  char *local_14;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  __s = (char *)FUN_00024cd0();\n  sVar1 = strlen(__s);\n  iVar2 = FUN_00019c40(param_1,__s,sVar1,0,0xbff00000);\n  if (iVar2 < 0) {\n    free(__s);\n    iVar2 = 0x2c;\n  }\n  else {\n    free(__s);\n    iVar2 = FUN_00024ec0(param_1,&local_14);\n    if (iVar2 == 7) {\n      if (*local_14 == '5') {\n        free(local_14);\n        iVar2 = 0xc;\n      }\n      else if (*local_14 == '2') {\n        free(local_14);\n      }\n      else {\n        free(local_14);\n        iVar2 = 0xe;\n      }\n    }\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0006da50();\n}" { (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char *local_14;" primitive_type (pointer_declarator "*local_14" * identifier) ;) (declaration "int local_10;" primitive_type identifier ;) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "__s = (char *)FUN_00024cd0();" (assignment_expression "__s = (char *)FUN_00024cd0()" identifier = (cast_expression "(char *)FUN_00024cd0()" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00024cd0()" identifier (argument_list "()" ( ))))) ;) (expression_statement "sVar1 = strlen(__s);" (assignment_expression "sVar1 = strlen(__s)" identifier = (call_expression "strlen(__s)" identifier (argument_list "(__s)" ( identifier )))) ;) (expression_statement "iVar2 = FUN_00019c40(param_1,__s,sVar1,0,0xbff00000);" (assignment_expression "iVar2 = FUN_00019c40(param_1,__s,sVar1,0,0xbff00000)" identifier = (call_expression "FUN_00019c40(param_1,__s,sVar1,0,0xbff00000)" identifier (argument_list "(param_1,__s,sVar1,0,0xbff00000)" ( identifier , identifier , identifier , number_literal , number_literal )))) ;) (if_statement "if (iVar2 < 0) {\n    free(__s);\n    iVar2 = 0x2c;\n  }\n  else {\n    free(__s);\n    iVar2 = FUN_00024ec0(param_1,&local_14);\n    if (iVar2 == 7) {\n      if (*local_14 == '5') {\n        free(local_14);\n        iVar2 = 0xc;\n      }\n      else if (*local_14 == '2') {\n        free(local_14);\n      }\n      else {\n        free(local_14);\n        iVar2 = 0xe;\n      }\n    }\n  }" if (parenthesized_expression "(iVar2 < 0)" ( (binary_expression "iVar2 < 0" identifier < number_literal) )) (compound_statement "{\n    free(__s);\n    iVar2 = 0x2c;\n  }" { (expression_statement "free(__s);" (call_expression "free(__s)" identifier (argument_list "(__s)" ( identifier ))) ;) (expression_statement "iVar2 = 0x2c;" (assignment_expression "iVar2 = 0x2c" identifier = number_literal) ;) }) (else_clause "else {\n    free(__s);\n    iVar2 = FUN_00024ec0(param_1,&local_14);\n    if (iVar2 == 7) {\n      if (*local_14 == '5') {\n        free(local_14);\n        iVar2 = 0xc;\n      }\n      else if (*local_14 == '2') {\n        free(local_14);\n      }\n      else {\n        free(local_14);\n        iVar2 = 0xe;\n      }\n    }\n  }" else (compound_statement "{\n    free(__s);\n    iVar2 = FUN_00024ec0(param_1,&local_14);\n    if (iVar2 == 7) {\n      if (*local_14 == '5') {\n        free(local_14);\n        iVar2 = 0xc;\n      }\n      else if (*local_14 == '2') {\n        free(local_14);\n      }\n      else {\n        free(local_14);\n        iVar2 = 0xe;\n      }\n    }\n  }" { (expression_statement "free(__s);" (call_expression "free(__s)" identifier (argument_list "(__s)" ( identifier ))) ;) (expression_statement "iVar2 = FUN_00024ec0(param_1,&local_14);" (assignment_expression "iVar2 = FUN_00024ec0(param_1,&local_14)" identifier = (call_expression "FUN_00024ec0(param_1,&local_14)" identifier (argument_list "(param_1,&local_14)" ( identifier , (pointer_expression "&local_14" & identifier) )))) ;) (if_statement "if (iVar2 == 7) {\n      if (*local_14 == '5') {\n        free(local_14);\n        iVar2 = 0xc;\n      }\n      else if (*local_14 == '2') {\n        free(local_14);\n      }\n      else {\n        free(local_14);\n        iVar2 = 0xe;\n      }\n    }" if (parenthesized_expression "(iVar2 == 7)" ( (binary_expression "iVar2 == 7" identifier == number_literal) )) (compound_statement "{\n      if (*local_14 == '5') {\n        free(local_14);\n        iVar2 = 0xc;\n      }\n      else if (*local_14 == '2') {\n        free(local_14);\n      }\n      else {\n        free(local_14);\n        iVar2 = 0xe;\n      }\n    }" { (if_statement "if (*local_14 == '5') {\n        free(local_14);\n        iVar2 = 0xc;\n      }\n      else if (*local_14 == '2') {\n        free(local_14);\n      }\n      else {\n        free(local_14);\n        iVar2 = 0xe;\n      }" if (parenthesized_expression "(*local_14 == '5')" ( (binary_expression "*local_14 == '5'" (pointer_expression "*local_14" * identifier) == (char_literal "'5'" ' character ')) )) (compound_statement "{\n        free(local_14);\n        iVar2 = 0xc;\n      }" { (expression_statement "free(local_14);" (call_expression "free(local_14)" identifier (argument_list "(local_14)" ( identifier ))) ;) (expression_statement "iVar2 = 0xc;" (assignment_expression "iVar2 = 0xc" identifier = number_literal) ;) }) (else_clause "else if (*local_14 == '2') {\n        free(local_14);\n      }\n      else {\n        free(local_14);\n        iVar2 = 0xe;\n      }" else (if_statement "if (*local_14 == '2') {\n        free(local_14);\n      }\n      else {\n        free(local_14);\n        iVar2 = 0xe;\n      }" if (parenthesized_expression "(*local_14 == '2')" ( (binary_expression "*local_14 == '2'" (pointer_expression "*local_14" * identifier) == (char_literal "'2'" ' character ')) )) (compound_statement "{\n        free(local_14);\n      }" { (expression_statement "free(local_14);" (call_expression "free(local_14)" identifier (argument_list "(local_14)" ( identifier ))) ;) }) (else_clause "else {\n        free(local_14);\n        iVar2 = 0xe;\n      }" else (compound_statement "{\n        free(local_14);\n        iVar2 = 0xe;\n      }" { (expression_statement "free(local_14);" (call_expression "free(local_14)" identifier (argument_list "(local_14)" ( identifier ))) ;) (expression_statement "iVar2 = 0xe;" (assignment_expression "iVar2 = 0xe" identifier = number_literal) ;) }))))) })) }))) (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }" if (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_10 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return iVar2;\n  }" { (return_statement "return iVar2;" return identifier ;) })) comment (expression_statement "FUN_0006da50();" (call_expression "FUN_0006da50()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nuerr_t ftp_cwd(int csock,char *dir)\n\n{\n  char *__s;\n  size_t bufsize;\n  int iVar1;\n  uerr_t uVar2;\n  int in_GS_OFFSET;\n  char *respline;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  __s = ftp_request("CWD",dir);\n  bufsize = strlen(__s);\n  iVar1 = fd_write(csock,__s,bufsize,-1.0);\n  if (iVar1 < 0) {\n    free(__s);\n    uVar2 = WRITEFAILED;\n  }\n  else {\n    free(__s);\n    uVar2 = ftp_response(csock,&respline);\n    if (uVar2 == FTPOK) {\n      if (*respline == '5') {\n        free(respline);\n        uVar2 = FTPNSFOD;\n      }\n      else if (*respline == '2') {\n        free(respline);\n      }\n      else {\n        free(respline);\n        uVar2 = FTPRERR;\n      }\n    }\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment comment (function_definition "uerr_t ftp_cwd(int csock,char *dir)\n\n{\n  char *__s;\n  size_t bufsize;\n  int iVar1;\n  uerr_t uVar2;\n  int in_GS_OFFSET;\n  char *respline;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  __s = ftp_request("CWD",dir);\n  bufsize = strlen(__s);\n  iVar1 = fd_write(csock,__s,bufsize,-1.0);\n  if (iVar1 < 0) {\n    free(__s);\n    uVar2 = WRITEFAILED;\n  }\n  else {\n    free(__s);\n    uVar2 = ftp_response(csock,&respline);\n    if (uVar2 == FTPOK) {\n      if (*respline == '5') {\n        free(respline);\n        uVar2 = FTPNSFOD;\n      }\n      else if (*respline == '2') {\n        free(respline);\n      }\n      else {\n        free(respline);\n        uVar2 = FTPRERR;\n      }\n    }\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" type_identifier (function_declarator "ftp_cwd(int csock,char *dir)" identifier (parameter_list "(int csock,char *dir)" ( (parameter_declaration "int csock" primitive_type identifier) , (parameter_declaration "char *dir" primitive_type (pointer_declarator "*dir" * identifier)) ))) (compound_statement "{\n  char *__s;\n  size_t bufsize;\n  int iVar1;\n  uerr_t uVar2;\n  int in_GS_OFFSET;\n  char *respline;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  __s = ftp_request("CWD",dir);\n  bufsize = strlen(__s);\n  iVar1 = fd_write(csock,__s,bufsize,-1.0);\n  if (iVar1 < 0) {\n    free(__s);\n    uVar2 = WRITEFAILED;\n  }\n  else {\n    free(__s);\n    uVar2 = ftp_response(csock,&respline);\n    if (uVar2 == FTPOK) {\n      if (*respline == '5') {\n        free(respline);\n        uVar2 = FTPNSFOD;\n      }\n      else if (*respline == '2') {\n        free(respline);\n      }\n      else {\n        free(respline);\n        uVar2 = FTPRERR;\n      }\n    }\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "size_t bufsize;" primitive_type identifier ;) (declaration "int iVar1;" primitive_type identifier ;) (declaration "uerr_t uVar2;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char *respline;" primitive_type (pointer_declarator "*respline" * identifier) ;) (declaration "int local_10;" primitive_type identifier ;) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "__s = ftp_request("CWD",dir);" (assignment_expression "__s = ftp_request("CWD",dir)" identifier = (call_expression "ftp_request("CWD",dir)" identifier (argument_list "("CWD",dir)" ( (string_literal ""CWD"" " string_content ") , identifier )))) ;) (expression_statement "bufsize = strlen(__s);" (assignment_expression "bufsize = strlen(__s)" identifier = (call_expression "strlen(__s)" identifier (argument_list "(__s)" ( identifier )))) ;) (expression_statement "iVar1 = fd_write(csock,__s,bufsize,-1.0);" (assignment_expression "iVar1 = fd_write(csock,__s,bufsize,-1.0)" identifier = (call_expression "fd_write(csock,__s,bufsize,-1.0)" identifier (argument_list "(csock,__s,bufsize,-1.0)" ( identifier , identifier , identifier , number_literal )))) ;) (if_statement "if (iVar1 < 0) {\n    free(__s);\n    uVar2 = WRITEFAILED;\n  }\n  else {\n    free(__s);\n    uVar2 = ftp_response(csock,&respline);\n    if (uVar2 == FTPOK) {\n      if (*respline == '5') {\n        free(respline);\n        uVar2 = FTPNSFOD;\n      }\n      else if (*respline == '2') {\n        free(respline);\n      }\n      else {\n        free(respline);\n        uVar2 = FTPRERR;\n      }\n    }\n  }" if (parenthesized_expression "(iVar1 < 0)" ( (binary_expression "iVar1 < 0" identifier < number_literal) )) (compound_statement "{\n    free(__s);\n    uVar2 = WRITEFAILED;\n  }" { (expression_statement "free(__s);" (call_expression "free(__s)" identifier (argument_list "(__s)" ( identifier ))) ;) (expression_statement "uVar2 = WRITEFAILED;" (assignment_expression "uVar2 = WRITEFAILED" identifier = identifier) ;) }) (else_clause "else {\n    free(__s);\n    uVar2 = ftp_response(csock,&respline);\n    if (uVar2 == FTPOK) {\n      if (*respline == '5') {\n        free(respline);\n        uVar2 = FTPNSFOD;\n      }\n      else if (*respline == '2') {\n        free(respline);\n      }\n      else {\n        free(respline);\n        uVar2 = FTPRERR;\n      }\n    }\n  }" else (compound_statement "{\n    free(__s);\n    uVar2 = ftp_response(csock,&respline);\n    if (uVar2 == FTPOK) {\n      if (*respline == '5') {\n        free(respline);\n        uVar2 = FTPNSFOD;\n      }\n      else if (*respline == '2') {\n        free(respline);\n      }\n      else {\n        free(respline);\n        uVar2 = FTPRERR;\n      }\n    }\n  }" { (expression_statement "free(__s);" (call_expression "free(__s)" identifier (argument_list "(__s)" ( identifier ))) ;) (expression_statement "uVar2 = ftp_response(csock,&respline);" (assignment_expression "uVar2 = ftp_response(csock,&respline)" identifier = (call_expression "ftp_response(csock,&respline)" identifier (argument_list "(csock,&respline)" ( identifier , (pointer_expression "&respline" & identifier) )))) ;) (if_statement "if (uVar2 == FTPOK) {\n      if (*respline == '5') {\n        free(respline);\n        uVar2 = FTPNSFOD;\n      }\n      else if (*respline == '2') {\n        free(respline);\n      }\n      else {\n        free(respline);\n        uVar2 = FTPRERR;\n      }\n    }" if (parenthesized_expression "(uVar2 == FTPOK)" ( (binary_expression "uVar2 == FTPOK" identifier == identifier) )) (compound_statement "{\n      if (*respline == '5') {\n        free(respline);\n        uVar2 = FTPNSFOD;\n      }\n      else if (*respline == '2') {\n        free(respline);\n      }\n      else {\n        free(respline);\n        uVar2 = FTPRERR;\n      }\n    }" { (if_statement "if (*respline == '5') {\n        free(respline);\n        uVar2 = FTPNSFOD;\n      }\n      else if (*respline == '2') {\n        free(respline);\n      }\n      else {\n        free(respline);\n        uVar2 = FTPRERR;\n      }" if (parenthesized_expression "(*respline == '5')" ( (binary_expression "*respline == '5'" (pointer_expression "*respline" * identifier) == (char_literal "'5'" ' character ')) )) (compound_statement "{\n        free(respline);\n        uVar2 = FTPNSFOD;\n      }" { (expression_statement "free(respline);" (call_expression "free(respline)" identifier (argument_list "(respline)" ( identifier ))) ;) (expression_statement "uVar2 = FTPNSFOD;" (assignment_expression "uVar2 = FTPNSFOD" identifier = identifier) ;) }) (else_clause "else if (*respline == '2') {\n        free(respline);\n      }\n      else {\n        free(respline);\n        uVar2 = FTPRERR;\n      }" else (if_statement "if (*respline == '2') {\n        free(respline);\n      }\n      else {\n        free(respline);\n        uVar2 = FTPRERR;\n      }" if (parenthesized_expression "(*respline == '2')" ( (binary_expression "*respline == '2'" (pointer_expression "*respline" * identifier) == (char_literal "'2'" ' character ')) )) (compound_statement "{\n        free(respline);\n      }" { (expression_statement "free(respline);" (call_expression "free(respline)" identifier (argument_list "(respline)" ( identifier ))) ;) }) (else_clause "else {\n        free(respline);\n        uVar2 = FTPRERR;\n      }" else (compound_statement "{\n        free(respline);\n        uVar2 = FTPRERR;\n      }" { (expression_statement "free(respline);" (call_expression "free(respline)" identifier (argument_list "(respline)" ( identifier ))) ;) (expression_statement "uVar2 = FTPRERR;" (assignment_expression "uVar2 = FTPRERR" identifier = identifier) ;) }))))) })) }))) (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar2;\n  }" if (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_10 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return uVar2;\n  }" { (return_statement "return uVar2;" return identifier ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "int FUN_00026550(undefined4 param_1)\n\n{\n  char *__s;\n  size_t sVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  char *local_14;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  __s = (char *)FUN_00024cd0();\n  sVar1 = strlen(__s);\n  iVar2 = FUN_00019c40(param_1,__s,sVar1,0,0xbff00000);\n  if (iVar2 < 0) {\n    free(__s);\n    iVar2 = 0x2c;\n  }\n  else {\n    free(__s);\n    iVar2 = FUN_00024ec0(param_1,&local_14);\n    if (iVar2 == 7) {\n      if (*local_14 == '5') {\n        free(local_14);\n        iVar2 = 0xc;\n      }\n      else if (*local_14 == '2') {\n        free(local_14);\n      }\n      else {\n        free(local_14);\n        iVar2 = 0xe;\n      }\n    }\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    \n  FUN_0006da50();\n}\n\n" (function_definition "int FUN_00026550(undefined4 param_1)\n\n{\n  char *__s;\n  size_t sVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  char *local_14;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  __s = (char *)FUN_00024cd0();\n  sVar1 = strlen(__s);\n  iVar2 = FUN_00019c40(param_1,__s,sVar1,0,0xbff00000);\n  if (iVar2 < 0) {\n    free(__s);\n    iVar2 = 0x2c;\n  }\n  else {\n    free(__s);\n    iVar2 = FUN_00024ec0(param_1,&local_14);\n    if (iVar2 == 7) {\n      if (*local_14 == '5') {\n        free(local_14);\n        iVar2 = 0xc;\n      }\n      else if (*local_14 == '2') {\n        free(local_14);\n      }\n      else {\n        free(local_14);\n        iVar2 = 0xe;\n      }\n    }\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    \n  FUN_0006da50();\n}" primitive_type (function_declarator "FUN_00026550(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  char *__s;\n  size_t sVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  char *local_14;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  __s = (char *)FUN_00024cd0();\n  sVar1 = strlen(__s);\n  iVar2 = FUN_00019c40(param_1,__s,sVar1,0,0xbff00000);\n  if (iVar2 < 0) {\n    free(__s);\n    iVar2 = 0x2c;\n  }\n  else {\n    free(__s);\n    iVar2 = FUN_00024ec0(param_1,&local_14);\n    if (iVar2 == 7) {\n      if (*local_14 == '5') {\n        free(local_14);\n        iVar2 = 0xc;\n      }\n      else if (*local_14 == '2') {\n        free(local_14);\n      }\n      else {\n        free(local_14);\n        iVar2 = 0xe;\n      }\n    }\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    \n  FUN_0006da50();\n}" { (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char *local_14;" primitive_type (pointer_declarator "*local_14" * identifier) ;) (declaration "int local_10;" primitive_type identifier ;) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "__s = (char *)FUN_00024cd0();" (assignment_expression "__s = (char *)FUN_00024cd0()" identifier = (cast_expression "(char *)FUN_00024cd0()" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00024cd0()" identifier (argument_list "()" ( ))))) ;) (expression_statement "sVar1 = strlen(__s);" (assignment_expression "sVar1 = strlen(__s)" identifier = (call_expression "strlen(__s)" identifier (argument_list "(__s)" ( identifier )))) ;) (expression_statement "iVar2 = FUN_00019c40(param_1,__s,sVar1,0,0xbff00000);" (assignment_expression "iVar2 = FUN_00019c40(param_1,__s,sVar1,0,0xbff00000)" identifier = (call_expression "FUN_00019c40(param_1,__s,sVar1,0,0xbff00000)" identifier (argument_list "(param_1,__s,sVar1,0,0xbff00000)" ( identifier , identifier , identifier , number_literal , number_literal )))) ;) (if_statement "if (iVar2 < 0) {\n    free(__s);\n    iVar2 = 0x2c;\n  }\n  else {\n    free(__s);\n    iVar2 = FUN_00024ec0(param_1,&local_14);\n    if (iVar2 == 7) {\n      if (*local_14 == '5') {\n        free(local_14);\n        iVar2 = 0xc;\n      }\n      else if (*local_14 == '2') {\n        free(local_14);\n      }\n      else {\n        free(local_14);\n        iVar2 = 0xe;\n      }\n    }\n  }" if (parenthesized_expression "(iVar2 < 0)" ( (binary_expression "iVar2 < 0" identifier < number_literal) )) (compound_statement "{\n    free(__s);\n    iVar2 = 0x2c;\n  }" { (expression_statement "free(__s);" (call_expression "free(__s)" identifier (argument_list "(__s)" ( identifier ))) ;) (expression_statement "iVar2 = 0x2c;" (assignment_expression "iVar2 = 0x2c" identifier = number_literal) ;) }) (else_clause "else {\n    free(__s);\n    iVar2 = FUN_00024ec0(param_1,&local_14);\n    if (iVar2 == 7) {\n      if (*local_14 == '5') {\n        free(local_14);\n        iVar2 = 0xc;\n      }\n      else if (*local_14 == '2') {\n        free(local_14);\n      }\n      else {\n        free(local_14);\n        iVar2 = 0xe;\n      }\n    }\n  }" else (compound_statement "{\n    free(__s);\n    iVar2 = FUN_00024ec0(param_1,&local_14);\n    if (iVar2 == 7) {\n      if (*local_14 == '5') {\n        free(local_14);\n        iVar2 = 0xc;\n      }\n      else if (*local_14 == '2') {\n        free(local_14);\n      }\n      else {\n        free(local_14);\n        iVar2 = 0xe;\n      }\n    }\n  }" { (expression_statement "free(__s);" (call_expression "free(__s)" identifier (argument_list "(__s)" ( identifier ))) ;) (expression_statement "iVar2 = FUN_00024ec0(param_1,&local_14);" (assignment_expression "iVar2 = FUN_00024ec0(param_1,&local_14)" identifier = (call_expression "FUN_00024ec0(param_1,&local_14)" identifier (argument_list "(param_1,&local_14)" ( identifier , (pointer_expression "&local_14" & identifier) )))) ;) (if_statement "if (iVar2 == 7) {\n      if (*local_14 == '5') {\n        free(local_14);\n        iVar2 = 0xc;\n      }\n      else if (*local_14 == '2') {\n        free(local_14);\n      }\n      else {\n        free(local_14);\n        iVar2 = 0xe;\n      }\n    }" if (parenthesized_expression "(iVar2 == 7)" ( (binary_expression "iVar2 == 7" identifier == number_literal) )) (compound_statement "{\n      if (*local_14 == '5') {\n        free(local_14);\n        iVar2 = 0xc;\n      }\n      else if (*local_14 == '2') {\n        free(local_14);\n      }\n      else {\n        free(local_14);\n        iVar2 = 0xe;\n      }\n    }" { (if_statement "if (*local_14 == '5') {\n        free(local_14);\n        iVar2 = 0xc;\n      }\n      else if (*local_14 == '2') {\n        free(local_14);\n      }\n      else {\n        free(local_14);\n        iVar2 = 0xe;\n      }" if (parenthesized_expression "(*local_14 == '5')" ( (binary_expression "*local_14 == '5'" (pointer_expression "*local_14" * identifier) == (char_literal "'5'" ' character ')) )) (compound_statement "{\n        free(local_14);\n        iVar2 = 0xc;\n      }" { (expression_statement "free(local_14);" (call_expression "free(local_14)" identifier (argument_list "(local_14)" ( identifier ))) ;) (expression_statement "iVar2 = 0xc;" (assignment_expression "iVar2 = 0xc" identifier = number_literal) ;) }) (else_clause "else if (*local_14 == '2') {\n        free(local_14);\n      }\n      else {\n        free(local_14);\n        iVar2 = 0xe;\n      }" else (if_statement "if (*local_14 == '2') {\n        free(local_14);\n      }\n      else {\n        free(local_14);\n        iVar2 = 0xe;\n      }" if (parenthesized_expression "(*local_14 == '2')" ( (binary_expression "*local_14 == '2'" (pointer_expression "*local_14" * identifier) == (char_literal "'2'" ' character ')) )) (compound_statement "{\n        free(local_14);\n      }" { (expression_statement "free(local_14);" (call_expression "free(local_14)" identifier (argument_list "(local_14)" ( identifier ))) ;) }) (else_clause "else {\n        free(local_14);\n        iVar2 = 0xe;\n      }" else (compound_statement "{\n        free(local_14);\n        iVar2 = 0xe;\n      }" { (expression_statement "free(local_14);" (call_expression "free(local_14)" identifier (argument_list "(local_14)" ( identifier ))) ;) (expression_statement "iVar2 = 0xe;" (assignment_expression "iVar2 = 0xe" identifier = number_literal) ;) }))))) })) }))) (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }" if (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_10 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return iVar2;\n  }" { (return_statement "return iVar2;" return identifier ;) })) (expression_statement "FUN_0006da50();" (call_expression "FUN_0006da50()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , LIT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (pointer_expression & IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == (char_literal ' character ')) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == (char_literal ' character ')) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }))))) })) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "int FUN_00026550(undefined4 param_1)\n\n{\n  char *__s;\n  size_t sVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  char *local_14;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  __s = (char *)FUN_00024cd0();\n  sVar1 = strlen(__s);\n  iVar2 = FUN_00019c40(param_1,__s,sVar1,0,0xbff00000);\n  if (iVar2 < 0) {\n    free(__s);\n    iVar2 = 0x2c;\n  }\n  else {\n    free(__s);\n    iVar2 = FUN_00024ec0(param_1,&local_14);\n    if (iVar2 == 7) {\n      if (*local_14 == '5') {\n        free(local_14);\n        iVar2 = 0xc;\n      }\n      else if (*local_14 == '2') {\n        free(local_14);\n      }\n      else {\n        free(local_14);\n        iVar2 = 0xe;\n      }\n    }\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    \n  FUN_0006da50();\n}" (primitive_type "int") (function_declarator "FUN_00026550(undefined4 param_1)" (identifier "FUN_00026550") (parameter_list "(undefined4 param_1)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) () ")"))) (compound_statement "{\n  char *__s;\n  size_t sVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  char *local_14;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  __s = (char *)FUN_00024cd0();\n  sVar1 = strlen(__s);\n  iVar2 = FUN_00019c40(param_1,__s,sVar1,0,0xbff00000);\n  if (iVar2 < 0) {\n    free(__s);\n    iVar2 = 0x2c;\n  }\n  else {\n    free(__s);\n    iVar2 = FUN_00024ec0(param_1,&local_14);\n    if (iVar2 == 7) {\n      if (*local_14 == '5') {\n        free(local_14);\n        iVar2 = 0xc;\n      }\n      else if (*local_14 == '2') {\n        free(local_14);\n      }\n      else {\n        free(local_14);\n        iVar2 = 0xe;\n      }\n    }\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    \n  FUN_0006da50();\n}" ({ "{") (declaration "char *__s;" (primitive_type "char") (pointer_declarator "*__s" (* "*") (identifier "__s")) (; ";")) (declaration "size_t sVar1;" (primitive_type "size_t") (identifier "sVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "char *local_14;" (primitive_type "char") (pointer_declarator "*local_14" (* "*") (identifier "local_14")) (; ";")) (declaration "int local_10;" (primitive_type "int") (identifier "local_10") (; ";")) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_10") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "__s = (char *)FUN_00024cd0();" (assignment_expression "__s = (char *)FUN_00024cd0()" (identifier "__s") (= "=") (cast_expression "(char *)FUN_00024cd0()" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00024cd0()" (identifier "FUN_00024cd0") (argument_list "()" (( "(") () ")"))))) (; ";")) (expression_statement "sVar1 = strlen(__s);" (assignment_expression "sVar1 = strlen(__s)" (identifier "sVar1") (= "=") (call_expression "strlen(__s)" (identifier "strlen") (argument_list "(__s)" (( "(") (identifier "__s") () ")")))) (; ";")) (expression_statement "iVar2 = FUN_00019c40(param_1,__s,sVar1,0,0xbff00000);" (assignment_expression "iVar2 = FUN_00019c40(param_1,__s,sVar1,0,0xbff00000)" (identifier "iVar2") (= "=") (call_expression "FUN_00019c40(param_1,__s,sVar1,0,0xbff00000)" (identifier "FUN_00019c40") (argument_list "(param_1,__s,sVar1,0,0xbff00000)" (( "(") (identifier "param_1") (, ",") (identifier "__s") (, ",") (identifier "sVar1") (, ",") (number_literal "0") (, ",") (number_literal "0xbff00000") () ")")))) (; ";")) (if_statement "if (iVar2 < 0) {\n    free(__s);\n    iVar2 = 0x2c;\n  }\n  else {\n    free(__s);\n    iVar2 = FUN_00024ec0(param_1,&local_14);\n    if (iVar2 == 7) {\n      if (*local_14 == '5') {\n        free(local_14);\n        iVar2 = 0xc;\n      }\n      else if (*local_14 == '2') {\n        free(local_14);\n      }\n      else {\n        free(local_14);\n        iVar2 = 0xe;\n      }\n    }\n  }" (if "if") (parenthesized_expression "(iVar2 < 0)" (( "(") (binary_expression "iVar2 < 0" (identifier "iVar2") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n    free(__s);\n    iVar2 = 0x2c;\n  }" ({ "{") (expression_statement "free(__s);" (call_expression "free(__s)" (identifier "free") (argument_list "(__s)" (( "(") (identifier "__s") () ")"))) (; ";")) (expression_statement "iVar2 = 0x2c;" (assignment_expression "iVar2 = 0x2c" (identifier "iVar2") (= "=") (number_literal "0x2c")) (; ";")) (} "}")) (else_clause "else {\n    free(__s);\n    iVar2 = FUN_00024ec0(param_1,&local_14);\n    if (iVar2 == 7) {\n      if (*local_14 == '5') {\n        free(local_14);\n        iVar2 = 0xc;\n      }\n      else if (*local_14 == '2') {\n        free(local_14);\n      }\n      else {\n        free(local_14);\n        iVar2 = 0xe;\n      }\n    }\n  }" (else "else") (compound_statement "{\n    free(__s);\n    iVar2 = FUN_00024ec0(param_1,&local_14);\n    if (iVar2 == 7) {\n      if (*local_14 == '5') {\n        free(local_14);\n        iVar2 = 0xc;\n      }\n      else if (*local_14 == '2') {\n        free(local_14);\n      }\n      else {\n        free(local_14);\n        iVar2 = 0xe;\n      }\n    }\n  }" ({ "{") (expression_statement "free(__s);" (call_expression "free(__s)" (identifier "free") (argument_list "(__s)" (( "(") (identifier "__s") () ")"))) (; ";")) (expression_statement "iVar2 = FUN_00024ec0(param_1,&local_14);" (assignment_expression "iVar2 = FUN_00024ec0(param_1,&local_14)" (identifier "iVar2") (= "=") (call_expression "FUN_00024ec0(param_1,&local_14)" (identifier "FUN_00024ec0") (argument_list "(param_1,&local_14)" (( "(") (identifier "param_1") (, ",") (pointer_expression "&local_14" (& "&") (identifier "local_14")) () ")")))) (; ";")) (if_statement "if (iVar2 == 7) {\n      if (*local_14 == '5') {\n        free(local_14);\n        iVar2 = 0xc;\n      }\n      else if (*local_14 == '2') {\n        free(local_14);\n      }\n      else {\n        free(local_14);\n        iVar2 = 0xe;\n      }\n    }" (if "if") (parenthesized_expression "(iVar2 == 7)" (( "(") (binary_expression "iVar2 == 7" (identifier "iVar2") (== "==") (number_literal "7")) () ")")) (compound_statement "{\n      if (*local_14 == '5') {\n        free(local_14);\n        iVar2 = 0xc;\n      }\n      else if (*local_14 == '2') {\n        free(local_14);\n      }\n      else {\n        free(local_14);\n        iVar2 = 0xe;\n      }\n    }" ({ "{") (if_statement "if (*local_14 == '5') {\n        free(local_14);\n        iVar2 = 0xc;\n      }\n      else if (*local_14 == '2') {\n        free(local_14);\n      }\n      else {\n        free(local_14);\n        iVar2 = 0xe;\n      }" (if "if") (parenthesized_expression "(*local_14 == '5')" (( "(") (binary_expression "*local_14 == '5'" (pointer_expression "*local_14" (* "*") (identifier "local_14")) (== "==") (char_literal "'5'" (' "'") (character "5") (' "'"))) () ")")) (compound_statement "{\n        free(local_14);\n        iVar2 = 0xc;\n      }" ({ "{") (expression_statement "free(local_14);" (call_expression "free(local_14)" (identifier "free") (argument_list "(local_14)" (( "(") (identifier "local_14") () ")"))) (; ";")) (expression_statement "iVar2 = 0xc;" (assignment_expression "iVar2 = 0xc" (identifier "iVar2") (= "=") (number_literal "0xc")) (; ";")) (} "}")) (else_clause "else if (*local_14 == '2') {\n        free(local_14);\n      }\n      else {\n        free(local_14);\n        iVar2 = 0xe;\n      }" (else "else") (if_statement "if (*local_14 == '2') {\n        free(local_14);\n      }\n      else {\n        free(local_14);\n        iVar2 = 0xe;\n      }" (if "if") (parenthesized_expression "(*local_14 == '2')" (( "(") (binary_expression "*local_14 == '2'" (pointer_expression "*local_14" (* "*") (identifier "local_14")) (== "==") (char_literal "'2'" (' "'") (character "2") (' "'"))) () ")")) (compound_statement "{\n        free(local_14);\n      }" ({ "{") (expression_statement "free(local_14);" (call_expression "free(local_14)" (identifier "free") (argument_list "(local_14)" (( "(") (identifier "local_14") () ")"))) (; ";")) (} "}")) (else_clause "else {\n        free(local_14);\n        iVar2 = 0xe;\n      }" (else "else") (compound_statement "{\n        free(local_14);\n        iVar2 = 0xe;\n      }" ({ "{") (expression_statement "free(local_14);" (call_expression "free(local_14)" (identifier "free") (argument_list "(local_14)" (( "(") (identifier "local_14") () ")"))) (; ";")) (expression_statement "iVar2 = 0xe;" (assignment_expression "iVar2 = 0xe" (identifier "iVar2") (= "=") (number_literal "0xe")) (; ";")) (} "}")))))) (} "}"))) (} "}")))) (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }" (if "if") (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_10 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_10") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return iVar2;\n  }" ({ "{") (return_statement "return iVar2;" (return "return") (identifier "iVar2") (; ";")) (} "}"))) (expression_statement "FUN_0006da50();" (call_expression "FUN_0006da50()" (identifier "FUN_0006da50") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

type_1 function_1(int csock,char *dir)

{
  char *__s;
  size_t bufsize;
  int var_5;
  type_1 var_8;
  int var_1;
  char *respline;
  int var_10;
  
  var_10 = *(int *)(var_1 + 0x14);
  __s = var_2("CWD",dir);
  bufsize = var_3(__s);
  var_5 = var_4(csock,__s,bufsize,-1.0);
  if (var_5 < 0) {
    var_6(__s);
    var_8 = WRITEFAILED;
  }
  else {
    var_6(__s);
    var_8 = var_7(csock,&respline);
    if (var_8 == var_9) {
      if (*respline == '5') {
        var_6(respline);
        var_8 = FTPNSFOD;
      }
      else if (*respline == '2') {
        var_6(respline);
      }
      else {
        var_6(respline);
        var_8 = FTPRERR;
      }
    }
  }
  if (var_10 == *(int *)(var_1 + 0x14)) {
    return var_8;
  }
                    /* WARNING: Subroutine does not return */
  var_11();
}


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

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

int MASKED(undefined4 param_1)

{
  char *__s;
  size_t sVar1;
  int iVar2;
  int in_GS_OFFSET;
  char *local_14;
  int local_10;
  
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  __s = (char *)FUN_00024cd0();
  sVar1 = strlen(__s);
  iVar2 = FUN_00019c40(param_1,__s,sVar1,0,0xbff00000);
  if (iVar2 < 0) {
    free(__s);
    iVar2 = 0x2c;
  }
  else {
    free(__s);
    iVar2 = FUN_00024ec0(param_1,&local_14);
    if (iVar2 == 7) {
      if (*local_14 == '5') {
        free(local_14);
        iVar2 = 0xc;
      }
      else if (*local_14 == '2') {
        free(local_14);
      }
      else {
        free(local_14);
        iVar2 = 0xe;
      }
    }
  }
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar2;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0006da50();
}

