
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::__basic_file<char>::xsputn_2(char const*, int, char const*, int) */

void std::__basic_file<char>::xsputn_2(char *param_1,int param_2,char *param_3,int param_4)

{
}



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

int FUN_00248b10(undefined4 param_1,void *param_2,size_t param_3,undefined4 param_4,int param_5)

{
  int iVar1;
  ssize_t sVar2;
  int *piVar3;
  int iVar4;
  int iVar5;
  iovec local_2c;
  undefined4 local_24;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x248b19;
  iVar1 = FUN_002489c0(param_1);
  iVar4 = param_5 + param_3;
  local_24 = param_4;
  local_20 = param_5;
  iVar5 = iVar4;
  while( true ) {
    while( true ) {
      local_2c.iov_base = param_2;
      local_2c.iov_len = param_3;
      sVar2 = writev(iVar1,&local_2c,2);
      if (sVar2 != -1) break;
      piVar3 = __errno_location();
      if (*piVar3 != 4) {
        return iVar4 - iVar5;
      }
    }
    iVar5 = iVar5 - sVar2;
    if (iVar5 == 0) break;
    if (-1 < (int)(sVar2 - param_3)) {
      iVar1 = FUN_002487d0();
      return iVar4 - (iVar5 - iVar1);
    }
    param_2 = (void *)((int)param_2 + sVar2);
    param_3 = param_3 - sVar2;
  }
  return iVar4;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x0003a210
ADD EBX,0x1cb4e7
SUB ESP,0x38
MOV ESI,dword ptr [ESP + 0x54]
PUSH dword ptr [ESP + 0x4c]
CALL 0x002489c0
ADD ESP,0x10
MOV EBP,dword ptr [ESP + 0x50]
MOV dword ptr [ESP + 0x8],EAX
MOV EAX,dword ptr [ESP + 0x4c]
ADD EBP,ESI
MOV dword ptr [ESP + 0x18],EAX
MOV EAX,dword ptr [ESP + 0x50]
MOV EDI,EBP
MOV dword ptr [ESP + 0x1c],EAX
LEA EAX,[ESP + 0x10]
MOV dword ptr [ESP + 0xc],EAX
JMP 0x00248b70
SUB EDI,EAX
JZ 0x00248ba2
MOV EDX,EAX
SUB EDX,ESI
JNS 0x00248bb0
ADD dword ptr [ESP + 0x44],EAX
SUB ESI,EAX
MOV EAX,dword ptr [ESP + 0x44]
MOV dword ptr [ESP + 0x14],ESI
SUB ESP,0x4
MOV dword ptr [ESP + 0x14],EAX
PUSH 0x2
PUSH dword ptr [ESP + 0x14]
PUSH dword ptr [ESP + 0x14]
CALL 0x0002c470
ADD ESP,0x10
CMP EAX,-0x1
JNZ 0x00248b60
CALL 0x0002c480
CMP dword ptr [EAX],0x4
JZ 0x00248b70
SUB EBP,EDI
ADD ESP,0x2c
MOV EAX,EBP
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV ECX,dword ptr [ESP + 0x50]
MOV EAX,dword ptr [ESP + 0x8]
SUB ECX,EDX
ADD EDX,dword ptr [ESP + 0x4c]
CALL 0x002487d0
ADD ESP,0x2c
SUB EDI,EAX
POP EBX
POP ESI
SUB EBP,EDI
POP EDI
MOV EAX,EBP
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint FUN_00248b10(undefined4 param_1,void *param_2,size_t param_3,undefined4 param_4,int param_5)\n\n{\n  int iVar1;\n  ssize_t sVar2;\n  int *piVar3;\n  int iVar4;\n  int iVar5;\n  iovec local_2c;\n  undefined4 local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x248b19;\n  iVar1 = FUN_002489c0(param_1);\n  iVar4 = param_5 + param_3;\n  local_24 = param_4;\n  local_20 = param_5;\n  iVar5 = iVar4;\n  while( true ) {\n    while( true ) {\n      local_2c.iov_base = param_2;\n      local_2c.iov_len = param_3;\n      sVar2 = writev(iVar1,&local_2c,2);\n      if (sVar2 != -1) break;\n      piVar3 = __errno_location();\n      if (*piVar3 != 4) {\n        return iVar4 - iVar5;\n      }\n    }\n    iVar5 = iVar5 - sVar2;\n    if (iVar5 == 0) break;\n    if (-1 < (int)(sVar2 - param_3)) {\n      iVar1 = FUN_002487d0();\n      return iVar4 - (iVar5 - iVar1);\n    }\n    param_2 = (void *)((int)param_2 + sVar2);\n    param_3 = param_3 - sVar2;\n  }\n  return iVar4;\n}\n\n" comment (function_definition "int FUN_00248b10(undefined4 param_1,void *param_2,size_t param_3,undefined4 param_4,int param_5)\n\n{\n  int iVar1;\n  ssize_t sVar2;\n  int *piVar3;\n  int iVar4;\n  int iVar5;\n  iovec local_2c;\n  undefined4 local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x248b19;\n  iVar1 = FUN_002489c0(param_1);\n  iVar4 = param_5 + param_3;\n  local_24 = param_4;\n  local_20 = param_5;\n  iVar5 = iVar4;\n  while( true ) {\n    while( true ) {\n      local_2c.iov_base = param_2;\n      local_2c.iov_len = param_3;\n      sVar2 = writev(iVar1,&local_2c,2);\n      if (sVar2 != -1) break;\n      piVar3 = __errno_location();\n      if (*piVar3 != 4) {\n        return iVar4 - iVar5;\n      }\n    }\n    iVar5 = iVar5 - sVar2;\n    if (iVar5 == 0) break;\n    if (-1 < (int)(sVar2 - param_3)) {\n      iVar1 = FUN_002487d0();\n      return iVar4 - (iVar5 - iVar1);\n    }\n    param_2 = (void *)((int)param_2 + sVar2);\n    param_3 = param_3 - sVar2;\n  }\n  return iVar4;\n}" primitive_type (function_declarator "FUN_00248b10(undefined4 param_1,void *param_2,size_t param_3,undefined4 param_4,int param_5)" identifier (parameter_list "(undefined4 param_1,void *param_2,size_t param_3,undefined4 param_4,int param_5)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "void *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "size_t param_3" primitive_type identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "int param_5" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  ssize_t sVar2;\n  int *piVar3;\n  int iVar4;\n  int iVar5;\n  iovec local_2c;\n  undefined4 local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x248b19;\n  iVar1 = FUN_002489c0(param_1);\n  iVar4 = param_5 + param_3;\n  local_24 = param_4;\n  local_20 = param_5;\n  iVar5 = iVar4;\n  while( true ) {\n    while( true ) {\n      local_2c.iov_base = param_2;\n      local_2c.iov_len = param_3;\n      sVar2 = writev(iVar1,&local_2c,2);\n      if (sVar2 != -1) break;\n      piVar3 = __errno_location();\n      if (*piVar3 != 4) {\n        return iVar4 - iVar5;\n      }\n    }\n    iVar5 = iVar5 - sVar2;\n    if (iVar5 == 0) break;\n    if (-1 < (int)(sVar2 - param_3)) {\n      iVar1 = FUN_002487d0();\n      return iVar4 - (iVar5 - iVar1);\n    }\n    param_2 = (void *)((int)param_2 + sVar2);\n    param_3 = param_3 - sVar2;\n  }\n  return iVar4;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "ssize_t sVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "iovec local_2c;" type_identifier identifier ;) (declaration "undefined4 local_24;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x248b19;" (assignment_expression "uStack_14 = 0x248b19" identifier = number_literal) ;) (expression_statement "iVar1 = FUN_002489c0(param_1);" (assignment_expression "iVar1 = FUN_002489c0(param_1)" identifier = (call_expression "FUN_002489c0(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "iVar4 = param_5 + param_3;" (assignment_expression "iVar4 = param_5 + param_3" identifier = (binary_expression "param_5 + param_3" identifier + identifier)) ;) (expression_statement "local_24 = param_4;" (assignment_expression "local_24 = param_4" identifier = identifier) ;) (expression_statement "local_20 = param_5;" (assignment_expression "local_20 = param_5" identifier = identifier) ;) (expression_statement "iVar5 = iVar4;" (assignment_expression "iVar5 = iVar4" identifier = identifier) ;) (while_statement "while( true ) {\n    while( true ) {\n      local_2c.iov_base = param_2;\n      local_2c.iov_len = param_3;\n      sVar2 = writev(iVar1,&local_2c,2);\n      if (sVar2 != -1) break;\n      piVar3 = __errno_location();\n      if (*piVar3 != 4) {\n        return iVar4 - iVar5;\n      }\n    }\n    iVar5 = iVar5 - sVar2;\n    if (iVar5 == 0) break;\n    if (-1 < (int)(sVar2 - param_3)) {\n      iVar1 = FUN_002487d0();\n      return iVar4 - (iVar5 - iVar1);\n    }\n    param_2 = (void *)((int)param_2 + sVar2);\n    param_3 = param_3 - sVar2;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    while( true ) {\n      local_2c.iov_base = param_2;\n      local_2c.iov_len = param_3;\n      sVar2 = writev(iVar1,&local_2c,2);\n      if (sVar2 != -1) break;\n      piVar3 = __errno_location();\n      if (*piVar3 != 4) {\n        return iVar4 - iVar5;\n      }\n    }\n    iVar5 = iVar5 - sVar2;\n    if (iVar5 == 0) break;\n    if (-1 < (int)(sVar2 - param_3)) {\n      iVar1 = FUN_002487d0();\n      return iVar4 - (iVar5 - iVar1);\n    }\n    param_2 = (void *)((int)param_2 + sVar2);\n    param_3 = param_3 - sVar2;\n  }" { (while_statement "while( true ) {\n      local_2c.iov_base = param_2;\n      local_2c.iov_len = param_3;\n      sVar2 = writev(iVar1,&local_2c,2);\n      if (sVar2 != -1) break;\n      piVar3 = __errno_location();\n      if (*piVar3 != 4) {\n        return iVar4 - iVar5;\n      }\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      local_2c.iov_base = param_2;\n      local_2c.iov_len = param_3;\n      sVar2 = writev(iVar1,&local_2c,2);\n      if (sVar2 != -1) break;\n      piVar3 = __errno_location();\n      if (*piVar3 != 4) {\n        return iVar4 - iVar5;\n      }\n    }" { (expression_statement "local_2c.iov_base = param_2;" (assignment_expression "local_2c.iov_base = param_2" (field_expression "local_2c.iov_base" identifier . field_identifier) = identifier) ;) (expression_statement "local_2c.iov_len = param_3;" (assignment_expression "local_2c.iov_len = param_3" (field_expression "local_2c.iov_len" identifier . field_identifier) = identifier) ;) (expression_statement "sVar2 = writev(iVar1,&local_2c,2);" (assignment_expression "sVar2 = writev(iVar1,&local_2c,2)" identifier = (call_expression "writev(iVar1,&local_2c,2)" identifier (argument_list "(iVar1,&local_2c,2)" ( identifier , (pointer_expression "&local_2c" & identifier) , number_literal )))) ;) (if_statement "if (sVar2 != -1) break;" if (parenthesized_expression "(sVar2 != -1)" ( (binary_expression "sVar2 != -1" identifier != number_literal) )) (break_statement "break;" break ;)) (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (if_statement "if (*piVar3 != 4) {\n        return iVar4 - iVar5;\n      }" if (parenthesized_expression "(*piVar3 != 4)" ( (binary_expression "*piVar3 != 4" (pointer_expression "*piVar3" * identifier) != number_literal) )) (compound_statement "{\n        return iVar4 - iVar5;\n      }" { (return_statement "return iVar4 - iVar5;" return (binary_expression "iVar4 - iVar5" identifier - identifier) ;) })) })) (expression_statement "iVar5 = iVar5 - sVar2;" (assignment_expression "iVar5 = iVar5 - sVar2" identifier = (binary_expression "iVar5 - sVar2" identifier - identifier)) ;) (if_statement "if (iVar5 == 0) break;" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (if_statement "if (-1 < (int)(sVar2 - param_3)) {\n      iVar1 = FUN_002487d0();\n      return iVar4 - (iVar5 - iVar1);\n    }" if (parenthesized_expression "(-1 < (int)(sVar2 - param_3))" ( (binary_expression "-1 < (int)(sVar2 - param_3)" number_literal < (cast_expression "(int)(sVar2 - param_3)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(sVar2 - param_3)" ( (binary_expression "sVar2 - param_3" identifier - identifier) )))) )) (compound_statement "{\n      iVar1 = FUN_002487d0();\n      return iVar4 - (iVar5 - iVar1);\n    }" { (expression_statement "iVar1 = FUN_002487d0();" (assignment_expression "iVar1 = FUN_002487d0()" identifier = (call_expression "FUN_002487d0()" identifier (argument_list "()" ( )))) ;) (return_statement "return iVar4 - (iVar5 - iVar1);" return (binary_expression "iVar4 - (iVar5 - iVar1)" identifier - (parenthesized_expression "(iVar5 - iVar1)" ( (binary_expression "iVar5 - iVar1" identifier - identifier) ))) ;) })) (expression_statement "param_2 = (void *)((int)param_2 + sVar2);" (assignment_expression "param_2 = (void *)((int)param_2 + sVar2)" identifier = (cast_expression "(void *)((int)param_2 + sVar2)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_2 + sVar2)" ( (binary_expression "(int)param_2 + sVar2" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (expression_statement "param_3 = param_3 - sVar2;" (assignment_expression "param_3 = param_3 - sVar2" identifier = (binary_expression "param_3 - sVar2" identifier - identifier)) ;) })) (return_statement "return iVar4;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* std::__basic_file<char>::xsputn_2(char const*, int, char const*, int) */\n\nvoid std::__basic_file<char>::xsputn_2(char *param_1,int param_2,char *param_3,int param_4)\n\n{\n}\n\n" comment comment (function_definition "void std::__basic_file<char>::xsputn_2(char *param_1,int param_2,char *param_3,int param_4)\n\n{\n}" primitive_type (ERROR "std::__basic_file<char>::" identifier : : identifier < primitive_type > : :) (function_declarator "xsputn_2(char *param_1,int param_2,char *param_3,int param_4)" identifier (parameter_list "(char *param_1,int param_2,char *param_3,int param_4)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "char *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n}" { })))
(translation_unit "int FUN_00248b10(undefined4 param_1,void *param_2,size_t param_3,undefined4 param_4,int param_5)\n\n{\n  int iVar1;\n  ssize_t sVar2;\n  int *piVar3;\n  int iVar4;\n  int iVar5;\n  iovec local_2c;\n  undefined4 local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x248b19;\n  iVar1 = FUN_002489c0(param_1);\n  iVar4 = param_5 + param_3;\n  local_24 = param_4;\n  local_20 = param_5;\n  iVar5 = iVar4;\n  while( true ) {\n    while( true ) {\n      local_2c.iov_base = param_2;\n      local_2c.iov_len = param_3;\n      sVar2 = writev(iVar1,&local_2c,2);\n      if (sVar2 != -1) break;\n      piVar3 = __errno_location();\n      if (*piVar3 != 4) {\n        return iVar4 - iVar5;\n      }\n    }\n    iVar5 = iVar5 - sVar2;\n    if (iVar5 == 0) break;\n    if (-1 < (int)(sVar2 - param_3)) {\n      iVar1 = FUN_002487d0();\n      return iVar4 - (iVar5 - iVar1);\n    }\n    param_2 = (void *)((int)param_2 + sVar2);\n    param_3 = param_3 - sVar2;\n  }\n  return iVar4;\n}\n\n" (function_definition "int FUN_00248b10(undefined4 param_1,void *param_2,size_t param_3,undefined4 param_4,int param_5)\n\n{\n  int iVar1;\n  ssize_t sVar2;\n  int *piVar3;\n  int iVar4;\n  int iVar5;\n  iovec local_2c;\n  undefined4 local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x248b19;\n  iVar1 = FUN_002489c0(param_1);\n  iVar4 = param_5 + param_3;\n  local_24 = param_4;\n  local_20 = param_5;\n  iVar5 = iVar4;\n  while( true ) {\n    while( true ) {\n      local_2c.iov_base = param_2;\n      local_2c.iov_len = param_3;\n      sVar2 = writev(iVar1,&local_2c,2);\n      if (sVar2 != -1) break;\n      piVar3 = __errno_location();\n      if (*piVar3 != 4) {\n        return iVar4 - iVar5;\n      }\n    }\n    iVar5 = iVar5 - sVar2;\n    if (iVar5 == 0) break;\n    if (-1 < (int)(sVar2 - param_3)) {\n      iVar1 = FUN_002487d0();\n      return iVar4 - (iVar5 - iVar1);\n    }\n    param_2 = (void *)((int)param_2 + sVar2);\n    param_3 = param_3 - sVar2;\n  }\n  return iVar4;\n}" primitive_type (function_declarator "FUN_00248b10(undefined4 param_1,void *param_2,size_t param_3,undefined4 param_4,int param_5)" identifier (parameter_list "(undefined4 param_1,void *param_2,size_t param_3,undefined4 param_4,int param_5)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "void *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "size_t param_3" primitive_type identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "int param_5" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  ssize_t sVar2;\n  int *piVar3;\n  int iVar4;\n  int iVar5;\n  iovec local_2c;\n  undefined4 local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x248b19;\n  iVar1 = FUN_002489c0(param_1);\n  iVar4 = param_5 + param_3;\n  local_24 = param_4;\n  local_20 = param_5;\n  iVar5 = iVar4;\n  while( true ) {\n    while( true ) {\n      local_2c.iov_base = param_2;\n      local_2c.iov_len = param_3;\n      sVar2 = writev(iVar1,&local_2c,2);\n      if (sVar2 != -1) break;\n      piVar3 = __errno_location();\n      if (*piVar3 != 4) {\n        return iVar4 - iVar5;\n      }\n    }\n    iVar5 = iVar5 - sVar2;\n    if (iVar5 == 0) break;\n    if (-1 < (int)(sVar2 - param_3)) {\n      iVar1 = FUN_002487d0();\n      return iVar4 - (iVar5 - iVar1);\n    }\n    param_2 = (void *)((int)param_2 + sVar2);\n    param_3 = param_3 - sVar2;\n  }\n  return iVar4;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "ssize_t sVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "iovec local_2c;" type_identifier identifier ;) (declaration "undefined4 local_24;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x248b19;" (assignment_expression "uStack_14 = 0x248b19" identifier = number_literal) ;) (expression_statement "iVar1 = FUN_002489c0(param_1);" (assignment_expression "iVar1 = FUN_002489c0(param_1)" identifier = (call_expression "FUN_002489c0(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "iVar4 = param_5 + param_3;" (assignment_expression "iVar4 = param_5 + param_3" identifier = (binary_expression "param_5 + param_3" identifier + identifier)) ;) (expression_statement "local_24 = param_4;" (assignment_expression "local_24 = param_4" identifier = identifier) ;) (expression_statement "local_20 = param_5;" (assignment_expression "local_20 = param_5" identifier = identifier) ;) (expression_statement "iVar5 = iVar4;" (assignment_expression "iVar5 = iVar4" identifier = identifier) ;) (while_statement "while( true ) {\n    while( true ) {\n      local_2c.iov_base = param_2;\n      local_2c.iov_len = param_3;\n      sVar2 = writev(iVar1,&local_2c,2);\n      if (sVar2 != -1) break;\n      piVar3 = __errno_location();\n      if (*piVar3 != 4) {\n        return iVar4 - iVar5;\n      }\n    }\n    iVar5 = iVar5 - sVar2;\n    if (iVar5 == 0) break;\n    if (-1 < (int)(sVar2 - param_3)) {\n      iVar1 = FUN_002487d0();\n      return iVar4 - (iVar5 - iVar1);\n    }\n    param_2 = (void *)((int)param_2 + sVar2);\n    param_3 = param_3 - sVar2;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    while( true ) {\n      local_2c.iov_base = param_2;\n      local_2c.iov_len = param_3;\n      sVar2 = writev(iVar1,&local_2c,2);\n      if (sVar2 != -1) break;\n      piVar3 = __errno_location();\n      if (*piVar3 != 4) {\n        return iVar4 - iVar5;\n      }\n    }\n    iVar5 = iVar5 - sVar2;\n    if (iVar5 == 0) break;\n    if (-1 < (int)(sVar2 - param_3)) {\n      iVar1 = FUN_002487d0();\n      return iVar4 - (iVar5 - iVar1);\n    }\n    param_2 = (void *)((int)param_2 + sVar2);\n    param_3 = param_3 - sVar2;\n  }" { (while_statement "while( true ) {\n      local_2c.iov_base = param_2;\n      local_2c.iov_len = param_3;\n      sVar2 = writev(iVar1,&local_2c,2);\n      if (sVar2 != -1) break;\n      piVar3 = __errno_location();\n      if (*piVar3 != 4) {\n        return iVar4 - iVar5;\n      }\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      local_2c.iov_base = param_2;\n      local_2c.iov_len = param_3;\n      sVar2 = writev(iVar1,&local_2c,2);\n      if (sVar2 != -1) break;\n      piVar3 = __errno_location();\n      if (*piVar3 != 4) {\n        return iVar4 - iVar5;\n      }\n    }" { (expression_statement "local_2c.iov_base = param_2;" (assignment_expression "local_2c.iov_base = param_2" (field_expression "local_2c.iov_base" identifier . field_identifier) = identifier) ;) (expression_statement "local_2c.iov_len = param_3;" (assignment_expression "local_2c.iov_len = param_3" (field_expression "local_2c.iov_len" identifier . field_identifier) = identifier) ;) (expression_statement "sVar2 = writev(iVar1,&local_2c,2);" (assignment_expression "sVar2 = writev(iVar1,&local_2c,2)" identifier = (call_expression "writev(iVar1,&local_2c,2)" identifier (argument_list "(iVar1,&local_2c,2)" ( identifier , (pointer_expression "&local_2c" & identifier) , number_literal )))) ;) (if_statement "if (sVar2 != -1) break;" if (parenthesized_expression "(sVar2 != -1)" ( (binary_expression "sVar2 != -1" identifier != number_literal) )) (break_statement "break;" break ;)) (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (if_statement "if (*piVar3 != 4) {\n        return iVar4 - iVar5;\n      }" if (parenthesized_expression "(*piVar3 != 4)" ( (binary_expression "*piVar3 != 4" (pointer_expression "*piVar3" * identifier) != number_literal) )) (compound_statement "{\n        return iVar4 - iVar5;\n      }" { (return_statement "return iVar4 - iVar5;" return (binary_expression "iVar4 - iVar5" identifier - identifier) ;) })) })) (expression_statement "iVar5 = iVar5 - sVar2;" (assignment_expression "iVar5 = iVar5 - sVar2" identifier = (binary_expression "iVar5 - sVar2" identifier - identifier)) ;) (if_statement "if (iVar5 == 0) break;" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (if_statement "if (-1 < (int)(sVar2 - param_3)) {\n      iVar1 = FUN_002487d0();\n      return iVar4 - (iVar5 - iVar1);\n    }" if (parenthesized_expression "(-1 < (int)(sVar2 - param_3))" ( (binary_expression "-1 < (int)(sVar2 - param_3)" number_literal < (cast_expression "(int)(sVar2 - param_3)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(sVar2 - param_3)" ( (binary_expression "sVar2 - param_3" identifier - identifier) )))) )) (compound_statement "{\n      iVar1 = FUN_002487d0();\n      return iVar4 - (iVar5 - iVar1);\n    }" { (expression_statement "iVar1 = FUN_002487d0();" (assignment_expression "iVar1 = FUN_002487d0()" identifier = (call_expression "FUN_002487d0()" identifier (argument_list "()" ( )))) ;) (return_statement "return iVar4 - (iVar5 - iVar1);" return (binary_expression "iVar4 - (iVar5 - iVar1)" identifier - (parenthesized_expression "(iVar5 - iVar1)" ( (binary_expression "iVar5 - iVar1" identifier - identifier) ))) ;) })) (expression_statement "param_2 = (void *)((int)param_2 + sVar2);" (assignment_expression "param_2 = (void *)((int)param_2 + sVar2)" identifier = (cast_expression "(void *)((int)param_2 + sVar2)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_2 + sVar2)" ( (binary_expression "(int)param_2 + sVar2" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (expression_statement "param_3 = param_3 - sVar2;" (assignment_expression "param_3 = param_3 - sVar2" identifier = (binary_expression "param_3 - sVar2" identifier - identifier)) ;) })) (return_statement "return iVar4;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (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 IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression (field_expression IDENT . field_identifier) = IDENT) ;) (expression_statement (assignment_expression (field_expression IDENT . field_identifier) = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (pointer_expression & IDENT) , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != LIT) )) (compound_statement { (return_statement return (binary_expression IDENT - IDENT) ;) })) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (break_statement break ;)) (if_statement if (parenthesized_expression ( (binary_expression LIT < (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression IDENT - IDENT) )))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (return_statement return (binary_expression IDENT - (parenthesized_expression ( (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) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) })) (return_statement return IDENT ;) })))
(function_definition "int FUN_00248b10(undefined4 param_1,void *param_2,size_t param_3,undefined4 param_4,int param_5)\n\n{\n  int iVar1;\n  ssize_t sVar2;\n  int *piVar3;\n  int iVar4;\n  int iVar5;\n  iovec local_2c;\n  undefined4 local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x248b19;\n  iVar1 = FUN_002489c0(param_1);\n  iVar4 = param_5 + param_3;\n  local_24 = param_4;\n  local_20 = param_5;\n  iVar5 = iVar4;\n  while( true ) {\n    while( true ) {\n      local_2c.iov_base = param_2;\n      local_2c.iov_len = param_3;\n      sVar2 = writev(iVar1,&local_2c,2);\n      if (sVar2 != -1) break;\n      piVar3 = __errno_location();\n      if (*piVar3 != 4) {\n        return iVar4 - iVar5;\n      }\n    }\n    iVar5 = iVar5 - sVar2;\n    if (iVar5 == 0) break;\n    if (-1 < (int)(sVar2 - param_3)) {\n      iVar1 = FUN_002487d0();\n      return iVar4 - (iVar5 - iVar1);\n    }\n    param_2 = (void *)((int)param_2 + sVar2);\n    param_3 = param_3 - sVar2;\n  }\n  return iVar4;\n}" (primitive_type "int") (function_declarator "FUN_00248b10(undefined4 param_1,void *param_2,size_t param_3,undefined4 param_4,int param_5)" (identifier "FUN_00248b10") (parameter_list "(undefined4 param_1,void *param_2,size_t param_3,undefined4 param_4,int param_5)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "void *param_2" (primitive_type "void") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "size_t param_3" (primitive_type "size_t") (identifier "param_3")) (, ",") (parameter_declaration "undefined4 param_4" (type_identifier "undefined4") (identifier "param_4")) (, ",") (parameter_declaration "int param_5" (primitive_type "int") (identifier "param_5")) () ")"))) (compound_statement "{\n  int iVar1;\n  ssize_t sVar2;\n  int *piVar3;\n  int iVar4;\n  int iVar5;\n  iovec local_2c;\n  undefined4 local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x248b19;\n  iVar1 = FUN_002489c0(param_1);\n  iVar4 = param_5 + param_3;\n  local_24 = param_4;\n  local_20 = param_5;\n  iVar5 = iVar4;\n  while( true ) {\n    while( true ) {\n      local_2c.iov_base = param_2;\n      local_2c.iov_len = param_3;\n      sVar2 = writev(iVar1,&local_2c,2);\n      if (sVar2 != -1) break;\n      piVar3 = __errno_location();\n      if (*piVar3 != 4) {\n        return iVar4 - iVar5;\n      }\n    }\n    iVar5 = iVar5 - sVar2;\n    if (iVar5 == 0) break;\n    if (-1 < (int)(sVar2 - param_3)) {\n      iVar1 = FUN_002487d0();\n      return iVar4 - (iVar5 - iVar1);\n    }\n    param_2 = (void *)((int)param_2 + sVar2);\n    param_3 = param_3 - sVar2;\n  }\n  return iVar4;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "ssize_t sVar2;" (primitive_type "ssize_t") (identifier "sVar2") (; ";")) (declaration "int *piVar3;" (primitive_type "int") (pointer_declarator "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "iovec local_2c;" (type_identifier "iovec") (identifier "local_2c") (; ";")) (declaration "undefined4 local_24;" (type_identifier "undefined4") (identifier "local_24") (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x248b19;" (assignment_expression "uStack_14 = 0x248b19" (identifier "uStack_14") (= "=") (number_literal "0x248b19")) (; ";")) (expression_statement "iVar1 = FUN_002489c0(param_1);" (assignment_expression "iVar1 = FUN_002489c0(param_1)" (identifier "iVar1") (= "=") (call_expression "FUN_002489c0(param_1)" (identifier "FUN_002489c0") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (expression_statement "iVar4 = param_5 + param_3;" (assignment_expression "iVar4 = param_5 + param_3" (identifier "iVar4") (= "=") (binary_expression "param_5 + param_3" (identifier "param_5") (+ "+") (identifier "param_3"))) (; ";")) (expression_statement "local_24 = param_4;" (assignment_expression "local_24 = param_4" (identifier "local_24") (= "=") (identifier "param_4")) (; ";")) (expression_statement "local_20 = param_5;" (assignment_expression "local_20 = param_5" (identifier "local_20") (= "=") (identifier "param_5")) (; ";")) (expression_statement "iVar5 = iVar4;" (assignment_expression "iVar5 = iVar4" (identifier "iVar5") (= "=") (identifier "iVar4")) (; ";")) (while_statement "while( true ) {\n    while( true ) {\n      local_2c.iov_base = param_2;\n      local_2c.iov_len = param_3;\n      sVar2 = writev(iVar1,&local_2c,2);\n      if (sVar2 != -1) break;\n      piVar3 = __errno_location();\n      if (*piVar3 != 4) {\n        return iVar4 - iVar5;\n      }\n    }\n    iVar5 = iVar5 - sVar2;\n    if (iVar5 == 0) break;\n    if (-1 < (int)(sVar2 - param_3)) {\n      iVar1 = FUN_002487d0();\n      return iVar4 - (iVar5 - iVar1);\n    }\n    param_2 = (void *)((int)param_2 + sVar2);\n    param_3 = param_3 - sVar2;\n  }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n    while( true ) {\n      local_2c.iov_base = param_2;\n      local_2c.iov_len = param_3;\n      sVar2 = writev(iVar1,&local_2c,2);\n      if (sVar2 != -1) break;\n      piVar3 = __errno_location();\n      if (*piVar3 != 4) {\n        return iVar4 - iVar5;\n      }\n    }\n    iVar5 = iVar5 - sVar2;\n    if (iVar5 == 0) break;\n    if (-1 < (int)(sVar2 - param_3)) {\n      iVar1 = FUN_002487d0();\n      return iVar4 - (iVar5 - iVar1);\n    }\n    param_2 = (void *)((int)param_2 + sVar2);\n    param_3 = param_3 - sVar2;\n  }" ({ "{") (while_statement "while( true ) {\n      local_2c.iov_base = param_2;\n      local_2c.iov_len = param_3;\n      sVar2 = writev(iVar1,&local_2c,2);\n      if (sVar2 != -1) break;\n      piVar3 = __errno_location();\n      if (*piVar3 != 4) {\n        return iVar4 - iVar5;\n      }\n    }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n      local_2c.iov_base = param_2;\n      local_2c.iov_len = param_3;\n      sVar2 = writev(iVar1,&local_2c,2);\n      if (sVar2 != -1) break;\n      piVar3 = __errno_location();\n      if (*piVar3 != 4) {\n        return iVar4 - iVar5;\n      }\n    }" ({ "{") (expression_statement "local_2c.iov_base = param_2;" (assignment_expression "local_2c.iov_base = param_2" (field_expression "local_2c.iov_base" (identifier "local_2c") (. ".") (field_identifier "iov_base")) (= "=") (identifier "param_2")) (; ";")) (expression_statement "local_2c.iov_len = param_3;" (assignment_expression "local_2c.iov_len = param_3" (field_expression "local_2c.iov_len" (identifier "local_2c") (. ".") (field_identifier "iov_len")) (= "=") (identifier "param_3")) (; ";")) (expression_statement "sVar2 = writev(iVar1,&local_2c,2);" (assignment_expression "sVar2 = writev(iVar1,&local_2c,2)" (identifier "sVar2") (= "=") (call_expression "writev(iVar1,&local_2c,2)" (identifier "writev") (argument_list "(iVar1,&local_2c,2)" (( "(") (identifier "iVar1") (, ",") (pointer_expression "&local_2c" (& "&") (identifier "local_2c")) (, ",") (number_literal "2") () ")")))) (; ";")) (if_statement "if (sVar2 != -1) break;" (if "if") (parenthesized_expression "(sVar2 != -1)" (( "(") (binary_expression "sVar2 != -1" (identifier "sVar2") (!= "!=") (number_literal "-1")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" (identifier "piVar3") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (*piVar3 != 4) {\n        return iVar4 - iVar5;\n      }" (if "if") (parenthesized_expression "(*piVar3 != 4)" (( "(") (binary_expression "*piVar3 != 4" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (!= "!=") (number_literal "4")) () ")")) (compound_statement "{\n        return iVar4 - iVar5;\n      }" ({ "{") (return_statement "return iVar4 - iVar5;" (return "return") (binary_expression "iVar4 - iVar5" (identifier "iVar4") (- "-") (identifier "iVar5")) (; ";")) (} "}"))) (} "}"))) (expression_statement "iVar5 = iVar5 - sVar2;" (assignment_expression "iVar5 = iVar5 - sVar2" (identifier "iVar5") (= "=") (binary_expression "iVar5 - sVar2" (identifier "iVar5") (- "-") (identifier "sVar2"))) (; ";")) (if_statement "if (iVar5 == 0) break;" (if "if") (parenthesized_expression "(iVar5 == 0)" (( "(") (binary_expression "iVar5 == 0" (identifier "iVar5") (== "==") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (if_statement "if (-1 < (int)(sVar2 - param_3)) {\n      iVar1 = FUN_002487d0();\n      return iVar4 - (iVar5 - iVar1);\n    }" (if "if") (parenthesized_expression "(-1 < (int)(sVar2 - param_3))" (( "(") (binary_expression "-1 < (int)(sVar2 - param_3)" (number_literal "-1") (< "<") (cast_expression "(int)(sVar2 - param_3)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(sVar2 - param_3)" (( "(") (binary_expression "sVar2 - param_3" (identifier "sVar2") (- "-") (identifier "param_3")) () ")")))) () ")")) (compound_statement "{\n      iVar1 = FUN_002487d0();\n      return iVar4 - (iVar5 - iVar1);\n    }" ({ "{") (expression_statement "iVar1 = FUN_002487d0();" (assignment_expression "iVar1 = FUN_002487d0()" (identifier "iVar1") (= "=") (call_expression "FUN_002487d0()" (identifier "FUN_002487d0") (argument_list "()" (( "(") () ")")))) (; ";")) (return_statement "return iVar4 - (iVar5 - iVar1);" (return "return") (binary_expression "iVar4 - (iVar5 - iVar1)" (identifier "iVar4") (- "-") (parenthesized_expression "(iVar5 - iVar1)" (( "(") (binary_expression "iVar5 - iVar1" (identifier "iVar5") (- "-") (identifier "iVar1")) () ")"))) (; ";")) (} "}"))) (expression_statement "param_2 = (void *)((int)param_2 + sVar2);" (assignment_expression "param_2 = (void *)((int)param_2 + sVar2)" (identifier "param_2") (= "=") (cast_expression "(void *)((int)param_2 + sVar2)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)param_2 + sVar2)" (( "(") (binary_expression "(int)param_2 + sVar2" (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2")) (+ "+") (identifier "sVar2")) () ")")))) (; ";")) (expression_statement "param_3 = param_3 - sVar2;" (assignment_expression "param_3 = param_3 - sVar2" (identifier "param_3") (= "=") (binary_expression "param_3 - sVar2" (identifier "param_3") (- "-") (identifier "sVar2"))) (; ";")) (} "}"))) (return_statement "return iVar4;" (return "return") (identifier "iVar4") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::__basic_file<char>::xsputn_2(char const*, int, char const*, int) */

void std::__basic_file<char>::function_1(char *param_1,int param_2,char *param_3,int param_4)

{
}


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

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

int MASKED(undefined4 param_1,void *param_2,size_t param_3,undefined4 param_4,int param_5)

{
  int iVar1;
  ssize_t sVar2;
  int *piVar3;
  int iVar4;
  int iVar5;
  iovec local_2c;
  undefined4 local_24;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x248b19;
  iVar1 = FUN_002489c0(param_1);
  iVar4 = param_5 + param_3;
  local_24 = param_4;
  local_20 = param_5;
  iVar5 = iVar4;
  while( true ) {
    while( true ) {
      local_2c.iov_base = param_2;
      local_2c.iov_len = param_3;
      sVar2 = writev(iVar1,&local_2c,2);
      if (sVar2 != -1) break;
      piVar3 = __errno_location();
      if (*piVar3 != 4) {
        return iVar4 - iVar5;
      }
    }
    iVar5 = iVar5 - sVar2;
    if (iVar5 == 0) break;
    if (-1 < (int)(sVar2 - param_3)) {
      iVar1 = FUN_002487d0();
      return iVar4 - (iVar5 - iVar1);
    }
    param_2 = (void *)((int)param_2 + sVar2);
    param_3 = param_3 - sVar2;
  }
  return iVar4;
}

