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

u32 __regparm3 sqlite3Utf8Read(uchar **pz)

{
  byte bVar1;
  u32 uVar2;
  byte *pbVar3;
  
  pbVar3 = *pz;
  *pz = pbVar3 + 1;
  uVar2 = (u32)*pbVar3;
  if (0xbf < uVar2) {
    uVar2 = (u32)(&globInfo.matchAll)[uVar2];
    if ((pbVar3[1] & 0xc0) == 0x80) {
      pbVar3 = pbVar3 + 2;
      do {
        *pz = pbVar3;
        uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f);
        bVar1 = *pbVar3;
        pbVar3 = pbVar3 + 1;
      } while ((bVar1 & 0xc0) == 0x80);
      if (((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)) || ((uVar2 & 0xfffffffe) == 0xfffe))
      {
        return 0xfffd;
      }
    }
    else if (uVar2 < 0x80) {
      return 0xfffd;
    }
  }
  return uVar2;
}



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

uint __regparm3 FUN_0001b140(int *param_1)

{
  byte bVar1;
  uint uVar2;
  byte *pbVar3;
  
  pbVar3 = (byte *)*param_1;
  *param_1 = (int)(pbVar3 + 1);
  uVar2 = (uint)*pbVar3;
  if (0xbf < uVar2) {
    uVar2 = (uint)(byte)(&DAT_00104560)[uVar2];
    if ((pbVar3[1] & 0xc0) == 0x80) {
      pbVar3 = pbVar3 + 2;
      do {
        *param_1 = (int)pbVar3;
        uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f);
        bVar1 = *pbVar3;
        pbVar3 = pbVar3 + 1;
      } while ((bVar1 & 0xc0) == 0x80);
      if (((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)) || ((uVar2 & 0xfffffffe) == 0xfffe))
      {
        return 0xfffd;
      }
    }
    else if (uVar2 < 0x80) {
      return 0xfffd;
    }
  }
  return uVar2;
}


PUSH ESI
PUSH EBX
MOV EDX,dword ptr [EAX]
CALL 0x00014d20
ADD EBX,0x12fd8b
LEA ECX,[EDX + 0x1]
MOV dword ptr [EAX],ECX
MOVZX ECX,byte ptr [EDX]
CMP ECX,0xbf
JBE 0x0001b1bd
MOVZX ECX,byte ptr [EBX + ECX*0x1 + 0xfffb968c]
MOVZX EBX,byte ptr [EDX + 0x1]
AND EBX,0xffffffc0
CMP BL,0x80
JNZ 0x0001b1c8
ADD EDX,0x2
LEA ESI,[ESI]
LEA ESI,[ESI]
MOV dword ptr [EAX],EDX
MOVZX EBX,byte ptr [EDX + -0x1]
MOV ESI,EDX
SHL ECX,0x6
ADD EDX,0x1
AND EBX,0x3f
ADD ECX,EBX
MOVZX EBX,byte ptr [ESI]
AND EBX,0xffffffc0
CMP BL,0x80
JZ 0x0001b180
CMP ECX,0x7f
JBE 0x0001b1cd
MOV EAX,ECX
AND EAX,0xfffff800
CMP EAX,0xd800
JZ 0x0001b1cd
MOV EAX,ECX
AND EAX,0xfffffffe
CMP EAX,0xfffe
JZ 0x0001b1cd
MOV EAX,ECX
POP EBX
POP ESI
RET
CMP ECX,0x7f
JA 0x0001b1bd
MOV ECX,0xfffd
POP EBX
POP ESI
MOV EAX,ECX
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nuint __regparm3 FUN_0001b140(int *param_1)\n\n{\n  byte bVar1;\n  uint uVar2;\n  byte *pbVar3;\n  \n  pbVar3 = (byte *)*param_1;\n  *param_1 = (int)(pbVar3 + 1);\n  uVar2 = (uint)*pbVar3;\n  if (0xbf < uVar2) {\n    uVar2 = (uint)(byte)(&DAT_00104560)[uVar2];\n    if ((pbVar3[1] & 0xc0) == 0x80) {\n      pbVar3 = pbVar3 + 2;\n      do {\n        *param_1 = (int)pbVar3;\n        uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f);\n        bVar1 = *pbVar3;\n        pbVar3 = pbVar3 + 1;\n      } while ((bVar1 & 0xc0) == 0x80);\n      if (((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)) || ((uVar2 & 0xfffffffe) == 0xfffe))\n      {\n        return 0xfffd;\n      }\n    }\n    else if (uVar2 < 0x80) {\n      return 0xfffd;\n    }\n  }\n  return uVar2;\n}\n\n" comment (function_definition "uint __regparm3 FUN_0001b140(int *param_1)\n\n{\n  byte bVar1;\n  uint uVar2;\n  byte *pbVar3;\n  \n  pbVar3 = (byte *)*param_1;\n  *param_1 = (int)(pbVar3 + 1);\n  uVar2 = (uint)*pbVar3;\n  if (0xbf < uVar2) {\n    uVar2 = (uint)(byte)(&DAT_00104560)[uVar2];\n    if ((pbVar3[1] & 0xc0) == 0x80) {\n      pbVar3 = pbVar3 + 2;\n      do {\n        *param_1 = (int)pbVar3;\n        uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f);\n        bVar1 = *pbVar3;\n        pbVar3 = pbVar3 + 1;\n      } while ((bVar1 & 0xc0) == 0x80);\n      if (((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)) || ((uVar2 & 0xfffffffe) == 0xfffe))\n      {\n        return 0xfffd;\n      }\n    }\n    else if (uVar2 < 0x80) {\n      return 0xfffd;\n    }\n  }\n  return uVar2;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_0001b140(int *param_1)" identifier (parameter_list "(int *param_1)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  byte bVar1;\n  uint uVar2;\n  byte *pbVar3;\n  \n  pbVar3 = (byte *)*param_1;\n  *param_1 = (int)(pbVar3 + 1);\n  uVar2 = (uint)*pbVar3;\n  if (0xbf < uVar2) {\n    uVar2 = (uint)(byte)(&DAT_00104560)[uVar2];\n    if ((pbVar3[1] & 0xc0) == 0x80) {\n      pbVar3 = pbVar3 + 2;\n      do {\n        *param_1 = (int)pbVar3;\n        uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f);\n        bVar1 = *pbVar3;\n        pbVar3 = pbVar3 + 1;\n      } while ((bVar1 & 0xc0) == 0x80);\n      if (((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)) || ((uVar2 & 0xfffffffe) == 0xfffe))\n      {\n        return 0xfffd;\n      }\n    }\n    else if (uVar2 < 0x80) {\n      return 0xfffd;\n    }\n  }\n  return uVar2;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "byte *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (expression_statement "pbVar3 = (byte *)*param_1;" (assignment_expression "pbVar3 = (byte *)*param_1" identifier = (cast_expression "(byte *)*param_1" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (expression_statement "*param_1 = (int)(pbVar3 + 1);" (assignment_expression "*param_1 = (int)(pbVar3 + 1)" (pointer_expression "*param_1" * identifier) = (cast_expression "(int)(pbVar3 + 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(pbVar3 + 1)" ( (binary_expression "pbVar3 + 1" identifier + number_literal) )))) ;) (expression_statement "uVar2 = (uint)*pbVar3;" (assignment_expression "uVar2 = (uint)*pbVar3" identifier = (binary_expression "(uint)*pbVar3" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (if_statement "if (0xbf < uVar2) {\n    uVar2 = (uint)(byte)(&DAT_00104560)[uVar2];\n    if ((pbVar3[1] & 0xc0) == 0x80) {\n      pbVar3 = pbVar3 + 2;\n      do {\n        *param_1 = (int)pbVar3;\n        uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f);\n        bVar1 = *pbVar3;\n        pbVar3 = pbVar3 + 1;\n      } while ((bVar1 & 0xc0) == 0x80);\n      if (((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)) || ((uVar2 & 0xfffffffe) == 0xfffe))\n      {\n        return 0xfffd;\n      }\n    }\n    else if (uVar2 < 0x80) {\n      return 0xfffd;\n    }\n  }" if (parenthesized_expression "(0xbf < uVar2)" ( (binary_expression "0xbf < uVar2" number_literal < identifier) )) (compound_statement "{\n    uVar2 = (uint)(byte)(&DAT_00104560)[uVar2];\n    if ((pbVar3[1] & 0xc0) == 0x80) {\n      pbVar3 = pbVar3 + 2;\n      do {\n        *param_1 = (int)pbVar3;\n        uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f);\n        bVar1 = *pbVar3;\n        pbVar3 = pbVar3 + 1;\n      } while ((bVar1 & 0xc0) == 0x80);\n      if (((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)) || ((uVar2 & 0xfffffffe) == 0xfffe))\n      {\n        return 0xfffd;\n      }\n    }\n    else if (uVar2 < 0x80) {\n      return 0xfffd;\n    }\n  }" { (expression_statement "uVar2 = (uint)(byte)(&DAT_00104560)[uVar2];" (assignment_expression "uVar2 = (uint)(byte)(&DAT_00104560)[uVar2]" identifier = (subscript_expression "(uint)(byte)(&DAT_00104560)[uVar2]" (call_expression "(uint)(byte)(&DAT_00104560)" (call_expression "(uint)(byte)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(byte)" ( identifier ))) (argument_list "(&DAT_00104560)" ( (pointer_expression "&DAT_00104560" & identifier) ))) [ identifier ])) ;) (if_statement "if ((pbVar3[1] & 0xc0) == 0x80) {\n      pbVar3 = pbVar3 + 2;\n      do {\n        *param_1 = (int)pbVar3;\n        uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f);\n        bVar1 = *pbVar3;\n        pbVar3 = pbVar3 + 1;\n      } while ((bVar1 & 0xc0) == 0x80);\n      if (((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)) || ((uVar2 & 0xfffffffe) == 0xfffe))\n      {\n        return 0xfffd;\n      }\n    }\n    else if (uVar2 < 0x80) {\n      return 0xfffd;\n    }" if (parenthesized_expression "((pbVar3[1] & 0xc0) == 0x80)" ( (binary_expression "(pbVar3[1] & 0xc0) == 0x80" (parenthesized_expression "(pbVar3[1] & 0xc0)" ( (binary_expression "pbVar3[1] & 0xc0" (subscript_expression "pbVar3[1]" identifier [ number_literal ]) & number_literal) )) == number_literal) )) (compound_statement "{\n      pbVar3 = pbVar3 + 2;\n      do {\n        *param_1 = (int)pbVar3;\n        uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f);\n        bVar1 = *pbVar3;\n        pbVar3 = pbVar3 + 1;\n      } while ((bVar1 & 0xc0) == 0x80);\n      if (((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)) || ((uVar2 & 0xfffffffe) == 0xfffe))\n      {\n        return 0xfffd;\n      }\n    }" { (expression_statement "pbVar3 = pbVar3 + 2;" (assignment_expression "pbVar3 = pbVar3 + 2" identifier = (binary_expression "pbVar3 + 2" identifier + number_literal)) ;) (do_statement "do {\n        *param_1 = (int)pbVar3;\n        uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f);\n        bVar1 = *pbVar3;\n        pbVar3 = pbVar3 + 1;\n      } while ((bVar1 & 0xc0) == 0x80);" do (compound_statement "{\n        *param_1 = (int)pbVar3;\n        uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f);\n        bVar1 = *pbVar3;\n        pbVar3 = pbVar3 + 1;\n      }" { (expression_statement "*param_1 = (int)pbVar3;" (assignment_expression "*param_1 = (int)pbVar3" (pointer_expression "*param_1" * identifier) = (cast_expression "(int)pbVar3" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f);" (assignment_expression "uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f)" identifier = (binary_expression "uVar2 * 0x40 + (pbVar3[-1] & 0x3f)" (binary_expression "uVar2 * 0x40" identifier * number_literal) + (parenthesized_expression "(pbVar3[-1] & 0x3f)" ( (binary_expression "pbVar3[-1] & 0x3f" (subscript_expression "pbVar3[-1]" identifier [ number_literal ]) & number_literal) )))) ;) (expression_statement "bVar1 = *pbVar3;" (assignment_expression "bVar1 = *pbVar3" identifier = (pointer_expression "*pbVar3" * identifier)) ;) (expression_statement "pbVar3 = pbVar3 + 1;" (assignment_expression "pbVar3 = pbVar3 + 1" identifier = (binary_expression "pbVar3 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "((bVar1 & 0xc0) == 0x80)" ( (binary_expression "(bVar1 & 0xc0) == 0x80" (parenthesized_expression "(bVar1 & 0xc0)" ( (binary_expression "bVar1 & 0xc0" identifier & number_literal) )) == number_literal) )) ;) (if_statement "if (((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)) || ((uVar2 & 0xfffffffe) == 0xfffe))\n      {\n        return 0xfffd;\n      }" if (parenthesized_expression "(((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)) || ((uVar2 & 0xfffffffe) == 0xfffe))" ( (binary_expression "((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)) || ((uVar2 & 0xfffffffe) == 0xfffe)" (parenthesized_expression "((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800))" ( (binary_expression "(uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)" (parenthesized_expression "(uVar2 < 0x80)" ( (binary_expression "uVar2 < 0x80" identifier < number_literal) )) || (parenthesized_expression "((uVar2 & 0xfffff800) == 0xd800)" ( (binary_expression "(uVar2 & 0xfffff800) == 0xd800" (parenthesized_expression "(uVar2 & 0xfffff800)" ( (binary_expression "uVar2 & 0xfffff800" identifier & number_literal) )) == number_literal) ))) )) || (parenthesized_expression "((uVar2 & 0xfffffffe) == 0xfffe)" ( (binary_expression "(uVar2 & 0xfffffffe) == 0xfffe" (parenthesized_expression "(uVar2 & 0xfffffffe)" ( (binary_expression "uVar2 & 0xfffffffe" identifier & number_literal) )) == number_literal) ))) )) (compound_statement "{\n        return 0xfffd;\n      }" { (return_statement "return 0xfffd;" return number_literal ;) })) }) (else_clause "else if (uVar2 < 0x80) {\n      return 0xfffd;\n    }" else (if_statement "if (uVar2 < 0x80) {\n      return 0xfffd;\n    }" if (parenthesized_expression "(uVar2 < 0x80)" ( (binary_expression "uVar2 < 0x80" identifier < number_literal) )) (compound_statement "{\n      return 0xfffd;\n    }" { (return_statement "return 0xfffd;" return number_literal ;) })))) })) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nu32 __regparm3 sqlite3Utf8Read(uchar **pz)\n\n{\n  byte bVar1;\n  u32 uVar2;\n  byte *pbVar3;\n  \n  pbVar3 = *pz;\n  *pz = pbVar3 + 1;\n  uVar2 = (u32)*pbVar3;\n  if (0xbf < uVar2) {\n    uVar2 = (u32)(&globInfo.matchAll)[uVar2];\n    if ((pbVar3[1] & 0xc0) == 0x80) {\n      pbVar3 = pbVar3 + 2;\n      do {\n        *pz = pbVar3;\n        uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f);\n        bVar1 = *pbVar3;\n        pbVar3 = pbVar3 + 1;\n      } while ((bVar1 & 0xc0) == 0x80);\n      if (((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)) || ((uVar2 & 0xfffffffe) == 0xfffe))\n      {\n        return 0xfffd;\n      }\n    }\n    else if (uVar2 < 0x80) {\n      return 0xfffd;\n    }\n  }\n  return uVar2;\n}\n\n" comment (function_definition "u32 __regparm3 sqlite3Utf8Read(uchar **pz)\n\n{\n  byte bVar1;\n  u32 uVar2;\n  byte *pbVar3;\n  \n  pbVar3 = *pz;\n  *pz = pbVar3 + 1;\n  uVar2 = (u32)*pbVar3;\n  if (0xbf < uVar2) {\n    uVar2 = (u32)(&globInfo.matchAll)[uVar2];\n    if ((pbVar3[1] & 0xc0) == 0x80) {\n      pbVar3 = pbVar3 + 2;\n      do {\n        *pz = pbVar3;\n        uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f);\n        bVar1 = *pbVar3;\n        pbVar3 = pbVar3 + 1;\n      } while ((bVar1 & 0xc0) == 0x80);\n      if (((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)) || ((uVar2 & 0xfffffffe) == 0xfffe))\n      {\n        return 0xfffd;\n      }\n    }\n    else if (uVar2 < 0x80) {\n      return 0xfffd;\n    }\n  }\n  return uVar2;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "sqlite3Utf8Read(uchar **pz)" identifier (parameter_list "(uchar **pz)" ( (parameter_declaration "uchar **pz" type_identifier (pointer_declarator "**pz" * (pointer_declarator "*pz" * identifier))) ))) (compound_statement "{\n  byte bVar1;\n  u32 uVar2;\n  byte *pbVar3;\n  \n  pbVar3 = *pz;\n  *pz = pbVar3 + 1;\n  uVar2 = (u32)*pbVar3;\n  if (0xbf < uVar2) {\n    uVar2 = (u32)(&globInfo.matchAll)[uVar2];\n    if ((pbVar3[1] & 0xc0) == 0x80) {\n      pbVar3 = pbVar3 + 2;\n      do {\n        *pz = pbVar3;\n        uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f);\n        bVar1 = *pbVar3;\n        pbVar3 = pbVar3 + 1;\n      } while ((bVar1 & 0xc0) == 0x80);\n      if (((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)) || ((uVar2 & 0xfffffffe) == 0xfffe))\n      {\n        return 0xfffd;\n      }\n    }\n    else if (uVar2 < 0x80) {\n      return 0xfffd;\n    }\n  }\n  return uVar2;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "u32 uVar2;" type_identifier identifier ;) (declaration "byte *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (expression_statement "pbVar3 = *pz;" (assignment_expression "pbVar3 = *pz" identifier = (pointer_expression "*pz" * identifier)) ;) (expression_statement "*pz = pbVar3 + 1;" (assignment_expression "*pz = pbVar3 + 1" (pointer_expression "*pz" * identifier) = (binary_expression "pbVar3 + 1" identifier + number_literal)) ;) (expression_statement "uVar2 = (u32)*pbVar3;" (assignment_expression "uVar2 = (u32)*pbVar3" identifier = (binary_expression "(u32)*pbVar3" (parenthesized_expression "(u32)" ( identifier )) * identifier)) ;) (if_statement "if (0xbf < uVar2) {\n    uVar2 = (u32)(&globInfo.matchAll)[uVar2];\n    if ((pbVar3[1] & 0xc0) == 0x80) {\n      pbVar3 = pbVar3 + 2;\n      do {\n        *pz = pbVar3;\n        uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f);\n        bVar1 = *pbVar3;\n        pbVar3 = pbVar3 + 1;\n      } while ((bVar1 & 0xc0) == 0x80);\n      if (((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)) || ((uVar2 & 0xfffffffe) == 0xfffe))\n      {\n        return 0xfffd;\n      }\n    }\n    else if (uVar2 < 0x80) {\n      return 0xfffd;\n    }\n  }" if (parenthesized_expression "(0xbf < uVar2)" ( (binary_expression "0xbf < uVar2" number_literal < identifier) )) (compound_statement "{\n    uVar2 = (u32)(&globInfo.matchAll)[uVar2];\n    if ((pbVar3[1] & 0xc0) == 0x80) {\n      pbVar3 = pbVar3 + 2;\n      do {\n        *pz = pbVar3;\n        uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f);\n        bVar1 = *pbVar3;\n        pbVar3 = pbVar3 + 1;\n      } while ((bVar1 & 0xc0) == 0x80);\n      if (((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)) || ((uVar2 & 0xfffffffe) == 0xfffe))\n      {\n        return 0xfffd;\n      }\n    }\n    else if (uVar2 < 0x80) {\n      return 0xfffd;\n    }\n  }" { (expression_statement "uVar2 = (u32)(&globInfo.matchAll)[uVar2];" (assignment_expression "uVar2 = (u32)(&globInfo.matchAll)[uVar2]" identifier = (subscript_expression "(u32)(&globInfo.matchAll)[uVar2]" (call_expression "(u32)(&globInfo.matchAll)" (parenthesized_expression "(u32)" ( identifier )) (argument_list "(&globInfo.matchAll)" ( (pointer_expression "&globInfo.matchAll" & (field_expression "globInfo.matchAll" identifier . field_identifier)) ))) [ identifier ])) ;) (if_statement "if ((pbVar3[1] & 0xc0) == 0x80) {\n      pbVar3 = pbVar3 + 2;\n      do {\n        *pz = pbVar3;\n        uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f);\n        bVar1 = *pbVar3;\n        pbVar3 = pbVar3 + 1;\n      } while ((bVar1 & 0xc0) == 0x80);\n      if (((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)) || ((uVar2 & 0xfffffffe) == 0xfffe))\n      {\n        return 0xfffd;\n      }\n    }\n    else if (uVar2 < 0x80) {\n      return 0xfffd;\n    }" if (parenthesized_expression "((pbVar3[1] & 0xc0) == 0x80)" ( (binary_expression "(pbVar3[1] & 0xc0) == 0x80" (parenthesized_expression "(pbVar3[1] & 0xc0)" ( (binary_expression "pbVar3[1] & 0xc0" (subscript_expression "pbVar3[1]" identifier [ number_literal ]) & number_literal) )) == number_literal) )) (compound_statement "{\n      pbVar3 = pbVar3 + 2;\n      do {\n        *pz = pbVar3;\n        uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f);\n        bVar1 = *pbVar3;\n        pbVar3 = pbVar3 + 1;\n      } while ((bVar1 & 0xc0) == 0x80);\n      if (((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)) || ((uVar2 & 0xfffffffe) == 0xfffe))\n      {\n        return 0xfffd;\n      }\n    }" { (expression_statement "pbVar3 = pbVar3 + 2;" (assignment_expression "pbVar3 = pbVar3 + 2" identifier = (binary_expression "pbVar3 + 2" identifier + number_literal)) ;) (do_statement "do {\n        *pz = pbVar3;\n        uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f);\n        bVar1 = *pbVar3;\n        pbVar3 = pbVar3 + 1;\n      } while ((bVar1 & 0xc0) == 0x80);" do (compound_statement "{\n        *pz = pbVar3;\n        uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f);\n        bVar1 = *pbVar3;\n        pbVar3 = pbVar3 + 1;\n      }" { (expression_statement "*pz = pbVar3;" (assignment_expression "*pz = pbVar3" (pointer_expression "*pz" * identifier) = identifier) ;) (expression_statement "uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f);" (assignment_expression "uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f)" identifier = (binary_expression "uVar2 * 0x40 + (pbVar3[-1] & 0x3f)" (binary_expression "uVar2 * 0x40" identifier * number_literal) + (parenthesized_expression "(pbVar3[-1] & 0x3f)" ( (binary_expression "pbVar3[-1] & 0x3f" (subscript_expression "pbVar3[-1]" identifier [ number_literal ]) & number_literal) )))) ;) (expression_statement "bVar1 = *pbVar3;" (assignment_expression "bVar1 = *pbVar3" identifier = (pointer_expression "*pbVar3" * identifier)) ;) (expression_statement "pbVar3 = pbVar3 + 1;" (assignment_expression "pbVar3 = pbVar3 + 1" identifier = (binary_expression "pbVar3 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "((bVar1 & 0xc0) == 0x80)" ( (binary_expression "(bVar1 & 0xc0) == 0x80" (parenthesized_expression "(bVar1 & 0xc0)" ( (binary_expression "bVar1 & 0xc0" identifier & number_literal) )) == number_literal) )) ;) (if_statement "if (((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)) || ((uVar2 & 0xfffffffe) == 0xfffe))\n      {\n        return 0xfffd;\n      }" if (parenthesized_expression "(((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)) || ((uVar2 & 0xfffffffe) == 0xfffe))" ( (binary_expression "((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)) || ((uVar2 & 0xfffffffe) == 0xfffe)" (parenthesized_expression "((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800))" ( (binary_expression "(uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)" (parenthesized_expression "(uVar2 < 0x80)" ( (binary_expression "uVar2 < 0x80" identifier < number_literal) )) || (parenthesized_expression "((uVar2 & 0xfffff800) == 0xd800)" ( (binary_expression "(uVar2 & 0xfffff800) == 0xd800" (parenthesized_expression "(uVar2 & 0xfffff800)" ( (binary_expression "uVar2 & 0xfffff800" identifier & number_literal) )) == number_literal) ))) )) || (parenthesized_expression "((uVar2 & 0xfffffffe) == 0xfffe)" ( (binary_expression "(uVar2 & 0xfffffffe) == 0xfffe" (parenthesized_expression "(uVar2 & 0xfffffffe)" ( (binary_expression "uVar2 & 0xfffffffe" identifier & number_literal) )) == number_literal) ))) )) (compound_statement "{\n        return 0xfffd;\n      }" { (return_statement "return 0xfffd;" return number_literal ;) })) }) (else_clause "else if (uVar2 < 0x80) {\n      return 0xfffd;\n    }" else (if_statement "if (uVar2 < 0x80) {\n      return 0xfffd;\n    }" if (parenthesized_expression "(uVar2 < 0x80)" ( (binary_expression "uVar2 < 0x80" identifier < number_literal) )) (compound_statement "{\n      return 0xfffd;\n    }" { (return_statement "return 0xfffd;" return number_literal ;) })))) })) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit "uint __regparm3 FUN_0001b140(int *param_1)\n\n{\n  byte bVar1;\n  uint uVar2;\n  byte *pbVar3;\n  \n  pbVar3 = (byte *)*param_1;\n  *param_1 = (int)(pbVar3 + 1);\n  uVar2 = (uint)*pbVar3;\n  if (0xbf < uVar2) {\n    uVar2 = (uint)(byte)(&DAT_00104560)[uVar2];\n    if ((pbVar3[1] & 0xc0) == 0x80) {\n      pbVar3 = pbVar3 + 2;\n      do {\n        *param_1 = (int)pbVar3;\n        uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f);\n        bVar1 = *pbVar3;\n        pbVar3 = pbVar3 + 1;\n      } while ((bVar1 & 0xc0) == 0x80);\n      if (((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)) || ((uVar2 & 0xfffffffe) == 0xfffe))\n      {\n        return 0xfffd;\n      }\n    }\n    else if (uVar2 < 0x80) {\n      return 0xfffd;\n    }\n  }\n  return uVar2;\n}\n\n" (function_definition "uint __regparm3 FUN_0001b140(int *param_1)\n\n{\n  byte bVar1;\n  uint uVar2;\n  byte *pbVar3;\n  \n  pbVar3 = (byte *)*param_1;\n  *param_1 = (int)(pbVar3 + 1);\n  uVar2 = (uint)*pbVar3;\n  if (0xbf < uVar2) {\n    uVar2 = (uint)(byte)(&DAT_00104560)[uVar2];\n    if ((pbVar3[1] & 0xc0) == 0x80) {\n      pbVar3 = pbVar3 + 2;\n      do {\n        *param_1 = (int)pbVar3;\n        uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f);\n        bVar1 = *pbVar3;\n        pbVar3 = pbVar3 + 1;\n      } while ((bVar1 & 0xc0) == 0x80);\n      if (((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)) || ((uVar2 & 0xfffffffe) == 0xfffe))\n      {\n        return 0xfffd;\n      }\n    }\n    else if (uVar2 < 0x80) {\n      return 0xfffd;\n    }\n  }\n  return uVar2;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_0001b140(int *param_1)" identifier (parameter_list "(int *param_1)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  byte bVar1;\n  uint uVar2;\n  byte *pbVar3;\n  \n  pbVar3 = (byte *)*param_1;\n  *param_1 = (int)(pbVar3 + 1);\n  uVar2 = (uint)*pbVar3;\n  if (0xbf < uVar2) {\n    uVar2 = (uint)(byte)(&DAT_00104560)[uVar2];\n    if ((pbVar3[1] & 0xc0) == 0x80) {\n      pbVar3 = pbVar3 + 2;\n      do {\n        *param_1 = (int)pbVar3;\n        uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f);\n        bVar1 = *pbVar3;\n        pbVar3 = pbVar3 + 1;\n      } while ((bVar1 & 0xc0) == 0x80);\n      if (((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)) || ((uVar2 & 0xfffffffe) == 0xfffe))\n      {\n        return 0xfffd;\n      }\n    }\n    else if (uVar2 < 0x80) {\n      return 0xfffd;\n    }\n  }\n  return uVar2;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "byte *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (expression_statement "pbVar3 = (byte *)*param_1;" (assignment_expression "pbVar3 = (byte *)*param_1" identifier = (cast_expression "(byte *)*param_1" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (expression_statement "*param_1 = (int)(pbVar3 + 1);" (assignment_expression "*param_1 = (int)(pbVar3 + 1)" (pointer_expression "*param_1" * identifier) = (cast_expression "(int)(pbVar3 + 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(pbVar3 + 1)" ( (binary_expression "pbVar3 + 1" identifier + number_literal) )))) ;) (expression_statement "uVar2 = (uint)*pbVar3;" (assignment_expression "uVar2 = (uint)*pbVar3" identifier = (binary_expression "(uint)*pbVar3" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (if_statement "if (0xbf < uVar2) {\n    uVar2 = (uint)(byte)(&DAT_00104560)[uVar2];\n    if ((pbVar3[1] & 0xc0) == 0x80) {\n      pbVar3 = pbVar3 + 2;\n      do {\n        *param_1 = (int)pbVar3;\n        uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f);\n        bVar1 = *pbVar3;\n        pbVar3 = pbVar3 + 1;\n      } while ((bVar1 & 0xc0) == 0x80);\n      if (((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)) || ((uVar2 & 0xfffffffe) == 0xfffe))\n      {\n        return 0xfffd;\n      }\n    }\n    else if (uVar2 < 0x80) {\n      return 0xfffd;\n    }\n  }" if (parenthesized_expression "(0xbf < uVar2)" ( (binary_expression "0xbf < uVar2" number_literal < identifier) )) (compound_statement "{\n    uVar2 = (uint)(byte)(&DAT_00104560)[uVar2];\n    if ((pbVar3[1] & 0xc0) == 0x80) {\n      pbVar3 = pbVar3 + 2;\n      do {\n        *param_1 = (int)pbVar3;\n        uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f);\n        bVar1 = *pbVar3;\n        pbVar3 = pbVar3 + 1;\n      } while ((bVar1 & 0xc0) == 0x80);\n      if (((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)) || ((uVar2 & 0xfffffffe) == 0xfffe))\n      {\n        return 0xfffd;\n      }\n    }\n    else if (uVar2 < 0x80) {\n      return 0xfffd;\n    }\n  }" { (expression_statement "uVar2 = (uint)(byte)(&DAT_00104560)[uVar2];" (assignment_expression "uVar2 = (uint)(byte)(&DAT_00104560)[uVar2]" identifier = (subscript_expression "(uint)(byte)(&DAT_00104560)[uVar2]" (call_expression "(uint)(byte)(&DAT_00104560)" (call_expression "(uint)(byte)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(byte)" ( identifier ))) (argument_list "(&DAT_00104560)" ( (pointer_expression "&DAT_00104560" & identifier) ))) [ identifier ])) ;) (if_statement "if ((pbVar3[1] & 0xc0) == 0x80) {\n      pbVar3 = pbVar3 + 2;\n      do {\n        *param_1 = (int)pbVar3;\n        uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f);\n        bVar1 = *pbVar3;\n        pbVar3 = pbVar3 + 1;\n      } while ((bVar1 & 0xc0) == 0x80);\n      if (((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)) || ((uVar2 & 0xfffffffe) == 0xfffe))\n      {\n        return 0xfffd;\n      }\n    }\n    else if (uVar2 < 0x80) {\n      return 0xfffd;\n    }" if (parenthesized_expression "((pbVar3[1] & 0xc0) == 0x80)" ( (binary_expression "(pbVar3[1] & 0xc0) == 0x80" (parenthesized_expression "(pbVar3[1] & 0xc0)" ( (binary_expression "pbVar3[1] & 0xc0" (subscript_expression "pbVar3[1]" identifier [ number_literal ]) & number_literal) )) == number_literal) )) (compound_statement "{\n      pbVar3 = pbVar3 + 2;\n      do {\n        *param_1 = (int)pbVar3;\n        uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f);\n        bVar1 = *pbVar3;\n        pbVar3 = pbVar3 + 1;\n      } while ((bVar1 & 0xc0) == 0x80);\n      if (((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)) || ((uVar2 & 0xfffffffe) == 0xfffe))\n      {\n        return 0xfffd;\n      }\n    }" { (expression_statement "pbVar3 = pbVar3 + 2;" (assignment_expression "pbVar3 = pbVar3 + 2" identifier = (binary_expression "pbVar3 + 2" identifier + number_literal)) ;) (do_statement "do {\n        *param_1 = (int)pbVar3;\n        uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f);\n        bVar1 = *pbVar3;\n        pbVar3 = pbVar3 + 1;\n      } while ((bVar1 & 0xc0) == 0x80);" do (compound_statement "{\n        *param_1 = (int)pbVar3;\n        uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f);\n        bVar1 = *pbVar3;\n        pbVar3 = pbVar3 + 1;\n      }" { (expression_statement "*param_1 = (int)pbVar3;" (assignment_expression "*param_1 = (int)pbVar3" (pointer_expression "*param_1" * identifier) = (cast_expression "(int)pbVar3" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f);" (assignment_expression "uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f)" identifier = (binary_expression "uVar2 * 0x40 + (pbVar3[-1] & 0x3f)" (binary_expression "uVar2 * 0x40" identifier * number_literal) + (parenthesized_expression "(pbVar3[-1] & 0x3f)" ( (binary_expression "pbVar3[-1] & 0x3f" (subscript_expression "pbVar3[-1]" identifier [ number_literal ]) & number_literal) )))) ;) (expression_statement "bVar1 = *pbVar3;" (assignment_expression "bVar1 = *pbVar3" identifier = (pointer_expression "*pbVar3" * identifier)) ;) (expression_statement "pbVar3 = pbVar3 + 1;" (assignment_expression "pbVar3 = pbVar3 + 1" identifier = (binary_expression "pbVar3 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "((bVar1 & 0xc0) == 0x80)" ( (binary_expression "(bVar1 & 0xc0) == 0x80" (parenthesized_expression "(bVar1 & 0xc0)" ( (binary_expression "bVar1 & 0xc0" identifier & number_literal) )) == number_literal) )) ;) (if_statement "if (((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)) || ((uVar2 & 0xfffffffe) == 0xfffe))\n      {\n        return 0xfffd;\n      }" if (parenthesized_expression "(((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)) || ((uVar2 & 0xfffffffe) == 0xfffe))" ( (binary_expression "((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)) || ((uVar2 & 0xfffffffe) == 0xfffe)" (parenthesized_expression "((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800))" ( (binary_expression "(uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)" (parenthesized_expression "(uVar2 < 0x80)" ( (binary_expression "uVar2 < 0x80" identifier < number_literal) )) || (parenthesized_expression "((uVar2 & 0xfffff800) == 0xd800)" ( (binary_expression "(uVar2 & 0xfffff800) == 0xd800" (parenthesized_expression "(uVar2 & 0xfffff800)" ( (binary_expression "uVar2 & 0xfffff800" identifier & number_literal) )) == number_literal) ))) )) || (parenthesized_expression "((uVar2 & 0xfffffffe) == 0xfffe)" ( (binary_expression "(uVar2 & 0xfffffffe) == 0xfffe" (parenthesized_expression "(uVar2 & 0xfffffffe)" ( (binary_expression "uVar2 & 0xfffffffe" identifier & number_literal) )) == number_literal) ))) )) (compound_statement "{\n        return 0xfffd;\n      }" { (return_statement "return 0xfffd;" return number_literal ;) })) }) (else_clause "else if (uVar2 < 0x80) {\n      return 0xfffd;\n    }" else (if_statement "if (uVar2 < 0x80) {\n      return 0xfffd;\n    }" if (parenthesized_expression "(uVar2 < 0x80)" ( (binary_expression "uVar2 < 0x80" identifier < number_literal) )) (compound_statement "{\n      return 0xfffd;\n    }" { (return_statement "return 0xfffd;" return number_literal ;) })))) })) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE 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 (pointer_expression * IDENT) = (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( IDENT )) * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression (call_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( IDENT ))) (argument_list ( (pointer_expression & IDENT) ))) [ IDENT ])) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) & LIT) )) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT * LIT) + (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) & LIT) )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT < LIT) )) || (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) ))) )) || (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) ))) )) (compound_statement { (return_statement return LIT ;) })) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (return_statement return LIT ;) })))) })) (return_statement return IDENT ;) })))
(function_definition "uint __regparm3 FUN_0001b140(int *param_1)\n\n{\n  byte bVar1;\n  uint uVar2;\n  byte *pbVar3;\n  \n  pbVar3 = (byte *)*param_1;\n  *param_1 = (int)(pbVar3 + 1);\n  uVar2 = (uint)*pbVar3;\n  if (0xbf < uVar2) {\n    uVar2 = (uint)(byte)(&DAT_00104560)[uVar2];\n    if ((pbVar3[1] & 0xc0) == 0x80) {\n      pbVar3 = pbVar3 + 2;\n      do {\n        *param_1 = (int)pbVar3;\n        uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f);\n        bVar1 = *pbVar3;\n        pbVar3 = pbVar3 + 1;\n      } while ((bVar1 & 0xc0) == 0x80);\n      if (((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)) || ((uVar2 & 0xfffffffe) == 0xfffe))\n      {\n        return 0xfffd;\n      }\n    }\n    else if (uVar2 < 0x80) {\n      return 0xfffd;\n    }\n  }\n  return uVar2;\n}" (type_identifier "uint") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_0001b140(int *param_1)" (identifier "FUN_0001b140") (parameter_list "(int *param_1)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  byte bVar1;\n  uint uVar2;\n  byte *pbVar3;\n  \n  pbVar3 = (byte *)*param_1;\n  *param_1 = (int)(pbVar3 + 1);\n  uVar2 = (uint)*pbVar3;\n  if (0xbf < uVar2) {\n    uVar2 = (uint)(byte)(&DAT_00104560)[uVar2];\n    if ((pbVar3[1] & 0xc0) == 0x80) {\n      pbVar3 = pbVar3 + 2;\n      do {\n        *param_1 = (int)pbVar3;\n        uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f);\n        bVar1 = *pbVar3;\n        pbVar3 = pbVar3 + 1;\n      } while ((bVar1 & 0xc0) == 0x80);\n      if (((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)) || ((uVar2 & 0xfffffffe) == 0xfffe))\n      {\n        return 0xfffd;\n      }\n    }\n    else if (uVar2 < 0x80) {\n      return 0xfffd;\n    }\n  }\n  return uVar2;\n}" ({ "{") (declaration "byte bVar1;" (type_identifier "byte") (identifier "bVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "byte *pbVar3;" (type_identifier "byte") (pointer_declarator "*pbVar3" (* "*") (identifier "pbVar3")) (; ";")) (expression_statement "pbVar3 = (byte *)*param_1;" (assignment_expression "pbVar3 = (byte *)*param_1" (identifier "pbVar3") (= "=") (cast_expression "(byte *)*param_1" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (expression_statement "*param_1 = (int)(pbVar3 + 1);" (assignment_expression "*param_1 = (int)(pbVar3 + 1)" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (cast_expression "(int)(pbVar3 + 1)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(pbVar3 + 1)" (( "(") (binary_expression "pbVar3 + 1" (identifier "pbVar3") (+ "+") (number_literal "1")) () ")")))) (; ";")) (expression_statement "uVar2 = (uint)*pbVar3;" (assignment_expression "uVar2 = (uint)*pbVar3" (identifier "uVar2") (= "=") (binary_expression "(uint)*pbVar3" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (identifier "pbVar3"))) (; ";")) (if_statement "if (0xbf < uVar2) {\n    uVar2 = (uint)(byte)(&DAT_00104560)[uVar2];\n    if ((pbVar3[1] & 0xc0) == 0x80) {\n      pbVar3 = pbVar3 + 2;\n      do {\n        *param_1 = (int)pbVar3;\n        uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f);\n        bVar1 = *pbVar3;\n        pbVar3 = pbVar3 + 1;\n      } while ((bVar1 & 0xc0) == 0x80);\n      if (((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)) || ((uVar2 & 0xfffffffe) == 0xfffe))\n      {\n        return 0xfffd;\n      }\n    }\n    else if (uVar2 < 0x80) {\n      return 0xfffd;\n    }\n  }" (if "if") (parenthesized_expression "(0xbf < uVar2)" (( "(") (binary_expression "0xbf < uVar2" (number_literal "0xbf") (< "<") (identifier "uVar2")) () ")")) (compound_statement "{\n    uVar2 = (uint)(byte)(&DAT_00104560)[uVar2];\n    if ((pbVar3[1] & 0xc0) == 0x80) {\n      pbVar3 = pbVar3 + 2;\n      do {\n        *param_1 = (int)pbVar3;\n        uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f);\n        bVar1 = *pbVar3;\n        pbVar3 = pbVar3 + 1;\n      } while ((bVar1 & 0xc0) == 0x80);\n      if (((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)) || ((uVar2 & 0xfffffffe) == 0xfffe))\n      {\n        return 0xfffd;\n      }\n    }\n    else if (uVar2 < 0x80) {\n      return 0xfffd;\n    }\n  }" ({ "{") (expression_statement "uVar2 = (uint)(byte)(&DAT_00104560)[uVar2];" (assignment_expression "uVar2 = (uint)(byte)(&DAT_00104560)[uVar2]" (identifier "uVar2") (= "=") (subscript_expression "(uint)(byte)(&DAT_00104560)[uVar2]" (call_expression "(uint)(byte)(&DAT_00104560)" (call_expression "(uint)(byte)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(byte)" (( "(") (identifier "byte") () ")"))) (argument_list "(&DAT_00104560)" (( "(") (pointer_expression "&DAT_00104560" (& "&") (identifier "DAT_00104560")) () ")"))) ([ "[") (identifier "uVar2") (] "]"))) (; ";")) (if_statement "if ((pbVar3[1] & 0xc0) == 0x80) {\n      pbVar3 = pbVar3 + 2;\n      do {\n        *param_1 = (int)pbVar3;\n        uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f);\n        bVar1 = *pbVar3;\n        pbVar3 = pbVar3 + 1;\n      } while ((bVar1 & 0xc0) == 0x80);\n      if (((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)) || ((uVar2 & 0xfffffffe) == 0xfffe))\n      {\n        return 0xfffd;\n      }\n    }\n    else if (uVar2 < 0x80) {\n      return 0xfffd;\n    }" (if "if") (parenthesized_expression "((pbVar3[1] & 0xc0) == 0x80)" (( "(") (binary_expression "(pbVar3[1] & 0xc0) == 0x80" (parenthesized_expression "(pbVar3[1] & 0xc0)" (( "(") (binary_expression "pbVar3[1] & 0xc0" (subscript_expression "pbVar3[1]" (identifier "pbVar3") ([ "[") (number_literal "1") (] "]")) (& "&") (number_literal "0xc0")) () ")")) (== "==") (number_literal "0x80")) () ")")) (compound_statement "{\n      pbVar3 = pbVar3 + 2;\n      do {\n        *param_1 = (int)pbVar3;\n        uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f);\n        bVar1 = *pbVar3;\n        pbVar3 = pbVar3 + 1;\n      } while ((bVar1 & 0xc0) == 0x80);\n      if (((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)) || ((uVar2 & 0xfffffffe) == 0xfffe))\n      {\n        return 0xfffd;\n      }\n    }" ({ "{") (expression_statement "pbVar3 = pbVar3 + 2;" (assignment_expression "pbVar3 = pbVar3 + 2" (identifier "pbVar3") (= "=") (binary_expression "pbVar3 + 2" (identifier "pbVar3") (+ "+") (number_literal "2"))) (; ";")) (do_statement "do {\n        *param_1 = (int)pbVar3;\n        uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f);\n        bVar1 = *pbVar3;\n        pbVar3 = pbVar3 + 1;\n      } while ((bVar1 & 0xc0) == 0x80);" (do "do") (compound_statement "{\n        *param_1 = (int)pbVar3;\n        uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f);\n        bVar1 = *pbVar3;\n        pbVar3 = pbVar3 + 1;\n      }" ({ "{") (expression_statement "*param_1 = (int)pbVar3;" (assignment_expression "*param_1 = (int)pbVar3" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (cast_expression "(int)pbVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pbVar3"))) (; ";")) (expression_statement "uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f);" (assignment_expression "uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f)" (identifier "uVar2") (= "=") (binary_expression "uVar2 * 0x40 + (pbVar3[-1] & 0x3f)" (binary_expression "uVar2 * 0x40" (identifier "uVar2") (* "*") (number_literal "0x40")) (+ "+") (parenthesized_expression "(pbVar3[-1] & 0x3f)" (( "(") (binary_expression "pbVar3[-1] & 0x3f" (subscript_expression "pbVar3[-1]" (identifier "pbVar3") ([ "[") (number_literal "-1") (] "]")) (& "&") (number_literal "0x3f")) () ")")))) (; ";")) (expression_statement "bVar1 = *pbVar3;" (assignment_expression "bVar1 = *pbVar3" (identifier "bVar1") (= "=") (pointer_expression "*pbVar3" (* "*") (identifier "pbVar3"))) (; ";")) (expression_statement "pbVar3 = pbVar3 + 1;" (assignment_expression "pbVar3 = pbVar3 + 1" (identifier "pbVar3") (= "=") (binary_expression "pbVar3 + 1" (identifier "pbVar3") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "((bVar1 & 0xc0) == 0x80)" (( "(") (binary_expression "(bVar1 & 0xc0) == 0x80" (parenthesized_expression "(bVar1 & 0xc0)" (( "(") (binary_expression "bVar1 & 0xc0" (identifier "bVar1") (& "&") (number_literal "0xc0")) () ")")) (== "==") (number_literal "0x80")) () ")")) (; ";")) (if_statement "if (((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)) || ((uVar2 & 0xfffffffe) == 0xfffe))\n      {\n        return 0xfffd;\n      }" (if "if") (parenthesized_expression "(((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)) || ((uVar2 & 0xfffffffe) == 0xfffe))" (( "(") (binary_expression "((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)) || ((uVar2 & 0xfffffffe) == 0xfffe)" (parenthesized_expression "((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800))" (( "(") (binary_expression "(uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)" (parenthesized_expression "(uVar2 < 0x80)" (( "(") (binary_expression "uVar2 < 0x80" (identifier "uVar2") (< "<") (number_literal "0x80")) () ")")) (|| "||") (parenthesized_expression "((uVar2 & 0xfffff800) == 0xd800)" (( "(") (binary_expression "(uVar2 & 0xfffff800) == 0xd800" (parenthesized_expression "(uVar2 & 0xfffff800)" (( "(") (binary_expression "uVar2 & 0xfffff800" (identifier "uVar2") (& "&") (number_literal "0xfffff800")) () ")")) (== "==") (number_literal "0xd800")) () ")"))) () ")")) (|| "||") (parenthesized_expression "((uVar2 & 0xfffffffe) == 0xfffe)" (( "(") (binary_expression "(uVar2 & 0xfffffffe) == 0xfffe" (parenthesized_expression "(uVar2 & 0xfffffffe)" (( "(") (binary_expression "uVar2 & 0xfffffffe" (identifier "uVar2") (& "&") (number_literal "0xfffffffe")) () ")")) (== "==") (number_literal "0xfffe")) () ")"))) () ")")) (compound_statement "{\n        return 0xfffd;\n      }" ({ "{") (return_statement "return 0xfffd;" (return "return") (number_literal "0xfffd") (; ";")) (} "}"))) (} "}")) (else_clause "else if (uVar2 < 0x80) {\n      return 0xfffd;\n    }" (else "else") (if_statement "if (uVar2 < 0x80) {\n      return 0xfffd;\n    }" (if "if") (parenthesized_expression "(uVar2 < 0x80)" (( "(") (binary_expression "uVar2 < 0x80" (identifier "uVar2") (< "<") (number_literal "0x80")) () ")")) (compound_statement "{\n      return 0xfffd;\n    }" ({ "{") (return_statement "return 0xfffd;" (return "return") (number_literal "0xfffd") (; ";")) (} "}"))))) (} "}"))) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}")))

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

type_1 __regparm3 function_1(type_2 **pz)

{
  type_3 var_3;
  type_1 var_2;
  type_3 *var_1;
  
  var_1 = *pz;
  *pz = var_1 + 1;
  var_2 = (type_1)*var_1;
  if (0xbf < var_2) {
    var_2 = (type_1)(&globInfo.matchAll)[var_2];
    if ((var_1[1] & 0xc0) == 0x80) {
      var_1 = var_1 + 2;
      do {
        *pz = var_1;
        var_2 = var_2 * 0x40 + (var_1[-1] & 0x3f);
        var_3 = *var_1;
        var_1 = var_1 + 1;
      } while ((var_3 & 0xc0) == 0x80);
      if (((var_2 < 0x80) || ((var_2 & 0xfffff800) == 0xd800)) || ((var_2 & 0xfffffffe) == 0xfffe))
      {
        return 0xfffd;
      }
    }
    else if (var_2 < 0x80) {
      return 0xfffd;
    }
  }
  return var_2;
}


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

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

uint __regparm3 MASKED(int *param_1)

{
  byte bVar1;
  uint uVar2;
  byte *pbVar3;
  
  pbVar3 = (byte *)*param_1;
  *param_1 = (int)(pbVar3 + 1);
  uVar2 = (uint)*pbVar3;
  if (0xbf < uVar2) {
    uVar2 = (uint)(byte)(&DAT_00104560)[uVar2];
    if ((pbVar3[1] & 0xc0) == 0x80) {
      pbVar3 = pbVar3 + 2;
      do {
        *param_1 = (int)pbVar3;
        uVar2 = uVar2 * 0x40 + (pbVar3[-1] & 0x3f);
        bVar1 = *pbVar3;
        pbVar3 = pbVar3 + 1;
      } while ((bVar1 & 0xc0) == 0x80);
      if (((uVar2 < 0x80) || ((uVar2 & 0xfffff800) == 0xd800)) || ((uVar2 & 0xfffffffe) == 0xfffe))
      {
        return 0xfffd;
      }
    }
    else if (uVar2 < 0x80) {
      return 0xfffd;
    }
  }
  return uVar2;
}

