
/* 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 */

void WBMPWriteInteger(Image *image,size_t value)

{
  int iVar1;
  byte bVar2;
  uint uVar3;
  uint uVar4;
  int iVar5;
  uint uVar6;
  size_t length;
  int in_GS_OFFSET;
  undefined8 uVar7;
  uchar buffer [5];
  int local_20 [4];
  
  uVar7 = __x86_get_pc_thunk_di();
  uVar6 = 0;
  iVar5 = 4;
  local_20[0] = *(int *)(in_GS_OFFSET + 0x14);
  length = 1;
  do {
    uVar3 = (uint)((ulonglong)uVar7 >> 0x20) >> ((char)iVar5 * '\a' & 0x1fU) & 0x7f;
    if ((uVar6 == 0) && (uVar3 != 0)) {
      length = iVar5 + 1;
      uVar4 = (uint)(iVar5 != 0);
      uVar6 = 1;
    }
    else {
      bVar2 = (byte)uVar3;
      if (iVar5 == 0) break;
      uVar4 = uVar3 != 0 | uVar6;
    }
    iVar1 = 4 - iVar5;
    iVar5 = iVar5 + -1;
    buffer[iVar1] = (byte)(uVar4 << 7) | (byte)uVar3;
    bVar2 = buffer[4];
  } while (iVar5 != -1);
  buffer[4] = bVar2;
  WriteBlob((Image *)uVar7,length,(void *)((int)local_20 - length));
  if (local_20[0] != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail_local();
  }
  return;
}



void FUN_0028d0f0(void)

{
  int iVar1;
  byte bVar2;
  uint uVar3;
  uint uVar4;
  int iVar5;
  uint uVar6;
  int iVar7;
  int in_GS_OFFSET;
  undefined8 uVar8;
  byte local_21;
  int local_20;
  
  uVar8 = FUN_0004c803();
  uVar6 = 0;
  iVar5 = 4;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  iVar7 = 1;
  do {
    uVar3 = (uint)((ulonglong)uVar8 >> 0x20) >> ((char)iVar5 * '\a' & 0x1fU) & 0x7f;
    if ((uVar6 == 0) && (uVar3 != 0)) {
      iVar7 = iVar5 + 1;
      uVar4 = (uint)(iVar5 != 0);
      uVar6 = 1;
    }
    else {
      bVar2 = (byte)uVar3;
      if (iVar5 == 0) break;
      uVar4 = uVar3 != 0 | uVar6;
    }
    iVar1 = -iVar5;
    iVar5 = iVar5 + -1;
    (&local_21)[iVar1] = (byte)(uVar4 << 7) | (byte)uVar3;
    bVar2 = local_21;
  } while (iVar5 != -1);
  local_21 = bVar2;
  WriteBlob((int)uVar8,iVar7,(int)&local_20 - iVar7);
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_0029eab0();
  }
  return;
}


PUSH EBP
PUSH EDI
CALL 0x0004c803
ADD EDI,0x14bf09
PUSH ESI
XOR ESI,ESI
PUSH EBX
MOV EBX,0x4
SUB ESP,0x2c
MOV dword ptr [ESP + 0xc],EAX
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x1c],EAX
XOR EAX,EAX
LEA EAX,[ESP + 0x1b]
MOV dword ptr [ESP + 0x4],EAX
MOV dword ptr [ESP + 0x8],EDI
MOV EDI,0x1
LEA ECX,[EBX*0x8 + 0x0]
MOV EAX,EDX
SUB ECX,EBX
SHR EAX,CL
AND EAX,0x7f
SETNZ CL
TEST ESI,ESI
JNZ 0x0028d1a0
TEST CL,CL
JZ 0x0028d1a0
LEA EDI,[EBX + 0x1]
XOR ECX,ECX
TEST EBX,EBX
SETNZ CL
MOV ESI,0x1
MOV EBP,dword ptr [ESP + 0x4]
SHL ECX,0x7
OR ECX,EAX
SUB EBP,EBX
SUB EBX,0x1
MOV byte ptr [EBP],CL
CMP EBX,-0x1
JNZ 0x0028d12a
MOV EAX,0x5
SUB ESP,0x4
SUB EAX,EDI
LEA EAX,[ESP + EAX*0x1 + 0x1b]
PUSH EAX
PUSH EDI
PUSH dword ptr [ESP + 0x18]
MOV EBX,dword ptr [ESP + 0x18]
CALL 0x00030660
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0x1c]
XOR EAX,dword ptr GS:[0x14]
JNZ 0x0028d1b1
ADD ESP,0x2c
POP EBX
POP ESI
POP EDI
POP EBP
RET
TEST EBX,EBX
JZ 0x0028d1ab
OR ECX,ESI
MOVZX ECX,CL
JMP 0x0028d154
MOV byte ptr [ESP + 0x1b],AL
JMP 0x0028d16a
CALL 0x0029eab0
(translation_unit "void FUN_0028d0f0(void)\n\n{\n  int iVar1;\n  byte bVar2;\n  uint uVar3;\n  uint uVar4;\n  int iVar5;\n  uint uVar6;\n  int iVar7;\n  int in_GS_OFFSET;\n  undefined8 uVar8;\n  byte local_21;\n  int local_20;\n  \n  uVar8 = FUN_0004c803();\n  uVar6 = 0;\n  iVar5 = 4;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar7 = 1;\n  do {\n    uVar3 = (uint)((ulonglong)uVar8 >> 0x20) >> ((char)iVar5 * '\a' & 0x1fU) & 0x7f;\n    if ((uVar6 == 0) && (uVar3 != 0)) {\n      iVar7 = iVar5 + 1;\n      uVar4 = (uint)(iVar5 != 0);\n      uVar6 = 1;\n    }\n    else {\n      bVar2 = (byte)uVar3;\n      if (iVar5 == 0) break;\n      uVar4 = uVar3 != 0 | uVar6;\n    }\n    iVar1 = -iVar5;\n    iVar5 = iVar5 + -1;\n    (&local_21)[iVar1] = (byte)(uVar4 << 7) | (byte)uVar3;\n    bVar2 = local_21;\n  } while (iVar5 != -1);\n  local_21 = bVar2;\n  WriteBlob((int)uVar8,iVar7,(int)&local_20 - iVar7);\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0029eab0();\n  }\n  return;\n}\n\n" (function_definition "void FUN_0028d0f0(void)\n\n{\n  int iVar1;\n  byte bVar2;\n  uint uVar3;\n  uint uVar4;\n  int iVar5;\n  uint uVar6;\n  int iVar7;\n  int in_GS_OFFSET;\n  undefined8 uVar8;\n  byte local_21;\n  int local_20;\n  \n  uVar8 = FUN_0004c803();\n  uVar6 = 0;\n  iVar5 = 4;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar7 = 1;\n  do {\n    uVar3 = (uint)((ulonglong)uVar8 >> 0x20) >> ((char)iVar5 * '\a' & 0x1fU) & 0x7f;\n    if ((uVar6 == 0) && (uVar3 != 0)) {\n      iVar7 = iVar5 + 1;\n      uVar4 = (uint)(iVar5 != 0);\n      uVar6 = 1;\n    }\n    else {\n      bVar2 = (byte)uVar3;\n      if (iVar5 == 0) break;\n      uVar4 = uVar3 != 0 | uVar6;\n    }\n    iVar1 = -iVar5;\n    iVar5 = iVar5 + -1;\n    (&local_21)[iVar1] = (byte)(uVar4 << 7) | (byte)uVar3;\n    bVar2 = local_21;\n  } while (iVar5 != -1);\n  local_21 = bVar2;\n  WriteBlob((int)uVar8,iVar7,(int)&local_20 - iVar7);\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0029eab0();\n  }\n  return;\n}" primitive_type (function_declarator "FUN_0028d0f0(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int iVar1;\n  byte bVar2;\n  uint uVar3;\n  uint uVar4;\n  int iVar5;\n  uint uVar6;\n  int iVar7;\n  int in_GS_OFFSET;\n  undefined8 uVar8;\n  byte local_21;\n  int local_20;\n  \n  uVar8 = FUN_0004c803();\n  uVar6 = 0;\n  iVar5 = 4;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar7 = 1;\n  do {\n    uVar3 = (uint)((ulonglong)uVar8 >> 0x20) >> ((char)iVar5 * '\a' & 0x1fU) & 0x7f;\n    if ((uVar6 == 0) && (uVar3 != 0)) {\n      iVar7 = iVar5 + 1;\n      uVar4 = (uint)(iVar5 != 0);\n      uVar6 = 1;\n    }\n    else {\n      bVar2 = (byte)uVar3;\n      if (iVar5 == 0) break;\n      uVar4 = uVar3 != 0 | uVar6;\n    }\n    iVar1 = -iVar5;\n    iVar5 = iVar5 + -1;\n    (&local_21)[iVar1] = (byte)(uVar4 << 7) | (byte)uVar3;\n    bVar2 = local_21;\n  } while (iVar5 != -1);\n  local_21 = bVar2;\n  WriteBlob((int)uVar8,iVar7,(int)&local_20 - iVar7);\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0029eab0();\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "byte bVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined8 uVar8;" type_identifier identifier ;) (declaration "byte local_21;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (expression_statement "uVar8 = FUN_0004c803();" (assignment_expression "uVar8 = FUN_0004c803()" identifier = (call_expression "FUN_0004c803()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar6 = 0;" (assignment_expression "uVar6 = 0" identifier = number_literal) ;) (expression_statement "iVar5 = 4;" (assignment_expression "iVar5 = 4" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "iVar7 = 1;" (assignment_expression "iVar7 = 1" identifier = number_literal) ;) (do_statement "do {\n    uVar3 = (uint)((ulonglong)uVar8 >> 0x20) >> ((char)iVar5 * '\a' & 0x1fU) & 0x7f;\n    if ((uVar6 == 0) && (uVar3 != 0)) {\n      iVar7 = iVar5 + 1;\n      uVar4 = (uint)(iVar5 != 0);\n      uVar6 = 1;\n    }\n    else {\n      bVar2 = (byte)uVar3;\n      if (iVar5 == 0) break;\n      uVar4 = uVar3 != 0 | uVar6;\n    }\n    iVar1 = -iVar5;\n    iVar5 = iVar5 + -1;\n    (&local_21)[iVar1] = (byte)(uVar4 << 7) | (byte)uVar3;\n    bVar2 = local_21;\n  } while (iVar5 != -1);" do (compound_statement "{\n    uVar3 = (uint)((ulonglong)uVar8 >> 0x20) >> ((char)iVar5 * '\a' & 0x1fU) & 0x7f;\n    if ((uVar6 == 0) && (uVar3 != 0)) {\n      iVar7 = iVar5 + 1;\n      uVar4 = (uint)(iVar5 != 0);\n      uVar6 = 1;\n    }\n    else {\n      bVar2 = (byte)uVar3;\n      if (iVar5 == 0) break;\n      uVar4 = uVar3 != 0 | uVar6;\n    }\n    iVar1 = -iVar5;\n    iVar5 = iVar5 + -1;\n    (&local_21)[iVar1] = (byte)(uVar4 << 7) | (byte)uVar3;\n    bVar2 = local_21;\n  }" { (expression_statement "uVar3 = (uint)((ulonglong)uVar8 >> 0x20) >> ((char)iVar5 * '\a' & 0x1fU) & 0x7f;" (assignment_expression "uVar3 = (uint)((ulonglong)uVar8 >> 0x20) >> ((char)iVar5 * '\a' & 0x1fU) & 0x7f" identifier = (binary_expression "(uint)((ulonglong)uVar8 >> 0x20) >> ((char)iVar5 * '\a' & 0x1fU) & 0x7f" (binary_expression "(uint)((ulonglong)uVar8 >> 0x20) >> ((char)iVar5 * '\a' & 0x1fU)" (call_expression "(uint)((ulonglong)uVar8 >> 0x20)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((ulonglong)uVar8 >> 0x20)" ( (binary_expression "(ulonglong)uVar8 >> 0x20" (cast_expression "(ulonglong)uVar8" ( (type_descriptor "ulonglong" type_identifier) ) identifier) >> number_literal) ))) >> (parenthesized_expression "((char)iVar5 * '\a' & 0x1fU)" ( (binary_expression "(char)iVar5 * '\a' & 0x1fU" (binary_expression "(char)iVar5 * '\a'" (cast_expression "(char)iVar5" ( (type_descriptor "char" primitive_type) ) identifier) * (char_literal "'\a'" ' escape_sequence ')) & number_literal) ))) & number_literal)) ;) (if_statement "if ((uVar6 == 0) && (uVar3 != 0)) {\n      iVar7 = iVar5 + 1;\n      uVar4 = (uint)(iVar5 != 0);\n      uVar6 = 1;\n    }\n    else {\n      bVar2 = (byte)uVar3;\n      if (iVar5 == 0) break;\n      uVar4 = uVar3 != 0 | uVar6;\n    }" if (parenthesized_expression "((uVar6 == 0) && (uVar3 != 0))" ( (binary_expression "(uVar6 == 0) && (uVar3 != 0)" (parenthesized_expression "(uVar6 == 0)" ( (binary_expression "uVar6 == 0" identifier == number_literal) )) && (parenthesized_expression "(uVar3 != 0)" ( (binary_expression "uVar3 != 0" identifier != number_literal) ))) )) (compound_statement "{\n      iVar7 = iVar5 + 1;\n      uVar4 = (uint)(iVar5 != 0);\n      uVar6 = 1;\n    }" { (expression_statement "iVar7 = iVar5 + 1;" (assignment_expression "iVar7 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) (expression_statement "uVar4 = (uint)(iVar5 != 0);" (assignment_expression "uVar4 = (uint)(iVar5 != 0)" identifier = (call_expression "(uint)(iVar5 != 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar5 != 0)" ( (binary_expression "iVar5 != 0" identifier != number_literal) )))) ;) (expression_statement "uVar6 = 1;" (assignment_expression "uVar6 = 1" identifier = number_literal) ;) }) (else_clause "else {\n      bVar2 = (byte)uVar3;\n      if (iVar5 == 0) break;\n      uVar4 = uVar3 != 0 | uVar6;\n    }" else (compound_statement "{\n      bVar2 = (byte)uVar3;\n      if (iVar5 == 0) break;\n      uVar4 = uVar3 != 0 | uVar6;\n    }" { (expression_statement "bVar2 = (byte)uVar3;" (assignment_expression "bVar2 = (byte)uVar3" identifier = (cast_expression "(byte)uVar3" ( (type_descriptor "byte" type_identifier) ) identifier)) ;) (if_statement "if (iVar5 == 0) break;" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "uVar4 = uVar3 != 0 | uVar6;" (assignment_expression "uVar4 = uVar3 != 0 | uVar6" identifier = (binary_expression "uVar3 != 0 | uVar6" (binary_expression "uVar3 != 0" identifier != number_literal) | identifier)) ;) }))) (expression_statement "iVar1 = -iVar5;" (assignment_expression "iVar1 = -iVar5" identifier = (unary_expression "-iVar5" - identifier)) ;) (expression_statement "iVar5 = iVar5 + -1;" (assignment_expression "iVar5 = iVar5 + -1" identifier = (binary_expression "iVar5 + -1" identifier + number_literal)) ;) (expression_statement "(&local_21)[iVar1] = (byte)(uVar4 << 7) | (byte)uVar3;" (assignment_expression "(&local_21)[iVar1] = (byte)(uVar4 << 7) | (byte)uVar3" (subscript_expression "(&local_21)[iVar1]" (parenthesized_expression "(&local_21)" ( (pointer_expression "&local_21" & identifier) )) [ identifier ]) = (binary_expression "(byte)(uVar4 << 7) | (byte)uVar3" (call_expression "(byte)(uVar4 << 7)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(uVar4 << 7)" ( (binary_expression "uVar4 << 7" identifier << number_literal) ))) | (cast_expression "(byte)uVar3" ( (type_descriptor "byte" type_identifier) ) identifier))) ;) (expression_statement "bVar2 = local_21;" (assignment_expression "bVar2 = local_21" identifier = identifier) ;) }) while (parenthesized_expression "(iVar5 != -1)" ( (binary_expression "iVar5 != -1" identifier != number_literal) )) ;) (expression_statement "local_21 = bVar2;" (assignment_expression "local_21 = bVar2" identifier = identifier) ;) (expression_statement "WriteBlob((int)uVar8,iVar7,(int)&local_20 - iVar7);" (call_expression "WriteBlob((int)uVar8,iVar7,(int)&local_20 - iVar7)" identifier (argument_list "((int)uVar8,iVar7,(int)&local_20 - iVar7)" ( (cast_expression "(int)uVar8" ( (type_descriptor "int" primitive_type) ) identifier) , identifier , (binary_expression "(int)&local_20 - iVar7" (cast_expression "(int)&local_20" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&local_20" & identifier)) - identifier) ))) ;) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0029eab0();\n  }" if (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    FUN_0029eab0();\n  }" { comment (expression_statement "FUN_0029eab0();" (call_expression "FUN_0029eab0()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit "/* 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\nvoid WBMPWriteInteger(Image *image,size_t value)\n\n{\n  int iVar1;\n  byte bVar2;\n  uint uVar3;\n  uint uVar4;\n  int iVar5;\n  uint uVar6;\n  size_t length;\n  int in_GS_OFFSET;\n  undefined8 uVar7;\n  uchar buffer [5];\n  int local_20 [4];\n  \n  uVar7 = __x86_get_pc_thunk_di();\n  uVar6 = 0;\n  iVar5 = 4;\n  local_20[0] = *(int *)(in_GS_OFFSET + 0x14);\n  length = 1;\n  do {\n    uVar3 = (uint)((ulonglong)uVar7 >> 0x20) >> ((char)iVar5 * '\a' & 0x1fU) & 0x7f;\n    if ((uVar6 == 0) && (uVar3 != 0)) {\n      length = iVar5 + 1;\n      uVar4 = (uint)(iVar5 != 0);\n      uVar6 = 1;\n    }\n    else {\n      bVar2 = (byte)uVar3;\n      if (iVar5 == 0) break;\n      uVar4 = uVar3 != 0 | uVar6;\n    }\n    iVar1 = 4 - iVar5;\n    iVar5 = iVar5 + -1;\n    buffer[iVar1] = (byte)(uVar4 << 7) | (byte)uVar3;\n    bVar2 = buffer[4];\n  } while (iVar5 != -1);\n  buffer[4] = bVar2;\n  WriteBlob((Image *)uVar7,length,(void *)((int)local_20 - length));\n  if (local_20[0] != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return;\n}\n\n" comment comment comment comment (function_definition "void WBMPWriteInteger(Image *image,size_t value)\n\n{\n  int iVar1;\n  byte bVar2;\n  uint uVar3;\n  uint uVar4;\n  int iVar5;\n  uint uVar6;\n  size_t length;\n  int in_GS_OFFSET;\n  undefined8 uVar7;\n  uchar buffer [5];\n  int local_20 [4];\n  \n  uVar7 = __x86_get_pc_thunk_di();\n  uVar6 = 0;\n  iVar5 = 4;\n  local_20[0] = *(int *)(in_GS_OFFSET + 0x14);\n  length = 1;\n  do {\n    uVar3 = (uint)((ulonglong)uVar7 >> 0x20) >> ((char)iVar5 * '\a' & 0x1fU) & 0x7f;\n    if ((uVar6 == 0) && (uVar3 != 0)) {\n      length = iVar5 + 1;\n      uVar4 = (uint)(iVar5 != 0);\n      uVar6 = 1;\n    }\n    else {\n      bVar2 = (byte)uVar3;\n      if (iVar5 == 0) break;\n      uVar4 = uVar3 != 0 | uVar6;\n    }\n    iVar1 = 4 - iVar5;\n    iVar5 = iVar5 + -1;\n    buffer[iVar1] = (byte)(uVar4 << 7) | (byte)uVar3;\n    bVar2 = buffer[4];\n  } while (iVar5 != -1);\n  buffer[4] = bVar2;\n  WriteBlob((Image *)uVar7,length,(void *)((int)local_20 - length));\n  if (local_20[0] != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return;\n}" primitive_type (function_declarator "WBMPWriteInteger(Image *image,size_t value)" identifier (parameter_list "(Image *image,size_t value)" ( (parameter_declaration "Image *image" type_identifier (pointer_declarator "*image" * identifier)) , (parameter_declaration "size_t value" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  byte bVar2;\n  uint uVar3;\n  uint uVar4;\n  int iVar5;\n  uint uVar6;\n  size_t length;\n  int in_GS_OFFSET;\n  undefined8 uVar7;\n  uchar buffer [5];\n  int local_20 [4];\n  \n  uVar7 = __x86_get_pc_thunk_di();\n  uVar6 = 0;\n  iVar5 = 4;\n  local_20[0] = *(int *)(in_GS_OFFSET + 0x14);\n  length = 1;\n  do {\n    uVar3 = (uint)((ulonglong)uVar7 >> 0x20) >> ((char)iVar5 * '\a' & 0x1fU) & 0x7f;\n    if ((uVar6 == 0) && (uVar3 != 0)) {\n      length = iVar5 + 1;\n      uVar4 = (uint)(iVar5 != 0);\n      uVar6 = 1;\n    }\n    else {\n      bVar2 = (byte)uVar3;\n      if (iVar5 == 0) break;\n      uVar4 = uVar3 != 0 | uVar6;\n    }\n    iVar1 = 4 - iVar5;\n    iVar5 = iVar5 + -1;\n    buffer[iVar1] = (byte)(uVar4 << 7) | (byte)uVar3;\n    bVar2 = buffer[4];\n  } while (iVar5 != -1);\n  buffer[4] = bVar2;\n  WriteBlob((Image *)uVar7,length,(void *)((int)local_20 - length));\n  if (local_20[0] != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "byte bVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "size_t length;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined8 uVar7;" type_identifier identifier ;) (declaration "uchar buffer [5];" type_identifier (array_declarator "buffer [5]" identifier [ number_literal ]) ;) (declaration "int local_20 [4];" primitive_type (array_declarator "local_20 [4]" identifier [ number_literal ]) ;) (expression_statement "uVar7 = __x86_get_pc_thunk_di();" (assignment_expression "uVar7 = __x86_get_pc_thunk_di()" identifier = (call_expression "__x86_get_pc_thunk_di()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar6 = 0;" (assignment_expression "uVar6 = 0" identifier = number_literal) ;) (expression_statement "iVar5 = 4;" (assignment_expression "iVar5 = 4" identifier = number_literal) ;) (expression_statement "local_20[0] = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20[0] = *(int *)(in_GS_OFFSET + 0x14)" (subscript_expression "local_20[0]" identifier [ number_literal ]) = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "length = 1;" (assignment_expression "length = 1" identifier = number_literal) ;) (do_statement "do {\n    uVar3 = (uint)((ulonglong)uVar7 >> 0x20) >> ((char)iVar5 * '\a' & 0x1fU) & 0x7f;\n    if ((uVar6 == 0) && (uVar3 != 0)) {\n      length = iVar5 + 1;\n      uVar4 = (uint)(iVar5 != 0);\n      uVar6 = 1;\n    }\n    else {\n      bVar2 = (byte)uVar3;\n      if (iVar5 == 0) break;\n      uVar4 = uVar3 != 0 | uVar6;\n    }\n    iVar1 = 4 - iVar5;\n    iVar5 = iVar5 + -1;\n    buffer[iVar1] = (byte)(uVar4 << 7) | (byte)uVar3;\n    bVar2 = buffer[4];\n  } while (iVar5 != -1);" do (compound_statement "{\n    uVar3 = (uint)((ulonglong)uVar7 >> 0x20) >> ((char)iVar5 * '\a' & 0x1fU) & 0x7f;\n    if ((uVar6 == 0) && (uVar3 != 0)) {\n      length = iVar5 + 1;\n      uVar4 = (uint)(iVar5 != 0);\n      uVar6 = 1;\n    }\n    else {\n      bVar2 = (byte)uVar3;\n      if (iVar5 == 0) break;\n      uVar4 = uVar3 != 0 | uVar6;\n    }\n    iVar1 = 4 - iVar5;\n    iVar5 = iVar5 + -1;\n    buffer[iVar1] = (byte)(uVar4 << 7) | (byte)uVar3;\n    bVar2 = buffer[4];\n  }" { (expression_statement "uVar3 = (uint)((ulonglong)uVar7 >> 0x20) >> ((char)iVar5 * '\a' & 0x1fU) & 0x7f;" (assignment_expression "uVar3 = (uint)((ulonglong)uVar7 >> 0x20) >> ((char)iVar5 * '\a' & 0x1fU) & 0x7f" identifier = (binary_expression "(uint)((ulonglong)uVar7 >> 0x20) >> ((char)iVar5 * '\a' & 0x1fU) & 0x7f" (binary_expression "(uint)((ulonglong)uVar7 >> 0x20) >> ((char)iVar5 * '\a' & 0x1fU)" (call_expression "(uint)((ulonglong)uVar7 >> 0x20)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((ulonglong)uVar7 >> 0x20)" ( (binary_expression "(ulonglong)uVar7 >> 0x20" (cast_expression "(ulonglong)uVar7" ( (type_descriptor "ulonglong" type_identifier) ) identifier) >> number_literal) ))) >> (parenthesized_expression "((char)iVar5 * '\a' & 0x1fU)" ( (binary_expression "(char)iVar5 * '\a' & 0x1fU" (binary_expression "(char)iVar5 * '\a'" (cast_expression "(char)iVar5" ( (type_descriptor "char" primitive_type) ) identifier) * (char_literal "'\a'" ' escape_sequence ')) & number_literal) ))) & number_literal)) ;) (if_statement "if ((uVar6 == 0) && (uVar3 != 0)) {\n      length = iVar5 + 1;\n      uVar4 = (uint)(iVar5 != 0);\n      uVar6 = 1;\n    }\n    else {\n      bVar2 = (byte)uVar3;\n      if (iVar5 == 0) break;\n      uVar4 = uVar3 != 0 | uVar6;\n    }" if (parenthesized_expression "((uVar6 == 0) && (uVar3 != 0))" ( (binary_expression "(uVar6 == 0) && (uVar3 != 0)" (parenthesized_expression "(uVar6 == 0)" ( (binary_expression "uVar6 == 0" identifier == number_literal) )) && (parenthesized_expression "(uVar3 != 0)" ( (binary_expression "uVar3 != 0" identifier != number_literal) ))) )) (compound_statement "{\n      length = iVar5 + 1;\n      uVar4 = (uint)(iVar5 != 0);\n      uVar6 = 1;\n    }" { (expression_statement "length = iVar5 + 1;" (assignment_expression "length = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) (expression_statement "uVar4 = (uint)(iVar5 != 0);" (assignment_expression "uVar4 = (uint)(iVar5 != 0)" identifier = (call_expression "(uint)(iVar5 != 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar5 != 0)" ( (binary_expression "iVar5 != 0" identifier != number_literal) )))) ;) (expression_statement "uVar6 = 1;" (assignment_expression "uVar6 = 1" identifier = number_literal) ;) }) (else_clause "else {\n      bVar2 = (byte)uVar3;\n      if (iVar5 == 0) break;\n      uVar4 = uVar3 != 0 | uVar6;\n    }" else (compound_statement "{\n      bVar2 = (byte)uVar3;\n      if (iVar5 == 0) break;\n      uVar4 = uVar3 != 0 | uVar6;\n    }" { (expression_statement "bVar2 = (byte)uVar3;" (assignment_expression "bVar2 = (byte)uVar3" identifier = (cast_expression "(byte)uVar3" ( (type_descriptor "byte" type_identifier) ) identifier)) ;) (if_statement "if (iVar5 == 0) break;" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "uVar4 = uVar3 != 0 | uVar6;" (assignment_expression "uVar4 = uVar3 != 0 | uVar6" identifier = (binary_expression "uVar3 != 0 | uVar6" (binary_expression "uVar3 != 0" identifier != number_literal) | identifier)) ;) }))) (expression_statement "iVar1 = 4 - iVar5;" (assignment_expression "iVar1 = 4 - iVar5" identifier = (binary_expression "4 - iVar5" number_literal - identifier)) ;) (expression_statement "iVar5 = iVar5 + -1;" (assignment_expression "iVar5 = iVar5 + -1" identifier = (binary_expression "iVar5 + -1" identifier + number_literal)) ;) (expression_statement "buffer[iVar1] = (byte)(uVar4 << 7) | (byte)uVar3;" (assignment_expression "buffer[iVar1] = (byte)(uVar4 << 7) | (byte)uVar3" (subscript_expression "buffer[iVar1]" identifier [ identifier ]) = (binary_expression "(byte)(uVar4 << 7) | (byte)uVar3" (call_expression "(byte)(uVar4 << 7)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(uVar4 << 7)" ( (binary_expression "uVar4 << 7" identifier << number_literal) ))) | (cast_expression "(byte)uVar3" ( (type_descriptor "byte" type_identifier) ) identifier))) ;) (expression_statement "bVar2 = buffer[4];" (assignment_expression "bVar2 = buffer[4]" identifier = (subscript_expression "buffer[4]" identifier [ number_literal ])) ;) }) while (parenthesized_expression "(iVar5 != -1)" ( (binary_expression "iVar5 != -1" identifier != number_literal) )) ;) (expression_statement "buffer[4] = bVar2;" (assignment_expression "buffer[4] = bVar2" (subscript_expression "buffer[4]" identifier [ number_literal ]) = identifier) ;) (expression_statement "WriteBlob((Image *)uVar7,length,(void *)((int)local_20 - length));" (call_expression "WriteBlob((Image *)uVar7,length,(void *)((int)local_20 - length))" identifier (argument_list "((Image *)uVar7,length,(void *)((int)local_20 - length))" ( (cast_expression "(Image *)uVar7" ( (type_descriptor "Image *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , identifier , (cast_expression "(void *)((int)local_20 - length)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)local_20 - length)" ( (binary_expression "(int)local_20 - length" (cast_expression "(int)local_20" ( (type_descriptor "int" primitive_type) ) identifier) - identifier) ))) ))) ;) (if_statement "if (local_20[0] != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" if (parenthesized_expression "(local_20[0] != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20[0] != *(int *)(in_GS_OFFSET + 0x14)" (subscript_expression "local_20[0]" identifier [ number_literal ]) != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" { comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void FUN_0028d0f0(void)\n\n{\n  int iVar1;\n  byte bVar2;\n  uint uVar3;\n  uint uVar4;\n  int iVar5;\n  uint uVar6;\n  int iVar7;\n  int in_GS_OFFSET;\n  undefined8 uVar8;\n  byte local_21;\n  int local_20;\n  \n  uVar8 = FUN_0004c803();\n  uVar6 = 0;\n  iVar5 = 4;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar7 = 1;\n  do {\n    uVar3 = (uint)((ulonglong)uVar8 >> 0x20) >> ((char)iVar5 * '\a' & 0x1fU) & 0x7f;\n    if ((uVar6 == 0) && (uVar3 != 0)) {\n      iVar7 = iVar5 + 1;\n      uVar4 = (uint)(iVar5 != 0);\n      uVar6 = 1;\n    }\n    else {\n      bVar2 = (byte)uVar3;\n      if (iVar5 == 0) break;\n      uVar4 = uVar3 != 0 | uVar6;\n    }\n    iVar1 = -iVar5;\n    iVar5 = iVar5 + -1;\n    (&local_21)[iVar1] = (byte)(uVar4 << 7) | (byte)uVar3;\n    bVar2 = local_21;\n  } while (iVar5 != -1);\n  local_21 = bVar2;\n  WriteBlob((int)uVar8,iVar7,(int)&local_20 - iVar7);\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0029eab0();\n  }\n  return;\n}\n\n" (function_definition "void FUN_0028d0f0(void)\n\n{\n  int iVar1;\n  byte bVar2;\n  uint uVar3;\n  uint uVar4;\n  int iVar5;\n  uint uVar6;\n  int iVar7;\n  int in_GS_OFFSET;\n  undefined8 uVar8;\n  byte local_21;\n  int local_20;\n  \n  uVar8 = FUN_0004c803();\n  uVar6 = 0;\n  iVar5 = 4;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar7 = 1;\n  do {\n    uVar3 = (uint)((ulonglong)uVar8 >> 0x20) >> ((char)iVar5 * '\a' & 0x1fU) & 0x7f;\n    if ((uVar6 == 0) && (uVar3 != 0)) {\n      iVar7 = iVar5 + 1;\n      uVar4 = (uint)(iVar5 != 0);\n      uVar6 = 1;\n    }\n    else {\n      bVar2 = (byte)uVar3;\n      if (iVar5 == 0) break;\n      uVar4 = uVar3 != 0 | uVar6;\n    }\n    iVar1 = -iVar5;\n    iVar5 = iVar5 + -1;\n    (&local_21)[iVar1] = (byte)(uVar4 << 7) | (byte)uVar3;\n    bVar2 = local_21;\n  } while (iVar5 != -1);\n  local_21 = bVar2;\n  WriteBlob((int)uVar8,iVar7,(int)&local_20 - iVar7);\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0029eab0();\n  }\n  return;\n}" primitive_type (function_declarator "FUN_0028d0f0(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int iVar1;\n  byte bVar2;\n  uint uVar3;\n  uint uVar4;\n  int iVar5;\n  uint uVar6;\n  int iVar7;\n  int in_GS_OFFSET;\n  undefined8 uVar8;\n  byte local_21;\n  int local_20;\n  \n  uVar8 = FUN_0004c803();\n  uVar6 = 0;\n  iVar5 = 4;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar7 = 1;\n  do {\n    uVar3 = (uint)((ulonglong)uVar8 >> 0x20) >> ((char)iVar5 * '\a' & 0x1fU) & 0x7f;\n    if ((uVar6 == 0) && (uVar3 != 0)) {\n      iVar7 = iVar5 + 1;\n      uVar4 = (uint)(iVar5 != 0);\n      uVar6 = 1;\n    }\n    else {\n      bVar2 = (byte)uVar3;\n      if (iVar5 == 0) break;\n      uVar4 = uVar3 != 0 | uVar6;\n    }\n    iVar1 = -iVar5;\n    iVar5 = iVar5 + -1;\n    (&local_21)[iVar1] = (byte)(uVar4 << 7) | (byte)uVar3;\n    bVar2 = local_21;\n  } while (iVar5 != -1);\n  local_21 = bVar2;\n  WriteBlob((int)uVar8,iVar7,(int)&local_20 - iVar7);\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0029eab0();\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "byte bVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined8 uVar8;" type_identifier identifier ;) (declaration "byte local_21;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (expression_statement "uVar8 = FUN_0004c803();" (assignment_expression "uVar8 = FUN_0004c803()" identifier = (call_expression "FUN_0004c803()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar6 = 0;" (assignment_expression "uVar6 = 0" identifier = number_literal) ;) (expression_statement "iVar5 = 4;" (assignment_expression "iVar5 = 4" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "iVar7 = 1;" (assignment_expression "iVar7 = 1" identifier = number_literal) ;) (do_statement "do {\n    uVar3 = (uint)((ulonglong)uVar8 >> 0x20) >> ((char)iVar5 * '\a' & 0x1fU) & 0x7f;\n    if ((uVar6 == 0) && (uVar3 != 0)) {\n      iVar7 = iVar5 + 1;\n      uVar4 = (uint)(iVar5 != 0);\n      uVar6 = 1;\n    }\n    else {\n      bVar2 = (byte)uVar3;\n      if (iVar5 == 0) break;\n      uVar4 = uVar3 != 0 | uVar6;\n    }\n    iVar1 = -iVar5;\n    iVar5 = iVar5 + -1;\n    (&local_21)[iVar1] = (byte)(uVar4 << 7) | (byte)uVar3;\n    bVar2 = local_21;\n  } while (iVar5 != -1);" do (compound_statement "{\n    uVar3 = (uint)((ulonglong)uVar8 >> 0x20) >> ((char)iVar5 * '\a' & 0x1fU) & 0x7f;\n    if ((uVar6 == 0) && (uVar3 != 0)) {\n      iVar7 = iVar5 + 1;\n      uVar4 = (uint)(iVar5 != 0);\n      uVar6 = 1;\n    }\n    else {\n      bVar2 = (byte)uVar3;\n      if (iVar5 == 0) break;\n      uVar4 = uVar3 != 0 | uVar6;\n    }\n    iVar1 = -iVar5;\n    iVar5 = iVar5 + -1;\n    (&local_21)[iVar1] = (byte)(uVar4 << 7) | (byte)uVar3;\n    bVar2 = local_21;\n  }" { (expression_statement "uVar3 = (uint)((ulonglong)uVar8 >> 0x20) >> ((char)iVar5 * '\a' & 0x1fU) & 0x7f;" (assignment_expression "uVar3 = (uint)((ulonglong)uVar8 >> 0x20) >> ((char)iVar5 * '\a' & 0x1fU) & 0x7f" identifier = (binary_expression "(uint)((ulonglong)uVar8 >> 0x20) >> ((char)iVar5 * '\a' & 0x1fU) & 0x7f" (binary_expression "(uint)((ulonglong)uVar8 >> 0x20) >> ((char)iVar5 * '\a' & 0x1fU)" (call_expression "(uint)((ulonglong)uVar8 >> 0x20)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((ulonglong)uVar8 >> 0x20)" ( (binary_expression "(ulonglong)uVar8 >> 0x20" (cast_expression "(ulonglong)uVar8" ( (type_descriptor "ulonglong" type_identifier) ) identifier) >> number_literal) ))) >> (parenthesized_expression "((char)iVar5 * '\a' & 0x1fU)" ( (binary_expression "(char)iVar5 * '\a' & 0x1fU" (binary_expression "(char)iVar5 * '\a'" (cast_expression "(char)iVar5" ( (type_descriptor "char" primitive_type) ) identifier) * (char_literal "'\a'" ' escape_sequence ')) & number_literal) ))) & number_literal)) ;) (if_statement "if ((uVar6 == 0) && (uVar3 != 0)) {\n      iVar7 = iVar5 + 1;\n      uVar4 = (uint)(iVar5 != 0);\n      uVar6 = 1;\n    }\n    else {\n      bVar2 = (byte)uVar3;\n      if (iVar5 == 0) break;\n      uVar4 = uVar3 != 0 | uVar6;\n    }" if (parenthesized_expression "((uVar6 == 0) && (uVar3 != 0))" ( (binary_expression "(uVar6 == 0) && (uVar3 != 0)" (parenthesized_expression "(uVar6 == 0)" ( (binary_expression "uVar6 == 0" identifier == number_literal) )) && (parenthesized_expression "(uVar3 != 0)" ( (binary_expression "uVar3 != 0" identifier != number_literal) ))) )) (compound_statement "{\n      iVar7 = iVar5 + 1;\n      uVar4 = (uint)(iVar5 != 0);\n      uVar6 = 1;\n    }" { (expression_statement "iVar7 = iVar5 + 1;" (assignment_expression "iVar7 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) (expression_statement "uVar4 = (uint)(iVar5 != 0);" (assignment_expression "uVar4 = (uint)(iVar5 != 0)" identifier = (call_expression "(uint)(iVar5 != 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar5 != 0)" ( (binary_expression "iVar5 != 0" identifier != number_literal) )))) ;) (expression_statement "uVar6 = 1;" (assignment_expression "uVar6 = 1" identifier = number_literal) ;) }) (else_clause "else {\n      bVar2 = (byte)uVar3;\n      if (iVar5 == 0) break;\n      uVar4 = uVar3 != 0 | uVar6;\n    }" else (compound_statement "{\n      bVar2 = (byte)uVar3;\n      if (iVar5 == 0) break;\n      uVar4 = uVar3 != 0 | uVar6;\n    }" { (expression_statement "bVar2 = (byte)uVar3;" (assignment_expression "bVar2 = (byte)uVar3" identifier = (cast_expression "(byte)uVar3" ( (type_descriptor "byte" type_identifier) ) identifier)) ;) (if_statement "if (iVar5 == 0) break;" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "uVar4 = uVar3 != 0 | uVar6;" (assignment_expression "uVar4 = uVar3 != 0 | uVar6" identifier = (binary_expression "uVar3 != 0 | uVar6" (binary_expression "uVar3 != 0" identifier != number_literal) | identifier)) ;) }))) (expression_statement "iVar1 = -iVar5;" (assignment_expression "iVar1 = -iVar5" identifier = (unary_expression "-iVar5" - identifier)) ;) (expression_statement "iVar5 = iVar5 + -1;" (assignment_expression "iVar5 = iVar5 + -1" identifier = (binary_expression "iVar5 + -1" identifier + number_literal)) ;) (expression_statement "(&local_21)[iVar1] = (byte)(uVar4 << 7) | (byte)uVar3;" (assignment_expression "(&local_21)[iVar1] = (byte)(uVar4 << 7) | (byte)uVar3" (subscript_expression "(&local_21)[iVar1]" (parenthesized_expression "(&local_21)" ( (pointer_expression "&local_21" & identifier) )) [ identifier ]) = (binary_expression "(byte)(uVar4 << 7) | (byte)uVar3" (call_expression "(byte)(uVar4 << 7)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(uVar4 << 7)" ( (binary_expression "uVar4 << 7" identifier << number_literal) ))) | (cast_expression "(byte)uVar3" ( (type_descriptor "byte" type_identifier) ) identifier))) ;) (expression_statement "bVar2 = local_21;" (assignment_expression "bVar2 = local_21" identifier = identifier) ;) }) while (parenthesized_expression "(iVar5 != -1)" ( (binary_expression "iVar5 != -1" identifier != number_literal) )) ;) (expression_statement "local_21 = bVar2;" (assignment_expression "local_21 = bVar2" identifier = identifier) ;) (expression_statement "WriteBlob((int)uVar8,iVar7,(int)&local_20 - iVar7);" (call_expression "WriteBlob((int)uVar8,iVar7,(int)&local_20 - iVar7)" identifier (argument_list "((int)uVar8,iVar7,(int)&local_20 - iVar7)" ( (cast_expression "(int)uVar8" ( (type_descriptor "int" primitive_type) ) identifier) , identifier , (binary_expression "(int)&local_20 - iVar7" (cast_expression "(int)&local_20" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&local_20" & identifier)) - identifier) ))) ;) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0029eab0();\n  }" if (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    \n    FUN_0029eab0();\n  }" { (expression_statement "FUN_0029eab0();" (call_expression "FUN_0029eab0()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) ))) >> (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) * (char_literal ' escape_sequence ')) & LIT) ))) & LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) && (parenthesized_expression ( (binary_expression IDENT != LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT != LIT) )))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT != LIT) | IDENT)) ;) }))) (expression_statement (assignment_expression IDENT = (unary_expression - IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (subscript_expression (parenthesized_expression ( (pointer_expression & IDENT) )) [ IDENT ]) = (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT << LIT) ))) | (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE) ) IDENT) , IDENT , (binary_expression (cast_expression ( (type_descriptor TYPE) ) (pointer_expression & IDENT)) - IDENT) ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (return_statement return ;) })))
(function_definition "void FUN_0028d0f0(void)\n\n{\n  int iVar1;\n  byte bVar2;\n  uint uVar3;\n  uint uVar4;\n  int iVar5;\n  uint uVar6;\n  int iVar7;\n  int in_GS_OFFSET;\n  undefined8 uVar8;\n  byte local_21;\n  int local_20;\n  \n  uVar8 = FUN_0004c803();\n  uVar6 = 0;\n  iVar5 = 4;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar7 = 1;\n  do {\n    uVar3 = (uint)((ulonglong)uVar8 >> 0x20) >> ((char)iVar5 * '\a' & 0x1fU) & 0x7f;\n    if ((uVar6 == 0) && (uVar3 != 0)) {\n      iVar7 = iVar5 + 1;\n      uVar4 = (uint)(iVar5 != 0);\n      uVar6 = 1;\n    }\n    else {\n      bVar2 = (byte)uVar3;\n      if (iVar5 == 0) break;\n      uVar4 = uVar3 != 0 | uVar6;\n    }\n    iVar1 = -iVar5;\n    iVar5 = iVar5 + -1;\n    (&local_21)[iVar1] = (byte)(uVar4 << 7) | (byte)uVar3;\n    bVar2 = local_21;\n  } while (iVar5 != -1);\n  local_21 = bVar2;\n  WriteBlob((int)uVar8,iVar7,(int)&local_20 - iVar7);\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0029eab0();\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0028d0f0(void)" (identifier "FUN_0028d0f0") (parameter_list "(void)" (( "(") (parameter_declaration "void" (primitive_type "void")) () ")"))) (compound_statement "{\n  int iVar1;\n  byte bVar2;\n  uint uVar3;\n  uint uVar4;\n  int iVar5;\n  uint uVar6;\n  int iVar7;\n  int in_GS_OFFSET;\n  undefined8 uVar8;\n  byte local_21;\n  int local_20;\n  \n  uVar8 = FUN_0004c803();\n  uVar6 = 0;\n  iVar5 = 4;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar7 = 1;\n  do {\n    uVar3 = (uint)((ulonglong)uVar8 >> 0x20) >> ((char)iVar5 * '\a' & 0x1fU) & 0x7f;\n    if ((uVar6 == 0) && (uVar3 != 0)) {\n      iVar7 = iVar5 + 1;\n      uVar4 = (uint)(iVar5 != 0);\n      uVar6 = 1;\n    }\n    else {\n      bVar2 = (byte)uVar3;\n      if (iVar5 == 0) break;\n      uVar4 = uVar3 != 0 | uVar6;\n    }\n    iVar1 = -iVar5;\n    iVar5 = iVar5 + -1;\n    (&local_21)[iVar1] = (byte)(uVar4 << 7) | (byte)uVar3;\n    bVar2 = local_21;\n  } while (iVar5 != -1);\n  local_21 = bVar2;\n  WriteBlob((int)uVar8,iVar7,(int)&local_20 - iVar7);\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0029eab0();\n  }\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "byte bVar2;" (type_identifier "byte") (identifier "bVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "uint uVar4;" (type_identifier "uint") (identifier "uVar4") (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "uint uVar6;" (type_identifier "uint") (identifier "uVar6") (; ";")) (declaration "int iVar7;" (primitive_type "int") (identifier "iVar7") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "undefined8 uVar8;" (type_identifier "undefined8") (identifier "uVar8") (; ";")) (declaration "byte local_21;" (type_identifier "byte") (identifier "local_21") (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (expression_statement "uVar8 = FUN_0004c803();" (assignment_expression "uVar8 = FUN_0004c803()" (identifier "uVar8") (= "=") (call_expression "FUN_0004c803()" (identifier "FUN_0004c803") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "uVar6 = 0;" (assignment_expression "uVar6 = 0" (identifier "uVar6") (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar5 = 4;" (assignment_expression "iVar5 = 4" (identifier "iVar5") (= "=") (number_literal "4")) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "iVar7 = 1;" (assignment_expression "iVar7 = 1" (identifier "iVar7") (= "=") (number_literal "1")) (; ";")) (do_statement "do {\n    uVar3 = (uint)((ulonglong)uVar8 >> 0x20) >> ((char)iVar5 * '\a' & 0x1fU) & 0x7f;\n    if ((uVar6 == 0) && (uVar3 != 0)) {\n      iVar7 = iVar5 + 1;\n      uVar4 = (uint)(iVar5 != 0);\n      uVar6 = 1;\n    }\n    else {\n      bVar2 = (byte)uVar3;\n      if (iVar5 == 0) break;\n      uVar4 = uVar3 != 0 | uVar6;\n    }\n    iVar1 = -iVar5;\n    iVar5 = iVar5 + -1;\n    (&local_21)[iVar1] = (byte)(uVar4 << 7) | (byte)uVar3;\n    bVar2 = local_21;\n  } while (iVar5 != -1);" (do "do") (compound_statement "{\n    uVar3 = (uint)((ulonglong)uVar8 >> 0x20) >> ((char)iVar5 * '\a' & 0x1fU) & 0x7f;\n    if ((uVar6 == 0) && (uVar3 != 0)) {\n      iVar7 = iVar5 + 1;\n      uVar4 = (uint)(iVar5 != 0);\n      uVar6 = 1;\n    }\n    else {\n      bVar2 = (byte)uVar3;\n      if (iVar5 == 0) break;\n      uVar4 = uVar3 != 0 | uVar6;\n    }\n    iVar1 = -iVar5;\n    iVar5 = iVar5 + -1;\n    (&local_21)[iVar1] = (byte)(uVar4 << 7) | (byte)uVar3;\n    bVar2 = local_21;\n  }" ({ "{") (expression_statement "uVar3 = (uint)((ulonglong)uVar8 >> 0x20) >> ((char)iVar5 * '\a' & 0x1fU) & 0x7f;" (assignment_expression "uVar3 = (uint)((ulonglong)uVar8 >> 0x20) >> ((char)iVar5 * '\a' & 0x1fU) & 0x7f" (identifier "uVar3") (= "=") (binary_expression "(uint)((ulonglong)uVar8 >> 0x20) >> ((char)iVar5 * '\a' & 0x1fU) & 0x7f" (binary_expression "(uint)((ulonglong)uVar8 >> 0x20) >> ((char)iVar5 * '\a' & 0x1fU)" (call_expression "(uint)((ulonglong)uVar8 >> 0x20)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "((ulonglong)uVar8 >> 0x20)" (( "(") (binary_expression "(ulonglong)uVar8 >> 0x20" (cast_expression "(ulonglong)uVar8" (( "(") (type_descriptor "ulonglong" (type_identifier "ulonglong")) () ")") (identifier "uVar8")) (>> ">>") (number_literal "0x20")) () ")"))) (>> ">>") (parenthesized_expression "((char)iVar5 * '\a' & 0x1fU)" (( "(") (binary_expression "(char)iVar5 * '\a' & 0x1fU" (binary_expression "(char)iVar5 * '\a'" (cast_expression "(char)iVar5" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "iVar5")) (* "*") (char_literal "'\a'" (' "'") (escape_sequence "\a") (' "'"))) (& "&") (number_literal "0x1fU")) () ")"))) (& "&") (number_literal "0x7f"))) (; ";")) (if_statement "if ((uVar6 == 0) && (uVar3 != 0)) {\n      iVar7 = iVar5 + 1;\n      uVar4 = (uint)(iVar5 != 0);\n      uVar6 = 1;\n    }\n    else {\n      bVar2 = (byte)uVar3;\n      if (iVar5 == 0) break;\n      uVar4 = uVar3 != 0 | uVar6;\n    }" (if "if") (parenthesized_expression "((uVar6 == 0) && (uVar3 != 0))" (( "(") (binary_expression "(uVar6 == 0) && (uVar3 != 0)" (parenthesized_expression "(uVar6 == 0)" (( "(") (binary_expression "uVar6 == 0" (identifier "uVar6") (== "==") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(uVar3 != 0)" (( "(") (binary_expression "uVar3 != 0" (identifier "uVar3") (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n      iVar7 = iVar5 + 1;\n      uVar4 = (uint)(iVar5 != 0);\n      uVar6 = 1;\n    }" ({ "{") (expression_statement "iVar7 = iVar5 + 1;" (assignment_expression "iVar7 = iVar5 + 1" (identifier "iVar7") (= "=") (binary_expression "iVar5 + 1" (identifier "iVar5") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "uVar4 = (uint)(iVar5 != 0);" (assignment_expression "uVar4 = (uint)(iVar5 != 0)" (identifier "uVar4") (= "=") (call_expression "(uint)(iVar5 != 0)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(iVar5 != 0)" (( "(") (binary_expression "iVar5 != 0" (identifier "iVar5") (!= "!=") (number_literal "0")) () ")")))) (; ";")) (expression_statement "uVar6 = 1;" (assignment_expression "uVar6 = 1" (identifier "uVar6") (= "=") (number_literal "1")) (; ";")) (} "}")) (else_clause "else {\n      bVar2 = (byte)uVar3;\n      if (iVar5 == 0) break;\n      uVar4 = uVar3 != 0 | uVar6;\n    }" (else "else") (compound_statement "{\n      bVar2 = (byte)uVar3;\n      if (iVar5 == 0) break;\n      uVar4 = uVar3 != 0 | uVar6;\n    }" ({ "{") (expression_statement "bVar2 = (byte)uVar3;" (assignment_expression "bVar2 = (byte)uVar3" (identifier "bVar2") (= "=") (cast_expression "(byte)uVar3" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "uVar3"))) (; ";")) (if_statement "if (iVar5 == 0) break;" (if "if") (parenthesized_expression "(iVar5 == 0)" (( "(") (binary_expression "iVar5 == 0" (identifier "iVar5") (== "==") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "uVar4 = uVar3 != 0 | uVar6;" (assignment_expression "uVar4 = uVar3 != 0 | uVar6" (identifier "uVar4") (= "=") (binary_expression "uVar3 != 0 | uVar6" (binary_expression "uVar3 != 0" (identifier "uVar3") (!= "!=") (number_literal "0")) (| "|") (identifier "uVar6"))) (; ";")) (} "}")))) (expression_statement "iVar1 = -iVar5;" (assignment_expression "iVar1 = -iVar5" (identifier "iVar1") (= "=") (unary_expression "-iVar5" (- "-") (identifier "iVar5"))) (; ";")) (expression_statement "iVar5 = iVar5 + -1;" (assignment_expression "iVar5 = iVar5 + -1" (identifier "iVar5") (= "=") (binary_expression "iVar5 + -1" (identifier "iVar5") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "(&local_21)[iVar1] = (byte)(uVar4 << 7) | (byte)uVar3;" (assignment_expression "(&local_21)[iVar1] = (byte)(uVar4 << 7) | (byte)uVar3" (subscript_expression "(&local_21)[iVar1]" (parenthesized_expression "(&local_21)" (( "(") (pointer_expression "&local_21" (& "&") (identifier "local_21")) () ")")) ([ "[") (identifier "iVar1") (] "]")) (= "=") (binary_expression "(byte)(uVar4 << 7) | (byte)uVar3" (call_expression "(byte)(uVar4 << 7)" (parenthesized_expression "(byte)" (( "(") (identifier "byte") () ")")) (argument_list "(uVar4 << 7)" (( "(") (binary_expression "uVar4 << 7" (identifier "uVar4") (<< "<<") (number_literal "7")) () ")"))) (| "|") (cast_expression "(byte)uVar3" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "uVar3")))) (; ";")) (expression_statement "bVar2 = local_21;" (assignment_expression "bVar2 = local_21" (identifier "bVar2") (= "=") (identifier "local_21")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar5 != -1)" (( "(") (binary_expression "iVar5 != -1" (identifier "iVar5") (!= "!=") (number_literal "-1")) () ")")) (; ";")) (expression_statement "local_21 = bVar2;" (assignment_expression "local_21 = bVar2" (identifier "local_21") (= "=") (identifier "bVar2")) (; ";")) (expression_statement "WriteBlob((int)uVar8,iVar7,(int)&local_20 - iVar7);" (call_expression "WriteBlob((int)uVar8,iVar7,(int)&local_20 - iVar7)" (identifier "WriteBlob") (argument_list "((int)uVar8,iVar7,(int)&local_20 - iVar7)" (( "(") (cast_expression "(int)uVar8" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar8")) (, ",") (identifier "iVar7") (, ",") (binary_expression "(int)&local_20 - iVar7" (cast_expression "(int)&local_20" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (pointer_expression "&local_20" (& "&") (identifier "local_20"))) (- "-") (identifier "iVar7")) () ")"))) (; ";")) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0029eab0();\n  }" (if "if") (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (!= "!=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n                    \n    FUN_0029eab0();\n  }" ({ "{") (expression_statement "FUN_0029eab0();" (call_expression "FUN_0029eab0()" (identifier "FUN_0029eab0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* 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 */

void function_1(type_1 *image,size_t value)

{
  int iVar1;
  type_2 bVar2;
  type_3 var_4;
  type_3 var_6;
  int var_5;
  type_3 var_3;
  size_t var_8;
  int var_2;
  type_4 uVar7;
  type_5 buffer [5];
  int local_20 [4];
  
  uVar7 = var_1();
  var_3 = 0;
  var_5 = 4;
  local_20[0] = *(int *)(var_2 + 0x14);
  var_8 = 1;
  do {
    var_4 = (type_3)((type_6)uVar7 >> 0x20) >> ((char)var_5 * '\a' & 0x1fU) & 0x7f;
    if ((var_3 == 0) && (var_4 != 0)) {
      var_8 = var_5 + 1;
      var_6 = (type_3)(var_5 != 0);
      var_3 = 1;
    }
    else {
      bVar2 = (type_2)var_4;
      if (var_5 == 0) break;
      var_6 = var_4 != 0 | var_3;
    }
    iVar1 = 4 - var_5;
    var_5 = var_5 + -1;
    buffer[iVar1] = (type_2)(var_6 << 7) | (type_2)var_4;
    bVar2 = buffer[4];
  } while (var_5 != -1);
  buffer[4] = bVar2;
  var_7((type_1 *)uVar7,var_8,(void *)((int)local_20 - var_8));
  if (local_20[0] != *(int *)(var_2 + 0x14)) {
                    /* WARNING: Subroutine does not return */
    var_9();
  }
  return;
}


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

void MASKED(void)

{
  int iVar1;
  byte bVar2;
  uint uVar3;
  uint uVar4;
  int iVar5;
  uint uVar6;
  int iVar7;
  int in_GS_OFFSET;
  undefined8 uVar8;
  byte local_21;
  int local_20;
  
  uVar8 = FUN_0004c803();
  uVar6 = 0;
  iVar5 = 4;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  iVar7 = 1;
  do {
    uVar3 = (uint)((ulonglong)uVar8 >> 0x20) >> ((char)iVar5 * '\a' & 0x1fU) & 0x7f;
    if ((uVar6 == 0) && (uVar3 != 0)) {
      iVar7 = iVar5 + 1;
      uVar4 = (uint)(iVar5 != 0);
      uVar6 = 1;
    }
    else {
      bVar2 = (byte)uVar3;
      if (iVar5 == 0) break;
      uVar4 = uVar3 != 0 | uVar6;
    }
    iVar1 = -iVar5;
    iVar5 = iVar5 + -1;
    (&local_21)[iVar1] = (byte)(uVar4 << 7) | (byte)uVar3;
    bVar2 = local_21;
  } while (iVar5 != -1);
  local_21 = bVar2;
  WriteBlob((int)uVar8,iVar7,(int)&local_20 - iVar7);
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_0029eab0();
  }
  return;
}

