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

sftp_request * fxp_close_send(fxp_handle *handle)

{
  int iVar1;
  size_t __n;
  sftp_request *psVar2;
  sftp_packet *ptr;
  char *pcVar3;
  char *pcVar4;
  uint uVar5;
  uint uVar6;
  int in_GS_OFFSET;
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  psVar2 = sftp_alloc_request();
  ptr = sftp_pkt_init(4);
  uVar6 = psVar2->id;
  uVar5 = ptr->length;
  ptr->length = uVar5 + 4;
  if ((int)ptr->maxlen < (int)(uVar5 + 4)) {
    ptr->maxlen = uVar5 + 0x104;
    pcVar4 = (char *)saferealloc(ptr->data,uVar5 + 0x104,1);
    ptr->data = pcVar4;
    uVar5 = ptr->length - 4;
  }
  else {
    pcVar4 = ptr->data;
  }
  *(uint *)(pcVar4 + uVar5) =
       (uVar6 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar6 >> 0x10),(char)(uVar6 >> 0x18)) |
       uVar6 << 0x18;
  uVar6 = ptr->length;
  ptr->length = uVar6 + 4;
  if ((int)ptr->maxlen < (int)(uVar6 + 4)) {
    ptr->maxlen = uVar6 + 0x104;
    pcVar4 = (char *)saferealloc(ptr->data,uVar6 + 0x104,1);
    ptr->data = pcVar4;
    uVar6 = ptr->length - 4;
  }
  else {
    pcVar4 = ptr->data;
  }
  pcVar4 = pcVar4 + uVar6;
  pcVar4[0] = '\0';
  pcVar4[1] = '\0';
  pcVar4[2] = '\0';
  pcVar4[3] = '\0';
  uVar5 = ptr->length;
  pcVar4 = handle->hstring;
  __n = handle->hlen;
  ptr->savedpos = uVar5;
  uVar6 = uVar5 + __n;
  ptr->length = uVar6;
  if ((int)ptr->maxlen < (int)uVar6) {
    ptr->maxlen = uVar6 + 0x100;
    pcVar3 = (char *)saferealloc(ptr->data,uVar6 + 0x100,1);
    ptr->data = pcVar3;
    uVar5 = ptr->length - __n;
  }
  else {
    pcVar3 = ptr->data;
  }
  memcpy(pcVar3 + uVar5,pcVar4,__n);
  ptr->data[ptr->savedpos - 4] = (char)(ptr->length - ptr->savedpos >> 0x18);
  ptr->data[ptr->savedpos - 3] = (char)(ptr->length - ptr->savedpos >> 0x10);
  ptr->data[ptr->savedpos - 2] = (char)(ptr->length - ptr->savedpos >> 8);
  ptr->data[ptr->savedpos - 1] = (char)ptr->length - (char)ptr->savedpos;
  *ptr->data = (char)(ptr->length - 4 >> 0x18);
  ptr->data[1] = (char)(ptr->length - 4 >> 0x10);
  ptr->data[2] = (char)(ptr->length - 4 >> 8);
  ptr->data[3] = (char)ptr->length + -4;
  sftp_senddata(ptr->data,ptr->length);
  if (ptr->data != (char *)0x0) {
    safefree(ptr->data);
  }
  safefree(ptr);
  safefree(handle->hstring);
  safefree(handle);
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return psVar2;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



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

uint * FUN_00031140(undefined4 *param_1)

{
  int iVar1;
  uint uVar2;
  void *__src;
  size_t __n;
  uint *puVar3;
  int *piVar4;
  int iVar5;
  int iVar6;
  int in_GS_OFFSET;
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  puVar3 = (uint *)FUN_0002f5d0();
  piVar4 = (int *)FUN_0002f910();
  uVar2 = *puVar3;
  iVar5 = piVar4[1];
  piVar4[1] = iVar5 + 4;
  if (piVar4[2] < iVar5 + 4) {
    piVar4[2] = iVar5 + 0x104;
    iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1);
    *piVar4 = iVar6;
    iVar5 = piVar4[1] + -4;
  }
  else {
    iVar6 = *piVar4;
  }
  *(uint *)(iVar6 + iVar5) =
       (uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |
       uVar2 << 0x18;
  iVar5 = piVar4[1];
  piVar4[1] = iVar5 + 4;
  if (piVar4[2] < iVar5 + 4) {
    piVar4[2] = iVar5 + 0x104;
    iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1);
    *piVar4 = iVar6;
    iVar5 = piVar4[1] + -4;
  }
  else {
    iVar6 = *piVar4;
  }
  *(undefined4 *)(iVar6 + iVar5) = 0;
  iVar6 = piVar4[1];
  __src = (void *)*param_1;
  __n = param_1[1];
  piVar4[3] = iVar6;
  iVar5 = iVar6 + __n;
  piVar4[1] = iVar5;
  if (piVar4[2] < iVar5) {
    piVar4[2] = iVar5 + 0x100;
    iVar5 = FUN_0001dc50(*piVar4,iVar5 + 0x100,1);
    *piVar4 = iVar5;
    iVar6 = piVar4[1] - __n;
  }
  else {
    iVar5 = *piVar4;
  }
  memcpy((void *)(iVar5 + iVar6),__src,__n);
  *(char *)(*piVar4 + -4 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 0x18);
  *(char *)(*piVar4 + -3 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 0x10);
  *(char *)(*piVar4 + -2 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 8);
  *(char *)(*piVar4 + -1 + piVar4[3]) = (char)piVar4[1] - (char)piVar4[3];
  *(char *)*piVar4 = (char)((uint)(piVar4[1] + -4) >> 0x18);
  *(char *)(*piVar4 + 1) = (char)((uint)(piVar4[1] + -4) >> 0x10);
  *(char *)(*piVar4 + 2) = (char)((uint)(piVar4[1] + -4) >> 8);
  *(char *)(*piVar4 + 3) = (char)piVar4[1] + -4;
  FUN_00029280(*piVar4,piVar4[1]);
  if (*piVar4 != 0) {
    FUN_0001dd30(*piVar4);
  }
  FUN_0001dd30(piVar4);
  FUN_0001dd30(*param_1);
  FUN_0001dd30(param_1);
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return puVar3;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0008eb20();
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x000149a0
ADD EBX,0x9ec47
SUB ESP,0x2c
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x1c],EAX
XOR EAX,EAX
MOV EDI,dword ptr [ESP + 0x40]
CALL 0x0002f5d0
MOV EBP,EAX
MOV EAX,0x4
CALL 0x0002f910
MOV ECX,dword ptr [EBP]
MOV ESI,EAX
XOR EAX,EAX
MOV EDX,ECX
SHR EDX,0x18
MOV AL,DL
MOV EDX,ECX
SHR EDX,0x10
MOV AH,DL
MOVZX EDX,CH
SHL ECX,0x18
MOVZX EAX,AX
SHL EDX,0x10
OR EDX,EAX
OR EDX,ECX
MOV ECX,dword ptr [ESI + 0x4]
LEA EAX,[ECX + 0x4]
MOV dword ptr [ESI + 0x4],EAX
CMP EAX,dword ptr [ESI + 0x8]
JG 0x000312c8
MOV EAX,dword ptr [ESI]
MOV dword ptr [EAX + ECX*0x1],EDX
MOV EDX,dword ptr [ESI + 0x4]
LEA EAX,[EDX + 0x4]
MOV dword ptr [ESI + 0x4],EAX
CMP EAX,dword ptr [ESI + 0x8]
JG 0x00031330
MOV EAX,dword ptr [ESI]
MOV dword ptr [EAX + EDX*0x1],0x0
MOV ECX,dword ptr [ESI + 0x4]
MOV EAX,dword ptr [EDI]
MOV EDX,dword ptr [EDI + 0x4]
MOV dword ptr [ESI + 0xc],ECX
MOV dword ptr [ESP + 0x8],EAX
LEA EAX,[ECX + EDX*0x1]
MOV dword ptr [ESI + 0x4],EAX
CMP EAX,dword ptr [ESI + 0x8]
JG 0x00031300
MOV EAX,dword ptr [ESI]
SUB ESP,0x4
ADD EAX,ECX
PUSH EDX
PUSH dword ptr [ESP + 0x10]
PUSH EAX
CALL 0x00014130
MOV EDX,dword ptr [ESI + 0xc]
MOV EAX,dword ptr [ESI + 0x4]
MOV ECX,dword ptr [ESI]
SUB EAX,EDX
SHR EAX,0x18
MOV byte ptr [ECX + EDX*0x1 + -0x4],AL
MOV EDX,dword ptr [ESI + 0xc]
MOV EAX,dword ptr [ESI + 0x4]
MOV ECX,dword ptr [ESI]
SUB EAX,EDX
SHR EAX,0x10
MOV byte ptr [ECX + EDX*0x1 + -0x3],AL
MOV EDX,dword ptr [ESI + 0xc]
MOV EAX,dword ptr [ESI + 0x4]
MOV ECX,dword ptr [ESI]
SUB EAX,EDX
MOV byte ptr [ECX + EDX*0x1 + -0x2],AH
MOV EDX,dword ptr [ESI + 0xc]
MOVZX EAX,byte ptr [ESI + 0x4]
MOV ECX,dword ptr [ESI]
SUB EAX,EDX
MOV byte ptr [ECX + EDX*0x1 + -0x1],AL
MOV EAX,dword ptr [ESI + 0x4]
MOV EDX,dword ptr [ESI]
SUB EAX,0x4
SHR EAX,0x18
MOV byte ptr [EDX],AL
MOV EAX,dword ptr [ESI + 0x4]
MOV EDX,dword ptr [ESI]
SUB EAX,0x4
SHR EAX,0x10
MOV byte ptr [EDX + 0x1],AL
MOV EAX,dword ptr [ESI + 0x4]
MOV EDX,dword ptr [ESI]
SUB EAX,0x4
MOV byte ptr [EDX + 0x2],AH
MOVZX EAX,byte ptr [ESI + 0x4]
MOV EDX,dword ptr [ESI]
SUB EAX,0x4
MOV byte ptr [EDX + 0x3],AL
POP EDX
POP ECX
PUSH dword ptr [ESI + 0x4]
PUSH dword ptr [ESI]
CALL 0x00029280
MOV EAX,dword ptr [ESI]
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0003128c
SUB ESP,0xc
PUSH EAX
CALL 0x0001dd30
ADD ESP,0x10
SUB ESP,0xc
PUSH ESI
CALL 0x0001dd30
POP EAX
PUSH dword ptr [EDI]
CALL 0x0001dd30
MOV dword ptr [ESP],EDI
CALL 0x0001dd30
ADD ESP,0x10
MOV EAX,EBP
MOV EDI,dword ptr [ESP + 0x1c]
XOR EDI,dword ptr GS:[0x14]
JNZ 0x00031356
ADD ESP,0x2c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV dword ptr [ESP + 0x8],EDX
ADD ECX,0x104
SUB ESP,0x4
MOV dword ptr [ESI + 0x8],ECX
PUSH 0x1
PUSH ECX
PUSH dword ptr [ESI]
CALL 0x0001dc50
MOV ECX,dword ptr [ESI + 0x4]
ADD ESP,0x10
MOV EDX,dword ptr [ESP + 0x8]
MOV dword ptr [ESI],EAX
SUB ECX,0x4
JMP 0x000311ac
MOV dword ptr [ESP + 0xc],EDX
ADD EAX,0x100
SUB ESP,0x4
MOV dword ptr [ESI + 0x8],EAX
PUSH 0x1
PUSH EAX
PUSH dword ptr [ESI]
CALL 0x0001dc50
MOV EDX,dword ptr [ESP + 0x1c]
MOV ECX,dword ptr [ESI + 0x4]
ADD ESP,0x10
MOV dword ptr [ESI],EAX
SUB ECX,EDX
JMP 0x000311ea
SUB ESP,0x4
ADD EDX,0x104
MOV dword ptr [ESI + 0x8],EDX
PUSH 0x1
PUSH EDX
PUSH dword ptr [ESI]
CALL 0x0001dc50
MOV ECX,dword ptr [ESI + 0x4]
ADD ESP,0x10
MOV dword ptr [ESI],EAX
LEA EDX,[ECX + -0x4]
JMP 0x000311c3
CALL 0x0008eb20
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nuint * FUN_00031140(undefined4 *param_1)\n\n{\n  int iVar1;\n  uint uVar2;\n  void *__src;\n  size_t __n;\n  uint *puVar3;\n  int *piVar4;\n  int iVar5;\n  int iVar6;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar3 = (uint *)FUN_0002f5d0();\n  piVar4 = (int *)FUN_0002f910();\n  uVar2 = *puVar3;\n  iVar5 = piVar4[1];\n  piVar4[1] = iVar5 + 4;\n  if (piVar4[2] < iVar5 + 4) {\n    piVar4[2] = iVar5 + 0x104;\n    iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1);\n    *piVar4 = iVar6;\n    iVar5 = piVar4[1] + -4;\n  }\n  else {\n    iVar6 = *piVar4;\n  }\n  *(uint *)(iVar6 + iVar5) =\n       (uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |\n       uVar2 << 0x18;\n  iVar5 = piVar4[1];\n  piVar4[1] = iVar5 + 4;\n  if (piVar4[2] < iVar5 + 4) {\n    piVar4[2] = iVar5 + 0x104;\n    iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1);\n    *piVar4 = iVar6;\n    iVar5 = piVar4[1] + -4;\n  }\n  else {\n    iVar6 = *piVar4;\n  }\n  *(undefined4 *)(iVar6 + iVar5) = 0;\n  iVar6 = piVar4[1];\n  __src = (void *)*param_1;\n  __n = param_1[1];\n  piVar4[3] = iVar6;\n  iVar5 = iVar6 + __n;\n  piVar4[1] = iVar5;\n  if (piVar4[2] < iVar5) {\n    piVar4[2] = iVar5 + 0x100;\n    iVar5 = FUN_0001dc50(*piVar4,iVar5 + 0x100,1);\n    *piVar4 = iVar5;\n    iVar6 = piVar4[1] - __n;\n  }\n  else {\n    iVar5 = *piVar4;\n  }\n  memcpy((void *)(iVar5 + iVar6),__src,__n);\n  *(char *)(*piVar4 + -4 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 0x18);\n  *(char *)(*piVar4 + -3 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 0x10);\n  *(char *)(*piVar4 + -2 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 8);\n  *(char *)(*piVar4 + -1 + piVar4[3]) = (char)piVar4[1] - (char)piVar4[3];\n  *(char *)*piVar4 = (char)((uint)(piVar4[1] + -4) >> 0x18);\n  *(char *)(*piVar4 + 1) = (char)((uint)(piVar4[1] + -4) >> 0x10);\n  *(char *)(*piVar4 + 2) = (char)((uint)(piVar4[1] + -4) >> 8);\n  *(char *)(*piVar4 + 3) = (char)piVar4[1] + -4;\n  FUN_00029280(*piVar4,piVar4[1]);\n  if (*piVar4 != 0) {\n    FUN_0001dd30(*piVar4);\n  }\n  FUN_0001dd30(piVar4);\n  FUN_0001dd30(*param_1);\n  FUN_0001dd30(param_1);\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return puVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0008eb20();\n}\n\n" comment (function_definition "uint * FUN_00031140(undefined4 *param_1)\n\n{\n  int iVar1;\n  uint uVar2;\n  void *__src;\n  size_t __n;\n  uint *puVar3;\n  int *piVar4;\n  int iVar5;\n  int iVar6;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar3 = (uint *)FUN_0002f5d0();\n  piVar4 = (int *)FUN_0002f910();\n  uVar2 = *puVar3;\n  iVar5 = piVar4[1];\n  piVar4[1] = iVar5 + 4;\n  if (piVar4[2] < iVar5 + 4) {\n    piVar4[2] = iVar5 + 0x104;\n    iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1);\n    *piVar4 = iVar6;\n    iVar5 = piVar4[1] + -4;\n  }\n  else {\n    iVar6 = *piVar4;\n  }\n  *(uint *)(iVar6 + iVar5) =\n       (uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |\n       uVar2 << 0x18;\n  iVar5 = piVar4[1];\n  piVar4[1] = iVar5 + 4;\n  if (piVar4[2] < iVar5 + 4) {\n    piVar4[2] = iVar5 + 0x104;\n    iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1);\n    *piVar4 = iVar6;\n    iVar5 = piVar4[1] + -4;\n  }\n  else {\n    iVar6 = *piVar4;\n  }\n  *(undefined4 *)(iVar6 + iVar5) = 0;\n  iVar6 = piVar4[1];\n  __src = (void *)*param_1;\n  __n = param_1[1];\n  piVar4[3] = iVar6;\n  iVar5 = iVar6 + __n;\n  piVar4[1] = iVar5;\n  if (piVar4[2] < iVar5) {\n    piVar4[2] = iVar5 + 0x100;\n    iVar5 = FUN_0001dc50(*piVar4,iVar5 + 0x100,1);\n    *piVar4 = iVar5;\n    iVar6 = piVar4[1] - __n;\n  }\n  else {\n    iVar5 = *piVar4;\n  }\n  memcpy((void *)(iVar5 + iVar6),__src,__n);\n  *(char *)(*piVar4 + -4 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 0x18);\n  *(char *)(*piVar4 + -3 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 0x10);\n  *(char *)(*piVar4 + -2 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 8);\n  *(char *)(*piVar4 + -1 + piVar4[3]) = (char)piVar4[1] - (char)piVar4[3];\n  *(char *)*piVar4 = (char)((uint)(piVar4[1] + -4) >> 0x18);\n  *(char *)(*piVar4 + 1) = (char)((uint)(piVar4[1] + -4) >> 0x10);\n  *(char *)(*piVar4 + 2) = (char)((uint)(piVar4[1] + -4) >> 8);\n  *(char *)(*piVar4 + 3) = (char)piVar4[1] + -4;\n  FUN_00029280(*piVar4,piVar4[1]);\n  if (*piVar4 != 0) {\n    FUN_0001dd30(*piVar4);\n  }\n  FUN_0001dd30(piVar4);\n  FUN_0001dd30(*param_1);\n  FUN_0001dd30(param_1);\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return puVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0008eb20();\n}" type_identifier (pointer_declarator "* FUN_00031140(undefined4 *param_1)" * (function_declarator "FUN_00031140(undefined4 *param_1)" identifier (parameter_list "(undefined4 *param_1)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) )))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  void *__src;\n  size_t __n;\n  uint *puVar3;\n  int *piVar4;\n  int iVar5;\n  int iVar6;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar3 = (uint *)FUN_0002f5d0();\n  piVar4 = (int *)FUN_0002f910();\n  uVar2 = *puVar3;\n  iVar5 = piVar4[1];\n  piVar4[1] = iVar5 + 4;\n  if (piVar4[2] < iVar5 + 4) {\n    piVar4[2] = iVar5 + 0x104;\n    iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1);\n    *piVar4 = iVar6;\n    iVar5 = piVar4[1] + -4;\n  }\n  else {\n    iVar6 = *piVar4;\n  }\n  *(uint *)(iVar6 + iVar5) =\n       (uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |\n       uVar2 << 0x18;\n  iVar5 = piVar4[1];\n  piVar4[1] = iVar5 + 4;\n  if (piVar4[2] < iVar5 + 4) {\n    piVar4[2] = iVar5 + 0x104;\n    iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1);\n    *piVar4 = iVar6;\n    iVar5 = piVar4[1] + -4;\n  }\n  else {\n    iVar6 = *piVar4;\n  }\n  *(undefined4 *)(iVar6 + iVar5) = 0;\n  iVar6 = piVar4[1];\n  __src = (void *)*param_1;\n  __n = param_1[1];\n  piVar4[3] = iVar6;\n  iVar5 = iVar6 + __n;\n  piVar4[1] = iVar5;\n  if (piVar4[2] < iVar5) {\n    piVar4[2] = iVar5 + 0x100;\n    iVar5 = FUN_0001dc50(*piVar4,iVar5 + 0x100,1);\n    *piVar4 = iVar5;\n    iVar6 = piVar4[1] - __n;\n  }\n  else {\n    iVar5 = *piVar4;\n  }\n  memcpy((void *)(iVar5 + iVar6),__src,__n);\n  *(char *)(*piVar4 + -4 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 0x18);\n  *(char *)(*piVar4 + -3 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 0x10);\n  *(char *)(*piVar4 + -2 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 8);\n  *(char *)(*piVar4 + -1 + piVar4[3]) = (char)piVar4[1] - (char)piVar4[3];\n  *(char *)*piVar4 = (char)((uint)(piVar4[1] + -4) >> 0x18);\n  *(char *)(*piVar4 + 1) = (char)((uint)(piVar4[1] + -4) >> 0x10);\n  *(char *)(*piVar4 + 2) = (char)((uint)(piVar4[1] + -4) >> 8);\n  *(char *)(*piVar4 + 3) = (char)piVar4[1] + -4;\n  FUN_00029280(*piVar4,piVar4[1]);\n  if (*piVar4 != 0) {\n    FUN_0001dd30(*piVar4);\n  }\n  FUN_0001dd30(piVar4);\n  FUN_0001dd30(*param_1);\n  FUN_0001dd30(param_1);\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return puVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0008eb20();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "void *__src;" primitive_type (pointer_declarator "*__src" * identifier) ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "uint *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "puVar3 = (uint *)FUN_0002f5d0();" (assignment_expression "puVar3 = (uint *)FUN_0002f5d0()" identifier = (cast_expression "(uint *)FUN_0002f5d0()" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0002f5d0()" identifier (argument_list "()" ( ))))) ;) (expression_statement "piVar4 = (int *)FUN_0002f910();" (assignment_expression "piVar4 = (int *)FUN_0002f910()" identifier = (cast_expression "(int *)FUN_0002f910()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0002f910()" identifier (argument_list "()" ( ))))) ;) (expression_statement "uVar2 = *puVar3;" (assignment_expression "uVar2 = *puVar3" identifier = (pointer_expression "*puVar3" * identifier)) ;) (expression_statement "iVar5 = piVar4[1];" (assignment_expression "iVar5 = piVar4[1]" identifier = (subscript_expression "piVar4[1]" identifier [ number_literal ])) ;) (expression_statement "piVar4[1] = iVar5 + 4;" (assignment_expression "piVar4[1] = iVar5 + 4" (subscript_expression "piVar4[1]" identifier [ number_literal ]) = (binary_expression "iVar5 + 4" identifier + number_literal)) ;) (if_statement "if (piVar4[2] < iVar5 + 4) {\n    piVar4[2] = iVar5 + 0x104;\n    iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1);\n    *piVar4 = iVar6;\n    iVar5 = piVar4[1] + -4;\n  }\n  else {\n    iVar6 = *piVar4;\n  }" if (parenthesized_expression "(piVar4[2] < iVar5 + 4)" ( (binary_expression "piVar4[2] < iVar5 + 4" (subscript_expression "piVar4[2]" identifier [ number_literal ]) < (binary_expression "iVar5 + 4" identifier + number_literal)) )) (compound_statement "{\n    piVar4[2] = iVar5 + 0x104;\n    iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1);\n    *piVar4 = iVar6;\n    iVar5 = piVar4[1] + -4;\n  }" { (expression_statement "piVar4[2] = iVar5 + 0x104;" (assignment_expression "piVar4[2] = iVar5 + 0x104" (subscript_expression "piVar4[2]" identifier [ number_literal ]) = (binary_expression "iVar5 + 0x104" identifier + number_literal)) ;) (expression_statement "iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1);" (assignment_expression "iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1)" identifier = (call_expression "FUN_0001dc50(*piVar4,iVar5 + 0x104,1)" identifier (argument_list "(*piVar4,iVar5 + 0x104,1)" ( (pointer_expression "*piVar4" * identifier) , (binary_expression "iVar5 + 0x104" identifier + number_literal) , number_literal )))) ;) (expression_statement "*piVar4 = iVar6;" (assignment_expression "*piVar4 = iVar6" (pointer_expression "*piVar4" * identifier) = identifier) ;) (expression_statement "iVar5 = piVar4[1] + -4;" (assignment_expression "iVar5 = piVar4[1] + -4" identifier = (binary_expression "piVar4[1] + -4" (subscript_expression "piVar4[1]" identifier [ number_literal ]) + number_literal)) ;) }) (else_clause "else {\n    iVar6 = *piVar4;\n  }" else (compound_statement "{\n    iVar6 = *piVar4;\n  }" { (expression_statement "iVar6 = *piVar4;" (assignment_expression "iVar6 = *piVar4" identifier = (pointer_expression "*piVar4" * identifier)) ;) }))) (expression_statement "*(uint *)(iVar6 + iVar5) =\n       (uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |\n       uVar2 << 0x18;" (assignment_expression "*(uint *)(iVar6 + iVar5) =\n       (uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |\n       uVar2 << 0x18" (pointer_expression "*(uint *)(iVar6 + iVar5)" * (cast_expression "(uint *)(iVar6 + iVar5)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + iVar5)" ( (binary_expression "iVar6 + iVar5" identifier + identifier) )))) = (binary_expression "(uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |\n       uVar2 << 0x18" (binary_expression "(uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18))" (binary_expression "(uVar2 >> 8 & 0xff) << 0x10" (parenthesized_expression "(uVar2 >> 8 & 0xff)" ( (binary_expression "uVar2 >> 8 & 0xff" (binary_expression "uVar2 >> 8" identifier >> number_literal) & number_literal) )) << number_literal) | (cast_expression "(uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18))" ( (type_descriptor "uint" type_identifier) ) (call_expression "CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18))" identifier (argument_list "((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18))" ( (cast_expression "(char)(uVar2 >> 0x10)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(uVar2 >> 0x10)" ( (binary_expression "uVar2 >> 0x10" identifier >> number_literal) ))) , (cast_expression "(char)(uVar2 >> 0x18)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(uVar2 >> 0x18)" ( (binary_expression "uVar2 >> 0x18" identifier >> number_literal) ))) ))))) | (binary_expression "uVar2 << 0x18" identifier << number_literal))) ;) (expression_statement "iVar5 = piVar4[1];" (assignment_expression "iVar5 = piVar4[1]" identifier = (subscript_expression "piVar4[1]" identifier [ number_literal ])) ;) (expression_statement "piVar4[1] = iVar5 + 4;" (assignment_expression "piVar4[1] = iVar5 + 4" (subscript_expression "piVar4[1]" identifier [ number_literal ]) = (binary_expression "iVar5 + 4" identifier + number_literal)) ;) (if_statement "if (piVar4[2] < iVar5 + 4) {\n    piVar4[2] = iVar5 + 0x104;\n    iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1);\n    *piVar4 = iVar6;\n    iVar5 = piVar4[1] + -4;\n  }\n  else {\n    iVar6 = *piVar4;\n  }" if (parenthesized_expression "(piVar4[2] < iVar5 + 4)" ( (binary_expression "piVar4[2] < iVar5 + 4" (subscript_expression "piVar4[2]" identifier [ number_literal ]) < (binary_expression "iVar5 + 4" identifier + number_literal)) )) (compound_statement "{\n    piVar4[2] = iVar5 + 0x104;\n    iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1);\n    *piVar4 = iVar6;\n    iVar5 = piVar4[1] + -4;\n  }" { (expression_statement "piVar4[2] = iVar5 + 0x104;" (assignment_expression "piVar4[2] = iVar5 + 0x104" (subscript_expression "piVar4[2]" identifier [ number_literal ]) = (binary_expression "iVar5 + 0x104" identifier + number_literal)) ;) (expression_statement "iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1);" (assignment_expression "iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1)" identifier = (call_expression "FUN_0001dc50(*piVar4,iVar5 + 0x104,1)" identifier (argument_list "(*piVar4,iVar5 + 0x104,1)" ( (pointer_expression "*piVar4" * identifier) , (binary_expression "iVar5 + 0x104" identifier + number_literal) , number_literal )))) ;) (expression_statement "*piVar4 = iVar6;" (assignment_expression "*piVar4 = iVar6" (pointer_expression "*piVar4" * identifier) = identifier) ;) (expression_statement "iVar5 = piVar4[1] + -4;" (assignment_expression "iVar5 = piVar4[1] + -4" identifier = (binary_expression "piVar4[1] + -4" (subscript_expression "piVar4[1]" identifier [ number_literal ]) + number_literal)) ;) }) (else_clause "else {\n    iVar6 = *piVar4;\n  }" else (compound_statement "{\n    iVar6 = *piVar4;\n  }" { (expression_statement "iVar6 = *piVar4;" (assignment_expression "iVar6 = *piVar4" identifier = (pointer_expression "*piVar4" * identifier)) ;) }))) (expression_statement "*(undefined4 *)(iVar6 + iVar5) = 0;" (assignment_expression "*(undefined4 *)(iVar6 + iVar5) = 0" (pointer_expression "*(undefined4 *)(iVar6 + iVar5)" * (cast_expression "(undefined4 *)(iVar6 + iVar5)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + iVar5)" ( (binary_expression "iVar6 + iVar5" identifier + identifier) )))) = number_literal) ;) (expression_statement "iVar6 = piVar4[1];" (assignment_expression "iVar6 = piVar4[1]" identifier = (subscript_expression "piVar4[1]" identifier [ number_literal ])) ;) (expression_statement "__src = (void *)*param_1;" (assignment_expression "__src = (void *)*param_1" identifier = (cast_expression "(void *)*param_1" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (expression_statement "__n = param_1[1];" (assignment_expression "__n = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (expression_statement "piVar4[3] = iVar6;" (assignment_expression "piVar4[3] = iVar6" (subscript_expression "piVar4[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "iVar5 = iVar6 + __n;" (assignment_expression "iVar5 = iVar6 + __n" identifier = (binary_expression "iVar6 + __n" identifier + identifier)) ;) (expression_statement "piVar4[1] = iVar5;" (assignment_expression "piVar4[1] = iVar5" (subscript_expression "piVar4[1]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (piVar4[2] < iVar5) {\n    piVar4[2] = iVar5 + 0x100;\n    iVar5 = FUN_0001dc50(*piVar4,iVar5 + 0x100,1);\n    *piVar4 = iVar5;\n    iVar6 = piVar4[1] - __n;\n  }\n  else {\n    iVar5 = *piVar4;\n  }" if (parenthesized_expression "(piVar4[2] < iVar5)" ( (binary_expression "piVar4[2] < iVar5" (subscript_expression "piVar4[2]" identifier [ number_literal ]) < identifier) )) (compound_statement "{\n    piVar4[2] = iVar5 + 0x100;\n    iVar5 = FUN_0001dc50(*piVar4,iVar5 + 0x100,1);\n    *piVar4 = iVar5;\n    iVar6 = piVar4[1] - __n;\n  }" { (expression_statement "piVar4[2] = iVar5 + 0x100;" (assignment_expression "piVar4[2] = iVar5 + 0x100" (subscript_expression "piVar4[2]" identifier [ number_literal ]) = (binary_expression "iVar5 + 0x100" identifier + number_literal)) ;) (expression_statement "iVar5 = FUN_0001dc50(*piVar4,iVar5 + 0x100,1);" (assignment_expression "iVar5 = FUN_0001dc50(*piVar4,iVar5 + 0x100,1)" identifier = (call_expression "FUN_0001dc50(*piVar4,iVar5 + 0x100,1)" identifier (argument_list "(*piVar4,iVar5 + 0x100,1)" ( (pointer_expression "*piVar4" * identifier) , (binary_expression "iVar5 + 0x100" identifier + number_literal) , number_literal )))) ;) (expression_statement "*piVar4 = iVar5;" (assignment_expression "*piVar4 = iVar5" (pointer_expression "*piVar4" * identifier) = identifier) ;) (expression_statement "iVar6 = piVar4[1] - __n;" (assignment_expression "iVar6 = piVar4[1] - __n" identifier = (binary_expression "piVar4[1] - __n" (subscript_expression "piVar4[1]" identifier [ number_literal ]) - identifier)) ;) }) (else_clause "else {\n    iVar5 = *piVar4;\n  }" else (compound_statement "{\n    iVar5 = *piVar4;\n  }" { (expression_statement "iVar5 = *piVar4;" (assignment_expression "iVar5 = *piVar4" identifier = (pointer_expression "*piVar4" * identifier)) ;) }))) (expression_statement "memcpy((void *)(iVar5 + iVar6),__src,__n);" (call_expression "memcpy((void *)(iVar5 + iVar6),__src,__n)" identifier (argument_list "((void *)(iVar5 + iVar6),__src,__n)" ( (cast_expression "(void *)(iVar5 + iVar6)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + iVar6)" ( (binary_expression "iVar5 + iVar6" identifier + identifier) ))) , identifier , identifier ))) ;) (expression_statement "*(char *)(*piVar4 + -4 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 0x18);" (assignment_expression "*(char *)(*piVar4 + -4 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 0x18)" (pointer_expression "*(char *)(*piVar4 + -4 + piVar4[3])" * (cast_expression "(char *)(*piVar4 + -4 + piVar4[3])" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*piVar4 + -4 + piVar4[3])" ( (binary_expression "*piVar4 + -4 + piVar4[3]" (binary_expression "*piVar4 + -4" (pointer_expression "*piVar4" * identifier) + number_literal) + (subscript_expression "piVar4[3]" identifier [ number_literal ])) )))) = (cast_expression "(char)((uint)(piVar4[1] - piVar4[3]) >> 0x18)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)(piVar4[1] - piVar4[3]) >> 0x18)" ( (binary_expression "(uint)(piVar4[1] - piVar4[3]) >> 0x18" (call_expression "(uint)(piVar4[1] - piVar4[3])" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(piVar4[1] - piVar4[3])" ( (binary_expression "piVar4[1] - piVar4[3]" (subscript_expression "piVar4[1]" identifier [ number_literal ]) - (subscript_expression "piVar4[3]" identifier [ number_literal ])) ))) >> number_literal) )))) ;) (expression_statement "*(char *)(*piVar4 + -3 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 0x10);" (assignment_expression "*(char *)(*piVar4 + -3 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 0x10)" (pointer_expression "*(char *)(*piVar4 + -3 + piVar4[3])" * (cast_expression "(char *)(*piVar4 + -3 + piVar4[3])" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*piVar4 + -3 + piVar4[3])" ( (binary_expression "*piVar4 + -3 + piVar4[3]" (binary_expression "*piVar4 + -3" (pointer_expression "*piVar4" * identifier) + number_literal) + (subscript_expression "piVar4[3]" identifier [ number_literal ])) )))) = (cast_expression "(char)((uint)(piVar4[1] - piVar4[3]) >> 0x10)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)(piVar4[1] - piVar4[3]) >> 0x10)" ( (binary_expression "(uint)(piVar4[1] - piVar4[3]) >> 0x10" (call_expression "(uint)(piVar4[1] - piVar4[3])" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(piVar4[1] - piVar4[3])" ( (binary_expression "piVar4[1] - piVar4[3]" (subscript_expression "piVar4[1]" identifier [ number_literal ]) - (subscript_expression "piVar4[3]" identifier [ number_literal ])) ))) >> number_literal) )))) ;) (expression_statement "*(char *)(*piVar4 + -2 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 8);" (assignment_expression "*(char *)(*piVar4 + -2 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 8)" (pointer_expression "*(char *)(*piVar4 + -2 + piVar4[3])" * (cast_expression "(char *)(*piVar4 + -2 + piVar4[3])" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*piVar4 + -2 + piVar4[3])" ( (binary_expression "*piVar4 + -2 + piVar4[3]" (binary_expression "*piVar4 + -2" (pointer_expression "*piVar4" * identifier) + number_literal) + (subscript_expression "piVar4[3]" identifier [ number_literal ])) )))) = (cast_expression "(char)((uint)(piVar4[1] - piVar4[3]) >> 8)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)(piVar4[1] - piVar4[3]) >> 8)" ( (binary_expression "(uint)(piVar4[1] - piVar4[3]) >> 8" (call_expression "(uint)(piVar4[1] - piVar4[3])" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(piVar4[1] - piVar4[3])" ( (binary_expression "piVar4[1] - piVar4[3]" (subscript_expression "piVar4[1]" identifier [ number_literal ]) - (subscript_expression "piVar4[3]" identifier [ number_literal ])) ))) >> number_literal) )))) ;) (expression_statement "*(char *)(*piVar4 + -1 + piVar4[3]) = (char)piVar4[1] - (char)piVar4[3];" (assignment_expression "*(char *)(*piVar4 + -1 + piVar4[3]) = (char)piVar4[1] - (char)piVar4[3]" (pointer_expression "*(char *)(*piVar4 + -1 + piVar4[3])" * (cast_expression "(char *)(*piVar4 + -1 + piVar4[3])" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*piVar4 + -1 + piVar4[3])" ( (binary_expression "*piVar4 + -1 + piVar4[3]" (binary_expression "*piVar4 + -1" (pointer_expression "*piVar4" * identifier) + number_literal) + (subscript_expression "piVar4[3]" identifier [ number_literal ])) )))) = (binary_expression "(char)piVar4[1] - (char)piVar4[3]" (cast_expression "(char)piVar4[1]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "piVar4[1]" identifier [ number_literal ])) - (cast_expression "(char)piVar4[3]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "piVar4[3]" identifier [ number_literal ])))) ;) (expression_statement "*(char *)*piVar4 = (char)((uint)(piVar4[1] + -4) >> 0x18);" (assignment_expression "*(char *)*piVar4 = (char)((uint)(piVar4[1] + -4) >> 0x18)" (pointer_expression "*(char *)*piVar4" * (cast_expression "(char *)*piVar4" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar4" * identifier))) = (cast_expression "(char)((uint)(piVar4[1] + -4) >> 0x18)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)(piVar4[1] + -4) >> 0x18)" ( (binary_expression "(uint)(piVar4[1] + -4) >> 0x18" (call_expression "(uint)(piVar4[1] + -4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(piVar4[1] + -4)" ( (binary_expression "piVar4[1] + -4" (subscript_expression "piVar4[1]" identifier [ number_literal ]) + number_literal) ))) >> number_literal) )))) ;) (expression_statement "*(char *)(*piVar4 + 1) = (char)((uint)(piVar4[1] + -4) >> 0x10);" (assignment_expression "*(char *)(*piVar4 + 1) = (char)((uint)(piVar4[1] + -4) >> 0x10)" (pointer_expression "*(char *)(*piVar4 + 1)" * (cast_expression "(char *)(*piVar4 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*piVar4 + 1)" ( (binary_expression "*piVar4 + 1" (pointer_expression "*piVar4" * identifier) + number_literal) )))) = (cast_expression "(char)((uint)(piVar4[1] + -4) >> 0x10)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)(piVar4[1] + -4) >> 0x10)" ( (binary_expression "(uint)(piVar4[1] + -4) >> 0x10" (call_expression "(uint)(piVar4[1] + -4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(piVar4[1] + -4)" ( (binary_expression "piVar4[1] + -4" (subscript_expression "piVar4[1]" identifier [ number_literal ]) + number_literal) ))) >> number_literal) )))) ;) (expression_statement "*(char *)(*piVar4 + 2) = (char)((uint)(piVar4[1] + -4) >> 8);" (assignment_expression "*(char *)(*piVar4 + 2) = (char)((uint)(piVar4[1] + -4) >> 8)" (pointer_expression "*(char *)(*piVar4 + 2)" * (cast_expression "(char *)(*piVar4 + 2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*piVar4 + 2)" ( (binary_expression "*piVar4 + 2" (pointer_expression "*piVar4" * identifier) + number_literal) )))) = (cast_expression "(char)((uint)(piVar4[1] + -4) >> 8)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)(piVar4[1] + -4) >> 8)" ( (binary_expression "(uint)(piVar4[1] + -4) >> 8" (call_expression "(uint)(piVar4[1] + -4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(piVar4[1] + -4)" ( (binary_expression "piVar4[1] + -4" (subscript_expression "piVar4[1]" identifier [ number_literal ]) + number_literal) ))) >> number_literal) )))) ;) (expression_statement "*(char *)(*piVar4 + 3) = (char)piVar4[1] + -4;" (assignment_expression "*(char *)(*piVar4 + 3) = (char)piVar4[1] + -4" (pointer_expression "*(char *)(*piVar4 + 3)" * (cast_expression "(char *)(*piVar4 + 3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*piVar4 + 3)" ( (binary_expression "*piVar4 + 3" (pointer_expression "*piVar4" * identifier) + number_literal) )))) = (binary_expression "(char)piVar4[1] + -4" (cast_expression "(char)piVar4[1]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "piVar4[1]" identifier [ number_literal ])) + number_literal)) ;) (expression_statement "FUN_00029280(*piVar4,piVar4[1]);" (call_expression "FUN_00029280(*piVar4,piVar4[1])" identifier (argument_list "(*piVar4,piVar4[1])" ( (pointer_expression "*piVar4" * identifier) , (subscript_expression "piVar4[1]" identifier [ number_literal ]) ))) ;) (if_statement "if (*piVar4 != 0) {\n    FUN_0001dd30(*piVar4);\n  }" if (parenthesized_expression "(*piVar4 != 0)" ( (binary_expression "*piVar4 != 0" (pointer_expression "*piVar4" * identifier) != number_literal) )) (compound_statement "{\n    FUN_0001dd30(*piVar4);\n  }" { (expression_statement "FUN_0001dd30(*piVar4);" (call_expression "FUN_0001dd30(*piVar4)" identifier (argument_list "(*piVar4)" ( (pointer_expression "*piVar4" * identifier) ))) ;) })) (expression_statement "FUN_0001dd30(piVar4);" (call_expression "FUN_0001dd30(piVar4)" identifier (argument_list "(piVar4)" ( identifier ))) ;) (expression_statement "FUN_0001dd30(*param_1);" (call_expression "FUN_0001dd30(*param_1)" identifier (argument_list "(*param_1)" ( (pointer_expression "*param_1" * identifier) ))) ;) (expression_statement "FUN_0001dd30(param_1);" (call_expression "FUN_0001dd30(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return puVar3;\n  }" if (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return puVar3;\n  }" { (return_statement "return puVar3;" return identifier ;) })) comment (expression_statement "FUN_0008eb20();" (call_expression "FUN_0008eb20()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nsftp_request * fxp_close_send(fxp_handle *handle)\n\n{\n  int iVar1;\n  size_t __n;\n  sftp_request *psVar2;\n  sftp_packet *ptr;\n  char *pcVar3;\n  char *pcVar4;\n  uint uVar5;\n  uint uVar6;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  psVar2 = sftp_alloc_request();\n  ptr = sftp_pkt_init(4);\n  uVar6 = psVar2->id;\n  uVar5 = ptr->length;\n  ptr->length = uVar5 + 4;\n  if ((int)ptr->maxlen < (int)(uVar5 + 4)) {\n    ptr->maxlen = uVar5 + 0x104;\n    pcVar4 = (char *)saferealloc(ptr->data,uVar5 + 0x104,1);\n    ptr->data = pcVar4;\n    uVar5 = ptr->length - 4;\n  }\n  else {\n    pcVar4 = ptr->data;\n  }\n  *(uint *)(pcVar4 + uVar5) =\n       (uVar6 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar6 >> 0x10),(char)(uVar6 >> 0x18)) |\n       uVar6 << 0x18;\n  uVar6 = ptr->length;\n  ptr->length = uVar6 + 4;\n  if ((int)ptr->maxlen < (int)(uVar6 + 4)) {\n    ptr->maxlen = uVar6 + 0x104;\n    pcVar4 = (char *)saferealloc(ptr->data,uVar6 + 0x104,1);\n    ptr->data = pcVar4;\n    uVar6 = ptr->length - 4;\n  }\n  else {\n    pcVar4 = ptr->data;\n  }\n  pcVar4 = pcVar4 + uVar6;\n  pcVar4[0] = '\0';\n  pcVar4[1] = '\0';\n  pcVar4[2] = '\0';\n  pcVar4[3] = '\0';\n  uVar5 = ptr->length;\n  pcVar4 = handle->hstring;\n  __n = handle->hlen;\n  ptr->savedpos = uVar5;\n  uVar6 = uVar5 + __n;\n  ptr->length = uVar6;\n  if ((int)ptr->maxlen < (int)uVar6) {\n    ptr->maxlen = uVar6 + 0x100;\n    pcVar3 = (char *)saferealloc(ptr->data,uVar6 + 0x100,1);\n    ptr->data = pcVar3;\n    uVar5 = ptr->length - __n;\n  }\n  else {\n    pcVar3 = ptr->data;\n  }\n  memcpy(pcVar3 + uVar5,pcVar4,__n);\n  ptr->data[ptr->savedpos - 4] = (char)(ptr->length - ptr->savedpos >> 0x18);\n  ptr->data[ptr->savedpos - 3] = (char)(ptr->length - ptr->savedpos >> 0x10);\n  ptr->data[ptr->savedpos - 2] = (char)(ptr->length - ptr->savedpos >> 8);\n  ptr->data[ptr->savedpos - 1] = (char)ptr->length - (char)ptr->savedpos;\n  *ptr->data = (char)(ptr->length - 4 >> 0x18);\n  ptr->data[1] = (char)(ptr->length - 4 >> 0x10);\n  ptr->data[2] = (char)(ptr->length - 4 >> 8);\n  ptr->data[3] = (char)ptr->length + -4;\n  sftp_senddata(ptr->data,ptr->length);\n  if (ptr->data != (char *)0x0) {\n    safefree(ptr->data);\n  }\n  safefree(ptr);\n  safefree(handle->hstring);\n  safefree(handle);\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return psVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment comment (function_definition "sftp_request * fxp_close_send(fxp_handle *handle)\n\n{\n  int iVar1;\n  size_t __n;\n  sftp_request *psVar2;\n  sftp_packet *ptr;\n  char *pcVar3;\n  char *pcVar4;\n  uint uVar5;\n  uint uVar6;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  psVar2 = sftp_alloc_request();\n  ptr = sftp_pkt_init(4);\n  uVar6 = psVar2->id;\n  uVar5 = ptr->length;\n  ptr->length = uVar5 + 4;\n  if ((int)ptr->maxlen < (int)(uVar5 + 4)) {\n    ptr->maxlen = uVar5 + 0x104;\n    pcVar4 = (char *)saferealloc(ptr->data,uVar5 + 0x104,1);\n    ptr->data = pcVar4;\n    uVar5 = ptr->length - 4;\n  }\n  else {\n    pcVar4 = ptr->data;\n  }\n  *(uint *)(pcVar4 + uVar5) =\n       (uVar6 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar6 >> 0x10),(char)(uVar6 >> 0x18)) |\n       uVar6 << 0x18;\n  uVar6 = ptr->length;\n  ptr->length = uVar6 + 4;\n  if ((int)ptr->maxlen < (int)(uVar6 + 4)) {\n    ptr->maxlen = uVar6 + 0x104;\n    pcVar4 = (char *)saferealloc(ptr->data,uVar6 + 0x104,1);\n    ptr->data = pcVar4;\n    uVar6 = ptr->length - 4;\n  }\n  else {\n    pcVar4 = ptr->data;\n  }\n  pcVar4 = pcVar4 + uVar6;\n  pcVar4[0] = '\0';\n  pcVar4[1] = '\0';\n  pcVar4[2] = '\0';\n  pcVar4[3] = '\0';\n  uVar5 = ptr->length;\n  pcVar4 = handle->hstring;\n  __n = handle->hlen;\n  ptr->savedpos = uVar5;\n  uVar6 = uVar5 + __n;\n  ptr->length = uVar6;\n  if ((int)ptr->maxlen < (int)uVar6) {\n    ptr->maxlen = uVar6 + 0x100;\n    pcVar3 = (char *)saferealloc(ptr->data,uVar6 + 0x100,1);\n    ptr->data = pcVar3;\n    uVar5 = ptr->length - __n;\n  }\n  else {\n    pcVar3 = ptr->data;\n  }\n  memcpy(pcVar3 + uVar5,pcVar4,__n);\n  ptr->data[ptr->savedpos - 4] = (char)(ptr->length - ptr->savedpos >> 0x18);\n  ptr->data[ptr->savedpos - 3] = (char)(ptr->length - ptr->savedpos >> 0x10);\n  ptr->data[ptr->savedpos - 2] = (char)(ptr->length - ptr->savedpos >> 8);\n  ptr->data[ptr->savedpos - 1] = (char)ptr->length - (char)ptr->savedpos;\n  *ptr->data = (char)(ptr->length - 4 >> 0x18);\n  ptr->data[1] = (char)(ptr->length - 4 >> 0x10);\n  ptr->data[2] = (char)(ptr->length - 4 >> 8);\n  ptr->data[3] = (char)ptr->length + -4;\n  sftp_senddata(ptr->data,ptr->length);\n  if (ptr->data != (char *)0x0) {\n    safefree(ptr->data);\n  }\n  safefree(ptr);\n  safefree(handle->hstring);\n  safefree(handle);\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return psVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" type_identifier (pointer_declarator "* fxp_close_send(fxp_handle *handle)" * (function_declarator "fxp_close_send(fxp_handle *handle)" identifier (parameter_list "(fxp_handle *handle)" ( (parameter_declaration "fxp_handle *handle" type_identifier (pointer_declarator "*handle" * identifier)) )))) (compound_statement "{\n  int iVar1;\n  size_t __n;\n  sftp_request *psVar2;\n  sftp_packet *ptr;\n  char *pcVar3;\n  char *pcVar4;\n  uint uVar5;\n  uint uVar6;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  psVar2 = sftp_alloc_request();\n  ptr = sftp_pkt_init(4);\n  uVar6 = psVar2->id;\n  uVar5 = ptr->length;\n  ptr->length = uVar5 + 4;\n  if ((int)ptr->maxlen < (int)(uVar5 + 4)) {\n    ptr->maxlen = uVar5 + 0x104;\n    pcVar4 = (char *)saferealloc(ptr->data,uVar5 + 0x104,1);\n    ptr->data = pcVar4;\n    uVar5 = ptr->length - 4;\n  }\n  else {\n    pcVar4 = ptr->data;\n  }\n  *(uint *)(pcVar4 + uVar5) =\n       (uVar6 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar6 >> 0x10),(char)(uVar6 >> 0x18)) |\n       uVar6 << 0x18;\n  uVar6 = ptr->length;\n  ptr->length = uVar6 + 4;\n  if ((int)ptr->maxlen < (int)(uVar6 + 4)) {\n    ptr->maxlen = uVar6 + 0x104;\n    pcVar4 = (char *)saferealloc(ptr->data,uVar6 + 0x104,1);\n    ptr->data = pcVar4;\n    uVar6 = ptr->length - 4;\n  }\n  else {\n    pcVar4 = ptr->data;\n  }\n  pcVar4 = pcVar4 + uVar6;\n  pcVar4[0] = '\0';\n  pcVar4[1] = '\0';\n  pcVar4[2] = '\0';\n  pcVar4[3] = '\0';\n  uVar5 = ptr->length;\n  pcVar4 = handle->hstring;\n  __n = handle->hlen;\n  ptr->savedpos = uVar5;\n  uVar6 = uVar5 + __n;\n  ptr->length = uVar6;\n  if ((int)ptr->maxlen < (int)uVar6) {\n    ptr->maxlen = uVar6 + 0x100;\n    pcVar3 = (char *)saferealloc(ptr->data,uVar6 + 0x100,1);\n    ptr->data = pcVar3;\n    uVar5 = ptr->length - __n;\n  }\n  else {\n    pcVar3 = ptr->data;\n  }\n  memcpy(pcVar3 + uVar5,pcVar4,__n);\n  ptr->data[ptr->savedpos - 4] = (char)(ptr->length - ptr->savedpos >> 0x18);\n  ptr->data[ptr->savedpos - 3] = (char)(ptr->length - ptr->savedpos >> 0x10);\n  ptr->data[ptr->savedpos - 2] = (char)(ptr->length - ptr->savedpos >> 8);\n  ptr->data[ptr->savedpos - 1] = (char)ptr->length - (char)ptr->savedpos;\n  *ptr->data = (char)(ptr->length - 4 >> 0x18);\n  ptr->data[1] = (char)(ptr->length - 4 >> 0x10);\n  ptr->data[2] = (char)(ptr->length - 4 >> 8);\n  ptr->data[3] = (char)ptr->length + -4;\n  sftp_senddata(ptr->data,ptr->length);\n  if (ptr->data != (char *)0x0) {\n    safefree(ptr->data);\n  }\n  safefree(ptr);\n  safefree(handle->hstring);\n  safefree(handle);\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return psVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "sftp_request *psVar2;" type_identifier (pointer_declarator "*psVar2" * identifier) ;) (declaration "sftp_packet *ptr;" type_identifier (pointer_declarator "*ptr" * identifier) ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "psVar2 = sftp_alloc_request();" (assignment_expression "psVar2 = sftp_alloc_request()" identifier = (call_expression "sftp_alloc_request()" identifier (argument_list "()" ( )))) ;) (expression_statement "ptr = sftp_pkt_init(4);" (assignment_expression "ptr = sftp_pkt_init(4)" identifier = (call_expression "sftp_pkt_init(4)" identifier (argument_list "(4)" ( number_literal )))) ;) (expression_statement "uVar6 = psVar2->id;" (assignment_expression "uVar6 = psVar2->id" identifier = (field_expression "psVar2->id" identifier -> field_identifier)) ;) (expression_statement "uVar5 = ptr->length;" (assignment_expression "uVar5 = ptr->length" identifier = (field_expression "ptr->length" identifier -> field_identifier)) ;) (expression_statement "ptr->length = uVar5 + 4;" (assignment_expression "ptr->length = uVar5 + 4" (field_expression "ptr->length" identifier -> field_identifier) = (binary_expression "uVar5 + 4" identifier + number_literal)) ;) (if_statement "if ((int)ptr->maxlen < (int)(uVar5 + 4)) {\n    ptr->maxlen = uVar5 + 0x104;\n    pcVar4 = (char *)saferealloc(ptr->data,uVar5 + 0x104,1);\n    ptr->data = pcVar4;\n    uVar5 = ptr->length - 4;\n  }\n  else {\n    pcVar4 = ptr->data;\n  }" if (parenthesized_expression "((int)ptr->maxlen < (int)(uVar5 + 4))" ( (binary_expression "(int)ptr->maxlen < (int)(uVar5 + 4)" (cast_expression "(int)ptr->maxlen" ( (type_descriptor "int" primitive_type) ) (field_expression "ptr->maxlen" identifier -> field_identifier)) < (cast_expression "(int)(uVar5 + 4)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uVar5 + 4)" ( (binary_expression "uVar5 + 4" identifier + number_literal) )))) )) (compound_statement "{\n    ptr->maxlen = uVar5 + 0x104;\n    pcVar4 = (char *)saferealloc(ptr->data,uVar5 + 0x104,1);\n    ptr->data = pcVar4;\n    uVar5 = ptr->length - 4;\n  }" { (expression_statement "ptr->maxlen = uVar5 + 0x104;" (assignment_expression "ptr->maxlen = uVar5 + 0x104" (field_expression "ptr->maxlen" identifier -> field_identifier) = (binary_expression "uVar5 + 0x104" identifier + number_literal)) ;) (expression_statement "pcVar4 = (char *)saferealloc(ptr->data,uVar5 + 0x104,1);" (assignment_expression "pcVar4 = (char *)saferealloc(ptr->data,uVar5 + 0x104,1)" identifier = (cast_expression "(char *)saferealloc(ptr->data,uVar5 + 0x104,1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "saferealloc(ptr->data,uVar5 + 0x104,1)" identifier (argument_list "(ptr->data,uVar5 + 0x104,1)" ( (field_expression "ptr->data" identifier -> field_identifier) , (binary_expression "uVar5 + 0x104" identifier + number_literal) , number_literal ))))) ;) (expression_statement "ptr->data = pcVar4;" (assignment_expression "ptr->data = pcVar4" (field_expression "ptr->data" identifier -> field_identifier) = identifier) ;) (expression_statement "uVar5 = ptr->length - 4;" (assignment_expression "uVar5 = ptr->length - 4" identifier = (binary_expression "ptr->length - 4" (field_expression "ptr->length" identifier -> field_identifier) - number_literal)) ;) }) (else_clause "else {\n    pcVar4 = ptr->data;\n  }" else (compound_statement "{\n    pcVar4 = ptr->data;\n  }" { (expression_statement "pcVar4 = ptr->data;" (assignment_expression "pcVar4 = ptr->data" identifier = (field_expression "ptr->data" identifier -> field_identifier)) ;) }))) (expression_statement "*(uint *)(pcVar4 + uVar5) =\n       (uVar6 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar6 >> 0x10),(char)(uVar6 >> 0x18)) |\n       uVar6 << 0x18;" (assignment_expression "*(uint *)(pcVar4 + uVar5) =\n       (uVar6 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar6 >> 0x10),(char)(uVar6 >> 0x18)) |\n       uVar6 << 0x18" (pointer_expression "*(uint *)(pcVar4 + uVar5)" * (cast_expression "(uint *)(pcVar4 + uVar5)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar4 + uVar5)" ( (binary_expression "pcVar4 + uVar5" identifier + identifier) )))) = (binary_expression "(uVar6 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar6 >> 0x10),(char)(uVar6 >> 0x18)) |\n       uVar6 << 0x18" (binary_expression "(uVar6 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar6 >> 0x10),(char)(uVar6 >> 0x18))" (binary_expression "(uVar6 >> 8 & 0xff) << 0x10" (parenthesized_expression "(uVar6 >> 8 & 0xff)" ( (binary_expression "uVar6 >> 8 & 0xff" (binary_expression "uVar6 >> 8" identifier >> number_literal) & number_literal) )) << number_literal) | (cast_expression "(uint)CONCAT11((char)(uVar6 >> 0x10),(char)(uVar6 >> 0x18))" ( (type_descriptor "uint" type_identifier) ) (call_expression "CONCAT11((char)(uVar6 >> 0x10),(char)(uVar6 >> 0x18))" identifier (argument_list "((char)(uVar6 >> 0x10),(char)(uVar6 >> 0x18))" ( (cast_expression "(char)(uVar6 >> 0x10)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(uVar6 >> 0x10)" ( (binary_expression "uVar6 >> 0x10" identifier >> number_literal) ))) , (cast_expression "(char)(uVar6 >> 0x18)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(uVar6 >> 0x18)" ( (binary_expression "uVar6 >> 0x18" identifier >> number_literal) ))) ))))) | (binary_expression "uVar6 << 0x18" identifier << number_literal))) ;) (expression_statement "uVar6 = ptr->length;" (assignment_expression "uVar6 = ptr->length" identifier = (field_expression "ptr->length" identifier -> field_identifier)) ;) (expression_statement "ptr->length = uVar6 + 4;" (assignment_expression "ptr->length = uVar6 + 4" (field_expression "ptr->length" identifier -> field_identifier) = (binary_expression "uVar6 + 4" identifier + number_literal)) ;) (if_statement "if ((int)ptr->maxlen < (int)(uVar6 + 4)) {\n    ptr->maxlen = uVar6 + 0x104;\n    pcVar4 = (char *)saferealloc(ptr->data,uVar6 + 0x104,1);\n    ptr->data = pcVar4;\n    uVar6 = ptr->length - 4;\n  }\n  else {\n    pcVar4 = ptr->data;\n  }" if (parenthesized_expression "((int)ptr->maxlen < (int)(uVar6 + 4))" ( (binary_expression "(int)ptr->maxlen < (int)(uVar6 + 4)" (cast_expression "(int)ptr->maxlen" ( (type_descriptor "int" primitive_type) ) (field_expression "ptr->maxlen" identifier -> field_identifier)) < (cast_expression "(int)(uVar6 + 4)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uVar6 + 4)" ( (binary_expression "uVar6 + 4" identifier + number_literal) )))) )) (compound_statement "{\n    ptr->maxlen = uVar6 + 0x104;\n    pcVar4 = (char *)saferealloc(ptr->data,uVar6 + 0x104,1);\n    ptr->data = pcVar4;\n    uVar6 = ptr->length - 4;\n  }" { (expression_statement "ptr->maxlen = uVar6 + 0x104;" (assignment_expression "ptr->maxlen = uVar6 + 0x104" (field_expression "ptr->maxlen" identifier -> field_identifier) = (binary_expression "uVar6 + 0x104" identifier + number_literal)) ;) (expression_statement "pcVar4 = (char *)saferealloc(ptr->data,uVar6 + 0x104,1);" (assignment_expression "pcVar4 = (char *)saferealloc(ptr->data,uVar6 + 0x104,1)" identifier = (cast_expression "(char *)saferealloc(ptr->data,uVar6 + 0x104,1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "saferealloc(ptr->data,uVar6 + 0x104,1)" identifier (argument_list "(ptr->data,uVar6 + 0x104,1)" ( (field_expression "ptr->data" identifier -> field_identifier) , (binary_expression "uVar6 + 0x104" identifier + number_literal) , number_literal ))))) ;) (expression_statement "ptr->data = pcVar4;" (assignment_expression "ptr->data = pcVar4" (field_expression "ptr->data" identifier -> field_identifier) = identifier) ;) (expression_statement "uVar6 = ptr->length - 4;" (assignment_expression "uVar6 = ptr->length - 4" identifier = (binary_expression "ptr->length - 4" (field_expression "ptr->length" identifier -> field_identifier) - number_literal)) ;) }) (else_clause "else {\n    pcVar4 = ptr->data;\n  }" else (compound_statement "{\n    pcVar4 = ptr->data;\n  }" { (expression_statement "pcVar4 = ptr->data;" (assignment_expression "pcVar4 = ptr->data" identifier = (field_expression "ptr->data" identifier -> field_identifier)) ;) }))) (expression_statement "pcVar4 = pcVar4 + uVar6;" (assignment_expression "pcVar4 = pcVar4 + uVar6" identifier = (binary_expression "pcVar4 + uVar6" identifier + identifier)) ;) (expression_statement "pcVar4[0] = '\0';" (assignment_expression "pcVar4[0] = '\0'" (subscript_expression "pcVar4[0]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "pcVar4[1] = '\0';" (assignment_expression "pcVar4[1] = '\0'" (subscript_expression "pcVar4[1]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "pcVar4[2] = '\0';" (assignment_expression "pcVar4[2] = '\0'" (subscript_expression "pcVar4[2]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "pcVar4[3] = '\0';" (assignment_expression "pcVar4[3] = '\0'" (subscript_expression "pcVar4[3]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "uVar5 = ptr->length;" (assignment_expression "uVar5 = ptr->length" identifier = (field_expression "ptr->length" identifier -> field_identifier)) ;) (expression_statement "pcVar4 = handle->hstring;" (assignment_expression "pcVar4 = handle->hstring" identifier = (field_expression "handle->hstring" identifier -> field_identifier)) ;) (expression_statement "__n = handle->hlen;" (assignment_expression "__n = handle->hlen" identifier = (field_expression "handle->hlen" identifier -> field_identifier)) ;) (expression_statement "ptr->savedpos = uVar5;" (assignment_expression "ptr->savedpos = uVar5" (field_expression "ptr->savedpos" identifier -> field_identifier) = identifier) ;) (expression_statement "uVar6 = uVar5 + __n;" (assignment_expression "uVar6 = uVar5 + __n" identifier = (binary_expression "uVar5 + __n" identifier + identifier)) ;) (expression_statement "ptr->length = uVar6;" (assignment_expression "ptr->length = uVar6" (field_expression "ptr->length" identifier -> field_identifier) = identifier) ;) (if_statement "if ((int)ptr->maxlen < (int)uVar6) {\n    ptr->maxlen = uVar6 + 0x100;\n    pcVar3 = (char *)saferealloc(ptr->data,uVar6 + 0x100,1);\n    ptr->data = pcVar3;\n    uVar5 = ptr->length - __n;\n  }\n  else {\n    pcVar3 = ptr->data;\n  }" if (parenthesized_expression "((int)ptr->maxlen < (int)uVar6)" ( (binary_expression "(int)ptr->maxlen < (int)uVar6" (cast_expression "(int)ptr->maxlen" ( (type_descriptor "int" primitive_type) ) (field_expression "ptr->maxlen" identifier -> field_identifier)) < (cast_expression "(int)uVar6" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n    ptr->maxlen = uVar6 + 0x100;\n    pcVar3 = (char *)saferealloc(ptr->data,uVar6 + 0x100,1);\n    ptr->data = pcVar3;\n    uVar5 = ptr->length - __n;\n  }" { (expression_statement "ptr->maxlen = uVar6 + 0x100;" (assignment_expression "ptr->maxlen = uVar6 + 0x100" (field_expression "ptr->maxlen" identifier -> field_identifier) = (binary_expression "uVar6 + 0x100" identifier + number_literal)) ;) (expression_statement "pcVar3 = (char *)saferealloc(ptr->data,uVar6 + 0x100,1);" (assignment_expression "pcVar3 = (char *)saferealloc(ptr->data,uVar6 + 0x100,1)" identifier = (cast_expression "(char *)saferealloc(ptr->data,uVar6 + 0x100,1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "saferealloc(ptr->data,uVar6 + 0x100,1)" identifier (argument_list "(ptr->data,uVar6 + 0x100,1)" ( (field_expression "ptr->data" identifier -> field_identifier) , (binary_expression "uVar6 + 0x100" identifier + number_literal) , number_literal ))))) ;) (expression_statement "ptr->data = pcVar3;" (assignment_expression "ptr->data = pcVar3" (field_expression "ptr->data" identifier -> field_identifier) = identifier) ;) (expression_statement "uVar5 = ptr->length - __n;" (assignment_expression "uVar5 = ptr->length - __n" identifier = (binary_expression "ptr->length - __n" (field_expression "ptr->length" identifier -> field_identifier) - identifier)) ;) }) (else_clause "else {\n    pcVar3 = ptr->data;\n  }" else (compound_statement "{\n    pcVar3 = ptr->data;\n  }" { (expression_statement "pcVar3 = ptr->data;" (assignment_expression "pcVar3 = ptr->data" identifier = (field_expression "ptr->data" identifier -> field_identifier)) ;) }))) (expression_statement "memcpy(pcVar3 + uVar5,pcVar4,__n);" (call_expression "memcpy(pcVar3 + uVar5,pcVar4,__n)" identifier (argument_list "(pcVar3 + uVar5,pcVar4,__n)" ( (binary_expression "pcVar3 + uVar5" identifier + identifier) , identifier , identifier ))) ;) (expression_statement "ptr->data[ptr->savedpos - 4] = (char)(ptr->length - ptr->savedpos >> 0x18);" (assignment_expression "ptr->data[ptr->savedpos - 4] = (char)(ptr->length - ptr->savedpos >> 0x18)" (subscript_expression "ptr->data[ptr->savedpos - 4]" (field_expression "ptr->data" identifier -> field_identifier) [ (binary_expression "ptr->savedpos - 4" (field_expression "ptr->savedpos" identifier -> field_identifier) - number_literal) ]) = (cast_expression "(char)(ptr->length - ptr->savedpos >> 0x18)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(ptr->length - ptr->savedpos >> 0x18)" ( (binary_expression "ptr->length - ptr->savedpos >> 0x18" (binary_expression "ptr->length - ptr->savedpos" (field_expression "ptr->length" identifier -> field_identifier) - (field_expression "ptr->savedpos" identifier -> field_identifier)) >> number_literal) )))) ;) (expression_statement "ptr->data[ptr->savedpos - 3] = (char)(ptr->length - ptr->savedpos >> 0x10);" (assignment_expression "ptr->data[ptr->savedpos - 3] = (char)(ptr->length - ptr->savedpos >> 0x10)" (subscript_expression "ptr->data[ptr->savedpos - 3]" (field_expression "ptr->data" identifier -> field_identifier) [ (binary_expression "ptr->savedpos - 3" (field_expression "ptr->savedpos" identifier -> field_identifier) - number_literal) ]) = (cast_expression "(char)(ptr->length - ptr->savedpos >> 0x10)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(ptr->length - ptr->savedpos >> 0x10)" ( (binary_expression "ptr->length - ptr->savedpos >> 0x10" (binary_expression "ptr->length - ptr->savedpos" (field_expression "ptr->length" identifier -> field_identifier) - (field_expression "ptr->savedpos" identifier -> field_identifier)) >> number_literal) )))) ;) (expression_statement "ptr->data[ptr->savedpos - 2] = (char)(ptr->length - ptr->savedpos >> 8);" (assignment_expression "ptr->data[ptr->savedpos - 2] = (char)(ptr->length - ptr->savedpos >> 8)" (subscript_expression "ptr->data[ptr->savedpos - 2]" (field_expression "ptr->data" identifier -> field_identifier) [ (binary_expression "ptr->savedpos - 2" (field_expression "ptr->savedpos" identifier -> field_identifier) - number_literal) ]) = (cast_expression "(char)(ptr->length - ptr->savedpos >> 8)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(ptr->length - ptr->savedpos >> 8)" ( (binary_expression "ptr->length - ptr->savedpos >> 8" (binary_expression "ptr->length - ptr->savedpos" (field_expression "ptr->length" identifier -> field_identifier) - (field_expression "ptr->savedpos" identifier -> field_identifier)) >> number_literal) )))) ;) (expression_statement "ptr->data[ptr->savedpos - 1] = (char)ptr->length - (char)ptr->savedpos;" (assignment_expression "ptr->data[ptr->savedpos - 1] = (char)ptr->length - (char)ptr->savedpos" (subscript_expression "ptr->data[ptr->savedpos - 1]" (field_expression "ptr->data" identifier -> field_identifier) [ (binary_expression "ptr->savedpos - 1" (field_expression "ptr->savedpos" identifier -> field_identifier) - number_literal) ]) = (binary_expression "(char)ptr->length - (char)ptr->savedpos" (cast_expression "(char)ptr->length" ( (type_descriptor "char" primitive_type) ) (field_expression "ptr->length" identifier -> field_identifier)) - (cast_expression "(char)ptr->savedpos" ( (type_descriptor "char" primitive_type) ) (field_expression "ptr->savedpos" identifier -> field_identifier)))) ;) (expression_statement "*ptr->data = (char)(ptr->length - 4 >> 0x18);" (assignment_expression "*ptr->data = (char)(ptr->length - 4 >> 0x18)" (pointer_expression "*ptr->data" * (field_expression "ptr->data" identifier -> field_identifier)) = (cast_expression "(char)(ptr->length - 4 >> 0x18)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(ptr->length - 4 >> 0x18)" ( (binary_expression "ptr->length - 4 >> 0x18" (binary_expression "ptr->length - 4" (field_expression "ptr->length" identifier -> field_identifier) - number_literal) >> number_literal) )))) ;) (expression_statement "ptr->data[1] = (char)(ptr->length - 4 >> 0x10);" (assignment_expression "ptr->data[1] = (char)(ptr->length - 4 >> 0x10)" (subscript_expression "ptr->data[1]" (field_expression "ptr->data" identifier -> field_identifier) [ number_literal ]) = (cast_expression "(char)(ptr->length - 4 >> 0x10)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(ptr->length - 4 >> 0x10)" ( (binary_expression "ptr->length - 4 >> 0x10" (binary_expression "ptr->length - 4" (field_expression "ptr->length" identifier -> field_identifier) - number_literal) >> number_literal) )))) ;) (expression_statement "ptr->data[2] = (char)(ptr->length - 4 >> 8);" (assignment_expression "ptr->data[2] = (char)(ptr->length - 4 >> 8)" (subscript_expression "ptr->data[2]" (field_expression "ptr->data" identifier -> field_identifier) [ number_literal ]) = (cast_expression "(char)(ptr->length - 4 >> 8)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(ptr->length - 4 >> 8)" ( (binary_expression "ptr->length - 4 >> 8" (binary_expression "ptr->length - 4" (field_expression "ptr->length" identifier -> field_identifier) - number_literal) >> number_literal) )))) ;) (expression_statement "ptr->data[3] = (char)ptr->length + -4;" (assignment_expression "ptr->data[3] = (char)ptr->length + -4" (subscript_expression "ptr->data[3]" (field_expression "ptr->data" identifier -> field_identifier) [ number_literal ]) = (binary_expression "(char)ptr->length + -4" (cast_expression "(char)ptr->length" ( (type_descriptor "char" primitive_type) ) (field_expression "ptr->length" identifier -> field_identifier)) + number_literal)) ;) (expression_statement "sftp_senddata(ptr->data,ptr->length);" (call_expression "sftp_senddata(ptr->data,ptr->length)" identifier (argument_list "(ptr->data,ptr->length)" ( (field_expression "ptr->data" identifier -> field_identifier) , (field_expression "ptr->length" identifier -> field_identifier) ))) ;) (if_statement "if (ptr->data != (char *)0x0) {\n    safefree(ptr->data);\n  }" if (parenthesized_expression "(ptr->data != (char *)0x0)" ( (binary_expression "ptr->data != (char *)0x0" (field_expression "ptr->data" identifier -> field_identifier) != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    safefree(ptr->data);\n  }" { (expression_statement "safefree(ptr->data);" (call_expression "safefree(ptr->data)" identifier (argument_list "(ptr->data)" ( (field_expression "ptr->data" identifier -> field_identifier) ))) ;) })) (expression_statement "safefree(ptr);" (call_expression "safefree(ptr)" identifier (argument_list "(ptr)" ( identifier ))) ;) (expression_statement "safefree(handle->hstring);" (call_expression "safefree(handle->hstring)" identifier (argument_list "(handle->hstring)" ( (field_expression "handle->hstring" identifier -> field_identifier) ))) ;) (expression_statement "safefree(handle);" (call_expression "safefree(handle)" identifier (argument_list "(handle)" ( identifier ))) ;) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return psVar2;\n  }" if (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return psVar2;\n  }" { (return_statement "return psVar2;" return identifier ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "uint * FUN_00031140(undefined4 *param_1)\n\n{\n  int iVar1;\n  uint uVar2;\n  void *__src;\n  size_t __n;\n  uint *puVar3;\n  int *piVar4;\n  int iVar5;\n  int iVar6;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar3 = (uint *)FUN_0002f5d0();\n  piVar4 = (int *)FUN_0002f910();\n  uVar2 = *puVar3;\n  iVar5 = piVar4[1];\n  piVar4[1] = iVar5 + 4;\n  if (piVar4[2] < iVar5 + 4) {\n    piVar4[2] = iVar5 + 0x104;\n    iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1);\n    *piVar4 = iVar6;\n    iVar5 = piVar4[1] + -4;\n  }\n  else {\n    iVar6 = *piVar4;\n  }\n  *(uint *)(iVar6 + iVar5) =\n       (uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |\n       uVar2 << 0x18;\n  iVar5 = piVar4[1];\n  piVar4[1] = iVar5 + 4;\n  if (piVar4[2] < iVar5 + 4) {\n    piVar4[2] = iVar5 + 0x104;\n    iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1);\n    *piVar4 = iVar6;\n    iVar5 = piVar4[1] + -4;\n  }\n  else {\n    iVar6 = *piVar4;\n  }\n  *(undefined4 *)(iVar6 + iVar5) = 0;\n  iVar6 = piVar4[1];\n  __src = (void *)*param_1;\n  __n = param_1[1];\n  piVar4[3] = iVar6;\n  iVar5 = iVar6 + __n;\n  piVar4[1] = iVar5;\n  if (piVar4[2] < iVar5) {\n    piVar4[2] = iVar5 + 0x100;\n    iVar5 = FUN_0001dc50(*piVar4,iVar5 + 0x100,1);\n    *piVar4 = iVar5;\n    iVar6 = piVar4[1] - __n;\n  }\n  else {\n    iVar5 = *piVar4;\n  }\n  memcpy((void *)(iVar5 + iVar6),__src,__n);\n  *(char *)(*piVar4 + -4 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 0x18);\n  *(char *)(*piVar4 + -3 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 0x10);\n  *(char *)(*piVar4 + -2 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 8);\n  *(char *)(*piVar4 + -1 + piVar4[3]) = (char)piVar4[1] - (char)piVar4[3];\n  *(char *)*piVar4 = (char)((uint)(piVar4[1] + -4) >> 0x18);\n  *(char *)(*piVar4 + 1) = (char)((uint)(piVar4[1] + -4) >> 0x10);\n  *(char *)(*piVar4 + 2) = (char)((uint)(piVar4[1] + -4) >> 8);\n  *(char *)(*piVar4 + 3) = (char)piVar4[1] + -4;\n  FUN_00029280(*piVar4,piVar4[1]);\n  if (*piVar4 != 0) {\n    FUN_0001dd30(*piVar4);\n  }\n  FUN_0001dd30(piVar4);\n  FUN_0001dd30(*param_1);\n  FUN_0001dd30(param_1);\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return puVar3;\n  }\n                    \n  FUN_0008eb20();\n}\n\n" (function_definition "uint * FUN_00031140(undefined4 *param_1)\n\n{\n  int iVar1;\n  uint uVar2;\n  void *__src;\n  size_t __n;\n  uint *puVar3;\n  int *piVar4;\n  int iVar5;\n  int iVar6;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar3 = (uint *)FUN_0002f5d0();\n  piVar4 = (int *)FUN_0002f910();\n  uVar2 = *puVar3;\n  iVar5 = piVar4[1];\n  piVar4[1] = iVar5 + 4;\n  if (piVar4[2] < iVar5 + 4) {\n    piVar4[2] = iVar5 + 0x104;\n    iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1);\n    *piVar4 = iVar6;\n    iVar5 = piVar4[1] + -4;\n  }\n  else {\n    iVar6 = *piVar4;\n  }\n  *(uint *)(iVar6 + iVar5) =\n       (uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |\n       uVar2 << 0x18;\n  iVar5 = piVar4[1];\n  piVar4[1] = iVar5 + 4;\n  if (piVar4[2] < iVar5 + 4) {\n    piVar4[2] = iVar5 + 0x104;\n    iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1);\n    *piVar4 = iVar6;\n    iVar5 = piVar4[1] + -4;\n  }\n  else {\n    iVar6 = *piVar4;\n  }\n  *(undefined4 *)(iVar6 + iVar5) = 0;\n  iVar6 = piVar4[1];\n  __src = (void *)*param_1;\n  __n = param_1[1];\n  piVar4[3] = iVar6;\n  iVar5 = iVar6 + __n;\n  piVar4[1] = iVar5;\n  if (piVar4[2] < iVar5) {\n    piVar4[2] = iVar5 + 0x100;\n    iVar5 = FUN_0001dc50(*piVar4,iVar5 + 0x100,1);\n    *piVar4 = iVar5;\n    iVar6 = piVar4[1] - __n;\n  }\n  else {\n    iVar5 = *piVar4;\n  }\n  memcpy((void *)(iVar5 + iVar6),__src,__n);\n  *(char *)(*piVar4 + -4 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 0x18);\n  *(char *)(*piVar4 + -3 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 0x10);\n  *(char *)(*piVar4 + -2 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 8);\n  *(char *)(*piVar4 + -1 + piVar4[3]) = (char)piVar4[1] - (char)piVar4[3];\n  *(char *)*piVar4 = (char)((uint)(piVar4[1] + -4) >> 0x18);\n  *(char *)(*piVar4 + 1) = (char)((uint)(piVar4[1] + -4) >> 0x10);\n  *(char *)(*piVar4 + 2) = (char)((uint)(piVar4[1] + -4) >> 8);\n  *(char *)(*piVar4 + 3) = (char)piVar4[1] + -4;\n  FUN_00029280(*piVar4,piVar4[1]);\n  if (*piVar4 != 0) {\n    FUN_0001dd30(*piVar4);\n  }\n  FUN_0001dd30(piVar4);\n  FUN_0001dd30(*param_1);\n  FUN_0001dd30(param_1);\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return puVar3;\n  }\n                    \n  FUN_0008eb20();\n}" type_identifier (pointer_declarator "* FUN_00031140(undefined4 *param_1)" * (function_declarator "FUN_00031140(undefined4 *param_1)" identifier (parameter_list "(undefined4 *param_1)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) )))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  void *__src;\n  size_t __n;\n  uint *puVar3;\n  int *piVar4;\n  int iVar5;\n  int iVar6;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar3 = (uint *)FUN_0002f5d0();\n  piVar4 = (int *)FUN_0002f910();\n  uVar2 = *puVar3;\n  iVar5 = piVar4[1];\n  piVar4[1] = iVar5 + 4;\n  if (piVar4[2] < iVar5 + 4) {\n    piVar4[2] = iVar5 + 0x104;\n    iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1);\n    *piVar4 = iVar6;\n    iVar5 = piVar4[1] + -4;\n  }\n  else {\n    iVar6 = *piVar4;\n  }\n  *(uint *)(iVar6 + iVar5) =\n       (uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |\n       uVar2 << 0x18;\n  iVar5 = piVar4[1];\n  piVar4[1] = iVar5 + 4;\n  if (piVar4[2] < iVar5 + 4) {\n    piVar4[2] = iVar5 + 0x104;\n    iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1);\n    *piVar4 = iVar6;\n    iVar5 = piVar4[1] + -4;\n  }\n  else {\n    iVar6 = *piVar4;\n  }\n  *(undefined4 *)(iVar6 + iVar5) = 0;\n  iVar6 = piVar4[1];\n  __src = (void *)*param_1;\n  __n = param_1[1];\n  piVar4[3] = iVar6;\n  iVar5 = iVar6 + __n;\n  piVar4[1] = iVar5;\n  if (piVar4[2] < iVar5) {\n    piVar4[2] = iVar5 + 0x100;\n    iVar5 = FUN_0001dc50(*piVar4,iVar5 + 0x100,1);\n    *piVar4 = iVar5;\n    iVar6 = piVar4[1] - __n;\n  }\n  else {\n    iVar5 = *piVar4;\n  }\n  memcpy((void *)(iVar5 + iVar6),__src,__n);\n  *(char *)(*piVar4 + -4 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 0x18);\n  *(char *)(*piVar4 + -3 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 0x10);\n  *(char *)(*piVar4 + -2 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 8);\n  *(char *)(*piVar4 + -1 + piVar4[3]) = (char)piVar4[1] - (char)piVar4[3];\n  *(char *)*piVar4 = (char)((uint)(piVar4[1] + -4) >> 0x18);\n  *(char *)(*piVar4 + 1) = (char)((uint)(piVar4[1] + -4) >> 0x10);\n  *(char *)(*piVar4 + 2) = (char)((uint)(piVar4[1] + -4) >> 8);\n  *(char *)(*piVar4 + 3) = (char)piVar4[1] + -4;\n  FUN_00029280(*piVar4,piVar4[1]);\n  if (*piVar4 != 0) {\n    FUN_0001dd30(*piVar4);\n  }\n  FUN_0001dd30(piVar4);\n  FUN_0001dd30(*param_1);\n  FUN_0001dd30(param_1);\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return puVar3;\n  }\n                    \n  FUN_0008eb20();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "void *__src;" primitive_type (pointer_declarator "*__src" * identifier) ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "uint *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "puVar3 = (uint *)FUN_0002f5d0();" (assignment_expression "puVar3 = (uint *)FUN_0002f5d0()" identifier = (cast_expression "(uint *)FUN_0002f5d0()" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0002f5d0()" identifier (argument_list "()" ( ))))) ;) (expression_statement "piVar4 = (int *)FUN_0002f910();" (assignment_expression "piVar4 = (int *)FUN_0002f910()" identifier = (cast_expression "(int *)FUN_0002f910()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0002f910()" identifier (argument_list "()" ( ))))) ;) (expression_statement "uVar2 = *puVar3;" (assignment_expression "uVar2 = *puVar3" identifier = (pointer_expression "*puVar3" * identifier)) ;) (expression_statement "iVar5 = piVar4[1];" (assignment_expression "iVar5 = piVar4[1]" identifier = (subscript_expression "piVar4[1]" identifier [ number_literal ])) ;) (expression_statement "piVar4[1] = iVar5 + 4;" (assignment_expression "piVar4[1] = iVar5 + 4" (subscript_expression "piVar4[1]" identifier [ number_literal ]) = (binary_expression "iVar5 + 4" identifier + number_literal)) ;) (if_statement "if (piVar4[2] < iVar5 + 4) {\n    piVar4[2] = iVar5 + 0x104;\n    iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1);\n    *piVar4 = iVar6;\n    iVar5 = piVar4[1] + -4;\n  }\n  else {\n    iVar6 = *piVar4;\n  }" if (parenthesized_expression "(piVar4[2] < iVar5 + 4)" ( (binary_expression "piVar4[2] < iVar5 + 4" (subscript_expression "piVar4[2]" identifier [ number_literal ]) < (binary_expression "iVar5 + 4" identifier + number_literal)) )) (compound_statement "{\n    piVar4[2] = iVar5 + 0x104;\n    iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1);\n    *piVar4 = iVar6;\n    iVar5 = piVar4[1] + -4;\n  }" { (expression_statement "piVar4[2] = iVar5 + 0x104;" (assignment_expression "piVar4[2] = iVar5 + 0x104" (subscript_expression "piVar4[2]" identifier [ number_literal ]) = (binary_expression "iVar5 + 0x104" identifier + number_literal)) ;) (expression_statement "iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1);" (assignment_expression "iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1)" identifier = (call_expression "FUN_0001dc50(*piVar4,iVar5 + 0x104,1)" identifier (argument_list "(*piVar4,iVar5 + 0x104,1)" ( (pointer_expression "*piVar4" * identifier) , (binary_expression "iVar5 + 0x104" identifier + number_literal) , number_literal )))) ;) (expression_statement "*piVar4 = iVar6;" (assignment_expression "*piVar4 = iVar6" (pointer_expression "*piVar4" * identifier) = identifier) ;) (expression_statement "iVar5 = piVar4[1] + -4;" (assignment_expression "iVar5 = piVar4[1] + -4" identifier = (binary_expression "piVar4[1] + -4" (subscript_expression "piVar4[1]" identifier [ number_literal ]) + number_literal)) ;) }) (else_clause "else {\n    iVar6 = *piVar4;\n  }" else (compound_statement "{\n    iVar6 = *piVar4;\n  }" { (expression_statement "iVar6 = *piVar4;" (assignment_expression "iVar6 = *piVar4" identifier = (pointer_expression "*piVar4" * identifier)) ;) }))) (expression_statement "*(uint *)(iVar6 + iVar5) =\n       (uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |\n       uVar2 << 0x18;" (assignment_expression "*(uint *)(iVar6 + iVar5) =\n       (uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |\n       uVar2 << 0x18" (pointer_expression "*(uint *)(iVar6 + iVar5)" * (cast_expression "(uint *)(iVar6 + iVar5)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + iVar5)" ( (binary_expression "iVar6 + iVar5" identifier + identifier) )))) = (binary_expression "(uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |\n       uVar2 << 0x18" (binary_expression "(uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18))" (binary_expression "(uVar2 >> 8 & 0xff) << 0x10" (parenthesized_expression "(uVar2 >> 8 & 0xff)" ( (binary_expression "uVar2 >> 8 & 0xff" (binary_expression "uVar2 >> 8" identifier >> number_literal) & number_literal) )) << number_literal) | (cast_expression "(uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18))" ( (type_descriptor "uint" type_identifier) ) (call_expression "CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18))" identifier (argument_list "((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18))" ( (cast_expression "(char)(uVar2 >> 0x10)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(uVar2 >> 0x10)" ( (binary_expression "uVar2 >> 0x10" identifier >> number_literal) ))) , (cast_expression "(char)(uVar2 >> 0x18)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(uVar2 >> 0x18)" ( (binary_expression "uVar2 >> 0x18" identifier >> number_literal) ))) ))))) | (binary_expression "uVar2 << 0x18" identifier << number_literal))) ;) (expression_statement "iVar5 = piVar4[1];" (assignment_expression "iVar5 = piVar4[1]" identifier = (subscript_expression "piVar4[1]" identifier [ number_literal ])) ;) (expression_statement "piVar4[1] = iVar5 + 4;" (assignment_expression "piVar4[1] = iVar5 + 4" (subscript_expression "piVar4[1]" identifier [ number_literal ]) = (binary_expression "iVar5 + 4" identifier + number_literal)) ;) (if_statement "if (piVar4[2] < iVar5 + 4) {\n    piVar4[2] = iVar5 + 0x104;\n    iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1);\n    *piVar4 = iVar6;\n    iVar5 = piVar4[1] + -4;\n  }\n  else {\n    iVar6 = *piVar4;\n  }" if (parenthesized_expression "(piVar4[2] < iVar5 + 4)" ( (binary_expression "piVar4[2] < iVar5 + 4" (subscript_expression "piVar4[2]" identifier [ number_literal ]) < (binary_expression "iVar5 + 4" identifier + number_literal)) )) (compound_statement "{\n    piVar4[2] = iVar5 + 0x104;\n    iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1);\n    *piVar4 = iVar6;\n    iVar5 = piVar4[1] + -4;\n  }" { (expression_statement "piVar4[2] = iVar5 + 0x104;" (assignment_expression "piVar4[2] = iVar5 + 0x104" (subscript_expression "piVar4[2]" identifier [ number_literal ]) = (binary_expression "iVar5 + 0x104" identifier + number_literal)) ;) (expression_statement "iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1);" (assignment_expression "iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1)" identifier = (call_expression "FUN_0001dc50(*piVar4,iVar5 + 0x104,1)" identifier (argument_list "(*piVar4,iVar5 + 0x104,1)" ( (pointer_expression "*piVar4" * identifier) , (binary_expression "iVar5 + 0x104" identifier + number_literal) , number_literal )))) ;) (expression_statement "*piVar4 = iVar6;" (assignment_expression "*piVar4 = iVar6" (pointer_expression "*piVar4" * identifier) = identifier) ;) (expression_statement "iVar5 = piVar4[1] + -4;" (assignment_expression "iVar5 = piVar4[1] + -4" identifier = (binary_expression "piVar4[1] + -4" (subscript_expression "piVar4[1]" identifier [ number_literal ]) + number_literal)) ;) }) (else_clause "else {\n    iVar6 = *piVar4;\n  }" else (compound_statement "{\n    iVar6 = *piVar4;\n  }" { (expression_statement "iVar6 = *piVar4;" (assignment_expression "iVar6 = *piVar4" identifier = (pointer_expression "*piVar4" * identifier)) ;) }))) (expression_statement "*(undefined4 *)(iVar6 + iVar5) = 0;" (assignment_expression "*(undefined4 *)(iVar6 + iVar5) = 0" (pointer_expression "*(undefined4 *)(iVar6 + iVar5)" * (cast_expression "(undefined4 *)(iVar6 + iVar5)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar6 + iVar5)" ( (binary_expression "iVar6 + iVar5" identifier + identifier) )))) = number_literal) ;) (expression_statement "iVar6 = piVar4[1];" (assignment_expression "iVar6 = piVar4[1]" identifier = (subscript_expression "piVar4[1]" identifier [ number_literal ])) ;) (expression_statement "__src = (void *)*param_1;" (assignment_expression "__src = (void *)*param_1" identifier = (cast_expression "(void *)*param_1" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (expression_statement "__n = param_1[1];" (assignment_expression "__n = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (expression_statement "piVar4[3] = iVar6;" (assignment_expression "piVar4[3] = iVar6" (subscript_expression "piVar4[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "iVar5 = iVar6 + __n;" (assignment_expression "iVar5 = iVar6 + __n" identifier = (binary_expression "iVar6 + __n" identifier + identifier)) ;) (expression_statement "piVar4[1] = iVar5;" (assignment_expression "piVar4[1] = iVar5" (subscript_expression "piVar4[1]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (piVar4[2] < iVar5) {\n    piVar4[2] = iVar5 + 0x100;\n    iVar5 = FUN_0001dc50(*piVar4,iVar5 + 0x100,1);\n    *piVar4 = iVar5;\n    iVar6 = piVar4[1] - __n;\n  }\n  else {\n    iVar5 = *piVar4;\n  }" if (parenthesized_expression "(piVar4[2] < iVar5)" ( (binary_expression "piVar4[2] < iVar5" (subscript_expression "piVar4[2]" identifier [ number_literal ]) < identifier) )) (compound_statement "{\n    piVar4[2] = iVar5 + 0x100;\n    iVar5 = FUN_0001dc50(*piVar4,iVar5 + 0x100,1);\n    *piVar4 = iVar5;\n    iVar6 = piVar4[1] - __n;\n  }" { (expression_statement "piVar4[2] = iVar5 + 0x100;" (assignment_expression "piVar4[2] = iVar5 + 0x100" (subscript_expression "piVar4[2]" identifier [ number_literal ]) = (binary_expression "iVar5 + 0x100" identifier + number_literal)) ;) (expression_statement "iVar5 = FUN_0001dc50(*piVar4,iVar5 + 0x100,1);" (assignment_expression "iVar5 = FUN_0001dc50(*piVar4,iVar5 + 0x100,1)" identifier = (call_expression "FUN_0001dc50(*piVar4,iVar5 + 0x100,1)" identifier (argument_list "(*piVar4,iVar5 + 0x100,1)" ( (pointer_expression "*piVar4" * identifier) , (binary_expression "iVar5 + 0x100" identifier + number_literal) , number_literal )))) ;) (expression_statement "*piVar4 = iVar5;" (assignment_expression "*piVar4 = iVar5" (pointer_expression "*piVar4" * identifier) = identifier) ;) (expression_statement "iVar6 = piVar4[1] - __n;" (assignment_expression "iVar6 = piVar4[1] - __n" identifier = (binary_expression "piVar4[1] - __n" (subscript_expression "piVar4[1]" identifier [ number_literal ]) - identifier)) ;) }) (else_clause "else {\n    iVar5 = *piVar4;\n  }" else (compound_statement "{\n    iVar5 = *piVar4;\n  }" { (expression_statement "iVar5 = *piVar4;" (assignment_expression "iVar5 = *piVar4" identifier = (pointer_expression "*piVar4" * identifier)) ;) }))) (expression_statement "memcpy((void *)(iVar5 + iVar6),__src,__n);" (call_expression "memcpy((void *)(iVar5 + iVar6),__src,__n)" identifier (argument_list "((void *)(iVar5 + iVar6),__src,__n)" ( (cast_expression "(void *)(iVar5 + iVar6)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + iVar6)" ( (binary_expression "iVar5 + iVar6" identifier + identifier) ))) , identifier , identifier ))) ;) (expression_statement "*(char *)(*piVar4 + -4 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 0x18);" (assignment_expression "*(char *)(*piVar4 + -4 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 0x18)" (pointer_expression "*(char *)(*piVar4 + -4 + piVar4[3])" * (cast_expression "(char *)(*piVar4 + -4 + piVar4[3])" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*piVar4 + -4 + piVar4[3])" ( (binary_expression "*piVar4 + -4 + piVar4[3]" (binary_expression "*piVar4 + -4" (pointer_expression "*piVar4" * identifier) + number_literal) + (subscript_expression "piVar4[3]" identifier [ number_literal ])) )))) = (cast_expression "(char)((uint)(piVar4[1] - piVar4[3]) >> 0x18)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)(piVar4[1] - piVar4[3]) >> 0x18)" ( (binary_expression "(uint)(piVar4[1] - piVar4[3]) >> 0x18" (call_expression "(uint)(piVar4[1] - piVar4[3])" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(piVar4[1] - piVar4[3])" ( (binary_expression "piVar4[1] - piVar4[3]" (subscript_expression "piVar4[1]" identifier [ number_literal ]) - (subscript_expression "piVar4[3]" identifier [ number_literal ])) ))) >> number_literal) )))) ;) (expression_statement "*(char *)(*piVar4 + -3 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 0x10);" (assignment_expression "*(char *)(*piVar4 + -3 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 0x10)" (pointer_expression "*(char *)(*piVar4 + -3 + piVar4[3])" * (cast_expression "(char *)(*piVar4 + -3 + piVar4[3])" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*piVar4 + -3 + piVar4[3])" ( (binary_expression "*piVar4 + -3 + piVar4[3]" (binary_expression "*piVar4 + -3" (pointer_expression "*piVar4" * identifier) + number_literal) + (subscript_expression "piVar4[3]" identifier [ number_literal ])) )))) = (cast_expression "(char)((uint)(piVar4[1] - piVar4[3]) >> 0x10)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)(piVar4[1] - piVar4[3]) >> 0x10)" ( (binary_expression "(uint)(piVar4[1] - piVar4[3]) >> 0x10" (call_expression "(uint)(piVar4[1] - piVar4[3])" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(piVar4[1] - piVar4[3])" ( (binary_expression "piVar4[1] - piVar4[3]" (subscript_expression "piVar4[1]" identifier [ number_literal ]) - (subscript_expression "piVar4[3]" identifier [ number_literal ])) ))) >> number_literal) )))) ;) (expression_statement "*(char *)(*piVar4 + -2 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 8);" (assignment_expression "*(char *)(*piVar4 + -2 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 8)" (pointer_expression "*(char *)(*piVar4 + -2 + piVar4[3])" * (cast_expression "(char *)(*piVar4 + -2 + piVar4[3])" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*piVar4 + -2 + piVar4[3])" ( (binary_expression "*piVar4 + -2 + piVar4[3]" (binary_expression "*piVar4 + -2" (pointer_expression "*piVar4" * identifier) + number_literal) + (subscript_expression "piVar4[3]" identifier [ number_literal ])) )))) = (cast_expression "(char)((uint)(piVar4[1] - piVar4[3]) >> 8)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)(piVar4[1] - piVar4[3]) >> 8)" ( (binary_expression "(uint)(piVar4[1] - piVar4[3]) >> 8" (call_expression "(uint)(piVar4[1] - piVar4[3])" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(piVar4[1] - piVar4[3])" ( (binary_expression "piVar4[1] - piVar4[3]" (subscript_expression "piVar4[1]" identifier [ number_literal ]) - (subscript_expression "piVar4[3]" identifier [ number_literal ])) ))) >> number_literal) )))) ;) (expression_statement "*(char *)(*piVar4 + -1 + piVar4[3]) = (char)piVar4[1] - (char)piVar4[3];" (assignment_expression "*(char *)(*piVar4 + -1 + piVar4[3]) = (char)piVar4[1] - (char)piVar4[3]" (pointer_expression "*(char *)(*piVar4 + -1 + piVar4[3])" * (cast_expression "(char *)(*piVar4 + -1 + piVar4[3])" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*piVar4 + -1 + piVar4[3])" ( (binary_expression "*piVar4 + -1 + piVar4[3]" (binary_expression "*piVar4 + -1" (pointer_expression "*piVar4" * identifier) + number_literal) + (subscript_expression "piVar4[3]" identifier [ number_literal ])) )))) = (binary_expression "(char)piVar4[1] - (char)piVar4[3]" (cast_expression "(char)piVar4[1]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "piVar4[1]" identifier [ number_literal ])) - (cast_expression "(char)piVar4[3]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "piVar4[3]" identifier [ number_literal ])))) ;) (expression_statement "*(char *)*piVar4 = (char)((uint)(piVar4[1] + -4) >> 0x18);" (assignment_expression "*(char *)*piVar4 = (char)((uint)(piVar4[1] + -4) >> 0x18)" (pointer_expression "*(char *)*piVar4" * (cast_expression "(char *)*piVar4" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar4" * identifier))) = (cast_expression "(char)((uint)(piVar4[1] + -4) >> 0x18)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)(piVar4[1] + -4) >> 0x18)" ( (binary_expression "(uint)(piVar4[1] + -4) >> 0x18" (call_expression "(uint)(piVar4[1] + -4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(piVar4[1] + -4)" ( (binary_expression "piVar4[1] + -4" (subscript_expression "piVar4[1]" identifier [ number_literal ]) + number_literal) ))) >> number_literal) )))) ;) (expression_statement "*(char *)(*piVar4 + 1) = (char)((uint)(piVar4[1] + -4) >> 0x10);" (assignment_expression "*(char *)(*piVar4 + 1) = (char)((uint)(piVar4[1] + -4) >> 0x10)" (pointer_expression "*(char *)(*piVar4 + 1)" * (cast_expression "(char *)(*piVar4 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*piVar4 + 1)" ( (binary_expression "*piVar4 + 1" (pointer_expression "*piVar4" * identifier) + number_literal) )))) = (cast_expression "(char)((uint)(piVar4[1] + -4) >> 0x10)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)(piVar4[1] + -4) >> 0x10)" ( (binary_expression "(uint)(piVar4[1] + -4) >> 0x10" (call_expression "(uint)(piVar4[1] + -4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(piVar4[1] + -4)" ( (binary_expression "piVar4[1] + -4" (subscript_expression "piVar4[1]" identifier [ number_literal ]) + number_literal) ))) >> number_literal) )))) ;) (expression_statement "*(char *)(*piVar4 + 2) = (char)((uint)(piVar4[1] + -4) >> 8);" (assignment_expression "*(char *)(*piVar4 + 2) = (char)((uint)(piVar4[1] + -4) >> 8)" (pointer_expression "*(char *)(*piVar4 + 2)" * (cast_expression "(char *)(*piVar4 + 2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*piVar4 + 2)" ( (binary_expression "*piVar4 + 2" (pointer_expression "*piVar4" * identifier) + number_literal) )))) = (cast_expression "(char)((uint)(piVar4[1] + -4) >> 8)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)(piVar4[1] + -4) >> 8)" ( (binary_expression "(uint)(piVar4[1] + -4) >> 8" (call_expression "(uint)(piVar4[1] + -4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(piVar4[1] + -4)" ( (binary_expression "piVar4[1] + -4" (subscript_expression "piVar4[1]" identifier [ number_literal ]) + number_literal) ))) >> number_literal) )))) ;) (expression_statement "*(char *)(*piVar4 + 3) = (char)piVar4[1] + -4;" (assignment_expression "*(char *)(*piVar4 + 3) = (char)piVar4[1] + -4" (pointer_expression "*(char *)(*piVar4 + 3)" * (cast_expression "(char *)(*piVar4 + 3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*piVar4 + 3)" ( (binary_expression "*piVar4 + 3" (pointer_expression "*piVar4" * identifier) + number_literal) )))) = (binary_expression "(char)piVar4[1] + -4" (cast_expression "(char)piVar4[1]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "piVar4[1]" identifier [ number_literal ])) + number_literal)) ;) (expression_statement "FUN_00029280(*piVar4,piVar4[1]);" (call_expression "FUN_00029280(*piVar4,piVar4[1])" identifier (argument_list "(*piVar4,piVar4[1])" ( (pointer_expression "*piVar4" * identifier) , (subscript_expression "piVar4[1]" identifier [ number_literal ]) ))) ;) (if_statement "if (*piVar4 != 0) {\n    FUN_0001dd30(*piVar4);\n  }" if (parenthesized_expression "(*piVar4 != 0)" ( (binary_expression "*piVar4 != 0" (pointer_expression "*piVar4" * identifier) != number_literal) )) (compound_statement "{\n    FUN_0001dd30(*piVar4);\n  }" { (expression_statement "FUN_0001dd30(*piVar4);" (call_expression "FUN_0001dd30(*piVar4)" identifier (argument_list "(*piVar4)" ( (pointer_expression "*piVar4" * identifier) ))) ;) })) (expression_statement "FUN_0001dd30(piVar4);" (call_expression "FUN_0001dd30(piVar4)" identifier (argument_list "(piVar4)" ( identifier ))) ;) (expression_statement "FUN_0001dd30(*param_1);" (call_expression "FUN_0001dd30(*param_1)" identifier (argument_list "(*param_1)" ( (pointer_expression "*param_1" * identifier) ))) ;) (expression_statement "FUN_0001dd30(param_1);" (call_expression "FUN_0001dd30(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return puVar3;\n  }" if (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return puVar3;\n  }" { (return_statement "return puVar3;" return identifier ;) })) (expression_statement "FUN_0008eb20();" (call_expression "FUN_0008eb20()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) )))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( ))))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) < (binary_expression IDENT + LIT)) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * IDENT) , (binary_expression IDENT + LIT) , LIT )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (subscript_expression IDENT [ LIT ]) + LIT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) }))) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) )))) = (binary_expression (binary_expression (binary_expression (parenthesized_expression ( (binary_expression (binary_expression IDENT >> LIT) & LIT) )) << LIT) | (cast_expression ( (type_descriptor TYPE) ) (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression IDENT >> LIT) ))) , (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression IDENT >> LIT) ))) ))))) | (binary_expression IDENT << LIT))) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) < (binary_expression IDENT + LIT)) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * IDENT) , (binary_expression IDENT + LIT) , LIT )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (subscript_expression IDENT [ LIT ]) + LIT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) }))) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) )))) = LIT) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) < IDENT) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * IDENT) , (binary_expression IDENT + LIT) , LIT )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (subscript_expression IDENT [ LIT ]) - IDENT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) }))) (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) ))) , IDENT , IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (pointer_expression * IDENT) + LIT) + (subscript_expression IDENT [ LIT ])) )))) = (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (subscript_expression IDENT [ LIT ]) - (subscript_expression IDENT [ LIT ])) ))) >> LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (pointer_expression * IDENT) + LIT) + (subscript_expression IDENT [ LIT ])) )))) = (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (subscript_expression IDENT [ LIT ]) - (subscript_expression IDENT [ LIT ])) ))) >> LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (pointer_expression * IDENT) + LIT) + (subscript_expression IDENT [ LIT ])) )))) = (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (subscript_expression IDENT [ LIT ]) - (subscript_expression IDENT [ LIT ])) ))) >> LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (pointer_expression * IDENT) + LIT) + (subscript_expression IDENT [ LIT ])) )))) = (binary_expression (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])) - (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) = (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) ))) >> LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) = (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) ))) >> LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) = (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) ))) >> LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) = (binary_expression (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])) + LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * IDENT) , (subscript_expression IDENT [ LIT ]) ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * IDENT) ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * IDENT) ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "uint * FUN_00031140(undefined4 *param_1)\n\n{\n  int iVar1;\n  uint uVar2;\n  void *__src;\n  size_t __n;\n  uint *puVar3;\n  int *piVar4;\n  int iVar5;\n  int iVar6;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar3 = (uint *)FUN_0002f5d0();\n  piVar4 = (int *)FUN_0002f910();\n  uVar2 = *puVar3;\n  iVar5 = piVar4[1];\n  piVar4[1] = iVar5 + 4;\n  if (piVar4[2] < iVar5 + 4) {\n    piVar4[2] = iVar5 + 0x104;\n    iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1);\n    *piVar4 = iVar6;\n    iVar5 = piVar4[1] + -4;\n  }\n  else {\n    iVar6 = *piVar4;\n  }\n  *(uint *)(iVar6 + iVar5) =\n       (uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |\n       uVar2 << 0x18;\n  iVar5 = piVar4[1];\n  piVar4[1] = iVar5 + 4;\n  if (piVar4[2] < iVar5 + 4) {\n    piVar4[2] = iVar5 + 0x104;\n    iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1);\n    *piVar4 = iVar6;\n    iVar5 = piVar4[1] + -4;\n  }\n  else {\n    iVar6 = *piVar4;\n  }\n  *(undefined4 *)(iVar6 + iVar5) = 0;\n  iVar6 = piVar4[1];\n  __src = (void *)*param_1;\n  __n = param_1[1];\n  piVar4[3] = iVar6;\n  iVar5 = iVar6 + __n;\n  piVar4[1] = iVar5;\n  if (piVar4[2] < iVar5) {\n    piVar4[2] = iVar5 + 0x100;\n    iVar5 = FUN_0001dc50(*piVar4,iVar5 + 0x100,1);\n    *piVar4 = iVar5;\n    iVar6 = piVar4[1] - __n;\n  }\n  else {\n    iVar5 = *piVar4;\n  }\n  memcpy((void *)(iVar5 + iVar6),__src,__n);\n  *(char *)(*piVar4 + -4 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 0x18);\n  *(char *)(*piVar4 + -3 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 0x10);\n  *(char *)(*piVar4 + -2 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 8);\n  *(char *)(*piVar4 + -1 + piVar4[3]) = (char)piVar4[1] - (char)piVar4[3];\n  *(char *)*piVar4 = (char)((uint)(piVar4[1] + -4) >> 0x18);\n  *(char *)(*piVar4 + 1) = (char)((uint)(piVar4[1] + -4) >> 0x10);\n  *(char *)(*piVar4 + 2) = (char)((uint)(piVar4[1] + -4) >> 8);\n  *(char *)(*piVar4 + 3) = (char)piVar4[1] + -4;\n  FUN_00029280(*piVar4,piVar4[1]);\n  if (*piVar4 != 0) {\n    FUN_0001dd30(*piVar4);\n  }\n  FUN_0001dd30(piVar4);\n  FUN_0001dd30(*param_1);\n  FUN_0001dd30(param_1);\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return puVar3;\n  }\n                    \n  FUN_0008eb20();\n}" (type_identifier "uint") (pointer_declarator "* FUN_00031140(undefined4 *param_1)" (* "*") (function_declarator "FUN_00031140(undefined4 *param_1)" (identifier "FUN_00031140") (parameter_list "(undefined4 *param_1)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")")))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  void *__src;\n  size_t __n;\n  uint *puVar3;\n  int *piVar4;\n  int iVar5;\n  int iVar6;\n  int in_GS_OFFSET;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar3 = (uint *)FUN_0002f5d0();\n  piVar4 = (int *)FUN_0002f910();\n  uVar2 = *puVar3;\n  iVar5 = piVar4[1];\n  piVar4[1] = iVar5 + 4;\n  if (piVar4[2] < iVar5 + 4) {\n    piVar4[2] = iVar5 + 0x104;\n    iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1);\n    *piVar4 = iVar6;\n    iVar5 = piVar4[1] + -4;\n  }\n  else {\n    iVar6 = *piVar4;\n  }\n  *(uint *)(iVar6 + iVar5) =\n       (uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |\n       uVar2 << 0x18;\n  iVar5 = piVar4[1];\n  piVar4[1] = iVar5 + 4;\n  if (piVar4[2] < iVar5 + 4) {\n    piVar4[2] = iVar5 + 0x104;\n    iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1);\n    *piVar4 = iVar6;\n    iVar5 = piVar4[1] + -4;\n  }\n  else {\n    iVar6 = *piVar4;\n  }\n  *(undefined4 *)(iVar6 + iVar5) = 0;\n  iVar6 = piVar4[1];\n  __src = (void *)*param_1;\n  __n = param_1[1];\n  piVar4[3] = iVar6;\n  iVar5 = iVar6 + __n;\n  piVar4[1] = iVar5;\n  if (piVar4[2] < iVar5) {\n    piVar4[2] = iVar5 + 0x100;\n    iVar5 = FUN_0001dc50(*piVar4,iVar5 + 0x100,1);\n    *piVar4 = iVar5;\n    iVar6 = piVar4[1] - __n;\n  }\n  else {\n    iVar5 = *piVar4;\n  }\n  memcpy((void *)(iVar5 + iVar6),__src,__n);\n  *(char *)(*piVar4 + -4 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 0x18);\n  *(char *)(*piVar4 + -3 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 0x10);\n  *(char *)(*piVar4 + -2 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 8);\n  *(char *)(*piVar4 + -1 + piVar4[3]) = (char)piVar4[1] - (char)piVar4[3];\n  *(char *)*piVar4 = (char)((uint)(piVar4[1] + -4) >> 0x18);\n  *(char *)(*piVar4 + 1) = (char)((uint)(piVar4[1] + -4) >> 0x10);\n  *(char *)(*piVar4 + 2) = (char)((uint)(piVar4[1] + -4) >> 8);\n  *(char *)(*piVar4 + 3) = (char)piVar4[1] + -4;\n  FUN_00029280(*piVar4,piVar4[1]);\n  if (*piVar4 != 0) {\n    FUN_0001dd30(*piVar4);\n  }\n  FUN_0001dd30(piVar4);\n  FUN_0001dd30(*param_1);\n  FUN_0001dd30(param_1);\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return puVar3;\n  }\n                    \n  FUN_0008eb20();\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "void *__src;" (primitive_type "void") (pointer_declarator "*__src" (* "*") (identifier "__src")) (; ";")) (declaration "size_t __n;" (primitive_type "size_t") (identifier "__n") (; ";")) (declaration "uint *puVar3;" (type_identifier "uint") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "int *piVar4;" (primitive_type "int") (pointer_declarator "*piVar4" (* "*") (identifier "piVar4")) (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "iVar1") (= "=") (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 "puVar3 = (uint *)FUN_0002f5d0();" (assignment_expression "puVar3 = (uint *)FUN_0002f5d0()" (identifier "puVar3") (= "=") (cast_expression "(uint *)FUN_0002f5d0()" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0002f5d0()" (identifier "FUN_0002f5d0") (argument_list "()" (( "(") () ")"))))) (; ";")) (expression_statement "piVar4 = (int *)FUN_0002f910();" (assignment_expression "piVar4 = (int *)FUN_0002f910()" (identifier "piVar4") (= "=") (cast_expression "(int *)FUN_0002f910()" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0002f910()" (identifier "FUN_0002f910") (argument_list "()" (( "(") () ")"))))) (; ";")) (expression_statement "uVar2 = *puVar3;" (assignment_expression "uVar2 = *puVar3" (identifier "uVar2") (= "=") (pointer_expression "*puVar3" (* "*") (identifier "puVar3"))) (; ";")) (expression_statement "iVar5 = piVar4[1];" (assignment_expression "iVar5 = piVar4[1]" (identifier "iVar5") (= "=") (subscript_expression "piVar4[1]" (identifier "piVar4") ([ "[") (number_literal "1") (] "]"))) (; ";")) (expression_statement "piVar4[1] = iVar5 + 4;" (assignment_expression "piVar4[1] = iVar5 + 4" (subscript_expression "piVar4[1]" (identifier "piVar4") ([ "[") (number_literal "1") (] "]")) (= "=") (binary_expression "iVar5 + 4" (identifier "iVar5") (+ "+") (number_literal "4"))) (; ";")) (if_statement "if (piVar4[2] < iVar5 + 4) {\n    piVar4[2] = iVar5 + 0x104;\n    iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1);\n    *piVar4 = iVar6;\n    iVar5 = piVar4[1] + -4;\n  }\n  else {\n    iVar6 = *piVar4;\n  }" (if "if") (parenthesized_expression "(piVar4[2] < iVar5 + 4)" (( "(") (binary_expression "piVar4[2] < iVar5 + 4" (subscript_expression "piVar4[2]" (identifier "piVar4") ([ "[") (number_literal "2") (] "]")) (< "<") (binary_expression "iVar5 + 4" (identifier "iVar5") (+ "+") (number_literal "4"))) () ")")) (compound_statement "{\n    piVar4[2] = iVar5 + 0x104;\n    iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1);\n    *piVar4 = iVar6;\n    iVar5 = piVar4[1] + -4;\n  }" ({ "{") (expression_statement "piVar4[2] = iVar5 + 0x104;" (assignment_expression "piVar4[2] = iVar5 + 0x104" (subscript_expression "piVar4[2]" (identifier "piVar4") ([ "[") (number_literal "2") (] "]")) (= "=") (binary_expression "iVar5 + 0x104" (identifier "iVar5") (+ "+") (number_literal "0x104"))) (; ";")) (expression_statement "iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1);" (assignment_expression "iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1)" (identifier "iVar6") (= "=") (call_expression "FUN_0001dc50(*piVar4,iVar5 + 0x104,1)" (identifier "FUN_0001dc50") (argument_list "(*piVar4,iVar5 + 0x104,1)" (( "(") (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (, ",") (binary_expression "iVar5 + 0x104" (identifier "iVar5") (+ "+") (number_literal "0x104")) (, ",") (number_literal "1") () ")")))) (; ";")) (expression_statement "*piVar4 = iVar6;" (assignment_expression "*piVar4 = iVar6" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (= "=") (identifier "iVar6")) (; ";")) (expression_statement "iVar5 = piVar4[1] + -4;" (assignment_expression "iVar5 = piVar4[1] + -4" (identifier "iVar5") (= "=") (binary_expression "piVar4[1] + -4" (subscript_expression "piVar4[1]" (identifier "piVar4") ([ "[") (number_literal "1") (] "]")) (+ "+") (number_literal "-4"))) (; ";")) (} "}")) (else_clause "else {\n    iVar6 = *piVar4;\n  }" (else "else") (compound_statement "{\n    iVar6 = *piVar4;\n  }" ({ "{") (expression_statement "iVar6 = *piVar4;" (assignment_expression "iVar6 = *piVar4" (identifier "iVar6") (= "=") (pointer_expression "*piVar4" (* "*") (identifier "piVar4"))) (; ";")) (} "}")))) (expression_statement "*(uint *)(iVar6 + iVar5) =\n       (uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |\n       uVar2 << 0x18;" (assignment_expression "*(uint *)(iVar6 + iVar5) =\n       (uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |\n       uVar2 << 0x18" (pointer_expression "*(uint *)(iVar6 + iVar5)" (* "*") (cast_expression "(uint *)(iVar6 + iVar5)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar6 + iVar5)" (( "(") (binary_expression "iVar6 + iVar5" (identifier "iVar6") (+ "+") (identifier "iVar5")) () ")")))) (= "=") (binary_expression "(uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |\n       uVar2 << 0x18" (binary_expression "(uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18))" (binary_expression "(uVar2 >> 8 & 0xff) << 0x10" (parenthesized_expression "(uVar2 >> 8 & 0xff)" (( "(") (binary_expression "uVar2 >> 8 & 0xff" (binary_expression "uVar2 >> 8" (identifier "uVar2") (>> ">>") (number_literal "8")) (& "&") (number_literal "0xff")) () ")")) (<< "<<") (number_literal "0x10")) (| "|") (cast_expression "(uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18))" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (call_expression "CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18))" (identifier "CONCAT11") (argument_list "((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18))" (( "(") (cast_expression "(char)(uVar2 >> 0x10)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (parenthesized_expression "(uVar2 >> 0x10)" (( "(") (binary_expression "uVar2 >> 0x10" (identifier "uVar2") (>> ">>") (number_literal "0x10")) () ")"))) (, ",") (cast_expression "(char)(uVar2 >> 0x18)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (parenthesized_expression "(uVar2 >> 0x18)" (( "(") (binary_expression "uVar2 >> 0x18" (identifier "uVar2") (>> ">>") (number_literal "0x18")) () ")"))) () ")"))))) (| "|") (binary_expression "uVar2 << 0x18" (identifier "uVar2") (<< "<<") (number_literal "0x18")))) (; ";")) (expression_statement "iVar5 = piVar4[1];" (assignment_expression "iVar5 = piVar4[1]" (identifier "iVar5") (= "=") (subscript_expression "piVar4[1]" (identifier "piVar4") ([ "[") (number_literal "1") (] "]"))) (; ";")) (expression_statement "piVar4[1] = iVar5 + 4;" (assignment_expression "piVar4[1] = iVar5 + 4" (subscript_expression "piVar4[1]" (identifier "piVar4") ([ "[") (number_literal "1") (] "]")) (= "=") (binary_expression "iVar5 + 4" (identifier "iVar5") (+ "+") (number_literal "4"))) (; ";")) (if_statement "if (piVar4[2] < iVar5 + 4) {\n    piVar4[2] = iVar5 + 0x104;\n    iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1);\n    *piVar4 = iVar6;\n    iVar5 = piVar4[1] + -4;\n  }\n  else {\n    iVar6 = *piVar4;\n  }" (if "if") (parenthesized_expression "(piVar4[2] < iVar5 + 4)" (( "(") (binary_expression "piVar4[2] < iVar5 + 4" (subscript_expression "piVar4[2]" (identifier "piVar4") ([ "[") (number_literal "2") (] "]")) (< "<") (binary_expression "iVar5 + 4" (identifier "iVar5") (+ "+") (number_literal "4"))) () ")")) (compound_statement "{\n    piVar4[2] = iVar5 + 0x104;\n    iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1);\n    *piVar4 = iVar6;\n    iVar5 = piVar4[1] + -4;\n  }" ({ "{") (expression_statement "piVar4[2] = iVar5 + 0x104;" (assignment_expression "piVar4[2] = iVar5 + 0x104" (subscript_expression "piVar4[2]" (identifier "piVar4") ([ "[") (number_literal "2") (] "]")) (= "=") (binary_expression "iVar5 + 0x104" (identifier "iVar5") (+ "+") (number_literal "0x104"))) (; ";")) (expression_statement "iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1);" (assignment_expression "iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1)" (identifier "iVar6") (= "=") (call_expression "FUN_0001dc50(*piVar4,iVar5 + 0x104,1)" (identifier "FUN_0001dc50") (argument_list "(*piVar4,iVar5 + 0x104,1)" (( "(") (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (, ",") (binary_expression "iVar5 + 0x104" (identifier "iVar5") (+ "+") (number_literal "0x104")) (, ",") (number_literal "1") () ")")))) (; ";")) (expression_statement "*piVar4 = iVar6;" (assignment_expression "*piVar4 = iVar6" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (= "=") (identifier "iVar6")) (; ";")) (expression_statement "iVar5 = piVar4[1] + -4;" (assignment_expression "iVar5 = piVar4[1] + -4" (identifier "iVar5") (= "=") (binary_expression "piVar4[1] + -4" (subscript_expression "piVar4[1]" (identifier "piVar4") ([ "[") (number_literal "1") (] "]")) (+ "+") (number_literal "-4"))) (; ";")) (} "}")) (else_clause "else {\n    iVar6 = *piVar4;\n  }" (else "else") (compound_statement "{\n    iVar6 = *piVar4;\n  }" ({ "{") (expression_statement "iVar6 = *piVar4;" (assignment_expression "iVar6 = *piVar4" (identifier "iVar6") (= "=") (pointer_expression "*piVar4" (* "*") (identifier "piVar4"))) (; ";")) (} "}")))) (expression_statement "*(undefined4 *)(iVar6 + iVar5) = 0;" (assignment_expression "*(undefined4 *)(iVar6 + iVar5) = 0" (pointer_expression "*(undefined4 *)(iVar6 + iVar5)" (* "*") (cast_expression "(undefined4 *)(iVar6 + iVar5)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar6 + iVar5)" (( "(") (binary_expression "iVar6 + iVar5" (identifier "iVar6") (+ "+") (identifier "iVar5")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar6 = piVar4[1];" (assignment_expression "iVar6 = piVar4[1]" (identifier "iVar6") (= "=") (subscript_expression "piVar4[1]" (identifier "piVar4") ([ "[") (number_literal "1") (] "]"))) (; ";")) (expression_statement "__src = (void *)*param_1;" (assignment_expression "__src = (void *)*param_1" (identifier "__src") (= "=") (cast_expression "(void *)*param_1" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (expression_statement "__n = param_1[1];" (assignment_expression "__n = param_1[1]" (identifier "__n") (= "=") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) (; ";")) (expression_statement "piVar4[3] = iVar6;" (assignment_expression "piVar4[3] = iVar6" (subscript_expression "piVar4[3]" (identifier "piVar4") ([ "[") (number_literal "3") (] "]")) (= "=") (identifier "iVar6")) (; ";")) (expression_statement "iVar5 = iVar6 + __n;" (assignment_expression "iVar5 = iVar6 + __n" (identifier "iVar5") (= "=") (binary_expression "iVar6 + __n" (identifier "iVar6") (+ "+") (identifier "__n"))) (; ";")) (expression_statement "piVar4[1] = iVar5;" (assignment_expression "piVar4[1] = iVar5" (subscript_expression "piVar4[1]" (identifier "piVar4") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "iVar5")) (; ";")) (if_statement "if (piVar4[2] < iVar5) {\n    piVar4[2] = iVar5 + 0x100;\n    iVar5 = FUN_0001dc50(*piVar4,iVar5 + 0x100,1);\n    *piVar4 = iVar5;\n    iVar6 = piVar4[1] - __n;\n  }\n  else {\n    iVar5 = *piVar4;\n  }" (if "if") (parenthesized_expression "(piVar4[2] < iVar5)" (( "(") (binary_expression "piVar4[2] < iVar5" (subscript_expression "piVar4[2]" (identifier "piVar4") ([ "[") (number_literal "2") (] "]")) (< "<") (identifier "iVar5")) () ")")) (compound_statement "{\n    piVar4[2] = iVar5 + 0x100;\n    iVar5 = FUN_0001dc50(*piVar4,iVar5 + 0x100,1);\n    *piVar4 = iVar5;\n    iVar6 = piVar4[1] - __n;\n  }" ({ "{") (expression_statement "piVar4[2] = iVar5 + 0x100;" (assignment_expression "piVar4[2] = iVar5 + 0x100" (subscript_expression "piVar4[2]" (identifier "piVar4") ([ "[") (number_literal "2") (] "]")) (= "=") (binary_expression "iVar5 + 0x100" (identifier "iVar5") (+ "+") (number_literal "0x100"))) (; ";")) (expression_statement "iVar5 = FUN_0001dc50(*piVar4,iVar5 + 0x100,1);" (assignment_expression "iVar5 = FUN_0001dc50(*piVar4,iVar5 + 0x100,1)" (identifier "iVar5") (= "=") (call_expression "FUN_0001dc50(*piVar4,iVar5 + 0x100,1)" (identifier "FUN_0001dc50") (argument_list "(*piVar4,iVar5 + 0x100,1)" (( "(") (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (, ",") (binary_expression "iVar5 + 0x100" (identifier "iVar5") (+ "+") (number_literal "0x100")) (, ",") (number_literal "1") () ")")))) (; ";")) (expression_statement "*piVar4 = iVar5;" (assignment_expression "*piVar4 = iVar5" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (= "=") (identifier "iVar5")) (; ";")) (expression_statement "iVar6 = piVar4[1] - __n;" (assignment_expression "iVar6 = piVar4[1] - __n" (identifier "iVar6") (= "=") (binary_expression "piVar4[1] - __n" (subscript_expression "piVar4[1]" (identifier "piVar4") ([ "[") (number_literal "1") (] "]")) (- "-") (identifier "__n"))) (; ";")) (} "}")) (else_clause "else {\n    iVar5 = *piVar4;\n  }" (else "else") (compound_statement "{\n    iVar5 = *piVar4;\n  }" ({ "{") (expression_statement "iVar5 = *piVar4;" (assignment_expression "iVar5 = *piVar4" (identifier "iVar5") (= "=") (pointer_expression "*piVar4" (* "*") (identifier "piVar4"))) (; ";")) (} "}")))) (expression_statement "memcpy((void *)(iVar5 + iVar6),__src,__n);" (call_expression "memcpy((void *)(iVar5 + iVar6),__src,__n)" (identifier "memcpy") (argument_list "((void *)(iVar5 + iVar6),__src,__n)" (( "(") (cast_expression "(void *)(iVar5 + iVar6)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + iVar6)" (( "(") (binary_expression "iVar5 + iVar6" (identifier "iVar5") (+ "+") (identifier "iVar6")) () ")"))) (, ",") (identifier "__src") (, ",") (identifier "__n") () ")"))) (; ";")) (expression_statement "*(char *)(*piVar4 + -4 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 0x18);" (assignment_expression "*(char *)(*piVar4 + -4 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 0x18)" (pointer_expression "*(char *)(*piVar4 + -4 + piVar4[3])" (* "*") (cast_expression "(char *)(*piVar4 + -4 + piVar4[3])" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*piVar4 + -4 + piVar4[3])" (( "(") (binary_expression "*piVar4 + -4 + piVar4[3]" (binary_expression "*piVar4 + -4" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (+ "+") (number_literal "-4")) (+ "+") (subscript_expression "piVar4[3]" (identifier "piVar4") ([ "[") (number_literal "3") (] "]"))) () ")")))) (= "=") (cast_expression "(char)((uint)(piVar4[1] - piVar4[3]) >> 0x18)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (parenthesized_expression "((uint)(piVar4[1] - piVar4[3]) >> 0x18)" (( "(") (binary_expression "(uint)(piVar4[1] - piVar4[3]) >> 0x18" (call_expression "(uint)(piVar4[1] - piVar4[3])" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(piVar4[1] - piVar4[3])" (( "(") (binary_expression "piVar4[1] - piVar4[3]" (subscript_expression "piVar4[1]" (identifier "piVar4") ([ "[") (number_literal "1") (] "]")) (- "-") (subscript_expression "piVar4[3]" (identifier "piVar4") ([ "[") (number_literal "3") (] "]"))) () ")"))) (>> ">>") (number_literal "0x18")) () ")")))) (; ";")) (expression_statement "*(char *)(*piVar4 + -3 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 0x10);" (assignment_expression "*(char *)(*piVar4 + -3 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 0x10)" (pointer_expression "*(char *)(*piVar4 + -3 + piVar4[3])" (* "*") (cast_expression "(char *)(*piVar4 + -3 + piVar4[3])" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*piVar4 + -3 + piVar4[3])" (( "(") (binary_expression "*piVar4 + -3 + piVar4[3]" (binary_expression "*piVar4 + -3" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (+ "+") (number_literal "-3")) (+ "+") (subscript_expression "piVar4[3]" (identifier "piVar4") ([ "[") (number_literal "3") (] "]"))) () ")")))) (= "=") (cast_expression "(char)((uint)(piVar4[1] - piVar4[3]) >> 0x10)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (parenthesized_expression "((uint)(piVar4[1] - piVar4[3]) >> 0x10)" (( "(") (binary_expression "(uint)(piVar4[1] - piVar4[3]) >> 0x10" (call_expression "(uint)(piVar4[1] - piVar4[3])" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(piVar4[1] - piVar4[3])" (( "(") (binary_expression "piVar4[1] - piVar4[3]" (subscript_expression "piVar4[1]" (identifier "piVar4") ([ "[") (number_literal "1") (] "]")) (- "-") (subscript_expression "piVar4[3]" (identifier "piVar4") ([ "[") (number_literal "3") (] "]"))) () ")"))) (>> ">>") (number_literal "0x10")) () ")")))) (; ";")) (expression_statement "*(char *)(*piVar4 + -2 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 8);" (assignment_expression "*(char *)(*piVar4 + -2 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 8)" (pointer_expression "*(char *)(*piVar4 + -2 + piVar4[3])" (* "*") (cast_expression "(char *)(*piVar4 + -2 + piVar4[3])" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*piVar4 + -2 + piVar4[3])" (( "(") (binary_expression "*piVar4 + -2 + piVar4[3]" (binary_expression "*piVar4 + -2" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (+ "+") (number_literal "-2")) (+ "+") (subscript_expression "piVar4[3]" (identifier "piVar4") ([ "[") (number_literal "3") (] "]"))) () ")")))) (= "=") (cast_expression "(char)((uint)(piVar4[1] - piVar4[3]) >> 8)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (parenthesized_expression "((uint)(piVar4[1] - piVar4[3]) >> 8)" (( "(") (binary_expression "(uint)(piVar4[1] - piVar4[3]) >> 8" (call_expression "(uint)(piVar4[1] - piVar4[3])" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(piVar4[1] - piVar4[3])" (( "(") (binary_expression "piVar4[1] - piVar4[3]" (subscript_expression "piVar4[1]" (identifier "piVar4") ([ "[") (number_literal "1") (] "]")) (- "-") (subscript_expression "piVar4[3]" (identifier "piVar4") ([ "[") (number_literal "3") (] "]"))) () ")"))) (>> ">>") (number_literal "8")) () ")")))) (; ";")) (expression_statement "*(char *)(*piVar4 + -1 + piVar4[3]) = (char)piVar4[1] - (char)piVar4[3];" (assignment_expression "*(char *)(*piVar4 + -1 + piVar4[3]) = (char)piVar4[1] - (char)piVar4[3]" (pointer_expression "*(char *)(*piVar4 + -1 + piVar4[3])" (* "*") (cast_expression "(char *)(*piVar4 + -1 + piVar4[3])" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*piVar4 + -1 + piVar4[3])" (( "(") (binary_expression "*piVar4 + -1 + piVar4[3]" (binary_expression "*piVar4 + -1" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (+ "+") (number_literal "-1")) (+ "+") (subscript_expression "piVar4[3]" (identifier "piVar4") ([ "[") (number_literal "3") (] "]"))) () ")")))) (= "=") (binary_expression "(char)piVar4[1] - (char)piVar4[3]" (cast_expression "(char)piVar4[1]" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (subscript_expression "piVar4[1]" (identifier "piVar4") ([ "[") (number_literal "1") (] "]"))) (- "-") (cast_expression "(char)piVar4[3]" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (subscript_expression "piVar4[3]" (identifier "piVar4") ([ "[") (number_literal "3") (] "]"))))) (; ";")) (expression_statement "*(char *)*piVar4 = (char)((uint)(piVar4[1] + -4) >> 0x18);" (assignment_expression "*(char *)*piVar4 = (char)((uint)(piVar4[1] + -4) >> 0x18)" (pointer_expression "*(char *)*piVar4" (* "*") (cast_expression "(char *)*piVar4" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*piVar4" (* "*") (identifier "piVar4")))) (= "=") (cast_expression "(char)((uint)(piVar4[1] + -4) >> 0x18)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (parenthesized_expression "((uint)(piVar4[1] + -4) >> 0x18)" (( "(") (binary_expression "(uint)(piVar4[1] + -4) >> 0x18" (call_expression "(uint)(piVar4[1] + -4)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(piVar4[1] + -4)" (( "(") (binary_expression "piVar4[1] + -4" (subscript_expression "piVar4[1]" (identifier "piVar4") ([ "[") (number_literal "1") (] "]")) (+ "+") (number_literal "-4")) () ")"))) (>> ">>") (number_literal "0x18")) () ")")))) (; ";")) (expression_statement "*(char *)(*piVar4 + 1) = (char)((uint)(piVar4[1] + -4) >> 0x10);" (assignment_expression "*(char *)(*piVar4 + 1) = (char)((uint)(piVar4[1] + -4) >> 0x10)" (pointer_expression "*(char *)(*piVar4 + 1)" (* "*") (cast_expression "(char *)(*piVar4 + 1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*piVar4 + 1)" (( "(") (binary_expression "*piVar4 + 1" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (+ "+") (number_literal "1")) () ")")))) (= "=") (cast_expression "(char)((uint)(piVar4[1] + -4) >> 0x10)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (parenthesized_expression "((uint)(piVar4[1] + -4) >> 0x10)" (( "(") (binary_expression "(uint)(piVar4[1] + -4) >> 0x10" (call_expression "(uint)(piVar4[1] + -4)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(piVar4[1] + -4)" (( "(") (binary_expression "piVar4[1] + -4" (subscript_expression "piVar4[1]" (identifier "piVar4") ([ "[") (number_literal "1") (] "]")) (+ "+") (number_literal "-4")) () ")"))) (>> ">>") (number_literal "0x10")) () ")")))) (; ";")) (expression_statement "*(char *)(*piVar4 + 2) = (char)((uint)(piVar4[1] + -4) >> 8);" (assignment_expression "*(char *)(*piVar4 + 2) = (char)((uint)(piVar4[1] + -4) >> 8)" (pointer_expression "*(char *)(*piVar4 + 2)" (* "*") (cast_expression "(char *)(*piVar4 + 2)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*piVar4 + 2)" (( "(") (binary_expression "*piVar4 + 2" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (+ "+") (number_literal "2")) () ")")))) (= "=") (cast_expression "(char)((uint)(piVar4[1] + -4) >> 8)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (parenthesized_expression "((uint)(piVar4[1] + -4) >> 8)" (( "(") (binary_expression "(uint)(piVar4[1] + -4) >> 8" (call_expression "(uint)(piVar4[1] + -4)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(piVar4[1] + -4)" (( "(") (binary_expression "piVar4[1] + -4" (subscript_expression "piVar4[1]" (identifier "piVar4") ([ "[") (number_literal "1") (] "]")) (+ "+") (number_literal "-4")) () ")"))) (>> ">>") (number_literal "8")) () ")")))) (; ";")) (expression_statement "*(char *)(*piVar4 + 3) = (char)piVar4[1] + -4;" (assignment_expression "*(char *)(*piVar4 + 3) = (char)piVar4[1] + -4" (pointer_expression "*(char *)(*piVar4 + 3)" (* "*") (cast_expression "(char *)(*piVar4 + 3)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*piVar4 + 3)" (( "(") (binary_expression "*piVar4 + 3" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (+ "+") (number_literal "3")) () ")")))) (= "=") (binary_expression "(char)piVar4[1] + -4" (cast_expression "(char)piVar4[1]" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (subscript_expression "piVar4[1]" (identifier "piVar4") ([ "[") (number_literal "1") (] "]"))) (+ "+") (number_literal "-4"))) (; ";")) (expression_statement "FUN_00029280(*piVar4,piVar4[1]);" (call_expression "FUN_00029280(*piVar4,piVar4[1])" (identifier "FUN_00029280") (argument_list "(*piVar4,piVar4[1])" (( "(") (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (, ",") (subscript_expression "piVar4[1]" (identifier "piVar4") ([ "[") (number_literal "1") (] "]")) () ")"))) (; ";")) (if_statement "if (*piVar4 != 0) {\n    FUN_0001dd30(*piVar4);\n  }" (if "if") (parenthesized_expression "(*piVar4 != 0)" (( "(") (binary_expression "*piVar4 != 0" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    FUN_0001dd30(*piVar4);\n  }" ({ "{") (expression_statement "FUN_0001dd30(*piVar4);" (call_expression "FUN_0001dd30(*piVar4)" (identifier "FUN_0001dd30") (argument_list "(*piVar4)" (( "(") (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) () ")"))) (; ";")) (} "}"))) (expression_statement "FUN_0001dd30(piVar4);" (call_expression "FUN_0001dd30(piVar4)" (identifier "FUN_0001dd30") (argument_list "(piVar4)" (( "(") (identifier "piVar4") () ")"))) (; ";")) (expression_statement "FUN_0001dd30(*param_1);" (call_expression "FUN_0001dd30(*param_1)" (identifier "FUN_0001dd30") (argument_list "(*param_1)" (( "(") (pointer_expression "*param_1" (* "*") (identifier "param_1")) () ")"))) (; ";")) (expression_statement "FUN_0001dd30(param_1);" (call_expression "FUN_0001dd30(param_1)" (identifier "FUN_0001dd30") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return puVar3;\n  }" (if "if") (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "iVar1") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return puVar3;\n  }" ({ "{") (return_statement "return puVar3;" (return "return") (identifier "puVar3") (; ";")) (} "}"))) (expression_statement "FUN_0008eb20();" (call_expression "FUN_0008eb20()" (identifier "FUN_0008eb20") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

type_1 * function_1(type_2 *handle)

{
  int var_14;
  size_t var_9;
  type_1 *psVar2;
  type_3 *ptr;
  char *var_11;
  char *var_6;
  type_4 var_4;
  type_4 var_7;
  int var_1;
  
  var_14 = *(int *)(var_1 + 0x14);
  psVar2 = var_2();
  ptr = var_3(4);
  var_7 = psVar2->id;
  var_4 = ptr->length;
  ptr->length = var_4 + 4;
  if ((int)ptr->maxlen < (int)(var_4 + 4)) {
    ptr->maxlen = var_4 + 0x104;
    var_6 = (char *)var_5(ptr->data,var_4 + 0x104,1);
    ptr->data = var_6;
    var_4 = ptr->length - 4;
  }
  else {
    var_6 = ptr->data;
  }
  *(type_4 *)(var_6 + var_4) =
       (var_7 >> 8 & 0xff) << 0x10 | (type_4)var_8((char)(var_7 >> 0x10),(char)(var_7 >> 0x18)) |
       var_7 << 0x18;
  var_7 = ptr->length;
  ptr->length = var_7 + 4;
  if ((int)ptr->maxlen < (int)(var_7 + 4)) {
    ptr->maxlen = var_7 + 0x104;
    var_6 = (char *)var_5(ptr->data,var_7 + 0x104,1);
    ptr->data = var_6;
    var_7 = ptr->length - 4;
  }
  else {
    var_6 = ptr->data;
  }
  var_6 = var_6 + var_7;
  var_6[0] = '\0';
  var_6[1] = '\0';
  var_6[2] = '\0';
  var_6[3] = '\0';
  var_4 = ptr->length;
  var_6 = handle->hstring;
  var_9 = handle->hlen;
  ptr->savedpos = var_4;
  var_7 = var_4 + var_9;
  ptr->length = var_7;
  if ((int)ptr->maxlen < (int)var_7) {
    ptr->maxlen = var_7 + 0x100;
    var_11 = (char *)var_5(ptr->data,var_7 + 0x100,1);
    ptr->data = var_11;
    var_4 = ptr->length - var_9;
  }
  else {
    var_11 = ptr->data;
  }
  var_10(var_11 + var_4,var_6,var_9);
  ptr->data[ptr->savedpos - 4] = (char)(ptr->length - ptr->savedpos >> 0x18);
  ptr->data[ptr->savedpos - 3] = (char)(ptr->length - ptr->savedpos >> 0x10);
  ptr->data[ptr->savedpos - 2] = (char)(ptr->length - ptr->savedpos >> 8);
  ptr->data[ptr->savedpos - 1] = (char)ptr->length - (char)ptr->savedpos;
  *ptr->data = (char)(ptr->length - 4 >> 0x18);
  ptr->data[1] = (char)(ptr->length - 4 >> 0x10);
  ptr->data[2] = (char)(ptr->length - 4 >> 8);
  ptr->data[3] = (char)ptr->length + -4;
  var_12(ptr->data,ptr->length);
  if (ptr->data != (char *)0x0) {
    var_13(ptr->data);
  }
  var_13(ptr);
  var_13(handle->hstring);
  var_13(handle);
  if (var_14 == *(int *)(var_1 + 0x14)) {
    return psVar2;
  }
                    /* WARNING: Subroutine does not return */
  var_15();
}


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

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

uint * MASKED(undefined4 *param_1)

{
  int iVar1;
  uint uVar2;
  void *__src;
  size_t __n;
  uint *puVar3;
  int *piVar4;
  int iVar5;
  int iVar6;
  int in_GS_OFFSET;
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  puVar3 = (uint *)FUN_0002f5d0();
  piVar4 = (int *)FUN_0002f910();
  uVar2 = *puVar3;
  iVar5 = piVar4[1];
  piVar4[1] = iVar5 + 4;
  if (piVar4[2] < iVar5 + 4) {
    piVar4[2] = iVar5 + 0x104;
    iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1);
    *piVar4 = iVar6;
    iVar5 = piVar4[1] + -4;
  }
  else {
    iVar6 = *piVar4;
  }
  *(uint *)(iVar6 + iVar5) =
       (uVar2 >> 8 & 0xff) << 0x10 | (uint)CONCAT11((char)(uVar2 >> 0x10),(char)(uVar2 >> 0x18)) |
       uVar2 << 0x18;
  iVar5 = piVar4[1];
  piVar4[1] = iVar5 + 4;
  if (piVar4[2] < iVar5 + 4) {
    piVar4[2] = iVar5 + 0x104;
    iVar6 = FUN_0001dc50(*piVar4,iVar5 + 0x104,1);
    *piVar4 = iVar6;
    iVar5 = piVar4[1] + -4;
  }
  else {
    iVar6 = *piVar4;
  }
  *(undefined4 *)(iVar6 + iVar5) = 0;
  iVar6 = piVar4[1];
  __src = (void *)*param_1;
  __n = param_1[1];
  piVar4[3] = iVar6;
  iVar5 = iVar6 + __n;
  piVar4[1] = iVar5;
  if (piVar4[2] < iVar5) {
    piVar4[2] = iVar5 + 0x100;
    iVar5 = FUN_0001dc50(*piVar4,iVar5 + 0x100,1);
    *piVar4 = iVar5;
    iVar6 = piVar4[1] - __n;
  }
  else {
    iVar5 = *piVar4;
  }
  memcpy((void *)(iVar5 + iVar6),__src,__n);
  *(char *)(*piVar4 + -4 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 0x18);
  *(char *)(*piVar4 + -3 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 0x10);
  *(char *)(*piVar4 + -2 + piVar4[3]) = (char)((uint)(piVar4[1] - piVar4[3]) >> 8);
  *(char *)(*piVar4 + -1 + piVar4[3]) = (char)piVar4[1] - (char)piVar4[3];
  *(char *)*piVar4 = (char)((uint)(piVar4[1] + -4) >> 0x18);
  *(char *)(*piVar4 + 1) = (char)((uint)(piVar4[1] + -4) >> 0x10);
  *(char *)(*piVar4 + 2) = (char)((uint)(piVar4[1] + -4) >> 8);
  *(char *)(*piVar4 + 3) = (char)piVar4[1] + -4;
  FUN_00029280(*piVar4,piVar4[1]);
  if (*piVar4 != 0) {
    FUN_0001dd30(*piVar4);
  }
  FUN_0001dd30(piVar4);
  FUN_0001dd30(*param_1);
  FUN_0001dd30(param_1);
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return puVar3;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0008eb20();
}

