
/* WARNING: Function: __x86.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */
/* WARNING: Unknown calling convention */
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

CURLcode Curl_ftpsend(connectdata *conn,char *cmd)

{
  int iVar1;
  protection_level pVar2;
  undefined **ppuVar3;
  size_t sVar4;
  CURLcode CVar5;
  char *ptr;
  size_t len;
  int in_GS_OFFSET;
  ssize_t bytes_written;
  char s [1024];
  
  ppuVar3 = &_GLOBAL_OFFSET_TABLE_;
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  if (cmd == (char *)0x0) {
    CVar5 = CURLE_BAD_FUNCTION_ARGUMENT;
  }
  else {
    sVar4 = strlen(cmd);
    CVar5 = CURLE_BAD_FUNCTION_ARGUMENT;
    if (sVar4 - 1 < 0x3fd) {
      pVar2 = conn->data_prot;
      ptr = s;
      __memcpy_chk(ptr,cmd,sVar4,0x400,ppuVar3);
      len = sVar4 + 2;
      bytes_written = 0;
      (ptr + sVar4)[0] = '\r';
      (ptr + sVar4)[1] = '\n';
      s[sVar4 + 2] = '\0';
      while( true ) {
        conn->data_prot = PROT_CMD;
        CVar5 = Curl_write(conn,conn->sock[0],ptr,len,&bytes_written);
        conn->data_prot = pVar2;
        if (CVar5 != CURLE_OK) break;
        if ((conn->data->set).verbose != false) {
          Curl_debug(conn->data,CURLINFO_HEADER_OUT,ptr,bytes_written);
        }
        if (len == bytes_written) break;
        len = len - bytes_written;
        ptr = ptr + bytes_written;
      }
    }
  }
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return CVar5;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local(ppuVar3);
}



/* WARNING: Function: __i686.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */

int FUN_0002e9e0(int *param_1,char *param_2)

{
  int iVar1;
  undefined **ppuVar2;
  size_t sVar3;
  int iVar4;
  undefined2 *puVar5;
  int iVar6;
  int in_GS_OFFSET;
  int local_424;
  undefined2 local_420;
  undefined1 auStack_41e [1022];
  int local_20;
  
  ppuVar2 = &__DT_PLTGOT;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (param_2 == (char *)0x0) {
    iVar4 = 0x2b;
  }
  else {
    sVar3 = strlen(param_2);
    iVar4 = 0x2b;
    if (sVar3 - 1 < 0x3fd) {
      iVar1 = param_1[0xb3];
      puVar5 = &local_420;
      __memcpy_chk(puVar5,param_2,sVar3,0x400,ppuVar2);
      iVar6 = sVar3 + 2;
      local_424 = 0;
      *(undefined2 *)((int)puVar5 + sVar3) = 0xa0d;
      auStack_41e[sVar3] = 0;
      while( true ) {
        param_1[0xb3] = 5;
        iVar4 = FUN_000278f0(param_1,param_1[100],puVar5,iVar6,&local_424);
        param_1[0xb3] = iVar1;
        if (iVar4 != 0) break;
        if (*(char *)(*param_1 + 0x93c) != '\0') {
          FUN_00027b90(*param_1,2,puVar5,local_424);
        }
        if (iVar6 == local_424) break;
        iVar6 = iVar6 - local_424;
        puVar5 = (undefined2 *)((int)puVar5 + local_424);
      }
    }
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar4;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00082f60(ppuVar2);
}


CALL 0x0001ab87
ADD EAX,0x87dfb
PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
SUB ESP,0x42c
MOV dword ptr [ESP],EAX
MOV EBP,dword ptr [ESP + 0x444]
MOV ESI,dword ptr [ESP + 0x440]
MOV EDX,dword ptr GS:[0x14]
MOV dword ptr [ESP + 0x41c],EDX
XOR EDX,EDX
TEST EBP,EBP
JZ 0x0002eb20
SUB ESP,0xc
MOV EBX,EAX
PUSH EBP
MOV dword ptr [ESP + 0x10],EAX
CALL 0x00018850
ADD ESP,0x10
MOV ECX,0x2b
MOV EDI,EAX
LEA EAX,[EAX + -0x1]
CMP EAX,0x3fc
JA 0x0002eb00
MOV EDX,dword ptr [ESI + 0x2cc]
MOV dword ptr [ESP + 0x4],EDX
PUSH 0x400
PUSH EDI
PUSH EBP
LEA EBP,[ESP + 0x28]
PUSH EBP
MOV EBX,dword ptr [ESP + 0x10]
CALL 0x000199a0
LEA EAX,[EBP + EDI*0x1]
MOV EDX,0xa0d
ADD EDI,0x2
MOV dword ptr [ESP + 0x28],0x0
ADD ESP,0x10
MOV word ptr [EAX],DX
MOV byte ptr [EAX + 0x2],0x0
LEA EAX,[ESP + 0x18]
MOV dword ptr [ESP + 0x8],EAX
JMP 0x0002ea98
CMP EDI,EAX
JZ 0x0002eb00
SUB EDI,EAX
ADD EBP,EAX
MOV dword ptr [ESI + 0x2cc],0x5
SUB ESP,0xc
PUSH dword ptr [ESP + 0x14]
PUSH EDI
PUSH EBP
PUSH dword ptr [ESI + 0x190]
PUSH ESI
MOV EBX,dword ptr [ESP + 0x20]
CALL 0x000278f0
MOV ECX,EAX
MOV EAX,dword ptr [ESP + 0x24]
ADD ESP,0x20
MOV dword ptr [ESI + 0x2cc],EAX
TEST ECX,ECX
JNZ 0x0002eb00
MOV EBX,dword ptr [ESI]
MOV EAX,dword ptr [ESP + 0x18]
CMP byte ptr [EBX + 0x93c],0x0
JZ 0x0002ea90
MOV dword ptr [ESP + 0xc],ECX
PUSH EAX
PUSH EBP
PUSH 0x2
PUSH EBX
MOV EBX,dword ptr [ESP + 0x10]
CALL 0x00027b90
MOV EAX,dword ptr [ESP + 0x28]
ADD ESP,0x10
MOV ECX,dword ptr [ESP + 0xc]
CMP EDI,EAX
JNZ 0x0002ea94
NOP
MOV EDX,dword ptr [ESP + 0x41c]
XOR EDX,dword ptr GS:[0x14]
MOV EAX,ECX
JNZ 0x0002eb27
ADD ESP,0x42c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV ECX,0x2b
JMP 0x0002eb00
CALL 0x00082f60
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */\n\nint FUN_0002e9e0(int *param_1,char *param_2)\n\n{\n  int iVar1;\n  undefined **ppuVar2;\n  size_t sVar3;\n  int iVar4;\n  undefined2 *puVar5;\n  int iVar6;\n  int in_GS_OFFSET;\n  int local_424;\n  undefined2 local_420;\n  undefined1 auStack_41e [1022];\n  int local_20;\n  \n  ppuVar2 = &__DT_PLTGOT;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_2 == (char *)0x0) {\n    iVar4 = 0x2b;\n  }\n  else {\n    sVar3 = strlen(param_2);\n    iVar4 = 0x2b;\n    if (sVar3 - 1 < 0x3fd) {\n      iVar1 = param_1[0xb3];\n      puVar5 = &local_420;\n      __memcpy_chk(puVar5,param_2,sVar3,0x400,ppuVar2);\n      iVar6 = sVar3 + 2;\n      local_424 = 0;\n      *(undefined2 *)((int)puVar5 + sVar3) = 0xa0d;\n      auStack_41e[sVar3] = 0;\n      while( true ) {\n        param_1[0xb3] = 5;\n        iVar4 = FUN_000278f0(param_1,param_1[100],puVar5,iVar6,&local_424);\n        param_1[0xb3] = iVar1;\n        if (iVar4 != 0) break;\n        if (*(char *)(*param_1 + 0x93c) != '\0') {\n          FUN_00027b90(*param_1,2,puVar5,local_424);\n        }\n        if (iVar6 == local_424) break;\n        iVar6 = iVar6 - local_424;\n        puVar5 = (undefined2 *)((int)puVar5 + local_424);\n      }\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00082f60(ppuVar2);\n}\n\n" comment (function_definition "int FUN_0002e9e0(int *param_1,char *param_2)\n\n{\n  int iVar1;\n  undefined **ppuVar2;\n  size_t sVar3;\n  int iVar4;\n  undefined2 *puVar5;\n  int iVar6;\n  int in_GS_OFFSET;\n  int local_424;\n  undefined2 local_420;\n  undefined1 auStack_41e [1022];\n  int local_20;\n  \n  ppuVar2 = &__DT_PLTGOT;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_2 == (char *)0x0) {\n    iVar4 = 0x2b;\n  }\n  else {\n    sVar3 = strlen(param_2);\n    iVar4 = 0x2b;\n    if (sVar3 - 1 < 0x3fd) {\n      iVar1 = param_1[0xb3];\n      puVar5 = &local_420;\n      __memcpy_chk(puVar5,param_2,sVar3,0x400,ppuVar2);\n      iVar6 = sVar3 + 2;\n      local_424 = 0;\n      *(undefined2 *)((int)puVar5 + sVar3) = 0xa0d;\n      auStack_41e[sVar3] = 0;\n      while( true ) {\n        param_1[0xb3] = 5;\n        iVar4 = FUN_000278f0(param_1,param_1[100],puVar5,iVar6,&local_424);\n        param_1[0xb3] = iVar1;\n        if (iVar4 != 0) break;\n        if (*(char *)(*param_1 + 0x93c) != '\0') {\n          FUN_00027b90(*param_1,2,puVar5,local_424);\n        }\n        if (iVar6 == local_424) break;\n        iVar6 = iVar6 - local_424;\n        puVar5 = (undefined2 *)((int)puVar5 + local_424);\n      }\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00082f60(ppuVar2);\n}" primitive_type (function_declarator "FUN_0002e9e0(int *param_1,char *param_2)" identifier (parameter_list "(int *param_1,char *param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  undefined **ppuVar2;\n  size_t sVar3;\n  int iVar4;\n  undefined2 *puVar5;\n  int iVar6;\n  int in_GS_OFFSET;\n  int local_424;\n  undefined2 local_420;\n  undefined1 auStack_41e [1022];\n  int local_20;\n  \n  ppuVar2 = &__DT_PLTGOT;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_2 == (char *)0x0) {\n    iVar4 = 0x2b;\n  }\n  else {\n    sVar3 = strlen(param_2);\n    iVar4 = 0x2b;\n    if (sVar3 - 1 < 0x3fd) {\n      iVar1 = param_1[0xb3];\n      puVar5 = &local_420;\n      __memcpy_chk(puVar5,param_2,sVar3,0x400,ppuVar2);\n      iVar6 = sVar3 + 2;\n      local_424 = 0;\n      *(undefined2 *)((int)puVar5 + sVar3) = 0xa0d;\n      auStack_41e[sVar3] = 0;\n      while( true ) {\n        param_1[0xb3] = 5;\n        iVar4 = FUN_000278f0(param_1,param_1[100],puVar5,iVar6,&local_424);\n        param_1[0xb3] = iVar1;\n        if (iVar4 != 0) break;\n        if (*(char *)(*param_1 + 0x93c) != '\0') {\n          FUN_00027b90(*param_1,2,puVar5,local_424);\n        }\n        if (iVar6 == local_424) break;\n        iVar6 = iVar6 - local_424;\n        puVar5 = (undefined2 *)((int)puVar5 + local_424);\n      }\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00082f60(ppuVar2);\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined **ppuVar2;" type_identifier (pointer_declarator "**ppuVar2" * (pointer_declarator "*ppuVar2" * identifier)) ;) (declaration "size_t sVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "undefined2 *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "int local_424;" primitive_type identifier ;) (declaration "undefined2 local_420;" type_identifier identifier ;) (declaration "undefined1 auStack_41e [1022];" type_identifier (array_declarator "auStack_41e [1022]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (expression_statement "ppuVar2 = &__DT_PLTGOT;" (assignment_expression "ppuVar2 = &__DT_PLTGOT" identifier = (pointer_expression "&__DT_PLTGOT" & identifier)) ;) (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) ))))) ;) (if_statement "if (param_2 == (char *)0x0) {\n    iVar4 = 0x2b;\n  }\n  else {\n    sVar3 = strlen(param_2);\n    iVar4 = 0x2b;\n    if (sVar3 - 1 < 0x3fd) {\n      iVar1 = param_1[0xb3];\n      puVar5 = &local_420;\n      __memcpy_chk(puVar5,param_2,sVar3,0x400,ppuVar2);\n      iVar6 = sVar3 + 2;\n      local_424 = 0;\n      *(undefined2 *)((int)puVar5 + sVar3) = 0xa0d;\n      auStack_41e[sVar3] = 0;\n      while( true ) {\n        param_1[0xb3] = 5;\n        iVar4 = FUN_000278f0(param_1,param_1[100],puVar5,iVar6,&local_424);\n        param_1[0xb3] = iVar1;\n        if (iVar4 != 0) break;\n        if (*(char *)(*param_1 + 0x93c) != '\0') {\n          FUN_00027b90(*param_1,2,puVar5,local_424);\n        }\n        if (iVar6 == local_424) break;\n        iVar6 = iVar6 - local_424;\n        puVar5 = (undefined2 *)((int)puVar5 + local_424);\n      }\n    }\n  }" if (parenthesized_expression "(param_2 == (char *)0x0)" ( (binary_expression "param_2 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar4 = 0x2b;\n  }" { (expression_statement "iVar4 = 0x2b;" (assignment_expression "iVar4 = 0x2b" identifier = number_literal) ;) }) (else_clause "else {\n    sVar3 = strlen(param_2);\n    iVar4 = 0x2b;\n    if (sVar3 - 1 < 0x3fd) {\n      iVar1 = param_1[0xb3];\n      puVar5 = &local_420;\n      __memcpy_chk(puVar5,param_2,sVar3,0x400,ppuVar2);\n      iVar6 = sVar3 + 2;\n      local_424 = 0;\n      *(undefined2 *)((int)puVar5 + sVar3) = 0xa0d;\n      auStack_41e[sVar3] = 0;\n      while( true ) {\n        param_1[0xb3] = 5;\n        iVar4 = FUN_000278f0(param_1,param_1[100],puVar5,iVar6,&local_424);\n        param_1[0xb3] = iVar1;\n        if (iVar4 != 0) break;\n        if (*(char *)(*param_1 + 0x93c) != '\0') {\n          FUN_00027b90(*param_1,2,puVar5,local_424);\n        }\n        if (iVar6 == local_424) break;\n        iVar6 = iVar6 - local_424;\n        puVar5 = (undefined2 *)((int)puVar5 + local_424);\n      }\n    }\n  }" else (compound_statement "{\n    sVar3 = strlen(param_2);\n    iVar4 = 0x2b;\n    if (sVar3 - 1 < 0x3fd) {\n      iVar1 = param_1[0xb3];\n      puVar5 = &local_420;\n      __memcpy_chk(puVar5,param_2,sVar3,0x400,ppuVar2);\n      iVar6 = sVar3 + 2;\n      local_424 = 0;\n      *(undefined2 *)((int)puVar5 + sVar3) = 0xa0d;\n      auStack_41e[sVar3] = 0;\n      while( true ) {\n        param_1[0xb3] = 5;\n        iVar4 = FUN_000278f0(param_1,param_1[100],puVar5,iVar6,&local_424);\n        param_1[0xb3] = iVar1;\n        if (iVar4 != 0) break;\n        if (*(char *)(*param_1 + 0x93c) != '\0') {\n          FUN_00027b90(*param_1,2,puVar5,local_424);\n        }\n        if (iVar6 == local_424) break;\n        iVar6 = iVar6 - local_424;\n        puVar5 = (undefined2 *)((int)puVar5 + local_424);\n      }\n    }\n  }" { (expression_statement "sVar3 = strlen(param_2);" (assignment_expression "sVar3 = strlen(param_2)" identifier = (call_expression "strlen(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (expression_statement "iVar4 = 0x2b;" (assignment_expression "iVar4 = 0x2b" identifier = number_literal) ;) (if_statement "if (sVar3 - 1 < 0x3fd) {\n      iVar1 = param_1[0xb3];\n      puVar5 = &local_420;\n      __memcpy_chk(puVar5,param_2,sVar3,0x400,ppuVar2);\n      iVar6 = sVar3 + 2;\n      local_424 = 0;\n      *(undefined2 *)((int)puVar5 + sVar3) = 0xa0d;\n      auStack_41e[sVar3] = 0;\n      while( true ) {\n        param_1[0xb3] = 5;\n        iVar4 = FUN_000278f0(param_1,param_1[100],puVar5,iVar6,&local_424);\n        param_1[0xb3] = iVar1;\n        if (iVar4 != 0) break;\n        if (*(char *)(*param_1 + 0x93c) != '\0') {\n          FUN_00027b90(*param_1,2,puVar5,local_424);\n        }\n        if (iVar6 == local_424) break;\n        iVar6 = iVar6 - local_424;\n        puVar5 = (undefined2 *)((int)puVar5 + local_424);\n      }\n    }" if (parenthesized_expression "(sVar3 - 1 < 0x3fd)" ( (binary_expression "sVar3 - 1 < 0x3fd" (binary_expression "sVar3 - 1" identifier - number_literal) < number_literal) )) (compound_statement "{\n      iVar1 = param_1[0xb3];\n      puVar5 = &local_420;\n      __memcpy_chk(puVar5,param_2,sVar3,0x400,ppuVar2);\n      iVar6 = sVar3 + 2;\n      local_424 = 0;\n      *(undefined2 *)((int)puVar5 + sVar3) = 0xa0d;\n      auStack_41e[sVar3] = 0;\n      while( true ) {\n        param_1[0xb3] = 5;\n        iVar4 = FUN_000278f0(param_1,param_1[100],puVar5,iVar6,&local_424);\n        param_1[0xb3] = iVar1;\n        if (iVar4 != 0) break;\n        if (*(char *)(*param_1 + 0x93c) != '\0') {\n          FUN_00027b90(*param_1,2,puVar5,local_424);\n        }\n        if (iVar6 == local_424) break;\n        iVar6 = iVar6 - local_424;\n        puVar5 = (undefined2 *)((int)puVar5 + local_424);\n      }\n    }" { (expression_statement "iVar1 = param_1[0xb3];" (assignment_expression "iVar1 = param_1[0xb3]" identifier = (subscript_expression "param_1[0xb3]" identifier [ number_literal ])) ;) (expression_statement "puVar5 = &local_420;" (assignment_expression "puVar5 = &local_420" identifier = (pointer_expression "&local_420" & identifier)) ;) (expression_statement "__memcpy_chk(puVar5,param_2,sVar3,0x400,ppuVar2);" (call_expression "__memcpy_chk(puVar5,param_2,sVar3,0x400,ppuVar2)" identifier (argument_list "(puVar5,param_2,sVar3,0x400,ppuVar2)" ( identifier , identifier , identifier , number_literal , identifier ))) ;) (expression_statement "iVar6 = sVar3 + 2;" (assignment_expression "iVar6 = sVar3 + 2" identifier = (binary_expression "sVar3 + 2" identifier + number_literal)) ;) (expression_statement "local_424 = 0;" (assignment_expression "local_424 = 0" identifier = number_literal) ;) (expression_statement "*(undefined2 *)((int)puVar5 + sVar3) = 0xa0d;" (assignment_expression "*(undefined2 *)((int)puVar5 + sVar3) = 0xa0d" (pointer_expression "*(undefined2 *)((int)puVar5 + sVar3)" * (cast_expression "(undefined2 *)((int)puVar5 + sVar3)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar5 + sVar3)" ( (binary_expression "(int)puVar5 + sVar3" (cast_expression "(int)puVar5" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) = number_literal) ;) (expression_statement "auStack_41e[sVar3] = 0;" (assignment_expression "auStack_41e[sVar3] = 0" (subscript_expression "auStack_41e[sVar3]" identifier [ identifier ]) = number_literal) ;) (while_statement "while( true ) {\n        param_1[0xb3] = 5;\n        iVar4 = FUN_000278f0(param_1,param_1[100],puVar5,iVar6,&local_424);\n        param_1[0xb3] = iVar1;\n        if (iVar4 != 0) break;\n        if (*(char *)(*param_1 + 0x93c) != '\0') {\n          FUN_00027b90(*param_1,2,puVar5,local_424);\n        }\n        if (iVar6 == local_424) break;\n        iVar6 = iVar6 - local_424;\n        puVar5 = (undefined2 *)((int)puVar5 + local_424);\n      }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n        param_1[0xb3] = 5;\n        iVar4 = FUN_000278f0(param_1,param_1[100],puVar5,iVar6,&local_424);\n        param_1[0xb3] = iVar1;\n        if (iVar4 != 0) break;\n        if (*(char *)(*param_1 + 0x93c) != '\0') {\n          FUN_00027b90(*param_1,2,puVar5,local_424);\n        }\n        if (iVar6 == local_424) break;\n        iVar6 = iVar6 - local_424;\n        puVar5 = (undefined2 *)((int)puVar5 + local_424);\n      }" { (expression_statement "param_1[0xb3] = 5;" (assignment_expression "param_1[0xb3] = 5" (subscript_expression "param_1[0xb3]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "iVar4 = FUN_000278f0(param_1,param_1[100],puVar5,iVar6,&local_424);" (assignment_expression "iVar4 = FUN_000278f0(param_1,param_1[100],puVar5,iVar6,&local_424)" identifier = (call_expression "FUN_000278f0(param_1,param_1[100],puVar5,iVar6,&local_424)" identifier (argument_list "(param_1,param_1[100],puVar5,iVar6,&local_424)" ( identifier , (subscript_expression "param_1[100]" identifier [ number_literal ]) , identifier , identifier , (pointer_expression "&local_424" & identifier) )))) ;) (expression_statement "param_1[0xb3] = iVar1;" (assignment_expression "param_1[0xb3] = iVar1" (subscript_expression "param_1[0xb3]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (iVar4 != 0) break;" if (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) (break_statement "break;" break ;)) (if_statement "if (*(char *)(*param_1 + 0x93c) != '\0') {\n          FUN_00027b90(*param_1,2,puVar5,local_424);\n        }" if (parenthesized_expression "(*(char *)(*param_1 + 0x93c) != '\0')" ( (binary_expression "*(char *)(*param_1 + 0x93c) != '\0'" (pointer_expression "*(char *)(*param_1 + 0x93c)" * (cast_expression "(char *)(*param_1 + 0x93c)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 0x93c)" ( (binary_expression "*param_1 + 0x93c" (pointer_expression "*param_1" * identifier) + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n          FUN_00027b90(*param_1,2,puVar5,local_424);\n        }" { (expression_statement "FUN_00027b90(*param_1,2,puVar5,local_424);" (call_expression "FUN_00027b90(*param_1,2,puVar5,local_424)" identifier (argument_list "(*param_1,2,puVar5,local_424)" ( (pointer_expression "*param_1" * identifier) , number_literal , identifier , identifier ))) ;) })) (if_statement "if (iVar6 == local_424) break;" if (parenthesized_expression "(iVar6 == local_424)" ( (binary_expression "iVar6 == local_424" identifier == identifier) )) (break_statement "break;" break ;)) (expression_statement "iVar6 = iVar6 - local_424;" (assignment_expression "iVar6 = iVar6 - local_424" identifier = (binary_expression "iVar6 - local_424" identifier - identifier)) ;) (expression_statement "puVar5 = (undefined2 *)((int)puVar5 + local_424);" (assignment_expression "puVar5 = (undefined2 *)((int)puVar5 + local_424)" identifier = (cast_expression "(undefined2 *)((int)puVar5 + local_424)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar5 + local_424)" ( (binary_expression "(int)puVar5 + local_424" (cast_expression "(int)puVar5" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) })) })) }))) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\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 iVar4;\n  }" { (return_statement "return iVar4;" return identifier ;) })) comment (expression_statement "FUN_00082f60(ppuVar2);" (call_expression "FUN_00082f60(ppuVar2)" identifier (argument_list "(ppuVar2)" ( identifier ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */\n/* WARNING: Unknown calling convention */\n/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nCURLcode Curl_ftpsend(connectdata *conn,char *cmd)\n\n{\n  int iVar1;\n  protection_level pVar2;\n  undefined **ppuVar3;\n  size_t sVar4;\n  CURLcode CVar5;\n  char *ptr;\n  size_t len;\n  int in_GS_OFFSET;\n  ssize_t bytes_written;\n  char s [1024];\n  \n  ppuVar3 = &_GLOBAL_OFFSET_TABLE_;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (cmd == (char *)0x0) {\n    CVar5 = CURLE_BAD_FUNCTION_ARGUMENT;\n  }\n  else {\n    sVar4 = strlen(cmd);\n    CVar5 = CURLE_BAD_FUNCTION_ARGUMENT;\n    if (sVar4 - 1 < 0x3fd) {\n      pVar2 = conn->data_prot;\n      ptr = s;\n      __memcpy_chk(ptr,cmd,sVar4,0x400,ppuVar3);\n      len = sVar4 + 2;\n      bytes_written = 0;\n      (ptr + sVar4)[0] = '\r';\n      (ptr + sVar4)[1] = '\n';\n      s[sVar4 + 2] = '\0';\n      while( true ) {\n        conn->data_prot = PROT_CMD;\n        CVar5 = Curl_write(conn,conn->sock[0],ptr,len,&bytes_written);\n        conn->data_prot = pVar2;\n        if (CVar5 != CURLE_OK) break;\n        if ((conn->data->set).verbose != false) {\n          Curl_debug(conn->data,CURLINFO_HEADER_OUT,ptr,bytes_written);\n        }\n        if (len == bytes_written) break;\n        len = len - bytes_written;\n        ptr = ptr + bytes_written;\n      }\n    }\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return CVar5;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local(ppuVar3);\n}\n\n" comment comment comment (function_definition "CURLcode Curl_ftpsend(connectdata *conn,char *cmd)\n\n{\n  int iVar1;\n  protection_level pVar2;\n  undefined **ppuVar3;\n  size_t sVar4;\n  CURLcode CVar5;\n  char *ptr;\n  size_t len;\n  int in_GS_OFFSET;\n  ssize_t bytes_written;\n  char s [1024];\n  \n  ppuVar3 = &_GLOBAL_OFFSET_TABLE_;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (cmd == (char *)0x0) {\n    CVar5 = CURLE_BAD_FUNCTION_ARGUMENT;\n  }\n  else {\n    sVar4 = strlen(cmd);\n    CVar5 = CURLE_BAD_FUNCTION_ARGUMENT;\n    if (sVar4 - 1 < 0x3fd) {\n      pVar2 = conn->data_prot;\n      ptr = s;\n      __memcpy_chk(ptr,cmd,sVar4,0x400,ppuVar3);\n      len = sVar4 + 2;\n      bytes_written = 0;\n      (ptr + sVar4)[0] = '\r';\n      (ptr + sVar4)[1] = '\n';\n      s[sVar4 + 2] = '\0';\n      while( true ) {\n        conn->data_prot = PROT_CMD;\n        CVar5 = Curl_write(conn,conn->sock[0],ptr,len,&bytes_written);\n        conn->data_prot = pVar2;\n        if (CVar5 != CURLE_OK) break;\n        if ((conn->data->set).verbose != false) {\n          Curl_debug(conn->data,CURLINFO_HEADER_OUT,ptr,bytes_written);\n        }\n        if (len == bytes_written) break;\n        len = len - bytes_written;\n        ptr = ptr + bytes_written;\n      }\n    }\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return CVar5;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local(ppuVar3);\n}" type_identifier (function_declarator "Curl_ftpsend(connectdata *conn,char *cmd)" identifier (parameter_list "(connectdata *conn,char *cmd)" ( (parameter_declaration "connectdata *conn" type_identifier (pointer_declarator "*conn" * identifier)) , (parameter_declaration "char *cmd" primitive_type (pointer_declarator "*cmd" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  protection_level pVar2;\n  undefined **ppuVar3;\n  size_t sVar4;\n  CURLcode CVar5;\n  char *ptr;\n  size_t len;\n  int in_GS_OFFSET;\n  ssize_t bytes_written;\n  char s [1024];\n  \n  ppuVar3 = &_GLOBAL_OFFSET_TABLE_;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (cmd == (char *)0x0) {\n    CVar5 = CURLE_BAD_FUNCTION_ARGUMENT;\n  }\n  else {\n    sVar4 = strlen(cmd);\n    CVar5 = CURLE_BAD_FUNCTION_ARGUMENT;\n    if (sVar4 - 1 < 0x3fd) {\n      pVar2 = conn->data_prot;\n      ptr = s;\n      __memcpy_chk(ptr,cmd,sVar4,0x400,ppuVar3);\n      len = sVar4 + 2;\n      bytes_written = 0;\n      (ptr + sVar4)[0] = '\r';\n      (ptr + sVar4)[1] = '\n';\n      s[sVar4 + 2] = '\0';\n      while( true ) {\n        conn->data_prot = PROT_CMD;\n        CVar5 = Curl_write(conn,conn->sock[0],ptr,len,&bytes_written);\n        conn->data_prot = pVar2;\n        if (CVar5 != CURLE_OK) break;\n        if ((conn->data->set).verbose != false) {\n          Curl_debug(conn->data,CURLINFO_HEADER_OUT,ptr,bytes_written);\n        }\n        if (len == bytes_written) break;\n        len = len - bytes_written;\n        ptr = ptr + bytes_written;\n      }\n    }\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return CVar5;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local(ppuVar3);\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "protection_level pVar2;" type_identifier identifier ;) (declaration "undefined **ppuVar3;" type_identifier (pointer_declarator "**ppuVar3" * (pointer_declarator "*ppuVar3" * identifier)) ;) (declaration "size_t sVar4;" primitive_type identifier ;) (declaration "CURLcode CVar5;" type_identifier identifier ;) (declaration "char *ptr;" primitive_type (pointer_declarator "*ptr" * identifier) ;) (declaration "size_t len;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "ssize_t bytes_written;" primitive_type identifier ;) (declaration "char s [1024];" primitive_type (array_declarator "s [1024]" identifier [ number_literal ]) ;) (expression_statement "ppuVar3 = &_GLOBAL_OFFSET_TABLE_;" (assignment_expression "ppuVar3 = &_GLOBAL_OFFSET_TABLE_" identifier = (pointer_expression "&_GLOBAL_OFFSET_TABLE_" & identifier)) ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(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) ))))) ;) (if_statement "if (cmd == (char *)0x0) {\n    CVar5 = CURLE_BAD_FUNCTION_ARGUMENT;\n  }\n  else {\n    sVar4 = strlen(cmd);\n    CVar5 = CURLE_BAD_FUNCTION_ARGUMENT;\n    if (sVar4 - 1 < 0x3fd) {\n      pVar2 = conn->data_prot;\n      ptr = s;\n      __memcpy_chk(ptr,cmd,sVar4,0x400,ppuVar3);\n      len = sVar4 + 2;\n      bytes_written = 0;\n      (ptr + sVar4)[0] = '\r';\n      (ptr + sVar4)[1] = '\n';\n      s[sVar4 + 2] = '\0';\n      while( true ) {\n        conn->data_prot = PROT_CMD;\n        CVar5 = Curl_write(conn,conn->sock[0],ptr,len,&bytes_written);\n        conn->data_prot = pVar2;\n        if (CVar5 != CURLE_OK) break;\n        if ((conn->data->set).verbose != false) {\n          Curl_debug(conn->data,CURLINFO_HEADER_OUT,ptr,bytes_written);\n        }\n        if (len == bytes_written) break;\n        len = len - bytes_written;\n        ptr = ptr + bytes_written;\n      }\n    }\n  }" if (parenthesized_expression "(cmd == (char *)0x0)" ( (binary_expression "cmd == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    CVar5 = CURLE_BAD_FUNCTION_ARGUMENT;\n  }" { (expression_statement "CVar5 = CURLE_BAD_FUNCTION_ARGUMENT;" (assignment_expression "CVar5 = CURLE_BAD_FUNCTION_ARGUMENT" identifier = identifier) ;) }) (else_clause "else {\n    sVar4 = strlen(cmd);\n    CVar5 = CURLE_BAD_FUNCTION_ARGUMENT;\n    if (sVar4 - 1 < 0x3fd) {\n      pVar2 = conn->data_prot;\n      ptr = s;\n      __memcpy_chk(ptr,cmd,sVar4,0x400,ppuVar3);\n      len = sVar4 + 2;\n      bytes_written = 0;\n      (ptr + sVar4)[0] = '\r';\n      (ptr + sVar4)[1] = '\n';\n      s[sVar4 + 2] = '\0';\n      while( true ) {\n        conn->data_prot = PROT_CMD;\n        CVar5 = Curl_write(conn,conn->sock[0],ptr,len,&bytes_written);\n        conn->data_prot = pVar2;\n        if (CVar5 != CURLE_OK) break;\n        if ((conn->data->set).verbose != false) {\n          Curl_debug(conn->data,CURLINFO_HEADER_OUT,ptr,bytes_written);\n        }\n        if (len == bytes_written) break;\n        len = len - bytes_written;\n        ptr = ptr + bytes_written;\n      }\n    }\n  }" else (compound_statement "{\n    sVar4 = strlen(cmd);\n    CVar5 = CURLE_BAD_FUNCTION_ARGUMENT;\n    if (sVar4 - 1 < 0x3fd) {\n      pVar2 = conn->data_prot;\n      ptr = s;\n      __memcpy_chk(ptr,cmd,sVar4,0x400,ppuVar3);\n      len = sVar4 + 2;\n      bytes_written = 0;\n      (ptr + sVar4)[0] = '\r';\n      (ptr + sVar4)[1] = '\n';\n      s[sVar4 + 2] = '\0';\n      while( true ) {\n        conn->data_prot = PROT_CMD;\n        CVar5 = Curl_write(conn,conn->sock[0],ptr,len,&bytes_written);\n        conn->data_prot = pVar2;\n        if (CVar5 != CURLE_OK) break;\n        if ((conn->data->set).verbose != false) {\n          Curl_debug(conn->data,CURLINFO_HEADER_OUT,ptr,bytes_written);\n        }\n        if (len == bytes_written) break;\n        len = len - bytes_written;\n        ptr = ptr + bytes_written;\n      }\n    }\n  }" { (expression_statement "sVar4 = strlen(cmd);" (assignment_expression "sVar4 = strlen(cmd)" identifier = (call_expression "strlen(cmd)" identifier (argument_list "(cmd)" ( identifier )))) ;) (expression_statement "CVar5 = CURLE_BAD_FUNCTION_ARGUMENT;" (assignment_expression "CVar5 = CURLE_BAD_FUNCTION_ARGUMENT" identifier = identifier) ;) (if_statement "if (sVar4 - 1 < 0x3fd) {\n      pVar2 = conn->data_prot;\n      ptr = s;\n      __memcpy_chk(ptr,cmd,sVar4,0x400,ppuVar3);\n      len = sVar4 + 2;\n      bytes_written = 0;\n      (ptr + sVar4)[0] = '\r';\n      (ptr + sVar4)[1] = '\n';\n      s[sVar4 + 2] = '\0';\n      while( true ) {\n        conn->data_prot = PROT_CMD;\n        CVar5 = Curl_write(conn,conn->sock[0],ptr,len,&bytes_written);\n        conn->data_prot = pVar2;\n        if (CVar5 != CURLE_OK) break;\n        if ((conn->data->set).verbose != false) {\n          Curl_debug(conn->data,CURLINFO_HEADER_OUT,ptr,bytes_written);\n        }\n        if (len == bytes_written) break;\n        len = len - bytes_written;\n        ptr = ptr + bytes_written;\n      }\n    }" if (parenthesized_expression "(sVar4 - 1 < 0x3fd)" ( (binary_expression "sVar4 - 1 < 0x3fd" (binary_expression "sVar4 - 1" identifier - number_literal) < number_literal) )) (compound_statement "{\n      pVar2 = conn->data_prot;\n      ptr = s;\n      __memcpy_chk(ptr,cmd,sVar4,0x400,ppuVar3);\n      len = sVar4 + 2;\n      bytes_written = 0;\n      (ptr + sVar4)[0] = '\r';\n      (ptr + sVar4)[1] = '\n';\n      s[sVar4 + 2] = '\0';\n      while( true ) {\n        conn->data_prot = PROT_CMD;\n        CVar5 = Curl_write(conn,conn->sock[0],ptr,len,&bytes_written);\n        conn->data_prot = pVar2;\n        if (CVar5 != CURLE_OK) break;\n        if ((conn->data->set).verbose != false) {\n          Curl_debug(conn->data,CURLINFO_HEADER_OUT,ptr,bytes_written);\n        }\n        if (len == bytes_written) break;\n        len = len - bytes_written;\n        ptr = ptr + bytes_written;\n      }\n    }" { (expression_statement "pVar2 = conn->data_prot;" (assignment_expression "pVar2 = conn->data_prot" identifier = (field_expression "conn->data_prot" identifier -> field_identifier)) ;) (expression_statement "ptr = s;" (assignment_expression "ptr = s" identifier = identifier) ;) (expression_statement "__memcpy_chk(ptr,cmd,sVar4,0x400,ppuVar3);" (call_expression "__memcpy_chk(ptr,cmd,sVar4,0x400,ppuVar3)" identifier (argument_list "(ptr,cmd,sVar4,0x400,ppuVar3)" ( identifier , identifier , identifier , number_literal , identifier ))) ;) (expression_statement "len = sVar4 + 2;" (assignment_expression "len = sVar4 + 2" identifier = (binary_expression "sVar4 + 2" identifier + number_literal)) ;) (expression_statement "bytes_written = 0;" (assignment_expression "bytes_written = 0" identifier = number_literal) ;) (expression_statement "(ptr + sVar4)[0] = '\r';" (assignment_expression "(ptr + sVar4)[0] = '\r'" (subscript_expression "(ptr + sVar4)[0]" (parenthesized_expression "(ptr + sVar4)" ( (binary_expression "ptr + sVar4" identifier + identifier) )) [ number_literal ]) = (char_literal "'\r'" ' escape_sequence ')) ;) (expression_statement "(ptr + sVar4)[1] = '\n';" (assignment_expression "(ptr + sVar4)[1] = '\n'" (subscript_expression "(ptr + sVar4)[1]" (parenthesized_expression "(ptr + sVar4)" ( (binary_expression "ptr + sVar4" identifier + identifier) )) [ number_literal ]) = (char_literal "'\n'" ' escape_sequence ')) ;) (expression_statement "s[sVar4 + 2] = '\0';" (assignment_expression "s[sVar4 + 2] = '\0'" (subscript_expression "s[sVar4 + 2]" identifier [ (binary_expression "sVar4 + 2" identifier + number_literal) ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (while_statement "while( true ) {\n        conn->data_prot = PROT_CMD;\n        CVar5 = Curl_write(conn,conn->sock[0],ptr,len,&bytes_written);\n        conn->data_prot = pVar2;\n        if (CVar5 != CURLE_OK) break;\n        if ((conn->data->set).verbose != false) {\n          Curl_debug(conn->data,CURLINFO_HEADER_OUT,ptr,bytes_written);\n        }\n        if (len == bytes_written) break;\n        len = len - bytes_written;\n        ptr = ptr + bytes_written;\n      }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n        conn->data_prot = PROT_CMD;\n        CVar5 = Curl_write(conn,conn->sock[0],ptr,len,&bytes_written);\n        conn->data_prot = pVar2;\n        if (CVar5 != CURLE_OK) break;\n        if ((conn->data->set).verbose != false) {\n          Curl_debug(conn->data,CURLINFO_HEADER_OUT,ptr,bytes_written);\n        }\n        if (len == bytes_written) break;\n        len = len - bytes_written;\n        ptr = ptr + bytes_written;\n      }" { (expression_statement "conn->data_prot = PROT_CMD;" (assignment_expression "conn->data_prot = PROT_CMD" (field_expression "conn->data_prot" identifier -> field_identifier) = identifier) ;) (expression_statement "CVar5 = Curl_write(conn,conn->sock[0],ptr,len,&bytes_written);" (assignment_expression "CVar5 = Curl_write(conn,conn->sock[0],ptr,len,&bytes_written)" identifier = (call_expression "Curl_write(conn,conn->sock[0],ptr,len,&bytes_written)" identifier (argument_list "(conn,conn->sock[0],ptr,len,&bytes_written)" ( identifier , (subscript_expression "conn->sock[0]" (field_expression "conn->sock" identifier -> field_identifier) [ number_literal ]) , identifier , identifier , (pointer_expression "&bytes_written" & identifier) )))) ;) (expression_statement "conn->data_prot = pVar2;" (assignment_expression "conn->data_prot = pVar2" (field_expression "conn->data_prot" identifier -> field_identifier) = identifier) ;) (if_statement "if (CVar5 != CURLE_OK) break;" if (parenthesized_expression "(CVar5 != CURLE_OK)" ( (binary_expression "CVar5 != CURLE_OK" identifier != identifier) )) (break_statement "break;" break ;)) (if_statement "if ((conn->data->set).verbose != false) {\n          Curl_debug(conn->data,CURLINFO_HEADER_OUT,ptr,bytes_written);\n        }" if (parenthesized_expression "((conn->data->set).verbose != false)" ( (binary_expression "(conn->data->set).verbose != false" (field_expression "(conn->data->set).verbose" (parenthesized_expression "(conn->data->set)" ( (field_expression "conn->data->set" (field_expression "conn->data" identifier -> field_identifier) -> field_identifier) )) . field_identifier) != false) )) (compound_statement "{\n          Curl_debug(conn->data,CURLINFO_HEADER_OUT,ptr,bytes_written);\n        }" { (expression_statement "Curl_debug(conn->data,CURLINFO_HEADER_OUT,ptr,bytes_written);" (call_expression "Curl_debug(conn->data,CURLINFO_HEADER_OUT,ptr,bytes_written)" identifier (argument_list "(conn->data,CURLINFO_HEADER_OUT,ptr,bytes_written)" ( (field_expression "conn->data" identifier -> field_identifier) , identifier , identifier , identifier ))) ;) })) (if_statement "if (len == bytes_written) break;" if (parenthesized_expression "(len == bytes_written)" ( (binary_expression "len == bytes_written" identifier == identifier) )) (break_statement "break;" break ;)) (expression_statement "len = len - bytes_written;" (assignment_expression "len = len - bytes_written" identifier = (binary_expression "len - bytes_written" identifier - identifier)) ;) (expression_statement "ptr = ptr + bytes_written;" (assignment_expression "ptr = ptr + bytes_written" identifier = (binary_expression "ptr + bytes_written" identifier + identifier)) ;) })) })) }))) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return CVar5;\n  }" if (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 == *(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 CVar5;\n  }" { (return_statement "return CVar5;" return identifier ;) })) comment (expression_statement "__stack_chk_fail_local(ppuVar3);" (call_expression "__stack_chk_fail_local(ppuVar3)" identifier (argument_list "(ppuVar3)" ( identifier ))) ;) })))
(translation_unit "int FUN_0002e9e0(int *param_1,char *param_2)\n\n{\n  int iVar1;\n  undefined **ppuVar2;\n  size_t sVar3;\n  int iVar4;\n  undefined2 *puVar5;\n  int iVar6;\n  int in_GS_OFFSET;\n  int local_424;\n  undefined2 local_420;\n  undefined1 auStack_41e [1022];\n  int local_20;\n  \n  ppuVar2 = &__DT_PLTGOT;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_2 == (char *)0x0) {\n    iVar4 = 0x2b;\n  }\n  else {\n    sVar3 = strlen(param_2);\n    iVar4 = 0x2b;\n    if (sVar3 - 1 < 0x3fd) {\n      iVar1 = param_1[0xb3];\n      puVar5 = &local_420;\n      __memcpy_chk(puVar5,param_2,sVar3,0x400,ppuVar2);\n      iVar6 = sVar3 + 2;\n      local_424 = 0;\n      *(undefined2 *)((int)puVar5 + sVar3) = 0xa0d;\n      auStack_41e[sVar3] = 0;\n      while( true ) {\n        param_1[0xb3] = 5;\n        iVar4 = FUN_000278f0(param_1,param_1[100],puVar5,iVar6,&local_424);\n        param_1[0xb3] = iVar1;\n        if (iVar4 != 0) break;\n        if (*(char *)(*param_1 + 0x93c) != '\0') {\n          FUN_00027b90(*param_1,2,puVar5,local_424);\n        }\n        if (iVar6 == local_424) break;\n        iVar6 = iVar6 - local_424;\n        puVar5 = (undefined2 *)((int)puVar5 + local_424);\n      }\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }\n                    \n  FUN_00082f60(ppuVar2);\n}\n\n" (function_definition "int FUN_0002e9e0(int *param_1,char *param_2)\n\n{\n  int iVar1;\n  undefined **ppuVar2;\n  size_t sVar3;\n  int iVar4;\n  undefined2 *puVar5;\n  int iVar6;\n  int in_GS_OFFSET;\n  int local_424;\n  undefined2 local_420;\n  undefined1 auStack_41e [1022];\n  int local_20;\n  \n  ppuVar2 = &__DT_PLTGOT;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_2 == (char *)0x0) {\n    iVar4 = 0x2b;\n  }\n  else {\n    sVar3 = strlen(param_2);\n    iVar4 = 0x2b;\n    if (sVar3 - 1 < 0x3fd) {\n      iVar1 = param_1[0xb3];\n      puVar5 = &local_420;\n      __memcpy_chk(puVar5,param_2,sVar3,0x400,ppuVar2);\n      iVar6 = sVar3 + 2;\n      local_424 = 0;\n      *(undefined2 *)((int)puVar5 + sVar3) = 0xa0d;\n      auStack_41e[sVar3] = 0;\n      while( true ) {\n        param_1[0xb3] = 5;\n        iVar4 = FUN_000278f0(param_1,param_1[100],puVar5,iVar6,&local_424);\n        param_1[0xb3] = iVar1;\n        if (iVar4 != 0) break;\n        if (*(char *)(*param_1 + 0x93c) != '\0') {\n          FUN_00027b90(*param_1,2,puVar5,local_424);\n        }\n        if (iVar6 == local_424) break;\n        iVar6 = iVar6 - local_424;\n        puVar5 = (undefined2 *)((int)puVar5 + local_424);\n      }\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }\n                    \n  FUN_00082f60(ppuVar2);\n}" primitive_type (function_declarator "FUN_0002e9e0(int *param_1,char *param_2)" identifier (parameter_list "(int *param_1,char *param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  undefined **ppuVar2;\n  size_t sVar3;\n  int iVar4;\n  undefined2 *puVar5;\n  int iVar6;\n  int in_GS_OFFSET;\n  int local_424;\n  undefined2 local_420;\n  undefined1 auStack_41e [1022];\n  int local_20;\n  \n  ppuVar2 = &__DT_PLTGOT;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_2 == (char *)0x0) {\n    iVar4 = 0x2b;\n  }\n  else {\n    sVar3 = strlen(param_2);\n    iVar4 = 0x2b;\n    if (sVar3 - 1 < 0x3fd) {\n      iVar1 = param_1[0xb3];\n      puVar5 = &local_420;\n      __memcpy_chk(puVar5,param_2,sVar3,0x400,ppuVar2);\n      iVar6 = sVar3 + 2;\n      local_424 = 0;\n      *(undefined2 *)((int)puVar5 + sVar3) = 0xa0d;\n      auStack_41e[sVar3] = 0;\n      while( true ) {\n        param_1[0xb3] = 5;\n        iVar4 = FUN_000278f0(param_1,param_1[100],puVar5,iVar6,&local_424);\n        param_1[0xb3] = iVar1;\n        if (iVar4 != 0) break;\n        if (*(char *)(*param_1 + 0x93c) != '\0') {\n          FUN_00027b90(*param_1,2,puVar5,local_424);\n        }\n        if (iVar6 == local_424) break;\n        iVar6 = iVar6 - local_424;\n        puVar5 = (undefined2 *)((int)puVar5 + local_424);\n      }\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }\n                    \n  FUN_00082f60(ppuVar2);\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined **ppuVar2;" type_identifier (pointer_declarator "**ppuVar2" * (pointer_declarator "*ppuVar2" * identifier)) ;) (declaration "size_t sVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "undefined2 *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "int local_424;" primitive_type identifier ;) (declaration "undefined2 local_420;" type_identifier identifier ;) (declaration "undefined1 auStack_41e [1022];" type_identifier (array_declarator "auStack_41e [1022]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (expression_statement "ppuVar2 = &__DT_PLTGOT;" (assignment_expression "ppuVar2 = &__DT_PLTGOT" identifier = (pointer_expression "&__DT_PLTGOT" & identifier)) ;) (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) ))))) ;) (if_statement "if (param_2 == (char *)0x0) {\n    iVar4 = 0x2b;\n  }\n  else {\n    sVar3 = strlen(param_2);\n    iVar4 = 0x2b;\n    if (sVar3 - 1 < 0x3fd) {\n      iVar1 = param_1[0xb3];\n      puVar5 = &local_420;\n      __memcpy_chk(puVar5,param_2,sVar3,0x400,ppuVar2);\n      iVar6 = sVar3 + 2;\n      local_424 = 0;\n      *(undefined2 *)((int)puVar5 + sVar3) = 0xa0d;\n      auStack_41e[sVar3] = 0;\n      while( true ) {\n        param_1[0xb3] = 5;\n        iVar4 = FUN_000278f0(param_1,param_1[100],puVar5,iVar6,&local_424);\n        param_1[0xb3] = iVar1;\n        if (iVar4 != 0) break;\n        if (*(char *)(*param_1 + 0x93c) != '\0') {\n          FUN_00027b90(*param_1,2,puVar5,local_424);\n        }\n        if (iVar6 == local_424) break;\n        iVar6 = iVar6 - local_424;\n        puVar5 = (undefined2 *)((int)puVar5 + local_424);\n      }\n    }\n  }" if (parenthesized_expression "(param_2 == (char *)0x0)" ( (binary_expression "param_2 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar4 = 0x2b;\n  }" { (expression_statement "iVar4 = 0x2b;" (assignment_expression "iVar4 = 0x2b" identifier = number_literal) ;) }) (else_clause "else {\n    sVar3 = strlen(param_2);\n    iVar4 = 0x2b;\n    if (sVar3 - 1 < 0x3fd) {\n      iVar1 = param_1[0xb3];\n      puVar5 = &local_420;\n      __memcpy_chk(puVar5,param_2,sVar3,0x400,ppuVar2);\n      iVar6 = sVar3 + 2;\n      local_424 = 0;\n      *(undefined2 *)((int)puVar5 + sVar3) = 0xa0d;\n      auStack_41e[sVar3] = 0;\n      while( true ) {\n        param_1[0xb3] = 5;\n        iVar4 = FUN_000278f0(param_1,param_1[100],puVar5,iVar6,&local_424);\n        param_1[0xb3] = iVar1;\n        if (iVar4 != 0) break;\n        if (*(char *)(*param_1 + 0x93c) != '\0') {\n          FUN_00027b90(*param_1,2,puVar5,local_424);\n        }\n        if (iVar6 == local_424) break;\n        iVar6 = iVar6 - local_424;\n        puVar5 = (undefined2 *)((int)puVar5 + local_424);\n      }\n    }\n  }" else (compound_statement "{\n    sVar3 = strlen(param_2);\n    iVar4 = 0x2b;\n    if (sVar3 - 1 < 0x3fd) {\n      iVar1 = param_1[0xb3];\n      puVar5 = &local_420;\n      __memcpy_chk(puVar5,param_2,sVar3,0x400,ppuVar2);\n      iVar6 = sVar3 + 2;\n      local_424 = 0;\n      *(undefined2 *)((int)puVar5 + sVar3) = 0xa0d;\n      auStack_41e[sVar3] = 0;\n      while( true ) {\n        param_1[0xb3] = 5;\n        iVar4 = FUN_000278f0(param_1,param_1[100],puVar5,iVar6,&local_424);\n        param_1[0xb3] = iVar1;\n        if (iVar4 != 0) break;\n        if (*(char *)(*param_1 + 0x93c) != '\0') {\n          FUN_00027b90(*param_1,2,puVar5,local_424);\n        }\n        if (iVar6 == local_424) break;\n        iVar6 = iVar6 - local_424;\n        puVar5 = (undefined2 *)((int)puVar5 + local_424);\n      }\n    }\n  }" { (expression_statement "sVar3 = strlen(param_2);" (assignment_expression "sVar3 = strlen(param_2)" identifier = (call_expression "strlen(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (expression_statement "iVar4 = 0x2b;" (assignment_expression "iVar4 = 0x2b" identifier = number_literal) ;) (if_statement "if (sVar3 - 1 < 0x3fd) {\n      iVar1 = param_1[0xb3];\n      puVar5 = &local_420;\n      __memcpy_chk(puVar5,param_2,sVar3,0x400,ppuVar2);\n      iVar6 = sVar3 + 2;\n      local_424 = 0;\n      *(undefined2 *)((int)puVar5 + sVar3) = 0xa0d;\n      auStack_41e[sVar3] = 0;\n      while( true ) {\n        param_1[0xb3] = 5;\n        iVar4 = FUN_000278f0(param_1,param_1[100],puVar5,iVar6,&local_424);\n        param_1[0xb3] = iVar1;\n        if (iVar4 != 0) break;\n        if (*(char *)(*param_1 + 0x93c) != '\0') {\n          FUN_00027b90(*param_1,2,puVar5,local_424);\n        }\n        if (iVar6 == local_424) break;\n        iVar6 = iVar6 - local_424;\n        puVar5 = (undefined2 *)((int)puVar5 + local_424);\n      }\n    }" if (parenthesized_expression "(sVar3 - 1 < 0x3fd)" ( (binary_expression "sVar3 - 1 < 0x3fd" (binary_expression "sVar3 - 1" identifier - number_literal) < number_literal) )) (compound_statement "{\n      iVar1 = param_1[0xb3];\n      puVar5 = &local_420;\n      __memcpy_chk(puVar5,param_2,sVar3,0x400,ppuVar2);\n      iVar6 = sVar3 + 2;\n      local_424 = 0;\n      *(undefined2 *)((int)puVar5 + sVar3) = 0xa0d;\n      auStack_41e[sVar3] = 0;\n      while( true ) {\n        param_1[0xb3] = 5;\n        iVar4 = FUN_000278f0(param_1,param_1[100],puVar5,iVar6,&local_424);\n        param_1[0xb3] = iVar1;\n        if (iVar4 != 0) break;\n        if (*(char *)(*param_1 + 0x93c) != '\0') {\n          FUN_00027b90(*param_1,2,puVar5,local_424);\n        }\n        if (iVar6 == local_424) break;\n        iVar6 = iVar6 - local_424;\n        puVar5 = (undefined2 *)((int)puVar5 + local_424);\n      }\n    }" { (expression_statement "iVar1 = param_1[0xb3];" (assignment_expression "iVar1 = param_1[0xb3]" identifier = (subscript_expression "param_1[0xb3]" identifier [ number_literal ])) ;) (expression_statement "puVar5 = &local_420;" (assignment_expression "puVar5 = &local_420" identifier = (pointer_expression "&local_420" & identifier)) ;) (expression_statement "__memcpy_chk(puVar5,param_2,sVar3,0x400,ppuVar2);" (call_expression "__memcpy_chk(puVar5,param_2,sVar3,0x400,ppuVar2)" identifier (argument_list "(puVar5,param_2,sVar3,0x400,ppuVar2)" ( identifier , identifier , identifier , number_literal , identifier ))) ;) (expression_statement "iVar6 = sVar3 + 2;" (assignment_expression "iVar6 = sVar3 + 2" identifier = (binary_expression "sVar3 + 2" identifier + number_literal)) ;) (expression_statement "local_424 = 0;" (assignment_expression "local_424 = 0" identifier = number_literal) ;) (expression_statement "*(undefined2 *)((int)puVar5 + sVar3) = 0xa0d;" (assignment_expression "*(undefined2 *)((int)puVar5 + sVar3) = 0xa0d" (pointer_expression "*(undefined2 *)((int)puVar5 + sVar3)" * (cast_expression "(undefined2 *)((int)puVar5 + sVar3)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar5 + sVar3)" ( (binary_expression "(int)puVar5 + sVar3" (cast_expression "(int)puVar5" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) = number_literal) ;) (expression_statement "auStack_41e[sVar3] = 0;" (assignment_expression "auStack_41e[sVar3] = 0" (subscript_expression "auStack_41e[sVar3]" identifier [ identifier ]) = number_literal) ;) (while_statement "while( true ) {\n        param_1[0xb3] = 5;\n        iVar4 = FUN_000278f0(param_1,param_1[100],puVar5,iVar6,&local_424);\n        param_1[0xb3] = iVar1;\n        if (iVar4 != 0) break;\n        if (*(char *)(*param_1 + 0x93c) != '\0') {\n          FUN_00027b90(*param_1,2,puVar5,local_424);\n        }\n        if (iVar6 == local_424) break;\n        iVar6 = iVar6 - local_424;\n        puVar5 = (undefined2 *)((int)puVar5 + local_424);\n      }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n        param_1[0xb3] = 5;\n        iVar4 = FUN_000278f0(param_1,param_1[100],puVar5,iVar6,&local_424);\n        param_1[0xb3] = iVar1;\n        if (iVar4 != 0) break;\n        if (*(char *)(*param_1 + 0x93c) != '\0') {\n          FUN_00027b90(*param_1,2,puVar5,local_424);\n        }\n        if (iVar6 == local_424) break;\n        iVar6 = iVar6 - local_424;\n        puVar5 = (undefined2 *)((int)puVar5 + local_424);\n      }" { (expression_statement "param_1[0xb3] = 5;" (assignment_expression "param_1[0xb3] = 5" (subscript_expression "param_1[0xb3]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "iVar4 = FUN_000278f0(param_1,param_1[100],puVar5,iVar6,&local_424);" (assignment_expression "iVar4 = FUN_000278f0(param_1,param_1[100],puVar5,iVar6,&local_424)" identifier = (call_expression "FUN_000278f0(param_1,param_1[100],puVar5,iVar6,&local_424)" identifier (argument_list "(param_1,param_1[100],puVar5,iVar6,&local_424)" ( identifier , (subscript_expression "param_1[100]" identifier [ number_literal ]) , identifier , identifier , (pointer_expression "&local_424" & identifier) )))) ;) (expression_statement "param_1[0xb3] = iVar1;" (assignment_expression "param_1[0xb3] = iVar1" (subscript_expression "param_1[0xb3]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (iVar4 != 0) break;" if (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) (break_statement "break;" break ;)) (if_statement "if (*(char *)(*param_1 + 0x93c) != '\0') {\n          FUN_00027b90(*param_1,2,puVar5,local_424);\n        }" if (parenthesized_expression "(*(char *)(*param_1 + 0x93c) != '\0')" ( (binary_expression "*(char *)(*param_1 + 0x93c) != '\0'" (pointer_expression "*(char *)(*param_1 + 0x93c)" * (cast_expression "(char *)(*param_1 + 0x93c)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 0x93c)" ( (binary_expression "*param_1 + 0x93c" (pointer_expression "*param_1" * identifier) + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n          FUN_00027b90(*param_1,2,puVar5,local_424);\n        }" { (expression_statement "FUN_00027b90(*param_1,2,puVar5,local_424);" (call_expression "FUN_00027b90(*param_1,2,puVar5,local_424)" identifier (argument_list "(*param_1,2,puVar5,local_424)" ( (pointer_expression "*param_1" * identifier) , number_literal , identifier , identifier ))) ;) })) (if_statement "if (iVar6 == local_424) break;" if (parenthesized_expression "(iVar6 == local_424)" ( (binary_expression "iVar6 == local_424" identifier == identifier) )) (break_statement "break;" break ;)) (expression_statement "iVar6 = iVar6 - local_424;" (assignment_expression "iVar6 = iVar6 - local_424" identifier = (binary_expression "iVar6 - local_424" identifier - identifier)) ;) (expression_statement "puVar5 = (undefined2 *)((int)puVar5 + local_424);" (assignment_expression "puVar5 = (undefined2 *)((int)puVar5 + local_424)" identifier = (cast_expression "(undefined2 *)((int)puVar5 + local_424)" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar5 + local_424)" ( (binary_expression "(int)puVar5 + local_424" (cast_expression "(int)puVar5" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) })) })) }))) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\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 iVar4;\n  }" { (return_statement "return iVar4;" return identifier ;) })) (expression_statement "FUN_00082f60(ppuVar2);" (call_expression "FUN_00082f60(ppuVar2)" identifier (argument_list "(ppuVar2)" ( identifier ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * (pointer_declarator * IDENT)) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT - LIT) < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , LIT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + IDENT) )))) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = LIT) ;) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (subscript_expression IDENT [ LIT ]) , IDENT , IDENT , (pointer_expression & IDENT) )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (break_statement break ;)) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) != (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * IDENT) , LIT , IDENT , IDENT ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + IDENT) )))) ;) })) })) }))) (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 ( IDENT ))) ;) })))
(function_definition "int FUN_0002e9e0(int *param_1,char *param_2)\n\n{\n  int iVar1;\n  undefined **ppuVar2;\n  size_t sVar3;\n  int iVar4;\n  undefined2 *puVar5;\n  int iVar6;\n  int in_GS_OFFSET;\n  int local_424;\n  undefined2 local_420;\n  undefined1 auStack_41e [1022];\n  int local_20;\n  \n  ppuVar2 = &__DT_PLTGOT;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_2 == (char *)0x0) {\n    iVar4 = 0x2b;\n  }\n  else {\n    sVar3 = strlen(param_2);\n    iVar4 = 0x2b;\n    if (sVar3 - 1 < 0x3fd) {\n      iVar1 = param_1[0xb3];\n      puVar5 = &local_420;\n      __memcpy_chk(puVar5,param_2,sVar3,0x400,ppuVar2);\n      iVar6 = sVar3 + 2;\n      local_424 = 0;\n      *(undefined2 *)((int)puVar5 + sVar3) = 0xa0d;\n      auStack_41e[sVar3] = 0;\n      while( true ) {\n        param_1[0xb3] = 5;\n        iVar4 = FUN_000278f0(param_1,param_1[100],puVar5,iVar6,&local_424);\n        param_1[0xb3] = iVar1;\n        if (iVar4 != 0) break;\n        if (*(char *)(*param_1 + 0x93c) != '\0') {\n          FUN_00027b90(*param_1,2,puVar5,local_424);\n        }\n        if (iVar6 == local_424) break;\n        iVar6 = iVar6 - local_424;\n        puVar5 = (undefined2 *)((int)puVar5 + local_424);\n      }\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }\n                    \n  FUN_00082f60(ppuVar2);\n}" (primitive_type "int") (function_declarator "FUN_0002e9e0(int *param_1,char *param_2)" (identifier "FUN_0002e9e0") (parameter_list "(int *param_1,char *param_2)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "char *param_2" (primitive_type "char") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined **ppuVar2;\n  size_t sVar3;\n  int iVar4;\n  undefined2 *puVar5;\n  int iVar6;\n  int in_GS_OFFSET;\n  int local_424;\n  undefined2 local_420;\n  undefined1 auStack_41e [1022];\n  int local_20;\n  \n  ppuVar2 = &__DT_PLTGOT;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_2 == (char *)0x0) {\n    iVar4 = 0x2b;\n  }\n  else {\n    sVar3 = strlen(param_2);\n    iVar4 = 0x2b;\n    if (sVar3 - 1 < 0x3fd) {\n      iVar1 = param_1[0xb3];\n      puVar5 = &local_420;\n      __memcpy_chk(puVar5,param_2,sVar3,0x400,ppuVar2);\n      iVar6 = sVar3 + 2;\n      local_424 = 0;\n      *(undefined2 *)((int)puVar5 + sVar3) = 0xa0d;\n      auStack_41e[sVar3] = 0;\n      while( true ) {\n        param_1[0xb3] = 5;\n        iVar4 = FUN_000278f0(param_1,param_1[100],puVar5,iVar6,&local_424);\n        param_1[0xb3] = iVar1;\n        if (iVar4 != 0) break;\n        if (*(char *)(*param_1 + 0x93c) != '\0') {\n          FUN_00027b90(*param_1,2,puVar5,local_424);\n        }\n        if (iVar6 == local_424) break;\n        iVar6 = iVar6 - local_424;\n        puVar5 = (undefined2 *)((int)puVar5 + local_424);\n      }\n    }\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }\n                    \n  FUN_00082f60(ppuVar2);\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined **ppuVar2;" (type_identifier "undefined") (pointer_declarator "**ppuVar2" (* "*") (pointer_declarator "*ppuVar2" (* "*") (identifier "ppuVar2"))) (; ";")) (declaration "size_t sVar3;" (primitive_type "size_t") (identifier "sVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "undefined2 *puVar5;" (type_identifier "undefined2") (pointer_declarator "*puVar5" (* "*") (identifier "puVar5")) (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "int local_424;" (primitive_type "int") (identifier "local_424") (; ";")) (declaration "undefined2 local_420;" (type_identifier "undefined2") (identifier "local_420") (; ";")) (declaration "undefined1 auStack_41e [1022];" (type_identifier "undefined1") (array_declarator "auStack_41e [1022]" (identifier "auStack_41e") ([ "[") (number_literal "1022") (] "]")) (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (expression_statement "ppuVar2 = &__DT_PLTGOT;" (assignment_expression "ppuVar2 = &__DT_PLTGOT" (identifier "ppuVar2") (= "=") (pointer_expression "&__DT_PLTGOT" (& "&") (identifier "__DT_PLTGOT"))) (; ";")) (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")) () ")"))))) (; ";")) (if_statement "if (param_2 == (char *)0x0) {\n    iVar4 = 0x2b;\n  }\n  else {\n    sVar3 = strlen(param_2);\n    iVar4 = 0x2b;\n    if (sVar3 - 1 < 0x3fd) {\n      iVar1 = param_1[0xb3];\n      puVar5 = &local_420;\n      __memcpy_chk(puVar5,param_2,sVar3,0x400,ppuVar2);\n      iVar6 = sVar3 + 2;\n      local_424 = 0;\n      *(undefined2 *)((int)puVar5 + sVar3) = 0xa0d;\n      auStack_41e[sVar3] = 0;\n      while( true ) {\n        param_1[0xb3] = 5;\n        iVar4 = FUN_000278f0(param_1,param_1[100],puVar5,iVar6,&local_424);\n        param_1[0xb3] = iVar1;\n        if (iVar4 != 0) break;\n        if (*(char *)(*param_1 + 0x93c) != '\0') {\n          FUN_00027b90(*param_1,2,puVar5,local_424);\n        }\n        if (iVar6 == local_424) break;\n        iVar6 = iVar6 - local_424;\n        puVar5 = (undefined2 *)((int)puVar5 + local_424);\n      }\n    }\n  }" (if "if") (parenthesized_expression "(param_2 == (char *)0x0)" (( "(") (binary_expression "param_2 == (char *)0x0" (identifier "param_2") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    iVar4 = 0x2b;\n  }" ({ "{") (expression_statement "iVar4 = 0x2b;" (assignment_expression "iVar4 = 0x2b" (identifier "iVar4") (= "=") (number_literal "0x2b")) (; ";")) (} "}")) (else_clause "else {\n    sVar3 = strlen(param_2);\n    iVar4 = 0x2b;\n    if (sVar3 - 1 < 0x3fd) {\n      iVar1 = param_1[0xb3];\n      puVar5 = &local_420;\n      __memcpy_chk(puVar5,param_2,sVar3,0x400,ppuVar2);\n      iVar6 = sVar3 + 2;\n      local_424 = 0;\n      *(undefined2 *)((int)puVar5 + sVar3) = 0xa0d;\n      auStack_41e[sVar3] = 0;\n      while( true ) {\n        param_1[0xb3] = 5;\n        iVar4 = FUN_000278f0(param_1,param_1[100],puVar5,iVar6,&local_424);\n        param_1[0xb3] = iVar1;\n        if (iVar4 != 0) break;\n        if (*(char *)(*param_1 + 0x93c) != '\0') {\n          FUN_00027b90(*param_1,2,puVar5,local_424);\n        }\n        if (iVar6 == local_424) break;\n        iVar6 = iVar6 - local_424;\n        puVar5 = (undefined2 *)((int)puVar5 + local_424);\n      }\n    }\n  }" (else "else") (compound_statement "{\n    sVar3 = strlen(param_2);\n    iVar4 = 0x2b;\n    if (sVar3 - 1 < 0x3fd) {\n      iVar1 = param_1[0xb3];\n      puVar5 = &local_420;\n      __memcpy_chk(puVar5,param_2,sVar3,0x400,ppuVar2);\n      iVar6 = sVar3 + 2;\n      local_424 = 0;\n      *(undefined2 *)((int)puVar5 + sVar3) = 0xa0d;\n      auStack_41e[sVar3] = 0;\n      while( true ) {\n        param_1[0xb3] = 5;\n        iVar4 = FUN_000278f0(param_1,param_1[100],puVar5,iVar6,&local_424);\n        param_1[0xb3] = iVar1;\n        if (iVar4 != 0) break;\n        if (*(char *)(*param_1 + 0x93c) != '\0') {\n          FUN_00027b90(*param_1,2,puVar5,local_424);\n        }\n        if (iVar6 == local_424) break;\n        iVar6 = iVar6 - local_424;\n        puVar5 = (undefined2 *)((int)puVar5 + local_424);\n      }\n    }\n  }" ({ "{") (expression_statement "sVar3 = strlen(param_2);" (assignment_expression "sVar3 = strlen(param_2)" (identifier "sVar3") (= "=") (call_expression "strlen(param_2)" (identifier "strlen") (argument_list "(param_2)" (( "(") (identifier "param_2") () ")")))) (; ";")) (expression_statement "iVar4 = 0x2b;" (assignment_expression "iVar4 = 0x2b" (identifier "iVar4") (= "=") (number_literal "0x2b")) (; ";")) (if_statement "if (sVar3 - 1 < 0x3fd) {\n      iVar1 = param_1[0xb3];\n      puVar5 = &local_420;\n      __memcpy_chk(puVar5,param_2,sVar3,0x400,ppuVar2);\n      iVar6 = sVar3 + 2;\n      local_424 = 0;\n      *(undefined2 *)((int)puVar5 + sVar3) = 0xa0d;\n      auStack_41e[sVar3] = 0;\n      while( true ) {\n        param_1[0xb3] = 5;\n        iVar4 = FUN_000278f0(param_1,param_1[100],puVar5,iVar6,&local_424);\n        param_1[0xb3] = iVar1;\n        if (iVar4 != 0) break;\n        if (*(char *)(*param_1 + 0x93c) != '\0') {\n          FUN_00027b90(*param_1,2,puVar5,local_424);\n        }\n        if (iVar6 == local_424) break;\n        iVar6 = iVar6 - local_424;\n        puVar5 = (undefined2 *)((int)puVar5 + local_424);\n      }\n    }" (if "if") (parenthesized_expression "(sVar3 - 1 < 0x3fd)" (( "(") (binary_expression "sVar3 - 1 < 0x3fd" (binary_expression "sVar3 - 1" (identifier "sVar3") (- "-") (number_literal "1")) (< "<") (number_literal "0x3fd")) () ")")) (compound_statement "{\n      iVar1 = param_1[0xb3];\n      puVar5 = &local_420;\n      __memcpy_chk(puVar5,param_2,sVar3,0x400,ppuVar2);\n      iVar6 = sVar3 + 2;\n      local_424 = 0;\n      *(undefined2 *)((int)puVar5 + sVar3) = 0xa0d;\n      auStack_41e[sVar3] = 0;\n      while( true ) {\n        param_1[0xb3] = 5;\n        iVar4 = FUN_000278f0(param_1,param_1[100],puVar5,iVar6,&local_424);\n        param_1[0xb3] = iVar1;\n        if (iVar4 != 0) break;\n        if (*(char *)(*param_1 + 0x93c) != '\0') {\n          FUN_00027b90(*param_1,2,puVar5,local_424);\n        }\n        if (iVar6 == local_424) break;\n        iVar6 = iVar6 - local_424;\n        puVar5 = (undefined2 *)((int)puVar5 + local_424);\n      }\n    }" ({ "{") (expression_statement "iVar1 = param_1[0xb3];" (assignment_expression "iVar1 = param_1[0xb3]" (identifier "iVar1") (= "=") (subscript_expression "param_1[0xb3]" (identifier "param_1") ([ "[") (number_literal "0xb3") (] "]"))) (; ";")) (expression_statement "puVar5 = &local_420;" (assignment_expression "puVar5 = &local_420" (identifier "puVar5") (= "=") (pointer_expression "&local_420" (& "&") (identifier "local_420"))) (; ";")) (expression_statement "__memcpy_chk(puVar5,param_2,sVar3,0x400,ppuVar2);" (call_expression "__memcpy_chk(puVar5,param_2,sVar3,0x400,ppuVar2)" (identifier "__memcpy_chk") (argument_list "(puVar5,param_2,sVar3,0x400,ppuVar2)" (( "(") (identifier "puVar5") (, ",") (identifier "param_2") (, ",") (identifier "sVar3") (, ",") (number_literal "0x400") (, ",") (identifier "ppuVar2") () ")"))) (; ";")) (expression_statement "iVar6 = sVar3 + 2;" (assignment_expression "iVar6 = sVar3 + 2" (identifier "iVar6") (= "=") (binary_expression "sVar3 + 2" (identifier "sVar3") (+ "+") (number_literal "2"))) (; ";")) (expression_statement "local_424 = 0;" (assignment_expression "local_424 = 0" (identifier "local_424") (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined2 *)((int)puVar5 + sVar3) = 0xa0d;" (assignment_expression "*(undefined2 *)((int)puVar5 + sVar3) = 0xa0d" (pointer_expression "*(undefined2 *)((int)puVar5 + sVar3)" (* "*") (cast_expression "(undefined2 *)((int)puVar5 + sVar3)" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)puVar5 + sVar3)" (( "(") (binary_expression "(int)puVar5 + sVar3" (cast_expression "(int)puVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar5")) (+ "+") (identifier "sVar3")) () ")")))) (= "=") (number_literal "0xa0d")) (; ";")) (expression_statement "auStack_41e[sVar3] = 0;" (assignment_expression "auStack_41e[sVar3] = 0" (subscript_expression "auStack_41e[sVar3]" (identifier "auStack_41e") ([ "[") (identifier "sVar3") (] "]")) (= "=") (number_literal "0")) (; ";")) (while_statement "while( true ) {\n        param_1[0xb3] = 5;\n        iVar4 = FUN_000278f0(param_1,param_1[100],puVar5,iVar6,&local_424);\n        param_1[0xb3] = iVar1;\n        if (iVar4 != 0) break;\n        if (*(char *)(*param_1 + 0x93c) != '\0') {\n          FUN_00027b90(*param_1,2,puVar5,local_424);\n        }\n        if (iVar6 == local_424) break;\n        iVar6 = iVar6 - local_424;\n        puVar5 = (undefined2 *)((int)puVar5 + local_424);\n      }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n        param_1[0xb3] = 5;\n        iVar4 = FUN_000278f0(param_1,param_1[100],puVar5,iVar6,&local_424);\n        param_1[0xb3] = iVar1;\n        if (iVar4 != 0) break;\n        if (*(char *)(*param_1 + 0x93c) != '\0') {\n          FUN_00027b90(*param_1,2,puVar5,local_424);\n        }\n        if (iVar6 == local_424) break;\n        iVar6 = iVar6 - local_424;\n        puVar5 = (undefined2 *)((int)puVar5 + local_424);\n      }" ({ "{") (expression_statement "param_1[0xb3] = 5;" (assignment_expression "param_1[0xb3] = 5" (subscript_expression "param_1[0xb3]" (identifier "param_1") ([ "[") (number_literal "0xb3") (] "]")) (= "=") (number_literal "5")) (; ";")) (expression_statement "iVar4 = FUN_000278f0(param_1,param_1[100],puVar5,iVar6,&local_424);" (assignment_expression "iVar4 = FUN_000278f0(param_1,param_1[100],puVar5,iVar6,&local_424)" (identifier "iVar4") (= "=") (call_expression "FUN_000278f0(param_1,param_1[100],puVar5,iVar6,&local_424)" (identifier "FUN_000278f0") (argument_list "(param_1,param_1[100],puVar5,iVar6,&local_424)" (( "(") (identifier "param_1") (, ",") (subscript_expression "param_1[100]" (identifier "param_1") ([ "[") (number_literal "100") (] "]")) (, ",") (identifier "puVar5") (, ",") (identifier "iVar6") (, ",") (pointer_expression "&local_424" (& "&") (identifier "local_424")) () ")")))) (; ";")) (expression_statement "param_1[0xb3] = iVar1;" (assignment_expression "param_1[0xb3] = iVar1" (subscript_expression "param_1[0xb3]" (identifier "param_1") ([ "[") (number_literal "0xb3") (] "]")) (= "=") (identifier "iVar1")) (; ";")) (if_statement "if (iVar4 != 0) break;" (if "if") (parenthesized_expression "(iVar4 != 0)" (( "(") (binary_expression "iVar4 != 0" (identifier "iVar4") (!= "!=") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (if_statement "if (*(char *)(*param_1 + 0x93c) != '\0') {\n          FUN_00027b90(*param_1,2,puVar5,local_424);\n        }" (if "if") (parenthesized_expression "(*(char *)(*param_1 + 0x93c) != '\0')" (( "(") (binary_expression "*(char *)(*param_1 + 0x93c) != '\0'" (pointer_expression "*(char *)(*param_1 + 0x93c)" (* "*") (cast_expression "(char *)(*param_1 + 0x93c)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + 0x93c)" (( "(") (binary_expression "*param_1 + 0x93c" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "0x93c")) () ")")))) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n          FUN_00027b90(*param_1,2,puVar5,local_424);\n        }" ({ "{") (expression_statement "FUN_00027b90(*param_1,2,puVar5,local_424);" (call_expression "FUN_00027b90(*param_1,2,puVar5,local_424)" (identifier "FUN_00027b90") (argument_list "(*param_1,2,puVar5,local_424)" (( "(") (pointer_expression "*param_1" (* "*") (identifier "param_1")) (, ",") (number_literal "2") (, ",") (identifier "puVar5") (, ",") (identifier "local_424") () ")"))) (; ";")) (} "}"))) (if_statement "if (iVar6 == local_424) break;" (if "if") (parenthesized_expression "(iVar6 == local_424)" (( "(") (binary_expression "iVar6 == local_424" (identifier "iVar6") (== "==") (identifier "local_424")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "iVar6 = iVar6 - local_424;" (assignment_expression "iVar6 = iVar6 - local_424" (identifier "iVar6") (= "=") (binary_expression "iVar6 - local_424" (identifier "iVar6") (- "-") (identifier "local_424"))) (; ";")) (expression_statement "puVar5 = (undefined2 *)((int)puVar5 + local_424);" (assignment_expression "puVar5 = (undefined2 *)((int)puVar5 + local_424)" (identifier "puVar5") (= "=") (cast_expression "(undefined2 *)((int)puVar5 + local_424)" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)puVar5 + local_424)" (( "(") (binary_expression "(int)puVar5 + local_424" (cast_expression "(int)puVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar5")) (+ "+") (identifier "local_424")) () ")")))) (; ";")) (} "}"))) (} "}"))) (} "}")))) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\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 iVar4;\n  }" ({ "{") (return_statement "return iVar4;" (return "return") (identifier "iVar4") (; ";")) (} "}"))) (expression_statement "FUN_00082f60(ppuVar2);" (call_expression "FUN_00082f60(ppuVar2)" (identifier "FUN_00082f60") (argument_list "(ppuVar2)" (( "(") (identifier "ppuVar2") () ")"))) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */
/* WARNING: Unknown calling convention */
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

type_1 function_1(type_2 *conn,char *var_2)

{
  int var_13;
  type_3 pVar2;
  type_4 **ppuVar3;
  size_t var_4;
  type_1 var_8;
  char *var_6;
  size_t var_11;
  int var_1;
  ssize_t var_12;
  char s [1024];
  
  ppuVar3 = &_GLOBAL_OFFSET_TABLE_;
  var_13 = *(int *)(var_1 + 0x14);
  if (var_2 == (char *)0x0) {
    var_8 = CURLE_BAD_FUNCTION_ARGUMENT;
  }
  else {
    var_4 = var_3(var_2);
    var_8 = CURLE_BAD_FUNCTION_ARGUMENT;
    if (var_4 - 1 < 0x3fd) {
      pVar2 = conn->data_prot;
      var_6 = s;
      var_5(var_6,var_2,var_4,0x400,ppuVar3);
      var_11 = var_4 + 2;
      var_12 = 0;
      (var_6 + var_4)[0] = '\r';
      (var_6 + var_4)[1] = '\n';
      s[var_4 + 2] = '\0';
      while( true ) {
        conn->data_prot = PROT_CMD;
        var_8 = var_7(conn,conn->sock[0],var_6,var_11,&var_12);
        conn->data_prot = pVar2;
        if (var_8 != var_9) break;
        if ((conn->data->set).verbose != false) {
          var_10(conn->data,CURLINFO_HEADER_OUT,var_6,var_12);
        }
        if (var_11 == var_12) break;
        var_11 = var_11 - var_12;
        var_6 = var_6 + var_12;
      }
    }
  }
  if (var_13 == *(int *)(var_1 + 0x14)) {
    return var_8;
  }
                    /* WARNING: Subroutine does not return */
  var_14(ppuVar3);
}


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

/* WARNING: Function: __i686.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */

int MASKED(int *param_1,char *param_2)

{
  int iVar1;
  undefined **ppuVar2;
  size_t sVar3;
  int iVar4;
  undefined2 *puVar5;
  int iVar6;
  int in_GS_OFFSET;
  int local_424;
  undefined2 local_420;
  undefined1 auStack_41e [1022];
  int local_20;
  
  ppuVar2 = &__DT_PLTGOT;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (param_2 == (char *)0x0) {
    iVar4 = 0x2b;
  }
  else {
    sVar3 = strlen(param_2);
    iVar4 = 0x2b;
    if (sVar3 - 1 < 0x3fd) {
      iVar1 = param_1[0xb3];
      puVar5 = &local_420;
      __memcpy_chk(puVar5,param_2,sVar3,0x400,ppuVar2);
      iVar6 = sVar3 + 2;
      local_424 = 0;
      *(undefined2 *)((int)puVar5 + sVar3) = 0xa0d;
      auStack_41e[sVar3] = 0;
      while( true ) {
        param_1[0xb3] = 5;
        iVar4 = FUN_000278f0(param_1,param_1[100],puVar5,iVar6,&local_424);
        param_1[0xb3] = iVar1;
        if (iVar4 != 0) break;
        if (*(char *)(*param_1 + 0x93c) != '\0') {
          FUN_00027b90(*param_1,2,puVar5,local_424);
        }
        if (iVar6 == local_424) break;
        iVar6 = iVar6 - local_424;
        puVar5 = (undefined2 *)((int)puVar5 + local_424);
      }
    }
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar4;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00082f60(ppuVar2);
}

