
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Enum "GravityType": Some values do not have unique names */
/* WARNING: Enum "DisposeType": Some values do not have unique names */
/* WARNING: Enum "ChannelType": Some values do not have unique names */
/* WARNING: Enum "PixelChannel": Some values do not have unique names */
/* WARNING: Enum "ExceptionType": Some values do not have unique names */

int __regparm3 PNMComment(Image *image,CommentInfo *comment_info,ExceptionInfo *exception)

{
  size_t count;
  size_t sVar1;
  char *pcVar2;
  int iVar3;
  char *__s;
  
  __s = comment_info->comment;
  sVar1 = strlen(__s);
  pcVar2 = __s + sVar1;
  while( true ) {
    if ((char *)comment_info->extent <= pcVar2 + (1 - (int)__s)) {
      count = (int)comment_info->extent * 2;
      comment_info->extent = count;
      pcVar2 = (char *)ResizeQuantumMemory(__s,count,1);
      comment_info->comment = pcVar2;
      if (pcVar2 == (char *)0x0) {
        return -1;
      }
      sVar1 = strlen(pcVar2);
      pcVar2 = pcVar2 + sVar1;
    }
    iVar3 = ReadBlobByte(image);
    if (iVar3 == -1) {
      return -1;
    }
    *pcVar2 = (char)iVar3;
    pcVar2 = pcVar2 + 1;
    *pcVar2 = '\0';
    if (iVar3 == 10) {
      return 10;
    }
    if (iVar3 == 0xd) break;
    __s = comment_info->comment;
  }
  return 0xd;
}



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

undefined4 __regparm3 FUN_002438d0(undefined4 param_1,undefined4 *param_2)

{
  size_t sVar1;
  char *pcVar2;
  int iVar3;
  char *__s;
  
  __s = (char *)*param_2;
  sVar1 = strlen(__s);
  pcVar2 = __s + sVar1;
  while( true ) {
    if ((char *)param_2[1] <= pcVar2 + (1 - (int)__s)) {
      iVar3 = (int)param_2[1] * 2;
      param_2[1] = iVar3;
      pcVar2 = (char *)ResizeQuantumMemory(__s,iVar3,1);
      *param_2 = pcVar2;
      if (pcVar2 == (char *)0x0) {
        return 0xffffffff;
      }
      sVar1 = strlen(pcVar2);
      pcVar2 = pcVar2 + sVar1;
    }
    iVar3 = ReadBlobByte(param_1);
    if (iVar3 == -1) {
      return 0xffffffff;
    }
    *pcVar2 = (char)iVar3;
    pcVar2 = pcVar2 + 1;
    *pcVar2 = '\0';
    if (iVar3 == 10) {
      return 10;
    }
    if (iVar3 == 0xd) break;
    __s = (char *)*param_2;
  }
  return 0xd;
}


PUSH EBP
MOV EBP,EAX
PUSH EDI
MOV EDI,EDX
PUSH ESI
PUSH EBX
CALL 0x00038830
ADD EBX,0x195723
SUB ESP,0x28
MOV EDX,dword ptr [EDX]
PUSH EDX
MOV dword ptr [ESP + 0x1c],EDX
CALL 0x00031eb0
ADD ESP,0x10
MOV EDX,dword ptr [ESP + 0xc]
LEA ESI,[EDX + EAX*0x1]
JMP 0x00243914
MOV byte ptr [ESI],AL
ADD ESI,0x1
MOV byte ptr [ESI],0x0
CMP EAX,0xa
JZ 0x0024395d
CMP EAX,0xd
JZ 0x0024395d
MOV EDX,dword ptr [EDI]
MOV EAX,dword ptr [EDI + 0x4]
MOV ECX,ESI
SUB ECX,EDX
ADD ECX,0x1
CMP ECX,EAX
JC 0x0024394c
SUB ESP,0x4
ADD EAX,EAX
PUSH 0x1
MOV dword ptr [EDI + 0x4],EAX
PUSH EAX
PUSH EDX
CALL 0x00031b20
ADD ESP,0x10
MOV ESI,EAX
MOV dword ptr [EDI],EAX
TEST EAX,EAX
JZ 0x00243968
SUB ESP,0xc
PUSH EAX
CALL 0x00031eb0
ADD ESP,0x10
ADD ESI,EAX
SUB ESP,0xc
PUSH EBP
CALL 0x00030c90
ADD ESP,0x10
CMP EAX,-0x1
JNZ 0x00243900
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
ADD ESP,0x1c
MOV EAX,0xffffffff
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 __regparm3 FUN_002438d0(undefined4 param_1,undefined4 *param_2)\n\n{\n  size_t sVar1;\n  char *pcVar2;\n  int iVar3;\n  char *__s;\n  \n  __s = (char *)*param_2;\n  sVar1 = strlen(__s);\n  pcVar2 = __s + sVar1;\n  while( true ) {\n    if ((char *)param_2[1] <= pcVar2 + (1 - (int)__s)) {\n      iVar3 = (int)param_2[1] * 2;\n      param_2[1] = iVar3;\n      pcVar2 = (char *)ResizeQuantumMemory(__s,iVar3,1);\n      *param_2 = pcVar2;\n      if (pcVar2 == (char *)0x0) {\n        return 0xffffffff;\n      }\n      sVar1 = strlen(pcVar2);\n      pcVar2 = pcVar2 + sVar1;\n    }\n    iVar3 = ReadBlobByte(param_1);\n    if (iVar3 == -1) {\n      return 0xffffffff;\n    }\n    *pcVar2 = (char)iVar3;\n    pcVar2 = pcVar2 + 1;\n    *pcVar2 = '\0';\n    if (iVar3 == 10) {\n      return 10;\n    }\n    if (iVar3 == 0xd) break;\n    __s = (char *)*param_2;\n  }\n  return 0xd;\n}\n\n" comment (function_definition "undefined4 __regparm3 FUN_002438d0(undefined4 param_1,undefined4 *param_2)\n\n{\n  size_t sVar1;\n  char *pcVar2;\n  int iVar3;\n  char *__s;\n  \n  __s = (char *)*param_2;\n  sVar1 = strlen(__s);\n  pcVar2 = __s + sVar1;\n  while( true ) {\n    if ((char *)param_2[1] <= pcVar2 + (1 - (int)__s)) {\n      iVar3 = (int)param_2[1] * 2;\n      param_2[1] = iVar3;\n      pcVar2 = (char *)ResizeQuantumMemory(__s,iVar3,1);\n      *param_2 = pcVar2;\n      if (pcVar2 == (char *)0x0) {\n        return 0xffffffff;\n      }\n      sVar1 = strlen(pcVar2);\n      pcVar2 = pcVar2 + sVar1;\n    }\n    iVar3 = ReadBlobByte(param_1);\n    if (iVar3 == -1) {\n      return 0xffffffff;\n    }\n    *pcVar2 = (char)iVar3;\n    pcVar2 = pcVar2 + 1;\n    *pcVar2 = '\0';\n    if (iVar3 == 10) {\n      return 10;\n    }\n    if (iVar3 == 0xd) break;\n    __s = (char *)*param_2;\n  }\n  return 0xd;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_002438d0(undefined4 param_1,undefined4 *param_2)" identifier (parameter_list "(undefined4 param_1,undefined4 *param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  size_t sVar1;\n  char *pcVar2;\n  int iVar3;\n  char *__s;\n  \n  __s = (char *)*param_2;\n  sVar1 = strlen(__s);\n  pcVar2 = __s + sVar1;\n  while( true ) {\n    if ((char *)param_2[1] <= pcVar2 + (1 - (int)__s)) {\n      iVar3 = (int)param_2[1] * 2;\n      param_2[1] = iVar3;\n      pcVar2 = (char *)ResizeQuantumMemory(__s,iVar3,1);\n      *param_2 = pcVar2;\n      if (pcVar2 == (char *)0x0) {\n        return 0xffffffff;\n      }\n      sVar1 = strlen(pcVar2);\n      pcVar2 = pcVar2 + sVar1;\n    }\n    iVar3 = ReadBlobByte(param_1);\n    if (iVar3 == -1) {\n      return 0xffffffff;\n    }\n    *pcVar2 = (char)iVar3;\n    pcVar2 = pcVar2 + 1;\n    *pcVar2 = '\0';\n    if (iVar3 == 10) {\n      return 10;\n    }\n    if (iVar3 == 0xd) break;\n    __s = (char *)*param_2;\n  }\n  return 0xd;\n}" { (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (expression_statement "__s = (char *)*param_2;" (assignment_expression "__s = (char *)*param_2" identifier = (cast_expression "(char *)*param_2" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier))) ;) (expression_statement "sVar1 = strlen(__s);" (assignment_expression "sVar1 = strlen(__s)" identifier = (call_expression "strlen(__s)" identifier (argument_list "(__s)" ( identifier )))) ;) (expression_statement "pcVar2 = __s + sVar1;" (assignment_expression "pcVar2 = __s + sVar1" identifier = (binary_expression "__s + sVar1" identifier + identifier)) ;) (while_statement "while( true ) {\n    if ((char *)param_2[1] <= pcVar2 + (1 - (int)__s)) {\n      iVar3 = (int)param_2[1] * 2;\n      param_2[1] = iVar3;\n      pcVar2 = (char *)ResizeQuantumMemory(__s,iVar3,1);\n      *param_2 = pcVar2;\n      if (pcVar2 == (char *)0x0) {\n        return 0xffffffff;\n      }\n      sVar1 = strlen(pcVar2);\n      pcVar2 = pcVar2 + sVar1;\n    }\n    iVar3 = ReadBlobByte(param_1);\n    if (iVar3 == -1) {\n      return 0xffffffff;\n    }\n    *pcVar2 = (char)iVar3;\n    pcVar2 = pcVar2 + 1;\n    *pcVar2 = '\0';\n    if (iVar3 == 10) {\n      return 10;\n    }\n    if (iVar3 == 0xd) break;\n    __s = (char *)*param_2;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    if ((char *)param_2[1] <= pcVar2 + (1 - (int)__s)) {\n      iVar3 = (int)param_2[1] * 2;\n      param_2[1] = iVar3;\n      pcVar2 = (char *)ResizeQuantumMemory(__s,iVar3,1);\n      *param_2 = pcVar2;\n      if (pcVar2 == (char *)0x0) {\n        return 0xffffffff;\n      }\n      sVar1 = strlen(pcVar2);\n      pcVar2 = pcVar2 + sVar1;\n    }\n    iVar3 = ReadBlobByte(param_1);\n    if (iVar3 == -1) {\n      return 0xffffffff;\n    }\n    *pcVar2 = (char)iVar3;\n    pcVar2 = pcVar2 + 1;\n    *pcVar2 = '\0';\n    if (iVar3 == 10) {\n      return 10;\n    }\n    if (iVar3 == 0xd) break;\n    __s = (char *)*param_2;\n  }" { (if_statement "if ((char *)param_2[1] <= pcVar2 + (1 - (int)__s)) {\n      iVar3 = (int)param_2[1] * 2;\n      param_2[1] = iVar3;\n      pcVar2 = (char *)ResizeQuantumMemory(__s,iVar3,1);\n      *param_2 = pcVar2;\n      if (pcVar2 == (char *)0x0) {\n        return 0xffffffff;\n      }\n      sVar1 = strlen(pcVar2);\n      pcVar2 = pcVar2 + sVar1;\n    }" if (parenthesized_expression "((char *)param_2[1] <= pcVar2 + (1 - (int)__s))" ( (binary_expression "(char *)param_2[1] <= pcVar2 + (1 - (int)__s)" (cast_expression "(char *)param_2[1]" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_2[1]" identifier [ number_literal ])) <= (binary_expression "pcVar2 + (1 - (int)__s)" identifier + (parenthesized_expression "(1 - (int)__s)" ( (binary_expression "1 - (int)__s" number_literal - (cast_expression "(int)__s" ( (type_descriptor "int" primitive_type) ) identifier)) )))) )) (compound_statement "{\n      iVar3 = (int)param_2[1] * 2;\n      param_2[1] = iVar3;\n      pcVar2 = (char *)ResizeQuantumMemory(__s,iVar3,1);\n      *param_2 = pcVar2;\n      if (pcVar2 == (char *)0x0) {\n        return 0xffffffff;\n      }\n      sVar1 = strlen(pcVar2);\n      pcVar2 = pcVar2 + sVar1;\n    }" { (expression_statement "iVar3 = (int)param_2[1] * 2;" (assignment_expression "iVar3 = (int)param_2[1] * 2" identifier = (binary_expression "(int)param_2[1] * 2" (cast_expression "(int)param_2[1]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "param_2[1]" identifier [ number_literal ])) * number_literal)) ;) (expression_statement "param_2[1] = iVar3;" (assignment_expression "param_2[1] = iVar3" (subscript_expression "param_2[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "pcVar2 = (char *)ResizeQuantumMemory(__s,iVar3,1);" (assignment_expression "pcVar2 = (char *)ResizeQuantumMemory(__s,iVar3,1)" identifier = (cast_expression "(char *)ResizeQuantumMemory(__s,iVar3,1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "ResizeQuantumMemory(__s,iVar3,1)" identifier (argument_list "(__s,iVar3,1)" ( identifier , identifier , number_literal ))))) ;) (expression_statement "*param_2 = pcVar2;" (assignment_expression "*param_2 = pcVar2" (pointer_expression "*param_2" * identifier) = identifier) ;) (if_statement "if (pcVar2 == (char *)0x0) {\n        return 0xffffffff;\n      }" if (parenthesized_expression "(pcVar2 == (char *)0x0)" ( (binary_expression "pcVar2 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        return 0xffffffff;\n      }" { (return_statement "return 0xffffffff;" return number_literal ;) })) (expression_statement "sVar1 = strlen(pcVar2);" (assignment_expression "sVar1 = strlen(pcVar2)" identifier = (call_expression "strlen(pcVar2)" identifier (argument_list "(pcVar2)" ( identifier )))) ;) (expression_statement "pcVar2 = pcVar2 + sVar1;" (assignment_expression "pcVar2 = pcVar2 + sVar1" identifier = (binary_expression "pcVar2 + sVar1" identifier + identifier)) ;) })) (expression_statement "iVar3 = ReadBlobByte(param_1);" (assignment_expression "iVar3 = ReadBlobByte(param_1)" identifier = (call_expression "ReadBlobByte(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (iVar3 == -1) {\n      return 0xffffffff;\n    }" if (parenthesized_expression "(iVar3 == -1)" ( (binary_expression "iVar3 == -1" identifier == number_literal) )) (compound_statement "{\n      return 0xffffffff;\n    }" { (return_statement "return 0xffffffff;" return number_literal ;) })) (expression_statement "*pcVar2 = (char)iVar3;" (assignment_expression "*pcVar2 = (char)iVar3" (pointer_expression "*pcVar2" * identifier) = (cast_expression "(char)iVar3" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (expression_statement "pcVar2 = pcVar2 + 1;" (assignment_expression "pcVar2 = pcVar2 + 1" identifier = (binary_expression "pcVar2 + 1" identifier + number_literal)) ;) (expression_statement "*pcVar2 = '\0';" (assignment_expression "*pcVar2 = '\0'" (pointer_expression "*pcVar2" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (if_statement "if (iVar3 == 10) {\n      return 10;\n    }" if (parenthesized_expression "(iVar3 == 10)" ( (binary_expression "iVar3 == 10" identifier == number_literal) )) (compound_statement "{\n      return 10;\n    }" { (return_statement "return 10;" return number_literal ;) })) (if_statement "if (iVar3 == 0xd) break;" if (parenthesized_expression "(iVar3 == 0xd)" ( (binary_expression "iVar3 == 0xd" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "__s = (char *)*param_2;" (assignment_expression "__s = (char *)*param_2" identifier = (cast_expression "(char *)*param_2" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier))) ;) })) (return_statement "return 0xd;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Enum "GravityType": Some values do not have unique names */\n/* WARNING: Enum "DisposeType": Some values do not have unique names */\n/* WARNING: Enum "ChannelType": Some values do not have unique names */\n/* WARNING: Enum "PixelChannel": Some values do not have unique names */\n/* WARNING: Enum "ExceptionType": Some values do not have unique names */\n\nint __regparm3 PNMComment(Image *image,CommentInfo *comment_info,ExceptionInfo *exception)\n\n{\n  size_t count;\n  size_t sVar1;\n  char *pcVar2;\n  int iVar3;\n  char *__s;\n  \n  __s = comment_info->comment;\n  sVar1 = strlen(__s);\n  pcVar2 = __s + sVar1;\n  while( true ) {\n    if ((char *)comment_info->extent <= pcVar2 + (1 - (int)__s)) {\n      count = (int)comment_info->extent * 2;\n      comment_info->extent = count;\n      pcVar2 = (char *)ResizeQuantumMemory(__s,count,1);\n      comment_info->comment = pcVar2;\n      if (pcVar2 == (char *)0x0) {\n        return -1;\n      }\n      sVar1 = strlen(pcVar2);\n      pcVar2 = pcVar2 + sVar1;\n    }\n    iVar3 = ReadBlobByte(image);\n    if (iVar3 == -1) {\n      return -1;\n    }\n    *pcVar2 = (char)iVar3;\n    pcVar2 = pcVar2 + 1;\n    *pcVar2 = '\0';\n    if (iVar3 == 10) {\n      return 10;\n    }\n    if (iVar3 == 0xd) break;\n    __s = comment_info->comment;\n  }\n  return 0xd;\n}\n\n" comment comment comment comment comment comment (function_definition "int __regparm3 PNMComment(Image *image,CommentInfo *comment_info,ExceptionInfo *exception)\n\n{\n  size_t count;\n  size_t sVar1;\n  char *pcVar2;\n  int iVar3;\n  char *__s;\n  \n  __s = comment_info->comment;\n  sVar1 = strlen(__s);\n  pcVar2 = __s + sVar1;\n  while( true ) {\n    if ((char *)comment_info->extent <= pcVar2 + (1 - (int)__s)) {\n      count = (int)comment_info->extent * 2;\n      comment_info->extent = count;\n      pcVar2 = (char *)ResizeQuantumMemory(__s,count,1);\n      comment_info->comment = pcVar2;\n      if (pcVar2 == (char *)0x0) {\n        return -1;\n      }\n      sVar1 = strlen(pcVar2);\n      pcVar2 = pcVar2 + sVar1;\n    }\n    iVar3 = ReadBlobByte(image);\n    if (iVar3 == -1) {\n      return -1;\n    }\n    *pcVar2 = (char)iVar3;\n    pcVar2 = pcVar2 + 1;\n    *pcVar2 = '\0';\n    if (iVar3 == 10) {\n      return 10;\n    }\n    if (iVar3 == 0xd) break;\n    __s = comment_info->comment;\n  }\n  return 0xd;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "PNMComment(Image *image,CommentInfo *comment_info,ExceptionInfo *exception)" identifier (parameter_list "(Image *image,CommentInfo *comment_info,ExceptionInfo *exception)" ( (parameter_declaration "Image *image" type_identifier (pointer_declarator "*image" * identifier)) , (parameter_declaration "CommentInfo *comment_info" type_identifier (pointer_declarator "*comment_info" * identifier)) , (parameter_declaration "ExceptionInfo *exception" type_identifier (pointer_declarator "*exception" * identifier)) ))) (compound_statement "{\n  size_t count;\n  size_t sVar1;\n  char *pcVar2;\n  int iVar3;\n  char *__s;\n  \n  __s = comment_info->comment;\n  sVar1 = strlen(__s);\n  pcVar2 = __s + sVar1;\n  while( true ) {\n    if ((char *)comment_info->extent <= pcVar2 + (1 - (int)__s)) {\n      count = (int)comment_info->extent * 2;\n      comment_info->extent = count;\n      pcVar2 = (char *)ResizeQuantumMemory(__s,count,1);\n      comment_info->comment = pcVar2;\n      if (pcVar2 == (char *)0x0) {\n        return -1;\n      }\n      sVar1 = strlen(pcVar2);\n      pcVar2 = pcVar2 + sVar1;\n    }\n    iVar3 = ReadBlobByte(image);\n    if (iVar3 == -1) {\n      return -1;\n    }\n    *pcVar2 = (char)iVar3;\n    pcVar2 = pcVar2 + 1;\n    *pcVar2 = '\0';\n    if (iVar3 == 10) {\n      return 10;\n    }\n    if (iVar3 == 0xd) break;\n    __s = comment_info->comment;\n  }\n  return 0xd;\n}" { (declaration "size_t count;" primitive_type identifier ;) (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (expression_statement "__s = comment_info->comment;" (assignment_expression "__s = comment_info->comment" identifier = (field_expression "comment_info->comment" identifier -> field_identifier)) ;) (expression_statement "sVar1 = strlen(__s);" (assignment_expression "sVar1 = strlen(__s)" identifier = (call_expression "strlen(__s)" identifier (argument_list "(__s)" ( identifier )))) ;) (expression_statement "pcVar2 = __s + sVar1;" (assignment_expression "pcVar2 = __s + sVar1" identifier = (binary_expression "__s + sVar1" identifier + identifier)) ;) (while_statement "while( true ) {\n    if ((char *)comment_info->extent <= pcVar2 + (1 - (int)__s)) {\n      count = (int)comment_info->extent * 2;\n      comment_info->extent = count;\n      pcVar2 = (char *)ResizeQuantumMemory(__s,count,1);\n      comment_info->comment = pcVar2;\n      if (pcVar2 == (char *)0x0) {\n        return -1;\n      }\n      sVar1 = strlen(pcVar2);\n      pcVar2 = pcVar2 + sVar1;\n    }\n    iVar3 = ReadBlobByte(image);\n    if (iVar3 == -1) {\n      return -1;\n    }\n    *pcVar2 = (char)iVar3;\n    pcVar2 = pcVar2 + 1;\n    *pcVar2 = '\0';\n    if (iVar3 == 10) {\n      return 10;\n    }\n    if (iVar3 == 0xd) break;\n    __s = comment_info->comment;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    if ((char *)comment_info->extent <= pcVar2 + (1 - (int)__s)) {\n      count = (int)comment_info->extent * 2;\n      comment_info->extent = count;\n      pcVar2 = (char *)ResizeQuantumMemory(__s,count,1);\n      comment_info->comment = pcVar2;\n      if (pcVar2 == (char *)0x0) {\n        return -1;\n      }\n      sVar1 = strlen(pcVar2);\n      pcVar2 = pcVar2 + sVar1;\n    }\n    iVar3 = ReadBlobByte(image);\n    if (iVar3 == -1) {\n      return -1;\n    }\n    *pcVar2 = (char)iVar3;\n    pcVar2 = pcVar2 + 1;\n    *pcVar2 = '\0';\n    if (iVar3 == 10) {\n      return 10;\n    }\n    if (iVar3 == 0xd) break;\n    __s = comment_info->comment;\n  }" { (if_statement "if ((char *)comment_info->extent <= pcVar2 + (1 - (int)__s)) {\n      count = (int)comment_info->extent * 2;\n      comment_info->extent = count;\n      pcVar2 = (char *)ResizeQuantumMemory(__s,count,1);\n      comment_info->comment = pcVar2;\n      if (pcVar2 == (char *)0x0) {\n        return -1;\n      }\n      sVar1 = strlen(pcVar2);\n      pcVar2 = pcVar2 + sVar1;\n    }" if (parenthesized_expression "((char *)comment_info->extent <= pcVar2 + (1 - (int)__s))" ( (binary_expression "(char *)comment_info->extent <= pcVar2 + (1 - (int)__s)" (cast_expression "(char *)comment_info->extent" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (field_expression "comment_info->extent" identifier -> field_identifier)) <= (binary_expression "pcVar2 + (1 - (int)__s)" identifier + (parenthesized_expression "(1 - (int)__s)" ( (binary_expression "1 - (int)__s" number_literal - (cast_expression "(int)__s" ( (type_descriptor "int" primitive_type) ) identifier)) )))) )) (compound_statement "{\n      count = (int)comment_info->extent * 2;\n      comment_info->extent = count;\n      pcVar2 = (char *)ResizeQuantumMemory(__s,count,1);\n      comment_info->comment = pcVar2;\n      if (pcVar2 == (char *)0x0) {\n        return -1;\n      }\n      sVar1 = strlen(pcVar2);\n      pcVar2 = pcVar2 + sVar1;\n    }" { (expression_statement "count = (int)comment_info->extent * 2;" (assignment_expression "count = (int)comment_info->extent * 2" identifier = (binary_expression "(int)comment_info->extent * 2" (cast_expression "(int)comment_info->extent" ( (type_descriptor "int" primitive_type) ) (field_expression "comment_info->extent" identifier -> field_identifier)) * number_literal)) ;) (expression_statement "comment_info->extent = count;" (assignment_expression "comment_info->extent = count" (field_expression "comment_info->extent" identifier -> field_identifier) = identifier) ;) (expression_statement "pcVar2 = (char *)ResizeQuantumMemory(__s,count,1);" (assignment_expression "pcVar2 = (char *)ResizeQuantumMemory(__s,count,1)" identifier = (cast_expression "(char *)ResizeQuantumMemory(__s,count,1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "ResizeQuantumMemory(__s,count,1)" identifier (argument_list "(__s,count,1)" ( identifier , identifier , number_literal ))))) ;) (expression_statement "comment_info->comment = pcVar2;" (assignment_expression "comment_info->comment = pcVar2" (field_expression "comment_info->comment" identifier -> field_identifier) = identifier) ;) (if_statement "if (pcVar2 == (char *)0x0) {\n        return -1;\n      }" if (parenthesized_expression "(pcVar2 == (char *)0x0)" ( (binary_expression "pcVar2 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        return -1;\n      }" { (return_statement "return -1;" return number_literal ;) })) (expression_statement "sVar1 = strlen(pcVar2);" (assignment_expression "sVar1 = strlen(pcVar2)" identifier = (call_expression "strlen(pcVar2)" identifier (argument_list "(pcVar2)" ( identifier )))) ;) (expression_statement "pcVar2 = pcVar2 + sVar1;" (assignment_expression "pcVar2 = pcVar2 + sVar1" identifier = (binary_expression "pcVar2 + sVar1" identifier + identifier)) ;) })) (expression_statement "iVar3 = ReadBlobByte(image);" (assignment_expression "iVar3 = ReadBlobByte(image)" identifier = (call_expression "ReadBlobByte(image)" identifier (argument_list "(image)" ( identifier )))) ;) (if_statement "if (iVar3 == -1) {\n      return -1;\n    }" if (parenthesized_expression "(iVar3 == -1)" ( (binary_expression "iVar3 == -1" identifier == number_literal) )) (compound_statement "{\n      return -1;\n    }" { (return_statement "return -1;" return number_literal ;) })) (expression_statement "*pcVar2 = (char)iVar3;" (assignment_expression "*pcVar2 = (char)iVar3" (pointer_expression "*pcVar2" * identifier) = (cast_expression "(char)iVar3" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (expression_statement "pcVar2 = pcVar2 + 1;" (assignment_expression "pcVar2 = pcVar2 + 1" identifier = (binary_expression "pcVar2 + 1" identifier + number_literal)) ;) (expression_statement "*pcVar2 = '\0';" (assignment_expression "*pcVar2 = '\0'" (pointer_expression "*pcVar2" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (if_statement "if (iVar3 == 10) {\n      return 10;\n    }" if (parenthesized_expression "(iVar3 == 10)" ( (binary_expression "iVar3 == 10" identifier == number_literal) )) (compound_statement "{\n      return 10;\n    }" { (return_statement "return 10;" return number_literal ;) })) (if_statement "if (iVar3 == 0xd) break;" if (parenthesized_expression "(iVar3 == 0xd)" ( (binary_expression "iVar3 == 0xd" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "__s = comment_info->comment;" (assignment_expression "__s = comment_info->comment" identifier = (field_expression "comment_info->comment" identifier -> field_identifier)) ;) })) (return_statement "return 0xd;" return number_literal ;) })))
(translation_unit "undefined4 __regparm3 FUN_002438d0(undefined4 param_1,undefined4 *param_2)\n\n{\n  size_t sVar1;\n  char *pcVar2;\n  int iVar3;\n  char *__s;\n  \n  __s = (char *)*param_2;\n  sVar1 = strlen(__s);\n  pcVar2 = __s + sVar1;\n  while( true ) {\n    if ((char *)param_2[1] <= pcVar2 + (1 - (int)__s)) {\n      iVar3 = (int)param_2[1] * 2;\n      param_2[1] = iVar3;\n      pcVar2 = (char *)ResizeQuantumMemory(__s,iVar3,1);\n      *param_2 = pcVar2;\n      if (pcVar2 == (char *)0x0) {\n        return 0xffffffff;\n      }\n      sVar1 = strlen(pcVar2);\n      pcVar2 = pcVar2 + sVar1;\n    }\n    iVar3 = ReadBlobByte(param_1);\n    if (iVar3 == -1) {\n      return 0xffffffff;\n    }\n    *pcVar2 = (char)iVar3;\n    pcVar2 = pcVar2 + 1;\n    *pcVar2 = '\0';\n    if (iVar3 == 10) {\n      return 10;\n    }\n    if (iVar3 == 0xd) break;\n    __s = (char *)*param_2;\n  }\n  return 0xd;\n}\n\n" (function_definition "undefined4 __regparm3 FUN_002438d0(undefined4 param_1,undefined4 *param_2)\n\n{\n  size_t sVar1;\n  char *pcVar2;\n  int iVar3;\n  char *__s;\n  \n  __s = (char *)*param_2;\n  sVar1 = strlen(__s);\n  pcVar2 = __s + sVar1;\n  while( true ) {\n    if ((char *)param_2[1] <= pcVar2 + (1 - (int)__s)) {\n      iVar3 = (int)param_2[1] * 2;\n      param_2[1] = iVar3;\n      pcVar2 = (char *)ResizeQuantumMemory(__s,iVar3,1);\n      *param_2 = pcVar2;\n      if (pcVar2 == (char *)0x0) {\n        return 0xffffffff;\n      }\n      sVar1 = strlen(pcVar2);\n      pcVar2 = pcVar2 + sVar1;\n    }\n    iVar3 = ReadBlobByte(param_1);\n    if (iVar3 == -1) {\n      return 0xffffffff;\n    }\n    *pcVar2 = (char)iVar3;\n    pcVar2 = pcVar2 + 1;\n    *pcVar2 = '\0';\n    if (iVar3 == 10) {\n      return 10;\n    }\n    if (iVar3 == 0xd) break;\n    __s = (char *)*param_2;\n  }\n  return 0xd;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_002438d0(undefined4 param_1,undefined4 *param_2)" identifier (parameter_list "(undefined4 param_1,undefined4 *param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  size_t sVar1;\n  char *pcVar2;\n  int iVar3;\n  char *__s;\n  \n  __s = (char *)*param_2;\n  sVar1 = strlen(__s);\n  pcVar2 = __s + sVar1;\n  while( true ) {\n    if ((char *)param_2[1] <= pcVar2 + (1 - (int)__s)) {\n      iVar3 = (int)param_2[1] * 2;\n      param_2[1] = iVar3;\n      pcVar2 = (char *)ResizeQuantumMemory(__s,iVar3,1);\n      *param_2 = pcVar2;\n      if (pcVar2 == (char *)0x0) {\n        return 0xffffffff;\n      }\n      sVar1 = strlen(pcVar2);\n      pcVar2 = pcVar2 + sVar1;\n    }\n    iVar3 = ReadBlobByte(param_1);\n    if (iVar3 == -1) {\n      return 0xffffffff;\n    }\n    *pcVar2 = (char)iVar3;\n    pcVar2 = pcVar2 + 1;\n    *pcVar2 = '\0';\n    if (iVar3 == 10) {\n      return 10;\n    }\n    if (iVar3 == 0xd) break;\n    __s = (char *)*param_2;\n  }\n  return 0xd;\n}" { (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (expression_statement "__s = (char *)*param_2;" (assignment_expression "__s = (char *)*param_2" identifier = (cast_expression "(char *)*param_2" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier))) ;) (expression_statement "sVar1 = strlen(__s);" (assignment_expression "sVar1 = strlen(__s)" identifier = (call_expression "strlen(__s)" identifier (argument_list "(__s)" ( identifier )))) ;) (expression_statement "pcVar2 = __s + sVar1;" (assignment_expression "pcVar2 = __s + sVar1" identifier = (binary_expression "__s + sVar1" identifier + identifier)) ;) (while_statement "while( true ) {\n    if ((char *)param_2[1] <= pcVar2 + (1 - (int)__s)) {\n      iVar3 = (int)param_2[1] * 2;\n      param_2[1] = iVar3;\n      pcVar2 = (char *)ResizeQuantumMemory(__s,iVar3,1);\n      *param_2 = pcVar2;\n      if (pcVar2 == (char *)0x0) {\n        return 0xffffffff;\n      }\n      sVar1 = strlen(pcVar2);\n      pcVar2 = pcVar2 + sVar1;\n    }\n    iVar3 = ReadBlobByte(param_1);\n    if (iVar3 == -1) {\n      return 0xffffffff;\n    }\n    *pcVar2 = (char)iVar3;\n    pcVar2 = pcVar2 + 1;\n    *pcVar2 = '\0';\n    if (iVar3 == 10) {\n      return 10;\n    }\n    if (iVar3 == 0xd) break;\n    __s = (char *)*param_2;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    if ((char *)param_2[1] <= pcVar2 + (1 - (int)__s)) {\n      iVar3 = (int)param_2[1] * 2;\n      param_2[1] = iVar3;\n      pcVar2 = (char *)ResizeQuantumMemory(__s,iVar3,1);\n      *param_2 = pcVar2;\n      if (pcVar2 == (char *)0x0) {\n        return 0xffffffff;\n      }\n      sVar1 = strlen(pcVar2);\n      pcVar2 = pcVar2 + sVar1;\n    }\n    iVar3 = ReadBlobByte(param_1);\n    if (iVar3 == -1) {\n      return 0xffffffff;\n    }\n    *pcVar2 = (char)iVar3;\n    pcVar2 = pcVar2 + 1;\n    *pcVar2 = '\0';\n    if (iVar3 == 10) {\n      return 10;\n    }\n    if (iVar3 == 0xd) break;\n    __s = (char *)*param_2;\n  }" { (if_statement "if ((char *)param_2[1] <= pcVar2 + (1 - (int)__s)) {\n      iVar3 = (int)param_2[1] * 2;\n      param_2[1] = iVar3;\n      pcVar2 = (char *)ResizeQuantumMemory(__s,iVar3,1);\n      *param_2 = pcVar2;\n      if (pcVar2 == (char *)0x0) {\n        return 0xffffffff;\n      }\n      sVar1 = strlen(pcVar2);\n      pcVar2 = pcVar2 + sVar1;\n    }" if (parenthesized_expression "((char *)param_2[1] <= pcVar2 + (1 - (int)__s))" ( (binary_expression "(char *)param_2[1] <= pcVar2 + (1 - (int)__s)" (cast_expression "(char *)param_2[1]" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_2[1]" identifier [ number_literal ])) <= (binary_expression "pcVar2 + (1 - (int)__s)" identifier + (parenthesized_expression "(1 - (int)__s)" ( (binary_expression "1 - (int)__s" number_literal - (cast_expression "(int)__s" ( (type_descriptor "int" primitive_type) ) identifier)) )))) )) (compound_statement "{\n      iVar3 = (int)param_2[1] * 2;\n      param_2[1] = iVar3;\n      pcVar2 = (char *)ResizeQuantumMemory(__s,iVar3,1);\n      *param_2 = pcVar2;\n      if (pcVar2 == (char *)0x0) {\n        return 0xffffffff;\n      }\n      sVar1 = strlen(pcVar2);\n      pcVar2 = pcVar2 + sVar1;\n    }" { (expression_statement "iVar3 = (int)param_2[1] * 2;" (assignment_expression "iVar3 = (int)param_2[1] * 2" identifier = (binary_expression "(int)param_2[1] * 2" (cast_expression "(int)param_2[1]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "param_2[1]" identifier [ number_literal ])) * number_literal)) ;) (expression_statement "param_2[1] = iVar3;" (assignment_expression "param_2[1] = iVar3" (subscript_expression "param_2[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "pcVar2 = (char *)ResizeQuantumMemory(__s,iVar3,1);" (assignment_expression "pcVar2 = (char *)ResizeQuantumMemory(__s,iVar3,1)" identifier = (cast_expression "(char *)ResizeQuantumMemory(__s,iVar3,1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "ResizeQuantumMemory(__s,iVar3,1)" identifier (argument_list "(__s,iVar3,1)" ( identifier , identifier , number_literal ))))) ;) (expression_statement "*param_2 = pcVar2;" (assignment_expression "*param_2 = pcVar2" (pointer_expression "*param_2" * identifier) = identifier) ;) (if_statement "if (pcVar2 == (char *)0x0) {\n        return 0xffffffff;\n      }" if (parenthesized_expression "(pcVar2 == (char *)0x0)" ( (binary_expression "pcVar2 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        return 0xffffffff;\n      }" { (return_statement "return 0xffffffff;" return number_literal ;) })) (expression_statement "sVar1 = strlen(pcVar2);" (assignment_expression "sVar1 = strlen(pcVar2)" identifier = (call_expression "strlen(pcVar2)" identifier (argument_list "(pcVar2)" ( identifier )))) ;) (expression_statement "pcVar2 = pcVar2 + sVar1;" (assignment_expression "pcVar2 = pcVar2 + sVar1" identifier = (binary_expression "pcVar2 + sVar1" identifier + identifier)) ;) })) (expression_statement "iVar3 = ReadBlobByte(param_1);" (assignment_expression "iVar3 = ReadBlobByte(param_1)" identifier = (call_expression "ReadBlobByte(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (iVar3 == -1) {\n      return 0xffffffff;\n    }" if (parenthesized_expression "(iVar3 == -1)" ( (binary_expression "iVar3 == -1" identifier == number_literal) )) (compound_statement "{\n      return 0xffffffff;\n    }" { (return_statement "return 0xffffffff;" return number_literal ;) })) (expression_statement "*pcVar2 = (char)iVar3;" (assignment_expression "*pcVar2 = (char)iVar3" (pointer_expression "*pcVar2" * identifier) = (cast_expression "(char)iVar3" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (expression_statement "pcVar2 = pcVar2 + 1;" (assignment_expression "pcVar2 = pcVar2 + 1" identifier = (binary_expression "pcVar2 + 1" identifier + number_literal)) ;) (expression_statement "*pcVar2 = '\0';" (assignment_expression "*pcVar2 = '\0'" (pointer_expression "*pcVar2" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (if_statement "if (iVar3 == 10) {\n      return 10;\n    }" if (parenthesized_expression "(iVar3 == 10)" ( (binary_expression "iVar3 == 10" identifier == number_literal) )) (compound_statement "{\n      return 10;\n    }" { (return_statement "return 10;" return number_literal ;) })) (if_statement "if (iVar3 == 0xd) break;" if (parenthesized_expression "(iVar3 == 0xd)" ( (binary_expression "iVar3 == 0xd" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "__s = (char *)*param_2;" (assignment_expression "__s = (char *)*param_2" identifier = (cast_expression "(char *)*param_2" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier))) ;) })) (return_statement "return 0xd;" return number_literal ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ])) <= (binary_expression IDENT + (parenthesized_expression ( (binary_expression LIT - (cast_expression ( (type_descriptor TYPE) ) IDENT)) )))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])) * LIT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , IDENT , LIT ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (char_literal ' escape_sequence ')) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) })) (return_statement return LIT ;) })))
(function_definition "undefined4 __regparm3 FUN_002438d0(undefined4 param_1,undefined4 *param_2)\n\n{\n  size_t sVar1;\n  char *pcVar2;\n  int iVar3;\n  char *__s;\n  \n  __s = (char *)*param_2;\n  sVar1 = strlen(__s);\n  pcVar2 = __s + sVar1;\n  while( true ) {\n    if ((char *)param_2[1] <= pcVar2 + (1 - (int)__s)) {\n      iVar3 = (int)param_2[1] * 2;\n      param_2[1] = iVar3;\n      pcVar2 = (char *)ResizeQuantumMemory(__s,iVar3,1);\n      *param_2 = pcVar2;\n      if (pcVar2 == (char *)0x0) {\n        return 0xffffffff;\n      }\n      sVar1 = strlen(pcVar2);\n      pcVar2 = pcVar2 + sVar1;\n    }\n    iVar3 = ReadBlobByte(param_1);\n    if (iVar3 == -1) {\n      return 0xffffffff;\n    }\n    *pcVar2 = (char)iVar3;\n    pcVar2 = pcVar2 + 1;\n    *pcVar2 = '\0';\n    if (iVar3 == 10) {\n      return 10;\n    }\n    if (iVar3 == 0xd) break;\n    __s = (char *)*param_2;\n  }\n  return 0xd;\n}" (type_identifier "undefined4") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_002438d0(undefined4 param_1,undefined4 *param_2)" (identifier "FUN_002438d0") (parameter_list "(undefined4 param_1,undefined4 *param_2)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 *param_2" (type_identifier "undefined4") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  size_t sVar1;\n  char *pcVar2;\n  int iVar3;\n  char *__s;\n  \n  __s = (char *)*param_2;\n  sVar1 = strlen(__s);\n  pcVar2 = __s + sVar1;\n  while( true ) {\n    if ((char *)param_2[1] <= pcVar2 + (1 - (int)__s)) {\n      iVar3 = (int)param_2[1] * 2;\n      param_2[1] = iVar3;\n      pcVar2 = (char *)ResizeQuantumMemory(__s,iVar3,1);\n      *param_2 = pcVar2;\n      if (pcVar2 == (char *)0x0) {\n        return 0xffffffff;\n      }\n      sVar1 = strlen(pcVar2);\n      pcVar2 = pcVar2 + sVar1;\n    }\n    iVar3 = ReadBlobByte(param_1);\n    if (iVar3 == -1) {\n      return 0xffffffff;\n    }\n    *pcVar2 = (char)iVar3;\n    pcVar2 = pcVar2 + 1;\n    *pcVar2 = '\0';\n    if (iVar3 == 10) {\n      return 10;\n    }\n    if (iVar3 == 0xd) break;\n    __s = (char *)*param_2;\n  }\n  return 0xd;\n}" ({ "{") (declaration "size_t sVar1;" (primitive_type "size_t") (identifier "sVar1") (; ";")) (declaration "char *pcVar2;" (primitive_type "char") (pointer_declarator "*pcVar2" (* "*") (identifier "pcVar2")) (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "char *__s;" (primitive_type "char") (pointer_declarator "*__s" (* "*") (identifier "__s")) (; ";")) (expression_statement "__s = (char *)*param_2;" (assignment_expression "__s = (char *)*param_2" (identifier "__s") (= "=") (cast_expression "(char *)*param_2" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_2" (* "*") (identifier "param_2")))) (; ";")) (expression_statement "sVar1 = strlen(__s);" (assignment_expression "sVar1 = strlen(__s)" (identifier "sVar1") (= "=") (call_expression "strlen(__s)" (identifier "strlen") (argument_list "(__s)" (( "(") (identifier "__s") () ")")))) (; ";")) (expression_statement "pcVar2 = __s + sVar1;" (assignment_expression "pcVar2 = __s + sVar1" (identifier "pcVar2") (= "=") (binary_expression "__s + sVar1" (identifier "__s") (+ "+") (identifier "sVar1"))) (; ";")) (while_statement "while( true ) {\n    if ((char *)param_2[1] <= pcVar2 + (1 - (int)__s)) {\n      iVar3 = (int)param_2[1] * 2;\n      param_2[1] = iVar3;\n      pcVar2 = (char *)ResizeQuantumMemory(__s,iVar3,1);\n      *param_2 = pcVar2;\n      if (pcVar2 == (char *)0x0) {\n        return 0xffffffff;\n      }\n      sVar1 = strlen(pcVar2);\n      pcVar2 = pcVar2 + sVar1;\n    }\n    iVar3 = ReadBlobByte(param_1);\n    if (iVar3 == -1) {\n      return 0xffffffff;\n    }\n    *pcVar2 = (char)iVar3;\n    pcVar2 = pcVar2 + 1;\n    *pcVar2 = '\0';\n    if (iVar3 == 10) {\n      return 10;\n    }\n    if (iVar3 == 0xd) break;\n    __s = (char *)*param_2;\n  }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n    if ((char *)param_2[1] <= pcVar2 + (1 - (int)__s)) {\n      iVar3 = (int)param_2[1] * 2;\n      param_2[1] = iVar3;\n      pcVar2 = (char *)ResizeQuantumMemory(__s,iVar3,1);\n      *param_2 = pcVar2;\n      if (pcVar2 == (char *)0x0) {\n        return 0xffffffff;\n      }\n      sVar1 = strlen(pcVar2);\n      pcVar2 = pcVar2 + sVar1;\n    }\n    iVar3 = ReadBlobByte(param_1);\n    if (iVar3 == -1) {\n      return 0xffffffff;\n    }\n    *pcVar2 = (char)iVar3;\n    pcVar2 = pcVar2 + 1;\n    *pcVar2 = '\0';\n    if (iVar3 == 10) {\n      return 10;\n    }\n    if (iVar3 == 0xd) break;\n    __s = (char *)*param_2;\n  }" ({ "{") (if_statement "if ((char *)param_2[1] <= pcVar2 + (1 - (int)__s)) {\n      iVar3 = (int)param_2[1] * 2;\n      param_2[1] = iVar3;\n      pcVar2 = (char *)ResizeQuantumMemory(__s,iVar3,1);\n      *param_2 = pcVar2;\n      if (pcVar2 == (char *)0x0) {\n        return 0xffffffff;\n      }\n      sVar1 = strlen(pcVar2);\n      pcVar2 = pcVar2 + sVar1;\n    }" (if "if") (parenthesized_expression "((char *)param_2[1] <= pcVar2 + (1 - (int)__s))" (( "(") (binary_expression "(char *)param_2[1] <= pcVar2 + (1 - (int)__s)" (cast_expression "(char *)param_2[1]" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]"))) (<= "<=") (binary_expression "pcVar2 + (1 - (int)__s)" (identifier "pcVar2") (+ "+") (parenthesized_expression "(1 - (int)__s)" (( "(") (binary_expression "1 - (int)__s" (number_literal "1") (- "-") (cast_expression "(int)__s" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "__s"))) () ")")))) () ")")) (compound_statement "{\n      iVar3 = (int)param_2[1] * 2;\n      param_2[1] = iVar3;\n      pcVar2 = (char *)ResizeQuantumMemory(__s,iVar3,1);\n      *param_2 = pcVar2;\n      if (pcVar2 == (char *)0x0) {\n        return 0xffffffff;\n      }\n      sVar1 = strlen(pcVar2);\n      pcVar2 = pcVar2 + sVar1;\n    }" ({ "{") (expression_statement "iVar3 = (int)param_2[1] * 2;" (assignment_expression "iVar3 = (int)param_2[1] * 2" (identifier "iVar3") (= "=") (binary_expression "(int)param_2[1] * 2" (cast_expression "(int)param_2[1]" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]"))) (* "*") (number_literal "2"))) (; ";")) (expression_statement "param_2[1] = iVar3;" (assignment_expression "param_2[1] = iVar3" (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "iVar3")) (; ";")) (expression_statement "pcVar2 = (char *)ResizeQuantumMemory(__s,iVar3,1);" (assignment_expression "pcVar2 = (char *)ResizeQuantumMemory(__s,iVar3,1)" (identifier "pcVar2") (= "=") (cast_expression "(char *)ResizeQuantumMemory(__s,iVar3,1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "ResizeQuantumMemory(__s,iVar3,1)" (identifier "ResizeQuantumMemory") (argument_list "(__s,iVar3,1)" (( "(") (identifier "__s") (, ",") (identifier "iVar3") (, ",") (number_literal "1") () ")"))))) (; ";")) (expression_statement "*param_2 = pcVar2;" (assignment_expression "*param_2 = pcVar2" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (identifier "pcVar2")) (; ";")) (if_statement "if (pcVar2 == (char *)0x0) {\n        return 0xffffffff;\n      }" (if "if") (parenthesized_expression "(pcVar2 == (char *)0x0)" (( "(") (binary_expression "pcVar2 == (char *)0x0" (identifier "pcVar2") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        return 0xffffffff;\n      }" ({ "{") (return_statement "return 0xffffffff;" (return "return") (number_literal "0xffffffff") (; ";")) (} "}"))) (expression_statement "sVar1 = strlen(pcVar2);" (assignment_expression "sVar1 = strlen(pcVar2)" (identifier "sVar1") (= "=") (call_expression "strlen(pcVar2)" (identifier "strlen") (argument_list "(pcVar2)" (( "(") (identifier "pcVar2") () ")")))) (; ";")) (expression_statement "pcVar2 = pcVar2 + sVar1;" (assignment_expression "pcVar2 = pcVar2 + sVar1" (identifier "pcVar2") (= "=") (binary_expression "pcVar2 + sVar1" (identifier "pcVar2") (+ "+") (identifier "sVar1"))) (; ";")) (} "}"))) (expression_statement "iVar3 = ReadBlobByte(param_1);" (assignment_expression "iVar3 = ReadBlobByte(param_1)" (identifier "iVar3") (= "=") (call_expression "ReadBlobByte(param_1)" (identifier "ReadBlobByte") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (if_statement "if (iVar3 == -1) {\n      return 0xffffffff;\n    }" (if "if") (parenthesized_expression "(iVar3 == -1)" (( "(") (binary_expression "iVar3 == -1" (identifier "iVar3") (== "==") (number_literal "-1")) () ")")) (compound_statement "{\n      return 0xffffffff;\n    }" ({ "{") (return_statement "return 0xffffffff;" (return "return") (number_literal "0xffffffff") (; ";")) (} "}"))) (expression_statement "*pcVar2 = (char)iVar3;" (assignment_expression "*pcVar2 = (char)iVar3" (pointer_expression "*pcVar2" (* "*") (identifier "pcVar2")) (= "=") (cast_expression "(char)iVar3" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "iVar3"))) (; ";")) (expression_statement "pcVar2 = pcVar2 + 1;" (assignment_expression "pcVar2 = pcVar2 + 1" (identifier "pcVar2") (= "=") (binary_expression "pcVar2 + 1" (identifier "pcVar2") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "*pcVar2 = '\0';" (assignment_expression "*pcVar2 = '\0'" (pointer_expression "*pcVar2" (* "*") (identifier "pcVar2")) (= "=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) (; ";")) (if_statement "if (iVar3 == 10) {\n      return 10;\n    }" (if "if") (parenthesized_expression "(iVar3 == 10)" (( "(") (binary_expression "iVar3 == 10" (identifier "iVar3") (== "==") (number_literal "10")) () ")")) (compound_statement "{\n      return 10;\n    }" ({ "{") (return_statement "return 10;" (return "return") (number_literal "10") (; ";")) (} "}"))) (if_statement "if (iVar3 == 0xd) break;" (if "if") (parenthesized_expression "(iVar3 == 0xd)" (( "(") (binary_expression "iVar3 == 0xd" (identifier "iVar3") (== "==") (number_literal "0xd")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "__s = (char *)*param_2;" (assignment_expression "__s = (char *)*param_2" (identifier "__s") (= "=") (cast_expression "(char *)*param_2" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_2" (* "*") (identifier "param_2")))) (; ";")) (} "}"))) (return_statement "return 0xd;" (return "return") (number_literal "0xd") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Enum "GravityType": Some values do not have unique names */
/* WARNING: Enum "DisposeType": Some values do not have unique names */
/* WARNING: Enum "ChannelType": Some values do not have unique names */
/* WARNING: Enum "PixelChannel": Some values do not have unique names */
/* WARNING: Enum "ExceptionType": Some values do not have unique names */

int __regparm3 function_1(type_1 *image,type_2 *comment_info,type_3 *exception)

{
  size_t count;
  size_t var_3;
  char *var_4;
  int var_7;
  char *var_2;
  
  var_2 = comment_info->comment;
  var_3 = var_1(var_2);
  var_4 = var_2 + var_3;
  while( true ) {
    if ((char *)comment_info->extent <= var_4 + (1 - (int)var_2)) {
      count = (int)comment_info->extent * 2;
      comment_info->extent = count;
      var_4 = (char *)var_5(var_2,count,1);
      comment_info->comment = var_4;
      if (var_4 == (char *)0x0) {
        return -1;
      }
      var_3 = var_1(var_4);
      var_4 = var_4 + var_3;
    }
    var_7 = var_6(image);
    if (var_7 == -1) {
      return -1;
    }
    *var_4 = (char)var_7;
    var_4 = var_4 + 1;
    *var_4 = '\0';
    if (var_7 == 10) {
      return 10;
    }
    if (var_7 == 0xd) break;
    var_2 = comment_info->comment;
  }
  return 0xd;
}


(translation_unit (function_definition type: (type_identifier) (ERROR (identifier)) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (while_statement condition: (parenthesized_expression (true)) body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal))) right: (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (number_literal) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (subscript_expression argument: (identifier) index: (number_literal))) right: (number_literal)))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (number_literal)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (return_statement (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (number_literal)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (char_literal (escape_sequence)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (break_statement)) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))))) (return_statement (number_literal)))))

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

undefined4 __regparm3 MASKED(undefined4 param_1,undefined4 *param_2)

{
  size_t sVar1;
  char *pcVar2;
  int iVar3;
  char *__s;
  
  __s = (char *)*param_2;
  sVar1 = strlen(__s);
  pcVar2 = __s + sVar1;
  while( true ) {
    if ((char *)param_2[1] <= pcVar2 + (1 - (int)__s)) {
      iVar3 = (int)param_2[1] * 2;
      param_2[1] = iVar3;
      pcVar2 = (char *)ResizeQuantumMemory(__s,iVar3,1);
      *param_2 = pcVar2;
      if (pcVar2 == (char *)0x0) {
        return 0xffffffff;
      }
      sVar1 = strlen(pcVar2);
      pcVar2 = pcVar2 + sVar1;
    }
    iVar3 = ReadBlobByte(param_1);
    if (iVar3 == -1) {
      return 0xffffffff;
    }
    *pcVar2 = (char)iVar3;
    pcVar2 = pcVar2 + 1;
    *pcVar2 = '\0';
    if (iVar3 == 10) {
      return 10;
    }
    if (iVar3 == 0xd) break;
    __s = (char *)*param_2;
  }
  return 0xd;
}

