
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::string::reserve(unsigned int) */

void __thiscall std::string::reserve(string *this,uint param_1)

{
  string *__dest;
  uint uVar1;
  string *__dest_00;
  uint uVar2;
  size_t sVar3;
  string *psVar4;
  
  uVar1 = *(uint *)(this + 4);
  if (param_1 < uVar1) {
    param_1 = uVar1;
  }
  psVar4 = *(string **)this;
  __dest = this + 8;
  if (__dest == psVar4) {
    uVar2 = 0xf;
  }
  else {
    uVar2 = *(uint *)(this + 8);
  }
  if (uVar2 != param_1) {
    if ((0xf < param_1) || (uVar2 < param_1)) {
      __dest_00 = (string *)_M_create(this,&param_1,uVar2);
      psVar4 = *(string **)this;
      sVar3 = *(int *)(this + 4) + 1;
      if (sVar3 == 1) {
        *__dest_00 = *psVar4;
        psVar4 = *(string **)this;
      }
      else if (sVar3 != 0) {
        memcpy(__dest_00,psVar4,sVar3);
        psVar4 = *(string **)this;
      }
      if (__dest != psVar4) {
        operator_delete(psVar4);
      }
      *(string **)this = __dest_00;
      *(uint *)(this + 8) = param_1;
      return;
    }
    if (__dest != psVar4) {
      sVar3 = uVar1 + 1;
      if (sVar3 == 1) {
        this[8] = *psVar4;
      }
      else if (sVar3 != 0) {
        memcpy(__dest,psVar4,sVar3);
      }
      operator_delete(psVar4);
      *(string **)this = __dest;
    }
  }
  return;
}



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

void FUN_001ef040(undefined4 *param_1,uint param_2)

{
  undefined4 *__dest;
  uint uVar1;
  undefined1 *__dest_00;
  uint uVar2;
  size_t sVar3;
  undefined1 *puVar4;
  
  uVar1 = param_1[1];
  if (param_2 < uVar1) {
    param_2 = uVar1;
  }
  puVar4 = (undefined1 *)*param_1;
  __dest = param_1 + 2;
  if (__dest == (undefined4 *)puVar4) {
    uVar2 = 0xf;
  }
  else {
    uVar2 = param_1[2];
  }
  if (uVar2 != param_2) {
    if ((0xf < param_2) || (uVar2 < param_2)) {
      __dest_00 = (undefined1 *)FUN_001ee4c0(param_1,&param_2,uVar2);
      puVar4 = (undefined1 *)*param_1;
      sVar3 = param_1[1] + 1;
      if (sVar3 == 1) {
        *__dest_00 = *puVar4;
        puVar4 = (undefined1 *)*param_1;
      }
      else if (sVar3 != 0) {
        memcpy(__dest_00,puVar4,sVar3);
        puVar4 = (undefined1 *)*param_1;
      }
      if (__dest != (undefined4 *)puVar4) {
        FUN_001e6db0(puVar4);
      }
      *param_1 = __dest_00;
      param_1[2] = param_2;
      return;
    }
    if (__dest != (undefined4 *)puVar4) {
      sVar3 = uVar1 + 1;
      if (sVar3 == 1) {
        *(undefined1 *)(param_1 + 2) = *puVar4;
      }
      else if (sVar3 != 0) {
        memcpy(__dest,puVar4,sVar3);
      }
      FUN_001e6db0(puVar4);
      *param_1 = __dest;
    }
  }
  return;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00035840
ADD EBX,0x19ffb7
SUB ESP,0xc
MOV ESI,dword ptr [ESP + 0x20]
MOV EAX,dword ptr [ESP + 0x24]
MOV EDX,dword ptr [ESI + 0x4]
CMP EAX,EDX
JNC 0x001ef067
MOV dword ptr [ESP + 0x24],EDX
MOV EAX,EDX
MOV EBP,dword ptr [ESI]
LEA EDI,[ESI + 0x8]
CMP EDI,EBP
JZ 0x001ef128
MOV ECX,dword ptr [ESI + 0x8]
CMP ECX,EAX
JZ 0x001ef0b4
CMP EAX,0xf
JA 0x001ef0c0
CMP ECX,EAX
JC 0x001ef0c0
CMP EDI,EBP
JZ 0x001ef0b4
ADD EDX,0x1
CMP EDX,0x1
JZ 0x001ef148
TEST EDX,EDX
JZ 0x001ef0a6
SUB ESP,0x4
PUSH EDX
PUSH EBP
PUSH EDI
CALL 0x000295c0
ADD ESP,0x10
SUB ESP,0xc
PUSH EBP
CALL 0x001e6db0
MOV dword ptr [ESI],EDI
ADD ESP,0x10
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x4
PUSH ECX
LEA EAX,[ESP + 0x2c]
PUSH EAX
PUSH ESI
CALL 0x001ee4c0
MOV EDX,dword ptr [ESI]
ADD ESP,0x10
MOV EBP,EAX
MOV EAX,dword ptr [ESI + 0x4]
ADD EAX,0x1
CMP EAX,0x1
JZ 0x001ef138
TEST EAX,EAX
JNZ 0x001ef110
CMP EDI,EDX
JZ 0x001ef0f5
SUB ESP,0xc
PUSH EDX
CALL 0x001e6db0
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0x24]
MOV dword ptr [ESI],EBP
MOV dword ptr [ESI + 0x8],EAX
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x4
PUSH EAX
PUSH EDX
PUSH EBP
CALL 0x000295c0
MOV EDX,dword ptr [ESI]
ADD ESP,0x10
JMP 0x001ef0e5
MOV ECX,0xf
JMP 0x001ef077
MOVZX EAX,byte ptr [EDX]
MOV byte ptr [EBP],AL
MOV EDX,dword ptr [ESI]
JMP 0x001ef0e5
MOVZX EAX,byte ptr [EBP]
MOV byte ptr [ESI + 0x8],AL
JMP 0x001ef0a6
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_001ef040(undefined4 *param_1,uint param_2)\n\n{\n  undefined4 *__dest;\n  uint uVar1;\n  undefined1 *__dest_00;\n  uint uVar2;\n  size_t sVar3;\n  undefined1 *puVar4;\n  \n  uVar1 = param_1[1];\n  if (param_2 < uVar1) {\n    param_2 = uVar1;\n  }\n  puVar4 = (undefined1 *)*param_1;\n  __dest = param_1 + 2;\n  if (__dest == (undefined4 *)puVar4) {\n    uVar2 = 0xf;\n  }\n  else {\n    uVar2 = param_1[2];\n  }\n  if (uVar2 != param_2) {\n    if ((0xf < param_2) || (uVar2 < param_2)) {\n      __dest_00 = (undefined1 *)FUN_001ee4c0(param_1,&param_2,uVar2);\n      puVar4 = (undefined1 *)*param_1;\n      sVar3 = param_1[1] + 1;\n      if (sVar3 == 1) {\n        *__dest_00 = *puVar4;\n        puVar4 = (undefined1 *)*param_1;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest_00,puVar4,sVar3);\n        puVar4 = (undefined1 *)*param_1;\n      }\n      if (__dest != (undefined4 *)puVar4) {\n        FUN_001e6db0(puVar4);\n      }\n      *param_1 = __dest_00;\n      param_1[2] = param_2;\n      return;\n    }\n    if (__dest != (undefined4 *)puVar4) {\n      sVar3 = uVar1 + 1;\n      if (sVar3 == 1) {\n        *(undefined1 *)(param_1 + 2) = *puVar4;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest,puVar4,sVar3);\n      }\n      FUN_001e6db0(puVar4);\n      *param_1 = __dest;\n    }\n  }\n  return;\n}\n\n" comment (function_definition "void FUN_001ef040(undefined4 *param_1,uint param_2)\n\n{\n  undefined4 *__dest;\n  uint uVar1;\n  undefined1 *__dest_00;\n  uint uVar2;\n  size_t sVar3;\n  undefined1 *puVar4;\n  \n  uVar1 = param_1[1];\n  if (param_2 < uVar1) {\n    param_2 = uVar1;\n  }\n  puVar4 = (undefined1 *)*param_1;\n  __dest = param_1 + 2;\n  if (__dest == (undefined4 *)puVar4) {\n    uVar2 = 0xf;\n  }\n  else {\n    uVar2 = param_1[2];\n  }\n  if (uVar2 != param_2) {\n    if ((0xf < param_2) || (uVar2 < param_2)) {\n      __dest_00 = (undefined1 *)FUN_001ee4c0(param_1,&param_2,uVar2);\n      puVar4 = (undefined1 *)*param_1;\n      sVar3 = param_1[1] + 1;\n      if (sVar3 == 1) {\n        *__dest_00 = *puVar4;\n        puVar4 = (undefined1 *)*param_1;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest_00,puVar4,sVar3);\n        puVar4 = (undefined1 *)*param_1;\n      }\n      if (__dest != (undefined4 *)puVar4) {\n        FUN_001e6db0(puVar4);\n      }\n      *param_1 = __dest_00;\n      param_1[2] = param_2;\n      return;\n    }\n    if (__dest != (undefined4 *)puVar4) {\n      sVar3 = uVar1 + 1;\n      if (sVar3 == 1) {\n        *(undefined1 *)(param_1 + 2) = *puVar4;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest,puVar4,sVar3);\n      }\n      FUN_001e6db0(puVar4);\n      *param_1 = __dest;\n    }\n  }\n  return;\n}" primitive_type (function_declarator "FUN_001ef040(undefined4 *param_1,uint param_2)" identifier (parameter_list "(undefined4 *param_1,uint param_2)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  undefined4 *__dest;\n  uint uVar1;\n  undefined1 *__dest_00;\n  uint uVar2;\n  size_t sVar3;\n  undefined1 *puVar4;\n  \n  uVar1 = param_1[1];\n  if (param_2 < uVar1) {\n    param_2 = uVar1;\n  }\n  puVar4 = (undefined1 *)*param_1;\n  __dest = param_1 + 2;\n  if (__dest == (undefined4 *)puVar4) {\n    uVar2 = 0xf;\n  }\n  else {\n    uVar2 = param_1[2];\n  }\n  if (uVar2 != param_2) {\n    if ((0xf < param_2) || (uVar2 < param_2)) {\n      __dest_00 = (undefined1 *)FUN_001ee4c0(param_1,&param_2,uVar2);\n      puVar4 = (undefined1 *)*param_1;\n      sVar3 = param_1[1] + 1;\n      if (sVar3 == 1) {\n        *__dest_00 = *puVar4;\n        puVar4 = (undefined1 *)*param_1;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest_00,puVar4,sVar3);\n        puVar4 = (undefined1 *)*param_1;\n      }\n      if (__dest != (undefined4 *)puVar4) {\n        FUN_001e6db0(puVar4);\n      }\n      *param_1 = __dest_00;\n      param_1[2] = param_2;\n      return;\n    }\n    if (__dest != (undefined4 *)puVar4) {\n      sVar3 = uVar1 + 1;\n      if (sVar3 == 1) {\n        *(undefined1 *)(param_1 + 2) = *puVar4;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest,puVar4,sVar3);\n      }\n      FUN_001e6db0(puVar4);\n      *param_1 = __dest;\n    }\n  }\n  return;\n}" { (declaration "undefined4 *__dest;" type_identifier (pointer_declarator "*__dest" * identifier) ;) (declaration "uint uVar1;" type_identifier identifier ;) (declaration "undefined1 *__dest_00;" type_identifier (pointer_declarator "*__dest_00" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "size_t sVar3;" primitive_type identifier ;) (declaration "undefined1 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (expression_statement "uVar1 = param_1[1];" (assignment_expression "uVar1 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (if_statement "if (param_2 < uVar1) {\n    param_2 = uVar1;\n  }" if (parenthesized_expression "(param_2 < uVar1)" ( (binary_expression "param_2 < uVar1" identifier < identifier) )) (compound_statement "{\n    param_2 = uVar1;\n  }" { (expression_statement "param_2 = uVar1;" (assignment_expression "param_2 = uVar1" identifier = identifier) ;) })) (expression_statement "puVar4 = (undefined1 *)*param_1;" (assignment_expression "puVar4 = (undefined1 *)*param_1" identifier = (cast_expression "(undefined1 *)*param_1" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (expression_statement "__dest = param_1 + 2;" (assignment_expression "__dest = param_1 + 2" identifier = (binary_expression "param_1 + 2" identifier + number_literal)) ;) (if_statement "if (__dest == (undefined4 *)puVar4) {\n    uVar2 = 0xf;\n  }\n  else {\n    uVar2 = param_1[2];\n  }" if (parenthesized_expression "(__dest == (undefined4 *)puVar4)" ( (binary_expression "__dest == (undefined4 *)puVar4" identifier == (cast_expression "(undefined4 *)puVar4" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n    uVar2 = 0xf;\n  }" { (expression_statement "uVar2 = 0xf;" (assignment_expression "uVar2 = 0xf" identifier = number_literal) ;) }) (else_clause "else {\n    uVar2 = param_1[2];\n  }" else (compound_statement "{\n    uVar2 = param_1[2];\n  }" { (expression_statement "uVar2 = param_1[2];" (assignment_expression "uVar2 = param_1[2]" identifier = (subscript_expression "param_1[2]" identifier [ number_literal ])) ;) }))) (if_statement "if (uVar2 != param_2) {\n    if ((0xf < param_2) || (uVar2 < param_2)) {\n      __dest_00 = (undefined1 *)FUN_001ee4c0(param_1,&param_2,uVar2);\n      puVar4 = (undefined1 *)*param_1;\n      sVar3 = param_1[1] + 1;\n      if (sVar3 == 1) {\n        *__dest_00 = *puVar4;\n        puVar4 = (undefined1 *)*param_1;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest_00,puVar4,sVar3);\n        puVar4 = (undefined1 *)*param_1;\n      }\n      if (__dest != (undefined4 *)puVar4) {\n        FUN_001e6db0(puVar4);\n      }\n      *param_1 = __dest_00;\n      param_1[2] = param_2;\n      return;\n    }\n    if (__dest != (undefined4 *)puVar4) {\n      sVar3 = uVar1 + 1;\n      if (sVar3 == 1) {\n        *(undefined1 *)(param_1 + 2) = *puVar4;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest,puVar4,sVar3);\n      }\n      FUN_001e6db0(puVar4);\n      *param_1 = __dest;\n    }\n  }" if (parenthesized_expression "(uVar2 != param_2)" ( (binary_expression "uVar2 != param_2" identifier != identifier) )) (compound_statement "{\n    if ((0xf < param_2) || (uVar2 < param_2)) {\n      __dest_00 = (undefined1 *)FUN_001ee4c0(param_1,&param_2,uVar2);\n      puVar4 = (undefined1 *)*param_1;\n      sVar3 = param_1[1] + 1;\n      if (sVar3 == 1) {\n        *__dest_00 = *puVar4;\n        puVar4 = (undefined1 *)*param_1;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest_00,puVar4,sVar3);\n        puVar4 = (undefined1 *)*param_1;\n      }\n      if (__dest != (undefined4 *)puVar4) {\n        FUN_001e6db0(puVar4);\n      }\n      *param_1 = __dest_00;\n      param_1[2] = param_2;\n      return;\n    }\n    if (__dest != (undefined4 *)puVar4) {\n      sVar3 = uVar1 + 1;\n      if (sVar3 == 1) {\n        *(undefined1 *)(param_1 + 2) = *puVar4;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest,puVar4,sVar3);\n      }\n      FUN_001e6db0(puVar4);\n      *param_1 = __dest;\n    }\n  }" { (if_statement "if ((0xf < param_2) || (uVar2 < param_2)) {\n      __dest_00 = (undefined1 *)FUN_001ee4c0(param_1,&param_2,uVar2);\n      puVar4 = (undefined1 *)*param_1;\n      sVar3 = param_1[1] + 1;\n      if (sVar3 == 1) {\n        *__dest_00 = *puVar4;\n        puVar4 = (undefined1 *)*param_1;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest_00,puVar4,sVar3);\n        puVar4 = (undefined1 *)*param_1;\n      }\n      if (__dest != (undefined4 *)puVar4) {\n        FUN_001e6db0(puVar4);\n      }\n      *param_1 = __dest_00;\n      param_1[2] = param_2;\n      return;\n    }" if (parenthesized_expression "((0xf < param_2) || (uVar2 < param_2))" ( (binary_expression "(0xf < param_2) || (uVar2 < param_2)" (parenthesized_expression "(0xf < param_2)" ( (binary_expression "0xf < param_2" number_literal < identifier) )) || (parenthesized_expression "(uVar2 < param_2)" ( (binary_expression "uVar2 < param_2" identifier < identifier) ))) )) (compound_statement "{\n      __dest_00 = (undefined1 *)FUN_001ee4c0(param_1,&param_2,uVar2);\n      puVar4 = (undefined1 *)*param_1;\n      sVar3 = param_1[1] + 1;\n      if (sVar3 == 1) {\n        *__dest_00 = *puVar4;\n        puVar4 = (undefined1 *)*param_1;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest_00,puVar4,sVar3);\n        puVar4 = (undefined1 *)*param_1;\n      }\n      if (__dest != (undefined4 *)puVar4) {\n        FUN_001e6db0(puVar4);\n      }\n      *param_1 = __dest_00;\n      param_1[2] = param_2;\n      return;\n    }" { (expression_statement "__dest_00 = (undefined1 *)FUN_001ee4c0(param_1,&param_2,uVar2);" (assignment_expression "__dest_00 = (undefined1 *)FUN_001ee4c0(param_1,&param_2,uVar2)" identifier = (cast_expression "(undefined1 *)FUN_001ee4c0(param_1,&param_2,uVar2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_001ee4c0(param_1,&param_2,uVar2)" identifier (argument_list "(param_1,&param_2,uVar2)" ( identifier , (pointer_expression "&param_2" & identifier) , identifier ))))) ;) (expression_statement "puVar4 = (undefined1 *)*param_1;" (assignment_expression "puVar4 = (undefined1 *)*param_1" identifier = (cast_expression "(undefined1 *)*param_1" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (expression_statement "sVar3 = param_1[1] + 1;" (assignment_expression "sVar3 = param_1[1] + 1" identifier = (binary_expression "param_1[1] + 1" (subscript_expression "param_1[1]" identifier [ number_literal ]) + number_literal)) ;) (if_statement "if (sVar3 == 1) {\n        *__dest_00 = *puVar4;\n        puVar4 = (undefined1 *)*param_1;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest_00,puVar4,sVar3);\n        puVar4 = (undefined1 *)*param_1;\n      }" if (parenthesized_expression "(sVar3 == 1)" ( (binary_expression "sVar3 == 1" identifier == number_literal) )) (compound_statement "{\n        *__dest_00 = *puVar4;\n        puVar4 = (undefined1 *)*param_1;\n      }" { (expression_statement "*__dest_00 = *puVar4;" (assignment_expression "*__dest_00 = *puVar4" (pointer_expression "*__dest_00" * identifier) = (pointer_expression "*puVar4" * identifier)) ;) (expression_statement "puVar4 = (undefined1 *)*param_1;" (assignment_expression "puVar4 = (undefined1 *)*param_1" identifier = (cast_expression "(undefined1 *)*param_1" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) }) (else_clause "else if (sVar3 != 0) {\n        memcpy(__dest_00,puVar4,sVar3);\n        puVar4 = (undefined1 *)*param_1;\n      }" else (if_statement "if (sVar3 != 0) {\n        memcpy(__dest_00,puVar4,sVar3);\n        puVar4 = (undefined1 *)*param_1;\n      }" if (parenthesized_expression "(sVar3 != 0)" ( (binary_expression "sVar3 != 0" identifier != number_literal) )) (compound_statement "{\n        memcpy(__dest_00,puVar4,sVar3);\n        puVar4 = (undefined1 *)*param_1;\n      }" { (expression_statement "memcpy(__dest_00,puVar4,sVar3);" (call_expression "memcpy(__dest_00,puVar4,sVar3)" identifier (argument_list "(__dest_00,puVar4,sVar3)" ( identifier , identifier , identifier ))) ;) (expression_statement "puVar4 = (undefined1 *)*param_1;" (assignment_expression "puVar4 = (undefined1 *)*param_1" identifier = (cast_expression "(undefined1 *)*param_1" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) })))) (if_statement "if (__dest != (undefined4 *)puVar4) {\n        FUN_001e6db0(puVar4);\n      }" if (parenthesized_expression "(__dest != (undefined4 *)puVar4)" ( (binary_expression "__dest != (undefined4 *)puVar4" identifier != (cast_expression "(undefined4 *)puVar4" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n        FUN_001e6db0(puVar4);\n      }" { (expression_statement "FUN_001e6db0(puVar4);" (call_expression "FUN_001e6db0(puVar4)" identifier (argument_list "(puVar4)" ( identifier ))) ;) })) (expression_statement "*param_1 = __dest_00;" (assignment_expression "*param_1 = __dest_00" (pointer_expression "*param_1" * identifier) = identifier) ;) (expression_statement "param_1[2] = param_2;" (assignment_expression "param_1[2] = param_2" (subscript_expression "param_1[2]" identifier [ number_literal ]) = identifier) ;) (return_statement "return;" return ;) })) (if_statement "if (__dest != (undefined4 *)puVar4) {\n      sVar3 = uVar1 + 1;\n      if (sVar3 == 1) {\n        *(undefined1 *)(param_1 + 2) = *puVar4;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest,puVar4,sVar3);\n      }\n      FUN_001e6db0(puVar4);\n      *param_1 = __dest;\n    }" if (parenthesized_expression "(__dest != (undefined4 *)puVar4)" ( (binary_expression "__dest != (undefined4 *)puVar4" identifier != (cast_expression "(undefined4 *)puVar4" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n      sVar3 = uVar1 + 1;\n      if (sVar3 == 1) {\n        *(undefined1 *)(param_1 + 2) = *puVar4;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest,puVar4,sVar3);\n      }\n      FUN_001e6db0(puVar4);\n      *param_1 = __dest;\n    }" { (expression_statement "sVar3 = uVar1 + 1;" (assignment_expression "sVar3 = uVar1 + 1" identifier = (binary_expression "uVar1 + 1" identifier + number_literal)) ;) (if_statement "if (sVar3 == 1) {\n        *(undefined1 *)(param_1 + 2) = *puVar4;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest,puVar4,sVar3);\n      }" if (parenthesized_expression "(sVar3 == 1)" ( (binary_expression "sVar3 == 1" identifier == number_literal) )) (compound_statement "{\n        *(undefined1 *)(param_1 + 2) = *puVar4;\n      }" { (expression_statement "*(undefined1 *)(param_1 + 2) = *puVar4;" (assignment_expression "*(undefined1 *)(param_1 + 2) = *puVar4" (pointer_expression "*(undefined1 *)(param_1 + 2)" * (cast_expression "(undefined1 *)(param_1 + 2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 2)" ( (binary_expression "param_1 + 2" identifier + number_literal) )))) = (pointer_expression "*puVar4" * identifier)) ;) }) (else_clause "else if (sVar3 != 0) {\n        memcpy(__dest,puVar4,sVar3);\n      }" else (if_statement "if (sVar3 != 0) {\n        memcpy(__dest,puVar4,sVar3);\n      }" if (parenthesized_expression "(sVar3 != 0)" ( (binary_expression "sVar3 != 0" identifier != number_literal) )) (compound_statement "{\n        memcpy(__dest,puVar4,sVar3);\n      }" { (expression_statement "memcpy(__dest,puVar4,sVar3);" (call_expression "memcpy(__dest,puVar4,sVar3)" identifier (argument_list "(__dest,puVar4,sVar3)" ( identifier , identifier , identifier ))) ;) })))) (expression_statement "FUN_001e6db0(puVar4);" (call_expression "FUN_001e6db0(puVar4)" identifier (argument_list "(puVar4)" ( identifier ))) ;) (expression_statement "*param_1 = __dest;" (assignment_expression "*param_1 = __dest" (pointer_expression "*param_1" * identifier) = identifier) ;) })) })) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* std::string::reserve(unsigned int) */\n\nvoid __thiscall std::string::reserve(string *this,uint param_1)\n\n{\n  string *__dest;\n  uint uVar1;\n  string *__dest_00;\n  uint uVar2;\n  size_t sVar3;\n  string *psVar4;\n  \n  uVar1 = *(uint *)(this + 4);\n  if (param_1 < uVar1) {\n    param_1 = uVar1;\n  }\n  psVar4 = *(string **)this;\n  __dest = this + 8;\n  if (__dest == psVar4) {\n    uVar2 = 0xf;\n  }\n  else {\n    uVar2 = *(uint *)(this + 8);\n  }\n  if (uVar2 != param_1) {\n    if ((0xf < param_1) || (uVar2 < param_1)) {\n      __dest_00 = (string *)_M_create(this,&param_1,uVar2);\n      psVar4 = *(string **)this;\n      sVar3 = *(int *)(this + 4) + 1;\n      if (sVar3 == 1) {\n        *__dest_00 = *psVar4;\n        psVar4 = *(string **)this;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest_00,psVar4,sVar3);\n        psVar4 = *(string **)this;\n      }\n      if (__dest != psVar4) {\n        operator_delete(psVar4);\n      }\n      *(string **)this = __dest_00;\n      *(uint *)(this + 8) = param_1;\n      return;\n    }\n    if (__dest != psVar4) {\n      sVar3 = uVar1 + 1;\n      if (sVar3 == 1) {\n        this[8] = *psVar4;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest,psVar4,sVar3);\n      }\n      operator_delete(psVar4);\n      *(string **)this = __dest;\n    }\n  }\n  return;\n}\n\n" comment comment (function_definition "void __thiscall std::string::reserve(string *this,uint param_1)\n\n{\n  string *__dest;\n  uint uVar1;\n  string *__dest_00;\n  uint uVar2;\n  size_t sVar3;\n  string *psVar4;\n  \n  uVar1 = *(uint *)(this + 4);\n  if (param_1 < uVar1) {\n    param_1 = uVar1;\n  }\n  psVar4 = *(string **)this;\n  __dest = this + 8;\n  if (__dest == psVar4) {\n    uVar2 = 0xf;\n  }\n  else {\n    uVar2 = *(uint *)(this + 8);\n  }\n  if (uVar2 != param_1) {\n    if ((0xf < param_1) || (uVar2 < param_1)) {\n      __dest_00 = (string *)_M_create(this,&param_1,uVar2);\n      psVar4 = *(string **)this;\n      sVar3 = *(int *)(this + 4) + 1;\n      if (sVar3 == 1) {\n        *__dest_00 = *psVar4;\n        psVar4 = *(string **)this;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest_00,psVar4,sVar3);\n        psVar4 = *(string **)this;\n      }\n      if (__dest != psVar4) {\n        operator_delete(psVar4);\n      }\n      *(string **)this = __dest_00;\n      *(uint *)(this + 8) = param_1;\n      return;\n    }\n    if (__dest != psVar4) {\n      sVar3 = uVar1 + 1;\n      if (sVar3 == 1) {\n        this[8] = *psVar4;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest,psVar4,sVar3);\n      }\n      operator_delete(psVar4);\n      *(string **)this = __dest;\n    }\n  }\n  return;\n}" primitive_type (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::string::" identifier : : identifier : :) (function_declarator "reserve(string *this,uint param_1)" identifier (parameter_list "(string *this,uint param_1)" ( (parameter_declaration "string *this" type_identifier (pointer_declarator "*this" * identifier)) , (parameter_declaration "uint param_1" type_identifier identifier) ))) (compound_statement "{\n  string *__dest;\n  uint uVar1;\n  string *__dest_00;\n  uint uVar2;\n  size_t sVar3;\n  string *psVar4;\n  \n  uVar1 = *(uint *)(this + 4);\n  if (param_1 < uVar1) {\n    param_1 = uVar1;\n  }\n  psVar4 = *(string **)this;\n  __dest = this + 8;\n  if (__dest == psVar4) {\n    uVar2 = 0xf;\n  }\n  else {\n    uVar2 = *(uint *)(this + 8);\n  }\n  if (uVar2 != param_1) {\n    if ((0xf < param_1) || (uVar2 < param_1)) {\n      __dest_00 = (string *)_M_create(this,&param_1,uVar2);\n      psVar4 = *(string **)this;\n      sVar3 = *(int *)(this + 4) + 1;\n      if (sVar3 == 1) {\n        *__dest_00 = *psVar4;\n        psVar4 = *(string **)this;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest_00,psVar4,sVar3);\n        psVar4 = *(string **)this;\n      }\n      if (__dest != psVar4) {\n        operator_delete(psVar4);\n      }\n      *(string **)this = __dest_00;\n      *(uint *)(this + 8) = param_1;\n      return;\n    }\n    if (__dest != psVar4) {\n      sVar3 = uVar1 + 1;\n      if (sVar3 == 1) {\n        this[8] = *psVar4;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest,psVar4,sVar3);\n      }\n      operator_delete(psVar4);\n      *(string **)this = __dest;\n    }\n  }\n  return;\n}" { (declaration "string *__dest;" type_identifier (pointer_declarator "*__dest" * identifier) ;) (declaration "uint uVar1;" type_identifier identifier ;) (declaration "string *__dest_00;" type_identifier (pointer_declarator "*__dest_00" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "size_t sVar3;" primitive_type identifier ;) (declaration "string *psVar4;" type_identifier (pointer_declarator "*psVar4" * identifier) ;) (expression_statement "uVar1 = *(uint *)(this + 4);" (assignment_expression "uVar1 = *(uint *)(this + 4)" identifier = (pointer_expression "*(uint *)(this + 4)" * (cast_expression "(uint *)(this + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 4)" ( (binary_expression "this + 4" identifier + number_literal) ))))) ;) (if_statement "if (param_1 < uVar1) {\n    param_1 = uVar1;\n  }" if (parenthesized_expression "(param_1 < uVar1)" ( (binary_expression "param_1 < uVar1" identifier < identifier) )) (compound_statement "{\n    param_1 = uVar1;\n  }" { (expression_statement "param_1 = uVar1;" (assignment_expression "param_1 = uVar1" identifier = identifier) ;) })) (expression_statement "psVar4 = *(string **)this;" (assignment_expression "psVar4 = *(string **)this" identifier = (pointer_expression "*(string **)this" * (cast_expression "(string **)this" ( (type_descriptor "string **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (expression_statement "__dest = this + 8;" (assignment_expression "__dest = this + 8" identifier = (binary_expression "this + 8" identifier + number_literal)) ;) (if_statement "if (__dest == psVar4) {\n    uVar2 = 0xf;\n  }\n  else {\n    uVar2 = *(uint *)(this + 8);\n  }" if (parenthesized_expression "(__dest == psVar4)" ( (binary_expression "__dest == psVar4" identifier == identifier) )) (compound_statement "{\n    uVar2 = 0xf;\n  }" { (expression_statement "uVar2 = 0xf;" (assignment_expression "uVar2 = 0xf" identifier = number_literal) ;) }) (else_clause "else {\n    uVar2 = *(uint *)(this + 8);\n  }" else (compound_statement "{\n    uVar2 = *(uint *)(this + 8);\n  }" { (expression_statement "uVar2 = *(uint *)(this + 8);" (assignment_expression "uVar2 = *(uint *)(this + 8)" identifier = (pointer_expression "*(uint *)(this + 8)" * (cast_expression "(uint *)(this + 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) ))))) ;) }))) (if_statement "if (uVar2 != param_1) {\n    if ((0xf < param_1) || (uVar2 < param_1)) {\n      __dest_00 = (string *)_M_create(this,&param_1,uVar2);\n      psVar4 = *(string **)this;\n      sVar3 = *(int *)(this + 4) + 1;\n      if (sVar3 == 1) {\n        *__dest_00 = *psVar4;\n        psVar4 = *(string **)this;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest_00,psVar4,sVar3);\n        psVar4 = *(string **)this;\n      }\n      if (__dest != psVar4) {\n        operator_delete(psVar4);\n      }\n      *(string **)this = __dest_00;\n      *(uint *)(this + 8) = param_1;\n      return;\n    }\n    if (__dest != psVar4) {\n      sVar3 = uVar1 + 1;\n      if (sVar3 == 1) {\n        this[8] = *psVar4;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest,psVar4,sVar3);\n      }\n      operator_delete(psVar4);\n      *(string **)this = __dest;\n    }\n  }" if (parenthesized_expression "(uVar2 != param_1)" ( (binary_expression "uVar2 != param_1" identifier != identifier) )) (compound_statement "{\n    if ((0xf < param_1) || (uVar2 < param_1)) {\n      __dest_00 = (string *)_M_create(this,&param_1,uVar2);\n      psVar4 = *(string **)this;\n      sVar3 = *(int *)(this + 4) + 1;\n      if (sVar3 == 1) {\n        *__dest_00 = *psVar4;\n        psVar4 = *(string **)this;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest_00,psVar4,sVar3);\n        psVar4 = *(string **)this;\n      }\n      if (__dest != psVar4) {\n        operator_delete(psVar4);\n      }\n      *(string **)this = __dest_00;\n      *(uint *)(this + 8) = param_1;\n      return;\n    }\n    if (__dest != psVar4) {\n      sVar3 = uVar1 + 1;\n      if (sVar3 == 1) {\n        this[8] = *psVar4;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest,psVar4,sVar3);\n      }\n      operator_delete(psVar4);\n      *(string **)this = __dest;\n    }\n  }" { (if_statement "if ((0xf < param_1) || (uVar2 < param_1)) {\n      __dest_00 = (string *)_M_create(this,&param_1,uVar2);\n      psVar4 = *(string **)this;\n      sVar3 = *(int *)(this + 4) + 1;\n      if (sVar3 == 1) {\n        *__dest_00 = *psVar4;\n        psVar4 = *(string **)this;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest_00,psVar4,sVar3);\n        psVar4 = *(string **)this;\n      }\n      if (__dest != psVar4) {\n        operator_delete(psVar4);\n      }\n      *(string **)this = __dest_00;\n      *(uint *)(this + 8) = param_1;\n      return;\n    }" if (parenthesized_expression "((0xf < param_1) || (uVar2 < param_1))" ( (binary_expression "(0xf < param_1) || (uVar2 < param_1)" (parenthesized_expression "(0xf < param_1)" ( (binary_expression "0xf < param_1" number_literal < identifier) )) || (parenthesized_expression "(uVar2 < param_1)" ( (binary_expression "uVar2 < param_1" identifier < identifier) ))) )) (compound_statement "{\n      __dest_00 = (string *)_M_create(this,&param_1,uVar2);\n      psVar4 = *(string **)this;\n      sVar3 = *(int *)(this + 4) + 1;\n      if (sVar3 == 1) {\n        *__dest_00 = *psVar4;\n        psVar4 = *(string **)this;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest_00,psVar4,sVar3);\n        psVar4 = *(string **)this;\n      }\n      if (__dest != psVar4) {\n        operator_delete(psVar4);\n      }\n      *(string **)this = __dest_00;\n      *(uint *)(this + 8) = param_1;\n      return;\n    }" { (expression_statement "__dest_00 = (string *)_M_create(this,&param_1,uVar2);" (assignment_expression "__dest_00 = (string *)_M_create(this,&param_1,uVar2)" identifier = (cast_expression "(string *)_M_create(this,&param_1,uVar2)" ( (type_descriptor "string *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "_M_create(this,&param_1,uVar2)" identifier (argument_list "(this,&param_1,uVar2)" ( identifier , (pointer_expression "&param_1" & identifier) , identifier ))))) ;) (expression_statement "psVar4 = *(string **)this;" (assignment_expression "psVar4 = *(string **)this" identifier = (pointer_expression "*(string **)this" * (cast_expression "(string **)this" ( (type_descriptor "string **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (expression_statement "sVar3 = *(int *)(this + 4) + 1;" (assignment_expression "sVar3 = *(int *)(this + 4) + 1" identifier = (binary_expression "*(int *)(this + 4) + 1" (pointer_expression "*(int *)(this + 4)" * (cast_expression "(int *)(this + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 4)" ( (binary_expression "this + 4" identifier + number_literal) )))) + number_literal)) ;) (if_statement "if (sVar3 == 1) {\n        *__dest_00 = *psVar4;\n        psVar4 = *(string **)this;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest_00,psVar4,sVar3);\n        psVar4 = *(string **)this;\n      }" if (parenthesized_expression "(sVar3 == 1)" ( (binary_expression "sVar3 == 1" identifier == number_literal) )) (compound_statement "{\n        *__dest_00 = *psVar4;\n        psVar4 = *(string **)this;\n      }" { (expression_statement "*__dest_00 = *psVar4;" (assignment_expression "*__dest_00 = *psVar4" (pointer_expression "*__dest_00" * identifier) = (pointer_expression "*psVar4" * identifier)) ;) (expression_statement "psVar4 = *(string **)this;" (assignment_expression "psVar4 = *(string **)this" identifier = (pointer_expression "*(string **)this" * (cast_expression "(string **)this" ( (type_descriptor "string **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) }) (else_clause "else if (sVar3 != 0) {\n        memcpy(__dest_00,psVar4,sVar3);\n        psVar4 = *(string **)this;\n      }" else (if_statement "if (sVar3 != 0) {\n        memcpy(__dest_00,psVar4,sVar3);\n        psVar4 = *(string **)this;\n      }" if (parenthesized_expression "(sVar3 != 0)" ( (binary_expression "sVar3 != 0" identifier != number_literal) )) (compound_statement "{\n        memcpy(__dest_00,psVar4,sVar3);\n        psVar4 = *(string **)this;\n      }" { (expression_statement "memcpy(__dest_00,psVar4,sVar3);" (call_expression "memcpy(__dest_00,psVar4,sVar3)" identifier (argument_list "(__dest_00,psVar4,sVar3)" ( identifier , identifier , identifier ))) ;) (expression_statement "psVar4 = *(string **)this;" (assignment_expression "psVar4 = *(string **)this" identifier = (pointer_expression "*(string **)this" * (cast_expression "(string **)this" ( (type_descriptor "string **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) })))) (if_statement "if (__dest != psVar4) {\n        operator_delete(psVar4);\n      }" if (parenthesized_expression "(__dest != psVar4)" ( (binary_expression "__dest != psVar4" identifier != identifier) )) (compound_statement "{\n        operator_delete(psVar4);\n      }" { (expression_statement "operator_delete(psVar4);" (call_expression "operator_delete(psVar4)" identifier (argument_list "(psVar4)" ( identifier ))) ;) })) (expression_statement "*(string **)this = __dest_00;" (assignment_expression "*(string **)this = __dest_00" (pointer_expression "*(string **)this" * (cast_expression "(string **)this" ( (type_descriptor "string **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) = identifier) ;) (expression_statement "*(uint *)(this + 8) = param_1;" (assignment_expression "*(uint *)(this + 8) = param_1" (pointer_expression "*(uint *)(this + 8)" * (cast_expression "(uint *)(this + 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) )))) = identifier) ;) (return_statement "return;" return ;) })) (if_statement "if (__dest != psVar4) {\n      sVar3 = uVar1 + 1;\n      if (sVar3 == 1) {\n        this[8] = *psVar4;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest,psVar4,sVar3);\n      }\n      operator_delete(psVar4);\n      *(string **)this = __dest;\n    }" if (parenthesized_expression "(__dest != psVar4)" ( (binary_expression "__dest != psVar4" identifier != identifier) )) (compound_statement "{\n      sVar3 = uVar1 + 1;\n      if (sVar3 == 1) {\n        this[8] = *psVar4;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest,psVar4,sVar3);\n      }\n      operator_delete(psVar4);\n      *(string **)this = __dest;\n    }" { (expression_statement "sVar3 = uVar1 + 1;" (assignment_expression "sVar3 = uVar1 + 1" identifier = (binary_expression "uVar1 + 1" identifier + number_literal)) ;) (if_statement "if (sVar3 == 1) {\n        this[8] = *psVar4;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest,psVar4,sVar3);\n      }" if (parenthesized_expression "(sVar3 == 1)" ( (binary_expression "sVar3 == 1" identifier == number_literal) )) (compound_statement "{\n        this[8] = *psVar4;\n      }" { (expression_statement "this[8] = *psVar4;" (assignment_expression "this[8] = *psVar4" (subscript_expression "this[8]" identifier [ number_literal ]) = (pointer_expression "*psVar4" * identifier)) ;) }) (else_clause "else if (sVar3 != 0) {\n        memcpy(__dest,psVar4,sVar3);\n      }" else (if_statement "if (sVar3 != 0) {\n        memcpy(__dest,psVar4,sVar3);\n      }" if (parenthesized_expression "(sVar3 != 0)" ( (binary_expression "sVar3 != 0" identifier != number_literal) )) (compound_statement "{\n        memcpy(__dest,psVar4,sVar3);\n      }" { (expression_statement "memcpy(__dest,psVar4,sVar3);" (call_expression "memcpy(__dest,psVar4,sVar3)" identifier (argument_list "(__dest,psVar4,sVar3)" ( identifier , identifier , identifier ))) ;) })))) (expression_statement "operator_delete(psVar4);" (call_expression "operator_delete(psVar4)" identifier (argument_list "(psVar4)" ( identifier ))) ;) (expression_statement "*(string **)this = __dest;" (assignment_expression "*(string **)this = __dest" (pointer_expression "*(string **)this" * (cast_expression "(string **)this" ( (type_descriptor "string **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) = identifier) ;) })) })) (return_statement "return;" return ;) })))
(translation_unit "void FUN_001ef040(undefined4 *param_1,uint param_2)\n\n{\n  undefined4 *__dest;\n  uint uVar1;\n  undefined1 *__dest_00;\n  uint uVar2;\n  size_t sVar3;\n  undefined1 *puVar4;\n  \n  uVar1 = param_1[1];\n  if (param_2 < uVar1) {\n    param_2 = uVar1;\n  }\n  puVar4 = (undefined1 *)*param_1;\n  __dest = param_1 + 2;\n  if (__dest == (undefined4 *)puVar4) {\n    uVar2 = 0xf;\n  }\n  else {\n    uVar2 = param_1[2];\n  }\n  if (uVar2 != param_2) {\n    if ((0xf < param_2) || (uVar2 < param_2)) {\n      __dest_00 = (undefined1 *)FUN_001ee4c0(param_1,&param_2,uVar2);\n      puVar4 = (undefined1 *)*param_1;\n      sVar3 = param_1[1] + 1;\n      if (sVar3 == 1) {\n        *__dest_00 = *puVar4;\n        puVar4 = (undefined1 *)*param_1;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest_00,puVar4,sVar3);\n        puVar4 = (undefined1 *)*param_1;\n      }\n      if (__dest != (undefined4 *)puVar4) {\n        FUN_001e6db0(puVar4);\n      }\n      *param_1 = __dest_00;\n      param_1[2] = param_2;\n      return;\n    }\n    if (__dest != (undefined4 *)puVar4) {\n      sVar3 = uVar1 + 1;\n      if (sVar3 == 1) {\n        *(undefined1 *)(param_1 + 2) = *puVar4;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest,puVar4,sVar3);\n      }\n      FUN_001e6db0(puVar4);\n      *param_1 = __dest;\n    }\n  }\n  return;\n}\n\n" (function_definition "void FUN_001ef040(undefined4 *param_1,uint param_2)\n\n{\n  undefined4 *__dest;\n  uint uVar1;\n  undefined1 *__dest_00;\n  uint uVar2;\n  size_t sVar3;\n  undefined1 *puVar4;\n  \n  uVar1 = param_1[1];\n  if (param_2 < uVar1) {\n    param_2 = uVar1;\n  }\n  puVar4 = (undefined1 *)*param_1;\n  __dest = param_1 + 2;\n  if (__dest == (undefined4 *)puVar4) {\n    uVar2 = 0xf;\n  }\n  else {\n    uVar2 = param_1[2];\n  }\n  if (uVar2 != param_2) {\n    if ((0xf < param_2) || (uVar2 < param_2)) {\n      __dest_00 = (undefined1 *)FUN_001ee4c0(param_1,&param_2,uVar2);\n      puVar4 = (undefined1 *)*param_1;\n      sVar3 = param_1[1] + 1;\n      if (sVar3 == 1) {\n        *__dest_00 = *puVar4;\n        puVar4 = (undefined1 *)*param_1;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest_00,puVar4,sVar3);\n        puVar4 = (undefined1 *)*param_1;\n      }\n      if (__dest != (undefined4 *)puVar4) {\n        FUN_001e6db0(puVar4);\n      }\n      *param_1 = __dest_00;\n      param_1[2] = param_2;\n      return;\n    }\n    if (__dest != (undefined4 *)puVar4) {\n      sVar3 = uVar1 + 1;\n      if (sVar3 == 1) {\n        *(undefined1 *)(param_1 + 2) = *puVar4;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest,puVar4,sVar3);\n      }\n      FUN_001e6db0(puVar4);\n      *param_1 = __dest;\n    }\n  }\n  return;\n}" primitive_type (function_declarator "FUN_001ef040(undefined4 *param_1,uint param_2)" identifier (parameter_list "(undefined4 *param_1,uint param_2)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  undefined4 *__dest;\n  uint uVar1;\n  undefined1 *__dest_00;\n  uint uVar2;\n  size_t sVar3;\n  undefined1 *puVar4;\n  \n  uVar1 = param_1[1];\n  if (param_2 < uVar1) {\n    param_2 = uVar1;\n  }\n  puVar4 = (undefined1 *)*param_1;\n  __dest = param_1 + 2;\n  if (__dest == (undefined4 *)puVar4) {\n    uVar2 = 0xf;\n  }\n  else {\n    uVar2 = param_1[2];\n  }\n  if (uVar2 != param_2) {\n    if ((0xf < param_2) || (uVar2 < param_2)) {\n      __dest_00 = (undefined1 *)FUN_001ee4c0(param_1,&param_2,uVar2);\n      puVar4 = (undefined1 *)*param_1;\n      sVar3 = param_1[1] + 1;\n      if (sVar3 == 1) {\n        *__dest_00 = *puVar4;\n        puVar4 = (undefined1 *)*param_1;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest_00,puVar4,sVar3);\n        puVar4 = (undefined1 *)*param_1;\n      }\n      if (__dest != (undefined4 *)puVar4) {\n        FUN_001e6db0(puVar4);\n      }\n      *param_1 = __dest_00;\n      param_1[2] = param_2;\n      return;\n    }\n    if (__dest != (undefined4 *)puVar4) {\n      sVar3 = uVar1 + 1;\n      if (sVar3 == 1) {\n        *(undefined1 *)(param_1 + 2) = *puVar4;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest,puVar4,sVar3);\n      }\n      FUN_001e6db0(puVar4);\n      *param_1 = __dest;\n    }\n  }\n  return;\n}" { (declaration "undefined4 *__dest;" type_identifier (pointer_declarator "*__dest" * identifier) ;) (declaration "uint uVar1;" type_identifier identifier ;) (declaration "undefined1 *__dest_00;" type_identifier (pointer_declarator "*__dest_00" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "size_t sVar3;" primitive_type identifier ;) (declaration "undefined1 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (expression_statement "uVar1 = param_1[1];" (assignment_expression "uVar1 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (if_statement "if (param_2 < uVar1) {\n    param_2 = uVar1;\n  }" if (parenthesized_expression "(param_2 < uVar1)" ( (binary_expression "param_2 < uVar1" identifier < identifier) )) (compound_statement "{\n    param_2 = uVar1;\n  }" { (expression_statement "param_2 = uVar1;" (assignment_expression "param_2 = uVar1" identifier = identifier) ;) })) (expression_statement "puVar4 = (undefined1 *)*param_1;" (assignment_expression "puVar4 = (undefined1 *)*param_1" identifier = (cast_expression "(undefined1 *)*param_1" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (expression_statement "__dest = param_1 + 2;" (assignment_expression "__dest = param_1 + 2" identifier = (binary_expression "param_1 + 2" identifier + number_literal)) ;) (if_statement "if (__dest == (undefined4 *)puVar4) {\n    uVar2 = 0xf;\n  }\n  else {\n    uVar2 = param_1[2];\n  }" if (parenthesized_expression "(__dest == (undefined4 *)puVar4)" ( (binary_expression "__dest == (undefined4 *)puVar4" identifier == (cast_expression "(undefined4 *)puVar4" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n    uVar2 = 0xf;\n  }" { (expression_statement "uVar2 = 0xf;" (assignment_expression "uVar2 = 0xf" identifier = number_literal) ;) }) (else_clause "else {\n    uVar2 = param_1[2];\n  }" else (compound_statement "{\n    uVar2 = param_1[2];\n  }" { (expression_statement "uVar2 = param_1[2];" (assignment_expression "uVar2 = param_1[2]" identifier = (subscript_expression "param_1[2]" identifier [ number_literal ])) ;) }))) (if_statement "if (uVar2 != param_2) {\n    if ((0xf < param_2) || (uVar2 < param_2)) {\n      __dest_00 = (undefined1 *)FUN_001ee4c0(param_1,&param_2,uVar2);\n      puVar4 = (undefined1 *)*param_1;\n      sVar3 = param_1[1] + 1;\n      if (sVar3 == 1) {\n        *__dest_00 = *puVar4;\n        puVar4 = (undefined1 *)*param_1;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest_00,puVar4,sVar3);\n        puVar4 = (undefined1 *)*param_1;\n      }\n      if (__dest != (undefined4 *)puVar4) {\n        FUN_001e6db0(puVar4);\n      }\n      *param_1 = __dest_00;\n      param_1[2] = param_2;\n      return;\n    }\n    if (__dest != (undefined4 *)puVar4) {\n      sVar3 = uVar1 + 1;\n      if (sVar3 == 1) {\n        *(undefined1 *)(param_1 + 2) = *puVar4;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest,puVar4,sVar3);\n      }\n      FUN_001e6db0(puVar4);\n      *param_1 = __dest;\n    }\n  }" if (parenthesized_expression "(uVar2 != param_2)" ( (binary_expression "uVar2 != param_2" identifier != identifier) )) (compound_statement "{\n    if ((0xf < param_2) || (uVar2 < param_2)) {\n      __dest_00 = (undefined1 *)FUN_001ee4c0(param_1,&param_2,uVar2);\n      puVar4 = (undefined1 *)*param_1;\n      sVar3 = param_1[1] + 1;\n      if (sVar3 == 1) {\n        *__dest_00 = *puVar4;\n        puVar4 = (undefined1 *)*param_1;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest_00,puVar4,sVar3);\n        puVar4 = (undefined1 *)*param_1;\n      }\n      if (__dest != (undefined4 *)puVar4) {\n        FUN_001e6db0(puVar4);\n      }\n      *param_1 = __dest_00;\n      param_1[2] = param_2;\n      return;\n    }\n    if (__dest != (undefined4 *)puVar4) {\n      sVar3 = uVar1 + 1;\n      if (sVar3 == 1) {\n        *(undefined1 *)(param_1 + 2) = *puVar4;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest,puVar4,sVar3);\n      }\n      FUN_001e6db0(puVar4);\n      *param_1 = __dest;\n    }\n  }" { (if_statement "if ((0xf < param_2) || (uVar2 < param_2)) {\n      __dest_00 = (undefined1 *)FUN_001ee4c0(param_1,&param_2,uVar2);\n      puVar4 = (undefined1 *)*param_1;\n      sVar3 = param_1[1] + 1;\n      if (sVar3 == 1) {\n        *__dest_00 = *puVar4;\n        puVar4 = (undefined1 *)*param_1;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest_00,puVar4,sVar3);\n        puVar4 = (undefined1 *)*param_1;\n      }\n      if (__dest != (undefined4 *)puVar4) {\n        FUN_001e6db0(puVar4);\n      }\n      *param_1 = __dest_00;\n      param_1[2] = param_2;\n      return;\n    }" if (parenthesized_expression "((0xf < param_2) || (uVar2 < param_2))" ( (binary_expression "(0xf < param_2) || (uVar2 < param_2)" (parenthesized_expression "(0xf < param_2)" ( (binary_expression "0xf < param_2" number_literal < identifier) )) || (parenthesized_expression "(uVar2 < param_2)" ( (binary_expression "uVar2 < param_2" identifier < identifier) ))) )) (compound_statement "{\n      __dest_00 = (undefined1 *)FUN_001ee4c0(param_1,&param_2,uVar2);\n      puVar4 = (undefined1 *)*param_1;\n      sVar3 = param_1[1] + 1;\n      if (sVar3 == 1) {\n        *__dest_00 = *puVar4;\n        puVar4 = (undefined1 *)*param_1;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest_00,puVar4,sVar3);\n        puVar4 = (undefined1 *)*param_1;\n      }\n      if (__dest != (undefined4 *)puVar4) {\n        FUN_001e6db0(puVar4);\n      }\n      *param_1 = __dest_00;\n      param_1[2] = param_2;\n      return;\n    }" { (expression_statement "__dest_00 = (undefined1 *)FUN_001ee4c0(param_1,&param_2,uVar2);" (assignment_expression "__dest_00 = (undefined1 *)FUN_001ee4c0(param_1,&param_2,uVar2)" identifier = (cast_expression "(undefined1 *)FUN_001ee4c0(param_1,&param_2,uVar2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_001ee4c0(param_1,&param_2,uVar2)" identifier (argument_list "(param_1,&param_2,uVar2)" ( identifier , (pointer_expression "&param_2" & identifier) , identifier ))))) ;) (expression_statement "puVar4 = (undefined1 *)*param_1;" (assignment_expression "puVar4 = (undefined1 *)*param_1" identifier = (cast_expression "(undefined1 *)*param_1" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (expression_statement "sVar3 = param_1[1] + 1;" (assignment_expression "sVar3 = param_1[1] + 1" identifier = (binary_expression "param_1[1] + 1" (subscript_expression "param_1[1]" identifier [ number_literal ]) + number_literal)) ;) (if_statement "if (sVar3 == 1) {\n        *__dest_00 = *puVar4;\n        puVar4 = (undefined1 *)*param_1;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest_00,puVar4,sVar3);\n        puVar4 = (undefined1 *)*param_1;\n      }" if (parenthesized_expression "(sVar3 == 1)" ( (binary_expression "sVar3 == 1" identifier == number_literal) )) (compound_statement "{\n        *__dest_00 = *puVar4;\n        puVar4 = (undefined1 *)*param_1;\n      }" { (expression_statement "*__dest_00 = *puVar4;" (assignment_expression "*__dest_00 = *puVar4" (pointer_expression "*__dest_00" * identifier) = (pointer_expression "*puVar4" * identifier)) ;) (expression_statement "puVar4 = (undefined1 *)*param_1;" (assignment_expression "puVar4 = (undefined1 *)*param_1" identifier = (cast_expression "(undefined1 *)*param_1" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) }) (else_clause "else if (sVar3 != 0) {\n        memcpy(__dest_00,puVar4,sVar3);\n        puVar4 = (undefined1 *)*param_1;\n      }" else (if_statement "if (sVar3 != 0) {\n        memcpy(__dest_00,puVar4,sVar3);\n        puVar4 = (undefined1 *)*param_1;\n      }" if (parenthesized_expression "(sVar3 != 0)" ( (binary_expression "sVar3 != 0" identifier != number_literal) )) (compound_statement "{\n        memcpy(__dest_00,puVar4,sVar3);\n        puVar4 = (undefined1 *)*param_1;\n      }" { (expression_statement "memcpy(__dest_00,puVar4,sVar3);" (call_expression "memcpy(__dest_00,puVar4,sVar3)" identifier (argument_list "(__dest_00,puVar4,sVar3)" ( identifier , identifier , identifier ))) ;) (expression_statement "puVar4 = (undefined1 *)*param_1;" (assignment_expression "puVar4 = (undefined1 *)*param_1" identifier = (cast_expression "(undefined1 *)*param_1" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) })))) (if_statement "if (__dest != (undefined4 *)puVar4) {\n        FUN_001e6db0(puVar4);\n      }" if (parenthesized_expression "(__dest != (undefined4 *)puVar4)" ( (binary_expression "__dest != (undefined4 *)puVar4" identifier != (cast_expression "(undefined4 *)puVar4" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n        FUN_001e6db0(puVar4);\n      }" { (expression_statement "FUN_001e6db0(puVar4);" (call_expression "FUN_001e6db0(puVar4)" identifier (argument_list "(puVar4)" ( identifier ))) ;) })) (expression_statement "*param_1 = __dest_00;" (assignment_expression "*param_1 = __dest_00" (pointer_expression "*param_1" * identifier) = identifier) ;) (expression_statement "param_1[2] = param_2;" (assignment_expression "param_1[2] = param_2" (subscript_expression "param_1[2]" identifier [ number_literal ]) = identifier) ;) (return_statement "return;" return ;) })) (if_statement "if (__dest != (undefined4 *)puVar4) {\n      sVar3 = uVar1 + 1;\n      if (sVar3 == 1) {\n        *(undefined1 *)(param_1 + 2) = *puVar4;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest,puVar4,sVar3);\n      }\n      FUN_001e6db0(puVar4);\n      *param_1 = __dest;\n    }" if (parenthesized_expression "(__dest != (undefined4 *)puVar4)" ( (binary_expression "__dest != (undefined4 *)puVar4" identifier != (cast_expression "(undefined4 *)puVar4" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n      sVar3 = uVar1 + 1;\n      if (sVar3 == 1) {\n        *(undefined1 *)(param_1 + 2) = *puVar4;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest,puVar4,sVar3);\n      }\n      FUN_001e6db0(puVar4);\n      *param_1 = __dest;\n    }" { (expression_statement "sVar3 = uVar1 + 1;" (assignment_expression "sVar3 = uVar1 + 1" identifier = (binary_expression "uVar1 + 1" identifier + number_literal)) ;) (if_statement "if (sVar3 == 1) {\n        *(undefined1 *)(param_1 + 2) = *puVar4;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest,puVar4,sVar3);\n      }" if (parenthesized_expression "(sVar3 == 1)" ( (binary_expression "sVar3 == 1" identifier == number_literal) )) (compound_statement "{\n        *(undefined1 *)(param_1 + 2) = *puVar4;\n      }" { (expression_statement "*(undefined1 *)(param_1 + 2) = *puVar4;" (assignment_expression "*(undefined1 *)(param_1 + 2) = *puVar4" (pointer_expression "*(undefined1 *)(param_1 + 2)" * (cast_expression "(undefined1 *)(param_1 + 2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 2)" ( (binary_expression "param_1 + 2" identifier + number_literal) )))) = (pointer_expression "*puVar4" * identifier)) ;) }) (else_clause "else if (sVar3 != 0) {\n        memcpy(__dest,puVar4,sVar3);\n      }" else (if_statement "if (sVar3 != 0) {\n        memcpy(__dest,puVar4,sVar3);\n      }" if (parenthesized_expression "(sVar3 != 0)" ( (binary_expression "sVar3 != 0" identifier != number_literal) )) (compound_statement "{\n        memcpy(__dest,puVar4,sVar3);\n      }" { (expression_statement "memcpy(__dest,puVar4,sVar3);" (call_expression "memcpy(__dest,puVar4,sVar3)" identifier (argument_list "(__dest,puVar4,sVar3)" ( identifier , identifier , identifier ))) ;) })))) (expression_statement "FUN_001e6db0(puVar4);" (call_expression "FUN_001e6db0(puVar4)" identifier (argument_list "(puVar4)" ( identifier ))) ;) (expression_statement "*param_1 = __dest;" (assignment_expression "*param_1 = __dest" (pointer_expression "*param_1" * identifier) = identifier) ;) })) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT != IDENT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression LIT < IDENT) )) || (parenthesized_expression ( (binary_expression IDENT < IDENT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , (pointer_expression & IDENT) , IDENT ))))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (subscript_expression IDENT [ LIT ]) + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) })))) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (return_statement return ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (pointer_expression * IDENT)) ;) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) })))) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) })) })) (return_statement return ;) })))
(function_definition "void FUN_001ef040(undefined4 *param_1,uint param_2)\n\n{\n  undefined4 *__dest;\n  uint uVar1;\n  undefined1 *__dest_00;\n  uint uVar2;\n  size_t sVar3;\n  undefined1 *puVar4;\n  \n  uVar1 = param_1[1];\n  if (param_2 < uVar1) {\n    param_2 = uVar1;\n  }\n  puVar4 = (undefined1 *)*param_1;\n  __dest = param_1 + 2;\n  if (__dest == (undefined4 *)puVar4) {\n    uVar2 = 0xf;\n  }\n  else {\n    uVar2 = param_1[2];\n  }\n  if (uVar2 != param_2) {\n    if ((0xf < param_2) || (uVar2 < param_2)) {\n      __dest_00 = (undefined1 *)FUN_001ee4c0(param_1,&param_2,uVar2);\n      puVar4 = (undefined1 *)*param_1;\n      sVar3 = param_1[1] + 1;\n      if (sVar3 == 1) {\n        *__dest_00 = *puVar4;\n        puVar4 = (undefined1 *)*param_1;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest_00,puVar4,sVar3);\n        puVar4 = (undefined1 *)*param_1;\n      }\n      if (__dest != (undefined4 *)puVar4) {\n        FUN_001e6db0(puVar4);\n      }\n      *param_1 = __dest_00;\n      param_1[2] = param_2;\n      return;\n    }\n    if (__dest != (undefined4 *)puVar4) {\n      sVar3 = uVar1 + 1;\n      if (sVar3 == 1) {\n        *(undefined1 *)(param_1 + 2) = *puVar4;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest,puVar4,sVar3);\n      }\n      FUN_001e6db0(puVar4);\n      *param_1 = __dest;\n    }\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_001ef040(undefined4 *param_1,uint param_2)" (identifier "FUN_001ef040") (parameter_list "(undefined4 *param_1,uint param_2)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) () ")"))) (compound_statement "{\n  undefined4 *__dest;\n  uint uVar1;\n  undefined1 *__dest_00;\n  uint uVar2;\n  size_t sVar3;\n  undefined1 *puVar4;\n  \n  uVar1 = param_1[1];\n  if (param_2 < uVar1) {\n    param_2 = uVar1;\n  }\n  puVar4 = (undefined1 *)*param_1;\n  __dest = param_1 + 2;\n  if (__dest == (undefined4 *)puVar4) {\n    uVar2 = 0xf;\n  }\n  else {\n    uVar2 = param_1[2];\n  }\n  if (uVar2 != param_2) {\n    if ((0xf < param_2) || (uVar2 < param_2)) {\n      __dest_00 = (undefined1 *)FUN_001ee4c0(param_1,&param_2,uVar2);\n      puVar4 = (undefined1 *)*param_1;\n      sVar3 = param_1[1] + 1;\n      if (sVar3 == 1) {\n        *__dest_00 = *puVar4;\n        puVar4 = (undefined1 *)*param_1;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest_00,puVar4,sVar3);\n        puVar4 = (undefined1 *)*param_1;\n      }\n      if (__dest != (undefined4 *)puVar4) {\n        FUN_001e6db0(puVar4);\n      }\n      *param_1 = __dest_00;\n      param_1[2] = param_2;\n      return;\n    }\n    if (__dest != (undefined4 *)puVar4) {\n      sVar3 = uVar1 + 1;\n      if (sVar3 == 1) {\n        *(undefined1 *)(param_1 + 2) = *puVar4;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest,puVar4,sVar3);\n      }\n      FUN_001e6db0(puVar4);\n      *param_1 = __dest;\n    }\n  }\n  return;\n}" ({ "{") (declaration "undefined4 *__dest;" (type_identifier "undefined4") (pointer_declarator "*__dest" (* "*") (identifier "__dest")) (; ";")) (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "undefined1 *__dest_00;" (type_identifier "undefined1") (pointer_declarator "*__dest_00" (* "*") (identifier "__dest_00")) (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "size_t sVar3;" (primitive_type "size_t") (identifier "sVar3") (; ";")) (declaration "undefined1 *puVar4;" (type_identifier "undefined1") (pointer_declarator "*puVar4" (* "*") (identifier "puVar4")) (; ";")) (expression_statement "uVar1 = param_1[1];" (assignment_expression "uVar1 = param_1[1]" (identifier "uVar1") (= "=") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) (; ";")) (if_statement "if (param_2 < uVar1) {\n    param_2 = uVar1;\n  }" (if "if") (parenthesized_expression "(param_2 < uVar1)" (( "(") (binary_expression "param_2 < uVar1" (identifier "param_2") (< "<") (identifier "uVar1")) () ")")) (compound_statement "{\n    param_2 = uVar1;\n  }" ({ "{") (expression_statement "param_2 = uVar1;" (assignment_expression "param_2 = uVar1" (identifier "param_2") (= "=") (identifier "uVar1")) (; ";")) (} "}"))) (expression_statement "puVar4 = (undefined1 *)*param_1;" (assignment_expression "puVar4 = (undefined1 *)*param_1" (identifier "puVar4") (= "=") (cast_expression "(undefined1 *)*param_1" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (expression_statement "__dest = param_1 + 2;" (assignment_expression "__dest = param_1 + 2" (identifier "__dest") (= "=") (binary_expression "param_1 + 2" (identifier "param_1") (+ "+") (number_literal "2"))) (; ";")) (if_statement "if (__dest == (undefined4 *)puVar4) {\n    uVar2 = 0xf;\n  }\n  else {\n    uVar2 = param_1[2];\n  }" (if "if") (parenthesized_expression "(__dest == (undefined4 *)puVar4)" (( "(") (binary_expression "__dest == (undefined4 *)puVar4" (identifier "__dest") (== "==") (cast_expression "(undefined4 *)puVar4" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar4"))) () ")")) (compound_statement "{\n    uVar2 = 0xf;\n  }" ({ "{") (expression_statement "uVar2 = 0xf;" (assignment_expression "uVar2 = 0xf" (identifier "uVar2") (= "=") (number_literal "0xf")) (; ";")) (} "}")) (else_clause "else {\n    uVar2 = param_1[2];\n  }" (else "else") (compound_statement "{\n    uVar2 = param_1[2];\n  }" ({ "{") (expression_statement "uVar2 = param_1[2];" (assignment_expression "uVar2 = param_1[2]" (identifier "uVar2") (= "=") (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]"))) (; ";")) (} "}")))) (if_statement "if (uVar2 != param_2) {\n    if ((0xf < param_2) || (uVar2 < param_2)) {\n      __dest_00 = (undefined1 *)FUN_001ee4c0(param_1,&param_2,uVar2);\n      puVar4 = (undefined1 *)*param_1;\n      sVar3 = param_1[1] + 1;\n      if (sVar3 == 1) {\n        *__dest_00 = *puVar4;\n        puVar4 = (undefined1 *)*param_1;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest_00,puVar4,sVar3);\n        puVar4 = (undefined1 *)*param_1;\n      }\n      if (__dest != (undefined4 *)puVar4) {\n        FUN_001e6db0(puVar4);\n      }\n      *param_1 = __dest_00;\n      param_1[2] = param_2;\n      return;\n    }\n    if (__dest != (undefined4 *)puVar4) {\n      sVar3 = uVar1 + 1;\n      if (sVar3 == 1) {\n        *(undefined1 *)(param_1 + 2) = *puVar4;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest,puVar4,sVar3);\n      }\n      FUN_001e6db0(puVar4);\n      *param_1 = __dest;\n    }\n  }" (if "if") (parenthesized_expression "(uVar2 != param_2)" (( "(") (binary_expression "uVar2 != param_2" (identifier "uVar2") (!= "!=") (identifier "param_2")) () ")")) (compound_statement "{\n    if ((0xf < param_2) || (uVar2 < param_2)) {\n      __dest_00 = (undefined1 *)FUN_001ee4c0(param_1,&param_2,uVar2);\n      puVar4 = (undefined1 *)*param_1;\n      sVar3 = param_1[1] + 1;\n      if (sVar3 == 1) {\n        *__dest_00 = *puVar4;\n        puVar4 = (undefined1 *)*param_1;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest_00,puVar4,sVar3);\n        puVar4 = (undefined1 *)*param_1;\n      }\n      if (__dest != (undefined4 *)puVar4) {\n        FUN_001e6db0(puVar4);\n      }\n      *param_1 = __dest_00;\n      param_1[2] = param_2;\n      return;\n    }\n    if (__dest != (undefined4 *)puVar4) {\n      sVar3 = uVar1 + 1;\n      if (sVar3 == 1) {\n        *(undefined1 *)(param_1 + 2) = *puVar4;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest,puVar4,sVar3);\n      }\n      FUN_001e6db0(puVar4);\n      *param_1 = __dest;\n    }\n  }" ({ "{") (if_statement "if ((0xf < param_2) || (uVar2 < param_2)) {\n      __dest_00 = (undefined1 *)FUN_001ee4c0(param_1,&param_2,uVar2);\n      puVar4 = (undefined1 *)*param_1;\n      sVar3 = param_1[1] + 1;\n      if (sVar3 == 1) {\n        *__dest_00 = *puVar4;\n        puVar4 = (undefined1 *)*param_1;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest_00,puVar4,sVar3);\n        puVar4 = (undefined1 *)*param_1;\n      }\n      if (__dest != (undefined4 *)puVar4) {\n        FUN_001e6db0(puVar4);\n      }\n      *param_1 = __dest_00;\n      param_1[2] = param_2;\n      return;\n    }" (if "if") (parenthesized_expression "((0xf < param_2) || (uVar2 < param_2))" (( "(") (binary_expression "(0xf < param_2) || (uVar2 < param_2)" (parenthesized_expression "(0xf < param_2)" (( "(") (binary_expression "0xf < param_2" (number_literal "0xf") (< "<") (identifier "param_2")) () ")")) (|| "||") (parenthesized_expression "(uVar2 < param_2)" (( "(") (binary_expression "uVar2 < param_2" (identifier "uVar2") (< "<") (identifier "param_2")) () ")"))) () ")")) (compound_statement "{\n      __dest_00 = (undefined1 *)FUN_001ee4c0(param_1,&param_2,uVar2);\n      puVar4 = (undefined1 *)*param_1;\n      sVar3 = param_1[1] + 1;\n      if (sVar3 == 1) {\n        *__dest_00 = *puVar4;\n        puVar4 = (undefined1 *)*param_1;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest_00,puVar4,sVar3);\n        puVar4 = (undefined1 *)*param_1;\n      }\n      if (__dest != (undefined4 *)puVar4) {\n        FUN_001e6db0(puVar4);\n      }\n      *param_1 = __dest_00;\n      param_1[2] = param_2;\n      return;\n    }" ({ "{") (expression_statement "__dest_00 = (undefined1 *)FUN_001ee4c0(param_1,&param_2,uVar2);" (assignment_expression "__dest_00 = (undefined1 *)FUN_001ee4c0(param_1,&param_2,uVar2)" (identifier "__dest_00") (= "=") (cast_expression "(undefined1 *)FUN_001ee4c0(param_1,&param_2,uVar2)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_001ee4c0(param_1,&param_2,uVar2)" (identifier "FUN_001ee4c0") (argument_list "(param_1,&param_2,uVar2)" (( "(") (identifier "param_1") (, ",") (pointer_expression "&param_2" (& "&") (identifier "param_2")) (, ",") (identifier "uVar2") () ")"))))) (; ";")) (expression_statement "puVar4 = (undefined1 *)*param_1;" (assignment_expression "puVar4 = (undefined1 *)*param_1" (identifier "puVar4") (= "=") (cast_expression "(undefined1 *)*param_1" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (expression_statement "sVar3 = param_1[1] + 1;" (assignment_expression "sVar3 = param_1[1] + 1" (identifier "sVar3") (= "=") (binary_expression "param_1[1] + 1" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (sVar3 == 1) {\n        *__dest_00 = *puVar4;\n        puVar4 = (undefined1 *)*param_1;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest_00,puVar4,sVar3);\n        puVar4 = (undefined1 *)*param_1;\n      }" (if "if") (parenthesized_expression "(sVar3 == 1)" (( "(") (binary_expression "sVar3 == 1" (identifier "sVar3") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n        *__dest_00 = *puVar4;\n        puVar4 = (undefined1 *)*param_1;\n      }" ({ "{") (expression_statement "*__dest_00 = *puVar4;" (assignment_expression "*__dest_00 = *puVar4" (pointer_expression "*__dest_00" (* "*") (identifier "__dest_00")) (= "=") (pointer_expression "*puVar4" (* "*") (identifier "puVar4"))) (; ";")) (expression_statement "puVar4 = (undefined1 *)*param_1;" (assignment_expression "puVar4 = (undefined1 *)*param_1" (identifier "puVar4") (= "=") (cast_expression "(undefined1 *)*param_1" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (} "}")) (else_clause "else if (sVar3 != 0) {\n        memcpy(__dest_00,puVar4,sVar3);\n        puVar4 = (undefined1 *)*param_1;\n      }" (else "else") (if_statement "if (sVar3 != 0) {\n        memcpy(__dest_00,puVar4,sVar3);\n        puVar4 = (undefined1 *)*param_1;\n      }" (if "if") (parenthesized_expression "(sVar3 != 0)" (( "(") (binary_expression "sVar3 != 0" (identifier "sVar3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        memcpy(__dest_00,puVar4,sVar3);\n        puVar4 = (undefined1 *)*param_1;\n      }" ({ "{") (expression_statement "memcpy(__dest_00,puVar4,sVar3);" (call_expression "memcpy(__dest_00,puVar4,sVar3)" (identifier "memcpy") (argument_list "(__dest_00,puVar4,sVar3)" (( "(") (identifier "__dest_00") (, ",") (identifier "puVar4") (, ",") (identifier "sVar3") () ")"))) (; ";")) (expression_statement "puVar4 = (undefined1 *)*param_1;" (assignment_expression "puVar4 = (undefined1 *)*param_1" (identifier "puVar4") (= "=") (cast_expression "(undefined1 *)*param_1" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (} "}"))))) (if_statement "if (__dest != (undefined4 *)puVar4) {\n        FUN_001e6db0(puVar4);\n      }" (if "if") (parenthesized_expression "(__dest != (undefined4 *)puVar4)" (( "(") (binary_expression "__dest != (undefined4 *)puVar4" (identifier "__dest") (!= "!=") (cast_expression "(undefined4 *)puVar4" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar4"))) () ")")) (compound_statement "{\n        FUN_001e6db0(puVar4);\n      }" ({ "{") (expression_statement "FUN_001e6db0(puVar4);" (call_expression "FUN_001e6db0(puVar4)" (identifier "FUN_001e6db0") (argument_list "(puVar4)" (( "(") (identifier "puVar4") () ")"))) (; ";")) (} "}"))) (expression_statement "*param_1 = __dest_00;" (assignment_expression "*param_1 = __dest_00" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (identifier "__dest_00")) (; ";")) (expression_statement "param_1[2] = param_2;" (assignment_expression "param_1[2] = param_2" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (= "=") (identifier "param_2")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (if_statement "if (__dest != (undefined4 *)puVar4) {\n      sVar3 = uVar1 + 1;\n      if (sVar3 == 1) {\n        *(undefined1 *)(param_1 + 2) = *puVar4;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest,puVar4,sVar3);\n      }\n      FUN_001e6db0(puVar4);\n      *param_1 = __dest;\n    }" (if "if") (parenthesized_expression "(__dest != (undefined4 *)puVar4)" (( "(") (binary_expression "__dest != (undefined4 *)puVar4" (identifier "__dest") (!= "!=") (cast_expression "(undefined4 *)puVar4" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar4"))) () ")")) (compound_statement "{\n      sVar3 = uVar1 + 1;\n      if (sVar3 == 1) {\n        *(undefined1 *)(param_1 + 2) = *puVar4;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest,puVar4,sVar3);\n      }\n      FUN_001e6db0(puVar4);\n      *param_1 = __dest;\n    }" ({ "{") (expression_statement "sVar3 = uVar1 + 1;" (assignment_expression "sVar3 = uVar1 + 1" (identifier "sVar3") (= "=") (binary_expression "uVar1 + 1" (identifier "uVar1") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (sVar3 == 1) {\n        *(undefined1 *)(param_1 + 2) = *puVar4;\n      }\n      else if (sVar3 != 0) {\n        memcpy(__dest,puVar4,sVar3);\n      }" (if "if") (parenthesized_expression "(sVar3 == 1)" (( "(") (binary_expression "sVar3 == 1" (identifier "sVar3") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n        *(undefined1 *)(param_1 + 2) = *puVar4;\n      }" ({ "{") (expression_statement "*(undefined1 *)(param_1 + 2) = *puVar4;" (assignment_expression "*(undefined1 *)(param_1 + 2) = *puVar4" (pointer_expression "*(undefined1 *)(param_1 + 2)" (* "*") (cast_expression "(undefined1 *)(param_1 + 2)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 2)" (( "(") (binary_expression "param_1 + 2" (identifier "param_1") (+ "+") (number_literal "2")) () ")")))) (= "=") (pointer_expression "*puVar4" (* "*") (identifier "puVar4"))) (; ";")) (} "}")) (else_clause "else if (sVar3 != 0) {\n        memcpy(__dest,puVar4,sVar3);\n      }" (else "else") (if_statement "if (sVar3 != 0) {\n        memcpy(__dest,puVar4,sVar3);\n      }" (if "if") (parenthesized_expression "(sVar3 != 0)" (( "(") (binary_expression "sVar3 != 0" (identifier "sVar3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        memcpy(__dest,puVar4,sVar3);\n      }" ({ "{") (expression_statement "memcpy(__dest,puVar4,sVar3);" (call_expression "memcpy(__dest,puVar4,sVar3)" (identifier "memcpy") (argument_list "(__dest,puVar4,sVar3)" (( "(") (identifier "__dest") (, ",") (identifier "puVar4") (, ",") (identifier "sVar3") () ")"))) (; ";")) (} "}"))))) (expression_statement "FUN_001e6db0(puVar4);" (call_expression "FUN_001e6db0(puVar4)" (identifier "FUN_001e6db0") (argument_list "(puVar4)" (( "(") (identifier "puVar4") () ")"))) (; ";")) (expression_statement "*param_1 = __dest;" (assignment_expression "*param_1 = __dest" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (identifier "__dest")) (; ";")) (} "}"))) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::string::reserve(unsigned int) */

void __thiscall std::type_1::function_1(type_1 *var_1,type_2 var_2)

{
  type_1 *var_4;
  type_2 var_3;
  type_1 *__dest_00;
  type_2 var_6;
  size_t var_8;
  type_1 *var_5;
  
  var_3 = *(type_2 *)(var_1 + 4);
  if (var_2 < var_3) {
    var_2 = var_3;
  }
  var_5 = *(type_1 **)var_1;
  var_4 = var_1 + 8;
  if (var_4 == var_5) {
    var_6 = 0xf;
  }
  else {
    var_6 = *(type_2 *)(var_1 + 8);
  }
  if (var_6 != var_2) {
    if ((0xf < var_2) || (var_6 < var_2)) {
      __dest_00 = (type_1 *)var_7(var_1,&var_2,var_6);
      var_5 = *(type_1 **)var_1;
      var_8 = *(int *)(var_1 + 4) + 1;
      if (var_8 == 1) {
        *__dest_00 = *var_5;
        var_5 = *(type_1 **)var_1;
      }
      else if (var_8 != 0) {
        var_9(__dest_00,var_5,var_8);
        var_5 = *(type_1 **)var_1;
      }
      if (var_4 != var_5) {
        var_10(var_5);
      }
      *(type_1 **)var_1 = __dest_00;
      *(type_2 *)(var_1 + 8) = var_2;
      return;
    }
    if (var_4 != var_5) {
      var_8 = var_3 + 1;
      if (var_8 == 1) {
        var_1[8] = *var_5;
      }
      else if (var_8 != 0) {
        var_9(var_4,var_5,var_8);
      }
      var_10(var_5);
      *(type_1 **)var_1 = var_4;
    }
  }
  return;
}


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

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

void MASKED(undefined4 *param_1,uint param_2)

{
  undefined4 *__dest;
  uint uVar1;
  undefined1 *__dest_00;
  uint uVar2;
  size_t sVar3;
  undefined1 *puVar4;
  
  uVar1 = param_1[1];
  if (param_2 < uVar1) {
    param_2 = uVar1;
  }
  puVar4 = (undefined1 *)*param_1;
  __dest = param_1 + 2;
  if (__dest == (undefined4 *)puVar4) {
    uVar2 = 0xf;
  }
  else {
    uVar2 = param_1[2];
  }
  if (uVar2 != param_2) {
    if ((0xf < param_2) || (uVar2 < param_2)) {
      __dest_00 = (undefined1 *)FUN_001ee4c0(param_1,&param_2,uVar2);
      puVar4 = (undefined1 *)*param_1;
      sVar3 = param_1[1] + 1;
      if (sVar3 == 1) {
        *__dest_00 = *puVar4;
        puVar4 = (undefined1 *)*param_1;
      }
      else if (sVar3 != 0) {
        memcpy(__dest_00,puVar4,sVar3);
        puVar4 = (undefined1 *)*param_1;
      }
      if (__dest != (undefined4 *)puVar4) {
        FUN_001e6db0(puVar4);
      }
      *param_1 = __dest_00;
      param_1[2] = param_2;
      return;
    }
    if (__dest != (undefined4 *)puVar4) {
      sVar3 = uVar1 + 1;
      if (sVar3 == 1) {
        *(undefined1 *)(param_1 + 2) = *puVar4;
      }
      else if (sVar3 != 0) {
        memcpy(__dest,puVar4,sVar3);
      }
      FUN_001e6db0(puVar4);
      *param_1 = __dest;
    }
  }
  return;
}

