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

int __regparm3 simple_copy(char *from,char *to)

{
  int iVar1;
  int __fd;
  int iVar2;
  int *piVar3;
  size_t sVar4;
  size_t __n;
  char buf [8192];
  
  __fd = open64(from,0);
  if (__fd < 0) {
    __n = 0xffffffff;
  }
  else {
    iVar2 = open64(to,0x241,0x1ff);
    piVar3 = __errno_location();
    if (iVar2 < 0) {
      iVar2 = *piVar3;
      close(__fd);
      *piVar3 = iVar2;
      __n = 0xffffffff;
    }
    else {
      while( true ) {
        __n = read(__fd,buf,0x2000);
        if ((int)__n < 1) break;
        sVar4 = write(iVar2,buf,__n);
        if (sVar4 != __n) {
          iVar1 = *piVar3;
          close(__fd);
          close(iVar2);
          *piVar3 = iVar1;
          return -1;
        }
      }
      iVar1 = *piVar3;
      close(__fd);
      close(iVar2);
      if (__n != 0) {
        __n = 0xffffffff;
        *piVar3 = iVar1;
      }
    }
  }
  return __n;
}



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

size_t __regparm3 FUN_00017400(char *param_1,char *param_2)

{
  int iVar1;
  int __fd;
  int iVar2;
  int *piVar3;
  size_t sVar4;
  size_t __n;
  undefined1 local_201c [8200];
  undefined4 uStack_14;
  
  uStack_14 = 0x1740b;
  __fd = open64(param_1,0);
  if (__fd < 0) {
    __n = 0xffffffff;
  }
  else {
    iVar2 = open64(param_2,0x241,0x1ff);
    piVar3 = __errno_location();
    if (iVar2 < 0) {
      iVar2 = *piVar3;
      close(__fd);
      *piVar3 = iVar2;
      __n = 0xffffffff;
    }
    else {
      while( true ) {
        __n = read(__fd,local_201c,0x2000);
        if ((int)__n < 1) break;
        sVar4 = write(iVar2,local_201c,__n);
        if (sVar4 != __n) {
          iVar1 = *piVar3;
          close(__fd);
          close(iVar2);
          *piVar3 = iVar1;
          return 0xffffffff;
        }
      }
      iVar1 = *piVar3;
      close(__fd);
      close(iVar2);
      if (__n != 0) {
        __n = 0xffffffff;
        *piVar3 = iVar1;
      }
    }
  }
  return __n;
}


PUSH EBP
PUSH EDI
PUSH ESI
MOV ESI,EDX
PUSH EBX
CALL 0x00013710
ADD EBX,0x9bf5
SUB ESP,0x2024
PUSH 0x0
PUSH EAX
CALL 0x00012070
ADD ESP,0x10
TEST EAX,EAX
JS 0x000174f2
SUB ESP,0x4
MOV EDI,EAX
PUSH 0x1ff
PUSH 0x241
PUSH ESI
CALL 0x00012070
MOV dword ptr [ESP + 0x18],EAX
MOV ESI,EAX
CALL 0x00012400
MOV dword ptr [ESP + 0x1c],EAX
ADD ESP,0x10
TEST ESI,ESI
JS 0x000174f9
LEA ESI,[ESP + 0x10]
JMP 0x00017475
SUB ESP,0x4
PUSH EBP
PUSH ESI
PUSH dword ptr [ESP + 0x14]
CALL 0x000123a0
ADD ESP,0x10
CMP EAX,EBP
JNZ 0x000174c0
SUB ESP,0x4
PUSH 0x2000
PUSH ESI
PUSH EDI
CALL 0x00012080
ADD ESP,0x10
MOV EBP,EAX
TEST EAX,EAX
JG 0x00017460
MOV EAX,dword ptr [ESP + 0xc]
SUB ESP,0xc
MOV ESI,dword ptr [EAX]
PUSH EDI
CALL 0x000125e0
POP EAX
PUSH dword ptr [ESP + 0x14]
CALL 0x000125e0
ADD ESP,0x10
TEST EBP,EBP
JNZ 0x00017516
ADD ESP,0x201c
MOV EAX,EBP
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EBP,dword ptr [ESP + 0xc]
SUB ESP,0xc
MOV ESI,dword ptr [EBP]
PUSH EDI
CALL 0x000125e0
POP EDX
PUSH dword ptr [ESP + 0x14]
CALL 0x000125e0
ADD ESP,0x10
MOV dword ptr [EBP],ESI
MOV EBP,0xffffffff
ADD ESP,0x201c
MOV EAX,EBP
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EBP,0xffffffff
JMP 0x000174ad
MOV EBP,dword ptr [ESP + 0xc]
SUB ESP,0xc
MOV ESI,dword ptr [EBP]
PUSH EDI
CALL 0x000125e0
MOV dword ptr [EBP],ESI
ADD ESP,0x10
MOV EBP,0xffffffff
JMP 0x000174ad
MOV EAX,dword ptr [ESP + 0xc]
MOV EBP,0xffffffff
MOV dword ptr [EAX],ESI
JMP 0x000174ad
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nsize_t __regparm3 FUN_00017400(char *param_1,char *param_2)\n\n{\n  int iVar1;\n  int __fd;\n  int iVar2;\n  int *piVar3;\n  size_t sVar4;\n  size_t __n;\n  undefined1 local_201c [8200];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1740b;\n  __fd = open64(param_1,0);\n  if (__fd < 0) {\n    __n = 0xffffffff;\n  }\n  else {\n    iVar2 = open64(param_2,0x241,0x1ff);\n    piVar3 = __errno_location();\n    if (iVar2 < 0) {\n      iVar2 = *piVar3;\n      close(__fd);\n      *piVar3 = iVar2;\n      __n = 0xffffffff;\n    }\n    else {\n      while( true ) {\n        __n = read(__fd,local_201c,0x2000);\n        if ((int)__n < 1) break;\n        sVar4 = write(iVar2,local_201c,__n);\n        if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return 0xffffffff;\n        }\n      }\n      iVar1 = *piVar3;\n      close(__fd);\n      close(iVar2);\n      if (__n != 0) {\n        __n = 0xffffffff;\n        *piVar3 = iVar1;\n      }\n    }\n  }\n  return __n;\n}\n\n" comment (function_definition "size_t __regparm3 FUN_00017400(char *param_1,char *param_2)\n\n{\n  int iVar1;\n  int __fd;\n  int iVar2;\n  int *piVar3;\n  size_t sVar4;\n  size_t __n;\n  undefined1 local_201c [8200];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1740b;\n  __fd = open64(param_1,0);\n  if (__fd < 0) {\n    __n = 0xffffffff;\n  }\n  else {\n    iVar2 = open64(param_2,0x241,0x1ff);\n    piVar3 = __errno_location();\n    if (iVar2 < 0) {\n      iVar2 = *piVar3;\n      close(__fd);\n      *piVar3 = iVar2;\n      __n = 0xffffffff;\n    }\n    else {\n      while( true ) {\n        __n = read(__fd,local_201c,0x2000);\n        if ((int)__n < 1) break;\n        sVar4 = write(iVar2,local_201c,__n);\n        if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return 0xffffffff;\n        }\n      }\n      iVar1 = *piVar3;\n      close(__fd);\n      close(iVar2);\n      if (__n != 0) {\n        __n = 0xffffffff;\n        *piVar3 = iVar1;\n      }\n    }\n  }\n  return __n;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00017400(char *param_1,char *param_2)" identifier (parameter_list "(char *param_1,char *param_2)" ( (parameter_declaration "char *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  int __fd;\n  int iVar2;\n  int *piVar3;\n  size_t sVar4;\n  size_t __n;\n  undefined1 local_201c [8200];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1740b;\n  __fd = open64(param_1,0);\n  if (__fd < 0) {\n    __n = 0xffffffff;\n  }\n  else {\n    iVar2 = open64(param_2,0x241,0x1ff);\n    piVar3 = __errno_location();\n    if (iVar2 < 0) {\n      iVar2 = *piVar3;\n      close(__fd);\n      *piVar3 = iVar2;\n      __n = 0xffffffff;\n    }\n    else {\n      while( true ) {\n        __n = read(__fd,local_201c,0x2000);\n        if ((int)__n < 1) break;\n        sVar4 = write(iVar2,local_201c,__n);\n        if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return 0xffffffff;\n        }\n      }\n      iVar1 = *piVar3;\n      close(__fd);\n      close(iVar2);\n      if (__n != 0) {\n        __n = 0xffffffff;\n        *piVar3 = iVar1;\n      }\n    }\n  }\n  return __n;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int __fd;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "size_t sVar4;" primitive_type identifier ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "undefined1 local_201c [8200];" type_identifier (array_declarator "local_201c [8200]" identifier [ number_literal ]) ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x1740b;" (assignment_expression "uStack_14 = 0x1740b" identifier = number_literal) ;) (expression_statement "__fd = open64(param_1,0);" (assignment_expression "__fd = open64(param_1,0)" identifier = (call_expression "open64(param_1,0)" identifier (argument_list "(param_1,0)" ( identifier , number_literal )))) ;) (if_statement "if (__fd < 0) {\n    __n = 0xffffffff;\n  }\n  else {\n    iVar2 = open64(param_2,0x241,0x1ff);\n    piVar3 = __errno_location();\n    if (iVar2 < 0) {\n      iVar2 = *piVar3;\n      close(__fd);\n      *piVar3 = iVar2;\n      __n = 0xffffffff;\n    }\n    else {\n      while( true ) {\n        __n = read(__fd,local_201c,0x2000);\n        if ((int)__n < 1) break;\n        sVar4 = write(iVar2,local_201c,__n);\n        if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return 0xffffffff;\n        }\n      }\n      iVar1 = *piVar3;\n      close(__fd);\n      close(iVar2);\n      if (__n != 0) {\n        __n = 0xffffffff;\n        *piVar3 = iVar1;\n      }\n    }\n  }" if (parenthesized_expression "(__fd < 0)" ( (binary_expression "__fd < 0" identifier < number_literal) )) (compound_statement "{\n    __n = 0xffffffff;\n  }" { (expression_statement "__n = 0xffffffff;" (assignment_expression "__n = 0xffffffff" identifier = number_literal) ;) }) (else_clause "else {\n    iVar2 = open64(param_2,0x241,0x1ff);\n    piVar3 = __errno_location();\n    if (iVar2 < 0) {\n      iVar2 = *piVar3;\n      close(__fd);\n      *piVar3 = iVar2;\n      __n = 0xffffffff;\n    }\n    else {\n      while( true ) {\n        __n = read(__fd,local_201c,0x2000);\n        if ((int)__n < 1) break;\n        sVar4 = write(iVar2,local_201c,__n);\n        if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return 0xffffffff;\n        }\n      }\n      iVar1 = *piVar3;\n      close(__fd);\n      close(iVar2);\n      if (__n != 0) {\n        __n = 0xffffffff;\n        *piVar3 = iVar1;\n      }\n    }\n  }" else (compound_statement "{\n    iVar2 = open64(param_2,0x241,0x1ff);\n    piVar3 = __errno_location();\n    if (iVar2 < 0) {\n      iVar2 = *piVar3;\n      close(__fd);\n      *piVar3 = iVar2;\n      __n = 0xffffffff;\n    }\n    else {\n      while( true ) {\n        __n = read(__fd,local_201c,0x2000);\n        if ((int)__n < 1) break;\n        sVar4 = write(iVar2,local_201c,__n);\n        if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return 0xffffffff;\n        }\n      }\n      iVar1 = *piVar3;\n      close(__fd);\n      close(iVar2);\n      if (__n != 0) {\n        __n = 0xffffffff;\n        *piVar3 = iVar1;\n      }\n    }\n  }" { (expression_statement "iVar2 = open64(param_2,0x241,0x1ff);" (assignment_expression "iVar2 = open64(param_2,0x241,0x1ff)" identifier = (call_expression "open64(param_2,0x241,0x1ff)" identifier (argument_list "(param_2,0x241,0x1ff)" ( identifier , number_literal , number_literal )))) ;) (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar2 < 0) {\n      iVar2 = *piVar3;\n      close(__fd);\n      *piVar3 = iVar2;\n      __n = 0xffffffff;\n    }\n    else {\n      while( true ) {\n        __n = read(__fd,local_201c,0x2000);\n        if ((int)__n < 1) break;\n        sVar4 = write(iVar2,local_201c,__n);\n        if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return 0xffffffff;\n        }\n      }\n      iVar1 = *piVar3;\n      close(__fd);\n      close(iVar2);\n      if (__n != 0) {\n        __n = 0xffffffff;\n        *piVar3 = iVar1;\n      }\n    }" if (parenthesized_expression "(iVar2 < 0)" ( (binary_expression "iVar2 < 0" identifier < number_literal) )) (compound_statement "{\n      iVar2 = *piVar3;\n      close(__fd);\n      *piVar3 = iVar2;\n      __n = 0xffffffff;\n    }" { (expression_statement "iVar2 = *piVar3;" (assignment_expression "iVar2 = *piVar3" identifier = (pointer_expression "*piVar3" * identifier)) ;) (expression_statement "close(__fd);" (call_expression "close(__fd)" identifier (argument_list "(__fd)" ( identifier ))) ;) (expression_statement "*piVar3 = iVar2;" (assignment_expression "*piVar3 = iVar2" (pointer_expression "*piVar3" * identifier) = identifier) ;) (expression_statement "__n = 0xffffffff;" (assignment_expression "__n = 0xffffffff" identifier = number_literal) ;) }) (else_clause "else {\n      while( true ) {\n        __n = read(__fd,local_201c,0x2000);\n        if ((int)__n < 1) break;\n        sVar4 = write(iVar2,local_201c,__n);\n        if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return 0xffffffff;\n        }\n      }\n      iVar1 = *piVar3;\n      close(__fd);\n      close(iVar2);\n      if (__n != 0) {\n        __n = 0xffffffff;\n        *piVar3 = iVar1;\n      }\n    }" else (compound_statement "{\n      while( true ) {\n        __n = read(__fd,local_201c,0x2000);\n        if ((int)__n < 1) break;\n        sVar4 = write(iVar2,local_201c,__n);\n        if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return 0xffffffff;\n        }\n      }\n      iVar1 = *piVar3;\n      close(__fd);\n      close(iVar2);\n      if (__n != 0) {\n        __n = 0xffffffff;\n        *piVar3 = iVar1;\n      }\n    }" { (while_statement "while( true ) {\n        __n = read(__fd,local_201c,0x2000);\n        if ((int)__n < 1) break;\n        sVar4 = write(iVar2,local_201c,__n);\n        if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return 0xffffffff;\n        }\n      }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n        __n = read(__fd,local_201c,0x2000);\n        if ((int)__n < 1) break;\n        sVar4 = write(iVar2,local_201c,__n);\n        if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return 0xffffffff;\n        }\n      }" { (expression_statement "__n = read(__fd,local_201c,0x2000);" (assignment_expression "__n = read(__fd,local_201c,0x2000)" identifier = (call_expression "read(__fd,local_201c,0x2000)" identifier (argument_list "(__fd,local_201c,0x2000)" ( identifier , identifier , number_literal )))) ;) (if_statement "if ((int)__n < 1) break;" if (parenthesized_expression "((int)__n < 1)" ( (binary_expression "(int)__n < 1" (cast_expression "(int)__n" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (break_statement "break;" break ;)) (expression_statement "sVar4 = write(iVar2,local_201c,__n);" (assignment_expression "sVar4 = write(iVar2,local_201c,__n)" identifier = (call_expression "write(iVar2,local_201c,__n)" identifier (argument_list "(iVar2,local_201c,__n)" ( identifier , identifier , identifier )))) ;) (if_statement "if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return 0xffffffff;\n        }" if (parenthesized_expression "(sVar4 != __n)" ( (binary_expression "sVar4 != __n" identifier != identifier) )) (compound_statement "{\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return 0xffffffff;\n        }" { (expression_statement "iVar1 = *piVar3;" (assignment_expression "iVar1 = *piVar3" identifier = (pointer_expression "*piVar3" * identifier)) ;) (expression_statement "close(__fd);" (call_expression "close(__fd)" identifier (argument_list "(__fd)" ( identifier ))) ;) (expression_statement "close(iVar2);" (call_expression "close(iVar2)" identifier (argument_list "(iVar2)" ( identifier ))) ;) (expression_statement "*piVar3 = iVar1;" (assignment_expression "*piVar3 = iVar1" (pointer_expression "*piVar3" * identifier) = identifier) ;) (return_statement "return 0xffffffff;" return number_literal ;) })) })) (expression_statement "iVar1 = *piVar3;" (assignment_expression "iVar1 = *piVar3" identifier = (pointer_expression "*piVar3" * identifier)) ;) (expression_statement "close(__fd);" (call_expression "close(__fd)" identifier (argument_list "(__fd)" ( identifier ))) ;) (expression_statement "close(iVar2);" (call_expression "close(iVar2)" identifier (argument_list "(iVar2)" ( identifier ))) ;) (if_statement "if (__n != 0) {\n        __n = 0xffffffff;\n        *piVar3 = iVar1;\n      }" if (parenthesized_expression "(__n != 0)" ( (binary_expression "__n != 0" identifier != number_literal) )) (compound_statement "{\n        __n = 0xffffffff;\n        *piVar3 = iVar1;\n      }" { (expression_statement "__n = 0xffffffff;" (assignment_expression "__n = 0xffffffff" identifier = number_literal) ;) (expression_statement "*piVar3 = iVar1;" (assignment_expression "*piVar3 = iVar1" (pointer_expression "*piVar3" * identifier) = identifier) ;) })) }))) }))) (return_statement "return __n;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint __regparm3 simple_copy(char *from,char *to)\n\n{\n  int iVar1;\n  int __fd;\n  int iVar2;\n  int *piVar3;\n  size_t sVar4;\n  size_t __n;\n  char buf [8192];\n  \n  __fd = open64(from,0);\n  if (__fd < 0) {\n    __n = 0xffffffff;\n  }\n  else {\n    iVar2 = open64(to,0x241,0x1ff);\n    piVar3 = __errno_location();\n    if (iVar2 < 0) {\n      iVar2 = *piVar3;\n      close(__fd);\n      *piVar3 = iVar2;\n      __n = 0xffffffff;\n    }\n    else {\n      while( true ) {\n        __n = read(__fd,buf,0x2000);\n        if ((int)__n < 1) break;\n        sVar4 = write(iVar2,buf,__n);\n        if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return -1;\n        }\n      }\n      iVar1 = *piVar3;\n      close(__fd);\n      close(iVar2);\n      if (__n != 0) {\n        __n = 0xffffffff;\n        *piVar3 = iVar1;\n      }\n    }\n  }\n  return __n;\n}\n\n" comment (function_definition "int __regparm3 simple_copy(char *from,char *to)\n\n{\n  int iVar1;\n  int __fd;\n  int iVar2;\n  int *piVar3;\n  size_t sVar4;\n  size_t __n;\n  char buf [8192];\n  \n  __fd = open64(from,0);\n  if (__fd < 0) {\n    __n = 0xffffffff;\n  }\n  else {\n    iVar2 = open64(to,0x241,0x1ff);\n    piVar3 = __errno_location();\n    if (iVar2 < 0) {\n      iVar2 = *piVar3;\n      close(__fd);\n      *piVar3 = iVar2;\n      __n = 0xffffffff;\n    }\n    else {\n      while( true ) {\n        __n = read(__fd,buf,0x2000);\n        if ((int)__n < 1) break;\n        sVar4 = write(iVar2,buf,__n);\n        if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return -1;\n        }\n      }\n      iVar1 = *piVar3;\n      close(__fd);\n      close(iVar2);\n      if (__n != 0) {\n        __n = 0xffffffff;\n        *piVar3 = iVar1;\n      }\n    }\n  }\n  return __n;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "simple_copy(char *from,char *to)" identifier (parameter_list "(char *from,char *to)" ( (parameter_declaration "char *from" primitive_type (pointer_declarator "*from" * identifier)) , (parameter_declaration "char *to" primitive_type (pointer_declarator "*to" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int __fd;\n  int iVar2;\n  int *piVar3;\n  size_t sVar4;\n  size_t __n;\n  char buf [8192];\n  \n  __fd = open64(from,0);\n  if (__fd < 0) {\n    __n = 0xffffffff;\n  }\n  else {\n    iVar2 = open64(to,0x241,0x1ff);\n    piVar3 = __errno_location();\n    if (iVar2 < 0) {\n      iVar2 = *piVar3;\n      close(__fd);\n      *piVar3 = iVar2;\n      __n = 0xffffffff;\n    }\n    else {\n      while( true ) {\n        __n = read(__fd,buf,0x2000);\n        if ((int)__n < 1) break;\n        sVar4 = write(iVar2,buf,__n);\n        if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return -1;\n        }\n      }\n      iVar1 = *piVar3;\n      close(__fd);\n      close(iVar2);\n      if (__n != 0) {\n        __n = 0xffffffff;\n        *piVar3 = iVar1;\n      }\n    }\n  }\n  return __n;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int __fd;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "size_t sVar4;" primitive_type identifier ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "char buf [8192];" primitive_type (array_declarator "buf [8192]" identifier [ number_literal ]) ;) (expression_statement "__fd = open64(from,0);" (assignment_expression "__fd = open64(from,0)" identifier = (call_expression "open64(from,0)" identifier (argument_list "(from,0)" ( identifier , number_literal )))) ;) (if_statement "if (__fd < 0) {\n    __n = 0xffffffff;\n  }\n  else {\n    iVar2 = open64(to,0x241,0x1ff);\n    piVar3 = __errno_location();\n    if (iVar2 < 0) {\n      iVar2 = *piVar3;\n      close(__fd);\n      *piVar3 = iVar2;\n      __n = 0xffffffff;\n    }\n    else {\n      while( true ) {\n        __n = read(__fd,buf,0x2000);\n        if ((int)__n < 1) break;\n        sVar4 = write(iVar2,buf,__n);\n        if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return -1;\n        }\n      }\n      iVar1 = *piVar3;\n      close(__fd);\n      close(iVar2);\n      if (__n != 0) {\n        __n = 0xffffffff;\n        *piVar3 = iVar1;\n      }\n    }\n  }" if (parenthesized_expression "(__fd < 0)" ( (binary_expression "__fd < 0" identifier < number_literal) )) (compound_statement "{\n    __n = 0xffffffff;\n  }" { (expression_statement "__n = 0xffffffff;" (assignment_expression "__n = 0xffffffff" identifier = number_literal) ;) }) (else_clause "else {\n    iVar2 = open64(to,0x241,0x1ff);\n    piVar3 = __errno_location();\n    if (iVar2 < 0) {\n      iVar2 = *piVar3;\n      close(__fd);\n      *piVar3 = iVar2;\n      __n = 0xffffffff;\n    }\n    else {\n      while( true ) {\n        __n = read(__fd,buf,0x2000);\n        if ((int)__n < 1) break;\n        sVar4 = write(iVar2,buf,__n);\n        if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return -1;\n        }\n      }\n      iVar1 = *piVar3;\n      close(__fd);\n      close(iVar2);\n      if (__n != 0) {\n        __n = 0xffffffff;\n        *piVar3 = iVar1;\n      }\n    }\n  }" else (compound_statement "{\n    iVar2 = open64(to,0x241,0x1ff);\n    piVar3 = __errno_location();\n    if (iVar2 < 0) {\n      iVar2 = *piVar3;\n      close(__fd);\n      *piVar3 = iVar2;\n      __n = 0xffffffff;\n    }\n    else {\n      while( true ) {\n        __n = read(__fd,buf,0x2000);\n        if ((int)__n < 1) break;\n        sVar4 = write(iVar2,buf,__n);\n        if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return -1;\n        }\n      }\n      iVar1 = *piVar3;\n      close(__fd);\n      close(iVar2);\n      if (__n != 0) {\n        __n = 0xffffffff;\n        *piVar3 = iVar1;\n      }\n    }\n  }" { (expression_statement "iVar2 = open64(to,0x241,0x1ff);" (assignment_expression "iVar2 = open64(to,0x241,0x1ff)" identifier = (call_expression "open64(to,0x241,0x1ff)" identifier (argument_list "(to,0x241,0x1ff)" ( identifier , number_literal , number_literal )))) ;) (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar2 < 0) {\n      iVar2 = *piVar3;\n      close(__fd);\n      *piVar3 = iVar2;\n      __n = 0xffffffff;\n    }\n    else {\n      while( true ) {\n        __n = read(__fd,buf,0x2000);\n        if ((int)__n < 1) break;\n        sVar4 = write(iVar2,buf,__n);\n        if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return -1;\n        }\n      }\n      iVar1 = *piVar3;\n      close(__fd);\n      close(iVar2);\n      if (__n != 0) {\n        __n = 0xffffffff;\n        *piVar3 = iVar1;\n      }\n    }" if (parenthesized_expression "(iVar2 < 0)" ( (binary_expression "iVar2 < 0" identifier < number_literal) )) (compound_statement "{\n      iVar2 = *piVar3;\n      close(__fd);\n      *piVar3 = iVar2;\n      __n = 0xffffffff;\n    }" { (expression_statement "iVar2 = *piVar3;" (assignment_expression "iVar2 = *piVar3" identifier = (pointer_expression "*piVar3" * identifier)) ;) (expression_statement "close(__fd);" (call_expression "close(__fd)" identifier (argument_list "(__fd)" ( identifier ))) ;) (expression_statement "*piVar3 = iVar2;" (assignment_expression "*piVar3 = iVar2" (pointer_expression "*piVar3" * identifier) = identifier) ;) (expression_statement "__n = 0xffffffff;" (assignment_expression "__n = 0xffffffff" identifier = number_literal) ;) }) (else_clause "else {\n      while( true ) {\n        __n = read(__fd,buf,0x2000);\n        if ((int)__n < 1) break;\n        sVar4 = write(iVar2,buf,__n);\n        if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return -1;\n        }\n      }\n      iVar1 = *piVar3;\n      close(__fd);\n      close(iVar2);\n      if (__n != 0) {\n        __n = 0xffffffff;\n        *piVar3 = iVar1;\n      }\n    }" else (compound_statement "{\n      while( true ) {\n        __n = read(__fd,buf,0x2000);\n        if ((int)__n < 1) break;\n        sVar4 = write(iVar2,buf,__n);\n        if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return -1;\n        }\n      }\n      iVar1 = *piVar3;\n      close(__fd);\n      close(iVar2);\n      if (__n != 0) {\n        __n = 0xffffffff;\n        *piVar3 = iVar1;\n      }\n    }" { (while_statement "while( true ) {\n        __n = read(__fd,buf,0x2000);\n        if ((int)__n < 1) break;\n        sVar4 = write(iVar2,buf,__n);\n        if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return -1;\n        }\n      }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n        __n = read(__fd,buf,0x2000);\n        if ((int)__n < 1) break;\n        sVar4 = write(iVar2,buf,__n);\n        if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return -1;\n        }\n      }" { (expression_statement "__n = read(__fd,buf,0x2000);" (assignment_expression "__n = read(__fd,buf,0x2000)" identifier = (call_expression "read(__fd,buf,0x2000)" identifier (argument_list "(__fd,buf,0x2000)" ( identifier , identifier , number_literal )))) ;) (if_statement "if ((int)__n < 1) break;" if (parenthesized_expression "((int)__n < 1)" ( (binary_expression "(int)__n < 1" (cast_expression "(int)__n" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (break_statement "break;" break ;)) (expression_statement "sVar4 = write(iVar2,buf,__n);" (assignment_expression "sVar4 = write(iVar2,buf,__n)" identifier = (call_expression "write(iVar2,buf,__n)" identifier (argument_list "(iVar2,buf,__n)" ( identifier , identifier , identifier )))) ;) (if_statement "if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return -1;\n        }" if (parenthesized_expression "(sVar4 != __n)" ( (binary_expression "sVar4 != __n" identifier != identifier) )) (compound_statement "{\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return -1;\n        }" { (expression_statement "iVar1 = *piVar3;" (assignment_expression "iVar1 = *piVar3" identifier = (pointer_expression "*piVar3" * identifier)) ;) (expression_statement "close(__fd);" (call_expression "close(__fd)" identifier (argument_list "(__fd)" ( identifier ))) ;) (expression_statement "close(iVar2);" (call_expression "close(iVar2)" identifier (argument_list "(iVar2)" ( identifier ))) ;) (expression_statement "*piVar3 = iVar1;" (assignment_expression "*piVar3 = iVar1" (pointer_expression "*piVar3" * identifier) = identifier) ;) (return_statement "return -1;" return number_literal ;) })) })) (expression_statement "iVar1 = *piVar3;" (assignment_expression "iVar1 = *piVar3" identifier = (pointer_expression "*piVar3" * identifier)) ;) (expression_statement "close(__fd);" (call_expression "close(__fd)" identifier (argument_list "(__fd)" ( identifier ))) ;) (expression_statement "close(iVar2);" (call_expression "close(iVar2)" identifier (argument_list "(iVar2)" ( identifier ))) ;) (if_statement "if (__n != 0) {\n        __n = 0xffffffff;\n        *piVar3 = iVar1;\n      }" if (parenthesized_expression "(__n != 0)" ( (binary_expression "__n != 0" identifier != number_literal) )) (compound_statement "{\n        __n = 0xffffffff;\n        *piVar3 = iVar1;\n      }" { (expression_statement "__n = 0xffffffff;" (assignment_expression "__n = 0xffffffff" identifier = number_literal) ;) (expression_statement "*piVar3 = iVar1;" (assignment_expression "*piVar3 = iVar1" (pointer_expression "*piVar3" * identifier) = identifier) ;) })) }))) }))) (return_statement "return __n;" return identifier ;) })))
(translation_unit "size_t __regparm3 FUN_00017400(char *param_1,char *param_2)\n\n{\n  int iVar1;\n  int __fd;\n  int iVar2;\n  int *piVar3;\n  size_t sVar4;\n  size_t __n;\n  undefined1 local_201c [8200];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1740b;\n  __fd = open64(param_1,0);\n  if (__fd < 0) {\n    __n = 0xffffffff;\n  }\n  else {\n    iVar2 = open64(param_2,0x241,0x1ff);\n    piVar3 = __errno_location();\n    if (iVar2 < 0) {\n      iVar2 = *piVar3;\n      close(__fd);\n      *piVar3 = iVar2;\n      __n = 0xffffffff;\n    }\n    else {\n      while( true ) {\n        __n = read(__fd,local_201c,0x2000);\n        if ((int)__n < 1) break;\n        sVar4 = write(iVar2,local_201c,__n);\n        if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return 0xffffffff;\n        }\n      }\n      iVar1 = *piVar3;\n      close(__fd);\n      close(iVar2);\n      if (__n != 0) {\n        __n = 0xffffffff;\n        *piVar3 = iVar1;\n      }\n    }\n  }\n  return __n;\n}\n\n" (function_definition "size_t __regparm3 FUN_00017400(char *param_1,char *param_2)\n\n{\n  int iVar1;\n  int __fd;\n  int iVar2;\n  int *piVar3;\n  size_t sVar4;\n  size_t __n;\n  undefined1 local_201c [8200];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1740b;\n  __fd = open64(param_1,0);\n  if (__fd < 0) {\n    __n = 0xffffffff;\n  }\n  else {\n    iVar2 = open64(param_2,0x241,0x1ff);\n    piVar3 = __errno_location();\n    if (iVar2 < 0) {\n      iVar2 = *piVar3;\n      close(__fd);\n      *piVar3 = iVar2;\n      __n = 0xffffffff;\n    }\n    else {\n      while( true ) {\n        __n = read(__fd,local_201c,0x2000);\n        if ((int)__n < 1) break;\n        sVar4 = write(iVar2,local_201c,__n);\n        if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return 0xffffffff;\n        }\n      }\n      iVar1 = *piVar3;\n      close(__fd);\n      close(iVar2);\n      if (__n != 0) {\n        __n = 0xffffffff;\n        *piVar3 = iVar1;\n      }\n    }\n  }\n  return __n;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00017400(char *param_1,char *param_2)" identifier (parameter_list "(char *param_1,char *param_2)" ( (parameter_declaration "char *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  int __fd;\n  int iVar2;\n  int *piVar3;\n  size_t sVar4;\n  size_t __n;\n  undefined1 local_201c [8200];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1740b;\n  __fd = open64(param_1,0);\n  if (__fd < 0) {\n    __n = 0xffffffff;\n  }\n  else {\n    iVar2 = open64(param_2,0x241,0x1ff);\n    piVar3 = __errno_location();\n    if (iVar2 < 0) {\n      iVar2 = *piVar3;\n      close(__fd);\n      *piVar3 = iVar2;\n      __n = 0xffffffff;\n    }\n    else {\n      while( true ) {\n        __n = read(__fd,local_201c,0x2000);\n        if ((int)__n < 1) break;\n        sVar4 = write(iVar2,local_201c,__n);\n        if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return 0xffffffff;\n        }\n      }\n      iVar1 = *piVar3;\n      close(__fd);\n      close(iVar2);\n      if (__n != 0) {\n        __n = 0xffffffff;\n        *piVar3 = iVar1;\n      }\n    }\n  }\n  return __n;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int __fd;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "size_t sVar4;" primitive_type identifier ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "undefined1 local_201c [8200];" type_identifier (array_declarator "local_201c [8200]" identifier [ number_literal ]) ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x1740b;" (assignment_expression "uStack_14 = 0x1740b" identifier = number_literal) ;) (expression_statement "__fd = open64(param_1,0);" (assignment_expression "__fd = open64(param_1,0)" identifier = (call_expression "open64(param_1,0)" identifier (argument_list "(param_1,0)" ( identifier , number_literal )))) ;) (if_statement "if (__fd < 0) {\n    __n = 0xffffffff;\n  }\n  else {\n    iVar2 = open64(param_2,0x241,0x1ff);\n    piVar3 = __errno_location();\n    if (iVar2 < 0) {\n      iVar2 = *piVar3;\n      close(__fd);\n      *piVar3 = iVar2;\n      __n = 0xffffffff;\n    }\n    else {\n      while( true ) {\n        __n = read(__fd,local_201c,0x2000);\n        if ((int)__n < 1) break;\n        sVar4 = write(iVar2,local_201c,__n);\n        if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return 0xffffffff;\n        }\n      }\n      iVar1 = *piVar3;\n      close(__fd);\n      close(iVar2);\n      if (__n != 0) {\n        __n = 0xffffffff;\n        *piVar3 = iVar1;\n      }\n    }\n  }" if (parenthesized_expression "(__fd < 0)" ( (binary_expression "__fd < 0" identifier < number_literal) )) (compound_statement "{\n    __n = 0xffffffff;\n  }" { (expression_statement "__n = 0xffffffff;" (assignment_expression "__n = 0xffffffff" identifier = number_literal) ;) }) (else_clause "else {\n    iVar2 = open64(param_2,0x241,0x1ff);\n    piVar3 = __errno_location();\n    if (iVar2 < 0) {\n      iVar2 = *piVar3;\n      close(__fd);\n      *piVar3 = iVar2;\n      __n = 0xffffffff;\n    }\n    else {\n      while( true ) {\n        __n = read(__fd,local_201c,0x2000);\n        if ((int)__n < 1) break;\n        sVar4 = write(iVar2,local_201c,__n);\n        if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return 0xffffffff;\n        }\n      }\n      iVar1 = *piVar3;\n      close(__fd);\n      close(iVar2);\n      if (__n != 0) {\n        __n = 0xffffffff;\n        *piVar3 = iVar1;\n      }\n    }\n  }" else (compound_statement "{\n    iVar2 = open64(param_2,0x241,0x1ff);\n    piVar3 = __errno_location();\n    if (iVar2 < 0) {\n      iVar2 = *piVar3;\n      close(__fd);\n      *piVar3 = iVar2;\n      __n = 0xffffffff;\n    }\n    else {\n      while( true ) {\n        __n = read(__fd,local_201c,0x2000);\n        if ((int)__n < 1) break;\n        sVar4 = write(iVar2,local_201c,__n);\n        if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return 0xffffffff;\n        }\n      }\n      iVar1 = *piVar3;\n      close(__fd);\n      close(iVar2);\n      if (__n != 0) {\n        __n = 0xffffffff;\n        *piVar3 = iVar1;\n      }\n    }\n  }" { (expression_statement "iVar2 = open64(param_2,0x241,0x1ff);" (assignment_expression "iVar2 = open64(param_2,0x241,0x1ff)" identifier = (call_expression "open64(param_2,0x241,0x1ff)" identifier (argument_list "(param_2,0x241,0x1ff)" ( identifier , number_literal , number_literal )))) ;) (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar2 < 0) {\n      iVar2 = *piVar3;\n      close(__fd);\n      *piVar3 = iVar2;\n      __n = 0xffffffff;\n    }\n    else {\n      while( true ) {\n        __n = read(__fd,local_201c,0x2000);\n        if ((int)__n < 1) break;\n        sVar4 = write(iVar2,local_201c,__n);\n        if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return 0xffffffff;\n        }\n      }\n      iVar1 = *piVar3;\n      close(__fd);\n      close(iVar2);\n      if (__n != 0) {\n        __n = 0xffffffff;\n        *piVar3 = iVar1;\n      }\n    }" if (parenthesized_expression "(iVar2 < 0)" ( (binary_expression "iVar2 < 0" identifier < number_literal) )) (compound_statement "{\n      iVar2 = *piVar3;\n      close(__fd);\n      *piVar3 = iVar2;\n      __n = 0xffffffff;\n    }" { (expression_statement "iVar2 = *piVar3;" (assignment_expression "iVar2 = *piVar3" identifier = (pointer_expression "*piVar3" * identifier)) ;) (expression_statement "close(__fd);" (call_expression "close(__fd)" identifier (argument_list "(__fd)" ( identifier ))) ;) (expression_statement "*piVar3 = iVar2;" (assignment_expression "*piVar3 = iVar2" (pointer_expression "*piVar3" * identifier) = identifier) ;) (expression_statement "__n = 0xffffffff;" (assignment_expression "__n = 0xffffffff" identifier = number_literal) ;) }) (else_clause "else {\n      while( true ) {\n        __n = read(__fd,local_201c,0x2000);\n        if ((int)__n < 1) break;\n        sVar4 = write(iVar2,local_201c,__n);\n        if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return 0xffffffff;\n        }\n      }\n      iVar1 = *piVar3;\n      close(__fd);\n      close(iVar2);\n      if (__n != 0) {\n        __n = 0xffffffff;\n        *piVar3 = iVar1;\n      }\n    }" else (compound_statement "{\n      while( true ) {\n        __n = read(__fd,local_201c,0x2000);\n        if ((int)__n < 1) break;\n        sVar4 = write(iVar2,local_201c,__n);\n        if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return 0xffffffff;\n        }\n      }\n      iVar1 = *piVar3;\n      close(__fd);\n      close(iVar2);\n      if (__n != 0) {\n        __n = 0xffffffff;\n        *piVar3 = iVar1;\n      }\n    }" { (while_statement "while( true ) {\n        __n = read(__fd,local_201c,0x2000);\n        if ((int)__n < 1) break;\n        sVar4 = write(iVar2,local_201c,__n);\n        if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return 0xffffffff;\n        }\n      }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n        __n = read(__fd,local_201c,0x2000);\n        if ((int)__n < 1) break;\n        sVar4 = write(iVar2,local_201c,__n);\n        if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return 0xffffffff;\n        }\n      }" { (expression_statement "__n = read(__fd,local_201c,0x2000);" (assignment_expression "__n = read(__fd,local_201c,0x2000)" identifier = (call_expression "read(__fd,local_201c,0x2000)" identifier (argument_list "(__fd,local_201c,0x2000)" ( identifier , identifier , number_literal )))) ;) (if_statement "if ((int)__n < 1) break;" if (parenthesized_expression "((int)__n < 1)" ( (binary_expression "(int)__n < 1" (cast_expression "(int)__n" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (break_statement "break;" break ;)) (expression_statement "sVar4 = write(iVar2,local_201c,__n);" (assignment_expression "sVar4 = write(iVar2,local_201c,__n)" identifier = (call_expression "write(iVar2,local_201c,__n)" identifier (argument_list "(iVar2,local_201c,__n)" ( identifier , identifier , identifier )))) ;) (if_statement "if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return 0xffffffff;\n        }" if (parenthesized_expression "(sVar4 != __n)" ( (binary_expression "sVar4 != __n" identifier != identifier) )) (compound_statement "{\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return 0xffffffff;\n        }" { (expression_statement "iVar1 = *piVar3;" (assignment_expression "iVar1 = *piVar3" identifier = (pointer_expression "*piVar3" * identifier)) ;) (expression_statement "close(__fd);" (call_expression "close(__fd)" identifier (argument_list "(__fd)" ( identifier ))) ;) (expression_statement "close(iVar2);" (call_expression "close(iVar2)" identifier (argument_list "(iVar2)" ( identifier ))) ;) (expression_statement "*piVar3 = iVar1;" (assignment_expression "*piVar3 = iVar1" (pointer_expression "*piVar3" * identifier) = identifier) ;) (return_statement "return 0xffffffff;" return number_literal ;) })) })) (expression_statement "iVar1 = *piVar3;" (assignment_expression "iVar1 = *piVar3" identifier = (pointer_expression "*piVar3" * identifier)) ;) (expression_statement "close(__fd);" (call_expression "close(__fd)" identifier (argument_list "(__fd)" ( identifier ))) ;) (expression_statement "close(iVar2);" (call_expression "close(iVar2)" identifier (argument_list "(iVar2)" ( identifier ))) ;) (if_statement "if (__n != 0) {\n        __n = 0xffffffff;\n        *piVar3 = iVar1;\n      }" if (parenthesized_expression "(__n != 0)" ( (binary_expression "__n != 0" identifier != number_literal) )) (compound_statement "{\n        __n = 0xffffffff;\n        *piVar3 = iVar1;\n      }" { (expression_statement "__n = 0xffffffff;" (assignment_expression "__n = 0xffffffff" identifier = number_literal) ;) (expression_statement "*piVar3 = iVar1;" (assignment_expression "*piVar3 = iVar1" (pointer_expression "*piVar3" * identifier) = identifier) ;) })) }))) }))) (return_statement "return __n;" return identifier ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < 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 , LIT , LIT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < LIT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (return_statement return LIT ;) })) })) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) })) }))) }))) (return_statement return IDENT ;) })))
(function_definition "size_t __regparm3 FUN_00017400(char *param_1,char *param_2)\n\n{\n  int iVar1;\n  int __fd;\n  int iVar2;\n  int *piVar3;\n  size_t sVar4;\n  size_t __n;\n  undefined1 local_201c [8200];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1740b;\n  __fd = open64(param_1,0);\n  if (__fd < 0) {\n    __n = 0xffffffff;\n  }\n  else {\n    iVar2 = open64(param_2,0x241,0x1ff);\n    piVar3 = __errno_location();\n    if (iVar2 < 0) {\n      iVar2 = *piVar3;\n      close(__fd);\n      *piVar3 = iVar2;\n      __n = 0xffffffff;\n    }\n    else {\n      while( true ) {\n        __n = read(__fd,local_201c,0x2000);\n        if ((int)__n < 1) break;\n        sVar4 = write(iVar2,local_201c,__n);\n        if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return 0xffffffff;\n        }\n      }\n      iVar1 = *piVar3;\n      close(__fd);\n      close(iVar2);\n      if (__n != 0) {\n        __n = 0xffffffff;\n        *piVar3 = iVar1;\n      }\n    }\n  }\n  return __n;\n}" (primitive_type "size_t") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00017400(char *param_1,char *param_2)" (identifier "FUN_00017400") (parameter_list "(char *param_1,char *param_2)" (( "(") (parameter_declaration "char *param_1" (primitive_type "char") (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  int __fd;\n  int iVar2;\n  int *piVar3;\n  size_t sVar4;\n  size_t __n;\n  undefined1 local_201c [8200];\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1740b;\n  __fd = open64(param_1,0);\n  if (__fd < 0) {\n    __n = 0xffffffff;\n  }\n  else {\n    iVar2 = open64(param_2,0x241,0x1ff);\n    piVar3 = __errno_location();\n    if (iVar2 < 0) {\n      iVar2 = *piVar3;\n      close(__fd);\n      *piVar3 = iVar2;\n      __n = 0xffffffff;\n    }\n    else {\n      while( true ) {\n        __n = read(__fd,local_201c,0x2000);\n        if ((int)__n < 1) break;\n        sVar4 = write(iVar2,local_201c,__n);\n        if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return 0xffffffff;\n        }\n      }\n      iVar1 = *piVar3;\n      close(__fd);\n      close(iVar2);\n      if (__n != 0) {\n        __n = 0xffffffff;\n        *piVar3 = iVar1;\n      }\n    }\n  }\n  return __n;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int __fd;" (primitive_type "int") (identifier "__fd") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int *piVar3;" (primitive_type "int") (pointer_declarator "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (declaration "size_t sVar4;" (primitive_type "size_t") (identifier "sVar4") (; ";")) (declaration "size_t __n;" (primitive_type "size_t") (identifier "__n") (; ";")) (declaration "undefined1 local_201c [8200];" (type_identifier "undefined1") (array_declarator "local_201c [8200]" (identifier "local_201c") ([ "[") (number_literal "8200") (] "]")) (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x1740b;" (assignment_expression "uStack_14 = 0x1740b" (identifier "uStack_14") (= "=") (number_literal "0x1740b")) (; ";")) (expression_statement "__fd = open64(param_1,0);" (assignment_expression "__fd = open64(param_1,0)" (identifier "__fd") (= "=") (call_expression "open64(param_1,0)" (identifier "open64") (argument_list "(param_1,0)" (( "(") (identifier "param_1") (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if (__fd < 0) {\n    __n = 0xffffffff;\n  }\n  else {\n    iVar2 = open64(param_2,0x241,0x1ff);\n    piVar3 = __errno_location();\n    if (iVar2 < 0) {\n      iVar2 = *piVar3;\n      close(__fd);\n      *piVar3 = iVar2;\n      __n = 0xffffffff;\n    }\n    else {\n      while( true ) {\n        __n = read(__fd,local_201c,0x2000);\n        if ((int)__n < 1) break;\n        sVar4 = write(iVar2,local_201c,__n);\n        if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return 0xffffffff;\n        }\n      }\n      iVar1 = *piVar3;\n      close(__fd);\n      close(iVar2);\n      if (__n != 0) {\n        __n = 0xffffffff;\n        *piVar3 = iVar1;\n      }\n    }\n  }" (if "if") (parenthesized_expression "(__fd < 0)" (( "(") (binary_expression "__fd < 0" (identifier "__fd") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n    __n = 0xffffffff;\n  }" ({ "{") (expression_statement "__n = 0xffffffff;" (assignment_expression "__n = 0xffffffff" (identifier "__n") (= "=") (number_literal "0xffffffff")) (; ";")) (} "}")) (else_clause "else {\n    iVar2 = open64(param_2,0x241,0x1ff);\n    piVar3 = __errno_location();\n    if (iVar2 < 0) {\n      iVar2 = *piVar3;\n      close(__fd);\n      *piVar3 = iVar2;\n      __n = 0xffffffff;\n    }\n    else {\n      while( true ) {\n        __n = read(__fd,local_201c,0x2000);\n        if ((int)__n < 1) break;\n        sVar4 = write(iVar2,local_201c,__n);\n        if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return 0xffffffff;\n        }\n      }\n      iVar1 = *piVar3;\n      close(__fd);\n      close(iVar2);\n      if (__n != 0) {\n        __n = 0xffffffff;\n        *piVar3 = iVar1;\n      }\n    }\n  }" (else "else") (compound_statement "{\n    iVar2 = open64(param_2,0x241,0x1ff);\n    piVar3 = __errno_location();\n    if (iVar2 < 0) {\n      iVar2 = *piVar3;\n      close(__fd);\n      *piVar3 = iVar2;\n      __n = 0xffffffff;\n    }\n    else {\n      while( true ) {\n        __n = read(__fd,local_201c,0x2000);\n        if ((int)__n < 1) break;\n        sVar4 = write(iVar2,local_201c,__n);\n        if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return 0xffffffff;\n        }\n      }\n      iVar1 = *piVar3;\n      close(__fd);\n      close(iVar2);\n      if (__n != 0) {\n        __n = 0xffffffff;\n        *piVar3 = iVar1;\n      }\n    }\n  }" ({ "{") (expression_statement "iVar2 = open64(param_2,0x241,0x1ff);" (assignment_expression "iVar2 = open64(param_2,0x241,0x1ff)" (identifier "iVar2") (= "=") (call_expression "open64(param_2,0x241,0x1ff)" (identifier "open64") (argument_list "(param_2,0x241,0x1ff)" (( "(") (identifier "param_2") (, ",") (number_literal "0x241") (, ",") (number_literal "0x1ff") () ")")))) (; ";")) (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" (identifier "piVar3") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar2 < 0) {\n      iVar2 = *piVar3;\n      close(__fd);\n      *piVar3 = iVar2;\n      __n = 0xffffffff;\n    }\n    else {\n      while( true ) {\n        __n = read(__fd,local_201c,0x2000);\n        if ((int)__n < 1) break;\n        sVar4 = write(iVar2,local_201c,__n);\n        if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return 0xffffffff;\n        }\n      }\n      iVar1 = *piVar3;\n      close(__fd);\n      close(iVar2);\n      if (__n != 0) {\n        __n = 0xffffffff;\n        *piVar3 = iVar1;\n      }\n    }" (if "if") (parenthesized_expression "(iVar2 < 0)" (( "(") (binary_expression "iVar2 < 0" (identifier "iVar2") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n      iVar2 = *piVar3;\n      close(__fd);\n      *piVar3 = iVar2;\n      __n = 0xffffffff;\n    }" ({ "{") (expression_statement "iVar2 = *piVar3;" (assignment_expression "iVar2 = *piVar3" (identifier "iVar2") (= "=") (pointer_expression "*piVar3" (* "*") (identifier "piVar3"))) (; ";")) (expression_statement "close(__fd);" (call_expression "close(__fd)" (identifier "close") (argument_list "(__fd)" (( "(") (identifier "__fd") () ")"))) (; ";")) (expression_statement "*piVar3 = iVar2;" (assignment_expression "*piVar3 = iVar2" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (= "=") (identifier "iVar2")) (; ";")) (expression_statement "__n = 0xffffffff;" (assignment_expression "__n = 0xffffffff" (identifier "__n") (= "=") (number_literal "0xffffffff")) (; ";")) (} "}")) (else_clause "else {\n      while( true ) {\n        __n = read(__fd,local_201c,0x2000);\n        if ((int)__n < 1) break;\n        sVar4 = write(iVar2,local_201c,__n);\n        if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return 0xffffffff;\n        }\n      }\n      iVar1 = *piVar3;\n      close(__fd);\n      close(iVar2);\n      if (__n != 0) {\n        __n = 0xffffffff;\n        *piVar3 = iVar1;\n      }\n    }" (else "else") (compound_statement "{\n      while( true ) {\n        __n = read(__fd,local_201c,0x2000);\n        if ((int)__n < 1) break;\n        sVar4 = write(iVar2,local_201c,__n);\n        if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return 0xffffffff;\n        }\n      }\n      iVar1 = *piVar3;\n      close(__fd);\n      close(iVar2);\n      if (__n != 0) {\n        __n = 0xffffffff;\n        *piVar3 = iVar1;\n      }\n    }" ({ "{") (while_statement "while( true ) {\n        __n = read(__fd,local_201c,0x2000);\n        if ((int)__n < 1) break;\n        sVar4 = write(iVar2,local_201c,__n);\n        if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return 0xffffffff;\n        }\n      }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n        __n = read(__fd,local_201c,0x2000);\n        if ((int)__n < 1) break;\n        sVar4 = write(iVar2,local_201c,__n);\n        if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return 0xffffffff;\n        }\n      }" ({ "{") (expression_statement "__n = read(__fd,local_201c,0x2000);" (assignment_expression "__n = read(__fd,local_201c,0x2000)" (identifier "__n") (= "=") (call_expression "read(__fd,local_201c,0x2000)" (identifier "read") (argument_list "(__fd,local_201c,0x2000)" (( "(") (identifier "__fd") (, ",") (identifier "local_201c") (, ",") (number_literal "0x2000") () ")")))) (; ";")) (if_statement "if ((int)__n < 1) break;" (if "if") (parenthesized_expression "((int)__n < 1)" (( "(") (binary_expression "(int)__n < 1" (cast_expression "(int)__n" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "__n")) (< "<") (number_literal "1")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "sVar4 = write(iVar2,local_201c,__n);" (assignment_expression "sVar4 = write(iVar2,local_201c,__n)" (identifier "sVar4") (= "=") (call_expression "write(iVar2,local_201c,__n)" (identifier "write") (argument_list "(iVar2,local_201c,__n)" (( "(") (identifier "iVar2") (, ",") (identifier "local_201c") (, ",") (identifier "__n") () ")")))) (; ";")) (if_statement "if (sVar4 != __n) {\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return 0xffffffff;\n        }" (if "if") (parenthesized_expression "(sVar4 != __n)" (( "(") (binary_expression "sVar4 != __n" (identifier "sVar4") (!= "!=") (identifier "__n")) () ")")) (compound_statement "{\n          iVar1 = *piVar3;\n          close(__fd);\n          close(iVar2);\n          *piVar3 = iVar1;\n          return 0xffffffff;\n        }" ({ "{") (expression_statement "iVar1 = *piVar3;" (assignment_expression "iVar1 = *piVar3" (identifier "iVar1") (= "=") (pointer_expression "*piVar3" (* "*") (identifier "piVar3"))) (; ";")) (expression_statement "close(__fd);" (call_expression "close(__fd)" (identifier "close") (argument_list "(__fd)" (( "(") (identifier "__fd") () ")"))) (; ";")) (expression_statement "close(iVar2);" (call_expression "close(iVar2)" (identifier "close") (argument_list "(iVar2)" (( "(") (identifier "iVar2") () ")"))) (; ";")) (expression_statement "*piVar3 = iVar1;" (assignment_expression "*piVar3 = iVar1" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (= "=") (identifier "iVar1")) (; ";")) (return_statement "return 0xffffffff;" (return "return") (number_literal "0xffffffff") (; ";")) (} "}"))) (} "}"))) (expression_statement "iVar1 = *piVar3;" (assignment_expression "iVar1 = *piVar3" (identifier "iVar1") (= "=") (pointer_expression "*piVar3" (* "*") (identifier "piVar3"))) (; ";")) (expression_statement "close(__fd);" (call_expression "close(__fd)" (identifier "close") (argument_list "(__fd)" (( "(") (identifier "__fd") () ")"))) (; ";")) (expression_statement "close(iVar2);" (call_expression "close(iVar2)" (identifier "close") (argument_list "(iVar2)" (( "(") (identifier "iVar2") () ")"))) (; ";")) (if_statement "if (__n != 0) {\n        __n = 0xffffffff;\n        *piVar3 = iVar1;\n      }" (if "if") (parenthesized_expression "(__n != 0)" (( "(") (binary_expression "__n != 0" (identifier "__n") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        __n = 0xffffffff;\n        *piVar3 = iVar1;\n      }" ({ "{") (expression_statement "__n = 0xffffffff;" (assignment_expression "__n = 0xffffffff" (identifier "__n") (= "=") (number_literal "0xffffffff")) (; ";")) (expression_statement "*piVar3 = iVar1;" (assignment_expression "*piVar3 = iVar1" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (= "=") (identifier "iVar1")) (; ";")) (} "}"))) (} "}")))) (} "}")))) (return_statement "return __n;" (return "return") (identifier "__n") (; ";")) (} "}")))

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

int __regparm3 function_1(char *from,char *to)

{
  int iVar1;
  int var_2;
  int var_4;
  int *piVar3;
  size_t var_8;
  size_t var_9;
  char buf [8192];
  
  var_2 = var_1(from,0);
  if (var_2 < 0) {
    var_9 = 0xffffffff;
  }
  else {
    var_4 = var_1(to,0x241,0x1ff);
    piVar3 = var_3();
    if (var_4 < 0) {
      var_4 = *piVar3;
      var_5(var_2);
      *piVar3 = var_4;
      var_9 = 0xffffffff;
    }
    else {
      while( true ) {
        var_9 = var_6(var_2,buf,0x2000);
        if ((int)var_9 < 1) break;
        var_8 = var_7(var_4,buf,var_9);
        if (var_8 != var_9) {
          iVar1 = *piVar3;
          var_5(var_2);
          var_5(var_4);
          *piVar3 = iVar1;
          return -1;
        }
      }
      iVar1 = *piVar3;
      var_5(var_2);
      var_5(var_4);
      if (var_9 != 0) {
        var_9 = 0xffffffff;
        *piVar3 = iVar1;
      }
    }
  }
  return var_9;
}


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

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

size_t __regparm3 MASKED(char *param_1,char *param_2)

{
  int iVar1;
  int __fd;
  int iVar2;
  int *piVar3;
  size_t sVar4;
  size_t __n;
  undefined1 local_201c [8200];
  undefined4 uStack_14;
  
  uStack_14 = 0x1740b;
  __fd = open64(param_1,0);
  if (__fd < 0) {
    __n = 0xffffffff;
  }
  else {
    iVar2 = open64(param_2,0x241,0x1ff);
    piVar3 = __errno_location();
    if (iVar2 < 0) {
      iVar2 = *piVar3;
      close(__fd);
      *piVar3 = iVar2;
      __n = 0xffffffff;
    }
    else {
      while( true ) {
        __n = read(__fd,local_201c,0x2000);
        if ((int)__n < 1) break;
        sVar4 = write(iVar2,local_201c,__n);
        if (sVar4 != __n) {
          iVar1 = *piVar3;
          close(__fd);
          close(iVar2);
          *piVar3 = iVar1;
          return 0xffffffff;
        }
      }
      iVar1 = *piVar3;
      close(__fd);
      close(iVar2);
      if (__n != 0) {
        __n = 0xffffffff;
        *piVar3 = iVar1;
      }
    }
  }
  return __n;
}

