
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

ssize_t sec_recv(connectdata *conn,int sockindex,char *buffer,size_t len,CURLcode *err)

{
  size_t *psVar1;
  curl_socket_t __fd;
  int iVar2;
  size_t sVar3;
  size_t __n;
  CURLcode CVar4;
  void *to;
  uint __n_00;
  uint uVar5;
  int in_GS_OFFSET;
  char *local_38;
  size_t local_30;
  int len_1;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x3cea9;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  __fd = conn->sock[sockindex];
  iVar2 = conn->sec_complete;
  *err = CURLE_OK;
  if ((iVar2 == 0) || (conn->data_prot == PROT_CLEAR)) {
    __n = read(__fd,buffer,len);
  }
  else if ((conn->in_buffer).eof_flag == 0) {
    sVar3 = (conn->in_buffer).index;
    __n = (conn->in_buffer).size - sVar3;
    if (len < __n) {
      __n = len;
    }
    memcpy(buffer,(void *)(sVar3 + (int)(conn->in_buffer).data),__n);
    local_38 = buffer + __n;
    psVar1 = &(conn->in_buffer).index;
    *psVar1 = *psVar1 + __n;
    uVar5 = len - __n;
    if (uVar5 != 0) {
      __n_00 = __n;
      local_30 = __n;
      do {
        __n = __n_00;
        CVar4 = socket_read(__fd,&len_1,4);
        if ((CVar4 != CURLE_OK) || (len_1 == 0)) {
LAB_0003cfa5:
          __n = 0xffffffff;
          break;
        }
        len_1 = (uint)len_1 >> 0x18 | (len_1 & 0xff0000U) >> 8 | (len_1 & 0xff00U) << 8 |
                len_1 << 0x18;
        to = Curl_saferealloc((conn->in_buffer).data,len_1);
        (conn->in_buffer).data = to;
        if ((len_1 == 0) ||
           ((to == (void *)0x0 || (CVar4 = socket_read(__fd,to,len_1), CVar4 != CURLE_OK))))
        goto LAB_0003cfa5;
        __n_00 = (*conn->mech->decode)
                           (conn->app_data,(conn->in_buffer).data,len_1,conn->data_prot,conn);
        (conn->in_buffer).index = 0;
        (conn->in_buffer).size = __n_00;
        if (__n_00 == 0) {
          if (__n != 0) {
            (conn->in_buffer).eof_flag = 1;
          }
          break;
        }
        if (uVar5 <= __n_00) {
          __n_00 = uVar5;
        }
        memcpy(local_38,(conn->in_buffer).data,__n_00);
        __n = local_30 + __n_00;
        local_38 = local_38 + __n_00;
        psVar1 = &(conn->in_buffer).index;
        *psVar1 = *psVar1 + __n_00;
        uVar5 = uVar5 - __n_00;
        local_30 = __n;
      } while (uVar5 != 0);
    }
  }
  else {
    (conn->in_buffer).eof_flag = 0;
    __n = 0;
  }
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail_local();
  }
  return __n;
}



size_t FUN_0003cea0(int param_1,void *param_2,uint param_3,undefined4 *param_4)

{
  size_t __n;
  int iVar1;
  uint __n_00;
  int in_GS_OFFSET;
  int unaff_retaddr;
  int __fd;
  uint *puVar2;
  size_t local_34;
  uint local_28;
  int local_24;
  undefined4 uStack_14;
  
  uStack_14 = 0x3cea9;
  entry();
  local_24 = *(int *)(in_GS_OFFSET + 0x14);
  __fd = *(int *)(unaff_retaddr + 400 + param_1 * 4);
  iVar1 = *(int *)(unaff_retaddr + 0x2c4);
  *param_4 = 0;
  if ((iVar1 == 0) || (*(int *)(unaff_retaddr + 0x2cc) == 1)) {
    __n = read(__fd,param_2,param_3);
  }
  else if (*(int *)(unaff_retaddr + 0x2e4) == 0) {
    __n = *(int *)(unaff_retaddr + 0x2dc) - *(int *)(unaff_retaddr + 0x2e0);
    if (param_3 < __n) {
      __n = param_3;
    }
    memcpy(param_2,(void *)(*(int *)(unaff_retaddr + 0x2e0) + *(int *)(unaff_retaddr + 0x2d8)),__n);
    param_2 = (void *)((int)param_2 + __n);
    *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n;
    param_3 = param_3 - __n;
    if (param_3 != 0) {
      puVar2 = &local_28;
      __n_00 = __n;
      local_34 = __n;
      do {
        __n = __n_00;
        iVar1 = FUN_0003cd80(__fd,param_2,puVar2);
        if ((iVar1 != 0) || (local_28 == 0)) {
LAB_0003cfa5:
          __n = 0xffffffff;
          break;
        }
        local_28 = local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8 |
                   local_28 << 0x18;
        iVar1 = FUN_0004b300(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28);
        *(int *)(unaff_retaddr + 0x2d8) = iVar1;
        if ((local_28 == 0) ||
           ((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0))))
        goto LAB_0003cfa5;
        __n_00 = (**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))
                           (*(undefined4 *)(unaff_retaddr + 0x2e8),
                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,
                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr);
        *(undefined4 *)(unaff_retaddr + 0x2e0) = 0;
        *(uint *)(unaff_retaddr + 0x2dc) = __n_00;
        if (__n_00 == 0) {
          if (__n != 0) {
            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;
          }
          break;
        }
        if (param_3 <= __n_00) {
          __n_00 = param_3;
        }
        memcpy(param_2,*(void **)(unaff_retaddr + 0x2d8),__n_00);
        __n = local_34 + __n_00;
        param_2 = (void *)((int)param_2 + __n_00);
        *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n_00;
        param_3 = param_3 - __n_00;
        local_34 = __n;
      } while (param_3 != 0);
    }
  }
  else {
    *(undefined4 *)(unaff_retaddr + 0x2e4) = 0;
    __n = 0;
  }
  if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_0007c1a0();
  }
  return __n;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00019ed0
ADD EBX,0x73937
SUB ESP,0x2c
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x1c],EAX
XOR EAX,EAX
MOV ESI,dword ptr [ESP + 0x40]
MOV EAX,dword ptr [ESP + 0x44]
MOV EBP,dword ptr [ESP + 0x48]
MOV EAX,dword ptr [ESI + EAX*0x4 + 0x190]
MOV EDX,dword ptr [ESI + 0x2c4]
MOV dword ptr [ESP],EAX
MOV EAX,dword ptr [ESP + 0x50]
MOV dword ptr [EAX],0x0
TEST EDX,EDX
JZ 0x0003d060
CMP dword ptr [ESI + 0x2cc],0x1
JZ 0x0003d060
MOV EAX,dword ptr [ESI + 0x2e4]
TEST EAX,EAX
JZ 0x0003cf30
MOV dword ptr [ESI + 0x2e4],0x0
XOR EAX,EAX
NOP
MOV ECX,dword ptr [ESP + 0x1c]
XOR ECX,dword ptr GS:[0x14]
JNZ 0x0003d095
ADD ESP,0x2c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV ECX,dword ptr [ESI + 0x2e0]
MOV EDI,dword ptr [ESI + 0x2dc]
SUB EDI,ECX
CMP EDI,dword ptr [ESP + 0x4c]
CMOVA EDI,dword ptr [ESP + 0x4c]
SUB ESP,0x4
ADD ECX,dword ptr [ESI + 0x2d8]
PUSH EDI
PUSH ECX
PUSH EBP
CALL 0x00018750
LEA EAX,[EBP + EDI*0x1]
ADD dword ptr [ESI + 0x2e0],EDI
MOV dword ptr [ESP + 0x14],EAX
ADD ESP,0x10
MOV EBP,dword ptr [ESP + 0x4c]
MOV dword ptr [ESP + 0xc],EDI
SUB EBP,EDI
JZ 0x0003d055
LEA EAX,[ESP + 0x18]
MOV dword ptr [ESP + 0x8],EAX
LEA ESI,[ESI]
MOV EDX,dword ptr [ESP + 0x8]
MOV EAX,dword ptr [ESP]
MOV ECX,0x4
CALL 0x0003cd80
TEST EAX,EAX
JNZ 0x0003cfa5
MOV EAX,dword ptr [ESP + 0x18]
TEST EAX,EAX
JNZ 0x0003cfb0
MOV EAX,0xffffffff
JMP 0x0003cf10
SUB ESP,0x8
BSWAP EAX
MOV dword ptr [ESP + 0x20],EAX
PUSH EAX
PUSH dword ptr [ESI + 0x2d8]
CALL 0x0004b300
MOV ECX,dword ptr [ESP + 0x28]
ADD ESP,0x10
MOV dword ptr [ESI + 0x2d8],EAX
TEST ECX,ECX
JZ 0x0003cfa5
TEST EAX,EAX
JZ 0x0003cfa5
MOV EDX,EAX
MOV EAX,dword ptr [ESP]
CALL 0x0003cd80
TEST EAX,EAX
JNZ 0x0003cfa5
SUB ESP,0xc
MOV EAX,dword ptr [ESI + 0x2ec]
PUSH ESI
PUSH dword ptr [ESI + 0x2cc]
PUSH dword ptr [ESP + 0x2c]
PUSH dword ptr [ESI + 0x2d8]
PUSH dword ptr [ESI + 0x2e8]
CALL dword ptr [EAX + 0x20]
MOV dword ptr [ESI + 0x2e0],0x0
MOV dword ptr [ESI + 0x2dc],EAX
ADD ESP,0x20
TEST EAX,EAX
JZ 0x0003d080
CMP EBP,EAX
CMOVBE EAX,EBP
SUB ESP,0x4
PUSH EAX
MOV EDI,EAX
PUSH dword ptr [ESI + 0x2d8]
PUSH dword ptr [ESP + 0x10]
CALL 0x00018750
ADD dword ptr [ESP + 0x1c],EDI
ADD dword ptr [ESP + 0x14],EDI
ADD ESP,0x10
ADD dword ptr [ESI + 0x2e0],EDI
SUB EBP,EDI
JNZ 0x0003cf88
MOV EAX,dword ptr [ESP + 0xc]
JMP 0x0003cf10
SUB ESP,0x4
PUSH dword ptr [ESP + 0x50]
PUSH EBP
PUSH dword ptr [ESP + 0xc]
CALL 0x00019a90
ADD ESP,0x10
JMP 0x0003cf10
TEST EDI,EDI
JZ 0x0003d08e
MOV dword ptr [ESI + 0x2e4],0x1
MOV EAX,EDI
JMP 0x0003cf10
CALL 0x0007c1a0
(translation_unit "size_t FUN_0003cea0(int param_1,void *param_2,uint param_3,undefined4 *param_4)\n\n{\n  size_t __n;\n  int iVar1;\n  uint __n_00;\n  int in_GS_OFFSET;\n  int unaff_retaddr;\n  int __fd;\n  uint *puVar2;\n  size_t local_34;\n  uint local_28;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x3cea9;\n  entry();\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  __fd = *(int *)(unaff_retaddr + 400 + param_1 * 4);\n  iVar1 = *(int *)(unaff_retaddr + 0x2c4);\n  *param_4 = 0;\n  if ((iVar1 == 0) || (*(int *)(unaff_retaddr + 0x2cc) == 1)) {\n    __n = read(__fd,param_2,param_3);\n  }\n  else if (*(int *)(unaff_retaddr + 0x2e4) == 0) {\n    __n = *(int *)(unaff_retaddr + 0x2dc) - *(int *)(unaff_retaddr + 0x2e0);\n    if (param_3 < __n) {\n      __n = param_3;\n    }\n    memcpy(param_2,(void *)(*(int *)(unaff_retaddr + 0x2e0) + *(int *)(unaff_retaddr + 0x2d8)),__n);\n    param_2 = (void *)((int)param_2 + __n);\n    *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n;\n    param_3 = param_3 - __n;\n    if (param_3 != 0) {\n      puVar2 = &local_28;\n      __n_00 = __n;\n      local_34 = __n;\n      do {\n        __n = __n_00;\n        iVar1 = FUN_0003cd80(__fd,param_2,puVar2);\n        if ((iVar1 != 0) || (local_28 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }\n        local_28 = local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8 |\n                   local_28 << 0x18;\n        iVar1 = FUN_0004b300(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28);\n        *(int *)(unaff_retaddr + 0x2d8) = iVar1;\n        if ((local_28 == 0) ||\n           ((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0))))\n        goto LAB_0003cfa5;\n        __n_00 = (**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))\n                           (*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr);\n        *(undefined4 *)(unaff_retaddr + 0x2e0) = 0;\n        *(uint *)(unaff_retaddr + 0x2dc) = __n_00;\n        if (__n_00 == 0) {\n          if (__n != 0) {\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }\n          break;\n        }\n        if (param_3 <= __n_00) {\n          __n_00 = param_3;\n        }\n        memcpy(param_2,*(void **)(unaff_retaddr + 0x2d8),__n_00);\n        __n = local_34 + __n_00;\n        param_2 = (void *)((int)param_2 + __n_00);\n        *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n_00;\n        param_3 = param_3 - __n_00;\n        local_34 = __n;\n      } while (param_3 != 0);\n    }\n  }\n  else {\n    *(undefined4 *)(unaff_retaddr + 0x2e4) = 0;\n    __n = 0;\n  }\n  if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0007c1a0();\n  }\n  return __n;\n}\n\n" (function_definition "size_t FUN_0003cea0(int param_1,void *param_2,uint param_3,undefined4 *param_4)\n\n{\n  size_t __n;\n  int iVar1;\n  uint __n_00;\n  int in_GS_OFFSET;\n  int unaff_retaddr;\n  int __fd;\n  uint *puVar2;\n  size_t local_34;\n  uint local_28;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x3cea9;\n  entry();\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  __fd = *(int *)(unaff_retaddr + 400 + param_1 * 4);\n  iVar1 = *(int *)(unaff_retaddr + 0x2c4);\n  *param_4 = 0;\n  if ((iVar1 == 0) || (*(int *)(unaff_retaddr + 0x2cc) == 1)) {\n    __n = read(__fd,param_2,param_3);\n  }\n  else if (*(int *)(unaff_retaddr + 0x2e4) == 0) {\n    __n = *(int *)(unaff_retaddr + 0x2dc) - *(int *)(unaff_retaddr + 0x2e0);\n    if (param_3 < __n) {\n      __n = param_3;\n    }\n    memcpy(param_2,(void *)(*(int *)(unaff_retaddr + 0x2e0) + *(int *)(unaff_retaddr + 0x2d8)),__n);\n    param_2 = (void *)((int)param_2 + __n);\n    *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n;\n    param_3 = param_3 - __n;\n    if (param_3 != 0) {\n      puVar2 = &local_28;\n      __n_00 = __n;\n      local_34 = __n;\n      do {\n        __n = __n_00;\n        iVar1 = FUN_0003cd80(__fd,param_2,puVar2);\n        if ((iVar1 != 0) || (local_28 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }\n        local_28 = local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8 |\n                   local_28 << 0x18;\n        iVar1 = FUN_0004b300(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28);\n        *(int *)(unaff_retaddr + 0x2d8) = iVar1;\n        if ((local_28 == 0) ||\n           ((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0))))\n        goto LAB_0003cfa5;\n        __n_00 = (**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))\n                           (*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr);\n        *(undefined4 *)(unaff_retaddr + 0x2e0) = 0;\n        *(uint *)(unaff_retaddr + 0x2dc) = __n_00;\n        if (__n_00 == 0) {\n          if (__n != 0) {\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }\n          break;\n        }\n        if (param_3 <= __n_00) {\n          __n_00 = param_3;\n        }\n        memcpy(param_2,*(void **)(unaff_retaddr + 0x2d8),__n_00);\n        __n = local_34 + __n_00;\n        param_2 = (void *)((int)param_2 + __n_00);\n        *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n_00;\n        param_3 = param_3 - __n_00;\n        local_34 = __n;\n      } while (param_3 != 0);\n    }\n  }\n  else {\n    *(undefined4 *)(unaff_retaddr + 0x2e4) = 0;\n    __n = 0;\n  }\n  if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0007c1a0();\n  }\n  return __n;\n}" primitive_type (function_declarator "FUN_0003cea0(int param_1,void *param_2,uint param_3,undefined4 *param_4)" identifier (parameter_list "(int param_1,void *param_2,uint param_3,undefined4 *param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "void *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "undefined4 *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  size_t __n;\n  int iVar1;\n  uint __n_00;\n  int in_GS_OFFSET;\n  int unaff_retaddr;\n  int __fd;\n  uint *puVar2;\n  size_t local_34;\n  uint local_28;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x3cea9;\n  entry();\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  __fd = *(int *)(unaff_retaddr + 400 + param_1 * 4);\n  iVar1 = *(int *)(unaff_retaddr + 0x2c4);\n  *param_4 = 0;\n  if ((iVar1 == 0) || (*(int *)(unaff_retaddr + 0x2cc) == 1)) {\n    __n = read(__fd,param_2,param_3);\n  }\n  else if (*(int *)(unaff_retaddr + 0x2e4) == 0) {\n    __n = *(int *)(unaff_retaddr + 0x2dc) - *(int *)(unaff_retaddr + 0x2e0);\n    if (param_3 < __n) {\n      __n = param_3;\n    }\n    memcpy(param_2,(void *)(*(int *)(unaff_retaddr + 0x2e0) + *(int *)(unaff_retaddr + 0x2d8)),__n);\n    param_2 = (void *)((int)param_2 + __n);\n    *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n;\n    param_3 = param_3 - __n;\n    if (param_3 != 0) {\n      puVar2 = &local_28;\n      __n_00 = __n;\n      local_34 = __n;\n      do {\n        __n = __n_00;\n        iVar1 = FUN_0003cd80(__fd,param_2,puVar2);\n        if ((iVar1 != 0) || (local_28 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }\n        local_28 = local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8 |\n                   local_28 << 0x18;\n        iVar1 = FUN_0004b300(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28);\n        *(int *)(unaff_retaddr + 0x2d8) = iVar1;\n        if ((local_28 == 0) ||\n           ((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0))))\n        goto LAB_0003cfa5;\n        __n_00 = (**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))\n                           (*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr);\n        *(undefined4 *)(unaff_retaddr + 0x2e0) = 0;\n        *(uint *)(unaff_retaddr + 0x2dc) = __n_00;\n        if (__n_00 == 0) {\n          if (__n != 0) {\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }\n          break;\n        }\n        if (param_3 <= __n_00) {\n          __n_00 = param_3;\n        }\n        memcpy(param_2,*(void **)(unaff_retaddr + 0x2d8),__n_00);\n        __n = local_34 + __n_00;\n        param_2 = (void *)((int)param_2 + __n_00);\n        *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n_00;\n        param_3 = param_3 - __n_00;\n        local_34 = __n;\n      } while (param_3 != 0);\n    }\n  }\n  else {\n    *(undefined4 *)(unaff_retaddr + 0x2e4) = 0;\n    __n = 0;\n  }\n  if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0007c1a0();\n  }\n  return __n;\n}" { (declaration "size_t __n;" primitive_type identifier ;) (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint __n_00;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "int unaff_retaddr;" primitive_type identifier ;) (declaration "int __fd;" primitive_type identifier ;) (declaration "uint *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "size_t local_34;" primitive_type identifier ;) (declaration "uint local_28;" type_identifier identifier ;) (declaration "int local_24;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x3cea9;" (assignment_expression "uStack_14 = 0x3cea9" identifier = number_literal) ;) (expression_statement "entry();" (call_expression "entry()" identifier (argument_list "()" ( ))) ;) (expression_statement "local_24 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_24 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "__fd = *(int *)(unaff_retaddr + 400 + param_1 * 4);" (assignment_expression "__fd = *(int *)(unaff_retaddr + 400 + param_1 * 4)" identifier = (pointer_expression "*(int *)(unaff_retaddr + 400 + param_1 * 4)" * (cast_expression "(int *)(unaff_retaddr + 400 + param_1 * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 400 + param_1 * 4)" ( (binary_expression "unaff_retaddr + 400 + param_1 * 4" (binary_expression "unaff_retaddr + 400" identifier + number_literal) + (binary_expression "param_1 * 4" identifier * number_literal)) ))))) ;) (expression_statement "iVar1 = *(int *)(unaff_retaddr + 0x2c4);" (assignment_expression "iVar1 = *(int *)(unaff_retaddr + 0x2c4)" identifier = (pointer_expression "*(int *)(unaff_retaddr + 0x2c4)" * (cast_expression "(int *)(unaff_retaddr + 0x2c4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x2c4)" ( (binary_expression "unaff_retaddr + 0x2c4" identifier + number_literal) ))))) ;) (expression_statement "*param_4 = 0;" (assignment_expression "*param_4 = 0" (pointer_expression "*param_4" * identifier) = number_literal) ;) (if_statement "if ((iVar1 == 0) || (*(int *)(unaff_retaddr + 0x2cc) == 1)) {\n    __n = read(__fd,param_2,param_3);\n  }\n  else if (*(int *)(unaff_retaddr + 0x2e4) == 0) {\n    __n = *(int *)(unaff_retaddr + 0x2dc) - *(int *)(unaff_retaddr + 0x2e0);\n    if (param_3 < __n) {\n      __n = param_3;\n    }\n    memcpy(param_2,(void *)(*(int *)(unaff_retaddr + 0x2e0) + *(int *)(unaff_retaddr + 0x2d8)),__n);\n    param_2 = (void *)((int)param_2 + __n);\n    *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n;\n    param_3 = param_3 - __n;\n    if (param_3 != 0) {\n      puVar2 = &local_28;\n      __n_00 = __n;\n      local_34 = __n;\n      do {\n        __n = __n_00;\n        iVar1 = FUN_0003cd80(__fd,param_2,puVar2);\n        if ((iVar1 != 0) || (local_28 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }\n        local_28 = local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8 |\n                   local_28 << 0x18;\n        iVar1 = FUN_0004b300(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28);\n        *(int *)(unaff_retaddr + 0x2d8) = iVar1;\n        if ((local_28 == 0) ||\n           ((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0))))\n        goto LAB_0003cfa5;\n        __n_00 = (**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))\n                           (*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr);\n        *(undefined4 *)(unaff_retaddr + 0x2e0) = 0;\n        *(uint *)(unaff_retaddr + 0x2dc) = __n_00;\n        if (__n_00 == 0) {\n          if (__n != 0) {\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }\n          break;\n        }\n        if (param_3 <= __n_00) {\n          __n_00 = param_3;\n        }\n        memcpy(param_2,*(void **)(unaff_retaddr + 0x2d8),__n_00);\n        __n = local_34 + __n_00;\n        param_2 = (void *)((int)param_2 + __n_00);\n        *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n_00;\n        param_3 = param_3 - __n_00;\n        local_34 = __n;\n      } while (param_3 != 0);\n    }\n  }\n  else {\n    *(undefined4 *)(unaff_retaddr + 0x2e4) = 0;\n    __n = 0;\n  }" if (parenthesized_expression "((iVar1 == 0) || (*(int *)(unaff_retaddr + 0x2cc) == 1))" ( (binary_expression "(iVar1 == 0) || (*(int *)(unaff_retaddr + 0x2cc) == 1)" (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) || (parenthesized_expression "(*(int *)(unaff_retaddr + 0x2cc) == 1)" ( (binary_expression "*(int *)(unaff_retaddr + 0x2cc) == 1" (pointer_expression "*(int *)(unaff_retaddr + 0x2cc)" * (cast_expression "(int *)(unaff_retaddr + 0x2cc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x2cc)" ( (binary_expression "unaff_retaddr + 0x2cc" identifier + number_literal) )))) == number_literal) ))) )) (compound_statement "{\n    __n = read(__fd,param_2,param_3);\n  }" { (expression_statement "__n = read(__fd,param_2,param_3);" (assignment_expression "__n = read(__fd,param_2,param_3)" identifier = (call_expression "read(__fd,param_2,param_3)" identifier (argument_list "(__fd,param_2,param_3)" ( identifier , identifier , identifier )))) ;) }) (else_clause "else if (*(int *)(unaff_retaddr + 0x2e4) == 0) {\n    __n = *(int *)(unaff_retaddr + 0x2dc) - *(int *)(unaff_retaddr + 0x2e0);\n    if (param_3 < __n) {\n      __n = param_3;\n    }\n    memcpy(param_2,(void *)(*(int *)(unaff_retaddr + 0x2e0) + *(int *)(unaff_retaddr + 0x2d8)),__n);\n    param_2 = (void *)((int)param_2 + __n);\n    *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n;\n    param_3 = param_3 - __n;\n    if (param_3 != 0) {\n      puVar2 = &local_28;\n      __n_00 = __n;\n      local_34 = __n;\n      do {\n        __n = __n_00;\n        iVar1 = FUN_0003cd80(__fd,param_2,puVar2);\n        if ((iVar1 != 0) || (local_28 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }\n        local_28 = local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8 |\n                   local_28 << 0x18;\n        iVar1 = FUN_0004b300(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28);\n        *(int *)(unaff_retaddr + 0x2d8) = iVar1;\n        if ((local_28 == 0) ||\n           ((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0))))\n        goto LAB_0003cfa5;\n        __n_00 = (**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))\n                           (*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr);\n        *(undefined4 *)(unaff_retaddr + 0x2e0) = 0;\n        *(uint *)(unaff_retaddr + 0x2dc) = __n_00;\n        if (__n_00 == 0) {\n          if (__n != 0) {\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }\n          break;\n        }\n        if (param_3 <= __n_00) {\n          __n_00 = param_3;\n        }\n        memcpy(param_2,*(void **)(unaff_retaddr + 0x2d8),__n_00);\n        __n = local_34 + __n_00;\n        param_2 = (void *)((int)param_2 + __n_00);\n        *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n_00;\n        param_3 = param_3 - __n_00;\n        local_34 = __n;\n      } while (param_3 != 0);\n    }\n  }\n  else {\n    *(undefined4 *)(unaff_retaddr + 0x2e4) = 0;\n    __n = 0;\n  }" else (if_statement "if (*(int *)(unaff_retaddr + 0x2e4) == 0) {\n    __n = *(int *)(unaff_retaddr + 0x2dc) - *(int *)(unaff_retaddr + 0x2e0);\n    if (param_3 < __n) {\n      __n = param_3;\n    }\n    memcpy(param_2,(void *)(*(int *)(unaff_retaddr + 0x2e0) + *(int *)(unaff_retaddr + 0x2d8)),__n);\n    param_2 = (void *)((int)param_2 + __n);\n    *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n;\n    param_3 = param_3 - __n;\n    if (param_3 != 0) {\n      puVar2 = &local_28;\n      __n_00 = __n;\n      local_34 = __n;\n      do {\n        __n = __n_00;\n        iVar1 = FUN_0003cd80(__fd,param_2,puVar2);\n        if ((iVar1 != 0) || (local_28 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }\n        local_28 = local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8 |\n                   local_28 << 0x18;\n        iVar1 = FUN_0004b300(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28);\n        *(int *)(unaff_retaddr + 0x2d8) = iVar1;\n        if ((local_28 == 0) ||\n           ((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0))))\n        goto LAB_0003cfa5;\n        __n_00 = (**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))\n                           (*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr);\n        *(undefined4 *)(unaff_retaddr + 0x2e0) = 0;\n        *(uint *)(unaff_retaddr + 0x2dc) = __n_00;\n        if (__n_00 == 0) {\n          if (__n != 0) {\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }\n          break;\n        }\n        if (param_3 <= __n_00) {\n          __n_00 = param_3;\n        }\n        memcpy(param_2,*(void **)(unaff_retaddr + 0x2d8),__n_00);\n        __n = local_34 + __n_00;\n        param_2 = (void *)((int)param_2 + __n_00);\n        *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n_00;\n        param_3 = param_3 - __n_00;\n        local_34 = __n;\n      } while (param_3 != 0);\n    }\n  }\n  else {\n    *(undefined4 *)(unaff_retaddr + 0x2e4) = 0;\n    __n = 0;\n  }" if (parenthesized_expression "(*(int *)(unaff_retaddr + 0x2e4) == 0)" ( (binary_expression "*(int *)(unaff_retaddr + 0x2e4) == 0" (pointer_expression "*(int *)(unaff_retaddr + 0x2e4)" * (cast_expression "(int *)(unaff_retaddr + 0x2e4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x2e4)" ( (binary_expression "unaff_retaddr + 0x2e4" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    __n = *(int *)(unaff_retaddr + 0x2dc) - *(int *)(unaff_retaddr + 0x2e0);\n    if (param_3 < __n) {\n      __n = param_3;\n    }\n    memcpy(param_2,(void *)(*(int *)(unaff_retaddr + 0x2e0) + *(int *)(unaff_retaddr + 0x2d8)),__n);\n    param_2 = (void *)((int)param_2 + __n);\n    *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n;\n    param_3 = param_3 - __n;\n    if (param_3 != 0) {\n      puVar2 = &local_28;\n      __n_00 = __n;\n      local_34 = __n;\n      do {\n        __n = __n_00;\n        iVar1 = FUN_0003cd80(__fd,param_2,puVar2);\n        if ((iVar1 != 0) || (local_28 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }\n        local_28 = local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8 |\n                   local_28 << 0x18;\n        iVar1 = FUN_0004b300(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28);\n        *(int *)(unaff_retaddr + 0x2d8) = iVar1;\n        if ((local_28 == 0) ||\n           ((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0))))\n        goto LAB_0003cfa5;\n        __n_00 = (**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))\n                           (*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr);\n        *(undefined4 *)(unaff_retaddr + 0x2e0) = 0;\n        *(uint *)(unaff_retaddr + 0x2dc) = __n_00;\n        if (__n_00 == 0) {\n          if (__n != 0) {\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }\n          break;\n        }\n        if (param_3 <= __n_00) {\n          __n_00 = param_3;\n        }\n        memcpy(param_2,*(void **)(unaff_retaddr + 0x2d8),__n_00);\n        __n = local_34 + __n_00;\n        param_2 = (void *)((int)param_2 + __n_00);\n        *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n_00;\n        param_3 = param_3 - __n_00;\n        local_34 = __n;\n      } while (param_3 != 0);\n    }\n  }" { (expression_statement "__n = *(int *)(unaff_retaddr + 0x2dc) - *(int *)(unaff_retaddr + 0x2e0);" (assignment_expression "__n = *(int *)(unaff_retaddr + 0x2dc) - *(int *)(unaff_retaddr + 0x2e0)" identifier = (binary_expression "*(int *)(unaff_retaddr + 0x2dc) - *(int *)(unaff_retaddr + 0x2e0)" (pointer_expression "*(int *)(unaff_retaddr + 0x2dc)" * (cast_expression "(int *)(unaff_retaddr + 0x2dc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x2dc)" ( (binary_expression "unaff_retaddr + 0x2dc" identifier + number_literal) )))) - (pointer_expression "*(int *)(unaff_retaddr + 0x2e0)" * (cast_expression "(int *)(unaff_retaddr + 0x2e0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x2e0)" ( (binary_expression "unaff_retaddr + 0x2e0" identifier + number_literal) )))))) ;) (if_statement "if (param_3 < __n) {\n      __n = param_3;\n    }" if (parenthesized_expression "(param_3 < __n)" ( (binary_expression "param_3 < __n" identifier < identifier) )) (compound_statement "{\n      __n = param_3;\n    }" { (expression_statement "__n = param_3;" (assignment_expression "__n = param_3" identifier = identifier) ;) })) (expression_statement "memcpy(param_2,(void *)(*(int *)(unaff_retaddr + 0x2e0) + *(int *)(unaff_retaddr + 0x2d8)),__n);" (call_expression "memcpy(param_2,(void *)(*(int *)(unaff_retaddr + 0x2e0) + *(int *)(unaff_retaddr + 0x2d8)),__n)" identifier (argument_list "(param_2,(void *)(*(int *)(unaff_retaddr + 0x2e0) + *(int *)(unaff_retaddr + 0x2d8)),__n)" ( identifier , (cast_expression "(void *)(*(int *)(unaff_retaddr + 0x2e0) + *(int *)(unaff_retaddr + 0x2d8))" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(unaff_retaddr + 0x2e0) + *(int *)(unaff_retaddr + 0x2d8))" ( (binary_expression "*(int *)(unaff_retaddr + 0x2e0) + *(int *)(unaff_retaddr + 0x2d8)" (pointer_expression "*(int *)(unaff_retaddr + 0x2e0)" * (cast_expression "(int *)(unaff_retaddr + 0x2e0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x2e0)" ( (binary_expression "unaff_retaddr + 0x2e0" identifier + number_literal) )))) + (pointer_expression "*(int *)(unaff_retaddr + 0x2d8)" * (cast_expression "(int *)(unaff_retaddr + 0x2d8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x2d8)" ( (binary_expression "unaff_retaddr + 0x2d8" identifier + number_literal) ))))) ))) , identifier ))) ;) (expression_statement "param_2 = (void *)((int)param_2 + __n);" (assignment_expression "param_2 = (void *)((int)param_2 + __n)" identifier = (cast_expression "(void *)((int)param_2 + __n)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_2 + __n)" ( (binary_expression "(int)param_2 + __n" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (expression_statement "*(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n;" (assignment_expression "*(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n" (pointer_expression "*(int *)(unaff_retaddr + 0x2e0)" * (cast_expression "(int *)(unaff_retaddr + 0x2e0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x2e0)" ( (binary_expression "unaff_retaddr + 0x2e0" identifier + number_literal) )))) = (binary_expression "*(int *)(unaff_retaddr + 0x2e0) + __n" (pointer_expression "*(int *)(unaff_retaddr + 0x2e0)" * (cast_expression "(int *)(unaff_retaddr + 0x2e0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x2e0)" ( (binary_expression "unaff_retaddr + 0x2e0" identifier + number_literal) )))) + identifier)) ;) (expression_statement "param_3 = param_3 - __n;" (assignment_expression "param_3 = param_3 - __n" identifier = (binary_expression "param_3 - __n" identifier - identifier)) ;) (if_statement "if (param_3 != 0) {\n      puVar2 = &local_28;\n      __n_00 = __n;\n      local_34 = __n;\n      do {\n        __n = __n_00;\n        iVar1 = FUN_0003cd80(__fd,param_2,puVar2);\n        if ((iVar1 != 0) || (local_28 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }\n        local_28 = local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8 |\n                   local_28 << 0x18;\n        iVar1 = FUN_0004b300(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28);\n        *(int *)(unaff_retaddr + 0x2d8) = iVar1;\n        if ((local_28 == 0) ||\n           ((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0))))\n        goto LAB_0003cfa5;\n        __n_00 = (**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))\n                           (*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr);\n        *(undefined4 *)(unaff_retaddr + 0x2e0) = 0;\n        *(uint *)(unaff_retaddr + 0x2dc) = __n_00;\n        if (__n_00 == 0) {\n          if (__n != 0) {\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }\n          break;\n        }\n        if (param_3 <= __n_00) {\n          __n_00 = param_3;\n        }\n        memcpy(param_2,*(void **)(unaff_retaddr + 0x2d8),__n_00);\n        __n = local_34 + __n_00;\n        param_2 = (void *)((int)param_2 + __n_00);\n        *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n_00;\n        param_3 = param_3 - __n_00;\n        local_34 = __n;\n      } while (param_3 != 0);\n    }" if (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) )) (compound_statement "{\n      puVar2 = &local_28;\n      __n_00 = __n;\n      local_34 = __n;\n      do {\n        __n = __n_00;\n        iVar1 = FUN_0003cd80(__fd,param_2,puVar2);\n        if ((iVar1 != 0) || (local_28 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }\n        local_28 = local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8 |\n                   local_28 << 0x18;\n        iVar1 = FUN_0004b300(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28);\n        *(int *)(unaff_retaddr + 0x2d8) = iVar1;\n        if ((local_28 == 0) ||\n           ((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0))))\n        goto LAB_0003cfa5;\n        __n_00 = (**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))\n                           (*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr);\n        *(undefined4 *)(unaff_retaddr + 0x2e0) = 0;\n        *(uint *)(unaff_retaddr + 0x2dc) = __n_00;\n        if (__n_00 == 0) {\n          if (__n != 0) {\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }\n          break;\n        }\n        if (param_3 <= __n_00) {\n          __n_00 = param_3;\n        }\n        memcpy(param_2,*(void **)(unaff_retaddr + 0x2d8),__n_00);\n        __n = local_34 + __n_00;\n        param_2 = (void *)((int)param_2 + __n_00);\n        *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n_00;\n        param_3 = param_3 - __n_00;\n        local_34 = __n;\n      } while (param_3 != 0);\n    }" { (expression_statement "puVar2 = &local_28;" (assignment_expression "puVar2 = &local_28" identifier = (pointer_expression "&local_28" & identifier)) ;) (expression_statement "__n_00 = __n;" (assignment_expression "__n_00 = __n" identifier = identifier) ;) (expression_statement "local_34 = __n;" (assignment_expression "local_34 = __n" identifier = identifier) ;) (do_statement "do {\n        __n = __n_00;\n        iVar1 = FUN_0003cd80(__fd,param_2,puVar2);\n        if ((iVar1 != 0) || (local_28 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }\n        local_28 = local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8 |\n                   local_28 << 0x18;\n        iVar1 = FUN_0004b300(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28);\n        *(int *)(unaff_retaddr + 0x2d8) = iVar1;\n        if ((local_28 == 0) ||\n           ((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0))))\n        goto LAB_0003cfa5;\n        __n_00 = (**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))\n                           (*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr);\n        *(undefined4 *)(unaff_retaddr + 0x2e0) = 0;\n        *(uint *)(unaff_retaddr + 0x2dc) = __n_00;\n        if (__n_00 == 0) {\n          if (__n != 0) {\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }\n          break;\n        }\n        if (param_3 <= __n_00) {\n          __n_00 = param_3;\n        }\n        memcpy(param_2,*(void **)(unaff_retaddr + 0x2d8),__n_00);\n        __n = local_34 + __n_00;\n        param_2 = (void *)((int)param_2 + __n_00);\n        *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n_00;\n        param_3 = param_3 - __n_00;\n        local_34 = __n;\n      } while (param_3 != 0);" do (compound_statement "{\n        __n = __n_00;\n        iVar1 = FUN_0003cd80(__fd,param_2,puVar2);\n        if ((iVar1 != 0) || (local_28 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }\n        local_28 = local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8 |\n                   local_28 << 0x18;\n        iVar1 = FUN_0004b300(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28);\n        *(int *)(unaff_retaddr + 0x2d8) = iVar1;\n        if ((local_28 == 0) ||\n           ((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0))))\n        goto LAB_0003cfa5;\n        __n_00 = (**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))\n                           (*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr);\n        *(undefined4 *)(unaff_retaddr + 0x2e0) = 0;\n        *(uint *)(unaff_retaddr + 0x2dc) = __n_00;\n        if (__n_00 == 0) {\n          if (__n != 0) {\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }\n          break;\n        }\n        if (param_3 <= __n_00) {\n          __n_00 = param_3;\n        }\n        memcpy(param_2,*(void **)(unaff_retaddr + 0x2d8),__n_00);\n        __n = local_34 + __n_00;\n        param_2 = (void *)((int)param_2 + __n_00);\n        *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n_00;\n        param_3 = param_3 - __n_00;\n        local_34 = __n;\n      }" { (expression_statement "__n = __n_00;" (assignment_expression "__n = __n_00" identifier = identifier) ;) (expression_statement "iVar1 = FUN_0003cd80(__fd,param_2,puVar2);" (assignment_expression "iVar1 = FUN_0003cd80(__fd,param_2,puVar2)" identifier = (call_expression "FUN_0003cd80(__fd,param_2,puVar2)" identifier (argument_list "(__fd,param_2,puVar2)" ( identifier , identifier , identifier )))) ;) (if_statement "if ((iVar1 != 0) || (local_28 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }" if (parenthesized_expression "((iVar1 != 0) || (local_28 == 0))" ( (binary_expression "(iVar1 != 0) || (local_28 == 0)" (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) || (parenthesized_expression "(local_28 == 0)" ( (binary_expression "local_28 == 0" identifier == number_literal) ))) )) (compound_statement "{\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }" { (labeled_statement "LAB_0003cfa5:\n          __n = 0xffffffff;" statement_identifier : (expression_statement "__n = 0xffffffff;" (assignment_expression "__n = 0xffffffff" identifier = number_literal) ;)) (break_statement "break;" break ;) })) (expression_statement "local_28 = local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8 |\n                   local_28 << 0x18;" (assignment_expression "local_28 = local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8 |\n                   local_28 << 0x18" identifier = (binary_expression "local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8 |\n                   local_28 << 0x18" (binary_expression "local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8" (binary_expression "local_28 >> 0x18 | (local_28 & 0xff0000) >> 8" (binary_expression "local_28 >> 0x18" identifier >> number_literal) | (binary_expression "(local_28 & 0xff0000) >> 8" (parenthesized_expression "(local_28 & 0xff0000)" ( (binary_expression "local_28 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(local_28 & 0xff00) << 8" (parenthesized_expression "(local_28 & 0xff00)" ( (binary_expression "local_28 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "local_28 << 0x18" identifier << number_literal))) ;) (expression_statement "iVar1 = FUN_0004b300(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28);" (assignment_expression "iVar1 = FUN_0004b300(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28)" identifier = (call_expression "FUN_0004b300(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28)" identifier (argument_list "(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28)" ( (pointer_expression "*(undefined4 *)(unaff_retaddr + 0x2d8)" * (cast_expression "(undefined4 *)(unaff_retaddr + 0x2d8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x2d8)" ( (binary_expression "unaff_retaddr + 0x2d8" identifier + number_literal) )))) , identifier )))) ;) (expression_statement "*(int *)(unaff_retaddr + 0x2d8) = iVar1;" (assignment_expression "*(int *)(unaff_retaddr + 0x2d8) = iVar1" (pointer_expression "*(int *)(unaff_retaddr + 0x2d8)" * (cast_expression "(int *)(unaff_retaddr + 0x2d8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x2d8)" ( (binary_expression "unaff_retaddr + 0x2d8" identifier + number_literal) )))) = identifier) ;) (if_statement "if ((local_28 == 0) ||\n           ((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0))))\n        goto LAB_0003cfa5;" if (parenthesized_expression "((local_28 == 0) ||\n           ((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0))))" ( (binary_expression "(local_28 == 0) ||\n           ((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0)))" (parenthesized_expression "(local_28 == 0)" ( (binary_expression "local_28 == 0" identifier == number_literal) )) || (parenthesized_expression "((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0)))" ( (parenthesized_expression "(iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0))" ( (binary_expression "iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0)" (binary_expression "iVar1 == 0" identifier == number_literal) || (parenthesized_expression "(iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0)" ( (comma_expression "iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0" (assignment_expression "iVar1 = FUN_0003cd80(__fd,param_2,puVar2)" identifier = (call_expression "FUN_0003cd80(__fd,param_2,puVar2)" identifier (argument_list "(__fd,param_2,puVar2)" ( identifier , identifier , identifier )))) , (binary_expression "iVar1 != 0" identifier != number_literal)) ))) )) ))) )) (goto_statement "goto LAB_0003cfa5;" goto statement_identifier ;)) (expression_statement "__n_00 = (**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))\n                           (*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr);" (assignment_expression "__n_00 = (**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))\n                           (*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr)" identifier = (call_expression "(**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))\n                           (*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr)" (parenthesized_expression "(**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))" ( (pointer_expression "**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20)" * (pointer_expression "*(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20)" * (cast_expression "(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)(unaff_retaddr + 0x2ec) + 0x20)" ( (binary_expression "*(int *)(unaff_retaddr + 0x2ec) + 0x20" (pointer_expression "*(int *)(unaff_retaddr + 0x2ec)" * (cast_expression "(int *)(unaff_retaddr + 0x2ec)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x2ec)" ( (binary_expression "unaff_retaddr + 0x2ec" identifier + number_literal) )))) + number_literal) ))))) )) (argument_list "(*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr)" ( (pointer_expression "*(undefined4 *)(unaff_retaddr + 0x2e8)" * (cast_expression "(undefined4 *)(unaff_retaddr + 0x2e8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x2e8)" ( (binary_expression "unaff_retaddr + 0x2e8" identifier + number_literal) )))) , (pointer_expression "*(undefined4 *)(unaff_retaddr + 0x2d8)" * (cast_expression "(undefined4 *)(unaff_retaddr + 0x2d8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x2d8)" ( (binary_expression "unaff_retaddr + 0x2d8" identifier + number_literal) )))) , identifier , (pointer_expression "*(undefined4 *)(unaff_retaddr + 0x2cc)" * (cast_expression "(undefined4 *)(unaff_retaddr + 0x2cc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x2cc)" ( (binary_expression "unaff_retaddr + 0x2cc" identifier + number_literal) )))) , identifier )))) ;) (expression_statement "*(undefined4 *)(unaff_retaddr + 0x2e0) = 0;" (assignment_expression "*(undefined4 *)(unaff_retaddr + 0x2e0) = 0" (pointer_expression "*(undefined4 *)(unaff_retaddr + 0x2e0)" * (cast_expression "(undefined4 *)(unaff_retaddr + 0x2e0)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x2e0)" ( (binary_expression "unaff_retaddr + 0x2e0" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(uint *)(unaff_retaddr + 0x2dc) = __n_00;" (assignment_expression "*(uint *)(unaff_retaddr + 0x2dc) = __n_00" (pointer_expression "*(uint *)(unaff_retaddr + 0x2dc)" * (cast_expression "(uint *)(unaff_retaddr + 0x2dc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x2dc)" ( (binary_expression "unaff_retaddr + 0x2dc" identifier + number_literal) )))) = identifier) ;) (if_statement "if (__n_00 == 0) {\n          if (__n != 0) {\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }\n          break;\n        }" if (parenthesized_expression "(__n_00 == 0)" ( (binary_expression "__n_00 == 0" identifier == number_literal) )) (compound_statement "{\n          if (__n != 0) {\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }\n          break;\n        }" { (if_statement "if (__n != 0) {\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }" if (parenthesized_expression "(__n != 0)" ( (binary_expression "__n != 0" identifier != number_literal) )) (compound_statement "{\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }" { (expression_statement "*(undefined4 *)(unaff_retaddr + 0x2e4) = 1;" (assignment_expression "*(undefined4 *)(unaff_retaddr + 0x2e4) = 1" (pointer_expression "*(undefined4 *)(unaff_retaddr + 0x2e4)" * (cast_expression "(undefined4 *)(unaff_retaddr + 0x2e4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x2e4)" ( (binary_expression "unaff_retaddr + 0x2e4" identifier + number_literal) )))) = number_literal) ;) })) (break_statement "break;" break ;) })) (if_statement "if (param_3 <= __n_00) {\n          __n_00 = param_3;\n        }" if (parenthesized_expression "(param_3 <= __n_00)" ( (binary_expression "param_3 <= __n_00" identifier <= identifier) )) (compound_statement "{\n          __n_00 = param_3;\n        }" { (expression_statement "__n_00 = param_3;" (assignment_expression "__n_00 = param_3" identifier = identifier) ;) })) (expression_statement "memcpy(param_2,*(void **)(unaff_retaddr + 0x2d8),__n_00);" (call_expression "memcpy(param_2,*(void **)(unaff_retaddr + 0x2d8),__n_00)" identifier (argument_list "(param_2,*(void **)(unaff_retaddr + 0x2d8),__n_00)" ( identifier , (pointer_expression "*(void **)(unaff_retaddr + 0x2d8)" * (cast_expression "(void **)(unaff_retaddr + 0x2d8)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(unaff_retaddr + 0x2d8)" ( (binary_expression "unaff_retaddr + 0x2d8" identifier + number_literal) )))) , identifier ))) ;) (expression_statement "__n = local_34 + __n_00;" (assignment_expression "__n = local_34 + __n_00" identifier = (binary_expression "local_34 + __n_00" identifier + identifier)) ;) (expression_statement "param_2 = (void *)((int)param_2 + __n_00);" (assignment_expression "param_2 = (void *)((int)param_2 + __n_00)" identifier = (cast_expression "(void *)((int)param_2 + __n_00)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_2 + __n_00)" ( (binary_expression "(int)param_2 + __n_00" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (expression_statement "*(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n_00;" (assignment_expression "*(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n_00" (pointer_expression "*(int *)(unaff_retaddr + 0x2e0)" * (cast_expression "(int *)(unaff_retaddr + 0x2e0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x2e0)" ( (binary_expression "unaff_retaddr + 0x2e0" identifier + number_literal) )))) = (binary_expression "*(int *)(unaff_retaddr + 0x2e0) + __n_00" (pointer_expression "*(int *)(unaff_retaddr + 0x2e0)" * (cast_expression "(int *)(unaff_retaddr + 0x2e0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x2e0)" ( (binary_expression "unaff_retaddr + 0x2e0" identifier + number_literal) )))) + identifier)) ;) (expression_statement "param_3 = param_3 - __n_00;" (assignment_expression "param_3 = param_3 - __n_00" identifier = (binary_expression "param_3 - __n_00" identifier - identifier)) ;) (expression_statement "local_34 = __n;" (assignment_expression "local_34 = __n" identifier = identifier) ;) }) while (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) )) ;) })) }) (else_clause "else {\n    *(undefined4 *)(unaff_retaddr + 0x2e4) = 0;\n    __n = 0;\n  }" else (compound_statement "{\n    *(undefined4 *)(unaff_retaddr + 0x2e4) = 0;\n    __n = 0;\n  }" { (expression_statement "*(undefined4 *)(unaff_retaddr + 0x2e4) = 0;" (assignment_expression "*(undefined4 *)(unaff_retaddr + 0x2e4) = 0" (pointer_expression "*(undefined4 *)(unaff_retaddr + 0x2e4)" * (cast_expression "(undefined4 *)(unaff_retaddr + 0x2e4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x2e4)" ( (binary_expression "unaff_retaddr + 0x2e4" identifier + number_literal) )))) = number_literal) ;) (expression_statement "__n = 0;" (assignment_expression "__n = 0" identifier = number_literal) ;) }))))) (if_statement "if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0007c1a0();\n  }" if (parenthesized_expression "(local_24 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_24 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    FUN_0007c1a0();\n  }" { comment (expression_statement "FUN_0007c1a0();" (call_expression "FUN_0007c1a0()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return __n;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nssize_t sec_recv(connectdata *conn,int sockindex,char *buffer,size_t len,CURLcode *err)\n\n{\n  size_t *psVar1;\n  curl_socket_t __fd;\n  int iVar2;\n  size_t sVar3;\n  size_t __n;\n  CURLcode CVar4;\n  void *to;\n  uint __n_00;\n  uint uVar5;\n  int in_GS_OFFSET;\n  char *local_38;\n  size_t local_30;\n  int len_1;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x3cea9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __fd = conn->sock[sockindex];\n  iVar2 = conn->sec_complete;\n  *err = CURLE_OK;\n  if ((iVar2 == 0) || (conn->data_prot == PROT_CLEAR)) {\n    __n = read(__fd,buffer,len);\n  }\n  else if ((conn->in_buffer).eof_flag == 0) {\n    sVar3 = (conn->in_buffer).index;\n    __n = (conn->in_buffer).size - sVar3;\n    if (len < __n) {\n      __n = len;\n    }\n    memcpy(buffer,(void *)(sVar3 + (int)(conn->in_buffer).data),__n);\n    local_38 = buffer + __n;\n    psVar1 = &(conn->in_buffer).index;\n    *psVar1 = *psVar1 + __n;\n    uVar5 = len - __n;\n    if (uVar5 != 0) {\n      __n_00 = __n;\n      local_30 = __n;\n      do {\n        __n = __n_00;\n        CVar4 = socket_read(__fd,&len_1,4);\n        if ((CVar4 != CURLE_OK) || (len_1 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }\n        len_1 = (uint)len_1 >> 0x18 | (len_1 & 0xff0000U) >> 8 | (len_1 & 0xff00U) << 8 |\n                len_1 << 0x18;\n        to = Curl_saferealloc((conn->in_buffer).data,len_1);\n        (conn->in_buffer).data = to;\n        if ((len_1 == 0) ||\n           ((to == (void *)0x0 || (CVar4 = socket_read(__fd,to,len_1), CVar4 != CURLE_OK))))\n        goto LAB_0003cfa5;\n        __n_00 = (*conn->mech->decode)\n                           (conn->app_data,(conn->in_buffer).data,len_1,conn->data_prot,conn);\n        (conn->in_buffer).index = 0;\n        (conn->in_buffer).size = __n_00;\n        if (__n_00 == 0) {\n          if (__n != 0) {\n            (conn->in_buffer).eof_flag = 1;\n          }\n          break;\n        }\n        if (uVar5 <= __n_00) {\n          __n_00 = uVar5;\n        }\n        memcpy(local_38,(conn->in_buffer).data,__n_00);\n        __n = local_30 + __n_00;\n        local_38 = local_38 + __n_00;\n        psVar1 = &(conn->in_buffer).index;\n        *psVar1 = *psVar1 + __n_00;\n        uVar5 = uVar5 - __n_00;\n        local_30 = __n;\n      } while (uVar5 != 0);\n    }\n  }\n  else {\n    (conn->in_buffer).eof_flag = 0;\n    __n = 0;\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return __n;\n}\n\n" comment comment (function_definition "ssize_t sec_recv(connectdata *conn,int sockindex,char *buffer,size_t len,CURLcode *err)\n\n{\n  size_t *psVar1;\n  curl_socket_t __fd;\n  int iVar2;\n  size_t sVar3;\n  size_t __n;\n  CURLcode CVar4;\n  void *to;\n  uint __n_00;\n  uint uVar5;\n  int in_GS_OFFSET;\n  char *local_38;\n  size_t local_30;\n  int len_1;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x3cea9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __fd = conn->sock[sockindex];\n  iVar2 = conn->sec_complete;\n  *err = CURLE_OK;\n  if ((iVar2 == 0) || (conn->data_prot == PROT_CLEAR)) {\n    __n = read(__fd,buffer,len);\n  }\n  else if ((conn->in_buffer).eof_flag == 0) {\n    sVar3 = (conn->in_buffer).index;\n    __n = (conn->in_buffer).size - sVar3;\n    if (len < __n) {\n      __n = len;\n    }\n    memcpy(buffer,(void *)(sVar3 + (int)(conn->in_buffer).data),__n);\n    local_38 = buffer + __n;\n    psVar1 = &(conn->in_buffer).index;\n    *psVar1 = *psVar1 + __n;\n    uVar5 = len - __n;\n    if (uVar5 != 0) {\n      __n_00 = __n;\n      local_30 = __n;\n      do {\n        __n = __n_00;\n        CVar4 = socket_read(__fd,&len_1,4);\n        if ((CVar4 != CURLE_OK) || (len_1 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }\n        len_1 = (uint)len_1 >> 0x18 | (len_1 & 0xff0000U) >> 8 | (len_1 & 0xff00U) << 8 |\n                len_1 << 0x18;\n        to = Curl_saferealloc((conn->in_buffer).data,len_1);\n        (conn->in_buffer).data = to;\n        if ((len_1 == 0) ||\n           ((to == (void *)0x0 || (CVar4 = socket_read(__fd,to,len_1), CVar4 != CURLE_OK))))\n        goto LAB_0003cfa5;\n        __n_00 = (*conn->mech->decode)\n                           (conn->app_data,(conn->in_buffer).data,len_1,conn->data_prot,conn);\n        (conn->in_buffer).index = 0;\n        (conn->in_buffer).size = __n_00;\n        if (__n_00 == 0) {\n          if (__n != 0) {\n            (conn->in_buffer).eof_flag = 1;\n          }\n          break;\n        }\n        if (uVar5 <= __n_00) {\n          __n_00 = uVar5;\n        }\n        memcpy(local_38,(conn->in_buffer).data,__n_00);\n        __n = local_30 + __n_00;\n        local_38 = local_38 + __n_00;\n        psVar1 = &(conn->in_buffer).index;\n        *psVar1 = *psVar1 + __n_00;\n        uVar5 = uVar5 - __n_00;\n        local_30 = __n;\n      } while (uVar5 != 0);\n    }\n  }\n  else {\n    (conn->in_buffer).eof_flag = 0;\n    __n = 0;\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return __n;\n}" primitive_type (function_declarator "sec_recv(connectdata *conn,int sockindex,char *buffer,size_t len,CURLcode *err)" identifier (parameter_list "(connectdata *conn,int sockindex,char *buffer,size_t len,CURLcode *err)" ( (parameter_declaration "connectdata *conn" type_identifier (pointer_declarator "*conn" * identifier)) , (parameter_declaration "int sockindex" primitive_type identifier) , (parameter_declaration "char *buffer" primitive_type (pointer_declarator "*buffer" * identifier)) , (parameter_declaration "size_t len" primitive_type identifier) , (parameter_declaration "CURLcode *err" type_identifier (pointer_declarator "*err" * identifier)) ))) (compound_statement "{\n  size_t *psVar1;\n  curl_socket_t __fd;\n  int iVar2;\n  size_t sVar3;\n  size_t __n;\n  CURLcode CVar4;\n  void *to;\n  uint __n_00;\n  uint uVar5;\n  int in_GS_OFFSET;\n  char *local_38;\n  size_t local_30;\n  int len_1;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x3cea9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __fd = conn->sock[sockindex];\n  iVar2 = conn->sec_complete;\n  *err = CURLE_OK;\n  if ((iVar2 == 0) || (conn->data_prot == PROT_CLEAR)) {\n    __n = read(__fd,buffer,len);\n  }\n  else if ((conn->in_buffer).eof_flag == 0) {\n    sVar3 = (conn->in_buffer).index;\n    __n = (conn->in_buffer).size - sVar3;\n    if (len < __n) {\n      __n = len;\n    }\n    memcpy(buffer,(void *)(sVar3 + (int)(conn->in_buffer).data),__n);\n    local_38 = buffer + __n;\n    psVar1 = &(conn->in_buffer).index;\n    *psVar1 = *psVar1 + __n;\n    uVar5 = len - __n;\n    if (uVar5 != 0) {\n      __n_00 = __n;\n      local_30 = __n;\n      do {\n        __n = __n_00;\n        CVar4 = socket_read(__fd,&len_1,4);\n        if ((CVar4 != CURLE_OK) || (len_1 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }\n        len_1 = (uint)len_1 >> 0x18 | (len_1 & 0xff0000U) >> 8 | (len_1 & 0xff00U) << 8 |\n                len_1 << 0x18;\n        to = Curl_saferealloc((conn->in_buffer).data,len_1);\n        (conn->in_buffer).data = to;\n        if ((len_1 == 0) ||\n           ((to == (void *)0x0 || (CVar4 = socket_read(__fd,to,len_1), CVar4 != CURLE_OK))))\n        goto LAB_0003cfa5;\n        __n_00 = (*conn->mech->decode)\n                           (conn->app_data,(conn->in_buffer).data,len_1,conn->data_prot,conn);\n        (conn->in_buffer).index = 0;\n        (conn->in_buffer).size = __n_00;\n        if (__n_00 == 0) {\n          if (__n != 0) {\n            (conn->in_buffer).eof_flag = 1;\n          }\n          break;\n        }\n        if (uVar5 <= __n_00) {\n          __n_00 = uVar5;\n        }\n        memcpy(local_38,(conn->in_buffer).data,__n_00);\n        __n = local_30 + __n_00;\n        local_38 = local_38 + __n_00;\n        psVar1 = &(conn->in_buffer).index;\n        *psVar1 = *psVar1 + __n_00;\n        uVar5 = uVar5 - __n_00;\n        local_30 = __n;\n      } while (uVar5 != 0);\n    }\n  }\n  else {\n    (conn->in_buffer).eof_flag = 0;\n    __n = 0;\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return __n;\n}" { (declaration "size_t *psVar1;" primitive_type (pointer_declarator "*psVar1" * identifier) ;) (declaration "curl_socket_t __fd;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "size_t sVar3;" primitive_type identifier ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "CURLcode CVar4;" type_identifier identifier ;) (declaration "void *to;" primitive_type (pointer_declarator "*to" * identifier) ;) (declaration "uint __n_00;" type_identifier identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char *local_38;" primitive_type (pointer_declarator "*local_38" * identifier) ;) (declaration "size_t local_30;" primitive_type identifier ;) (declaration "int len_1;" primitive_type identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x3cea9;" (assignment_expression "uStack_14 = 0x3cea9" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "__fd = conn->sock[sockindex];" (assignment_expression "__fd = conn->sock[sockindex]" identifier = (subscript_expression "conn->sock[sockindex]" (field_expression "conn->sock" identifier -> field_identifier) [ identifier ])) ;) (expression_statement "iVar2 = conn->sec_complete;" (assignment_expression "iVar2 = conn->sec_complete" identifier = (field_expression "conn->sec_complete" identifier -> field_identifier)) ;) (expression_statement "*err = CURLE_OK;" (assignment_expression "*err = CURLE_OK" (pointer_expression "*err" * identifier) = identifier) ;) (if_statement "if ((iVar2 == 0) || (conn->data_prot == PROT_CLEAR)) {\n    __n = read(__fd,buffer,len);\n  }\n  else if ((conn->in_buffer).eof_flag == 0) {\n    sVar3 = (conn->in_buffer).index;\n    __n = (conn->in_buffer).size - sVar3;\n    if (len < __n) {\n      __n = len;\n    }\n    memcpy(buffer,(void *)(sVar3 + (int)(conn->in_buffer).data),__n);\n    local_38 = buffer + __n;\n    psVar1 = &(conn->in_buffer).index;\n    *psVar1 = *psVar1 + __n;\n    uVar5 = len - __n;\n    if (uVar5 != 0) {\n      __n_00 = __n;\n      local_30 = __n;\n      do {\n        __n = __n_00;\n        CVar4 = socket_read(__fd,&len_1,4);\n        if ((CVar4 != CURLE_OK) || (len_1 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }\n        len_1 = (uint)len_1 >> 0x18 | (len_1 & 0xff0000U) >> 8 | (len_1 & 0xff00U) << 8 |\n                len_1 << 0x18;\n        to = Curl_saferealloc((conn->in_buffer).data,len_1);\n        (conn->in_buffer).data = to;\n        if ((len_1 == 0) ||\n           ((to == (void *)0x0 || (CVar4 = socket_read(__fd,to,len_1), CVar4 != CURLE_OK))))\n        goto LAB_0003cfa5;\n        __n_00 = (*conn->mech->decode)\n                           (conn->app_data,(conn->in_buffer).data,len_1,conn->data_prot,conn);\n        (conn->in_buffer).index = 0;\n        (conn->in_buffer).size = __n_00;\n        if (__n_00 == 0) {\n          if (__n != 0) {\n            (conn->in_buffer).eof_flag = 1;\n          }\n          break;\n        }\n        if (uVar5 <= __n_00) {\n          __n_00 = uVar5;\n        }\n        memcpy(local_38,(conn->in_buffer).data,__n_00);\n        __n = local_30 + __n_00;\n        local_38 = local_38 + __n_00;\n        psVar1 = &(conn->in_buffer).index;\n        *psVar1 = *psVar1 + __n_00;\n        uVar5 = uVar5 - __n_00;\n        local_30 = __n;\n      } while (uVar5 != 0);\n    }\n  }\n  else {\n    (conn->in_buffer).eof_flag = 0;\n    __n = 0;\n  }" if (parenthesized_expression "((iVar2 == 0) || (conn->data_prot == PROT_CLEAR))" ( (binary_expression "(iVar2 == 0) || (conn->data_prot == PROT_CLEAR)" (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) || (parenthesized_expression "(conn->data_prot == PROT_CLEAR)" ( (binary_expression "conn->data_prot == PROT_CLEAR" (field_expression "conn->data_prot" identifier -> field_identifier) == identifier) ))) )) (compound_statement "{\n    __n = read(__fd,buffer,len);\n  }" { (expression_statement "__n = read(__fd,buffer,len);" (assignment_expression "__n = read(__fd,buffer,len)" identifier = (call_expression "read(__fd,buffer,len)" identifier (argument_list "(__fd,buffer,len)" ( identifier , identifier , identifier )))) ;) }) (else_clause "else if ((conn->in_buffer).eof_flag == 0) {\n    sVar3 = (conn->in_buffer).index;\n    __n = (conn->in_buffer).size - sVar3;\n    if (len < __n) {\n      __n = len;\n    }\n    memcpy(buffer,(void *)(sVar3 + (int)(conn->in_buffer).data),__n);\n    local_38 = buffer + __n;\n    psVar1 = &(conn->in_buffer).index;\n    *psVar1 = *psVar1 + __n;\n    uVar5 = len - __n;\n    if (uVar5 != 0) {\n      __n_00 = __n;\n      local_30 = __n;\n      do {\n        __n = __n_00;\n        CVar4 = socket_read(__fd,&len_1,4);\n        if ((CVar4 != CURLE_OK) || (len_1 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }\n        len_1 = (uint)len_1 >> 0x18 | (len_1 & 0xff0000U) >> 8 | (len_1 & 0xff00U) << 8 |\n                len_1 << 0x18;\n        to = Curl_saferealloc((conn->in_buffer).data,len_1);\n        (conn->in_buffer).data = to;\n        if ((len_1 == 0) ||\n           ((to == (void *)0x0 || (CVar4 = socket_read(__fd,to,len_1), CVar4 != CURLE_OK))))\n        goto LAB_0003cfa5;\n        __n_00 = (*conn->mech->decode)\n                           (conn->app_data,(conn->in_buffer).data,len_1,conn->data_prot,conn);\n        (conn->in_buffer).index = 0;\n        (conn->in_buffer).size = __n_00;\n        if (__n_00 == 0) {\n          if (__n != 0) {\n            (conn->in_buffer).eof_flag = 1;\n          }\n          break;\n        }\n        if (uVar5 <= __n_00) {\n          __n_00 = uVar5;\n        }\n        memcpy(local_38,(conn->in_buffer).data,__n_00);\n        __n = local_30 + __n_00;\n        local_38 = local_38 + __n_00;\n        psVar1 = &(conn->in_buffer).index;\n        *psVar1 = *psVar1 + __n_00;\n        uVar5 = uVar5 - __n_00;\n        local_30 = __n;\n      } while (uVar5 != 0);\n    }\n  }\n  else {\n    (conn->in_buffer).eof_flag = 0;\n    __n = 0;\n  }" else (if_statement "if ((conn->in_buffer).eof_flag == 0) {\n    sVar3 = (conn->in_buffer).index;\n    __n = (conn->in_buffer).size - sVar3;\n    if (len < __n) {\n      __n = len;\n    }\n    memcpy(buffer,(void *)(sVar3 + (int)(conn->in_buffer).data),__n);\n    local_38 = buffer + __n;\n    psVar1 = &(conn->in_buffer).index;\n    *psVar1 = *psVar1 + __n;\n    uVar5 = len - __n;\n    if (uVar5 != 0) {\n      __n_00 = __n;\n      local_30 = __n;\n      do {\n        __n = __n_00;\n        CVar4 = socket_read(__fd,&len_1,4);\n        if ((CVar4 != CURLE_OK) || (len_1 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }\n        len_1 = (uint)len_1 >> 0x18 | (len_1 & 0xff0000U) >> 8 | (len_1 & 0xff00U) << 8 |\n                len_1 << 0x18;\n        to = Curl_saferealloc((conn->in_buffer).data,len_1);\n        (conn->in_buffer).data = to;\n        if ((len_1 == 0) ||\n           ((to == (void *)0x0 || (CVar4 = socket_read(__fd,to,len_1), CVar4 != CURLE_OK))))\n        goto LAB_0003cfa5;\n        __n_00 = (*conn->mech->decode)\n                           (conn->app_data,(conn->in_buffer).data,len_1,conn->data_prot,conn);\n        (conn->in_buffer).index = 0;\n        (conn->in_buffer).size = __n_00;\n        if (__n_00 == 0) {\n          if (__n != 0) {\n            (conn->in_buffer).eof_flag = 1;\n          }\n          break;\n        }\n        if (uVar5 <= __n_00) {\n          __n_00 = uVar5;\n        }\n        memcpy(local_38,(conn->in_buffer).data,__n_00);\n        __n = local_30 + __n_00;\n        local_38 = local_38 + __n_00;\n        psVar1 = &(conn->in_buffer).index;\n        *psVar1 = *psVar1 + __n_00;\n        uVar5 = uVar5 - __n_00;\n        local_30 = __n;\n      } while (uVar5 != 0);\n    }\n  }\n  else {\n    (conn->in_buffer).eof_flag = 0;\n    __n = 0;\n  }" if (parenthesized_expression "((conn->in_buffer).eof_flag == 0)" ( (binary_expression "(conn->in_buffer).eof_flag == 0" (field_expression "(conn->in_buffer).eof_flag" (parenthesized_expression "(conn->in_buffer)" ( (field_expression "conn->in_buffer" identifier -> field_identifier) )) . field_identifier) == number_literal) )) (compound_statement "{\n    sVar3 = (conn->in_buffer).index;\n    __n = (conn->in_buffer).size - sVar3;\n    if (len < __n) {\n      __n = len;\n    }\n    memcpy(buffer,(void *)(sVar3 + (int)(conn->in_buffer).data),__n);\n    local_38 = buffer + __n;\n    psVar1 = &(conn->in_buffer).index;\n    *psVar1 = *psVar1 + __n;\n    uVar5 = len - __n;\n    if (uVar5 != 0) {\n      __n_00 = __n;\n      local_30 = __n;\n      do {\n        __n = __n_00;\n        CVar4 = socket_read(__fd,&len_1,4);\n        if ((CVar4 != CURLE_OK) || (len_1 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }\n        len_1 = (uint)len_1 >> 0x18 | (len_1 & 0xff0000U) >> 8 | (len_1 & 0xff00U) << 8 |\n                len_1 << 0x18;\n        to = Curl_saferealloc((conn->in_buffer).data,len_1);\n        (conn->in_buffer).data = to;\n        if ((len_1 == 0) ||\n           ((to == (void *)0x0 || (CVar4 = socket_read(__fd,to,len_1), CVar4 != CURLE_OK))))\n        goto LAB_0003cfa5;\n        __n_00 = (*conn->mech->decode)\n                           (conn->app_data,(conn->in_buffer).data,len_1,conn->data_prot,conn);\n        (conn->in_buffer).index = 0;\n        (conn->in_buffer).size = __n_00;\n        if (__n_00 == 0) {\n          if (__n != 0) {\n            (conn->in_buffer).eof_flag = 1;\n          }\n          break;\n        }\n        if (uVar5 <= __n_00) {\n          __n_00 = uVar5;\n        }\n        memcpy(local_38,(conn->in_buffer).data,__n_00);\n        __n = local_30 + __n_00;\n        local_38 = local_38 + __n_00;\n        psVar1 = &(conn->in_buffer).index;\n        *psVar1 = *psVar1 + __n_00;\n        uVar5 = uVar5 - __n_00;\n        local_30 = __n;\n      } while (uVar5 != 0);\n    }\n  }" { (expression_statement "sVar3 = (conn->in_buffer).index;" (assignment_expression "sVar3 = (conn->in_buffer).index" identifier = (field_expression "(conn->in_buffer).index" (parenthesized_expression "(conn->in_buffer)" ( (field_expression "conn->in_buffer" identifier -> field_identifier) )) . field_identifier)) ;) (expression_statement "__n = (conn->in_buffer).size - sVar3;" (assignment_expression "__n = (conn->in_buffer).size - sVar3" identifier = (binary_expression "(conn->in_buffer).size - sVar3" (field_expression "(conn->in_buffer).size" (parenthesized_expression "(conn->in_buffer)" ( (field_expression "conn->in_buffer" identifier -> field_identifier) )) . field_identifier) - identifier)) ;) (if_statement "if (len < __n) {\n      __n = len;\n    }" if (parenthesized_expression "(len < __n)" ( (binary_expression "len < __n" identifier < identifier) )) (compound_statement "{\n      __n = len;\n    }" { (expression_statement "__n = len;" (assignment_expression "__n = len" identifier = identifier) ;) })) (expression_statement "memcpy(buffer,(void *)(sVar3 + (int)(conn->in_buffer).data),__n);" (call_expression "memcpy(buffer,(void *)(sVar3 + (int)(conn->in_buffer).data),__n)" identifier (argument_list "(buffer,(void *)(sVar3 + (int)(conn->in_buffer).data),__n)" ( identifier , (cast_expression "(void *)(sVar3 + (int)(conn->in_buffer).data)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(sVar3 + (int)(conn->in_buffer).data)" ( (binary_expression "sVar3 + (int)(conn->in_buffer).data" identifier + (cast_expression "(int)(conn->in_buffer).data" ( (type_descriptor "int" primitive_type) ) (field_expression "(conn->in_buffer).data" (parenthesized_expression "(conn->in_buffer)" ( (field_expression "conn->in_buffer" identifier -> field_identifier) )) . field_identifier))) ))) , identifier ))) ;) (expression_statement "local_38 = buffer + __n;" (assignment_expression "local_38 = buffer + __n" identifier = (binary_expression "buffer + __n" identifier + identifier)) ;) (expression_statement "psVar1 = &(conn->in_buffer).index;" (assignment_expression "psVar1 = &(conn->in_buffer).index" identifier = (pointer_expression "&(conn->in_buffer).index" & (field_expression "(conn->in_buffer).index" (parenthesized_expression "(conn->in_buffer)" ( (field_expression "conn->in_buffer" identifier -> field_identifier) )) . field_identifier))) ;) (expression_statement "*psVar1 = *psVar1 + __n;" (assignment_expression "*psVar1 = *psVar1 + __n" (pointer_expression "*psVar1" * identifier) = (binary_expression "*psVar1 + __n" (pointer_expression "*psVar1" * identifier) + identifier)) ;) (expression_statement "uVar5 = len - __n;" (assignment_expression "uVar5 = len - __n" identifier = (binary_expression "len - __n" identifier - identifier)) ;) (if_statement "if (uVar5 != 0) {\n      __n_00 = __n;\n      local_30 = __n;\n      do {\n        __n = __n_00;\n        CVar4 = socket_read(__fd,&len_1,4);\n        if ((CVar4 != CURLE_OK) || (len_1 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }\n        len_1 = (uint)len_1 >> 0x18 | (len_1 & 0xff0000U) >> 8 | (len_1 & 0xff00U) << 8 |\n                len_1 << 0x18;\n        to = Curl_saferealloc((conn->in_buffer).data,len_1);\n        (conn->in_buffer).data = to;\n        if ((len_1 == 0) ||\n           ((to == (void *)0x0 || (CVar4 = socket_read(__fd,to,len_1), CVar4 != CURLE_OK))))\n        goto LAB_0003cfa5;\n        __n_00 = (*conn->mech->decode)\n                           (conn->app_data,(conn->in_buffer).data,len_1,conn->data_prot,conn);\n        (conn->in_buffer).index = 0;\n        (conn->in_buffer).size = __n_00;\n        if (__n_00 == 0) {\n          if (__n != 0) {\n            (conn->in_buffer).eof_flag = 1;\n          }\n          break;\n        }\n        if (uVar5 <= __n_00) {\n          __n_00 = uVar5;\n        }\n        memcpy(local_38,(conn->in_buffer).data,__n_00);\n        __n = local_30 + __n_00;\n        local_38 = local_38 + __n_00;\n        psVar1 = &(conn->in_buffer).index;\n        *psVar1 = *psVar1 + __n_00;\n        uVar5 = uVar5 - __n_00;\n        local_30 = __n;\n      } while (uVar5 != 0);\n    }" if (parenthesized_expression "(uVar5 != 0)" ( (binary_expression "uVar5 != 0" identifier != number_literal) )) (compound_statement "{\n      __n_00 = __n;\n      local_30 = __n;\n      do {\n        __n = __n_00;\n        CVar4 = socket_read(__fd,&len_1,4);\n        if ((CVar4 != CURLE_OK) || (len_1 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }\n        len_1 = (uint)len_1 >> 0x18 | (len_1 & 0xff0000U) >> 8 | (len_1 & 0xff00U) << 8 |\n                len_1 << 0x18;\n        to = Curl_saferealloc((conn->in_buffer).data,len_1);\n        (conn->in_buffer).data = to;\n        if ((len_1 == 0) ||\n           ((to == (void *)0x0 || (CVar4 = socket_read(__fd,to,len_1), CVar4 != CURLE_OK))))\n        goto LAB_0003cfa5;\n        __n_00 = (*conn->mech->decode)\n                           (conn->app_data,(conn->in_buffer).data,len_1,conn->data_prot,conn);\n        (conn->in_buffer).index = 0;\n        (conn->in_buffer).size = __n_00;\n        if (__n_00 == 0) {\n          if (__n != 0) {\n            (conn->in_buffer).eof_flag = 1;\n          }\n          break;\n        }\n        if (uVar5 <= __n_00) {\n          __n_00 = uVar5;\n        }\n        memcpy(local_38,(conn->in_buffer).data,__n_00);\n        __n = local_30 + __n_00;\n        local_38 = local_38 + __n_00;\n        psVar1 = &(conn->in_buffer).index;\n        *psVar1 = *psVar1 + __n_00;\n        uVar5 = uVar5 - __n_00;\n        local_30 = __n;\n      } while (uVar5 != 0);\n    }" { (expression_statement "__n_00 = __n;" (assignment_expression "__n_00 = __n" identifier = identifier) ;) (expression_statement "local_30 = __n;" (assignment_expression "local_30 = __n" identifier = identifier) ;) (do_statement "do {\n        __n = __n_00;\n        CVar4 = socket_read(__fd,&len_1,4);\n        if ((CVar4 != CURLE_OK) || (len_1 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }\n        len_1 = (uint)len_1 >> 0x18 | (len_1 & 0xff0000U) >> 8 | (len_1 & 0xff00U) << 8 |\n                len_1 << 0x18;\n        to = Curl_saferealloc((conn->in_buffer).data,len_1);\n        (conn->in_buffer).data = to;\n        if ((len_1 == 0) ||\n           ((to == (void *)0x0 || (CVar4 = socket_read(__fd,to,len_1), CVar4 != CURLE_OK))))\n        goto LAB_0003cfa5;\n        __n_00 = (*conn->mech->decode)\n                           (conn->app_data,(conn->in_buffer).data,len_1,conn->data_prot,conn);\n        (conn->in_buffer).index = 0;\n        (conn->in_buffer).size = __n_00;\n        if (__n_00 == 0) {\n          if (__n != 0) {\n            (conn->in_buffer).eof_flag = 1;\n          }\n          break;\n        }\n        if (uVar5 <= __n_00) {\n          __n_00 = uVar5;\n        }\n        memcpy(local_38,(conn->in_buffer).data,__n_00);\n        __n = local_30 + __n_00;\n        local_38 = local_38 + __n_00;\n        psVar1 = &(conn->in_buffer).index;\n        *psVar1 = *psVar1 + __n_00;\n        uVar5 = uVar5 - __n_00;\n        local_30 = __n;\n      } while (uVar5 != 0);" do (compound_statement "{\n        __n = __n_00;\n        CVar4 = socket_read(__fd,&len_1,4);\n        if ((CVar4 != CURLE_OK) || (len_1 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }\n        len_1 = (uint)len_1 >> 0x18 | (len_1 & 0xff0000U) >> 8 | (len_1 & 0xff00U) << 8 |\n                len_1 << 0x18;\n        to = Curl_saferealloc((conn->in_buffer).data,len_1);\n        (conn->in_buffer).data = to;\n        if ((len_1 == 0) ||\n           ((to == (void *)0x0 || (CVar4 = socket_read(__fd,to,len_1), CVar4 != CURLE_OK))))\n        goto LAB_0003cfa5;\n        __n_00 = (*conn->mech->decode)\n                           (conn->app_data,(conn->in_buffer).data,len_1,conn->data_prot,conn);\n        (conn->in_buffer).index = 0;\n        (conn->in_buffer).size = __n_00;\n        if (__n_00 == 0) {\n          if (__n != 0) {\n            (conn->in_buffer).eof_flag = 1;\n          }\n          break;\n        }\n        if (uVar5 <= __n_00) {\n          __n_00 = uVar5;\n        }\n        memcpy(local_38,(conn->in_buffer).data,__n_00);\n        __n = local_30 + __n_00;\n        local_38 = local_38 + __n_00;\n        psVar1 = &(conn->in_buffer).index;\n        *psVar1 = *psVar1 + __n_00;\n        uVar5 = uVar5 - __n_00;\n        local_30 = __n;\n      }" { (expression_statement "__n = __n_00;" (assignment_expression "__n = __n_00" identifier = identifier) ;) (expression_statement "CVar4 = socket_read(__fd,&len_1,4);" (assignment_expression "CVar4 = socket_read(__fd,&len_1,4)" identifier = (call_expression "socket_read(__fd,&len_1,4)" identifier (argument_list "(__fd,&len_1,4)" ( identifier , (pointer_expression "&len_1" & identifier) , number_literal )))) ;) (if_statement "if ((CVar4 != CURLE_OK) || (len_1 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }" if (parenthesized_expression "((CVar4 != CURLE_OK) || (len_1 == 0))" ( (binary_expression "(CVar4 != CURLE_OK) || (len_1 == 0)" (parenthesized_expression "(CVar4 != CURLE_OK)" ( (binary_expression "CVar4 != CURLE_OK" identifier != identifier) )) || (parenthesized_expression "(len_1 == 0)" ( (binary_expression "len_1 == 0" identifier == number_literal) ))) )) (compound_statement "{\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }" { (labeled_statement "LAB_0003cfa5:\n          __n = 0xffffffff;" statement_identifier : (expression_statement "__n = 0xffffffff;" (assignment_expression "__n = 0xffffffff" identifier = number_literal) ;)) (break_statement "break;" break ;) })) (expression_statement "len_1 = (uint)len_1 >> 0x18 | (len_1 & 0xff0000U) >> 8 | (len_1 & 0xff00U) << 8 |\n                len_1 << 0x18;" (assignment_expression "len_1 = (uint)len_1 >> 0x18 | (len_1 & 0xff0000U) >> 8 | (len_1 & 0xff00U) << 8 |\n                len_1 << 0x18" identifier = (binary_expression "(uint)len_1 >> 0x18 | (len_1 & 0xff0000U) >> 8 | (len_1 & 0xff00U) << 8 |\n                len_1 << 0x18" (binary_expression "(uint)len_1 >> 0x18 | (len_1 & 0xff0000U) >> 8 | (len_1 & 0xff00U) << 8" (binary_expression "(uint)len_1 >> 0x18 | (len_1 & 0xff0000U) >> 8" (binary_expression "(uint)len_1 >> 0x18" (cast_expression "(uint)len_1" ( (type_descriptor "uint" type_identifier) ) identifier) >> number_literal) | (binary_expression "(len_1 & 0xff0000U) >> 8" (parenthesized_expression "(len_1 & 0xff0000U)" ( (binary_expression "len_1 & 0xff0000U" identifier & number_literal) )) >> number_literal)) | (binary_expression "(len_1 & 0xff00U) << 8" (parenthesized_expression "(len_1 & 0xff00U)" ( (binary_expression "len_1 & 0xff00U" identifier & number_literal) )) << number_literal)) | (binary_expression "len_1 << 0x18" identifier << number_literal))) ;) (expression_statement "to = Curl_saferealloc((conn->in_buffer).data,len_1);" (assignment_expression "to = Curl_saferealloc((conn->in_buffer).data,len_1)" identifier = (call_expression "Curl_saferealloc((conn->in_buffer).data,len_1)" identifier (argument_list "((conn->in_buffer).data,len_1)" ( (field_expression "(conn->in_buffer).data" (parenthesized_expression "(conn->in_buffer)" ( (field_expression "conn->in_buffer" identifier -> field_identifier) )) . field_identifier) , identifier )))) ;) (expression_statement "(conn->in_buffer).data = to;" (assignment_expression "(conn->in_buffer).data = to" (field_expression "(conn->in_buffer).data" (parenthesized_expression "(conn->in_buffer)" ( (field_expression "conn->in_buffer" identifier -> field_identifier) )) . field_identifier) = identifier) ;) (if_statement "if ((len_1 == 0) ||\n           ((to == (void *)0x0 || (CVar4 = socket_read(__fd,to,len_1), CVar4 != CURLE_OK))))\n        goto LAB_0003cfa5;" if (parenthesized_expression "((len_1 == 0) ||\n           ((to == (void *)0x0 || (CVar4 = socket_read(__fd,to,len_1), CVar4 != CURLE_OK))))" ( (binary_expression "(len_1 == 0) ||\n           ((to == (void *)0x0 || (CVar4 = socket_read(__fd,to,len_1), CVar4 != CURLE_OK)))" (parenthesized_expression "(len_1 == 0)" ( (binary_expression "len_1 == 0" identifier == number_literal) )) || (parenthesized_expression "((to == (void *)0x0 || (CVar4 = socket_read(__fd,to,len_1), CVar4 != CURLE_OK)))" ( (parenthesized_expression "(to == (void *)0x0 || (CVar4 = socket_read(__fd,to,len_1), CVar4 != CURLE_OK))" ( (binary_expression "to == (void *)0x0 || (CVar4 = socket_read(__fd,to,len_1), CVar4 != CURLE_OK)" (binary_expression "to == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) || (parenthesized_expression "(CVar4 = socket_read(__fd,to,len_1), CVar4 != CURLE_OK)" ( (comma_expression "CVar4 = socket_read(__fd,to,len_1), CVar4 != CURLE_OK" (assignment_expression "CVar4 = socket_read(__fd,to,len_1)" identifier = (call_expression "socket_read(__fd,to,len_1)" identifier (argument_list "(__fd,to,len_1)" ( identifier , identifier , identifier )))) , (binary_expression "CVar4 != CURLE_OK" identifier != identifier)) ))) )) ))) )) (goto_statement "goto LAB_0003cfa5;" goto statement_identifier ;)) (expression_statement "__n_00 = (*conn->mech->decode)\n                           (conn->app_data,(conn->in_buffer).data,len_1,conn->data_prot,conn);" (assignment_expression "__n_00 = (*conn->mech->decode)\n                           (conn->app_data,(conn->in_buffer).data,len_1,conn->data_prot,conn)" identifier = (call_expression "(*conn->mech->decode)\n                           (conn->app_data,(conn->in_buffer).data,len_1,conn->data_prot,conn)" (parenthesized_expression "(*conn->mech->decode)" ( (pointer_expression "*conn->mech->decode" * (field_expression "conn->mech->decode" (field_expression "conn->mech" identifier -> field_identifier) -> field_identifier)) )) (argument_list "(conn->app_data,(conn->in_buffer).data,len_1,conn->data_prot,conn)" ( (field_expression "conn->app_data" identifier -> field_identifier) , (field_expression "(conn->in_buffer).data" (parenthesized_expression "(conn->in_buffer)" ( (field_expression "conn->in_buffer" identifier -> field_identifier) )) . field_identifier) , identifier , (field_expression "conn->data_prot" identifier -> field_identifier) , identifier )))) ;) (expression_statement "(conn->in_buffer).index = 0;" (assignment_expression "(conn->in_buffer).index = 0" (field_expression "(conn->in_buffer).index" (parenthesized_expression "(conn->in_buffer)" ( (field_expression "conn->in_buffer" identifier -> field_identifier) )) . field_identifier) = number_literal) ;) (expression_statement "(conn->in_buffer).size = __n_00;" (assignment_expression "(conn->in_buffer).size = __n_00" (field_expression "(conn->in_buffer).size" (parenthesized_expression "(conn->in_buffer)" ( (field_expression "conn->in_buffer" identifier -> field_identifier) )) . field_identifier) = identifier) ;) (if_statement "if (__n_00 == 0) {\n          if (__n != 0) {\n            (conn->in_buffer).eof_flag = 1;\n          }\n          break;\n        }" if (parenthesized_expression "(__n_00 == 0)" ( (binary_expression "__n_00 == 0" identifier == number_literal) )) (compound_statement "{\n          if (__n != 0) {\n            (conn->in_buffer).eof_flag = 1;\n          }\n          break;\n        }" { (if_statement "if (__n != 0) {\n            (conn->in_buffer).eof_flag = 1;\n          }" if (parenthesized_expression "(__n != 0)" ( (binary_expression "__n != 0" identifier != number_literal) )) (compound_statement "{\n            (conn->in_buffer).eof_flag = 1;\n          }" { (expression_statement "(conn->in_buffer).eof_flag = 1;" (assignment_expression "(conn->in_buffer).eof_flag = 1" (field_expression "(conn->in_buffer).eof_flag" (parenthesized_expression "(conn->in_buffer)" ( (field_expression "conn->in_buffer" identifier -> field_identifier) )) . field_identifier) = number_literal) ;) })) (break_statement "break;" break ;) })) (if_statement "if (uVar5 <= __n_00) {\n          __n_00 = uVar5;\n        }" if (parenthesized_expression "(uVar5 <= __n_00)" ( (binary_expression "uVar5 <= __n_00" identifier <= identifier) )) (compound_statement "{\n          __n_00 = uVar5;\n        }" { (expression_statement "__n_00 = uVar5;" (assignment_expression "__n_00 = uVar5" identifier = identifier) ;) })) (expression_statement "memcpy(local_38,(conn->in_buffer).data,__n_00);" (call_expression "memcpy(local_38,(conn->in_buffer).data,__n_00)" identifier (argument_list "(local_38,(conn->in_buffer).data,__n_00)" ( identifier , (field_expression "(conn->in_buffer).data" (parenthesized_expression "(conn->in_buffer)" ( (field_expression "conn->in_buffer" identifier -> field_identifier) )) . field_identifier) , identifier ))) ;) (expression_statement "__n = local_30 + __n_00;" (assignment_expression "__n = local_30 + __n_00" identifier = (binary_expression "local_30 + __n_00" identifier + identifier)) ;) (expression_statement "local_38 = local_38 + __n_00;" (assignment_expression "local_38 = local_38 + __n_00" identifier = (binary_expression "local_38 + __n_00" identifier + identifier)) ;) (expression_statement "psVar1 = &(conn->in_buffer).index;" (assignment_expression "psVar1 = &(conn->in_buffer).index" identifier = (pointer_expression "&(conn->in_buffer).index" & (field_expression "(conn->in_buffer).index" (parenthesized_expression "(conn->in_buffer)" ( (field_expression "conn->in_buffer" identifier -> field_identifier) )) . field_identifier))) ;) (expression_statement "*psVar1 = *psVar1 + __n_00;" (assignment_expression "*psVar1 = *psVar1 + __n_00" (pointer_expression "*psVar1" * identifier) = (binary_expression "*psVar1 + __n_00" (pointer_expression "*psVar1" * identifier) + identifier)) ;) (expression_statement "uVar5 = uVar5 - __n_00;" (assignment_expression "uVar5 = uVar5 - __n_00" identifier = (binary_expression "uVar5 - __n_00" identifier - identifier)) ;) (expression_statement "local_30 = __n;" (assignment_expression "local_30 = __n" identifier = identifier) ;) }) while (parenthesized_expression "(uVar5 != 0)" ( (binary_expression "uVar5 != 0" identifier != number_literal) )) ;) })) }) (else_clause "else {\n    (conn->in_buffer).eof_flag = 0;\n    __n = 0;\n  }" else (compound_statement "{\n    (conn->in_buffer).eof_flag = 0;\n    __n = 0;\n  }" { (expression_statement "(conn->in_buffer).eof_flag = 0;" (assignment_expression "(conn->in_buffer).eof_flag = 0" (field_expression "(conn->in_buffer).eof_flag" (parenthesized_expression "(conn->in_buffer)" ( (field_expression "conn->in_buffer" identifier -> field_identifier) )) . field_identifier) = number_literal) ;) (expression_statement "__n = 0;" (assignment_expression "__n = 0" identifier = number_literal) ;) }))))) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" if (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" { comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return __n;" return identifier ;) })))
(translation_unit "size_t FUN_0003cea0(int param_1,void *param_2,uint param_3,undefined4 *param_4)\n\n{\n  size_t __n;\n  int iVar1;\n  uint __n_00;\n  int in_GS_OFFSET;\n  int unaff_retaddr;\n  int __fd;\n  uint *puVar2;\n  size_t local_34;\n  uint local_28;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x3cea9;\n  entry();\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  __fd = *(int *)(unaff_retaddr + 400 + param_1 * 4);\n  iVar1 = *(int *)(unaff_retaddr + 0x2c4);\n  *param_4 = 0;\n  if ((iVar1 == 0) || (*(int *)(unaff_retaddr + 0x2cc) == 1)) {\n    __n = read(__fd,param_2,param_3);\n  }\n  else if (*(int *)(unaff_retaddr + 0x2e4) == 0) {\n    __n = *(int *)(unaff_retaddr + 0x2dc) - *(int *)(unaff_retaddr + 0x2e0);\n    if (param_3 < __n) {\n      __n = param_3;\n    }\n    memcpy(param_2,(void *)(*(int *)(unaff_retaddr + 0x2e0) + *(int *)(unaff_retaddr + 0x2d8)),__n);\n    param_2 = (void *)((int)param_2 + __n);\n    *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n;\n    param_3 = param_3 - __n;\n    if (param_3 != 0) {\n      puVar2 = &local_28;\n      __n_00 = __n;\n      local_34 = __n;\n      do {\n        __n = __n_00;\n        iVar1 = FUN_0003cd80(__fd,param_2,puVar2);\n        if ((iVar1 != 0) || (local_28 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }\n        local_28 = local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8 |\n                   local_28 << 0x18;\n        iVar1 = FUN_0004b300(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28);\n        *(int *)(unaff_retaddr + 0x2d8) = iVar1;\n        if ((local_28 == 0) ||\n           ((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0))))\n        goto LAB_0003cfa5;\n        __n_00 = (**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))\n                           (*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr);\n        *(undefined4 *)(unaff_retaddr + 0x2e0) = 0;\n        *(uint *)(unaff_retaddr + 0x2dc) = __n_00;\n        if (__n_00 == 0) {\n          if (__n != 0) {\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }\n          break;\n        }\n        if (param_3 <= __n_00) {\n          __n_00 = param_3;\n        }\n        memcpy(param_2,*(void **)(unaff_retaddr + 0x2d8),__n_00);\n        __n = local_34 + __n_00;\n        param_2 = (void *)((int)param_2 + __n_00);\n        *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n_00;\n        param_3 = param_3 - __n_00;\n        local_34 = __n;\n      } while (param_3 != 0);\n    }\n  }\n  else {\n    *(undefined4 *)(unaff_retaddr + 0x2e4) = 0;\n    __n = 0;\n  }\n  if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0007c1a0();\n  }\n  return __n;\n}\n\n" (function_definition "size_t FUN_0003cea0(int param_1,void *param_2,uint param_3,undefined4 *param_4)\n\n{\n  size_t __n;\n  int iVar1;\n  uint __n_00;\n  int in_GS_OFFSET;\n  int unaff_retaddr;\n  int __fd;\n  uint *puVar2;\n  size_t local_34;\n  uint local_28;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x3cea9;\n  entry();\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  __fd = *(int *)(unaff_retaddr + 400 + param_1 * 4);\n  iVar1 = *(int *)(unaff_retaddr + 0x2c4);\n  *param_4 = 0;\n  if ((iVar1 == 0) || (*(int *)(unaff_retaddr + 0x2cc) == 1)) {\n    __n = read(__fd,param_2,param_3);\n  }\n  else if (*(int *)(unaff_retaddr + 0x2e4) == 0) {\n    __n = *(int *)(unaff_retaddr + 0x2dc) - *(int *)(unaff_retaddr + 0x2e0);\n    if (param_3 < __n) {\n      __n = param_3;\n    }\n    memcpy(param_2,(void *)(*(int *)(unaff_retaddr + 0x2e0) + *(int *)(unaff_retaddr + 0x2d8)),__n);\n    param_2 = (void *)((int)param_2 + __n);\n    *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n;\n    param_3 = param_3 - __n;\n    if (param_3 != 0) {\n      puVar2 = &local_28;\n      __n_00 = __n;\n      local_34 = __n;\n      do {\n        __n = __n_00;\n        iVar1 = FUN_0003cd80(__fd,param_2,puVar2);\n        if ((iVar1 != 0) || (local_28 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }\n        local_28 = local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8 |\n                   local_28 << 0x18;\n        iVar1 = FUN_0004b300(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28);\n        *(int *)(unaff_retaddr + 0x2d8) = iVar1;\n        if ((local_28 == 0) ||\n           ((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0))))\n        goto LAB_0003cfa5;\n        __n_00 = (**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))\n                           (*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr);\n        *(undefined4 *)(unaff_retaddr + 0x2e0) = 0;\n        *(uint *)(unaff_retaddr + 0x2dc) = __n_00;\n        if (__n_00 == 0) {\n          if (__n != 0) {\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }\n          break;\n        }\n        if (param_3 <= __n_00) {\n          __n_00 = param_3;\n        }\n        memcpy(param_2,*(void **)(unaff_retaddr + 0x2d8),__n_00);\n        __n = local_34 + __n_00;\n        param_2 = (void *)((int)param_2 + __n_00);\n        *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n_00;\n        param_3 = param_3 - __n_00;\n        local_34 = __n;\n      } while (param_3 != 0);\n    }\n  }\n  else {\n    *(undefined4 *)(unaff_retaddr + 0x2e4) = 0;\n    __n = 0;\n  }\n  if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0007c1a0();\n  }\n  return __n;\n}" primitive_type (function_declarator "FUN_0003cea0(int param_1,void *param_2,uint param_3,undefined4 *param_4)" identifier (parameter_list "(int param_1,void *param_2,uint param_3,undefined4 *param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "void *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "undefined4 *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  size_t __n;\n  int iVar1;\n  uint __n_00;\n  int in_GS_OFFSET;\n  int unaff_retaddr;\n  int __fd;\n  uint *puVar2;\n  size_t local_34;\n  uint local_28;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x3cea9;\n  entry();\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  __fd = *(int *)(unaff_retaddr + 400 + param_1 * 4);\n  iVar1 = *(int *)(unaff_retaddr + 0x2c4);\n  *param_4 = 0;\n  if ((iVar1 == 0) || (*(int *)(unaff_retaddr + 0x2cc) == 1)) {\n    __n = read(__fd,param_2,param_3);\n  }\n  else if (*(int *)(unaff_retaddr + 0x2e4) == 0) {\n    __n = *(int *)(unaff_retaddr + 0x2dc) - *(int *)(unaff_retaddr + 0x2e0);\n    if (param_3 < __n) {\n      __n = param_3;\n    }\n    memcpy(param_2,(void *)(*(int *)(unaff_retaddr + 0x2e0) + *(int *)(unaff_retaddr + 0x2d8)),__n);\n    param_2 = (void *)((int)param_2 + __n);\n    *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n;\n    param_3 = param_3 - __n;\n    if (param_3 != 0) {\n      puVar2 = &local_28;\n      __n_00 = __n;\n      local_34 = __n;\n      do {\n        __n = __n_00;\n        iVar1 = FUN_0003cd80(__fd,param_2,puVar2);\n        if ((iVar1 != 0) || (local_28 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }\n        local_28 = local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8 |\n                   local_28 << 0x18;\n        iVar1 = FUN_0004b300(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28);\n        *(int *)(unaff_retaddr + 0x2d8) = iVar1;\n        if ((local_28 == 0) ||\n           ((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0))))\n        goto LAB_0003cfa5;\n        __n_00 = (**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))\n                           (*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr);\n        *(undefined4 *)(unaff_retaddr + 0x2e0) = 0;\n        *(uint *)(unaff_retaddr + 0x2dc) = __n_00;\n        if (__n_00 == 0) {\n          if (__n != 0) {\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }\n          break;\n        }\n        if (param_3 <= __n_00) {\n          __n_00 = param_3;\n        }\n        memcpy(param_2,*(void **)(unaff_retaddr + 0x2d8),__n_00);\n        __n = local_34 + __n_00;\n        param_2 = (void *)((int)param_2 + __n_00);\n        *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n_00;\n        param_3 = param_3 - __n_00;\n        local_34 = __n;\n      } while (param_3 != 0);\n    }\n  }\n  else {\n    *(undefined4 *)(unaff_retaddr + 0x2e4) = 0;\n    __n = 0;\n  }\n  if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0007c1a0();\n  }\n  return __n;\n}" { (declaration "size_t __n;" primitive_type identifier ;) (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint __n_00;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "int unaff_retaddr;" primitive_type identifier ;) (declaration "int __fd;" primitive_type identifier ;) (declaration "uint *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "size_t local_34;" primitive_type identifier ;) (declaration "uint local_28;" type_identifier identifier ;) (declaration "int local_24;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x3cea9;" (assignment_expression "uStack_14 = 0x3cea9" identifier = number_literal) ;) (expression_statement "entry();" (call_expression "entry()" identifier (argument_list "()" ( ))) ;) (expression_statement "local_24 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_24 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "__fd = *(int *)(unaff_retaddr + 400 + param_1 * 4);" (assignment_expression "__fd = *(int *)(unaff_retaddr + 400 + param_1 * 4)" identifier = (pointer_expression "*(int *)(unaff_retaddr + 400 + param_1 * 4)" * (cast_expression "(int *)(unaff_retaddr + 400 + param_1 * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 400 + param_1 * 4)" ( (binary_expression "unaff_retaddr + 400 + param_1 * 4" (binary_expression "unaff_retaddr + 400" identifier + number_literal) + (binary_expression "param_1 * 4" identifier * number_literal)) ))))) ;) (expression_statement "iVar1 = *(int *)(unaff_retaddr + 0x2c4);" (assignment_expression "iVar1 = *(int *)(unaff_retaddr + 0x2c4)" identifier = (pointer_expression "*(int *)(unaff_retaddr + 0x2c4)" * (cast_expression "(int *)(unaff_retaddr + 0x2c4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x2c4)" ( (binary_expression "unaff_retaddr + 0x2c4" identifier + number_literal) ))))) ;) (expression_statement "*param_4 = 0;" (assignment_expression "*param_4 = 0" (pointer_expression "*param_4" * identifier) = number_literal) ;) (if_statement "if ((iVar1 == 0) || (*(int *)(unaff_retaddr + 0x2cc) == 1)) {\n    __n = read(__fd,param_2,param_3);\n  }\n  else if (*(int *)(unaff_retaddr + 0x2e4) == 0) {\n    __n = *(int *)(unaff_retaddr + 0x2dc) - *(int *)(unaff_retaddr + 0x2e0);\n    if (param_3 < __n) {\n      __n = param_3;\n    }\n    memcpy(param_2,(void *)(*(int *)(unaff_retaddr + 0x2e0) + *(int *)(unaff_retaddr + 0x2d8)),__n);\n    param_2 = (void *)((int)param_2 + __n);\n    *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n;\n    param_3 = param_3 - __n;\n    if (param_3 != 0) {\n      puVar2 = &local_28;\n      __n_00 = __n;\n      local_34 = __n;\n      do {\n        __n = __n_00;\n        iVar1 = FUN_0003cd80(__fd,param_2,puVar2);\n        if ((iVar1 != 0) || (local_28 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }\n        local_28 = local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8 |\n                   local_28 << 0x18;\n        iVar1 = FUN_0004b300(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28);\n        *(int *)(unaff_retaddr + 0x2d8) = iVar1;\n        if ((local_28 == 0) ||\n           ((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0))))\n        goto LAB_0003cfa5;\n        __n_00 = (**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))\n                           (*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr);\n        *(undefined4 *)(unaff_retaddr + 0x2e0) = 0;\n        *(uint *)(unaff_retaddr + 0x2dc) = __n_00;\n        if (__n_00 == 0) {\n          if (__n != 0) {\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }\n          break;\n        }\n        if (param_3 <= __n_00) {\n          __n_00 = param_3;\n        }\n        memcpy(param_2,*(void **)(unaff_retaddr + 0x2d8),__n_00);\n        __n = local_34 + __n_00;\n        param_2 = (void *)((int)param_2 + __n_00);\n        *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n_00;\n        param_3 = param_3 - __n_00;\n        local_34 = __n;\n      } while (param_3 != 0);\n    }\n  }\n  else {\n    *(undefined4 *)(unaff_retaddr + 0x2e4) = 0;\n    __n = 0;\n  }" if (parenthesized_expression "((iVar1 == 0) || (*(int *)(unaff_retaddr + 0x2cc) == 1))" ( (binary_expression "(iVar1 == 0) || (*(int *)(unaff_retaddr + 0x2cc) == 1)" (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) || (parenthesized_expression "(*(int *)(unaff_retaddr + 0x2cc) == 1)" ( (binary_expression "*(int *)(unaff_retaddr + 0x2cc) == 1" (pointer_expression "*(int *)(unaff_retaddr + 0x2cc)" * (cast_expression "(int *)(unaff_retaddr + 0x2cc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x2cc)" ( (binary_expression "unaff_retaddr + 0x2cc" identifier + number_literal) )))) == number_literal) ))) )) (compound_statement "{\n    __n = read(__fd,param_2,param_3);\n  }" { (expression_statement "__n = read(__fd,param_2,param_3);" (assignment_expression "__n = read(__fd,param_2,param_3)" identifier = (call_expression "read(__fd,param_2,param_3)" identifier (argument_list "(__fd,param_2,param_3)" ( identifier , identifier , identifier )))) ;) }) (else_clause "else if (*(int *)(unaff_retaddr + 0x2e4) == 0) {\n    __n = *(int *)(unaff_retaddr + 0x2dc) - *(int *)(unaff_retaddr + 0x2e0);\n    if (param_3 < __n) {\n      __n = param_3;\n    }\n    memcpy(param_2,(void *)(*(int *)(unaff_retaddr + 0x2e0) + *(int *)(unaff_retaddr + 0x2d8)),__n);\n    param_2 = (void *)((int)param_2 + __n);\n    *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n;\n    param_3 = param_3 - __n;\n    if (param_3 != 0) {\n      puVar2 = &local_28;\n      __n_00 = __n;\n      local_34 = __n;\n      do {\n        __n = __n_00;\n        iVar1 = FUN_0003cd80(__fd,param_2,puVar2);\n        if ((iVar1 != 0) || (local_28 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }\n        local_28 = local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8 |\n                   local_28 << 0x18;\n        iVar1 = FUN_0004b300(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28);\n        *(int *)(unaff_retaddr + 0x2d8) = iVar1;\n        if ((local_28 == 0) ||\n           ((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0))))\n        goto LAB_0003cfa5;\n        __n_00 = (**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))\n                           (*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr);\n        *(undefined4 *)(unaff_retaddr + 0x2e0) = 0;\n        *(uint *)(unaff_retaddr + 0x2dc) = __n_00;\n        if (__n_00 == 0) {\n          if (__n != 0) {\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }\n          break;\n        }\n        if (param_3 <= __n_00) {\n          __n_00 = param_3;\n        }\n        memcpy(param_2,*(void **)(unaff_retaddr + 0x2d8),__n_00);\n        __n = local_34 + __n_00;\n        param_2 = (void *)((int)param_2 + __n_00);\n        *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n_00;\n        param_3 = param_3 - __n_00;\n        local_34 = __n;\n      } while (param_3 != 0);\n    }\n  }\n  else {\n    *(undefined4 *)(unaff_retaddr + 0x2e4) = 0;\n    __n = 0;\n  }" else (if_statement "if (*(int *)(unaff_retaddr + 0x2e4) == 0) {\n    __n = *(int *)(unaff_retaddr + 0x2dc) - *(int *)(unaff_retaddr + 0x2e0);\n    if (param_3 < __n) {\n      __n = param_3;\n    }\n    memcpy(param_2,(void *)(*(int *)(unaff_retaddr + 0x2e0) + *(int *)(unaff_retaddr + 0x2d8)),__n);\n    param_2 = (void *)((int)param_2 + __n);\n    *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n;\n    param_3 = param_3 - __n;\n    if (param_3 != 0) {\n      puVar2 = &local_28;\n      __n_00 = __n;\n      local_34 = __n;\n      do {\n        __n = __n_00;\n        iVar1 = FUN_0003cd80(__fd,param_2,puVar2);\n        if ((iVar1 != 0) || (local_28 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }\n        local_28 = local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8 |\n                   local_28 << 0x18;\n        iVar1 = FUN_0004b300(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28);\n        *(int *)(unaff_retaddr + 0x2d8) = iVar1;\n        if ((local_28 == 0) ||\n           ((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0))))\n        goto LAB_0003cfa5;\n        __n_00 = (**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))\n                           (*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr);\n        *(undefined4 *)(unaff_retaddr + 0x2e0) = 0;\n        *(uint *)(unaff_retaddr + 0x2dc) = __n_00;\n        if (__n_00 == 0) {\n          if (__n != 0) {\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }\n          break;\n        }\n        if (param_3 <= __n_00) {\n          __n_00 = param_3;\n        }\n        memcpy(param_2,*(void **)(unaff_retaddr + 0x2d8),__n_00);\n        __n = local_34 + __n_00;\n        param_2 = (void *)((int)param_2 + __n_00);\n        *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n_00;\n        param_3 = param_3 - __n_00;\n        local_34 = __n;\n      } while (param_3 != 0);\n    }\n  }\n  else {\n    *(undefined4 *)(unaff_retaddr + 0x2e4) = 0;\n    __n = 0;\n  }" if (parenthesized_expression "(*(int *)(unaff_retaddr + 0x2e4) == 0)" ( (binary_expression "*(int *)(unaff_retaddr + 0x2e4) == 0" (pointer_expression "*(int *)(unaff_retaddr + 0x2e4)" * (cast_expression "(int *)(unaff_retaddr + 0x2e4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x2e4)" ( (binary_expression "unaff_retaddr + 0x2e4" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    __n = *(int *)(unaff_retaddr + 0x2dc) - *(int *)(unaff_retaddr + 0x2e0);\n    if (param_3 < __n) {\n      __n = param_3;\n    }\n    memcpy(param_2,(void *)(*(int *)(unaff_retaddr + 0x2e0) + *(int *)(unaff_retaddr + 0x2d8)),__n);\n    param_2 = (void *)((int)param_2 + __n);\n    *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n;\n    param_3 = param_3 - __n;\n    if (param_3 != 0) {\n      puVar2 = &local_28;\n      __n_00 = __n;\n      local_34 = __n;\n      do {\n        __n = __n_00;\n        iVar1 = FUN_0003cd80(__fd,param_2,puVar2);\n        if ((iVar1 != 0) || (local_28 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }\n        local_28 = local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8 |\n                   local_28 << 0x18;\n        iVar1 = FUN_0004b300(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28);\n        *(int *)(unaff_retaddr + 0x2d8) = iVar1;\n        if ((local_28 == 0) ||\n           ((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0))))\n        goto LAB_0003cfa5;\n        __n_00 = (**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))\n                           (*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr);\n        *(undefined4 *)(unaff_retaddr + 0x2e0) = 0;\n        *(uint *)(unaff_retaddr + 0x2dc) = __n_00;\n        if (__n_00 == 0) {\n          if (__n != 0) {\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }\n          break;\n        }\n        if (param_3 <= __n_00) {\n          __n_00 = param_3;\n        }\n        memcpy(param_2,*(void **)(unaff_retaddr + 0x2d8),__n_00);\n        __n = local_34 + __n_00;\n        param_2 = (void *)((int)param_2 + __n_00);\n        *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n_00;\n        param_3 = param_3 - __n_00;\n        local_34 = __n;\n      } while (param_3 != 0);\n    }\n  }" { (expression_statement "__n = *(int *)(unaff_retaddr + 0x2dc) - *(int *)(unaff_retaddr + 0x2e0);" (assignment_expression "__n = *(int *)(unaff_retaddr + 0x2dc) - *(int *)(unaff_retaddr + 0x2e0)" identifier = (binary_expression "*(int *)(unaff_retaddr + 0x2dc) - *(int *)(unaff_retaddr + 0x2e0)" (pointer_expression "*(int *)(unaff_retaddr + 0x2dc)" * (cast_expression "(int *)(unaff_retaddr + 0x2dc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x2dc)" ( (binary_expression "unaff_retaddr + 0x2dc" identifier + number_literal) )))) - (pointer_expression "*(int *)(unaff_retaddr + 0x2e0)" * (cast_expression "(int *)(unaff_retaddr + 0x2e0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x2e0)" ( (binary_expression "unaff_retaddr + 0x2e0" identifier + number_literal) )))))) ;) (if_statement "if (param_3 < __n) {\n      __n = param_3;\n    }" if (parenthesized_expression "(param_3 < __n)" ( (binary_expression "param_3 < __n" identifier < identifier) )) (compound_statement "{\n      __n = param_3;\n    }" { (expression_statement "__n = param_3;" (assignment_expression "__n = param_3" identifier = identifier) ;) })) (expression_statement "memcpy(param_2,(void *)(*(int *)(unaff_retaddr + 0x2e0) + *(int *)(unaff_retaddr + 0x2d8)),__n);" (call_expression "memcpy(param_2,(void *)(*(int *)(unaff_retaddr + 0x2e0) + *(int *)(unaff_retaddr + 0x2d8)),__n)" identifier (argument_list "(param_2,(void *)(*(int *)(unaff_retaddr + 0x2e0) + *(int *)(unaff_retaddr + 0x2d8)),__n)" ( identifier , (cast_expression "(void *)(*(int *)(unaff_retaddr + 0x2e0) + *(int *)(unaff_retaddr + 0x2d8))" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(unaff_retaddr + 0x2e0) + *(int *)(unaff_retaddr + 0x2d8))" ( (binary_expression "*(int *)(unaff_retaddr + 0x2e0) + *(int *)(unaff_retaddr + 0x2d8)" (pointer_expression "*(int *)(unaff_retaddr + 0x2e0)" * (cast_expression "(int *)(unaff_retaddr + 0x2e0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x2e0)" ( (binary_expression "unaff_retaddr + 0x2e0" identifier + number_literal) )))) + (pointer_expression "*(int *)(unaff_retaddr + 0x2d8)" * (cast_expression "(int *)(unaff_retaddr + 0x2d8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x2d8)" ( (binary_expression "unaff_retaddr + 0x2d8" identifier + number_literal) ))))) ))) , identifier ))) ;) (expression_statement "param_2 = (void *)((int)param_2 + __n);" (assignment_expression "param_2 = (void *)((int)param_2 + __n)" identifier = (cast_expression "(void *)((int)param_2 + __n)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_2 + __n)" ( (binary_expression "(int)param_2 + __n" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (expression_statement "*(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n;" (assignment_expression "*(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n" (pointer_expression "*(int *)(unaff_retaddr + 0x2e0)" * (cast_expression "(int *)(unaff_retaddr + 0x2e0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x2e0)" ( (binary_expression "unaff_retaddr + 0x2e0" identifier + number_literal) )))) = (binary_expression "*(int *)(unaff_retaddr + 0x2e0) + __n" (pointer_expression "*(int *)(unaff_retaddr + 0x2e0)" * (cast_expression "(int *)(unaff_retaddr + 0x2e0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x2e0)" ( (binary_expression "unaff_retaddr + 0x2e0" identifier + number_literal) )))) + identifier)) ;) (expression_statement "param_3 = param_3 - __n;" (assignment_expression "param_3 = param_3 - __n" identifier = (binary_expression "param_3 - __n" identifier - identifier)) ;) (if_statement "if (param_3 != 0) {\n      puVar2 = &local_28;\n      __n_00 = __n;\n      local_34 = __n;\n      do {\n        __n = __n_00;\n        iVar1 = FUN_0003cd80(__fd,param_2,puVar2);\n        if ((iVar1 != 0) || (local_28 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }\n        local_28 = local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8 |\n                   local_28 << 0x18;\n        iVar1 = FUN_0004b300(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28);\n        *(int *)(unaff_retaddr + 0x2d8) = iVar1;\n        if ((local_28 == 0) ||\n           ((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0))))\n        goto LAB_0003cfa5;\n        __n_00 = (**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))\n                           (*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr);\n        *(undefined4 *)(unaff_retaddr + 0x2e0) = 0;\n        *(uint *)(unaff_retaddr + 0x2dc) = __n_00;\n        if (__n_00 == 0) {\n          if (__n != 0) {\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }\n          break;\n        }\n        if (param_3 <= __n_00) {\n          __n_00 = param_3;\n        }\n        memcpy(param_2,*(void **)(unaff_retaddr + 0x2d8),__n_00);\n        __n = local_34 + __n_00;\n        param_2 = (void *)((int)param_2 + __n_00);\n        *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n_00;\n        param_3 = param_3 - __n_00;\n        local_34 = __n;\n      } while (param_3 != 0);\n    }" if (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) )) (compound_statement "{\n      puVar2 = &local_28;\n      __n_00 = __n;\n      local_34 = __n;\n      do {\n        __n = __n_00;\n        iVar1 = FUN_0003cd80(__fd,param_2,puVar2);\n        if ((iVar1 != 0) || (local_28 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }\n        local_28 = local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8 |\n                   local_28 << 0x18;\n        iVar1 = FUN_0004b300(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28);\n        *(int *)(unaff_retaddr + 0x2d8) = iVar1;\n        if ((local_28 == 0) ||\n           ((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0))))\n        goto LAB_0003cfa5;\n        __n_00 = (**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))\n                           (*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr);\n        *(undefined4 *)(unaff_retaddr + 0x2e0) = 0;\n        *(uint *)(unaff_retaddr + 0x2dc) = __n_00;\n        if (__n_00 == 0) {\n          if (__n != 0) {\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }\n          break;\n        }\n        if (param_3 <= __n_00) {\n          __n_00 = param_3;\n        }\n        memcpy(param_2,*(void **)(unaff_retaddr + 0x2d8),__n_00);\n        __n = local_34 + __n_00;\n        param_2 = (void *)((int)param_2 + __n_00);\n        *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n_00;\n        param_3 = param_3 - __n_00;\n        local_34 = __n;\n      } while (param_3 != 0);\n    }" { (expression_statement "puVar2 = &local_28;" (assignment_expression "puVar2 = &local_28" identifier = (pointer_expression "&local_28" & identifier)) ;) (expression_statement "__n_00 = __n;" (assignment_expression "__n_00 = __n" identifier = identifier) ;) (expression_statement "local_34 = __n;" (assignment_expression "local_34 = __n" identifier = identifier) ;) (do_statement "do {\n        __n = __n_00;\n        iVar1 = FUN_0003cd80(__fd,param_2,puVar2);\n        if ((iVar1 != 0) || (local_28 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }\n        local_28 = local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8 |\n                   local_28 << 0x18;\n        iVar1 = FUN_0004b300(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28);\n        *(int *)(unaff_retaddr + 0x2d8) = iVar1;\n        if ((local_28 == 0) ||\n           ((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0))))\n        goto LAB_0003cfa5;\n        __n_00 = (**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))\n                           (*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr);\n        *(undefined4 *)(unaff_retaddr + 0x2e0) = 0;\n        *(uint *)(unaff_retaddr + 0x2dc) = __n_00;\n        if (__n_00 == 0) {\n          if (__n != 0) {\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }\n          break;\n        }\n        if (param_3 <= __n_00) {\n          __n_00 = param_3;\n        }\n        memcpy(param_2,*(void **)(unaff_retaddr + 0x2d8),__n_00);\n        __n = local_34 + __n_00;\n        param_2 = (void *)((int)param_2 + __n_00);\n        *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n_00;\n        param_3 = param_3 - __n_00;\n        local_34 = __n;\n      } while (param_3 != 0);" do (compound_statement "{\n        __n = __n_00;\n        iVar1 = FUN_0003cd80(__fd,param_2,puVar2);\n        if ((iVar1 != 0) || (local_28 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }\n        local_28 = local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8 |\n                   local_28 << 0x18;\n        iVar1 = FUN_0004b300(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28);\n        *(int *)(unaff_retaddr + 0x2d8) = iVar1;\n        if ((local_28 == 0) ||\n           ((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0))))\n        goto LAB_0003cfa5;\n        __n_00 = (**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))\n                           (*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr);\n        *(undefined4 *)(unaff_retaddr + 0x2e0) = 0;\n        *(uint *)(unaff_retaddr + 0x2dc) = __n_00;\n        if (__n_00 == 0) {\n          if (__n != 0) {\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }\n          break;\n        }\n        if (param_3 <= __n_00) {\n          __n_00 = param_3;\n        }\n        memcpy(param_2,*(void **)(unaff_retaddr + 0x2d8),__n_00);\n        __n = local_34 + __n_00;\n        param_2 = (void *)((int)param_2 + __n_00);\n        *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n_00;\n        param_3 = param_3 - __n_00;\n        local_34 = __n;\n      }" { (expression_statement "__n = __n_00;" (assignment_expression "__n = __n_00" identifier = identifier) ;) (expression_statement "iVar1 = FUN_0003cd80(__fd,param_2,puVar2);" (assignment_expression "iVar1 = FUN_0003cd80(__fd,param_2,puVar2)" identifier = (call_expression "FUN_0003cd80(__fd,param_2,puVar2)" identifier (argument_list "(__fd,param_2,puVar2)" ( identifier , identifier , identifier )))) ;) (if_statement "if ((iVar1 != 0) || (local_28 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }" if (parenthesized_expression "((iVar1 != 0) || (local_28 == 0))" ( (binary_expression "(iVar1 != 0) || (local_28 == 0)" (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) || (parenthesized_expression "(local_28 == 0)" ( (binary_expression "local_28 == 0" identifier == number_literal) ))) )) (compound_statement "{\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }" { (labeled_statement "LAB_0003cfa5:\n          __n = 0xffffffff;" statement_identifier : (expression_statement "__n = 0xffffffff;" (assignment_expression "__n = 0xffffffff" identifier = number_literal) ;)) (break_statement "break;" break ;) })) (expression_statement "local_28 = local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8 |\n                   local_28 << 0x18;" (assignment_expression "local_28 = local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8 |\n                   local_28 << 0x18" identifier = (binary_expression "local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8 |\n                   local_28 << 0x18" (binary_expression "local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8" (binary_expression "local_28 >> 0x18 | (local_28 & 0xff0000) >> 8" (binary_expression "local_28 >> 0x18" identifier >> number_literal) | (binary_expression "(local_28 & 0xff0000) >> 8" (parenthesized_expression "(local_28 & 0xff0000)" ( (binary_expression "local_28 & 0xff0000" identifier & number_literal) )) >> number_literal)) | (binary_expression "(local_28 & 0xff00) << 8" (parenthesized_expression "(local_28 & 0xff00)" ( (binary_expression "local_28 & 0xff00" identifier & number_literal) )) << number_literal)) | (binary_expression "local_28 << 0x18" identifier << number_literal))) ;) (expression_statement "iVar1 = FUN_0004b300(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28);" (assignment_expression "iVar1 = FUN_0004b300(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28)" identifier = (call_expression "FUN_0004b300(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28)" identifier (argument_list "(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28)" ( (pointer_expression "*(undefined4 *)(unaff_retaddr + 0x2d8)" * (cast_expression "(undefined4 *)(unaff_retaddr + 0x2d8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x2d8)" ( (binary_expression "unaff_retaddr + 0x2d8" identifier + number_literal) )))) , identifier )))) ;) (expression_statement "*(int *)(unaff_retaddr + 0x2d8) = iVar1;" (assignment_expression "*(int *)(unaff_retaddr + 0x2d8) = iVar1" (pointer_expression "*(int *)(unaff_retaddr + 0x2d8)" * (cast_expression "(int *)(unaff_retaddr + 0x2d8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x2d8)" ( (binary_expression "unaff_retaddr + 0x2d8" identifier + number_literal) )))) = identifier) ;) (if_statement "if ((local_28 == 0) ||\n           ((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0))))\n        goto LAB_0003cfa5;" if (parenthesized_expression "((local_28 == 0) ||\n           ((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0))))" ( (binary_expression "(local_28 == 0) ||\n           ((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0)))" (parenthesized_expression "(local_28 == 0)" ( (binary_expression "local_28 == 0" identifier == number_literal) )) || (parenthesized_expression "((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0)))" ( (parenthesized_expression "(iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0))" ( (binary_expression "iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0)" (binary_expression "iVar1 == 0" identifier == number_literal) || (parenthesized_expression "(iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0)" ( (comma_expression "iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0" (assignment_expression "iVar1 = FUN_0003cd80(__fd,param_2,puVar2)" identifier = (call_expression "FUN_0003cd80(__fd,param_2,puVar2)" identifier (argument_list "(__fd,param_2,puVar2)" ( identifier , identifier , identifier )))) , (binary_expression "iVar1 != 0" identifier != number_literal)) ))) )) ))) )) (goto_statement "goto LAB_0003cfa5;" goto statement_identifier ;)) (expression_statement "__n_00 = (**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))\n                           (*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr);" (assignment_expression "__n_00 = (**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))\n                           (*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr)" identifier = (call_expression "(**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))\n                           (*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr)" (parenthesized_expression "(**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))" ( (pointer_expression "**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20)" * (pointer_expression "*(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20)" * (cast_expression "(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)(unaff_retaddr + 0x2ec) + 0x20)" ( (binary_expression "*(int *)(unaff_retaddr + 0x2ec) + 0x20" (pointer_expression "*(int *)(unaff_retaddr + 0x2ec)" * (cast_expression "(int *)(unaff_retaddr + 0x2ec)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x2ec)" ( (binary_expression "unaff_retaddr + 0x2ec" identifier + number_literal) )))) + number_literal) ))))) )) (argument_list "(*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr)" ( (pointer_expression "*(undefined4 *)(unaff_retaddr + 0x2e8)" * (cast_expression "(undefined4 *)(unaff_retaddr + 0x2e8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x2e8)" ( (binary_expression "unaff_retaddr + 0x2e8" identifier + number_literal) )))) , (pointer_expression "*(undefined4 *)(unaff_retaddr + 0x2d8)" * (cast_expression "(undefined4 *)(unaff_retaddr + 0x2d8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x2d8)" ( (binary_expression "unaff_retaddr + 0x2d8" identifier + number_literal) )))) , identifier , (pointer_expression "*(undefined4 *)(unaff_retaddr + 0x2cc)" * (cast_expression "(undefined4 *)(unaff_retaddr + 0x2cc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x2cc)" ( (binary_expression "unaff_retaddr + 0x2cc" identifier + number_literal) )))) , identifier )))) ;) (expression_statement "*(undefined4 *)(unaff_retaddr + 0x2e0) = 0;" (assignment_expression "*(undefined4 *)(unaff_retaddr + 0x2e0) = 0" (pointer_expression "*(undefined4 *)(unaff_retaddr + 0x2e0)" * (cast_expression "(undefined4 *)(unaff_retaddr + 0x2e0)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x2e0)" ( (binary_expression "unaff_retaddr + 0x2e0" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(uint *)(unaff_retaddr + 0x2dc) = __n_00;" (assignment_expression "*(uint *)(unaff_retaddr + 0x2dc) = __n_00" (pointer_expression "*(uint *)(unaff_retaddr + 0x2dc)" * (cast_expression "(uint *)(unaff_retaddr + 0x2dc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x2dc)" ( (binary_expression "unaff_retaddr + 0x2dc" identifier + number_literal) )))) = identifier) ;) (if_statement "if (__n_00 == 0) {\n          if (__n != 0) {\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }\n          break;\n        }" if (parenthesized_expression "(__n_00 == 0)" ( (binary_expression "__n_00 == 0" identifier == number_literal) )) (compound_statement "{\n          if (__n != 0) {\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }\n          break;\n        }" { (if_statement "if (__n != 0) {\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }" if (parenthesized_expression "(__n != 0)" ( (binary_expression "__n != 0" identifier != number_literal) )) (compound_statement "{\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }" { (expression_statement "*(undefined4 *)(unaff_retaddr + 0x2e4) = 1;" (assignment_expression "*(undefined4 *)(unaff_retaddr + 0x2e4) = 1" (pointer_expression "*(undefined4 *)(unaff_retaddr + 0x2e4)" * (cast_expression "(undefined4 *)(unaff_retaddr + 0x2e4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x2e4)" ( (binary_expression "unaff_retaddr + 0x2e4" identifier + number_literal) )))) = number_literal) ;) })) (break_statement "break;" break ;) })) (if_statement "if (param_3 <= __n_00) {\n          __n_00 = param_3;\n        }" if (parenthesized_expression "(param_3 <= __n_00)" ( (binary_expression "param_3 <= __n_00" identifier <= identifier) )) (compound_statement "{\n          __n_00 = param_3;\n        }" { (expression_statement "__n_00 = param_3;" (assignment_expression "__n_00 = param_3" identifier = identifier) ;) })) (expression_statement "memcpy(param_2,*(void **)(unaff_retaddr + 0x2d8),__n_00);" (call_expression "memcpy(param_2,*(void **)(unaff_retaddr + 0x2d8),__n_00)" identifier (argument_list "(param_2,*(void **)(unaff_retaddr + 0x2d8),__n_00)" ( identifier , (pointer_expression "*(void **)(unaff_retaddr + 0x2d8)" * (cast_expression "(void **)(unaff_retaddr + 0x2d8)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(unaff_retaddr + 0x2d8)" ( (binary_expression "unaff_retaddr + 0x2d8" identifier + number_literal) )))) , identifier ))) ;) (expression_statement "__n = local_34 + __n_00;" (assignment_expression "__n = local_34 + __n_00" identifier = (binary_expression "local_34 + __n_00" identifier + identifier)) ;) (expression_statement "param_2 = (void *)((int)param_2 + __n_00);" (assignment_expression "param_2 = (void *)((int)param_2 + __n_00)" identifier = (cast_expression "(void *)((int)param_2 + __n_00)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_2 + __n_00)" ( (binary_expression "(int)param_2 + __n_00" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (expression_statement "*(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n_00;" (assignment_expression "*(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n_00" (pointer_expression "*(int *)(unaff_retaddr + 0x2e0)" * (cast_expression "(int *)(unaff_retaddr + 0x2e0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x2e0)" ( (binary_expression "unaff_retaddr + 0x2e0" identifier + number_literal) )))) = (binary_expression "*(int *)(unaff_retaddr + 0x2e0) + __n_00" (pointer_expression "*(int *)(unaff_retaddr + 0x2e0)" * (cast_expression "(int *)(unaff_retaddr + 0x2e0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x2e0)" ( (binary_expression "unaff_retaddr + 0x2e0" identifier + number_literal) )))) + identifier)) ;) (expression_statement "param_3 = param_3 - __n_00;" (assignment_expression "param_3 = param_3 - __n_00" identifier = (binary_expression "param_3 - __n_00" identifier - identifier)) ;) (expression_statement "local_34 = __n;" (assignment_expression "local_34 = __n" identifier = identifier) ;) }) while (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) )) ;) })) }) (else_clause "else {\n    *(undefined4 *)(unaff_retaddr + 0x2e4) = 0;\n    __n = 0;\n  }" else (compound_statement "{\n    *(undefined4 *)(unaff_retaddr + 0x2e4) = 0;\n    __n = 0;\n  }" { (expression_statement "*(undefined4 *)(unaff_retaddr + 0x2e4) = 0;" (assignment_expression "*(undefined4 *)(unaff_retaddr + 0x2e4) = 0" (pointer_expression "*(undefined4 *)(unaff_retaddr + 0x2e4)" * (cast_expression "(undefined4 *)(unaff_retaddr + 0x2e4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 0x2e4)" ( (binary_expression "unaff_retaddr + 0x2e4" identifier + number_literal) )))) = number_literal) ;) (expression_statement "__n = 0;" (assignment_expression "__n = 0" identifier = number_literal) ;) }))))) (if_statement "if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0007c1a0();\n  }" if (parenthesized_expression "(local_24 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_24 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    \n    FUN_0007c1a0();\n  }" { (expression_statement "FUN_0007c1a0();" (call_expression "FUN_0007c1a0()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return __n;" 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 (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + (binary_expression IDENT * LIT)) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) || (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT )))) ;) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) - (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ))) , 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 (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != LIT) )) || (parenthesized_expression ( (binary_expression IDENT == LIT) ))) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = LIT) ;)) (break_statement break ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (binary_expression (binary_expression IDENT >> LIT) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) >> LIT)) | (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) << LIT)) | (binary_expression IDENT << LIT))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , IDENT )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) || (parenthesized_expression ( (parenthesized_expression ( (binary_expression (binary_expression IDENT == LIT) || (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT )))) , (binary_expression IDENT != LIT)) ))) )) ))) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) ))))) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , IDENT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , IDENT )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) })) (break_statement break ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + IDENT) )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }))))) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (return_statement return IDENT ;) })))
(function_definition "size_t FUN_0003cea0(int param_1,void *param_2,uint param_3,undefined4 *param_4)\n\n{\n  size_t __n;\n  int iVar1;\n  uint __n_00;\n  int in_GS_OFFSET;\n  int unaff_retaddr;\n  int __fd;\n  uint *puVar2;\n  size_t local_34;\n  uint local_28;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x3cea9;\n  entry();\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  __fd = *(int *)(unaff_retaddr + 400 + param_1 * 4);\n  iVar1 = *(int *)(unaff_retaddr + 0x2c4);\n  *param_4 = 0;\n  if ((iVar1 == 0) || (*(int *)(unaff_retaddr + 0x2cc) == 1)) {\n    __n = read(__fd,param_2,param_3);\n  }\n  else if (*(int *)(unaff_retaddr + 0x2e4) == 0) {\n    __n = *(int *)(unaff_retaddr + 0x2dc) - *(int *)(unaff_retaddr + 0x2e0);\n    if (param_3 < __n) {\n      __n = param_3;\n    }\n    memcpy(param_2,(void *)(*(int *)(unaff_retaddr + 0x2e0) + *(int *)(unaff_retaddr + 0x2d8)),__n);\n    param_2 = (void *)((int)param_2 + __n);\n    *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n;\n    param_3 = param_3 - __n;\n    if (param_3 != 0) {\n      puVar2 = &local_28;\n      __n_00 = __n;\n      local_34 = __n;\n      do {\n        __n = __n_00;\n        iVar1 = FUN_0003cd80(__fd,param_2,puVar2);\n        if ((iVar1 != 0) || (local_28 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }\n        local_28 = local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8 |\n                   local_28 << 0x18;\n        iVar1 = FUN_0004b300(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28);\n        *(int *)(unaff_retaddr + 0x2d8) = iVar1;\n        if ((local_28 == 0) ||\n           ((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0))))\n        goto LAB_0003cfa5;\n        __n_00 = (**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))\n                           (*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr);\n        *(undefined4 *)(unaff_retaddr + 0x2e0) = 0;\n        *(uint *)(unaff_retaddr + 0x2dc) = __n_00;\n        if (__n_00 == 0) {\n          if (__n != 0) {\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }\n          break;\n        }\n        if (param_3 <= __n_00) {\n          __n_00 = param_3;\n        }\n        memcpy(param_2,*(void **)(unaff_retaddr + 0x2d8),__n_00);\n        __n = local_34 + __n_00;\n        param_2 = (void *)((int)param_2 + __n_00);\n        *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n_00;\n        param_3 = param_3 - __n_00;\n        local_34 = __n;\n      } while (param_3 != 0);\n    }\n  }\n  else {\n    *(undefined4 *)(unaff_retaddr + 0x2e4) = 0;\n    __n = 0;\n  }\n  if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0007c1a0();\n  }\n  return __n;\n}" (primitive_type "size_t") (function_declarator "FUN_0003cea0(int param_1,void *param_2,uint param_3,undefined4 *param_4)" (identifier "FUN_0003cea0") (parameter_list "(int param_1,void *param_2,uint param_3,undefined4 *param_4)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "void *param_2" (primitive_type "void") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) (, ",") (parameter_declaration "undefined4 *param_4" (type_identifier "undefined4") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) () ")"))) (compound_statement "{\n  size_t __n;\n  int iVar1;\n  uint __n_00;\n  int in_GS_OFFSET;\n  int unaff_retaddr;\n  int __fd;\n  uint *puVar2;\n  size_t local_34;\n  uint local_28;\n  int local_24;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x3cea9;\n  entry();\n  local_24 = *(int *)(in_GS_OFFSET + 0x14);\n  __fd = *(int *)(unaff_retaddr + 400 + param_1 * 4);\n  iVar1 = *(int *)(unaff_retaddr + 0x2c4);\n  *param_4 = 0;\n  if ((iVar1 == 0) || (*(int *)(unaff_retaddr + 0x2cc) == 1)) {\n    __n = read(__fd,param_2,param_3);\n  }\n  else if (*(int *)(unaff_retaddr + 0x2e4) == 0) {\n    __n = *(int *)(unaff_retaddr + 0x2dc) - *(int *)(unaff_retaddr + 0x2e0);\n    if (param_3 < __n) {\n      __n = param_3;\n    }\n    memcpy(param_2,(void *)(*(int *)(unaff_retaddr + 0x2e0) + *(int *)(unaff_retaddr + 0x2d8)),__n);\n    param_2 = (void *)((int)param_2 + __n);\n    *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n;\n    param_3 = param_3 - __n;\n    if (param_3 != 0) {\n      puVar2 = &local_28;\n      __n_00 = __n;\n      local_34 = __n;\n      do {\n        __n = __n_00;\n        iVar1 = FUN_0003cd80(__fd,param_2,puVar2);\n        if ((iVar1 != 0) || (local_28 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }\n        local_28 = local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8 |\n                   local_28 << 0x18;\n        iVar1 = FUN_0004b300(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28);\n        *(int *)(unaff_retaddr + 0x2d8) = iVar1;\n        if ((local_28 == 0) ||\n           ((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0))))\n        goto LAB_0003cfa5;\n        __n_00 = (**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))\n                           (*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr);\n        *(undefined4 *)(unaff_retaddr + 0x2e0) = 0;\n        *(uint *)(unaff_retaddr + 0x2dc) = __n_00;\n        if (__n_00 == 0) {\n          if (__n != 0) {\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }\n          break;\n        }\n        if (param_3 <= __n_00) {\n          __n_00 = param_3;\n        }\n        memcpy(param_2,*(void **)(unaff_retaddr + 0x2d8),__n_00);\n        __n = local_34 + __n_00;\n        param_2 = (void *)((int)param_2 + __n_00);\n        *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n_00;\n        param_3 = param_3 - __n_00;\n        local_34 = __n;\n      } while (param_3 != 0);\n    }\n  }\n  else {\n    *(undefined4 *)(unaff_retaddr + 0x2e4) = 0;\n    __n = 0;\n  }\n  if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0007c1a0();\n  }\n  return __n;\n}" ({ "{") (declaration "size_t __n;" (primitive_type "size_t") (identifier "__n") (; ";")) (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "uint __n_00;" (type_identifier "uint") (identifier "__n_00") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "int unaff_retaddr;" (primitive_type "int") (identifier "unaff_retaddr") (; ";")) (declaration "int __fd;" (primitive_type "int") (identifier "__fd") (; ";")) (declaration "uint *puVar2;" (type_identifier "uint") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "size_t local_34;" (primitive_type "size_t") (identifier "local_34") (; ";")) (declaration "uint local_28;" (type_identifier "uint") (identifier "local_28") (; ";")) (declaration "int local_24;" (primitive_type "int") (identifier "local_24") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x3cea9;" (assignment_expression "uStack_14 = 0x3cea9" (identifier "uStack_14") (= "=") (number_literal "0x3cea9")) (; ";")) (expression_statement "entry();" (call_expression "entry()" (identifier "entry") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "local_24 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_24 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_24") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "__fd = *(int *)(unaff_retaddr + 400 + param_1 * 4);" (assignment_expression "__fd = *(int *)(unaff_retaddr + 400 + param_1 * 4)" (identifier "__fd") (= "=") (pointer_expression "*(int *)(unaff_retaddr + 400 + param_1 * 4)" (* "*") (cast_expression "(int *)(unaff_retaddr + 400 + param_1 * 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_retaddr + 400 + param_1 * 4)" (( "(") (binary_expression "unaff_retaddr + 400 + param_1 * 4" (binary_expression "unaff_retaddr + 400" (identifier "unaff_retaddr") (+ "+") (number_literal "400")) (+ "+") (binary_expression "param_1 * 4" (identifier "param_1") (* "*") (number_literal "4"))) () ")"))))) (; ";")) (expression_statement "iVar1 = *(int *)(unaff_retaddr + 0x2c4);" (assignment_expression "iVar1 = *(int *)(unaff_retaddr + 0x2c4)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(unaff_retaddr + 0x2c4)" (* "*") (cast_expression "(int *)(unaff_retaddr + 0x2c4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_retaddr + 0x2c4)" (( "(") (binary_expression "unaff_retaddr + 0x2c4" (identifier "unaff_retaddr") (+ "+") (number_literal "0x2c4")) () ")"))))) (; ";")) (expression_statement "*param_4 = 0;" (assignment_expression "*param_4 = 0" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (number_literal "0")) (; ";")) (if_statement "if ((iVar1 == 0) || (*(int *)(unaff_retaddr + 0x2cc) == 1)) {\n    __n = read(__fd,param_2,param_3);\n  }\n  else if (*(int *)(unaff_retaddr + 0x2e4) == 0) {\n    __n = *(int *)(unaff_retaddr + 0x2dc) - *(int *)(unaff_retaddr + 0x2e0);\n    if (param_3 < __n) {\n      __n = param_3;\n    }\n    memcpy(param_2,(void *)(*(int *)(unaff_retaddr + 0x2e0) + *(int *)(unaff_retaddr + 0x2d8)),__n);\n    param_2 = (void *)((int)param_2 + __n);\n    *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n;\n    param_3 = param_3 - __n;\n    if (param_3 != 0) {\n      puVar2 = &local_28;\n      __n_00 = __n;\n      local_34 = __n;\n      do {\n        __n = __n_00;\n        iVar1 = FUN_0003cd80(__fd,param_2,puVar2);\n        if ((iVar1 != 0) || (local_28 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }\n        local_28 = local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8 |\n                   local_28 << 0x18;\n        iVar1 = FUN_0004b300(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28);\n        *(int *)(unaff_retaddr + 0x2d8) = iVar1;\n        if ((local_28 == 0) ||\n           ((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0))))\n        goto LAB_0003cfa5;\n        __n_00 = (**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))\n                           (*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr);\n        *(undefined4 *)(unaff_retaddr + 0x2e0) = 0;\n        *(uint *)(unaff_retaddr + 0x2dc) = __n_00;\n        if (__n_00 == 0) {\n          if (__n != 0) {\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }\n          break;\n        }\n        if (param_3 <= __n_00) {\n          __n_00 = param_3;\n        }\n        memcpy(param_2,*(void **)(unaff_retaddr + 0x2d8),__n_00);\n        __n = local_34 + __n_00;\n        param_2 = (void *)((int)param_2 + __n_00);\n        *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n_00;\n        param_3 = param_3 - __n_00;\n        local_34 = __n;\n      } while (param_3 != 0);\n    }\n  }\n  else {\n    *(undefined4 *)(unaff_retaddr + 0x2e4) = 0;\n    __n = 0;\n  }" (if "if") (parenthesized_expression "((iVar1 == 0) || (*(int *)(unaff_retaddr + 0x2cc) == 1))" (( "(") (binary_expression "(iVar1 == 0) || (*(int *)(unaff_retaddr + 0x2cc) == 1)" (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(*(int *)(unaff_retaddr + 0x2cc) == 1)" (( "(") (binary_expression "*(int *)(unaff_retaddr + 0x2cc) == 1" (pointer_expression "*(int *)(unaff_retaddr + 0x2cc)" (* "*") (cast_expression "(int *)(unaff_retaddr + 0x2cc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_retaddr + 0x2cc)" (( "(") (binary_expression "unaff_retaddr + 0x2cc" (identifier "unaff_retaddr") (+ "+") (number_literal "0x2cc")) () ")")))) (== "==") (number_literal "1")) () ")"))) () ")")) (compound_statement "{\n    __n = read(__fd,param_2,param_3);\n  }" ({ "{") (expression_statement "__n = read(__fd,param_2,param_3);" (assignment_expression "__n = read(__fd,param_2,param_3)" (identifier "__n") (= "=") (call_expression "read(__fd,param_2,param_3)" (identifier "read") (argument_list "(__fd,param_2,param_3)" (( "(") (identifier "__fd") (, ",") (identifier "param_2") (, ",") (identifier "param_3") () ")")))) (; ";")) (} "}")) (else_clause "else if (*(int *)(unaff_retaddr + 0x2e4) == 0) {\n    __n = *(int *)(unaff_retaddr + 0x2dc) - *(int *)(unaff_retaddr + 0x2e0);\n    if (param_3 < __n) {\n      __n = param_3;\n    }\n    memcpy(param_2,(void *)(*(int *)(unaff_retaddr + 0x2e0) + *(int *)(unaff_retaddr + 0x2d8)),__n);\n    param_2 = (void *)((int)param_2 + __n);\n    *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n;\n    param_3 = param_3 - __n;\n    if (param_3 != 0) {\n      puVar2 = &local_28;\n      __n_00 = __n;\n      local_34 = __n;\n      do {\n        __n = __n_00;\n        iVar1 = FUN_0003cd80(__fd,param_2,puVar2);\n        if ((iVar1 != 0) || (local_28 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }\n        local_28 = local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8 |\n                   local_28 << 0x18;\n        iVar1 = FUN_0004b300(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28);\n        *(int *)(unaff_retaddr + 0x2d8) = iVar1;\n        if ((local_28 == 0) ||\n           ((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0))))\n        goto LAB_0003cfa5;\n        __n_00 = (**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))\n                           (*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr);\n        *(undefined4 *)(unaff_retaddr + 0x2e0) = 0;\n        *(uint *)(unaff_retaddr + 0x2dc) = __n_00;\n        if (__n_00 == 0) {\n          if (__n != 0) {\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }\n          break;\n        }\n        if (param_3 <= __n_00) {\n          __n_00 = param_3;\n        }\n        memcpy(param_2,*(void **)(unaff_retaddr + 0x2d8),__n_00);\n        __n = local_34 + __n_00;\n        param_2 = (void *)((int)param_2 + __n_00);\n        *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n_00;\n        param_3 = param_3 - __n_00;\n        local_34 = __n;\n      } while (param_3 != 0);\n    }\n  }\n  else {\n    *(undefined4 *)(unaff_retaddr + 0x2e4) = 0;\n    __n = 0;\n  }" (else "else") (if_statement "if (*(int *)(unaff_retaddr + 0x2e4) == 0) {\n    __n = *(int *)(unaff_retaddr + 0x2dc) - *(int *)(unaff_retaddr + 0x2e0);\n    if (param_3 < __n) {\n      __n = param_3;\n    }\n    memcpy(param_2,(void *)(*(int *)(unaff_retaddr + 0x2e0) + *(int *)(unaff_retaddr + 0x2d8)),__n);\n    param_2 = (void *)((int)param_2 + __n);\n    *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n;\n    param_3 = param_3 - __n;\n    if (param_3 != 0) {\n      puVar2 = &local_28;\n      __n_00 = __n;\n      local_34 = __n;\n      do {\n        __n = __n_00;\n        iVar1 = FUN_0003cd80(__fd,param_2,puVar2);\n        if ((iVar1 != 0) || (local_28 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }\n        local_28 = local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8 |\n                   local_28 << 0x18;\n        iVar1 = FUN_0004b300(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28);\n        *(int *)(unaff_retaddr + 0x2d8) = iVar1;\n        if ((local_28 == 0) ||\n           ((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0))))\n        goto LAB_0003cfa5;\n        __n_00 = (**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))\n                           (*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr);\n        *(undefined4 *)(unaff_retaddr + 0x2e0) = 0;\n        *(uint *)(unaff_retaddr + 0x2dc) = __n_00;\n        if (__n_00 == 0) {\n          if (__n != 0) {\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }\n          break;\n        }\n        if (param_3 <= __n_00) {\n          __n_00 = param_3;\n        }\n        memcpy(param_2,*(void **)(unaff_retaddr + 0x2d8),__n_00);\n        __n = local_34 + __n_00;\n        param_2 = (void *)((int)param_2 + __n_00);\n        *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n_00;\n        param_3 = param_3 - __n_00;\n        local_34 = __n;\n      } while (param_3 != 0);\n    }\n  }\n  else {\n    *(undefined4 *)(unaff_retaddr + 0x2e4) = 0;\n    __n = 0;\n  }" (if "if") (parenthesized_expression "(*(int *)(unaff_retaddr + 0x2e4) == 0)" (( "(") (binary_expression "*(int *)(unaff_retaddr + 0x2e4) == 0" (pointer_expression "*(int *)(unaff_retaddr + 0x2e4)" (* "*") (cast_expression "(int *)(unaff_retaddr + 0x2e4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_retaddr + 0x2e4)" (( "(") (binary_expression "unaff_retaddr + 0x2e4" (identifier "unaff_retaddr") (+ "+") (number_literal "0x2e4")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    __n = *(int *)(unaff_retaddr + 0x2dc) - *(int *)(unaff_retaddr + 0x2e0);\n    if (param_3 < __n) {\n      __n = param_3;\n    }\n    memcpy(param_2,(void *)(*(int *)(unaff_retaddr + 0x2e0) + *(int *)(unaff_retaddr + 0x2d8)),__n);\n    param_2 = (void *)((int)param_2 + __n);\n    *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n;\n    param_3 = param_3 - __n;\n    if (param_3 != 0) {\n      puVar2 = &local_28;\n      __n_00 = __n;\n      local_34 = __n;\n      do {\n        __n = __n_00;\n        iVar1 = FUN_0003cd80(__fd,param_2,puVar2);\n        if ((iVar1 != 0) || (local_28 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }\n        local_28 = local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8 |\n                   local_28 << 0x18;\n        iVar1 = FUN_0004b300(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28);\n        *(int *)(unaff_retaddr + 0x2d8) = iVar1;\n        if ((local_28 == 0) ||\n           ((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0))))\n        goto LAB_0003cfa5;\n        __n_00 = (**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))\n                           (*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr);\n        *(undefined4 *)(unaff_retaddr + 0x2e0) = 0;\n        *(uint *)(unaff_retaddr + 0x2dc) = __n_00;\n        if (__n_00 == 0) {\n          if (__n != 0) {\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }\n          break;\n        }\n        if (param_3 <= __n_00) {\n          __n_00 = param_3;\n        }\n        memcpy(param_2,*(void **)(unaff_retaddr + 0x2d8),__n_00);\n        __n = local_34 + __n_00;\n        param_2 = (void *)((int)param_2 + __n_00);\n        *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n_00;\n        param_3 = param_3 - __n_00;\n        local_34 = __n;\n      } while (param_3 != 0);\n    }\n  }" ({ "{") (expression_statement "__n = *(int *)(unaff_retaddr + 0x2dc) - *(int *)(unaff_retaddr + 0x2e0);" (assignment_expression "__n = *(int *)(unaff_retaddr + 0x2dc) - *(int *)(unaff_retaddr + 0x2e0)" (identifier "__n") (= "=") (binary_expression "*(int *)(unaff_retaddr + 0x2dc) - *(int *)(unaff_retaddr + 0x2e0)" (pointer_expression "*(int *)(unaff_retaddr + 0x2dc)" (* "*") (cast_expression "(int *)(unaff_retaddr + 0x2dc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_retaddr + 0x2dc)" (( "(") (binary_expression "unaff_retaddr + 0x2dc" (identifier "unaff_retaddr") (+ "+") (number_literal "0x2dc")) () ")")))) (- "-") (pointer_expression "*(int *)(unaff_retaddr + 0x2e0)" (* "*") (cast_expression "(int *)(unaff_retaddr + 0x2e0)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_retaddr + 0x2e0)" (( "(") (binary_expression "unaff_retaddr + 0x2e0" (identifier "unaff_retaddr") (+ "+") (number_literal "0x2e0")) () ")")))))) (; ";")) (if_statement "if (param_3 < __n) {\n      __n = param_3;\n    }" (if "if") (parenthesized_expression "(param_3 < __n)" (( "(") (binary_expression "param_3 < __n" (identifier "param_3") (< "<") (identifier "__n")) () ")")) (compound_statement "{\n      __n = param_3;\n    }" ({ "{") (expression_statement "__n = param_3;" (assignment_expression "__n = param_3" (identifier "__n") (= "=") (identifier "param_3")) (; ";")) (} "}"))) (expression_statement "memcpy(param_2,(void *)(*(int *)(unaff_retaddr + 0x2e0) + *(int *)(unaff_retaddr + 0x2d8)),__n);" (call_expression "memcpy(param_2,(void *)(*(int *)(unaff_retaddr + 0x2e0) + *(int *)(unaff_retaddr + 0x2d8)),__n)" (identifier "memcpy") (argument_list "(param_2,(void *)(*(int *)(unaff_retaddr + 0x2e0) + *(int *)(unaff_retaddr + 0x2d8)),__n)" (( "(") (identifier "param_2") (, ",") (cast_expression "(void *)(*(int *)(unaff_retaddr + 0x2e0) + *(int *)(unaff_retaddr + 0x2d8))" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(unaff_retaddr + 0x2e0) + *(int *)(unaff_retaddr + 0x2d8))" (( "(") (binary_expression "*(int *)(unaff_retaddr + 0x2e0) + *(int *)(unaff_retaddr + 0x2d8)" (pointer_expression "*(int *)(unaff_retaddr + 0x2e0)" (* "*") (cast_expression "(int *)(unaff_retaddr + 0x2e0)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_retaddr + 0x2e0)" (( "(") (binary_expression "unaff_retaddr + 0x2e0" (identifier "unaff_retaddr") (+ "+") (number_literal "0x2e0")) () ")")))) (+ "+") (pointer_expression "*(int *)(unaff_retaddr + 0x2d8)" (* "*") (cast_expression "(int *)(unaff_retaddr + 0x2d8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_retaddr + 0x2d8)" (( "(") (binary_expression "unaff_retaddr + 0x2d8" (identifier "unaff_retaddr") (+ "+") (number_literal "0x2d8")) () ")"))))) () ")"))) (, ",") (identifier "__n") () ")"))) (; ";")) (expression_statement "param_2 = (void *)((int)param_2 + __n);" (assignment_expression "param_2 = (void *)((int)param_2 + __n)" (identifier "param_2") (= "=") (cast_expression "(void *)((int)param_2 + __n)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)param_2 + __n)" (( "(") (binary_expression "(int)param_2 + __n" (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2")) (+ "+") (identifier "__n")) () ")")))) (; ";")) (expression_statement "*(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n;" (assignment_expression "*(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n" (pointer_expression "*(int *)(unaff_retaddr + 0x2e0)" (* "*") (cast_expression "(int *)(unaff_retaddr + 0x2e0)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_retaddr + 0x2e0)" (( "(") (binary_expression "unaff_retaddr + 0x2e0" (identifier "unaff_retaddr") (+ "+") (number_literal "0x2e0")) () ")")))) (= "=") (binary_expression "*(int *)(unaff_retaddr + 0x2e0) + __n" (pointer_expression "*(int *)(unaff_retaddr + 0x2e0)" (* "*") (cast_expression "(int *)(unaff_retaddr + 0x2e0)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_retaddr + 0x2e0)" (( "(") (binary_expression "unaff_retaddr + 0x2e0" (identifier "unaff_retaddr") (+ "+") (number_literal "0x2e0")) () ")")))) (+ "+") (identifier "__n"))) (; ";")) (expression_statement "param_3 = param_3 - __n;" (assignment_expression "param_3 = param_3 - __n" (identifier "param_3") (= "=") (binary_expression "param_3 - __n" (identifier "param_3") (- "-") (identifier "__n"))) (; ";")) (if_statement "if (param_3 != 0) {\n      puVar2 = &local_28;\n      __n_00 = __n;\n      local_34 = __n;\n      do {\n        __n = __n_00;\n        iVar1 = FUN_0003cd80(__fd,param_2,puVar2);\n        if ((iVar1 != 0) || (local_28 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }\n        local_28 = local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8 |\n                   local_28 << 0x18;\n        iVar1 = FUN_0004b300(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28);\n        *(int *)(unaff_retaddr + 0x2d8) = iVar1;\n        if ((local_28 == 0) ||\n           ((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0))))\n        goto LAB_0003cfa5;\n        __n_00 = (**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))\n                           (*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr);\n        *(undefined4 *)(unaff_retaddr + 0x2e0) = 0;\n        *(uint *)(unaff_retaddr + 0x2dc) = __n_00;\n        if (__n_00 == 0) {\n          if (__n != 0) {\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }\n          break;\n        }\n        if (param_3 <= __n_00) {\n          __n_00 = param_3;\n        }\n        memcpy(param_2,*(void **)(unaff_retaddr + 0x2d8),__n_00);\n        __n = local_34 + __n_00;\n        param_2 = (void *)((int)param_2 + __n_00);\n        *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n_00;\n        param_3 = param_3 - __n_00;\n        local_34 = __n;\n      } while (param_3 != 0);\n    }" (if "if") (parenthesized_expression "(param_3 != 0)" (( "(") (binary_expression "param_3 != 0" (identifier "param_3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      puVar2 = &local_28;\n      __n_00 = __n;\n      local_34 = __n;\n      do {\n        __n = __n_00;\n        iVar1 = FUN_0003cd80(__fd,param_2,puVar2);\n        if ((iVar1 != 0) || (local_28 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }\n        local_28 = local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8 |\n                   local_28 << 0x18;\n        iVar1 = FUN_0004b300(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28);\n        *(int *)(unaff_retaddr + 0x2d8) = iVar1;\n        if ((local_28 == 0) ||\n           ((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0))))\n        goto LAB_0003cfa5;\n        __n_00 = (**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))\n                           (*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr);\n        *(undefined4 *)(unaff_retaddr + 0x2e0) = 0;\n        *(uint *)(unaff_retaddr + 0x2dc) = __n_00;\n        if (__n_00 == 0) {\n          if (__n != 0) {\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }\n          break;\n        }\n        if (param_3 <= __n_00) {\n          __n_00 = param_3;\n        }\n        memcpy(param_2,*(void **)(unaff_retaddr + 0x2d8),__n_00);\n        __n = local_34 + __n_00;\n        param_2 = (void *)((int)param_2 + __n_00);\n        *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n_00;\n        param_3 = param_3 - __n_00;\n        local_34 = __n;\n      } while (param_3 != 0);\n    }" ({ "{") (expression_statement "puVar2 = &local_28;" (assignment_expression "puVar2 = &local_28" (identifier "puVar2") (= "=") (pointer_expression "&local_28" (& "&") (identifier "local_28"))) (; ";")) (expression_statement "__n_00 = __n;" (assignment_expression "__n_00 = __n" (identifier "__n_00") (= "=") (identifier "__n")) (; ";")) (expression_statement "local_34 = __n;" (assignment_expression "local_34 = __n" (identifier "local_34") (= "=") (identifier "__n")) (; ";")) (do_statement "do {\n        __n = __n_00;\n        iVar1 = FUN_0003cd80(__fd,param_2,puVar2);\n        if ((iVar1 != 0) || (local_28 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }\n        local_28 = local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8 |\n                   local_28 << 0x18;\n        iVar1 = FUN_0004b300(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28);\n        *(int *)(unaff_retaddr + 0x2d8) = iVar1;\n        if ((local_28 == 0) ||\n           ((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0))))\n        goto LAB_0003cfa5;\n        __n_00 = (**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))\n                           (*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr);\n        *(undefined4 *)(unaff_retaddr + 0x2e0) = 0;\n        *(uint *)(unaff_retaddr + 0x2dc) = __n_00;\n        if (__n_00 == 0) {\n          if (__n != 0) {\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }\n          break;\n        }\n        if (param_3 <= __n_00) {\n          __n_00 = param_3;\n        }\n        memcpy(param_2,*(void **)(unaff_retaddr + 0x2d8),__n_00);\n        __n = local_34 + __n_00;\n        param_2 = (void *)((int)param_2 + __n_00);\n        *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n_00;\n        param_3 = param_3 - __n_00;\n        local_34 = __n;\n      } while (param_3 != 0);" (do "do") (compound_statement "{\n        __n = __n_00;\n        iVar1 = FUN_0003cd80(__fd,param_2,puVar2);\n        if ((iVar1 != 0) || (local_28 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }\n        local_28 = local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8 |\n                   local_28 << 0x18;\n        iVar1 = FUN_0004b300(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28);\n        *(int *)(unaff_retaddr + 0x2d8) = iVar1;\n        if ((local_28 == 0) ||\n           ((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0))))\n        goto LAB_0003cfa5;\n        __n_00 = (**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))\n                           (*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr);\n        *(undefined4 *)(unaff_retaddr + 0x2e0) = 0;\n        *(uint *)(unaff_retaddr + 0x2dc) = __n_00;\n        if (__n_00 == 0) {\n          if (__n != 0) {\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }\n          break;\n        }\n        if (param_3 <= __n_00) {\n          __n_00 = param_3;\n        }\n        memcpy(param_2,*(void **)(unaff_retaddr + 0x2d8),__n_00);\n        __n = local_34 + __n_00;\n        param_2 = (void *)((int)param_2 + __n_00);\n        *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n_00;\n        param_3 = param_3 - __n_00;\n        local_34 = __n;\n      }" ({ "{") (expression_statement "__n = __n_00;" (assignment_expression "__n = __n_00" (identifier "__n") (= "=") (identifier "__n_00")) (; ";")) (expression_statement "iVar1 = FUN_0003cd80(__fd,param_2,puVar2);" (assignment_expression "iVar1 = FUN_0003cd80(__fd,param_2,puVar2)" (identifier "iVar1") (= "=") (call_expression "FUN_0003cd80(__fd,param_2,puVar2)" (identifier "FUN_0003cd80") (argument_list "(__fd,param_2,puVar2)" (( "(") (identifier "__fd") (, ",") (identifier "param_2") (, ",") (identifier "puVar2") () ")")))) (; ";")) (if_statement "if ((iVar1 != 0) || (local_28 == 0)) {\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }" (if "if") (parenthesized_expression "((iVar1 != 0) || (local_28 == 0))" (( "(") (binary_expression "(iVar1 != 0) || (local_28 == 0)" (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(local_28 == 0)" (( "(") (binary_expression "local_28 == 0" (identifier "local_28") (== "==") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\nLAB_0003cfa5:\n          __n = 0xffffffff;\n          break;\n        }" ({ "{") (labeled_statement "LAB_0003cfa5:\n          __n = 0xffffffff;" (statement_identifier "LAB_0003cfa5") (: ":") (expression_statement "__n = 0xffffffff;" (assignment_expression "__n = 0xffffffff" (identifier "__n") (= "=") (number_literal "0xffffffff")) (; ";"))) (break_statement "break;" (break "break") (; ";")) (} "}"))) (expression_statement "local_28 = local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8 |\n                   local_28 << 0x18;" (assignment_expression "local_28 = local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8 |\n                   local_28 << 0x18" (identifier "local_28") (= "=") (binary_expression "local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8 |\n                   local_28 << 0x18" (binary_expression "local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8" (binary_expression "local_28 >> 0x18 | (local_28 & 0xff0000) >> 8" (binary_expression "local_28 >> 0x18" (identifier "local_28") (>> ">>") (number_literal "0x18")) (| "|") (binary_expression "(local_28 & 0xff0000) >> 8" (parenthesized_expression "(local_28 & 0xff0000)" (( "(") (binary_expression "local_28 & 0xff0000" (identifier "local_28") (& "&") (number_literal "0xff0000")) () ")")) (>> ">>") (number_literal "8"))) (| "|") (binary_expression "(local_28 & 0xff00) << 8" (parenthesized_expression "(local_28 & 0xff00)" (( "(") (binary_expression "local_28 & 0xff00" (identifier "local_28") (& "&") (number_literal "0xff00")) () ")")) (<< "<<") (number_literal "8"))) (| "|") (binary_expression "local_28 << 0x18" (identifier "local_28") (<< "<<") (number_literal "0x18")))) (; ";")) (expression_statement "iVar1 = FUN_0004b300(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28);" (assignment_expression "iVar1 = FUN_0004b300(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28)" (identifier "iVar1") (= "=") (call_expression "FUN_0004b300(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28)" (identifier "FUN_0004b300") (argument_list "(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28)" (( "(") (pointer_expression "*(undefined4 *)(unaff_retaddr + 0x2d8)" (* "*") (cast_expression "(undefined4 *)(unaff_retaddr + 0x2d8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_retaddr + 0x2d8)" (( "(") (binary_expression "unaff_retaddr + 0x2d8" (identifier "unaff_retaddr") (+ "+") (number_literal "0x2d8")) () ")")))) (, ",") (identifier "local_28") () ")")))) (; ";")) (expression_statement "*(int *)(unaff_retaddr + 0x2d8) = iVar1;" (assignment_expression "*(int *)(unaff_retaddr + 0x2d8) = iVar1" (pointer_expression "*(int *)(unaff_retaddr + 0x2d8)" (* "*") (cast_expression "(int *)(unaff_retaddr + 0x2d8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_retaddr + 0x2d8)" (( "(") (binary_expression "unaff_retaddr + 0x2d8" (identifier "unaff_retaddr") (+ "+") (number_literal "0x2d8")) () ")")))) (= "=") (identifier "iVar1")) (; ";")) (if_statement "if ((local_28 == 0) ||\n           ((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0))))\n        goto LAB_0003cfa5;" (if "if") (parenthesized_expression "((local_28 == 0) ||\n           ((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0))))" (( "(") (binary_expression "(local_28 == 0) ||\n           ((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0)))" (parenthesized_expression "(local_28 == 0)" (( "(") (binary_expression "local_28 == 0" (identifier "local_28") (== "==") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0)))" (( "(") (parenthesized_expression "(iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0))" (( "(") (binary_expression "iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0)" (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) (|| "||") (parenthesized_expression "(iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0)" (( "(") (comma_expression "iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0" (assignment_expression "iVar1 = FUN_0003cd80(__fd,param_2,puVar2)" (identifier "iVar1") (= "=") (call_expression "FUN_0003cd80(__fd,param_2,puVar2)" (identifier "FUN_0003cd80") (argument_list "(__fd,param_2,puVar2)" (( "(") (identifier "__fd") (, ",") (identifier "param_2") (, ",") (identifier "puVar2") () ")")))) (, ",") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0"))) () ")"))) () ")")) () ")"))) () ")")) (goto_statement "goto LAB_0003cfa5;" (goto "goto") (statement_identifier "LAB_0003cfa5") (; ";"))) (expression_statement "__n_00 = (**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))\n                           (*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr);" (assignment_expression "__n_00 = (**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))\n                           (*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr)" (identifier "__n_00") (= "=") (call_expression "(**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))\n                           (*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr)" (parenthesized_expression "(**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))" (( "(") (pointer_expression "**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20)" (* "*") (pointer_expression "*(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20)" (* "*") (cast_expression "(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*(int *)(unaff_retaddr + 0x2ec) + 0x20)" (( "(") (binary_expression "*(int *)(unaff_retaddr + 0x2ec) + 0x20" (pointer_expression "*(int *)(unaff_retaddr + 0x2ec)" (* "*") (cast_expression "(int *)(unaff_retaddr + 0x2ec)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_retaddr + 0x2ec)" (( "(") (binary_expression "unaff_retaddr + 0x2ec" (identifier "unaff_retaddr") (+ "+") (number_literal "0x2ec")) () ")")))) (+ "+") (number_literal "0x20")) () ")"))))) () ")")) (argument_list "(*(undefined4 *)(unaff_retaddr + 0x2e8),\n                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,\n                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr)" (( "(") (pointer_expression "*(undefined4 *)(unaff_retaddr + 0x2e8)" (* "*") (cast_expression "(undefined4 *)(unaff_retaddr + 0x2e8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_retaddr + 0x2e8)" (( "(") (binary_expression "unaff_retaddr + 0x2e8" (identifier "unaff_retaddr") (+ "+") (number_literal "0x2e8")) () ")")))) (, ",") (pointer_expression "*(undefined4 *)(unaff_retaddr + 0x2d8)" (* "*") (cast_expression "(undefined4 *)(unaff_retaddr + 0x2d8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_retaddr + 0x2d8)" (( "(") (binary_expression "unaff_retaddr + 0x2d8" (identifier "unaff_retaddr") (+ "+") (number_literal "0x2d8")) () ")")))) (, ",") (identifier "local_28") (, ",") (pointer_expression "*(undefined4 *)(unaff_retaddr + 0x2cc)" (* "*") (cast_expression "(undefined4 *)(unaff_retaddr + 0x2cc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_retaddr + 0x2cc)" (( "(") (binary_expression "unaff_retaddr + 0x2cc" (identifier "unaff_retaddr") (+ "+") (number_literal "0x2cc")) () ")")))) (, ",") (identifier "unaff_retaddr") () ")")))) (; ";")) (expression_statement "*(undefined4 *)(unaff_retaddr + 0x2e0) = 0;" (assignment_expression "*(undefined4 *)(unaff_retaddr + 0x2e0) = 0" (pointer_expression "*(undefined4 *)(unaff_retaddr + 0x2e0)" (* "*") (cast_expression "(undefined4 *)(unaff_retaddr + 0x2e0)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_retaddr + 0x2e0)" (( "(") (binary_expression "unaff_retaddr + 0x2e0" (identifier "unaff_retaddr") (+ "+") (number_literal "0x2e0")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(uint *)(unaff_retaddr + 0x2dc) = __n_00;" (assignment_expression "*(uint *)(unaff_retaddr + 0x2dc) = __n_00" (pointer_expression "*(uint *)(unaff_retaddr + 0x2dc)" (* "*") (cast_expression "(uint *)(unaff_retaddr + 0x2dc)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_retaddr + 0x2dc)" (( "(") (binary_expression "unaff_retaddr + 0x2dc" (identifier "unaff_retaddr") (+ "+") (number_literal "0x2dc")) () ")")))) (= "=") (identifier "__n_00")) (; ";")) (if_statement "if (__n_00 == 0) {\n          if (__n != 0) {\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }\n          break;\n        }" (if "if") (parenthesized_expression "(__n_00 == 0)" (( "(") (binary_expression "__n_00 == 0" (identifier "__n_00") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n          if (__n != 0) {\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }\n          break;\n        }" ({ "{") (if_statement "if (__n != 0) {\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }" (if "if") (parenthesized_expression "(__n != 0)" (( "(") (binary_expression "__n != 0" (identifier "__n") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;\n          }" ({ "{") (expression_statement "*(undefined4 *)(unaff_retaddr + 0x2e4) = 1;" (assignment_expression "*(undefined4 *)(unaff_retaddr + 0x2e4) = 1" (pointer_expression "*(undefined4 *)(unaff_retaddr + 0x2e4)" (* "*") (cast_expression "(undefined4 *)(unaff_retaddr + 0x2e4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_retaddr + 0x2e4)" (( "(") (binary_expression "unaff_retaddr + 0x2e4" (identifier "unaff_retaddr") (+ "+") (number_literal "0x2e4")) () ")")))) (= "=") (number_literal "1")) (; ";")) (} "}"))) (break_statement "break;" (break "break") (; ";")) (} "}"))) (if_statement "if (param_3 <= __n_00) {\n          __n_00 = param_3;\n        }" (if "if") (parenthesized_expression "(param_3 <= __n_00)" (( "(") (binary_expression "param_3 <= __n_00" (identifier "param_3") (<= "<=") (identifier "__n_00")) () ")")) (compound_statement "{\n          __n_00 = param_3;\n        }" ({ "{") (expression_statement "__n_00 = param_3;" (assignment_expression "__n_00 = param_3" (identifier "__n_00") (= "=") (identifier "param_3")) (; ";")) (} "}"))) (expression_statement "memcpy(param_2,*(void **)(unaff_retaddr + 0x2d8),__n_00);" (call_expression "memcpy(param_2,*(void **)(unaff_retaddr + 0x2d8),__n_00)" (identifier "memcpy") (argument_list "(param_2,*(void **)(unaff_retaddr + 0x2d8),__n_00)" (( "(") (identifier "param_2") (, ",") (pointer_expression "*(void **)(unaff_retaddr + 0x2d8)" (* "*") (cast_expression "(void **)(unaff_retaddr + 0x2d8)" (( "(") (type_descriptor "void **" (primitive_type "void") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(unaff_retaddr + 0x2d8)" (( "(") (binary_expression "unaff_retaddr + 0x2d8" (identifier "unaff_retaddr") (+ "+") (number_literal "0x2d8")) () ")")))) (, ",") (identifier "__n_00") () ")"))) (; ";")) (expression_statement "__n = local_34 + __n_00;" (assignment_expression "__n = local_34 + __n_00" (identifier "__n") (= "=") (binary_expression "local_34 + __n_00" (identifier "local_34") (+ "+") (identifier "__n_00"))) (; ";")) (expression_statement "param_2 = (void *)((int)param_2 + __n_00);" (assignment_expression "param_2 = (void *)((int)param_2 + __n_00)" (identifier "param_2") (= "=") (cast_expression "(void *)((int)param_2 + __n_00)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)param_2 + __n_00)" (( "(") (binary_expression "(int)param_2 + __n_00" (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2")) (+ "+") (identifier "__n_00")) () ")")))) (; ";")) (expression_statement "*(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n_00;" (assignment_expression "*(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n_00" (pointer_expression "*(int *)(unaff_retaddr + 0x2e0)" (* "*") (cast_expression "(int *)(unaff_retaddr + 0x2e0)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_retaddr + 0x2e0)" (( "(") (binary_expression "unaff_retaddr + 0x2e0" (identifier "unaff_retaddr") (+ "+") (number_literal "0x2e0")) () ")")))) (= "=") (binary_expression "*(int *)(unaff_retaddr + 0x2e0) + __n_00" (pointer_expression "*(int *)(unaff_retaddr + 0x2e0)" (* "*") (cast_expression "(int *)(unaff_retaddr + 0x2e0)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_retaddr + 0x2e0)" (( "(") (binary_expression "unaff_retaddr + 0x2e0" (identifier "unaff_retaddr") (+ "+") (number_literal "0x2e0")) () ")")))) (+ "+") (identifier "__n_00"))) (; ";")) (expression_statement "param_3 = param_3 - __n_00;" (assignment_expression "param_3 = param_3 - __n_00" (identifier "param_3") (= "=") (binary_expression "param_3 - __n_00" (identifier "param_3") (- "-") (identifier "__n_00"))) (; ";")) (expression_statement "local_34 = __n;" (assignment_expression "local_34 = __n" (identifier "local_34") (= "=") (identifier "__n")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(param_3 != 0)" (( "(") (binary_expression "param_3 != 0" (identifier "param_3") (!= "!=") (number_literal "0")) () ")")) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    *(undefined4 *)(unaff_retaddr + 0x2e4) = 0;\n    __n = 0;\n  }" (else "else") (compound_statement "{\n    *(undefined4 *)(unaff_retaddr + 0x2e4) = 0;\n    __n = 0;\n  }" ({ "{") (expression_statement "*(undefined4 *)(unaff_retaddr + 0x2e4) = 0;" (assignment_expression "*(undefined4 *)(unaff_retaddr + 0x2e4) = 0" (pointer_expression "*(undefined4 *)(unaff_retaddr + 0x2e4)" (* "*") (cast_expression "(undefined4 *)(unaff_retaddr + 0x2e4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_retaddr + 0x2e4)" (( "(") (binary_expression "unaff_retaddr + 0x2e4" (identifier "unaff_retaddr") (+ "+") (number_literal "0x2e4")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "__n = 0;" (assignment_expression "__n = 0" (identifier "__n") (= "=") (number_literal "0")) (; ";")) (} "}")))))) (if_statement "if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0007c1a0();\n  }" (if "if") (parenthesized_expression "(local_24 != *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_24 != *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_24") (!= "!=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n                    \n    FUN_0007c1a0();\n  }" ({ "{") (expression_statement "FUN_0007c1a0();" (call_expression "FUN_0007c1a0()" (identifier "FUN_0007c1a0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (return_statement "return __n;" (return "return") (identifier "__n") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

ssize_t function_1(type_1 *conn,int sockindex,char *var_9,size_t var_6,type_2 *err)

{
  size_t *psVar1;
  type_3 __fd;
  int var_2;
  size_t var_5;
  size_t var_7;
  type_2 var_12;
  void *var_16;
  type_4 var_17;
  type_4 var_10;
  int var_1;
  char *var_19;
  size_t var_18;
  int var_14;
  int var_20;
  type_5 uStack_14;
  
  uStack_14 = 0x3cea9;
  var_20 = *(int *)(var_1 + 0x14);
  __fd = conn->sock[sockindex];
  var_2 = conn->sec_complete;
  *err = var_13;
  if ((var_2 == 0) || (conn->data_prot == var_3)) {
    var_7 = var_4(__fd,var_9,var_6);
  }
  else if ((conn->in_buffer).eof_flag == 0) {
    var_5 = (conn->in_buffer).index;
    var_7 = (conn->in_buffer).size - var_5;
    if (var_6 < var_7) {
      var_7 = var_6;
    }
    var_8(var_9,(void *)(var_5 + (int)(conn->in_buffer).data),var_7);
    var_19 = var_9 + var_7;
    psVar1 = &(conn->in_buffer).index;
    *psVar1 = *psVar1 + var_7;
    var_10 = var_6 - var_7;
    if (var_10 != 0) {
      var_17 = var_7;
      var_18 = var_7;
      do {
        var_7 = var_17;
        var_12 = var_11(__fd,&var_14,4);
        if ((var_12 != var_13) || (var_14 == 0)) {
LAB_0003cfa5:
          var_7 = 0xffffffff;
          break;
        }
        var_14 = (type_4)var_14 >> 0x18 | (var_14 & 0xff0000U) >> 8 | (var_14 & 0xff00U) << 8 |
                var_14 << 0x18;
        var_16 = var_15((conn->in_buffer).data,var_14);
        (conn->in_buffer).data = var_16;
        if ((var_14 == 0) ||
           ((var_16 == (void *)0x0 || (var_12 = var_11(__fd,var_16,var_14), var_12 != var_13))))
        goto LAB_0003cfa5;
        var_17 = (*conn->mech->decode)
                           (conn->app_data,(conn->in_buffer).data,var_14,conn->data_prot,conn);
        (conn->in_buffer).index = 0;
        (conn->in_buffer).size = var_17;
        if (var_17 == 0) {
          if (var_7 != 0) {
            (conn->in_buffer).eof_flag = 1;
          }
          break;
        }
        if (var_10 <= var_17) {
          var_17 = var_10;
        }
        var_8(var_19,(conn->in_buffer).data,var_17);
        var_7 = var_18 + var_17;
        var_19 = var_19 + var_17;
        psVar1 = &(conn->in_buffer).index;
        *psVar1 = *psVar1 + var_17;
        var_10 = var_10 - var_17;
        var_18 = var_7;
      } while (var_10 != 0);
    }
  }
  else {
    (conn->in_buffer).eof_flag = 0;
    var_7 = 0;
  }
  if (var_20 != *(int *)(var_1 + 0x14)) {
                    /* WARNING: Subroutine does not return */
    var_21();
  }
  return var_7;
}


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

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

{
  size_t __n;
  int iVar1;
  uint __n_00;
  int in_GS_OFFSET;
  int unaff_retaddr;
  int __fd;
  uint *puVar2;
  size_t local_34;
  uint local_28;
  int local_24;
  undefined4 uStack_14;
  
  uStack_14 = 0x3cea9;
  entry();
  local_24 = *(int *)(in_GS_OFFSET + 0x14);
  __fd = *(int *)(unaff_retaddr + 400 + param_1 * 4);
  iVar1 = *(int *)(unaff_retaddr + 0x2c4);
  *param_4 = 0;
  if ((iVar1 == 0) || (*(int *)(unaff_retaddr + 0x2cc) == 1)) {
    __n = read(__fd,param_2,param_3);
  }
  else if (*(int *)(unaff_retaddr + 0x2e4) == 0) {
    __n = *(int *)(unaff_retaddr + 0x2dc) - *(int *)(unaff_retaddr + 0x2e0);
    if (param_3 < __n) {
      __n = param_3;
    }
    memcpy(param_2,(void *)(*(int *)(unaff_retaddr + 0x2e0) + *(int *)(unaff_retaddr + 0x2d8)),__n);
    param_2 = (void *)((int)param_2 + __n);
    *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n;
    param_3 = param_3 - __n;
    if (param_3 != 0) {
      puVar2 = &local_28;
      __n_00 = __n;
      local_34 = __n;
      do {
        __n = __n_00;
        iVar1 = FUN_0003cd80(__fd,param_2,puVar2);
        if ((iVar1 != 0) || (local_28 == 0)) {
LAB_0003cfa5:
          __n = 0xffffffff;
          break;
        }
        local_28 = local_28 >> 0x18 | (local_28 & 0xff0000) >> 8 | (local_28 & 0xff00) << 8 |
                   local_28 << 0x18;
        iVar1 = FUN_0004b300(*(undefined4 *)(unaff_retaddr + 0x2d8),local_28);
        *(int *)(unaff_retaddr + 0x2d8) = iVar1;
        if ((local_28 == 0) ||
           ((iVar1 == 0 || (iVar1 = FUN_0003cd80(__fd,param_2,puVar2), iVar1 != 0))))
        goto LAB_0003cfa5;
        __n_00 = (**(code **)(*(int *)(unaff_retaddr + 0x2ec) + 0x20))
                           (*(undefined4 *)(unaff_retaddr + 0x2e8),
                            *(undefined4 *)(unaff_retaddr + 0x2d8),local_28,
                            *(undefined4 *)(unaff_retaddr + 0x2cc),unaff_retaddr);
        *(undefined4 *)(unaff_retaddr + 0x2e0) = 0;
        *(uint *)(unaff_retaddr + 0x2dc) = __n_00;
        if (__n_00 == 0) {
          if (__n != 0) {
            *(undefined4 *)(unaff_retaddr + 0x2e4) = 1;
          }
          break;
        }
        if (param_3 <= __n_00) {
          __n_00 = param_3;
        }
        memcpy(param_2,*(void **)(unaff_retaddr + 0x2d8),__n_00);
        __n = local_34 + __n_00;
        param_2 = (void *)((int)param_2 + __n_00);
        *(int *)(unaff_retaddr + 0x2e0) = *(int *)(unaff_retaddr + 0x2e0) + __n_00;
        param_3 = param_3 - __n_00;
        local_34 = __n;
      } while (param_3 != 0);
    }
  }
  else {
    *(undefined4 *)(unaff_retaddr + 0x2e4) = 0;
    __n = 0;
  }
  if (local_24 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_0007c1a0();
  }
  return __n;
}

