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

uerr_t ftp_pwd(int csock,char **pwd)

{
  char *pcVar1;
  size_t bufsize;
  int iVar2;
  uerr_t uVar3;
  int in_GS_OFFSET;
  char *respline;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x27a7b;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  pcVar1 = ftp_request("PWD",(char *)0x0);
  bufsize = strlen(pcVar1);
  iVar2 = fd_write(csock,pcVar1,bufsize,-1.0);
  if (iVar2 < 0) {
    uVar3 = WRITEFAILED;
    free(pcVar1);
  }
  else {
    free(pcVar1);
    uVar3 = ftp_response(csock,&respline);
    if (uVar3 == FTPOK) {
      if (*respline != '5') {
        strtok(respline,"\"");
        pcVar1 = strtok((char *)0x0,"\"");
        if (pcVar1 != (char *)0x0) {
          free(*pwd);
          *pwd = (char *)0x0;
          pcVar1 = xstrdup(pcVar1);
          *pwd = pcVar1;
          free(respline);
          goto LAB_00027b48;
        }
      }
      uVar3 = FTPSRVERR;
      free(respline);
    }
  }
LAB_00027b48:
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return uVar3;
  }
                    /* 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_00027a70(undefined4 param_1,undefined4 *param_2)

{
  char *pcVar1;
  size_t sVar2;
  int iVar3;
  undefined4 uVar4;
  int in_GS_OFFSET;
  char *local_24;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x27a7b;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  pcVar1 = (char *)FUN_000259b0();
  sVar2 = strlen(pcVar1);
  iVar3 = FUN_00019c70(param_1,pcVar1,sVar2,0,0xbff00000);
  if (iVar3 < 0) {
    iVar3 = 0x2c;
    free(pcVar1);
  }
  else {
    free(pcVar1);
    iVar3 = FUN_00025be0(param_1,&local_24);
    if (iVar3 == 7) {
      if (*local_24 != '5') {
        strtok(local_24,"\"");
        pcVar1 = strtok((char *)0x0,"\"");
        if (pcVar1 != (char *)0x0) {
          free((void *)*param_2);
          *param_2 = 0;
          uVar4 = FUN_00063020(pcVar1);
          *param_2 = uVar4;
          free(local_24);
          goto LAB_00027b48;
        }
      }
      iVar3 = 0xf;
      free(local_24);
    }
  }
LAB_00027b48:
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar3;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0007ad20();
}


PUSH EBP
XOR EDX,EDX
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x000190b0
ADD EBX,0x87155
SUB ESP,0x1c
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0xc],EAX
XOR EAX,EAX
MOV EDI,dword ptr [ESP + 0x30]
MOV EBP,dword ptr [ESP + 0x34]
LEA EAX,[EBX + 0xfffd6f18]
CALL 0x000259b0
SUB ESP,0xc
PUSH EAX
MOV ESI,EAX
CALL 0x000168c0
MOV dword ptr [ESP],0xbff00000
PUSH 0x0
PUSH EAX
PUSH ESI
PUSH EDI
CALL 0x00019c70
ADD ESP,0x20
TEST EAX,EAX
JS 0x00027b60
SUB ESP,0xc
PUSH ESI
CALL 0x00016670
POP ESI
POP EAX
LEA EAX,[ESP + 0x10]
PUSH EAX
PUSH EDI
CALL 0x00025be0
ADD ESP,0x10
MOV ESI,EAX
CMP EAX,0x7
JNZ 0x00027b48
MOV EAX,dword ptr [ESP + 0x8]
CMP byte ptr [EAX],0x35
JZ 0x00027b78
SUB ESP,0x8
LEA EDI,[EBX + 0xfffd8a15]
PUSH EDI
PUSH EAX
CALL 0x00016b90
POP EDX
POP ECX
PUSH EDI
PUSH 0x0
CALL 0x00016b90
ADD ESP,0x10
MOV EDI,EAX
MOV EAX,dword ptr [ESP + 0x8]
TEST EDI,EDI
JZ 0x00027b78
SUB ESP,0xc
PUSH dword ptr [EBP]
CALL 0x00016670
MOV dword ptr [EBP],0x0
MOV dword ptr [ESP],EDI
CALL 0x00063020
MOV dword ptr [EBP],EAX
POP EAX
PUSH dword ptr [ESP + 0x14]
CALL 0x00016670
ADD ESP,0x10
MOV ECX,dword ptr [ESP + 0xc]
XOR ECX,dword ptr GS:[0x14]
MOV EAX,ESI
JNZ 0x00027b8b
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0xc
PUSH ESI
MOV ESI,0x2c
CALL 0x00016670
ADD ESP,0x10
JMP 0x00027b48
SUB ESP,0xc
MOV ESI,0xf
PUSH EAX
CALL 0x00016670
ADD ESP,0x10
JMP 0x00027b48
CALL 0x0007ad20
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint FUN_00027a70(undefined4 param_1,undefined4 *param_2)\n\n{\n  char *pcVar1;\n  size_t sVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int in_GS_OFFSET;\n  char *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x27a7b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  pcVar1 = (char *)FUN_000259b0();\n  sVar2 = strlen(pcVar1);\n  iVar3 = FUN_00019c70(param_1,pcVar1,sVar2,0,0xbff00000);\n  if (iVar3 < 0) {\n    iVar3 = 0x2c;\n    free(pcVar1);\n  }\n  else {\n    free(pcVar1);\n    iVar3 = FUN_00025be0(param_1,&local_24);\n    if (iVar3 == 7) {\n      if (*local_24 != '5') {\n        strtok(local_24,"\"");\n        pcVar1 = strtok((char *)0x0,"\"");\n        if (pcVar1 != (char *)0x0) {\n          free((void *)*param_2);\n          *param_2 = 0;\n          uVar4 = FUN_00063020(pcVar1);\n          *param_2 = uVar4;\n          free(local_24);\n          goto LAB_00027b48;\n        }\n      }\n      iVar3 = 0xf;\n      free(local_24);\n    }\n  }\nLAB_00027b48:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0007ad20();\n}\n\n" comment (function_definition "int FUN_00027a70(undefined4 param_1,undefined4 *param_2)\n\n{\n  char *pcVar1;\n  size_t sVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int in_GS_OFFSET;\n  char *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x27a7b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  pcVar1 = (char *)FUN_000259b0();\n  sVar2 = strlen(pcVar1);\n  iVar3 = FUN_00019c70(param_1,pcVar1,sVar2,0,0xbff00000);\n  if (iVar3 < 0) {\n    iVar3 = 0x2c;\n    free(pcVar1);\n  }\n  else {\n    free(pcVar1);\n    iVar3 = FUN_00025be0(param_1,&local_24);\n    if (iVar3 == 7) {\n      if (*local_24 != '5') {\n        strtok(local_24,"\"");\n        pcVar1 = strtok((char *)0x0,"\"");\n        if (pcVar1 != (char *)0x0) {\n          free((void *)*param_2);\n          *param_2 = 0;\n          uVar4 = FUN_00063020(pcVar1);\n          *param_2 = uVar4;\n          free(local_24);\n          goto LAB_00027b48;\n        }\n      }\n      iVar3 = 0xf;\n      free(local_24);\n    }\n  }\nLAB_00027b48:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0007ad20();\n}" primitive_type (function_declarator "FUN_00027a70(undefined4 param_1,undefined4 *param_2)" identifier (parameter_list "(undefined4 param_1,undefined4 *param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  char *pcVar1;\n  size_t sVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int in_GS_OFFSET;\n  char *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x27a7b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  pcVar1 = (char *)FUN_000259b0();\n  sVar2 = strlen(pcVar1);\n  iVar3 = FUN_00019c70(param_1,pcVar1,sVar2,0,0xbff00000);\n  if (iVar3 < 0) {\n    iVar3 = 0x2c;\n    free(pcVar1);\n  }\n  else {\n    free(pcVar1);\n    iVar3 = FUN_00025be0(param_1,&local_24);\n    if (iVar3 == 7) {\n      if (*local_24 != '5') {\n        strtok(local_24,"\"");\n        pcVar1 = strtok((char *)0x0,"\"");\n        if (pcVar1 != (char *)0x0) {\n          free((void *)*param_2);\n          *param_2 = 0;\n          uVar4 = FUN_00063020(pcVar1);\n          *param_2 = uVar4;\n          free(local_24);\n          goto LAB_00027b48;\n        }\n      }\n      iVar3 = 0xf;\n      free(local_24);\n    }\n  }\nLAB_00027b48:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0007ad20();\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char *local_24;" primitive_type (pointer_declarator "*local_24" * identifier) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x27a7b;" (assignment_expression "uStack_14 = 0x27a7b" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(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 "pcVar1 = (char *)FUN_000259b0();" (assignment_expression "pcVar1 = (char *)FUN_000259b0()" identifier = (cast_expression "(char *)FUN_000259b0()" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_000259b0()" identifier (argument_list "()" ( ))))) ;) (expression_statement "sVar2 = strlen(pcVar1);" (assignment_expression "sVar2 = strlen(pcVar1)" identifier = (call_expression "strlen(pcVar1)" identifier (argument_list "(pcVar1)" ( identifier )))) ;) (expression_statement "iVar3 = FUN_00019c70(param_1,pcVar1,sVar2,0,0xbff00000);" (assignment_expression "iVar3 = FUN_00019c70(param_1,pcVar1,sVar2,0,0xbff00000)" identifier = (call_expression "FUN_00019c70(param_1,pcVar1,sVar2,0,0xbff00000)" identifier (argument_list "(param_1,pcVar1,sVar2,0,0xbff00000)" ( identifier , identifier , identifier , number_literal , number_literal )))) ;) (if_statement "if (iVar3 < 0) {\n    iVar3 = 0x2c;\n    free(pcVar1);\n  }\n  else {\n    free(pcVar1);\n    iVar3 = FUN_00025be0(param_1,&local_24);\n    if (iVar3 == 7) {\n      if (*local_24 != '5') {\n        strtok(local_24,"\"");\n        pcVar1 = strtok((char *)0x0,"\"");\n        if (pcVar1 != (char *)0x0) {\n          free((void *)*param_2);\n          *param_2 = 0;\n          uVar4 = FUN_00063020(pcVar1);\n          *param_2 = uVar4;\n          free(local_24);\n          goto LAB_00027b48;\n        }\n      }\n      iVar3 = 0xf;\n      free(local_24);\n    }\n  }" if (parenthesized_expression "(iVar3 < 0)" ( (binary_expression "iVar3 < 0" identifier < number_literal) )) (compound_statement "{\n    iVar3 = 0x2c;\n    free(pcVar1);\n  }" { (expression_statement "iVar3 = 0x2c;" (assignment_expression "iVar3 = 0x2c" identifier = number_literal) ;) (expression_statement "free(pcVar1);" (call_expression "free(pcVar1)" identifier (argument_list "(pcVar1)" ( identifier ))) ;) }) (else_clause "else {\n    free(pcVar1);\n    iVar3 = FUN_00025be0(param_1,&local_24);\n    if (iVar3 == 7) {\n      if (*local_24 != '5') {\n        strtok(local_24,"\"");\n        pcVar1 = strtok((char *)0x0,"\"");\n        if (pcVar1 != (char *)0x0) {\n          free((void *)*param_2);\n          *param_2 = 0;\n          uVar4 = FUN_00063020(pcVar1);\n          *param_2 = uVar4;\n          free(local_24);\n          goto LAB_00027b48;\n        }\n      }\n      iVar3 = 0xf;\n      free(local_24);\n    }\n  }" else (compound_statement "{\n    free(pcVar1);\n    iVar3 = FUN_00025be0(param_1,&local_24);\n    if (iVar3 == 7) {\n      if (*local_24 != '5') {\n        strtok(local_24,"\"");\n        pcVar1 = strtok((char *)0x0,"\"");\n        if (pcVar1 != (char *)0x0) {\n          free((void *)*param_2);\n          *param_2 = 0;\n          uVar4 = FUN_00063020(pcVar1);\n          *param_2 = uVar4;\n          free(local_24);\n          goto LAB_00027b48;\n        }\n      }\n      iVar3 = 0xf;\n      free(local_24);\n    }\n  }" { (expression_statement "free(pcVar1);" (call_expression "free(pcVar1)" identifier (argument_list "(pcVar1)" ( identifier ))) ;) (expression_statement "iVar3 = FUN_00025be0(param_1,&local_24);" (assignment_expression "iVar3 = FUN_00025be0(param_1,&local_24)" identifier = (call_expression "FUN_00025be0(param_1,&local_24)" identifier (argument_list "(param_1,&local_24)" ( identifier , (pointer_expression "&local_24" & identifier) )))) ;) (if_statement "if (iVar3 == 7) {\n      if (*local_24 != '5') {\n        strtok(local_24,"\"");\n        pcVar1 = strtok((char *)0x0,"\"");\n        if (pcVar1 != (char *)0x0) {\n          free((void *)*param_2);\n          *param_2 = 0;\n          uVar4 = FUN_00063020(pcVar1);\n          *param_2 = uVar4;\n          free(local_24);\n          goto LAB_00027b48;\n        }\n      }\n      iVar3 = 0xf;\n      free(local_24);\n    }" if (parenthesized_expression "(iVar3 == 7)" ( (binary_expression "iVar3 == 7" identifier == number_literal) )) (compound_statement "{\n      if (*local_24 != '5') {\n        strtok(local_24,"\"");\n        pcVar1 = strtok((char *)0x0,"\"");\n        if (pcVar1 != (char *)0x0) {\n          free((void *)*param_2);\n          *param_2 = 0;\n          uVar4 = FUN_00063020(pcVar1);\n          *param_2 = uVar4;\n          free(local_24);\n          goto LAB_00027b48;\n        }\n      }\n      iVar3 = 0xf;\n      free(local_24);\n    }" { (if_statement "if (*local_24 != '5') {\n        strtok(local_24,"\"");\n        pcVar1 = strtok((char *)0x0,"\"");\n        if (pcVar1 != (char *)0x0) {\n          free((void *)*param_2);\n          *param_2 = 0;\n          uVar4 = FUN_00063020(pcVar1);\n          *param_2 = uVar4;\n          free(local_24);\n          goto LAB_00027b48;\n        }\n      }" if (parenthesized_expression "(*local_24 != '5')" ( (binary_expression "*local_24 != '5'" (pointer_expression "*local_24" * identifier) != (char_literal "'5'" ' character ')) )) (compound_statement "{\n        strtok(local_24,"\"");\n        pcVar1 = strtok((char *)0x0,"\"");\n        if (pcVar1 != (char *)0x0) {\n          free((void *)*param_2);\n          *param_2 = 0;\n          uVar4 = FUN_00063020(pcVar1);\n          *param_2 = uVar4;\n          free(local_24);\n          goto LAB_00027b48;\n        }\n      }" { (expression_statement "strtok(local_24,"\"");" (call_expression "strtok(local_24,"\"")" identifier (argument_list "(local_24,"\"")" ( identifier , (string_literal ""\""" " escape_sequence ") ))) ;) (expression_statement "pcVar1 = strtok((char *)0x0,"\"");" (assignment_expression "pcVar1 = strtok((char *)0x0,"\"")" identifier = (call_expression "strtok((char *)0x0,"\"")" identifier (argument_list "((char *)0x0,"\"")" ( (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) , (string_literal ""\""" " escape_sequence ") )))) ;) (if_statement "if (pcVar1 != (char *)0x0) {\n          free((void *)*param_2);\n          *param_2 = 0;\n          uVar4 = FUN_00063020(pcVar1);\n          *param_2 = uVar4;\n          free(local_24);\n          goto LAB_00027b48;\n        }" if (parenthesized_expression "(pcVar1 != (char *)0x0)" ( (binary_expression "pcVar1 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          free((void *)*param_2);\n          *param_2 = 0;\n          uVar4 = FUN_00063020(pcVar1);\n          *param_2 = uVar4;\n          free(local_24);\n          goto LAB_00027b48;\n        }" { (expression_statement "free((void *)*param_2);" (call_expression "free((void *)*param_2)" identifier (argument_list "((void *)*param_2)" ( (cast_expression "(void *)*param_2" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier)) ))) ;) (expression_statement "*param_2 = 0;" (assignment_expression "*param_2 = 0" (pointer_expression "*param_2" * identifier) = number_literal) ;) (expression_statement "uVar4 = FUN_00063020(pcVar1);" (assignment_expression "uVar4 = FUN_00063020(pcVar1)" identifier = (call_expression "FUN_00063020(pcVar1)" identifier (argument_list "(pcVar1)" ( identifier )))) ;) (expression_statement "*param_2 = uVar4;" (assignment_expression "*param_2 = uVar4" (pointer_expression "*param_2" * identifier) = identifier) ;) (expression_statement "free(local_24);" (call_expression "free(local_24)" identifier (argument_list "(local_24)" ( identifier ))) ;) (goto_statement "goto LAB_00027b48;" goto statement_identifier ;) })) })) (expression_statement "iVar3 = 0xf;" (assignment_expression "iVar3 = 0xf" identifier = number_literal) ;) (expression_statement "free(local_24);" (call_expression "free(local_24)" identifier (argument_list "(local_24)" ( identifier ))) ;) })) }))) (labeled_statement "LAB_00027b48:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }" statement_identifier : (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(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 iVar3;\n  }" { (return_statement "return iVar3;" return identifier ;) }))) comment (expression_statement "FUN_0007ad20();" (call_expression "FUN_0007ad20()" 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_pwd(int csock,char **pwd)\n\n{\n  char *pcVar1;\n  size_t bufsize;\n  int iVar2;\n  uerr_t uVar3;\n  int in_GS_OFFSET;\n  char *respline;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x27a7b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  pcVar1 = ftp_request("PWD",(char *)0x0);\n  bufsize = strlen(pcVar1);\n  iVar2 = fd_write(csock,pcVar1,bufsize,-1.0);\n  if (iVar2 < 0) {\n    uVar3 = WRITEFAILED;\n    free(pcVar1);\n  }\n  else {\n    free(pcVar1);\n    uVar3 = ftp_response(csock,&respline);\n    if (uVar3 == FTPOK) {\n      if (*respline != '5') {\n        strtok(respline,"\"");\n        pcVar1 = strtok((char *)0x0,"\"");\n        if (pcVar1 != (char *)0x0) {\n          free(*pwd);\n          *pwd = (char *)0x0;\n          pcVar1 = xstrdup(pcVar1);\n          *pwd = pcVar1;\n          free(respline);\n          goto LAB_00027b48;\n        }\n      }\n      uVar3 = FTPSRVERR;\n      free(respline);\n    }\n  }\nLAB_00027b48:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment comment (function_definition "uerr_t ftp_pwd(int csock,char **pwd)\n\n{\n  char *pcVar1;\n  size_t bufsize;\n  int iVar2;\n  uerr_t uVar3;\n  int in_GS_OFFSET;\n  char *respline;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x27a7b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  pcVar1 = ftp_request("PWD",(char *)0x0);\n  bufsize = strlen(pcVar1);\n  iVar2 = fd_write(csock,pcVar1,bufsize,-1.0);\n  if (iVar2 < 0) {\n    uVar3 = WRITEFAILED;\n    free(pcVar1);\n  }\n  else {\n    free(pcVar1);\n    uVar3 = ftp_response(csock,&respline);\n    if (uVar3 == FTPOK) {\n      if (*respline != '5') {\n        strtok(respline,"\"");\n        pcVar1 = strtok((char *)0x0,"\"");\n        if (pcVar1 != (char *)0x0) {\n          free(*pwd);\n          *pwd = (char *)0x0;\n          pcVar1 = xstrdup(pcVar1);\n          *pwd = pcVar1;\n          free(respline);\n          goto LAB_00027b48;\n        }\n      }\n      uVar3 = FTPSRVERR;\n      free(respline);\n    }\n  }\nLAB_00027b48:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" type_identifier (function_declarator "ftp_pwd(int csock,char **pwd)" identifier (parameter_list "(int csock,char **pwd)" ( (parameter_declaration "int csock" primitive_type identifier) , (parameter_declaration "char **pwd" primitive_type (pointer_declarator "**pwd" * (pointer_declarator "*pwd" * identifier))) ))) (compound_statement "{\n  char *pcVar1;\n  size_t bufsize;\n  int iVar2;\n  uerr_t uVar3;\n  int in_GS_OFFSET;\n  char *respline;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x27a7b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  pcVar1 = ftp_request("PWD",(char *)0x0);\n  bufsize = strlen(pcVar1);\n  iVar2 = fd_write(csock,pcVar1,bufsize,-1.0);\n  if (iVar2 < 0) {\n    uVar3 = WRITEFAILED;\n    free(pcVar1);\n  }\n  else {\n    free(pcVar1);\n    uVar3 = ftp_response(csock,&respline);\n    if (uVar3 == FTPOK) {\n      if (*respline != '5') {\n        strtok(respline,"\"");\n        pcVar1 = strtok((char *)0x0,"\"");\n        if (pcVar1 != (char *)0x0) {\n          free(*pwd);\n          *pwd = (char *)0x0;\n          pcVar1 = xstrdup(pcVar1);\n          *pwd = pcVar1;\n          free(respline);\n          goto LAB_00027b48;\n        }\n      }\n      uVar3 = FTPSRVERR;\n      free(respline);\n    }\n  }\nLAB_00027b48:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "size_t bufsize;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uerr_t uVar3;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char *respline;" primitive_type (pointer_declarator "*respline" * identifier) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x27a7b;" (assignment_expression "uStack_14 = 0x27a7b" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(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 "pcVar1 = ftp_request("PWD",(char *)0x0);" (assignment_expression "pcVar1 = ftp_request("PWD",(char *)0x0)" identifier = (call_expression "ftp_request("PWD",(char *)0x0)" identifier (argument_list "("PWD",(char *)0x0)" ( (string_literal ""PWD"" " string_content ") , (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) )))) ;) (expression_statement "bufsize = strlen(pcVar1);" (assignment_expression "bufsize = strlen(pcVar1)" identifier = (call_expression "strlen(pcVar1)" identifier (argument_list "(pcVar1)" ( identifier )))) ;) (expression_statement "iVar2 = fd_write(csock,pcVar1,bufsize,-1.0);" (assignment_expression "iVar2 = fd_write(csock,pcVar1,bufsize,-1.0)" identifier = (call_expression "fd_write(csock,pcVar1,bufsize,-1.0)" identifier (argument_list "(csock,pcVar1,bufsize,-1.0)" ( identifier , identifier , identifier , number_literal )))) ;) (if_statement "if (iVar2 < 0) {\n    uVar3 = WRITEFAILED;\n    free(pcVar1);\n  }\n  else {\n    free(pcVar1);\n    uVar3 = ftp_response(csock,&respline);\n    if (uVar3 == FTPOK) {\n      if (*respline != '5') {\n        strtok(respline,"\"");\n        pcVar1 = strtok((char *)0x0,"\"");\n        if (pcVar1 != (char *)0x0) {\n          free(*pwd);\n          *pwd = (char *)0x0;\n          pcVar1 = xstrdup(pcVar1);\n          *pwd = pcVar1;\n          free(respline);\n          goto LAB_00027b48;\n        }\n      }\n      uVar3 = FTPSRVERR;\n      free(respline);\n    }\n  }" if (parenthesized_expression "(iVar2 < 0)" ( (binary_expression "iVar2 < 0" identifier < number_literal) )) (compound_statement "{\n    uVar3 = WRITEFAILED;\n    free(pcVar1);\n  }" { (expression_statement "uVar3 = WRITEFAILED;" (assignment_expression "uVar3 = WRITEFAILED" identifier = identifier) ;) (expression_statement "free(pcVar1);" (call_expression "free(pcVar1)" identifier (argument_list "(pcVar1)" ( identifier ))) ;) }) (else_clause "else {\n    free(pcVar1);\n    uVar3 = ftp_response(csock,&respline);\n    if (uVar3 == FTPOK) {\n      if (*respline != '5') {\n        strtok(respline,"\"");\n        pcVar1 = strtok((char *)0x0,"\"");\n        if (pcVar1 != (char *)0x0) {\n          free(*pwd);\n          *pwd = (char *)0x0;\n          pcVar1 = xstrdup(pcVar1);\n          *pwd = pcVar1;\n          free(respline);\n          goto LAB_00027b48;\n        }\n      }\n      uVar3 = FTPSRVERR;\n      free(respline);\n    }\n  }" else (compound_statement "{\n    free(pcVar1);\n    uVar3 = ftp_response(csock,&respline);\n    if (uVar3 == FTPOK) {\n      if (*respline != '5') {\n        strtok(respline,"\"");\n        pcVar1 = strtok((char *)0x0,"\"");\n        if (pcVar1 != (char *)0x0) {\n          free(*pwd);\n          *pwd = (char *)0x0;\n          pcVar1 = xstrdup(pcVar1);\n          *pwd = pcVar1;\n          free(respline);\n          goto LAB_00027b48;\n        }\n      }\n      uVar3 = FTPSRVERR;\n      free(respline);\n    }\n  }" { (expression_statement "free(pcVar1);" (call_expression "free(pcVar1)" identifier (argument_list "(pcVar1)" ( identifier ))) ;) (expression_statement "uVar3 = ftp_response(csock,&respline);" (assignment_expression "uVar3 = ftp_response(csock,&respline)" identifier = (call_expression "ftp_response(csock,&respline)" identifier (argument_list "(csock,&respline)" ( identifier , (pointer_expression "&respline" & identifier) )))) ;) (if_statement "if (uVar3 == FTPOK) {\n      if (*respline != '5') {\n        strtok(respline,"\"");\n        pcVar1 = strtok((char *)0x0,"\"");\n        if (pcVar1 != (char *)0x0) {\n          free(*pwd);\n          *pwd = (char *)0x0;\n          pcVar1 = xstrdup(pcVar1);\n          *pwd = pcVar1;\n          free(respline);\n          goto LAB_00027b48;\n        }\n      }\n      uVar3 = FTPSRVERR;\n      free(respline);\n    }" if (parenthesized_expression "(uVar3 == FTPOK)" ( (binary_expression "uVar3 == FTPOK" identifier == identifier) )) (compound_statement "{\n      if (*respline != '5') {\n        strtok(respline,"\"");\n        pcVar1 = strtok((char *)0x0,"\"");\n        if (pcVar1 != (char *)0x0) {\n          free(*pwd);\n          *pwd = (char *)0x0;\n          pcVar1 = xstrdup(pcVar1);\n          *pwd = pcVar1;\n          free(respline);\n          goto LAB_00027b48;\n        }\n      }\n      uVar3 = FTPSRVERR;\n      free(respline);\n    }" { (if_statement "if (*respline != '5') {\n        strtok(respline,"\"");\n        pcVar1 = strtok((char *)0x0,"\"");\n        if (pcVar1 != (char *)0x0) {\n          free(*pwd);\n          *pwd = (char *)0x0;\n          pcVar1 = xstrdup(pcVar1);\n          *pwd = pcVar1;\n          free(respline);\n          goto LAB_00027b48;\n        }\n      }" if (parenthesized_expression "(*respline != '5')" ( (binary_expression "*respline != '5'" (pointer_expression "*respline" * identifier) != (char_literal "'5'" ' character ')) )) (compound_statement "{\n        strtok(respline,"\"");\n        pcVar1 = strtok((char *)0x0,"\"");\n        if (pcVar1 != (char *)0x0) {\n          free(*pwd);\n          *pwd = (char *)0x0;\n          pcVar1 = xstrdup(pcVar1);\n          *pwd = pcVar1;\n          free(respline);\n          goto LAB_00027b48;\n        }\n      }" { (expression_statement "strtok(respline,"\"");" (call_expression "strtok(respline,"\"")" identifier (argument_list "(respline,"\"")" ( identifier , (string_literal ""\""" " escape_sequence ") ))) ;) (expression_statement "pcVar1 = strtok((char *)0x0,"\"");" (assignment_expression "pcVar1 = strtok((char *)0x0,"\"")" identifier = (call_expression "strtok((char *)0x0,"\"")" identifier (argument_list "((char *)0x0,"\"")" ( (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) , (string_literal ""\""" " escape_sequence ") )))) ;) (if_statement "if (pcVar1 != (char *)0x0) {\n          free(*pwd);\n          *pwd = (char *)0x0;\n          pcVar1 = xstrdup(pcVar1);\n          *pwd = pcVar1;\n          free(respline);\n          goto LAB_00027b48;\n        }" if (parenthesized_expression "(pcVar1 != (char *)0x0)" ( (binary_expression "pcVar1 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          free(*pwd);\n          *pwd = (char *)0x0;\n          pcVar1 = xstrdup(pcVar1);\n          *pwd = pcVar1;\n          free(respline);\n          goto LAB_00027b48;\n        }" { (expression_statement "free(*pwd);" (call_expression "free(*pwd)" identifier (argument_list "(*pwd)" ( (pointer_expression "*pwd" * identifier) ))) ;) (expression_statement "*pwd = (char *)0x0;" (assignment_expression "*pwd = (char *)0x0" (pointer_expression "*pwd" * identifier) = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "pcVar1 = xstrdup(pcVar1);" (assignment_expression "pcVar1 = xstrdup(pcVar1)" identifier = (call_expression "xstrdup(pcVar1)" identifier (argument_list "(pcVar1)" ( identifier )))) ;) (expression_statement "*pwd = pcVar1;" (assignment_expression "*pwd = pcVar1" (pointer_expression "*pwd" * identifier) = identifier) ;) (expression_statement "free(respline);" (call_expression "free(respline)" identifier (argument_list "(respline)" ( identifier ))) ;) (goto_statement "goto LAB_00027b48;" goto statement_identifier ;) })) })) (expression_statement "uVar3 = FTPSRVERR;" (assignment_expression "uVar3 = FTPSRVERR" identifier = identifier) ;) (expression_statement "free(respline);" (call_expression "free(respline)" identifier (argument_list "(respline)" ( identifier ))) ;) })) }))) (labeled_statement "LAB_00027b48:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar3;\n  }" statement_identifier : (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar3;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(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 uVar3;\n  }" { (return_statement "return uVar3;" return identifier ;) }))) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "int FUN_00027a70(undefined4 param_1,undefined4 *param_2)\n\n{\n  char *pcVar1;\n  size_t sVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int in_GS_OFFSET;\n  char *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x27a7b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  pcVar1 = (char *)FUN_000259b0();\n  sVar2 = strlen(pcVar1);\n  iVar3 = FUN_00019c70(param_1,pcVar1,sVar2,0,0xbff00000);\n  if (iVar3 < 0) {\n    iVar3 = 0x2c;\n    free(pcVar1);\n  }\n  else {\n    free(pcVar1);\n    iVar3 = FUN_00025be0(param_1,&local_24);\n    if (iVar3 == 7) {\n      if (*local_24 != '5') {\n        strtok(local_24,"\"");\n        pcVar1 = strtok((char *)0x0,"\"");\n        if (pcVar1 != (char *)0x0) {\n          free((void *)*param_2);\n          *param_2 = 0;\n          uVar4 = FUN_00063020(pcVar1);\n          *param_2 = uVar4;\n          free(local_24);\n          goto LAB_00027b48;\n        }\n      }\n      iVar3 = 0xf;\n      free(local_24);\n    }\n  }\nLAB_00027b48:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }\n                    \n  FUN_0007ad20();\n}\n\n" (function_definition "int FUN_00027a70(undefined4 param_1,undefined4 *param_2)\n\n{\n  char *pcVar1;\n  size_t sVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int in_GS_OFFSET;\n  char *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x27a7b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  pcVar1 = (char *)FUN_000259b0();\n  sVar2 = strlen(pcVar1);\n  iVar3 = FUN_00019c70(param_1,pcVar1,sVar2,0,0xbff00000);\n  if (iVar3 < 0) {\n    iVar3 = 0x2c;\n    free(pcVar1);\n  }\n  else {\n    free(pcVar1);\n    iVar3 = FUN_00025be0(param_1,&local_24);\n    if (iVar3 == 7) {\n      if (*local_24 != '5') {\n        strtok(local_24,"\"");\n        pcVar1 = strtok((char *)0x0,"\"");\n        if (pcVar1 != (char *)0x0) {\n          free((void *)*param_2);\n          *param_2 = 0;\n          uVar4 = FUN_00063020(pcVar1);\n          *param_2 = uVar4;\n          free(local_24);\n          goto LAB_00027b48;\n        }\n      }\n      iVar3 = 0xf;\n      free(local_24);\n    }\n  }\nLAB_00027b48:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }\n                    \n  FUN_0007ad20();\n}" primitive_type (function_declarator "FUN_00027a70(undefined4 param_1,undefined4 *param_2)" identifier (parameter_list "(undefined4 param_1,undefined4 *param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  char *pcVar1;\n  size_t sVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int in_GS_OFFSET;\n  char *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x27a7b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  pcVar1 = (char *)FUN_000259b0();\n  sVar2 = strlen(pcVar1);\n  iVar3 = FUN_00019c70(param_1,pcVar1,sVar2,0,0xbff00000);\n  if (iVar3 < 0) {\n    iVar3 = 0x2c;\n    free(pcVar1);\n  }\n  else {\n    free(pcVar1);\n    iVar3 = FUN_00025be0(param_1,&local_24);\n    if (iVar3 == 7) {\n      if (*local_24 != '5') {\n        strtok(local_24,"\"");\n        pcVar1 = strtok((char *)0x0,"\"");\n        if (pcVar1 != (char *)0x0) {\n          free((void *)*param_2);\n          *param_2 = 0;\n          uVar4 = FUN_00063020(pcVar1);\n          *param_2 = uVar4;\n          free(local_24);\n          goto LAB_00027b48;\n        }\n      }\n      iVar3 = 0xf;\n      free(local_24);\n    }\n  }\nLAB_00027b48:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }\n                    \n  FUN_0007ad20();\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char *local_24;" primitive_type (pointer_declarator "*local_24" * identifier) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x27a7b;" (assignment_expression "uStack_14 = 0x27a7b" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(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 "pcVar1 = (char *)FUN_000259b0();" (assignment_expression "pcVar1 = (char *)FUN_000259b0()" identifier = (cast_expression "(char *)FUN_000259b0()" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_000259b0()" identifier (argument_list "()" ( ))))) ;) (expression_statement "sVar2 = strlen(pcVar1);" (assignment_expression "sVar2 = strlen(pcVar1)" identifier = (call_expression "strlen(pcVar1)" identifier (argument_list "(pcVar1)" ( identifier )))) ;) (expression_statement "iVar3 = FUN_00019c70(param_1,pcVar1,sVar2,0,0xbff00000);" (assignment_expression "iVar3 = FUN_00019c70(param_1,pcVar1,sVar2,0,0xbff00000)" identifier = (call_expression "FUN_00019c70(param_1,pcVar1,sVar2,0,0xbff00000)" identifier (argument_list "(param_1,pcVar1,sVar2,0,0xbff00000)" ( identifier , identifier , identifier , number_literal , number_literal )))) ;) (if_statement "if (iVar3 < 0) {\n    iVar3 = 0x2c;\n    free(pcVar1);\n  }\n  else {\n    free(pcVar1);\n    iVar3 = FUN_00025be0(param_1,&local_24);\n    if (iVar3 == 7) {\n      if (*local_24 != '5') {\n        strtok(local_24,"\"");\n        pcVar1 = strtok((char *)0x0,"\"");\n        if (pcVar1 != (char *)0x0) {\n          free((void *)*param_2);\n          *param_2 = 0;\n          uVar4 = FUN_00063020(pcVar1);\n          *param_2 = uVar4;\n          free(local_24);\n          goto LAB_00027b48;\n        }\n      }\n      iVar3 = 0xf;\n      free(local_24);\n    }\n  }" if (parenthesized_expression "(iVar3 < 0)" ( (binary_expression "iVar3 < 0" identifier < number_literal) )) (compound_statement "{\n    iVar3 = 0x2c;\n    free(pcVar1);\n  }" { (expression_statement "iVar3 = 0x2c;" (assignment_expression "iVar3 = 0x2c" identifier = number_literal) ;) (expression_statement "free(pcVar1);" (call_expression "free(pcVar1)" identifier (argument_list "(pcVar1)" ( identifier ))) ;) }) (else_clause "else {\n    free(pcVar1);\n    iVar3 = FUN_00025be0(param_1,&local_24);\n    if (iVar3 == 7) {\n      if (*local_24 != '5') {\n        strtok(local_24,"\"");\n        pcVar1 = strtok((char *)0x0,"\"");\n        if (pcVar1 != (char *)0x0) {\n          free((void *)*param_2);\n          *param_2 = 0;\n          uVar4 = FUN_00063020(pcVar1);\n          *param_2 = uVar4;\n          free(local_24);\n          goto LAB_00027b48;\n        }\n      }\n      iVar3 = 0xf;\n      free(local_24);\n    }\n  }" else (compound_statement "{\n    free(pcVar1);\n    iVar3 = FUN_00025be0(param_1,&local_24);\n    if (iVar3 == 7) {\n      if (*local_24 != '5') {\n        strtok(local_24,"\"");\n        pcVar1 = strtok((char *)0x0,"\"");\n        if (pcVar1 != (char *)0x0) {\n          free((void *)*param_2);\n          *param_2 = 0;\n          uVar4 = FUN_00063020(pcVar1);\n          *param_2 = uVar4;\n          free(local_24);\n          goto LAB_00027b48;\n        }\n      }\n      iVar3 = 0xf;\n      free(local_24);\n    }\n  }" { (expression_statement "free(pcVar1);" (call_expression "free(pcVar1)" identifier (argument_list "(pcVar1)" ( identifier ))) ;) (expression_statement "iVar3 = FUN_00025be0(param_1,&local_24);" (assignment_expression "iVar3 = FUN_00025be0(param_1,&local_24)" identifier = (call_expression "FUN_00025be0(param_1,&local_24)" identifier (argument_list "(param_1,&local_24)" ( identifier , (pointer_expression "&local_24" & identifier) )))) ;) (if_statement "if (iVar3 == 7) {\n      if (*local_24 != '5') {\n        strtok(local_24,"\"");\n        pcVar1 = strtok((char *)0x0,"\"");\n        if (pcVar1 != (char *)0x0) {\n          free((void *)*param_2);\n          *param_2 = 0;\n          uVar4 = FUN_00063020(pcVar1);\n          *param_2 = uVar4;\n          free(local_24);\n          goto LAB_00027b48;\n        }\n      }\n      iVar3 = 0xf;\n      free(local_24);\n    }" if (parenthesized_expression "(iVar3 == 7)" ( (binary_expression "iVar3 == 7" identifier == number_literal) )) (compound_statement "{\n      if (*local_24 != '5') {\n        strtok(local_24,"\"");\n        pcVar1 = strtok((char *)0x0,"\"");\n        if (pcVar1 != (char *)0x0) {\n          free((void *)*param_2);\n          *param_2 = 0;\n          uVar4 = FUN_00063020(pcVar1);\n          *param_2 = uVar4;\n          free(local_24);\n          goto LAB_00027b48;\n        }\n      }\n      iVar3 = 0xf;\n      free(local_24);\n    }" { (if_statement "if (*local_24 != '5') {\n        strtok(local_24,"\"");\n        pcVar1 = strtok((char *)0x0,"\"");\n        if (pcVar1 != (char *)0x0) {\n          free((void *)*param_2);\n          *param_2 = 0;\n          uVar4 = FUN_00063020(pcVar1);\n          *param_2 = uVar4;\n          free(local_24);\n          goto LAB_00027b48;\n        }\n      }" if (parenthesized_expression "(*local_24 != '5')" ( (binary_expression "*local_24 != '5'" (pointer_expression "*local_24" * identifier) != (char_literal "'5'" ' character ')) )) (compound_statement "{\n        strtok(local_24,"\"");\n        pcVar1 = strtok((char *)0x0,"\"");\n        if (pcVar1 != (char *)0x0) {\n          free((void *)*param_2);\n          *param_2 = 0;\n          uVar4 = FUN_00063020(pcVar1);\n          *param_2 = uVar4;\n          free(local_24);\n          goto LAB_00027b48;\n        }\n      }" { (expression_statement "strtok(local_24,"\"");" (call_expression "strtok(local_24,"\"")" identifier (argument_list "(local_24,"\"")" ( identifier , (string_literal ""\""" " escape_sequence ") ))) ;) (expression_statement "pcVar1 = strtok((char *)0x0,"\"");" (assignment_expression "pcVar1 = strtok((char *)0x0,"\"")" identifier = (call_expression "strtok((char *)0x0,"\"")" identifier (argument_list "((char *)0x0,"\"")" ( (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) , (string_literal ""\""" " escape_sequence ") )))) ;) (if_statement "if (pcVar1 != (char *)0x0) {\n          free((void *)*param_2);\n          *param_2 = 0;\n          uVar4 = FUN_00063020(pcVar1);\n          *param_2 = uVar4;\n          free(local_24);\n          goto LAB_00027b48;\n        }" if (parenthesized_expression "(pcVar1 != (char *)0x0)" ( (binary_expression "pcVar1 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          free((void *)*param_2);\n          *param_2 = 0;\n          uVar4 = FUN_00063020(pcVar1);\n          *param_2 = uVar4;\n          free(local_24);\n          goto LAB_00027b48;\n        }" { (expression_statement "free((void *)*param_2);" (call_expression "free((void *)*param_2)" identifier (argument_list "((void *)*param_2)" ( (cast_expression "(void *)*param_2" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier)) ))) ;) (expression_statement "*param_2 = 0;" (assignment_expression "*param_2 = 0" (pointer_expression "*param_2" * identifier) = number_literal) ;) (expression_statement "uVar4 = FUN_00063020(pcVar1);" (assignment_expression "uVar4 = FUN_00063020(pcVar1)" identifier = (call_expression "FUN_00063020(pcVar1)" identifier (argument_list "(pcVar1)" ( identifier )))) ;) (expression_statement "*param_2 = uVar4;" (assignment_expression "*param_2 = uVar4" (pointer_expression "*param_2" * identifier) = identifier) ;) (expression_statement "free(local_24);" (call_expression "free(local_24)" identifier (argument_list "(local_24)" ( identifier ))) ;) (goto_statement "goto LAB_00027b48;" goto statement_identifier ;) })) })) (expression_statement "iVar3 = 0xf;" (assignment_expression "iVar3 = 0xf" identifier = number_literal) ;) (expression_statement "free(local_24);" (call_expression "free(local_24)" identifier (argument_list "(local_24)" ( identifier ))) ;) })) }))) (labeled_statement "LAB_00027b48:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }" statement_identifier : (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(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 iVar3;\n  }" { (return_statement "return iVar3;" return identifier ;) }))) (expression_statement "FUN_0007ad20();" (call_expression "FUN_0007ad20()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (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 (assignment_expression IDENT = LIT) ;) (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 = (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 , (string_literal " escape_sequence ") ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) , (string_literal " escape_sequence ") )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT)) ))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (goto_statement goto statement_identifier ;) })) })) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) }))) (labeled_statement statement_identifier : (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_00027a70(undefined4 param_1,undefined4 *param_2)\n\n{\n  char *pcVar1;\n  size_t sVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int in_GS_OFFSET;\n  char *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x27a7b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  pcVar1 = (char *)FUN_000259b0();\n  sVar2 = strlen(pcVar1);\n  iVar3 = FUN_00019c70(param_1,pcVar1,sVar2,0,0xbff00000);\n  if (iVar3 < 0) {\n    iVar3 = 0x2c;\n    free(pcVar1);\n  }\n  else {\n    free(pcVar1);\n    iVar3 = FUN_00025be0(param_1,&local_24);\n    if (iVar3 == 7) {\n      if (*local_24 != '5') {\n        strtok(local_24,"\"");\n        pcVar1 = strtok((char *)0x0,"\"");\n        if (pcVar1 != (char *)0x0) {\n          free((void *)*param_2);\n          *param_2 = 0;\n          uVar4 = FUN_00063020(pcVar1);\n          *param_2 = uVar4;\n          free(local_24);\n          goto LAB_00027b48;\n        }\n      }\n      iVar3 = 0xf;\n      free(local_24);\n    }\n  }\nLAB_00027b48:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }\n                    \n  FUN_0007ad20();\n}" (primitive_type "int") (function_declarator "FUN_00027a70(undefined4 param_1,undefined4 *param_2)" (identifier "FUN_00027a70") (parameter_list "(undefined4 param_1,undefined4 *param_2)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 *param_2" (type_identifier "undefined4") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  char *pcVar1;\n  size_t sVar2;\n  int iVar3;\n  undefined4 uVar4;\n  int in_GS_OFFSET;\n  char *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x27a7b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  pcVar1 = (char *)FUN_000259b0();\n  sVar2 = strlen(pcVar1);\n  iVar3 = FUN_00019c70(param_1,pcVar1,sVar2,0,0xbff00000);\n  if (iVar3 < 0) {\n    iVar3 = 0x2c;\n    free(pcVar1);\n  }\n  else {\n    free(pcVar1);\n    iVar3 = FUN_00025be0(param_1,&local_24);\n    if (iVar3 == 7) {\n      if (*local_24 != '5') {\n        strtok(local_24,"\"");\n        pcVar1 = strtok((char *)0x0,"\"");\n        if (pcVar1 != (char *)0x0) {\n          free((void *)*param_2);\n          *param_2 = 0;\n          uVar4 = FUN_00063020(pcVar1);\n          *param_2 = uVar4;\n          free(local_24);\n          goto LAB_00027b48;\n        }\n      }\n      iVar3 = 0xf;\n      free(local_24);\n    }\n  }\nLAB_00027b48:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }\n                    \n  FUN_0007ad20();\n}" ({ "{") (declaration "char *pcVar1;" (primitive_type "char") (pointer_declarator "*pcVar1" (* "*") (identifier "pcVar1")) (; ";")) (declaration "size_t sVar2;" (primitive_type "size_t") (identifier "sVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "undefined4 uVar4;" (type_identifier "undefined4") (identifier "uVar4") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "char *local_24;" (primitive_type "char") (pointer_declarator "*local_24" (* "*") (identifier "local_24")) (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x27a7b;" (assignment_expression "uStack_14 = 0x27a7b" (identifier "uStack_14") (= "=") (number_literal "0x27a7b")) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (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 "pcVar1 = (char *)FUN_000259b0();" (assignment_expression "pcVar1 = (char *)FUN_000259b0()" (identifier "pcVar1") (= "=") (cast_expression "(char *)FUN_000259b0()" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_000259b0()" (identifier "FUN_000259b0") (argument_list "()" (( "(") () ")"))))) (; ";")) (expression_statement "sVar2 = strlen(pcVar1);" (assignment_expression "sVar2 = strlen(pcVar1)" (identifier "sVar2") (= "=") (call_expression "strlen(pcVar1)" (identifier "strlen") (argument_list "(pcVar1)" (( "(") (identifier "pcVar1") () ")")))) (; ";")) (expression_statement "iVar3 = FUN_00019c70(param_1,pcVar1,sVar2,0,0xbff00000);" (assignment_expression "iVar3 = FUN_00019c70(param_1,pcVar1,sVar2,0,0xbff00000)" (identifier "iVar3") (= "=") (call_expression "FUN_00019c70(param_1,pcVar1,sVar2,0,0xbff00000)" (identifier "FUN_00019c70") (argument_list "(param_1,pcVar1,sVar2,0,0xbff00000)" (( "(") (identifier "param_1") (, ",") (identifier "pcVar1") (, ",") (identifier "sVar2") (, ",") (number_literal "0") (, ",") (number_literal "0xbff00000") () ")")))) (; ";")) (if_statement "if (iVar3 < 0) {\n    iVar3 = 0x2c;\n    free(pcVar1);\n  }\n  else {\n    free(pcVar1);\n    iVar3 = FUN_00025be0(param_1,&local_24);\n    if (iVar3 == 7) {\n      if (*local_24 != '5') {\n        strtok(local_24,"\"");\n        pcVar1 = strtok((char *)0x0,"\"");\n        if (pcVar1 != (char *)0x0) {\n          free((void *)*param_2);\n          *param_2 = 0;\n          uVar4 = FUN_00063020(pcVar1);\n          *param_2 = uVar4;\n          free(local_24);\n          goto LAB_00027b48;\n        }\n      }\n      iVar3 = 0xf;\n      free(local_24);\n    }\n  }" (if "if") (parenthesized_expression "(iVar3 < 0)" (( "(") (binary_expression "iVar3 < 0" (identifier "iVar3") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n    iVar3 = 0x2c;\n    free(pcVar1);\n  }" ({ "{") (expression_statement "iVar3 = 0x2c;" (assignment_expression "iVar3 = 0x2c" (identifier "iVar3") (= "=") (number_literal "0x2c")) (; ";")) (expression_statement "free(pcVar1);" (call_expression "free(pcVar1)" (identifier "free") (argument_list "(pcVar1)" (( "(") (identifier "pcVar1") () ")"))) (; ";")) (} "}")) (else_clause "else {\n    free(pcVar1);\n    iVar3 = FUN_00025be0(param_1,&local_24);\n    if (iVar3 == 7) {\n      if (*local_24 != '5') {\n        strtok(local_24,"\"");\n        pcVar1 = strtok((char *)0x0,"\"");\n        if (pcVar1 != (char *)0x0) {\n          free((void *)*param_2);\n          *param_2 = 0;\n          uVar4 = FUN_00063020(pcVar1);\n          *param_2 = uVar4;\n          free(local_24);\n          goto LAB_00027b48;\n        }\n      }\n      iVar3 = 0xf;\n      free(local_24);\n    }\n  }" (else "else") (compound_statement "{\n    free(pcVar1);\n    iVar3 = FUN_00025be0(param_1,&local_24);\n    if (iVar3 == 7) {\n      if (*local_24 != '5') {\n        strtok(local_24,"\"");\n        pcVar1 = strtok((char *)0x0,"\"");\n        if (pcVar1 != (char *)0x0) {\n          free((void *)*param_2);\n          *param_2 = 0;\n          uVar4 = FUN_00063020(pcVar1);\n          *param_2 = uVar4;\n          free(local_24);\n          goto LAB_00027b48;\n        }\n      }\n      iVar3 = 0xf;\n      free(local_24);\n    }\n  }" ({ "{") (expression_statement "free(pcVar1);" (call_expression "free(pcVar1)" (identifier "free") (argument_list "(pcVar1)" (( "(") (identifier "pcVar1") () ")"))) (; ";")) (expression_statement "iVar3 = FUN_00025be0(param_1,&local_24);" (assignment_expression "iVar3 = FUN_00025be0(param_1,&local_24)" (identifier "iVar3") (= "=") (call_expression "FUN_00025be0(param_1,&local_24)" (identifier "FUN_00025be0") (argument_list "(param_1,&local_24)" (( "(") (identifier "param_1") (, ",") (pointer_expression "&local_24" (& "&") (identifier "local_24")) () ")")))) (; ";")) (if_statement "if (iVar3 == 7) {\n      if (*local_24 != '5') {\n        strtok(local_24,"\"");\n        pcVar1 = strtok((char *)0x0,"\"");\n        if (pcVar1 != (char *)0x0) {\n          free((void *)*param_2);\n          *param_2 = 0;\n          uVar4 = FUN_00063020(pcVar1);\n          *param_2 = uVar4;\n          free(local_24);\n          goto LAB_00027b48;\n        }\n      }\n      iVar3 = 0xf;\n      free(local_24);\n    }" (if "if") (parenthesized_expression "(iVar3 == 7)" (( "(") (binary_expression "iVar3 == 7" (identifier "iVar3") (== "==") (number_literal "7")) () ")")) (compound_statement "{\n      if (*local_24 != '5') {\n        strtok(local_24,"\"");\n        pcVar1 = strtok((char *)0x0,"\"");\n        if (pcVar1 != (char *)0x0) {\n          free((void *)*param_2);\n          *param_2 = 0;\n          uVar4 = FUN_00063020(pcVar1);\n          *param_2 = uVar4;\n          free(local_24);\n          goto LAB_00027b48;\n        }\n      }\n      iVar3 = 0xf;\n      free(local_24);\n    }" ({ "{") (if_statement "if (*local_24 != '5') {\n        strtok(local_24,"\"");\n        pcVar1 = strtok((char *)0x0,"\"");\n        if (pcVar1 != (char *)0x0) {\n          free((void *)*param_2);\n          *param_2 = 0;\n          uVar4 = FUN_00063020(pcVar1);\n          *param_2 = uVar4;\n          free(local_24);\n          goto LAB_00027b48;\n        }\n      }" (if "if") (parenthesized_expression "(*local_24 != '5')" (( "(") (binary_expression "*local_24 != '5'" (pointer_expression "*local_24" (* "*") (identifier "local_24")) (!= "!=") (char_literal "'5'" (' "'") (character "5") (' "'"))) () ")")) (compound_statement "{\n        strtok(local_24,"\"");\n        pcVar1 = strtok((char *)0x0,"\"");\n        if (pcVar1 != (char *)0x0) {\n          free((void *)*param_2);\n          *param_2 = 0;\n          uVar4 = FUN_00063020(pcVar1);\n          *param_2 = uVar4;\n          free(local_24);\n          goto LAB_00027b48;\n        }\n      }" ({ "{") (expression_statement "strtok(local_24,"\"");" (call_expression "strtok(local_24,"\"")" (identifier "strtok") (argument_list "(local_24,"\"")" (( "(") (identifier "local_24") (, ",") (string_literal ""\""" (" """) (escape_sequence "\"") (" """)) () ")"))) (; ";")) (expression_statement "pcVar1 = strtok((char *)0x0,"\"");" (assignment_expression "pcVar1 = strtok((char *)0x0,"\"")" (identifier "pcVar1") (= "=") (call_expression "strtok((char *)0x0,"\"")" (identifier "strtok") (argument_list "((char *)0x0,"\"")" (( "(") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (, ",") (string_literal ""\""" (" """) (escape_sequence "\"") (" """)) () ")")))) (; ";")) (if_statement "if (pcVar1 != (char *)0x0) {\n          free((void *)*param_2);\n          *param_2 = 0;\n          uVar4 = FUN_00063020(pcVar1);\n          *param_2 = uVar4;\n          free(local_24);\n          goto LAB_00027b48;\n        }" (if "if") (parenthesized_expression "(pcVar1 != (char *)0x0)" (( "(") (binary_expression "pcVar1 != (char *)0x0" (identifier "pcVar1") (!= "!=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n          free((void *)*param_2);\n          *param_2 = 0;\n          uVar4 = FUN_00063020(pcVar1);\n          *param_2 = uVar4;\n          free(local_24);\n          goto LAB_00027b48;\n        }" ({ "{") (expression_statement "free((void *)*param_2);" (call_expression "free((void *)*param_2)" (identifier "free") (argument_list "((void *)*param_2)" (( "(") (cast_expression "(void *)*param_2" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) () ")"))) (; ";")) (expression_statement "*param_2 = 0;" (assignment_expression "*param_2 = 0" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar4 = FUN_00063020(pcVar1);" (assignment_expression "uVar4 = FUN_00063020(pcVar1)" (identifier "uVar4") (= "=") (call_expression "FUN_00063020(pcVar1)" (identifier "FUN_00063020") (argument_list "(pcVar1)" (( "(") (identifier "pcVar1") () ")")))) (; ";")) (expression_statement "*param_2 = uVar4;" (assignment_expression "*param_2 = uVar4" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (identifier "uVar4")) (; ";")) (expression_statement "free(local_24);" (call_expression "free(local_24)" (identifier "free") (argument_list "(local_24)" (( "(") (identifier "local_24") () ")"))) (; ";")) (goto_statement "goto LAB_00027b48;" (goto "goto") (statement_identifier "LAB_00027b48") (; ";")) (} "}"))) (} "}"))) (expression_statement "iVar3 = 0xf;" (assignment_expression "iVar3 = 0xf" (identifier "iVar3") (= "=") (number_literal "0xf")) (; ";")) (expression_statement "free(local_24);" (call_expression "free(local_24)" (identifier "free") (argument_list "(local_24)" (( "(") (identifier "local_24") () ")"))) (; ";")) (} "}"))) (} "}")))) (labeled_statement "LAB_00027b48:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }" (statement_identifier "LAB_00027b48") (: ":") (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }" (if "if") (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (== "==") (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 iVar3;\n  }" ({ "{") (return_statement "return iVar3;" (return "return") (identifier "iVar3") (; ";")) (} "}")))) (expression_statement "FUN_0007ad20();" (call_expression "FUN_0007ad20()" (identifier "FUN_0007ad20") (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 **pwd)

{
  char *var_11;
  size_t bufsize;
  int var_5;
  type_1 var_8;
  int var_1;
  char *respline;
  int var_13;
  type_2 uStack_14;
  
  uStack_14 = 0x27a7b;
  var_13 = *(int *)(var_1 + 0x14);
  var_11 = var_2("PWD",(char *)0x0);
  bufsize = var_3(var_11);
  var_5 = var_4(csock,var_11,bufsize,-1.0);
  if (var_5 < 0) {
    var_8 = WRITEFAILED;
    var_6(var_11);
  }
  else {
    var_6(var_11);
    var_8 = var_7(csock,&respline);
    if (var_8 == var_9) {
      if (*respline != '5') {
        var_10(respline,"\"");
        var_11 = var_10((char *)0x0,"\"");
        if (var_11 != (char *)0x0) {
          var_6(*pwd);
          *pwd = (char *)0x0;
          var_11 = var_12(var_11);
          *pwd = var_11;
          var_6(respline);
          goto LAB_00027b48;
        }
      }
      var_8 = FTPSRVERR;
      var_6(respline);
    }
  }
LAB_00027b48:
  if (var_13 == *(int *)(var_1 + 0x14)) {
    return var_8;
  }
                    /* WARNING: Subroutine does not return */
  var_14();
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator 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: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (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 (assignment_expression left: (identifier) right: (number_literal))) (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: (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) (string_literal (escape_sequence))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)) (string_literal (escape_sequence)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (goto_statement label: (statement_identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier))))))))) (labeled_statement label: (statement_identifier) (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,undefined4 *param_2)

{
  char *pcVar1;
  size_t sVar2;
  int iVar3;
  undefined4 uVar4;
  int in_GS_OFFSET;
  char *local_24;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x27a7b;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  pcVar1 = (char *)FUN_000259b0();
  sVar2 = strlen(pcVar1);
  iVar3 = FUN_00019c70(param_1,pcVar1,sVar2,0,0xbff00000);
  if (iVar3 < 0) {
    iVar3 = 0x2c;
    free(pcVar1);
  }
  else {
    free(pcVar1);
    iVar3 = FUN_00025be0(param_1,&local_24);
    if (iVar3 == 7) {
      if (*local_24 != '5') {
        strtok(local_24,"\"");
        pcVar1 = strtok((char *)0x0,"\"");
        if (pcVar1 != (char *)0x0) {
          free((void *)*param_2);
          *param_2 = 0;
          uVar4 = FUN_00063020(pcVar1);
          *param_2 = uVar4;
          free(local_24);
          goto LAB_00027b48;
        }
      }
      iVar3 = 0xf;
      free(local_24);
    }
  }
LAB_00027b48:
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar3;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0007ad20();
}

