
/* WARNING: Function: __x86.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */
/* WARNING: Unknown calling convention */

void sha1_bytes(void *p,int len)

{
  uchar *__dest;
  uint uVar1;
  int iVar2;
  word32 *pwVar3;
  word32 *pwVar4;
  uchar *puVar5;
  size_t sVar6;
  int in_GS_OFFSET;
  SHA_State *s;
  void *pvStack_7c;
  word32 awStack_60 [16];
  word32 awStack_20 [4];
  
  pvStack_7c = p;
  __dest = s->block;
  awStack_20[0] = *(word32 *)(in_GS_OFFSET + 0x14);
  uVar1 = s->lenlo;
  s->lenlo = len + s->lenlo;
  iVar2 = s->blkused;
  s->lenhi = s->lenhi + (uint)CARRY4(len,uVar1);
  sVar6 = iVar2 + len;
  if (iVar2 == 0) {
    if (0x3f < (int)sVar6) goto LAB_000589b3;
  }
  else {
    if ((int)sVar6 < 0x40) {
      memcpy(__dest + iVar2,p,len);
      s->blkused = s->blkused + len;
      goto LAB_00058a6a;
    }
LAB_000589b3:
    do {
      memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2);
      iVar2 = 0x40 - s->blkused;
      pvStack_7c = (void *)((int)pvStack_7c + iVar2);
      len = len - iVar2;
      pwVar3 = awStack_60;
      puVar5 = __dest;
      do {
        pwVar4 = pwVar3 + 1;
        *pwVar3 = (uint)*puVar5 << 0x18 | (uint)puVar5[1] << 0x10 | (uint)puVar5[3] |
                  (uint)puVar5[2] << 8;
        pwVar3 = pwVar4;
        puVar5 = puVar5 + 4;
      } while (awStack_20 != pwVar4);
      SHATransform(s->h,awStack_60);
      s->blkused = 0;
      iVar2 = 0;
      sVar6 = len;
    } while (0x3f < len);
  }
  memcpy(__dest,pvStack_7c,len);
  s->blkused = sVar6;
LAB_00058a6a:
  if (awStack_20[0] != *(word32 *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail_local();
  }
  return;
}



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

void thunk_FUN_00058950(int param_1,void *param_2,size_t param_3)

{
  byte *__dest;
  uint uVar1;
  int iVar2;
  uint *puVar3;
  uint *puVar4;
  byte *pbVar5;
  size_t sVar6;
  int in_GS_OFFSET;
  void *pvStack_7c;
  uint auStack_60 [16];
  uint auStack_20 [4];
  
  pvStack_7c = param_2;
  __dest = (byte *)(param_1 + 0x14);
  auStack_20[0] = *(uint *)(in_GS_OFFSET + 0x14);
  uVar1 = *(uint *)(param_1 + 0x5c);
  *(size_t *)(param_1 + 0x5c) = param_3 + *(uint *)(param_1 + 0x5c);
  iVar2 = *(int *)(param_1 + 0x54);
  *(int *)(param_1 + 0x58) = *(int *)(param_1 + 0x58) + (uint)CARRY4(param_3,uVar1);
  sVar6 = iVar2 + param_3;
  if (iVar2 == 0) {
    if (0x3f < (int)sVar6) goto LAB_000589b3;
  }
  else {
    if ((int)sVar6 < 0x40) {
      memcpy(__dest + iVar2,param_2,param_3);
      *(int *)(param_1 + 0x54) = *(int *)(param_1 + 0x54) + param_3;
      goto LAB_00058a6a;
    }
LAB_000589b3:
    do {
      memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2);
      iVar2 = 0x40 - *(int *)(param_1 + 0x54);
      pvStack_7c = (void *)((int)pvStack_7c + iVar2);
      param_3 = param_3 - iVar2;
      puVar3 = auStack_60;
      pbVar5 = __dest;
      do {
        puVar4 = puVar3 + 1;
        *puVar3 = (uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3] |
                  (uint)pbVar5[2] << 8;
        puVar3 = puVar4;
        pbVar5 = pbVar5 + 4;
      } while (auStack_20 != puVar4);
      FUN_000586d0(param_1,auStack_60);
      *(undefined4 *)(param_1 + 0x54) = 0;
      iVar2 = 0;
      sVar6 = param_3;
    } while (0x3f < (int)param_3);
  }
  memcpy(__dest,pvStack_7c,param_3);
  *(size_t *)(param_1 + 0x54) = sVar6;
LAB_00058a6a:
  if (auStack_20[0] != *(uint *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_0006dad0();
  }
  return;
}


JMP 0x00058950
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */\n\nvoid thunk_FUN_00058950(int param_1,void *param_2,size_t param_3)\n\n{\n  byte *__dest;\n  uint uVar1;\n  int iVar2;\n  uint *puVar3;\n  uint *puVar4;\n  byte *pbVar5;\n  size_t sVar6;\n  int in_GS_OFFSET;\n  void *pvStack_7c;\n  uint auStack_60 [16];\n  uint auStack_20 [4];\n  \n  pvStack_7c = param_2;\n  __dest = (byte *)(param_1 + 0x14);\n  auStack_20[0] = *(uint *)(in_GS_OFFSET + 0x14);\n  uVar1 = *(uint *)(param_1 + 0x5c);\n  *(size_t *)(param_1 + 0x5c) = param_3 + *(uint *)(param_1 + 0x5c);\n  iVar2 = *(int *)(param_1 + 0x54);\n  *(int *)(param_1 + 0x58) = *(int *)(param_1 + 0x58) + (uint)CARRY4(param_3,uVar1);\n  sVar6 = iVar2 + param_3;\n  if (iVar2 == 0) {\n    if (0x3f < (int)sVar6) goto LAB_000589b3;\n  }\n  else {\n    if ((int)sVar6 < 0x40) {\n      memcpy(__dest + iVar2,param_2,param_3);\n      *(int *)(param_1 + 0x54) = *(int *)(param_1 + 0x54) + param_3;\n      goto LAB_00058a6a;\n    }\nLAB_000589b3:\n    do {\n      memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2);\n      iVar2 = 0x40 - *(int *)(param_1 + 0x54);\n      pvStack_7c = (void *)((int)pvStack_7c + iVar2);\n      param_3 = param_3 - iVar2;\n      puVar3 = auStack_60;\n      pbVar5 = __dest;\n      do {\n        puVar4 = puVar3 + 1;\n        *puVar3 = (uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3] |\n                  (uint)pbVar5[2] << 8;\n        puVar3 = puVar4;\n        pbVar5 = pbVar5 + 4;\n      } while (auStack_20 != puVar4);\n      FUN_000586d0(param_1,auStack_60);\n      *(undefined4 *)(param_1 + 0x54) = 0;\n      iVar2 = 0;\n      sVar6 = param_3;\n    } while (0x3f < (int)param_3);\n  }\n  memcpy(__dest,pvStack_7c,param_3);\n  *(size_t *)(param_1 + 0x54) = sVar6;\nLAB_00058a6a:\n  if (auStack_20[0] != *(uint *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0006dad0();\n  }\n  return;\n}\n\n" comment (function_definition "void thunk_FUN_00058950(int param_1,void *param_2,size_t param_3)\n\n{\n  byte *__dest;\n  uint uVar1;\n  int iVar2;\n  uint *puVar3;\n  uint *puVar4;\n  byte *pbVar5;\n  size_t sVar6;\n  int in_GS_OFFSET;\n  void *pvStack_7c;\n  uint auStack_60 [16];\n  uint auStack_20 [4];\n  \n  pvStack_7c = param_2;\n  __dest = (byte *)(param_1 + 0x14);\n  auStack_20[0] = *(uint *)(in_GS_OFFSET + 0x14);\n  uVar1 = *(uint *)(param_1 + 0x5c);\n  *(size_t *)(param_1 + 0x5c) = param_3 + *(uint *)(param_1 + 0x5c);\n  iVar2 = *(int *)(param_1 + 0x54);\n  *(int *)(param_1 + 0x58) = *(int *)(param_1 + 0x58) + (uint)CARRY4(param_3,uVar1);\n  sVar6 = iVar2 + param_3;\n  if (iVar2 == 0) {\n    if (0x3f < (int)sVar6) goto LAB_000589b3;\n  }\n  else {\n    if ((int)sVar6 < 0x40) {\n      memcpy(__dest + iVar2,param_2,param_3);\n      *(int *)(param_1 + 0x54) = *(int *)(param_1 + 0x54) + param_3;\n      goto LAB_00058a6a;\n    }\nLAB_000589b3:\n    do {\n      memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2);\n      iVar2 = 0x40 - *(int *)(param_1 + 0x54);\n      pvStack_7c = (void *)((int)pvStack_7c + iVar2);\n      param_3 = param_3 - iVar2;\n      puVar3 = auStack_60;\n      pbVar5 = __dest;\n      do {\n        puVar4 = puVar3 + 1;\n        *puVar3 = (uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3] |\n                  (uint)pbVar5[2] << 8;\n        puVar3 = puVar4;\n        pbVar5 = pbVar5 + 4;\n      } while (auStack_20 != puVar4);\n      FUN_000586d0(param_1,auStack_60);\n      *(undefined4 *)(param_1 + 0x54) = 0;\n      iVar2 = 0;\n      sVar6 = param_3;\n    } while (0x3f < (int)param_3);\n  }\n  memcpy(__dest,pvStack_7c,param_3);\n  *(size_t *)(param_1 + 0x54) = sVar6;\nLAB_00058a6a:\n  if (auStack_20[0] != *(uint *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0006dad0();\n  }\n  return;\n}" primitive_type (function_declarator "thunk_FUN_00058950(int param_1,void *param_2,size_t param_3)" identifier (parameter_list "(int param_1,void *param_2,size_t param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "void *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "size_t param_3" primitive_type identifier) ))) (compound_statement "{\n  byte *__dest;\n  uint uVar1;\n  int iVar2;\n  uint *puVar3;\n  uint *puVar4;\n  byte *pbVar5;\n  size_t sVar6;\n  int in_GS_OFFSET;\n  void *pvStack_7c;\n  uint auStack_60 [16];\n  uint auStack_20 [4];\n  \n  pvStack_7c = param_2;\n  __dest = (byte *)(param_1 + 0x14);\n  auStack_20[0] = *(uint *)(in_GS_OFFSET + 0x14);\n  uVar1 = *(uint *)(param_1 + 0x5c);\n  *(size_t *)(param_1 + 0x5c) = param_3 + *(uint *)(param_1 + 0x5c);\n  iVar2 = *(int *)(param_1 + 0x54);\n  *(int *)(param_1 + 0x58) = *(int *)(param_1 + 0x58) + (uint)CARRY4(param_3,uVar1);\n  sVar6 = iVar2 + param_3;\n  if (iVar2 == 0) {\n    if (0x3f < (int)sVar6) goto LAB_000589b3;\n  }\n  else {\n    if ((int)sVar6 < 0x40) {\n      memcpy(__dest + iVar2,param_2,param_3);\n      *(int *)(param_1 + 0x54) = *(int *)(param_1 + 0x54) + param_3;\n      goto LAB_00058a6a;\n    }\nLAB_000589b3:\n    do {\n      memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2);\n      iVar2 = 0x40 - *(int *)(param_1 + 0x54);\n      pvStack_7c = (void *)((int)pvStack_7c + iVar2);\n      param_3 = param_3 - iVar2;\n      puVar3 = auStack_60;\n      pbVar5 = __dest;\n      do {\n        puVar4 = puVar3 + 1;\n        *puVar3 = (uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3] |\n                  (uint)pbVar5[2] << 8;\n        puVar3 = puVar4;\n        pbVar5 = pbVar5 + 4;\n      } while (auStack_20 != puVar4);\n      FUN_000586d0(param_1,auStack_60);\n      *(undefined4 *)(param_1 + 0x54) = 0;\n      iVar2 = 0;\n      sVar6 = param_3;\n    } while (0x3f < (int)param_3);\n  }\n  memcpy(__dest,pvStack_7c,param_3);\n  *(size_t *)(param_1 + 0x54) = sVar6;\nLAB_00058a6a:\n  if (auStack_20[0] != *(uint *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0006dad0();\n  }\n  return;\n}" { (declaration "byte *__dest;" type_identifier (pointer_declarator "*__dest" * identifier) ;) (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "uint *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "byte *pbVar5;" type_identifier (pointer_declarator "*pbVar5" * identifier) ;) (declaration "size_t sVar6;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "void *pvStack_7c;" primitive_type (pointer_declarator "*pvStack_7c" * identifier) ;) (declaration "uint auStack_60 [16];" type_identifier (array_declarator "auStack_60 [16]" identifier [ number_literal ]) ;) (declaration "uint auStack_20 [4];" type_identifier (array_declarator "auStack_20 [4]" identifier [ number_literal ]) ;) (expression_statement "pvStack_7c = param_2;" (assignment_expression "pvStack_7c = param_2" identifier = identifier) ;) (expression_statement "__dest = (byte *)(param_1 + 0x14);" (assignment_expression "__dest = (byte *)(param_1 + 0x14)" identifier = (cast_expression "(byte *)(param_1 + 0x14)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) ;) (expression_statement "auStack_20[0] = *(uint *)(in_GS_OFFSET + 0x14);" (assignment_expression "auStack_20[0] = *(uint *)(in_GS_OFFSET + 0x14)" (subscript_expression "auStack_20[0]" identifier [ number_literal ]) = (pointer_expression "*(uint *)(in_GS_OFFSET + 0x14)" * (cast_expression "(uint *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "uVar1 = *(uint *)(param_1 + 0x5c);" (assignment_expression "uVar1 = *(uint *)(param_1 + 0x5c)" identifier = (pointer_expression "*(uint *)(param_1 + 0x5c)" * (cast_expression "(uint *)(param_1 + 0x5c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x5c)" ( (binary_expression "param_1 + 0x5c" identifier + number_literal) ))))) ;) (expression_statement "*(size_t *)(param_1 + 0x5c) = param_3 + *(uint *)(param_1 + 0x5c);" (assignment_expression "*(size_t *)(param_1 + 0x5c) = param_3 + *(uint *)(param_1 + 0x5c)" (pointer_expression "*(size_t *)(param_1 + 0x5c)" * (cast_expression "(size_t *)(param_1 + 0x5c)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x5c)" ( (binary_expression "param_1 + 0x5c" identifier + number_literal) )))) = (binary_expression "param_3 + *(uint *)(param_1 + 0x5c)" identifier + (pointer_expression "*(uint *)(param_1 + 0x5c)" * (cast_expression "(uint *)(param_1 + 0x5c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x5c)" ( (binary_expression "param_1 + 0x5c" identifier + number_literal) )))))) ;) (expression_statement "iVar2 = *(int *)(param_1 + 0x54);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x54)" identifier = (pointer_expression "*(int *)(param_1 + 0x54)" * (cast_expression "(int *)(param_1 + 0x54)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x54)" ( (binary_expression "param_1 + 0x54" identifier + number_literal) ))))) ;) (expression_statement "*(int *)(param_1 + 0x58) = *(int *)(param_1 + 0x58) + (uint)CARRY4(param_3,uVar1);" (assignment_expression "*(int *)(param_1 + 0x58) = *(int *)(param_1 + 0x58) + (uint)CARRY4(param_3,uVar1)" (pointer_expression "*(int *)(param_1 + 0x58)" * (cast_expression "(int *)(param_1 + 0x58)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x58)" ( (binary_expression "param_1 + 0x58" identifier + number_literal) )))) = (binary_expression "*(int *)(param_1 + 0x58) + (uint)CARRY4(param_3,uVar1)" (pointer_expression "*(int *)(param_1 + 0x58)" * (cast_expression "(int *)(param_1 + 0x58)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x58)" ( (binary_expression "param_1 + 0x58" identifier + number_literal) )))) + (cast_expression "(uint)CARRY4(param_3,uVar1)" ( (type_descriptor "uint" type_identifier) ) (call_expression "CARRY4(param_3,uVar1)" identifier (argument_list "(param_3,uVar1)" ( identifier , identifier )))))) ;) (expression_statement "sVar6 = iVar2 + param_3;" (assignment_expression "sVar6 = iVar2 + param_3" identifier = (binary_expression "iVar2 + param_3" identifier + identifier)) ;) (if_statement "if (iVar2 == 0) {\n    if (0x3f < (int)sVar6) goto LAB_000589b3;\n  }\n  else {\n    if ((int)sVar6 < 0x40) {\n      memcpy(__dest + iVar2,param_2,param_3);\n      *(int *)(param_1 + 0x54) = *(int *)(param_1 + 0x54) + param_3;\n      goto LAB_00058a6a;\n    }\nLAB_000589b3:\n    do {\n      memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2);\n      iVar2 = 0x40 - *(int *)(param_1 + 0x54);\n      pvStack_7c = (void *)((int)pvStack_7c + iVar2);\n      param_3 = param_3 - iVar2;\n      puVar3 = auStack_60;\n      pbVar5 = __dest;\n      do {\n        puVar4 = puVar3 + 1;\n        *puVar3 = (uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3] |\n                  (uint)pbVar5[2] << 8;\n        puVar3 = puVar4;\n        pbVar5 = pbVar5 + 4;\n      } while (auStack_20 != puVar4);\n      FUN_000586d0(param_1,auStack_60);\n      *(undefined4 *)(param_1 + 0x54) = 0;\n      iVar2 = 0;\n      sVar6 = param_3;\n    } while (0x3f < (int)param_3);\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    if (0x3f < (int)sVar6) goto LAB_000589b3;\n  }" { (if_statement "if (0x3f < (int)sVar6) goto LAB_000589b3;" if (parenthesized_expression "(0x3f < (int)sVar6)" ( (binary_expression "0x3f < (int)sVar6" number_literal < (cast_expression "(int)sVar6" ( (type_descriptor "int" primitive_type) ) identifier)) )) (goto_statement "goto LAB_000589b3;" goto statement_identifier ;)) }) (else_clause "else {\n    if ((int)sVar6 < 0x40) {\n      memcpy(__dest + iVar2,param_2,param_3);\n      *(int *)(param_1 + 0x54) = *(int *)(param_1 + 0x54) + param_3;\n      goto LAB_00058a6a;\n    }\nLAB_000589b3:\n    do {\n      memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2);\n      iVar2 = 0x40 - *(int *)(param_1 + 0x54);\n      pvStack_7c = (void *)((int)pvStack_7c + iVar2);\n      param_3 = param_3 - iVar2;\n      puVar3 = auStack_60;\n      pbVar5 = __dest;\n      do {\n        puVar4 = puVar3 + 1;\n        *puVar3 = (uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3] |\n                  (uint)pbVar5[2] << 8;\n        puVar3 = puVar4;\n        pbVar5 = pbVar5 + 4;\n      } while (auStack_20 != puVar4);\n      FUN_000586d0(param_1,auStack_60);\n      *(undefined4 *)(param_1 + 0x54) = 0;\n      iVar2 = 0;\n      sVar6 = param_3;\n    } while (0x3f < (int)param_3);\n  }" else (compound_statement "{\n    if ((int)sVar6 < 0x40) {\n      memcpy(__dest + iVar2,param_2,param_3);\n      *(int *)(param_1 + 0x54) = *(int *)(param_1 + 0x54) + param_3;\n      goto LAB_00058a6a;\n    }\nLAB_000589b3:\n    do {\n      memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2);\n      iVar2 = 0x40 - *(int *)(param_1 + 0x54);\n      pvStack_7c = (void *)((int)pvStack_7c + iVar2);\n      param_3 = param_3 - iVar2;\n      puVar3 = auStack_60;\n      pbVar5 = __dest;\n      do {\n        puVar4 = puVar3 + 1;\n        *puVar3 = (uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3] |\n                  (uint)pbVar5[2] << 8;\n        puVar3 = puVar4;\n        pbVar5 = pbVar5 + 4;\n      } while (auStack_20 != puVar4);\n      FUN_000586d0(param_1,auStack_60);\n      *(undefined4 *)(param_1 + 0x54) = 0;\n      iVar2 = 0;\n      sVar6 = param_3;\n    } while (0x3f < (int)param_3);\n  }" { (if_statement "if ((int)sVar6 < 0x40) {\n      memcpy(__dest + iVar2,param_2,param_3);\n      *(int *)(param_1 + 0x54) = *(int *)(param_1 + 0x54) + param_3;\n      goto LAB_00058a6a;\n    }" if (parenthesized_expression "((int)sVar6 < 0x40)" ( (binary_expression "(int)sVar6 < 0x40" (cast_expression "(int)sVar6" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n      memcpy(__dest + iVar2,param_2,param_3);\n      *(int *)(param_1 + 0x54) = *(int *)(param_1 + 0x54) + param_3;\n      goto LAB_00058a6a;\n    }" { (expression_statement "memcpy(__dest + iVar2,param_2,param_3);" (call_expression "memcpy(__dest + iVar2,param_2,param_3)" identifier (argument_list "(__dest + iVar2,param_2,param_3)" ( (binary_expression "__dest + iVar2" identifier + identifier) , identifier , identifier ))) ;) (expression_statement "*(int *)(param_1 + 0x54) = *(int *)(param_1 + 0x54) + param_3;" (assignment_expression "*(int *)(param_1 + 0x54) = *(int *)(param_1 + 0x54) + param_3" (pointer_expression "*(int *)(param_1 + 0x54)" * (cast_expression "(int *)(param_1 + 0x54)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x54)" ( (binary_expression "param_1 + 0x54" identifier + number_literal) )))) = (binary_expression "*(int *)(param_1 + 0x54) + param_3" (pointer_expression "*(int *)(param_1 + 0x54)" * (cast_expression "(int *)(param_1 + 0x54)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x54)" ( (binary_expression "param_1 + 0x54" identifier + number_literal) )))) + identifier)) ;) (goto_statement "goto LAB_00058a6a;" goto statement_identifier ;) })) (labeled_statement "LAB_000589b3:\n    do {\n      memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2);\n      iVar2 = 0x40 - *(int *)(param_1 + 0x54);\n      pvStack_7c = (void *)((int)pvStack_7c + iVar2);\n      param_3 = param_3 - iVar2;\n      puVar3 = auStack_60;\n      pbVar5 = __dest;\n      do {\n        puVar4 = puVar3 + 1;\n        *puVar3 = (uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3] |\n                  (uint)pbVar5[2] << 8;\n        puVar3 = puVar4;\n        pbVar5 = pbVar5 + 4;\n      } while (auStack_20 != puVar4);\n      FUN_000586d0(param_1,auStack_60);\n      *(undefined4 *)(param_1 + 0x54) = 0;\n      iVar2 = 0;\n      sVar6 = param_3;\n    } while (0x3f < (int)param_3);" statement_identifier : (do_statement "do {\n      memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2);\n      iVar2 = 0x40 - *(int *)(param_1 + 0x54);\n      pvStack_7c = (void *)((int)pvStack_7c + iVar2);\n      param_3 = param_3 - iVar2;\n      puVar3 = auStack_60;\n      pbVar5 = __dest;\n      do {\n        puVar4 = puVar3 + 1;\n        *puVar3 = (uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3] |\n                  (uint)pbVar5[2] << 8;\n        puVar3 = puVar4;\n        pbVar5 = pbVar5 + 4;\n      } while (auStack_20 != puVar4);\n      FUN_000586d0(param_1,auStack_60);\n      *(undefined4 *)(param_1 + 0x54) = 0;\n      iVar2 = 0;\n      sVar6 = param_3;\n    } while (0x3f < (int)param_3);" do (compound_statement "{\n      memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2);\n      iVar2 = 0x40 - *(int *)(param_1 + 0x54);\n      pvStack_7c = (void *)((int)pvStack_7c + iVar2);\n      param_3 = param_3 - iVar2;\n      puVar3 = auStack_60;\n      pbVar5 = __dest;\n      do {\n        puVar4 = puVar3 + 1;\n        *puVar3 = (uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3] |\n                  (uint)pbVar5[2] << 8;\n        puVar3 = puVar4;\n        pbVar5 = pbVar5 + 4;\n      } while (auStack_20 != puVar4);\n      FUN_000586d0(param_1,auStack_60);\n      *(undefined4 *)(param_1 + 0x54) = 0;\n      iVar2 = 0;\n      sVar6 = param_3;\n    }" { (expression_statement "memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2);" (call_expression "memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2)" identifier (argument_list "(__dest + iVar2,pvStack_7c,0x40 - iVar2)" ( (binary_expression "__dest + iVar2" identifier + identifier) , identifier , (binary_expression "0x40 - iVar2" number_literal - identifier) ))) ;) (expression_statement "iVar2 = 0x40 - *(int *)(param_1 + 0x54);" (assignment_expression "iVar2 = 0x40 - *(int *)(param_1 + 0x54)" identifier = (binary_expression "0x40 - *(int *)(param_1 + 0x54)" number_literal - (pointer_expression "*(int *)(param_1 + 0x54)" * (cast_expression "(int *)(param_1 + 0x54)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x54)" ( (binary_expression "param_1 + 0x54" identifier + number_literal) )))))) ;) (expression_statement "pvStack_7c = (void *)((int)pvStack_7c + iVar2);" (assignment_expression "pvStack_7c = (void *)((int)pvStack_7c + iVar2)" identifier = (cast_expression "(void *)((int)pvStack_7c + iVar2)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvStack_7c + iVar2)" ( (binary_expression "(int)pvStack_7c + iVar2" (cast_expression "(int)pvStack_7c" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (expression_statement "param_3 = param_3 - iVar2;" (assignment_expression "param_3 = param_3 - iVar2" identifier = (binary_expression "param_3 - iVar2" identifier - identifier)) ;) (expression_statement "puVar3 = auStack_60;" (assignment_expression "puVar3 = auStack_60" identifier = identifier) ;) (expression_statement "pbVar5 = __dest;" (assignment_expression "pbVar5 = __dest" identifier = identifier) ;) (do_statement "do {\n        puVar4 = puVar3 + 1;\n        *puVar3 = (uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3] |\n                  (uint)pbVar5[2] << 8;\n        puVar3 = puVar4;\n        pbVar5 = pbVar5 + 4;\n      } while (auStack_20 != puVar4);" do (compound_statement "{\n        puVar4 = puVar3 + 1;\n        *puVar3 = (uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3] |\n                  (uint)pbVar5[2] << 8;\n        puVar3 = puVar4;\n        pbVar5 = pbVar5 + 4;\n      }" { (expression_statement "puVar4 = puVar3 + 1;" (assignment_expression "puVar4 = puVar3 + 1" identifier = (binary_expression "puVar3 + 1" identifier + number_literal)) ;) (expression_statement "*puVar3 = (uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3] |\n                  (uint)pbVar5[2] << 8;" (assignment_expression "*puVar3 = (uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3] |\n                  (uint)pbVar5[2] << 8" (pointer_expression "*puVar3" * identifier) = (binary_expression "(uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3] |\n                  (uint)pbVar5[2] << 8" (binary_expression "(uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3]" (binary_expression "(uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10" (binary_expression "(uint)*pbVar5 << 0x18" (binary_expression "(uint)*pbVar5" (parenthesized_expression "(uint)" ( identifier )) * identifier) << number_literal) | (binary_expression "(uint)pbVar5[1] << 0x10" (cast_expression "(uint)pbVar5[1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pbVar5[1]" identifier [ number_literal ])) << number_literal)) | (cast_expression "(uint)pbVar5[3]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pbVar5[3]" identifier [ number_literal ]))) | (binary_expression "(uint)pbVar5[2] << 8" (cast_expression "(uint)pbVar5[2]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pbVar5[2]" identifier [ number_literal ])) << number_literal))) ;) (expression_statement "puVar3 = puVar4;" (assignment_expression "puVar3 = puVar4" identifier = identifier) ;) (expression_statement "pbVar5 = pbVar5 + 4;" (assignment_expression "pbVar5 = pbVar5 + 4" identifier = (binary_expression "pbVar5 + 4" identifier + number_literal)) ;) }) while (parenthesized_expression "(auStack_20 != puVar4)" ( (binary_expression "auStack_20 != puVar4" identifier != identifier) )) ;) (expression_statement "FUN_000586d0(param_1,auStack_60);" (call_expression "FUN_000586d0(param_1,auStack_60)" identifier (argument_list "(param_1,auStack_60)" ( identifier , identifier ))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x54) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x54) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x54)" * (cast_expression "(undefined4 *)(param_1 + 0x54)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x54)" ( (binary_expression "param_1 + 0x54" identifier + number_literal) )))) = number_literal) ;) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) (expression_statement "sVar6 = param_3;" (assignment_expression "sVar6 = param_3" identifier = identifier) ;) }) while (parenthesized_expression "(0x3f < (int)param_3)" ( (binary_expression "0x3f < (int)param_3" number_literal < (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier)) )) ;)) }))) (expression_statement "memcpy(__dest,pvStack_7c,param_3);" (call_expression "memcpy(__dest,pvStack_7c,param_3)" identifier (argument_list "(__dest,pvStack_7c,param_3)" ( identifier , identifier , identifier ))) ;) (expression_statement "*(size_t *)(param_1 + 0x54) = sVar6;" (assignment_expression "*(size_t *)(param_1 + 0x54) = sVar6" (pointer_expression "*(size_t *)(param_1 + 0x54)" * (cast_expression "(size_t *)(param_1 + 0x54)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x54)" ( (binary_expression "param_1 + 0x54" identifier + number_literal) )))) = identifier) ;) (labeled_statement "LAB_00058a6a:\n  if (auStack_20[0] != *(uint *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0006dad0();\n  }" statement_identifier : (if_statement "if (auStack_20[0] != *(uint *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0006dad0();\n  }" if (parenthesized_expression "(auStack_20[0] != *(uint *)(in_GS_OFFSET + 0x14))" ( (binary_expression "auStack_20[0] != *(uint *)(in_GS_OFFSET + 0x14)" (subscript_expression "auStack_20[0]" identifier [ number_literal ]) != (pointer_expression "*(uint *)(in_GS_OFFSET + 0x14)" * (cast_expression "(uint *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    FUN_0006dad0();\n  }" { comment (expression_statement "FUN_0006dad0();" (call_expression "FUN_0006dad0()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */\n/* WARNING: Unknown calling convention */\n\nvoid sha1_bytes(void *p,int len)\n\n{\n  uchar *__dest;\n  uint uVar1;\n  int iVar2;\n  word32 *pwVar3;\n  word32 *pwVar4;\n  uchar *puVar5;\n  size_t sVar6;\n  int in_GS_OFFSET;\n  SHA_State *s;\n  void *pvStack_7c;\n  word32 awStack_60 [16];\n  word32 awStack_20 [4];\n  \n  pvStack_7c = p;\n  __dest = s->block;\n  awStack_20[0] = *(word32 *)(in_GS_OFFSET + 0x14);\n  uVar1 = s->lenlo;\n  s->lenlo = len + s->lenlo;\n  iVar2 = s->blkused;\n  s->lenhi = s->lenhi + (uint)CARRY4(len,uVar1);\n  sVar6 = iVar2 + len;\n  if (iVar2 == 0) {\n    if (0x3f < (int)sVar6) goto LAB_000589b3;\n  }\n  else {\n    if ((int)sVar6 < 0x40) {\n      memcpy(__dest + iVar2,p,len);\n      s->blkused = s->blkused + len;\n      goto LAB_00058a6a;\n    }\nLAB_000589b3:\n    do {\n      memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2);\n      iVar2 = 0x40 - s->blkused;\n      pvStack_7c = (void *)((int)pvStack_7c + iVar2);\n      len = len - iVar2;\n      pwVar3 = awStack_60;\n      puVar5 = __dest;\n      do {\n        pwVar4 = pwVar3 + 1;\n        *pwVar3 = (uint)*puVar5 << 0x18 | (uint)puVar5[1] << 0x10 | (uint)puVar5[3] |\n                  (uint)puVar5[2] << 8;\n        pwVar3 = pwVar4;\n        puVar5 = puVar5 + 4;\n      } while (awStack_20 != pwVar4);\n      SHATransform(s->h,awStack_60);\n      s->blkused = 0;\n      iVar2 = 0;\n      sVar6 = len;\n    } while (0x3f < len);\n  }\n  memcpy(__dest,pvStack_7c,len);\n  s->blkused = sVar6;\nLAB_00058a6a:\n  if (awStack_20[0] != *(word32 *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return;\n}\n\n" comment comment (function_definition "void sha1_bytes(void *p,int len)\n\n{\n  uchar *__dest;\n  uint uVar1;\n  int iVar2;\n  word32 *pwVar3;\n  word32 *pwVar4;\n  uchar *puVar5;\n  size_t sVar6;\n  int in_GS_OFFSET;\n  SHA_State *s;\n  void *pvStack_7c;\n  word32 awStack_60 [16];\n  word32 awStack_20 [4];\n  \n  pvStack_7c = p;\n  __dest = s->block;\n  awStack_20[0] = *(word32 *)(in_GS_OFFSET + 0x14);\n  uVar1 = s->lenlo;\n  s->lenlo = len + s->lenlo;\n  iVar2 = s->blkused;\n  s->lenhi = s->lenhi + (uint)CARRY4(len,uVar1);\n  sVar6 = iVar2 + len;\n  if (iVar2 == 0) {\n    if (0x3f < (int)sVar6) goto LAB_000589b3;\n  }\n  else {\n    if ((int)sVar6 < 0x40) {\n      memcpy(__dest + iVar2,p,len);\n      s->blkused = s->blkused + len;\n      goto LAB_00058a6a;\n    }\nLAB_000589b3:\n    do {\n      memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2);\n      iVar2 = 0x40 - s->blkused;\n      pvStack_7c = (void *)((int)pvStack_7c + iVar2);\n      len = len - iVar2;\n      pwVar3 = awStack_60;\n      puVar5 = __dest;\n      do {\n        pwVar4 = pwVar3 + 1;\n        *pwVar3 = (uint)*puVar5 << 0x18 | (uint)puVar5[1] << 0x10 | (uint)puVar5[3] |\n                  (uint)puVar5[2] << 8;\n        pwVar3 = pwVar4;\n        puVar5 = puVar5 + 4;\n      } while (awStack_20 != pwVar4);\n      SHATransform(s->h,awStack_60);\n      s->blkused = 0;\n      iVar2 = 0;\n      sVar6 = len;\n    } while (0x3f < len);\n  }\n  memcpy(__dest,pvStack_7c,len);\n  s->blkused = sVar6;\nLAB_00058a6a:\n  if (awStack_20[0] != *(word32 *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return;\n}" primitive_type (function_declarator "sha1_bytes(void *p,int len)" identifier (parameter_list "(void *p,int len)" ( (parameter_declaration "void *p" primitive_type (pointer_declarator "*p" * identifier)) , (parameter_declaration "int len" primitive_type identifier) ))) (compound_statement "{\n  uchar *__dest;\n  uint uVar1;\n  int iVar2;\n  word32 *pwVar3;\n  word32 *pwVar4;\n  uchar *puVar5;\n  size_t sVar6;\n  int in_GS_OFFSET;\n  SHA_State *s;\n  void *pvStack_7c;\n  word32 awStack_60 [16];\n  word32 awStack_20 [4];\n  \n  pvStack_7c = p;\n  __dest = s->block;\n  awStack_20[0] = *(word32 *)(in_GS_OFFSET + 0x14);\n  uVar1 = s->lenlo;\n  s->lenlo = len + s->lenlo;\n  iVar2 = s->blkused;\n  s->lenhi = s->lenhi + (uint)CARRY4(len,uVar1);\n  sVar6 = iVar2 + len;\n  if (iVar2 == 0) {\n    if (0x3f < (int)sVar6) goto LAB_000589b3;\n  }\n  else {\n    if ((int)sVar6 < 0x40) {\n      memcpy(__dest + iVar2,p,len);\n      s->blkused = s->blkused + len;\n      goto LAB_00058a6a;\n    }\nLAB_000589b3:\n    do {\n      memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2);\n      iVar2 = 0x40 - s->blkused;\n      pvStack_7c = (void *)((int)pvStack_7c + iVar2);\n      len = len - iVar2;\n      pwVar3 = awStack_60;\n      puVar5 = __dest;\n      do {\n        pwVar4 = pwVar3 + 1;\n        *pwVar3 = (uint)*puVar5 << 0x18 | (uint)puVar5[1] << 0x10 | (uint)puVar5[3] |\n                  (uint)puVar5[2] << 8;\n        pwVar3 = pwVar4;\n        puVar5 = puVar5 + 4;\n      } while (awStack_20 != pwVar4);\n      SHATransform(s->h,awStack_60);\n      s->blkused = 0;\n      iVar2 = 0;\n      sVar6 = len;\n    } while (0x3f < len);\n  }\n  memcpy(__dest,pvStack_7c,len);\n  s->blkused = sVar6;\nLAB_00058a6a:\n  if (awStack_20[0] != *(word32 *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return;\n}" { (declaration "uchar *__dest;" type_identifier (pointer_declarator "*__dest" * identifier) ;) (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "word32 *pwVar3;" type_identifier (pointer_declarator "*pwVar3" * identifier) ;) (declaration "word32 *pwVar4;" type_identifier (pointer_declarator "*pwVar4" * identifier) ;) (declaration "uchar *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "size_t sVar6;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "SHA_State *s;" type_identifier (pointer_declarator "*s" * identifier) ;) (declaration "void *pvStack_7c;" primitive_type (pointer_declarator "*pvStack_7c" * identifier) ;) (declaration "word32 awStack_60 [16];" type_identifier (array_declarator "awStack_60 [16]" identifier [ number_literal ]) ;) (declaration "word32 awStack_20 [4];" type_identifier (array_declarator "awStack_20 [4]" identifier [ number_literal ]) ;) (expression_statement "pvStack_7c = p;" (assignment_expression "pvStack_7c = p" identifier = identifier) ;) (expression_statement "__dest = s->block;" (assignment_expression "__dest = s->block" identifier = (field_expression "s->block" identifier -> field_identifier)) ;) (expression_statement "awStack_20[0] = *(word32 *)(in_GS_OFFSET + 0x14);" (assignment_expression "awStack_20[0] = *(word32 *)(in_GS_OFFSET + 0x14)" (subscript_expression "awStack_20[0]" identifier [ number_literal ]) = (pointer_expression "*(word32 *)(in_GS_OFFSET + 0x14)" * (cast_expression "(word32 *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "word32 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "uVar1 = s->lenlo;" (assignment_expression "uVar1 = s->lenlo" identifier = (field_expression "s->lenlo" identifier -> field_identifier)) ;) (expression_statement "s->lenlo = len + s->lenlo;" (assignment_expression "s->lenlo = len + s->lenlo" (field_expression "s->lenlo" identifier -> field_identifier) = (binary_expression "len + s->lenlo" identifier + (field_expression "s->lenlo" identifier -> field_identifier))) ;) (expression_statement "iVar2 = s->blkused;" (assignment_expression "iVar2 = s->blkused" identifier = (field_expression "s->blkused" identifier -> field_identifier)) ;) (expression_statement "s->lenhi = s->lenhi + (uint)CARRY4(len,uVar1);" (assignment_expression "s->lenhi = s->lenhi + (uint)CARRY4(len,uVar1)" (field_expression "s->lenhi" identifier -> field_identifier) = (binary_expression "s->lenhi + (uint)CARRY4(len,uVar1)" (field_expression "s->lenhi" identifier -> field_identifier) + (cast_expression "(uint)CARRY4(len,uVar1)" ( (type_descriptor "uint" type_identifier) ) (call_expression "CARRY4(len,uVar1)" identifier (argument_list "(len,uVar1)" ( identifier , identifier )))))) ;) (expression_statement "sVar6 = iVar2 + len;" (assignment_expression "sVar6 = iVar2 + len" identifier = (binary_expression "iVar2 + len" identifier + identifier)) ;) (if_statement "if (iVar2 == 0) {\n    if (0x3f < (int)sVar6) goto LAB_000589b3;\n  }\n  else {\n    if ((int)sVar6 < 0x40) {\n      memcpy(__dest + iVar2,p,len);\n      s->blkused = s->blkused + len;\n      goto LAB_00058a6a;\n    }\nLAB_000589b3:\n    do {\n      memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2);\n      iVar2 = 0x40 - s->blkused;\n      pvStack_7c = (void *)((int)pvStack_7c + iVar2);\n      len = len - iVar2;\n      pwVar3 = awStack_60;\n      puVar5 = __dest;\n      do {\n        pwVar4 = pwVar3 + 1;\n        *pwVar3 = (uint)*puVar5 << 0x18 | (uint)puVar5[1] << 0x10 | (uint)puVar5[3] |\n                  (uint)puVar5[2] << 8;\n        pwVar3 = pwVar4;\n        puVar5 = puVar5 + 4;\n      } while (awStack_20 != pwVar4);\n      SHATransform(s->h,awStack_60);\n      s->blkused = 0;\n      iVar2 = 0;\n      sVar6 = len;\n    } while (0x3f < len);\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    if (0x3f < (int)sVar6) goto LAB_000589b3;\n  }" { (if_statement "if (0x3f < (int)sVar6) goto LAB_000589b3;" if (parenthesized_expression "(0x3f < (int)sVar6)" ( (binary_expression "0x3f < (int)sVar6" number_literal < (cast_expression "(int)sVar6" ( (type_descriptor "int" primitive_type) ) identifier)) )) (goto_statement "goto LAB_000589b3;" goto statement_identifier ;)) }) (else_clause "else {\n    if ((int)sVar6 < 0x40) {\n      memcpy(__dest + iVar2,p,len);\n      s->blkused = s->blkused + len;\n      goto LAB_00058a6a;\n    }\nLAB_000589b3:\n    do {\n      memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2);\n      iVar2 = 0x40 - s->blkused;\n      pvStack_7c = (void *)((int)pvStack_7c + iVar2);\n      len = len - iVar2;\n      pwVar3 = awStack_60;\n      puVar5 = __dest;\n      do {\n        pwVar4 = pwVar3 + 1;\n        *pwVar3 = (uint)*puVar5 << 0x18 | (uint)puVar5[1] << 0x10 | (uint)puVar5[3] |\n                  (uint)puVar5[2] << 8;\n        pwVar3 = pwVar4;\n        puVar5 = puVar5 + 4;\n      } while (awStack_20 != pwVar4);\n      SHATransform(s->h,awStack_60);\n      s->blkused = 0;\n      iVar2 = 0;\n      sVar6 = len;\n    } while (0x3f < len);\n  }" else (compound_statement "{\n    if ((int)sVar6 < 0x40) {\n      memcpy(__dest + iVar2,p,len);\n      s->blkused = s->blkused + len;\n      goto LAB_00058a6a;\n    }\nLAB_000589b3:\n    do {\n      memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2);\n      iVar2 = 0x40 - s->blkused;\n      pvStack_7c = (void *)((int)pvStack_7c + iVar2);\n      len = len - iVar2;\n      pwVar3 = awStack_60;\n      puVar5 = __dest;\n      do {\n        pwVar4 = pwVar3 + 1;\n        *pwVar3 = (uint)*puVar5 << 0x18 | (uint)puVar5[1] << 0x10 | (uint)puVar5[3] |\n                  (uint)puVar5[2] << 8;\n        pwVar3 = pwVar4;\n        puVar5 = puVar5 + 4;\n      } while (awStack_20 != pwVar4);\n      SHATransform(s->h,awStack_60);\n      s->blkused = 0;\n      iVar2 = 0;\n      sVar6 = len;\n    } while (0x3f < len);\n  }" { (if_statement "if ((int)sVar6 < 0x40) {\n      memcpy(__dest + iVar2,p,len);\n      s->blkused = s->blkused + len;\n      goto LAB_00058a6a;\n    }" if (parenthesized_expression "((int)sVar6 < 0x40)" ( (binary_expression "(int)sVar6 < 0x40" (cast_expression "(int)sVar6" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n      memcpy(__dest + iVar2,p,len);\n      s->blkused = s->blkused + len;\n      goto LAB_00058a6a;\n    }" { (expression_statement "memcpy(__dest + iVar2,p,len);" (call_expression "memcpy(__dest + iVar2,p,len)" identifier (argument_list "(__dest + iVar2,p,len)" ( (binary_expression "__dest + iVar2" identifier + identifier) , identifier , identifier ))) ;) (expression_statement "s->blkused = s->blkused + len;" (assignment_expression "s->blkused = s->blkused + len" (field_expression "s->blkused" identifier -> field_identifier) = (binary_expression "s->blkused + len" (field_expression "s->blkused" identifier -> field_identifier) + identifier)) ;) (goto_statement "goto LAB_00058a6a;" goto statement_identifier ;) })) (labeled_statement "LAB_000589b3:\n    do {\n      memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2);\n      iVar2 = 0x40 - s->blkused;\n      pvStack_7c = (void *)((int)pvStack_7c + iVar2);\n      len = len - iVar2;\n      pwVar3 = awStack_60;\n      puVar5 = __dest;\n      do {\n        pwVar4 = pwVar3 + 1;\n        *pwVar3 = (uint)*puVar5 << 0x18 | (uint)puVar5[1] << 0x10 | (uint)puVar5[3] |\n                  (uint)puVar5[2] << 8;\n        pwVar3 = pwVar4;\n        puVar5 = puVar5 + 4;\n      } while (awStack_20 != pwVar4);\n      SHATransform(s->h,awStack_60);\n      s->blkused = 0;\n      iVar2 = 0;\n      sVar6 = len;\n    } while (0x3f < len);" statement_identifier : (do_statement "do {\n      memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2);\n      iVar2 = 0x40 - s->blkused;\n      pvStack_7c = (void *)((int)pvStack_7c + iVar2);\n      len = len - iVar2;\n      pwVar3 = awStack_60;\n      puVar5 = __dest;\n      do {\n        pwVar4 = pwVar3 + 1;\n        *pwVar3 = (uint)*puVar5 << 0x18 | (uint)puVar5[1] << 0x10 | (uint)puVar5[3] |\n                  (uint)puVar5[2] << 8;\n        pwVar3 = pwVar4;\n        puVar5 = puVar5 + 4;\n      } while (awStack_20 != pwVar4);\n      SHATransform(s->h,awStack_60);\n      s->blkused = 0;\n      iVar2 = 0;\n      sVar6 = len;\n    } while (0x3f < len);" do (compound_statement "{\n      memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2);\n      iVar2 = 0x40 - s->blkused;\n      pvStack_7c = (void *)((int)pvStack_7c + iVar2);\n      len = len - iVar2;\n      pwVar3 = awStack_60;\n      puVar5 = __dest;\n      do {\n        pwVar4 = pwVar3 + 1;\n        *pwVar3 = (uint)*puVar5 << 0x18 | (uint)puVar5[1] << 0x10 | (uint)puVar5[3] |\n                  (uint)puVar5[2] << 8;\n        pwVar3 = pwVar4;\n        puVar5 = puVar5 + 4;\n      } while (awStack_20 != pwVar4);\n      SHATransform(s->h,awStack_60);\n      s->blkused = 0;\n      iVar2 = 0;\n      sVar6 = len;\n    }" { (expression_statement "memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2);" (call_expression "memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2)" identifier (argument_list "(__dest + iVar2,pvStack_7c,0x40 - iVar2)" ( (binary_expression "__dest + iVar2" identifier + identifier) , identifier , (binary_expression "0x40 - iVar2" number_literal - identifier) ))) ;) (expression_statement "iVar2 = 0x40 - s->blkused;" (assignment_expression "iVar2 = 0x40 - s->blkused" identifier = (binary_expression "0x40 - s->blkused" number_literal - (field_expression "s->blkused" identifier -> field_identifier))) ;) (expression_statement "pvStack_7c = (void *)((int)pvStack_7c + iVar2);" (assignment_expression "pvStack_7c = (void *)((int)pvStack_7c + iVar2)" identifier = (cast_expression "(void *)((int)pvStack_7c + iVar2)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvStack_7c + iVar2)" ( (binary_expression "(int)pvStack_7c + iVar2" (cast_expression "(int)pvStack_7c" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (expression_statement "len = len - iVar2;" (assignment_expression "len = len - iVar2" identifier = (binary_expression "len - iVar2" identifier - identifier)) ;) (expression_statement "pwVar3 = awStack_60;" (assignment_expression "pwVar3 = awStack_60" identifier = identifier) ;) (expression_statement "puVar5 = __dest;" (assignment_expression "puVar5 = __dest" identifier = identifier) ;) (do_statement "do {\n        pwVar4 = pwVar3 + 1;\n        *pwVar3 = (uint)*puVar5 << 0x18 | (uint)puVar5[1] << 0x10 | (uint)puVar5[3] |\n                  (uint)puVar5[2] << 8;\n        pwVar3 = pwVar4;\n        puVar5 = puVar5 + 4;\n      } while (awStack_20 != pwVar4);" do (compound_statement "{\n        pwVar4 = pwVar3 + 1;\n        *pwVar3 = (uint)*puVar5 << 0x18 | (uint)puVar5[1] << 0x10 | (uint)puVar5[3] |\n                  (uint)puVar5[2] << 8;\n        pwVar3 = pwVar4;\n        puVar5 = puVar5 + 4;\n      }" { (expression_statement "pwVar4 = pwVar3 + 1;" (assignment_expression "pwVar4 = pwVar3 + 1" identifier = (binary_expression "pwVar3 + 1" identifier + number_literal)) ;) (expression_statement "*pwVar3 = (uint)*puVar5 << 0x18 | (uint)puVar5[1] << 0x10 | (uint)puVar5[3] |\n                  (uint)puVar5[2] << 8;" (assignment_expression "*pwVar3 = (uint)*puVar5 << 0x18 | (uint)puVar5[1] << 0x10 | (uint)puVar5[3] |\n                  (uint)puVar5[2] << 8" (pointer_expression "*pwVar3" * identifier) = (binary_expression "(uint)*puVar5 << 0x18 | (uint)puVar5[1] << 0x10 | (uint)puVar5[3] |\n                  (uint)puVar5[2] << 8" (binary_expression "(uint)*puVar5 << 0x18 | (uint)puVar5[1] << 0x10 | (uint)puVar5[3]" (binary_expression "(uint)*puVar5 << 0x18 | (uint)puVar5[1] << 0x10" (binary_expression "(uint)*puVar5 << 0x18" (binary_expression "(uint)*puVar5" (parenthesized_expression "(uint)" ( identifier )) * identifier) << number_literal) | (binary_expression "(uint)puVar5[1] << 0x10" (cast_expression "(uint)puVar5[1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "puVar5[1]" identifier [ number_literal ])) << number_literal)) | (cast_expression "(uint)puVar5[3]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "puVar5[3]" identifier [ number_literal ]))) | (binary_expression "(uint)puVar5[2] << 8" (cast_expression "(uint)puVar5[2]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "puVar5[2]" identifier [ number_literal ])) << number_literal))) ;) (expression_statement "pwVar3 = pwVar4;" (assignment_expression "pwVar3 = pwVar4" identifier = identifier) ;) (expression_statement "puVar5 = puVar5 + 4;" (assignment_expression "puVar5 = puVar5 + 4" identifier = (binary_expression "puVar5 + 4" identifier + number_literal)) ;) }) while (parenthesized_expression "(awStack_20 != pwVar4)" ( (binary_expression "awStack_20 != pwVar4" identifier != identifier) )) ;) (expression_statement "SHATransform(s->h,awStack_60);" (call_expression "SHATransform(s->h,awStack_60)" identifier (argument_list "(s->h,awStack_60)" ( (field_expression "s->h" identifier -> field_identifier) , identifier ))) ;) (expression_statement "s->blkused = 0;" (assignment_expression "s->blkused = 0" (field_expression "s->blkused" identifier -> field_identifier) = number_literal) ;) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) (expression_statement "sVar6 = len;" (assignment_expression "sVar6 = len" identifier = identifier) ;) }) while (parenthesized_expression "(0x3f < len)" ( (binary_expression "0x3f < len" number_literal < identifier) )) ;)) }))) (expression_statement "memcpy(__dest,pvStack_7c,len);" (call_expression "memcpy(__dest,pvStack_7c,len)" identifier (argument_list "(__dest,pvStack_7c,len)" ( identifier , identifier , identifier ))) ;) (expression_statement "s->blkused = sVar6;" (assignment_expression "s->blkused = sVar6" (field_expression "s->blkused" identifier -> field_identifier) = identifier) ;) (labeled_statement "LAB_00058a6a:\n  if (awStack_20[0] != *(word32 *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" statement_identifier : (if_statement "if (awStack_20[0] != *(word32 *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" if (parenthesized_expression "(awStack_20[0] != *(word32 *)(in_GS_OFFSET + 0x14))" ( (binary_expression "awStack_20[0] != *(word32 *)(in_GS_OFFSET + 0x14)" (subscript_expression "awStack_20[0]" identifier [ number_literal ]) != (pointer_expression "*(word32 *)(in_GS_OFFSET + 0x14)" * (cast_expression "(word32 *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "word32 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" { comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return;" return ;) })))
(translation_unit "void thunk_FUN_00058950(int param_1,void *param_2,size_t param_3)\n\n{\n  byte *__dest;\n  uint uVar1;\n  int iVar2;\n  uint *puVar3;\n  uint *puVar4;\n  byte *pbVar5;\n  size_t sVar6;\n  int in_GS_OFFSET;\n  void *pvStack_7c;\n  uint auStack_60 [16];\n  uint auStack_20 [4];\n  \n  pvStack_7c = param_2;\n  __dest = (byte *)(param_1 + 0x14);\n  auStack_20[0] = *(uint *)(in_GS_OFFSET + 0x14);\n  uVar1 = *(uint *)(param_1 + 0x5c);\n  *(size_t *)(param_1 + 0x5c) = param_3 + *(uint *)(param_1 + 0x5c);\n  iVar2 = *(int *)(param_1 + 0x54);\n  *(int *)(param_1 + 0x58) = *(int *)(param_1 + 0x58) + (uint)CARRY4(param_3,uVar1);\n  sVar6 = iVar2 + param_3;\n  if (iVar2 == 0) {\n    if (0x3f < (int)sVar6) goto LAB_000589b3;\n  }\n  else {\n    if ((int)sVar6 < 0x40) {\n      memcpy(__dest + iVar2,param_2,param_3);\n      *(int *)(param_1 + 0x54) = *(int *)(param_1 + 0x54) + param_3;\n      goto LAB_00058a6a;\n    }\nLAB_000589b3:\n    do {\n      memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2);\n      iVar2 = 0x40 - *(int *)(param_1 + 0x54);\n      pvStack_7c = (void *)((int)pvStack_7c + iVar2);\n      param_3 = param_3 - iVar2;\n      puVar3 = auStack_60;\n      pbVar5 = __dest;\n      do {\n        puVar4 = puVar3 + 1;\n        *puVar3 = (uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3] |\n                  (uint)pbVar5[2] << 8;\n        puVar3 = puVar4;\n        pbVar5 = pbVar5 + 4;\n      } while (auStack_20 != puVar4);\n      FUN_000586d0(param_1,auStack_60);\n      *(undefined4 *)(param_1 + 0x54) = 0;\n      iVar2 = 0;\n      sVar6 = param_3;\n    } while (0x3f < (int)param_3);\n  }\n  memcpy(__dest,pvStack_7c,param_3);\n  *(size_t *)(param_1 + 0x54) = sVar6;\nLAB_00058a6a:\n  if (auStack_20[0] != *(uint *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0006dad0();\n  }\n  return;\n}\n\n" (function_definition "void thunk_FUN_00058950(int param_1,void *param_2,size_t param_3)\n\n{\n  byte *__dest;\n  uint uVar1;\n  int iVar2;\n  uint *puVar3;\n  uint *puVar4;\n  byte *pbVar5;\n  size_t sVar6;\n  int in_GS_OFFSET;\n  void *pvStack_7c;\n  uint auStack_60 [16];\n  uint auStack_20 [4];\n  \n  pvStack_7c = param_2;\n  __dest = (byte *)(param_1 + 0x14);\n  auStack_20[0] = *(uint *)(in_GS_OFFSET + 0x14);\n  uVar1 = *(uint *)(param_1 + 0x5c);\n  *(size_t *)(param_1 + 0x5c) = param_3 + *(uint *)(param_1 + 0x5c);\n  iVar2 = *(int *)(param_1 + 0x54);\n  *(int *)(param_1 + 0x58) = *(int *)(param_1 + 0x58) + (uint)CARRY4(param_3,uVar1);\n  sVar6 = iVar2 + param_3;\n  if (iVar2 == 0) {\n    if (0x3f < (int)sVar6) goto LAB_000589b3;\n  }\n  else {\n    if ((int)sVar6 < 0x40) {\n      memcpy(__dest + iVar2,param_2,param_3);\n      *(int *)(param_1 + 0x54) = *(int *)(param_1 + 0x54) + param_3;\n      goto LAB_00058a6a;\n    }\nLAB_000589b3:\n    do {\n      memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2);\n      iVar2 = 0x40 - *(int *)(param_1 + 0x54);\n      pvStack_7c = (void *)((int)pvStack_7c + iVar2);\n      param_3 = param_3 - iVar2;\n      puVar3 = auStack_60;\n      pbVar5 = __dest;\n      do {\n        puVar4 = puVar3 + 1;\n        *puVar3 = (uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3] |\n                  (uint)pbVar5[2] << 8;\n        puVar3 = puVar4;\n        pbVar5 = pbVar5 + 4;\n      } while (auStack_20 != puVar4);\n      FUN_000586d0(param_1,auStack_60);\n      *(undefined4 *)(param_1 + 0x54) = 0;\n      iVar2 = 0;\n      sVar6 = param_3;\n    } while (0x3f < (int)param_3);\n  }\n  memcpy(__dest,pvStack_7c,param_3);\n  *(size_t *)(param_1 + 0x54) = sVar6;\nLAB_00058a6a:\n  if (auStack_20[0] != *(uint *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0006dad0();\n  }\n  return;\n}" primitive_type (function_declarator "thunk_FUN_00058950(int param_1,void *param_2,size_t param_3)" identifier (parameter_list "(int param_1,void *param_2,size_t param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "void *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "size_t param_3" primitive_type identifier) ))) (compound_statement "{\n  byte *__dest;\n  uint uVar1;\n  int iVar2;\n  uint *puVar3;\n  uint *puVar4;\n  byte *pbVar5;\n  size_t sVar6;\n  int in_GS_OFFSET;\n  void *pvStack_7c;\n  uint auStack_60 [16];\n  uint auStack_20 [4];\n  \n  pvStack_7c = param_2;\n  __dest = (byte *)(param_1 + 0x14);\n  auStack_20[0] = *(uint *)(in_GS_OFFSET + 0x14);\n  uVar1 = *(uint *)(param_1 + 0x5c);\n  *(size_t *)(param_1 + 0x5c) = param_3 + *(uint *)(param_1 + 0x5c);\n  iVar2 = *(int *)(param_1 + 0x54);\n  *(int *)(param_1 + 0x58) = *(int *)(param_1 + 0x58) + (uint)CARRY4(param_3,uVar1);\n  sVar6 = iVar2 + param_3;\n  if (iVar2 == 0) {\n    if (0x3f < (int)sVar6) goto LAB_000589b3;\n  }\n  else {\n    if ((int)sVar6 < 0x40) {\n      memcpy(__dest + iVar2,param_2,param_3);\n      *(int *)(param_1 + 0x54) = *(int *)(param_1 + 0x54) + param_3;\n      goto LAB_00058a6a;\n    }\nLAB_000589b3:\n    do {\n      memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2);\n      iVar2 = 0x40 - *(int *)(param_1 + 0x54);\n      pvStack_7c = (void *)((int)pvStack_7c + iVar2);\n      param_3 = param_3 - iVar2;\n      puVar3 = auStack_60;\n      pbVar5 = __dest;\n      do {\n        puVar4 = puVar3 + 1;\n        *puVar3 = (uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3] |\n                  (uint)pbVar5[2] << 8;\n        puVar3 = puVar4;\n        pbVar5 = pbVar5 + 4;\n      } while (auStack_20 != puVar4);\n      FUN_000586d0(param_1,auStack_60);\n      *(undefined4 *)(param_1 + 0x54) = 0;\n      iVar2 = 0;\n      sVar6 = param_3;\n    } while (0x3f < (int)param_3);\n  }\n  memcpy(__dest,pvStack_7c,param_3);\n  *(size_t *)(param_1 + 0x54) = sVar6;\nLAB_00058a6a:\n  if (auStack_20[0] != *(uint *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0006dad0();\n  }\n  return;\n}" { (declaration "byte *__dest;" type_identifier (pointer_declarator "*__dest" * identifier) ;) (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "uint *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "byte *pbVar5;" type_identifier (pointer_declarator "*pbVar5" * identifier) ;) (declaration "size_t sVar6;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "void *pvStack_7c;" primitive_type (pointer_declarator "*pvStack_7c" * identifier) ;) (declaration "uint auStack_60 [16];" type_identifier (array_declarator "auStack_60 [16]" identifier [ number_literal ]) ;) (declaration "uint auStack_20 [4];" type_identifier (array_declarator "auStack_20 [4]" identifier [ number_literal ]) ;) (expression_statement "pvStack_7c = param_2;" (assignment_expression "pvStack_7c = param_2" identifier = identifier) ;) (expression_statement "__dest = (byte *)(param_1 + 0x14);" (assignment_expression "__dest = (byte *)(param_1 + 0x14)" identifier = (cast_expression "(byte *)(param_1 + 0x14)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) ;) (expression_statement "auStack_20[0] = *(uint *)(in_GS_OFFSET + 0x14);" (assignment_expression "auStack_20[0] = *(uint *)(in_GS_OFFSET + 0x14)" (subscript_expression "auStack_20[0]" identifier [ number_literal ]) = (pointer_expression "*(uint *)(in_GS_OFFSET + 0x14)" * (cast_expression "(uint *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "uVar1 = *(uint *)(param_1 + 0x5c);" (assignment_expression "uVar1 = *(uint *)(param_1 + 0x5c)" identifier = (pointer_expression "*(uint *)(param_1 + 0x5c)" * (cast_expression "(uint *)(param_1 + 0x5c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x5c)" ( (binary_expression "param_1 + 0x5c" identifier + number_literal) ))))) ;) (expression_statement "*(size_t *)(param_1 + 0x5c) = param_3 + *(uint *)(param_1 + 0x5c);" (assignment_expression "*(size_t *)(param_1 + 0x5c) = param_3 + *(uint *)(param_1 + 0x5c)" (pointer_expression "*(size_t *)(param_1 + 0x5c)" * (cast_expression "(size_t *)(param_1 + 0x5c)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x5c)" ( (binary_expression "param_1 + 0x5c" identifier + number_literal) )))) = (binary_expression "param_3 + *(uint *)(param_1 + 0x5c)" identifier + (pointer_expression "*(uint *)(param_1 + 0x5c)" * (cast_expression "(uint *)(param_1 + 0x5c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x5c)" ( (binary_expression "param_1 + 0x5c" identifier + number_literal) )))))) ;) (expression_statement "iVar2 = *(int *)(param_1 + 0x54);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x54)" identifier = (pointer_expression "*(int *)(param_1 + 0x54)" * (cast_expression "(int *)(param_1 + 0x54)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x54)" ( (binary_expression "param_1 + 0x54" identifier + number_literal) ))))) ;) (expression_statement "*(int *)(param_1 + 0x58) = *(int *)(param_1 + 0x58) + (uint)CARRY4(param_3,uVar1);" (assignment_expression "*(int *)(param_1 + 0x58) = *(int *)(param_1 + 0x58) + (uint)CARRY4(param_3,uVar1)" (pointer_expression "*(int *)(param_1 + 0x58)" * (cast_expression "(int *)(param_1 + 0x58)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x58)" ( (binary_expression "param_1 + 0x58" identifier + number_literal) )))) = (binary_expression "*(int *)(param_1 + 0x58) + (uint)CARRY4(param_3,uVar1)" (pointer_expression "*(int *)(param_1 + 0x58)" * (cast_expression "(int *)(param_1 + 0x58)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x58)" ( (binary_expression "param_1 + 0x58" identifier + number_literal) )))) + (cast_expression "(uint)CARRY4(param_3,uVar1)" ( (type_descriptor "uint" type_identifier) ) (call_expression "CARRY4(param_3,uVar1)" identifier (argument_list "(param_3,uVar1)" ( identifier , identifier )))))) ;) (expression_statement "sVar6 = iVar2 + param_3;" (assignment_expression "sVar6 = iVar2 + param_3" identifier = (binary_expression "iVar2 + param_3" identifier + identifier)) ;) (if_statement "if (iVar2 == 0) {\n    if (0x3f < (int)sVar6) goto LAB_000589b3;\n  }\n  else {\n    if ((int)sVar6 < 0x40) {\n      memcpy(__dest + iVar2,param_2,param_3);\n      *(int *)(param_1 + 0x54) = *(int *)(param_1 + 0x54) + param_3;\n      goto LAB_00058a6a;\n    }\nLAB_000589b3:\n    do {\n      memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2);\n      iVar2 = 0x40 - *(int *)(param_1 + 0x54);\n      pvStack_7c = (void *)((int)pvStack_7c + iVar2);\n      param_3 = param_3 - iVar2;\n      puVar3 = auStack_60;\n      pbVar5 = __dest;\n      do {\n        puVar4 = puVar3 + 1;\n        *puVar3 = (uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3] |\n                  (uint)pbVar5[2] << 8;\n        puVar3 = puVar4;\n        pbVar5 = pbVar5 + 4;\n      } while (auStack_20 != puVar4);\n      FUN_000586d0(param_1,auStack_60);\n      *(undefined4 *)(param_1 + 0x54) = 0;\n      iVar2 = 0;\n      sVar6 = param_3;\n    } while (0x3f < (int)param_3);\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    if (0x3f < (int)sVar6) goto LAB_000589b3;\n  }" { (if_statement "if (0x3f < (int)sVar6) goto LAB_000589b3;" if (parenthesized_expression "(0x3f < (int)sVar6)" ( (binary_expression "0x3f < (int)sVar6" number_literal < (cast_expression "(int)sVar6" ( (type_descriptor "int" primitive_type) ) identifier)) )) (goto_statement "goto LAB_000589b3;" goto statement_identifier ;)) }) (else_clause "else {\n    if ((int)sVar6 < 0x40) {\n      memcpy(__dest + iVar2,param_2,param_3);\n      *(int *)(param_1 + 0x54) = *(int *)(param_1 + 0x54) + param_3;\n      goto LAB_00058a6a;\n    }\nLAB_000589b3:\n    do {\n      memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2);\n      iVar2 = 0x40 - *(int *)(param_1 + 0x54);\n      pvStack_7c = (void *)((int)pvStack_7c + iVar2);\n      param_3 = param_3 - iVar2;\n      puVar3 = auStack_60;\n      pbVar5 = __dest;\n      do {\n        puVar4 = puVar3 + 1;\n        *puVar3 = (uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3] |\n                  (uint)pbVar5[2] << 8;\n        puVar3 = puVar4;\n        pbVar5 = pbVar5 + 4;\n      } while (auStack_20 != puVar4);\n      FUN_000586d0(param_1,auStack_60);\n      *(undefined4 *)(param_1 + 0x54) = 0;\n      iVar2 = 0;\n      sVar6 = param_3;\n    } while (0x3f < (int)param_3);\n  }" else (compound_statement "{\n    if ((int)sVar6 < 0x40) {\n      memcpy(__dest + iVar2,param_2,param_3);\n      *(int *)(param_1 + 0x54) = *(int *)(param_1 + 0x54) + param_3;\n      goto LAB_00058a6a;\n    }\nLAB_000589b3:\n    do {\n      memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2);\n      iVar2 = 0x40 - *(int *)(param_1 + 0x54);\n      pvStack_7c = (void *)((int)pvStack_7c + iVar2);\n      param_3 = param_3 - iVar2;\n      puVar3 = auStack_60;\n      pbVar5 = __dest;\n      do {\n        puVar4 = puVar3 + 1;\n        *puVar3 = (uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3] |\n                  (uint)pbVar5[2] << 8;\n        puVar3 = puVar4;\n        pbVar5 = pbVar5 + 4;\n      } while (auStack_20 != puVar4);\n      FUN_000586d0(param_1,auStack_60);\n      *(undefined4 *)(param_1 + 0x54) = 0;\n      iVar2 = 0;\n      sVar6 = param_3;\n    } while (0x3f < (int)param_3);\n  }" { (if_statement "if ((int)sVar6 < 0x40) {\n      memcpy(__dest + iVar2,param_2,param_3);\n      *(int *)(param_1 + 0x54) = *(int *)(param_1 + 0x54) + param_3;\n      goto LAB_00058a6a;\n    }" if (parenthesized_expression "((int)sVar6 < 0x40)" ( (binary_expression "(int)sVar6 < 0x40" (cast_expression "(int)sVar6" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n      memcpy(__dest + iVar2,param_2,param_3);\n      *(int *)(param_1 + 0x54) = *(int *)(param_1 + 0x54) + param_3;\n      goto LAB_00058a6a;\n    }" { (expression_statement "memcpy(__dest + iVar2,param_2,param_3);" (call_expression "memcpy(__dest + iVar2,param_2,param_3)" identifier (argument_list "(__dest + iVar2,param_2,param_3)" ( (binary_expression "__dest + iVar2" identifier + identifier) , identifier , identifier ))) ;) (expression_statement "*(int *)(param_1 + 0x54) = *(int *)(param_1 + 0x54) + param_3;" (assignment_expression "*(int *)(param_1 + 0x54) = *(int *)(param_1 + 0x54) + param_3" (pointer_expression "*(int *)(param_1 + 0x54)" * (cast_expression "(int *)(param_1 + 0x54)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x54)" ( (binary_expression "param_1 + 0x54" identifier + number_literal) )))) = (binary_expression "*(int *)(param_1 + 0x54) + param_3" (pointer_expression "*(int *)(param_1 + 0x54)" * (cast_expression "(int *)(param_1 + 0x54)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x54)" ( (binary_expression "param_1 + 0x54" identifier + number_literal) )))) + identifier)) ;) (goto_statement "goto LAB_00058a6a;" goto statement_identifier ;) })) (labeled_statement "LAB_000589b3:\n    do {\n      memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2);\n      iVar2 = 0x40 - *(int *)(param_1 + 0x54);\n      pvStack_7c = (void *)((int)pvStack_7c + iVar2);\n      param_3 = param_3 - iVar2;\n      puVar3 = auStack_60;\n      pbVar5 = __dest;\n      do {\n        puVar4 = puVar3 + 1;\n        *puVar3 = (uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3] |\n                  (uint)pbVar5[2] << 8;\n        puVar3 = puVar4;\n        pbVar5 = pbVar5 + 4;\n      } while (auStack_20 != puVar4);\n      FUN_000586d0(param_1,auStack_60);\n      *(undefined4 *)(param_1 + 0x54) = 0;\n      iVar2 = 0;\n      sVar6 = param_3;\n    } while (0x3f < (int)param_3);" statement_identifier : (do_statement "do {\n      memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2);\n      iVar2 = 0x40 - *(int *)(param_1 + 0x54);\n      pvStack_7c = (void *)((int)pvStack_7c + iVar2);\n      param_3 = param_3 - iVar2;\n      puVar3 = auStack_60;\n      pbVar5 = __dest;\n      do {\n        puVar4 = puVar3 + 1;\n        *puVar3 = (uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3] |\n                  (uint)pbVar5[2] << 8;\n        puVar3 = puVar4;\n        pbVar5 = pbVar5 + 4;\n      } while (auStack_20 != puVar4);\n      FUN_000586d0(param_1,auStack_60);\n      *(undefined4 *)(param_1 + 0x54) = 0;\n      iVar2 = 0;\n      sVar6 = param_3;\n    } while (0x3f < (int)param_3);" do (compound_statement "{\n      memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2);\n      iVar2 = 0x40 - *(int *)(param_1 + 0x54);\n      pvStack_7c = (void *)((int)pvStack_7c + iVar2);\n      param_3 = param_3 - iVar2;\n      puVar3 = auStack_60;\n      pbVar5 = __dest;\n      do {\n        puVar4 = puVar3 + 1;\n        *puVar3 = (uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3] |\n                  (uint)pbVar5[2] << 8;\n        puVar3 = puVar4;\n        pbVar5 = pbVar5 + 4;\n      } while (auStack_20 != puVar4);\n      FUN_000586d0(param_1,auStack_60);\n      *(undefined4 *)(param_1 + 0x54) = 0;\n      iVar2 = 0;\n      sVar6 = param_3;\n    }" { (expression_statement "memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2);" (call_expression "memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2)" identifier (argument_list "(__dest + iVar2,pvStack_7c,0x40 - iVar2)" ( (binary_expression "__dest + iVar2" identifier + identifier) , identifier , (binary_expression "0x40 - iVar2" number_literal - identifier) ))) ;) (expression_statement "iVar2 = 0x40 - *(int *)(param_1 + 0x54);" (assignment_expression "iVar2 = 0x40 - *(int *)(param_1 + 0x54)" identifier = (binary_expression "0x40 - *(int *)(param_1 + 0x54)" number_literal - (pointer_expression "*(int *)(param_1 + 0x54)" * (cast_expression "(int *)(param_1 + 0x54)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x54)" ( (binary_expression "param_1 + 0x54" identifier + number_literal) )))))) ;) (expression_statement "pvStack_7c = (void *)((int)pvStack_7c + iVar2);" (assignment_expression "pvStack_7c = (void *)((int)pvStack_7c + iVar2)" identifier = (cast_expression "(void *)((int)pvStack_7c + iVar2)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvStack_7c + iVar2)" ( (binary_expression "(int)pvStack_7c + iVar2" (cast_expression "(int)pvStack_7c" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (expression_statement "param_3 = param_3 - iVar2;" (assignment_expression "param_3 = param_3 - iVar2" identifier = (binary_expression "param_3 - iVar2" identifier - identifier)) ;) (expression_statement "puVar3 = auStack_60;" (assignment_expression "puVar3 = auStack_60" identifier = identifier) ;) (expression_statement "pbVar5 = __dest;" (assignment_expression "pbVar5 = __dest" identifier = identifier) ;) (do_statement "do {\n        puVar4 = puVar3 + 1;\n        *puVar3 = (uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3] |\n                  (uint)pbVar5[2] << 8;\n        puVar3 = puVar4;\n        pbVar5 = pbVar5 + 4;\n      } while (auStack_20 != puVar4);" do (compound_statement "{\n        puVar4 = puVar3 + 1;\n        *puVar3 = (uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3] |\n                  (uint)pbVar5[2] << 8;\n        puVar3 = puVar4;\n        pbVar5 = pbVar5 + 4;\n      }" { (expression_statement "puVar4 = puVar3 + 1;" (assignment_expression "puVar4 = puVar3 + 1" identifier = (binary_expression "puVar3 + 1" identifier + number_literal)) ;) (expression_statement "*puVar3 = (uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3] |\n                  (uint)pbVar5[2] << 8;" (assignment_expression "*puVar3 = (uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3] |\n                  (uint)pbVar5[2] << 8" (pointer_expression "*puVar3" * identifier) = (binary_expression "(uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3] |\n                  (uint)pbVar5[2] << 8" (binary_expression "(uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3]" (binary_expression "(uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10" (binary_expression "(uint)*pbVar5 << 0x18" (binary_expression "(uint)*pbVar5" (parenthesized_expression "(uint)" ( identifier )) * identifier) << number_literal) | (binary_expression "(uint)pbVar5[1] << 0x10" (cast_expression "(uint)pbVar5[1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pbVar5[1]" identifier [ number_literal ])) << number_literal)) | (cast_expression "(uint)pbVar5[3]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pbVar5[3]" identifier [ number_literal ]))) | (binary_expression "(uint)pbVar5[2] << 8" (cast_expression "(uint)pbVar5[2]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pbVar5[2]" identifier [ number_literal ])) << number_literal))) ;) (expression_statement "puVar3 = puVar4;" (assignment_expression "puVar3 = puVar4" identifier = identifier) ;) (expression_statement "pbVar5 = pbVar5 + 4;" (assignment_expression "pbVar5 = pbVar5 + 4" identifier = (binary_expression "pbVar5 + 4" identifier + number_literal)) ;) }) while (parenthesized_expression "(auStack_20 != puVar4)" ( (binary_expression "auStack_20 != puVar4" identifier != identifier) )) ;) (expression_statement "FUN_000586d0(param_1,auStack_60);" (call_expression "FUN_000586d0(param_1,auStack_60)" identifier (argument_list "(param_1,auStack_60)" ( identifier , identifier ))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x54) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x54) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x54)" * (cast_expression "(undefined4 *)(param_1 + 0x54)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x54)" ( (binary_expression "param_1 + 0x54" identifier + number_literal) )))) = number_literal) ;) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) (expression_statement "sVar6 = param_3;" (assignment_expression "sVar6 = param_3" identifier = identifier) ;) }) while (parenthesized_expression "(0x3f < (int)param_3)" ( (binary_expression "0x3f < (int)param_3" number_literal < (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier)) )) ;)) }))) (expression_statement "memcpy(__dest,pvStack_7c,param_3);" (call_expression "memcpy(__dest,pvStack_7c,param_3)" identifier (argument_list "(__dest,pvStack_7c,param_3)" ( identifier , identifier , identifier ))) ;) (expression_statement "*(size_t *)(param_1 + 0x54) = sVar6;" (assignment_expression "*(size_t *)(param_1 + 0x54) = sVar6" (pointer_expression "*(size_t *)(param_1 + 0x54)" * (cast_expression "(size_t *)(param_1 + 0x54)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x54)" ( (binary_expression "param_1 + 0x54" identifier + number_literal) )))) = identifier) ;) (labeled_statement "LAB_00058a6a:\n  if (auStack_20[0] != *(uint *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0006dad0();\n  }" statement_identifier : (if_statement "if (auStack_20[0] != *(uint *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0006dad0();\n  }" if (parenthesized_expression "(auStack_20[0] != *(uint *)(in_GS_OFFSET + 0x14))" ( (binary_expression "auStack_20[0] != *(uint *)(in_GS_OFFSET + 0x14)" (subscript_expression "auStack_20[0]" identifier [ number_literal ]) != (pointer_expression "*(uint *)(in_GS_OFFSET + 0x14)" * (cast_expression "(uint *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    \n    FUN_0006dad0();\n  }" { (expression_statement "FUN_0006dad0();" (call_expression "FUN_0006dad0()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + (cast_expression ( (type_descriptor TYPE) ) (call_expression IDENT (argument_list ( IDENT , IDENT )))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression LIT < (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) (goto_statement goto statement_identifier ;)) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + IDENT) , IDENT , IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + IDENT)) ;) (goto_statement goto statement_identifier ;) })) (labeled_statement statement_identifier : (do_statement do (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + IDENT) , IDENT , (binary_expression LIT - IDENT) ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression LIT - (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 *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + IDENT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (binary_expression (binary_expression (binary_expression (binary_expression (parenthesized_expression ( IDENT )) * IDENT) << LIT) | (binary_expression (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])) << LIT)) | (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ]))) | (binary_expression (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])) << LIT))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) while (parenthesized_expression ( (binary_expression LIT < (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) ;)) }))) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) }))) (return_statement return ;) })))
(function_definition "void thunk_FUN_00058950(int param_1,void *param_2,size_t param_3)\n\n{\n  byte *__dest;\n  uint uVar1;\n  int iVar2;\n  uint *puVar3;\n  uint *puVar4;\n  byte *pbVar5;\n  size_t sVar6;\n  int in_GS_OFFSET;\n  void *pvStack_7c;\n  uint auStack_60 [16];\n  uint auStack_20 [4];\n  \n  pvStack_7c = param_2;\n  __dest = (byte *)(param_1 + 0x14);\n  auStack_20[0] = *(uint *)(in_GS_OFFSET + 0x14);\n  uVar1 = *(uint *)(param_1 + 0x5c);\n  *(size_t *)(param_1 + 0x5c) = param_3 + *(uint *)(param_1 + 0x5c);\n  iVar2 = *(int *)(param_1 + 0x54);\n  *(int *)(param_1 + 0x58) = *(int *)(param_1 + 0x58) + (uint)CARRY4(param_3,uVar1);\n  sVar6 = iVar2 + param_3;\n  if (iVar2 == 0) {\n    if (0x3f < (int)sVar6) goto LAB_000589b3;\n  }\n  else {\n    if ((int)sVar6 < 0x40) {\n      memcpy(__dest + iVar2,param_2,param_3);\n      *(int *)(param_1 + 0x54) = *(int *)(param_1 + 0x54) + param_3;\n      goto LAB_00058a6a;\n    }\nLAB_000589b3:\n    do {\n      memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2);\n      iVar2 = 0x40 - *(int *)(param_1 + 0x54);\n      pvStack_7c = (void *)((int)pvStack_7c + iVar2);\n      param_3 = param_3 - iVar2;\n      puVar3 = auStack_60;\n      pbVar5 = __dest;\n      do {\n        puVar4 = puVar3 + 1;\n        *puVar3 = (uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3] |\n                  (uint)pbVar5[2] << 8;\n        puVar3 = puVar4;\n        pbVar5 = pbVar5 + 4;\n      } while (auStack_20 != puVar4);\n      FUN_000586d0(param_1,auStack_60);\n      *(undefined4 *)(param_1 + 0x54) = 0;\n      iVar2 = 0;\n      sVar6 = param_3;\n    } while (0x3f < (int)param_3);\n  }\n  memcpy(__dest,pvStack_7c,param_3);\n  *(size_t *)(param_1 + 0x54) = sVar6;\nLAB_00058a6a:\n  if (auStack_20[0] != *(uint *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0006dad0();\n  }\n  return;\n}" (primitive_type "void") (function_declarator "thunk_FUN_00058950(int param_1,void *param_2,size_t param_3)" (identifier "thunk_FUN_00058950") (parameter_list "(int param_1,void *param_2,size_t param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "void *param_2" (primitive_type "void") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "size_t param_3" (primitive_type "size_t") (identifier "param_3")) () ")"))) (compound_statement "{\n  byte *__dest;\n  uint uVar1;\n  int iVar2;\n  uint *puVar3;\n  uint *puVar4;\n  byte *pbVar5;\n  size_t sVar6;\n  int in_GS_OFFSET;\n  void *pvStack_7c;\n  uint auStack_60 [16];\n  uint auStack_20 [4];\n  \n  pvStack_7c = param_2;\n  __dest = (byte *)(param_1 + 0x14);\n  auStack_20[0] = *(uint *)(in_GS_OFFSET + 0x14);\n  uVar1 = *(uint *)(param_1 + 0x5c);\n  *(size_t *)(param_1 + 0x5c) = param_3 + *(uint *)(param_1 + 0x5c);\n  iVar2 = *(int *)(param_1 + 0x54);\n  *(int *)(param_1 + 0x58) = *(int *)(param_1 + 0x58) + (uint)CARRY4(param_3,uVar1);\n  sVar6 = iVar2 + param_3;\n  if (iVar2 == 0) {\n    if (0x3f < (int)sVar6) goto LAB_000589b3;\n  }\n  else {\n    if ((int)sVar6 < 0x40) {\n      memcpy(__dest + iVar2,param_2,param_3);\n      *(int *)(param_1 + 0x54) = *(int *)(param_1 + 0x54) + param_3;\n      goto LAB_00058a6a;\n    }\nLAB_000589b3:\n    do {\n      memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2);\n      iVar2 = 0x40 - *(int *)(param_1 + 0x54);\n      pvStack_7c = (void *)((int)pvStack_7c + iVar2);\n      param_3 = param_3 - iVar2;\n      puVar3 = auStack_60;\n      pbVar5 = __dest;\n      do {\n        puVar4 = puVar3 + 1;\n        *puVar3 = (uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3] |\n                  (uint)pbVar5[2] << 8;\n        puVar3 = puVar4;\n        pbVar5 = pbVar5 + 4;\n      } while (auStack_20 != puVar4);\n      FUN_000586d0(param_1,auStack_60);\n      *(undefined4 *)(param_1 + 0x54) = 0;\n      iVar2 = 0;\n      sVar6 = param_3;\n    } while (0x3f < (int)param_3);\n  }\n  memcpy(__dest,pvStack_7c,param_3);\n  *(size_t *)(param_1 + 0x54) = sVar6;\nLAB_00058a6a:\n  if (auStack_20[0] != *(uint *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0006dad0();\n  }\n  return;\n}" ({ "{") (declaration "byte *__dest;" (type_identifier "byte") (pointer_declarator "*__dest" (* "*") (identifier "__dest")) (; ";")) (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "uint *puVar3;" (type_identifier "uint") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "uint *puVar4;" (type_identifier "uint") (pointer_declarator "*puVar4" (* "*") (identifier "puVar4")) (; ";")) (declaration "byte *pbVar5;" (type_identifier "byte") (pointer_declarator "*pbVar5" (* "*") (identifier "pbVar5")) (; ";")) (declaration "size_t sVar6;" (primitive_type "size_t") (identifier "sVar6") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "void *pvStack_7c;" (primitive_type "void") (pointer_declarator "*pvStack_7c" (* "*") (identifier "pvStack_7c")) (; ";")) (declaration "uint auStack_60 [16];" (type_identifier "uint") (array_declarator "auStack_60 [16]" (identifier "auStack_60") ([ "[") (number_literal "16") (] "]")) (; ";")) (declaration "uint auStack_20 [4];" (type_identifier "uint") (array_declarator "auStack_20 [4]" (identifier "auStack_20") ([ "[") (number_literal "4") (] "]")) (; ";")) (expression_statement "pvStack_7c = param_2;" (assignment_expression "pvStack_7c = param_2" (identifier "pvStack_7c") (= "=") (identifier "param_2")) (; ";")) (expression_statement "__dest = (byte *)(param_1 + 0x14);" (assignment_expression "__dest = (byte *)(param_1 + 0x14)" (identifier "__dest") (= "=") (cast_expression "(byte *)(param_1 + 0x14)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")")))) (; ";")) (expression_statement "auStack_20[0] = *(uint *)(in_GS_OFFSET + 0x14);" (assignment_expression "auStack_20[0] = *(uint *)(in_GS_OFFSET + 0x14)" (subscript_expression "auStack_20[0]" (identifier "auStack_20") ([ "[") (number_literal "0") (] "]")) (= "=") (pointer_expression "*(uint *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(uint *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "uVar1 = *(uint *)(param_1 + 0x5c);" (assignment_expression "uVar1 = *(uint *)(param_1 + 0x5c)" (identifier "uVar1") (= "=") (pointer_expression "*(uint *)(param_1 + 0x5c)" (* "*") (cast_expression "(uint *)(param_1 + 0x5c)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x5c)" (( "(") (binary_expression "param_1 + 0x5c" (identifier "param_1") (+ "+") (number_literal "0x5c")) () ")"))))) (; ";")) (expression_statement "*(size_t *)(param_1 + 0x5c) = param_3 + *(uint *)(param_1 + 0x5c);" (assignment_expression "*(size_t *)(param_1 + 0x5c) = param_3 + *(uint *)(param_1 + 0x5c)" (pointer_expression "*(size_t *)(param_1 + 0x5c)" (* "*") (cast_expression "(size_t *)(param_1 + 0x5c)" (( "(") (type_descriptor "size_t *" (primitive_type "size_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x5c)" (( "(") (binary_expression "param_1 + 0x5c" (identifier "param_1") (+ "+") (number_literal "0x5c")) () ")")))) (= "=") (binary_expression "param_3 + *(uint *)(param_1 + 0x5c)" (identifier "param_3") (+ "+") (pointer_expression "*(uint *)(param_1 + 0x5c)" (* "*") (cast_expression "(uint *)(param_1 + 0x5c)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x5c)" (( "(") (binary_expression "param_1 + 0x5c" (identifier "param_1") (+ "+") (number_literal "0x5c")) () ")")))))) (; ";")) (expression_statement "iVar2 = *(int *)(param_1 + 0x54);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x54)" (identifier "iVar2") (= "=") (pointer_expression "*(int *)(param_1 + 0x54)" (* "*") (cast_expression "(int *)(param_1 + 0x54)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x54)" (( "(") (binary_expression "param_1 + 0x54" (identifier "param_1") (+ "+") (number_literal "0x54")) () ")"))))) (; ";")) (expression_statement "*(int *)(param_1 + 0x58) = *(int *)(param_1 + 0x58) + (uint)CARRY4(param_3,uVar1);" (assignment_expression "*(int *)(param_1 + 0x58) = *(int *)(param_1 + 0x58) + (uint)CARRY4(param_3,uVar1)" (pointer_expression "*(int *)(param_1 + 0x58)" (* "*") (cast_expression "(int *)(param_1 + 0x58)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x58)" (( "(") (binary_expression "param_1 + 0x58" (identifier "param_1") (+ "+") (number_literal "0x58")) () ")")))) (= "=") (binary_expression "*(int *)(param_1 + 0x58) + (uint)CARRY4(param_3,uVar1)" (pointer_expression "*(int *)(param_1 + 0x58)" (* "*") (cast_expression "(int *)(param_1 + 0x58)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x58)" (( "(") (binary_expression "param_1 + 0x58" (identifier "param_1") (+ "+") (number_literal "0x58")) () ")")))) (+ "+") (cast_expression "(uint)CARRY4(param_3,uVar1)" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (call_expression "CARRY4(param_3,uVar1)" (identifier "CARRY4") (argument_list "(param_3,uVar1)" (( "(") (identifier "param_3") (, ",") (identifier "uVar1") () ")")))))) (; ";")) (expression_statement "sVar6 = iVar2 + param_3;" (assignment_expression "sVar6 = iVar2 + param_3" (identifier "sVar6") (= "=") (binary_expression "iVar2 + param_3" (identifier "iVar2") (+ "+") (identifier "param_3"))) (; ";")) (if_statement "if (iVar2 == 0) {\n    if (0x3f < (int)sVar6) goto LAB_000589b3;\n  }\n  else {\n    if ((int)sVar6 < 0x40) {\n      memcpy(__dest + iVar2,param_2,param_3);\n      *(int *)(param_1 + 0x54) = *(int *)(param_1 + 0x54) + param_3;\n      goto LAB_00058a6a;\n    }\nLAB_000589b3:\n    do {\n      memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2);\n      iVar2 = 0x40 - *(int *)(param_1 + 0x54);\n      pvStack_7c = (void *)((int)pvStack_7c + iVar2);\n      param_3 = param_3 - iVar2;\n      puVar3 = auStack_60;\n      pbVar5 = __dest;\n      do {\n        puVar4 = puVar3 + 1;\n        *puVar3 = (uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3] |\n                  (uint)pbVar5[2] << 8;\n        puVar3 = puVar4;\n        pbVar5 = pbVar5 + 4;\n      } while (auStack_20 != puVar4);\n      FUN_000586d0(param_1,auStack_60);\n      *(undefined4 *)(param_1 + 0x54) = 0;\n      iVar2 = 0;\n      sVar6 = param_3;\n    } while (0x3f < (int)param_3);\n  }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    if (0x3f < (int)sVar6) goto LAB_000589b3;\n  }" ({ "{") (if_statement "if (0x3f < (int)sVar6) goto LAB_000589b3;" (if "if") (parenthesized_expression "(0x3f < (int)sVar6)" (( "(") (binary_expression "0x3f < (int)sVar6" (number_literal "0x3f") (< "<") (cast_expression "(int)sVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "sVar6"))) () ")")) (goto_statement "goto LAB_000589b3;" (goto "goto") (statement_identifier "LAB_000589b3") (; ";"))) (} "}")) (else_clause "else {\n    if ((int)sVar6 < 0x40) {\n      memcpy(__dest + iVar2,param_2,param_3);\n      *(int *)(param_1 + 0x54) = *(int *)(param_1 + 0x54) + param_3;\n      goto LAB_00058a6a;\n    }\nLAB_000589b3:\n    do {\n      memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2);\n      iVar2 = 0x40 - *(int *)(param_1 + 0x54);\n      pvStack_7c = (void *)((int)pvStack_7c + iVar2);\n      param_3 = param_3 - iVar2;\n      puVar3 = auStack_60;\n      pbVar5 = __dest;\n      do {\n        puVar4 = puVar3 + 1;\n        *puVar3 = (uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3] |\n                  (uint)pbVar5[2] << 8;\n        puVar3 = puVar4;\n        pbVar5 = pbVar5 + 4;\n      } while (auStack_20 != puVar4);\n      FUN_000586d0(param_1,auStack_60);\n      *(undefined4 *)(param_1 + 0x54) = 0;\n      iVar2 = 0;\n      sVar6 = param_3;\n    } while (0x3f < (int)param_3);\n  }" (else "else") (compound_statement "{\n    if ((int)sVar6 < 0x40) {\n      memcpy(__dest + iVar2,param_2,param_3);\n      *(int *)(param_1 + 0x54) = *(int *)(param_1 + 0x54) + param_3;\n      goto LAB_00058a6a;\n    }\nLAB_000589b3:\n    do {\n      memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2);\n      iVar2 = 0x40 - *(int *)(param_1 + 0x54);\n      pvStack_7c = (void *)((int)pvStack_7c + iVar2);\n      param_3 = param_3 - iVar2;\n      puVar3 = auStack_60;\n      pbVar5 = __dest;\n      do {\n        puVar4 = puVar3 + 1;\n        *puVar3 = (uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3] |\n                  (uint)pbVar5[2] << 8;\n        puVar3 = puVar4;\n        pbVar5 = pbVar5 + 4;\n      } while (auStack_20 != puVar4);\n      FUN_000586d0(param_1,auStack_60);\n      *(undefined4 *)(param_1 + 0x54) = 0;\n      iVar2 = 0;\n      sVar6 = param_3;\n    } while (0x3f < (int)param_3);\n  }" ({ "{") (if_statement "if ((int)sVar6 < 0x40) {\n      memcpy(__dest + iVar2,param_2,param_3);\n      *(int *)(param_1 + 0x54) = *(int *)(param_1 + 0x54) + param_3;\n      goto LAB_00058a6a;\n    }" (if "if") (parenthesized_expression "((int)sVar6 < 0x40)" (( "(") (binary_expression "(int)sVar6 < 0x40" (cast_expression "(int)sVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "sVar6")) (< "<") (number_literal "0x40")) () ")")) (compound_statement "{\n      memcpy(__dest + iVar2,param_2,param_3);\n      *(int *)(param_1 + 0x54) = *(int *)(param_1 + 0x54) + param_3;\n      goto LAB_00058a6a;\n    }" ({ "{") (expression_statement "memcpy(__dest + iVar2,param_2,param_3);" (call_expression "memcpy(__dest + iVar2,param_2,param_3)" (identifier "memcpy") (argument_list "(__dest + iVar2,param_2,param_3)" (( "(") (binary_expression "__dest + iVar2" (identifier "__dest") (+ "+") (identifier "iVar2")) (, ",") (identifier "param_2") (, ",") (identifier "param_3") () ")"))) (; ";")) (expression_statement "*(int *)(param_1 + 0x54) = *(int *)(param_1 + 0x54) + param_3;" (assignment_expression "*(int *)(param_1 + 0x54) = *(int *)(param_1 + 0x54) + param_3" (pointer_expression "*(int *)(param_1 + 0x54)" (* "*") (cast_expression "(int *)(param_1 + 0x54)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x54)" (( "(") (binary_expression "param_1 + 0x54" (identifier "param_1") (+ "+") (number_literal "0x54")) () ")")))) (= "=") (binary_expression "*(int *)(param_1 + 0x54) + param_3" (pointer_expression "*(int *)(param_1 + 0x54)" (* "*") (cast_expression "(int *)(param_1 + 0x54)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x54)" (( "(") (binary_expression "param_1 + 0x54" (identifier "param_1") (+ "+") (number_literal "0x54")) () ")")))) (+ "+") (identifier "param_3"))) (; ";")) (goto_statement "goto LAB_00058a6a;" (goto "goto") (statement_identifier "LAB_00058a6a") (; ";")) (} "}"))) (labeled_statement "LAB_000589b3:\n    do {\n      memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2);\n      iVar2 = 0x40 - *(int *)(param_1 + 0x54);\n      pvStack_7c = (void *)((int)pvStack_7c + iVar2);\n      param_3 = param_3 - iVar2;\n      puVar3 = auStack_60;\n      pbVar5 = __dest;\n      do {\n        puVar4 = puVar3 + 1;\n        *puVar3 = (uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3] |\n                  (uint)pbVar5[2] << 8;\n        puVar3 = puVar4;\n        pbVar5 = pbVar5 + 4;\n      } while (auStack_20 != puVar4);\n      FUN_000586d0(param_1,auStack_60);\n      *(undefined4 *)(param_1 + 0x54) = 0;\n      iVar2 = 0;\n      sVar6 = param_3;\n    } while (0x3f < (int)param_3);" (statement_identifier "LAB_000589b3") (: ":") (do_statement "do {\n      memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2);\n      iVar2 = 0x40 - *(int *)(param_1 + 0x54);\n      pvStack_7c = (void *)((int)pvStack_7c + iVar2);\n      param_3 = param_3 - iVar2;\n      puVar3 = auStack_60;\n      pbVar5 = __dest;\n      do {\n        puVar4 = puVar3 + 1;\n        *puVar3 = (uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3] |\n                  (uint)pbVar5[2] << 8;\n        puVar3 = puVar4;\n        pbVar5 = pbVar5 + 4;\n      } while (auStack_20 != puVar4);\n      FUN_000586d0(param_1,auStack_60);\n      *(undefined4 *)(param_1 + 0x54) = 0;\n      iVar2 = 0;\n      sVar6 = param_3;\n    } while (0x3f < (int)param_3);" (do "do") (compound_statement "{\n      memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2);\n      iVar2 = 0x40 - *(int *)(param_1 + 0x54);\n      pvStack_7c = (void *)((int)pvStack_7c + iVar2);\n      param_3 = param_3 - iVar2;\n      puVar3 = auStack_60;\n      pbVar5 = __dest;\n      do {\n        puVar4 = puVar3 + 1;\n        *puVar3 = (uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3] |\n                  (uint)pbVar5[2] << 8;\n        puVar3 = puVar4;\n        pbVar5 = pbVar5 + 4;\n      } while (auStack_20 != puVar4);\n      FUN_000586d0(param_1,auStack_60);\n      *(undefined4 *)(param_1 + 0x54) = 0;\n      iVar2 = 0;\n      sVar6 = param_3;\n    }" ({ "{") (expression_statement "memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2);" (call_expression "memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2)" (identifier "memcpy") (argument_list "(__dest + iVar2,pvStack_7c,0x40 - iVar2)" (( "(") (binary_expression "__dest + iVar2" (identifier "__dest") (+ "+") (identifier "iVar2")) (, ",") (identifier "pvStack_7c") (, ",") (binary_expression "0x40 - iVar2" (number_literal "0x40") (- "-") (identifier "iVar2")) () ")"))) (; ";")) (expression_statement "iVar2 = 0x40 - *(int *)(param_1 + 0x54);" (assignment_expression "iVar2 = 0x40 - *(int *)(param_1 + 0x54)" (identifier "iVar2") (= "=") (binary_expression "0x40 - *(int *)(param_1 + 0x54)" (number_literal "0x40") (- "-") (pointer_expression "*(int *)(param_1 + 0x54)" (* "*") (cast_expression "(int *)(param_1 + 0x54)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x54)" (( "(") (binary_expression "param_1 + 0x54" (identifier "param_1") (+ "+") (number_literal "0x54")) () ")")))))) (; ";")) (expression_statement "pvStack_7c = (void *)((int)pvStack_7c + iVar2);" (assignment_expression "pvStack_7c = (void *)((int)pvStack_7c + iVar2)" (identifier "pvStack_7c") (= "=") (cast_expression "(void *)((int)pvStack_7c + iVar2)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)pvStack_7c + iVar2)" (( "(") (binary_expression "(int)pvStack_7c + iVar2" (cast_expression "(int)pvStack_7c" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pvStack_7c")) (+ "+") (identifier "iVar2")) () ")")))) (; ";")) (expression_statement "param_3 = param_3 - iVar2;" (assignment_expression "param_3 = param_3 - iVar2" (identifier "param_3") (= "=") (binary_expression "param_3 - iVar2" (identifier "param_3") (- "-") (identifier "iVar2"))) (; ";")) (expression_statement "puVar3 = auStack_60;" (assignment_expression "puVar3 = auStack_60" (identifier "puVar3") (= "=") (identifier "auStack_60")) (; ";")) (expression_statement "pbVar5 = __dest;" (assignment_expression "pbVar5 = __dest" (identifier "pbVar5") (= "=") (identifier "__dest")) (; ";")) (do_statement "do {\n        puVar4 = puVar3 + 1;\n        *puVar3 = (uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3] |\n                  (uint)pbVar5[2] << 8;\n        puVar3 = puVar4;\n        pbVar5 = pbVar5 + 4;\n      } while (auStack_20 != puVar4);" (do "do") (compound_statement "{\n        puVar4 = puVar3 + 1;\n        *puVar3 = (uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3] |\n                  (uint)pbVar5[2] << 8;\n        puVar3 = puVar4;\n        pbVar5 = pbVar5 + 4;\n      }" ({ "{") (expression_statement "puVar4 = puVar3 + 1;" (assignment_expression "puVar4 = puVar3 + 1" (identifier "puVar4") (= "=") (binary_expression "puVar3 + 1" (identifier "puVar3") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "*puVar3 = (uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3] |\n                  (uint)pbVar5[2] << 8;" (assignment_expression "*puVar3 = (uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3] |\n                  (uint)pbVar5[2] << 8" (pointer_expression "*puVar3" (* "*") (identifier "puVar3")) (= "=") (binary_expression "(uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3] |\n                  (uint)pbVar5[2] << 8" (binary_expression "(uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3]" (binary_expression "(uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10" (binary_expression "(uint)*pbVar5 << 0x18" (binary_expression "(uint)*pbVar5" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (identifier "pbVar5")) (<< "<<") (number_literal "0x18")) (| "|") (binary_expression "(uint)pbVar5[1] << 0x10" (cast_expression "(uint)pbVar5[1]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (subscript_expression "pbVar5[1]" (identifier "pbVar5") ([ "[") (number_literal "1") (] "]"))) (<< "<<") (number_literal "0x10"))) (| "|") (cast_expression "(uint)pbVar5[3]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (subscript_expression "pbVar5[3]" (identifier "pbVar5") ([ "[") (number_literal "3") (] "]")))) (| "|") (binary_expression "(uint)pbVar5[2] << 8" (cast_expression "(uint)pbVar5[2]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (subscript_expression "pbVar5[2]" (identifier "pbVar5") ([ "[") (number_literal "2") (] "]"))) (<< "<<") (number_literal "8")))) (; ";")) (expression_statement "puVar3 = puVar4;" (assignment_expression "puVar3 = puVar4" (identifier "puVar3") (= "=") (identifier "puVar4")) (; ";")) (expression_statement "pbVar5 = pbVar5 + 4;" (assignment_expression "pbVar5 = pbVar5 + 4" (identifier "pbVar5") (= "=") (binary_expression "pbVar5 + 4" (identifier "pbVar5") (+ "+") (number_literal "4"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(auStack_20 != puVar4)" (( "(") (binary_expression "auStack_20 != puVar4" (identifier "auStack_20") (!= "!=") (identifier "puVar4")) () ")")) (; ";")) (expression_statement "FUN_000586d0(param_1,auStack_60);" (call_expression "FUN_000586d0(param_1,auStack_60)" (identifier "FUN_000586d0") (argument_list "(param_1,auStack_60)" (( "(") (identifier "param_1") (, ",") (identifier "auStack_60") () ")"))) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x54) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x54) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x54)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x54)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x54)" (( "(") (binary_expression "param_1 + 0x54" (identifier "param_1") (+ "+") (number_literal "0x54")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" (identifier "iVar2") (= "=") (number_literal "0")) (; ";")) (expression_statement "sVar6 = param_3;" (assignment_expression "sVar6 = param_3" (identifier "sVar6") (= "=") (identifier "param_3")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(0x3f < (int)param_3)" (( "(") (binary_expression "0x3f < (int)param_3" (number_literal "0x3f") (< "<") (cast_expression "(int)param_3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_3"))) () ")")) (; ";"))) (} "}")))) (expression_statement "memcpy(__dest,pvStack_7c,param_3);" (call_expression "memcpy(__dest,pvStack_7c,param_3)" (identifier "memcpy") (argument_list "(__dest,pvStack_7c,param_3)" (( "(") (identifier "__dest") (, ",") (identifier "pvStack_7c") (, ",") (identifier "param_3") () ")"))) (; ";")) (expression_statement "*(size_t *)(param_1 + 0x54) = sVar6;" (assignment_expression "*(size_t *)(param_1 + 0x54) = sVar6" (pointer_expression "*(size_t *)(param_1 + 0x54)" (* "*") (cast_expression "(size_t *)(param_1 + 0x54)" (( "(") (type_descriptor "size_t *" (primitive_type "size_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x54)" (( "(") (binary_expression "param_1 + 0x54" (identifier "param_1") (+ "+") (number_literal "0x54")) () ")")))) (= "=") (identifier "sVar6")) (; ";")) (labeled_statement "LAB_00058a6a:\n  if (auStack_20[0] != *(uint *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0006dad0();\n  }" (statement_identifier "LAB_00058a6a") (: ":") (if_statement "if (auStack_20[0] != *(uint *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0006dad0();\n  }" (if "if") (parenthesized_expression "(auStack_20[0] != *(uint *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "auStack_20[0] != *(uint *)(in_GS_OFFSET + 0x14)" (subscript_expression "auStack_20[0]" (identifier "auStack_20") ([ "[") (number_literal "0") (] "]")) (!= "!=") (pointer_expression "*(uint *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(uint *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n                    \n    FUN_0006dad0();\n  }" ({ "{") (expression_statement "FUN_0006dad0();" (call_expression "FUN_0006dad0()" (identifier "FUN_0006dad0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */
/* WARNING: Unknown calling convention */

void function_1(void *p,int var_2)

{
  type_1 *var_6;
  type_2 uVar1;
  int var_4;
  type_3 *var_7;
  type_3 *var_10;
  type_1 *var_8;
  size_t sVar6;
  int var_1;
  type_4 *s;
  void *pvStack_7c;
  type_3 awStack_60 [16];
  type_3 var_9 [4];
  
  pvStack_7c = p;
  var_6 = s->block;
  var_9[0] = *(type_3 *)(var_1 + 0x14);
  uVar1 = s->lenlo;
  s->lenlo = var_2 + s->lenlo;
  var_4 = s->blkused;
  s->lenhi = s->lenhi + (type_2)var_3(var_2,uVar1);
  sVar6 = var_4 + var_2;
  if (var_4 == 0) {
    if (0x3f < (int)sVar6) goto LAB_000589b3;
  }
  else {
    if ((int)sVar6 < 0x40) {
      var_5(var_6 + var_4,p,var_2);
      s->blkused = s->blkused + var_2;
      goto LAB_00058a6a;
    }
LAB_000589b3:
    do {
      var_5(var_6 + var_4,pvStack_7c,0x40 - var_4);
      var_4 = 0x40 - s->blkused;
      pvStack_7c = (void *)((int)pvStack_7c + var_4);
      var_2 = var_2 - var_4;
      var_7 = awStack_60;
      var_8 = var_6;
      do {
        var_10 = var_7 + 1;
        *var_7 = (type_2)*var_8 << 0x18 | (type_2)var_8[1] << 0x10 | (type_2)var_8[3] |
                  (type_2)var_8[2] << 8;
        var_7 = var_10;
        var_8 = var_8 + 4;
      } while (var_9 != var_10);
      var_11(s->h,awStack_60);
      s->blkused = 0;
      var_4 = 0;
      sVar6 = var_2;
    } while (0x3f < var_2);
  }
  var_5(var_6,pvStack_7c,var_2);
  s->blkused = sVar6;
LAB_00058a6a:
  if (var_9[0] != *(type_3 *)(var_1 + 0x14)) {
                    /* WARNING: Subroutine does not return */
    var_12();
  }
  return;
}


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

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

void MASKED(int param_1,void *param_2,size_t param_3)

{
  byte *__dest;
  uint uVar1;
  int iVar2;
  uint *puVar3;
  uint *puVar4;
  byte *pbVar5;
  size_t sVar6;
  int in_GS_OFFSET;
  void *pvStack_7c;
  uint auStack_60 [16];
  uint auStack_20 [4];
  
  pvStack_7c = param_2;
  __dest = (byte *)(param_1 + 0x14);
  auStack_20[0] = *(uint *)(in_GS_OFFSET + 0x14);
  uVar1 = *(uint *)(param_1 + 0x5c);
  *(size_t *)(param_1 + 0x5c) = param_3 + *(uint *)(param_1 + 0x5c);
  iVar2 = *(int *)(param_1 + 0x54);
  *(int *)(param_1 + 0x58) = *(int *)(param_1 + 0x58) + (uint)CARRY4(param_3,uVar1);
  sVar6 = iVar2 + param_3;
  if (iVar2 == 0) {
    if (0x3f < (int)sVar6) goto LAB_000589b3;
  }
  else {
    if ((int)sVar6 < 0x40) {
      memcpy(__dest + iVar2,param_2,param_3);
      *(int *)(param_1 + 0x54) = *(int *)(param_1 + 0x54) + param_3;
      goto LAB_00058a6a;
    }
LAB_000589b3:
    do {
      memcpy(__dest + iVar2,pvStack_7c,0x40 - iVar2);
      iVar2 = 0x40 - *(int *)(param_1 + 0x54);
      pvStack_7c = (void *)((int)pvStack_7c + iVar2);
      param_3 = param_3 - iVar2;
      puVar3 = auStack_60;
      pbVar5 = __dest;
      do {
        puVar4 = puVar3 + 1;
        *puVar3 = (uint)*pbVar5 << 0x18 | (uint)pbVar5[1] << 0x10 | (uint)pbVar5[3] |
                  (uint)pbVar5[2] << 8;
        puVar3 = puVar4;
        pbVar5 = pbVar5 + 4;
      } while (auStack_20 != puVar4);
      FUN_000586d0(param_1,auStack_60);
      *(undefined4 *)(param_1 + 0x54) = 0;
      iVar2 = 0;
      sVar6 = param_3;
    } while (0x3f < (int)param_3);
  }
  memcpy(__dest,pvStack_7c,param_3);
  *(size_t *)(param_1 + 0x54) = sVar6;
LAB_00058a6a:
  if (auStack_20[0] != *(uint *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_0006dad0();
  }
  return;
}

