
/* WARNING: Function: __x86.get_pc_thunk.si replaced with injection: get_pc_thunk_si */
/* bool std::(anonymous namespace)::write_utf16_bom<false>(std::(anonymous
   namespace)::range<char16_t, false>&, std::codecvt_mode) */

bool __regparm3 std::(anonymous_namespace)::write_utf16_bom<false>(int *param_1,uint param_2)

{
  undefined2 *puVar1;
  bool bVar2;
  
  if ((param_2 & 2) == 0) {
    bVar2 = true;
  }
  else {
    puVar1 = (undefined2 *)*param_1;
    bVar2 = false;
    if ((param_2 & 1) == 0) {
      if (1 < (uint)(param_1[1] - (int)puVar1)) {
        *puVar1 = utf16_bom;
        *param_1 = *param_1 + 2;
        return true;
      }
    }
    else if (1 < (uint)(param_1[1] - (int)puVar1)) {
      *puVar1 = utf16le_bom;
      *param_1 = *param_1 + 2;
      return true;
    }
  }
  return bVar2;
}



/* WARNING: Function: __i686.get_pc_thunk.si replaced with injection: get_pc_thunk_si */

undefined4 __regparm3 FUN_00286480(int *param_1,uint param_2)

{
  undefined2 *puVar1;
  undefined4 uVar2;
  
  if ((param_2 & 2) == 0) {
    uVar2 = 1;
  }
  else {
    puVar1 = (undefined2 *)*param_1;
    uVar2 = 0;
    if ((param_2 & 1) == 0) {
      if (1 < (uint)(param_1[1] - (int)puVar1)) {
        *puVar1 = DAT_002c3543;
        *param_1 = *param_1 + 2;
        return 1;
      }
    }
    else if (1 < (uint)(param_1[1] - (int)puVar1)) {
      *puVar1 = DAT_002c3541;
      *param_1 = *param_1 + 2;
      return 1;
    }
  }
  return uVar2;
}


PUSH EDI
PUSH ESI
CALL 0x0004a046
ADD ESI,0x128b79
PUSH EBX
TEST DL,0x2
JZ 0x002864c0
MOV EDI,dword ptr [EAX]
MOV EBX,dword ptr [EAX + 0x4]
MOV ECX,EAX
XOR EAX,EAX
SUB EBX,EDI
AND EDX,0x1
JZ 0x002864d0
CMP EBX,0x1
JBE 0x002864c5
MOVZX EAX,word ptr [ESI + 0xfff14541]
MOV word ptr [EDI],AX
MOV EAX,0x1
ADD dword ptr [ECX],0x2
POP EBX
POP ESI
POP EDI
RET
MOV EAX,0x1
POP EBX
POP ESI
POP EDI
RET
CMP EBX,0x1
JBE 0x002864c5
MOVZX EAX,word ptr [ESI + 0xfff14543]
MOV word ptr [EDI],AX
MOV EAX,0x1
ADD dword ptr [ECX],0x2
POP EBX
POP ESI
POP EDI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.si replaced with injection: get_pc_thunk_si */\n\nundefined4 __regparm3 FUN_00286480(int *param_1,uint param_2)\n\n{\n  undefined2 *puVar1;\n  undefined4 uVar2;\n  \n  if ((param_2 & 2) == 0) {\n    uVar2 = 1;\n  }\n  else {\n    puVar1 = (undefined2 *)*param_1;\n    uVar2 = 0;\n    if ((param_2 & 1) == 0) {\n      if (1 < (uint)(param_1[1] - (int)puVar1)) {\n        *puVar1 = DAT_002c3543;\n        *param_1 = *param_1 + 2;\n        return 1;\n      }\n    }\n    else if (1 < (uint)(param_1[1] - (int)puVar1)) {\n      *puVar1 = DAT_002c3541;\n      *param_1 = *param_1 + 2;\n      return 1;\n    }\n  }\n  return uVar2;\n}\n\n" comment (function_definition "undefined4 __regparm3 FUN_00286480(int *param_1,uint param_2)\n\n{\n  undefined2 *puVar1;\n  undefined4 uVar2;\n  \n  if ((param_2 & 2) == 0) {\n    uVar2 = 1;\n  }\n  else {\n    puVar1 = (undefined2 *)*param_1;\n    uVar2 = 0;\n    if ((param_2 & 1) == 0) {\n      if (1 < (uint)(param_1[1] - (int)puVar1)) {\n        *puVar1 = DAT_002c3543;\n        *param_1 = *param_1 + 2;\n        return 1;\n      }\n    }\n    else if (1 < (uint)(param_1[1] - (int)puVar1)) {\n      *puVar1 = DAT_002c3541;\n      *param_1 = *param_1 + 2;\n      return 1;\n    }\n  }\n  return uVar2;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_00286480(int *param_1,uint param_2)" identifier (parameter_list "(int *param_1,uint param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  undefined2 *puVar1;\n  undefined4 uVar2;\n  \n  if ((param_2 & 2) == 0) {\n    uVar2 = 1;\n  }\n  else {\n    puVar1 = (undefined2 *)*param_1;\n    uVar2 = 0;\n    if ((param_2 & 1) == 0) {\n      if (1 < (uint)(param_1[1] - (int)puVar1)) {\n        *puVar1 = DAT_002c3543;\n        *param_1 = *param_1 + 2;\n        return 1;\n      }\n    }\n    else if (1 < (uint)(param_1[1] - (int)puVar1)) {\n      *puVar1 = DAT_002c3541;\n      *param_1 = *param_1 + 2;\n      return 1;\n    }\n  }\n  return uVar2;\n}" { (declaration "undefined2 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (if_statement "if ((param_2 & 2) == 0) {\n    uVar2 = 1;\n  }\n  else {\n    puVar1 = (undefined2 *)*param_1;\n    uVar2 = 0;\n    if ((param_2 & 1) == 0) {\n      if (1 < (uint)(param_1[1] - (int)puVar1)) {\n        *puVar1 = DAT_002c3543;\n        *param_1 = *param_1 + 2;\n        return 1;\n      }\n    }\n    else if (1 < (uint)(param_1[1] - (int)puVar1)) {\n      *puVar1 = DAT_002c3541;\n      *param_1 = *param_1 + 2;\n      return 1;\n    }\n  }" if (parenthesized_expression "((param_2 & 2) == 0)" ( (binary_expression "(param_2 & 2) == 0" (parenthesized_expression "(param_2 & 2)" ( (binary_expression "param_2 & 2" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n    uVar2 = 1;\n  }" { (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" identifier = number_literal) ;) }) (else_clause "else {\n    puVar1 = (undefined2 *)*param_1;\n    uVar2 = 0;\n    if ((param_2 & 1) == 0) {\n      if (1 < (uint)(param_1[1] - (int)puVar1)) {\n        *puVar1 = DAT_002c3543;\n        *param_1 = *param_1 + 2;\n        return 1;\n      }\n    }\n    else if (1 < (uint)(param_1[1] - (int)puVar1)) {\n      *puVar1 = DAT_002c3541;\n      *param_1 = *param_1 + 2;\n      return 1;\n    }\n  }" else (compound_statement "{\n    puVar1 = (undefined2 *)*param_1;\n    uVar2 = 0;\n    if ((param_2 & 1) == 0) {\n      if (1 < (uint)(param_1[1] - (int)puVar1)) {\n        *puVar1 = DAT_002c3543;\n        *param_1 = *param_1 + 2;\n        return 1;\n      }\n    }\n    else if (1 < (uint)(param_1[1] - (int)puVar1)) {\n      *puVar1 = DAT_002c3541;\n      *param_1 = *param_1 + 2;\n      return 1;\n    }\n  }" { (expression_statement "puVar1 = (undefined2 *)*param_1;" (assignment_expression "puVar1 = (undefined2 *)*param_1" identifier = (cast_expression "(undefined2 *)*param_1" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (if_statement "if ((param_2 & 1) == 0) {\n      if (1 < (uint)(param_1[1] - (int)puVar1)) {\n        *puVar1 = DAT_002c3543;\n        *param_1 = *param_1 + 2;\n        return 1;\n      }\n    }\n    else if (1 < (uint)(param_1[1] - (int)puVar1)) {\n      *puVar1 = DAT_002c3541;\n      *param_1 = *param_1 + 2;\n      return 1;\n    }" if (parenthesized_expression "((param_2 & 1) == 0)" ( (binary_expression "(param_2 & 1) == 0" (parenthesized_expression "(param_2 & 1)" ( (binary_expression "param_2 & 1" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n      if (1 < (uint)(param_1[1] - (int)puVar1)) {\n        *puVar1 = DAT_002c3543;\n        *param_1 = *param_1 + 2;\n        return 1;\n      }\n    }" { (if_statement "if (1 < (uint)(param_1[1] - (int)puVar1)) {\n        *puVar1 = DAT_002c3543;\n        *param_1 = *param_1 + 2;\n        return 1;\n      }" if (parenthesized_expression "(1 < (uint)(param_1[1] - (int)puVar1))" ( (binary_expression "1 < (uint)(param_1[1] - (int)puVar1)" number_literal < (call_expression "(uint)(param_1[1] - (int)puVar1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_1[1] - (int)puVar1)" ( (binary_expression "param_1[1] - (int)puVar1" (subscript_expression "param_1[1]" identifier [ number_literal ]) - (cast_expression "(int)puVar1" ( (type_descriptor "int" primitive_type) ) identifier)) )))) )) (compound_statement "{\n        *puVar1 = DAT_002c3543;\n        *param_1 = *param_1 + 2;\n        return 1;\n      }" { (expression_statement "*puVar1 = DAT_002c3543;" (assignment_expression "*puVar1 = DAT_002c3543" (pointer_expression "*puVar1" * identifier) = identifier) ;) (expression_statement "*param_1 = *param_1 + 2;" (assignment_expression "*param_1 = *param_1 + 2" (pointer_expression "*param_1" * identifier) = (binary_expression "*param_1 + 2" (pointer_expression "*param_1" * identifier) + number_literal)) ;) (return_statement "return 1;" return number_literal ;) })) }) (else_clause "else if (1 < (uint)(param_1[1] - (int)puVar1)) {\n      *puVar1 = DAT_002c3541;\n      *param_1 = *param_1 + 2;\n      return 1;\n    }" else (if_statement "if (1 < (uint)(param_1[1] - (int)puVar1)) {\n      *puVar1 = DAT_002c3541;\n      *param_1 = *param_1 + 2;\n      return 1;\n    }" if (parenthesized_expression "(1 < (uint)(param_1[1] - (int)puVar1))" ( (binary_expression "1 < (uint)(param_1[1] - (int)puVar1)" number_literal < (call_expression "(uint)(param_1[1] - (int)puVar1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_1[1] - (int)puVar1)" ( (binary_expression "param_1[1] - (int)puVar1" (subscript_expression "param_1[1]" identifier [ number_literal ]) - (cast_expression "(int)puVar1" ( (type_descriptor "int" primitive_type) ) identifier)) )))) )) (compound_statement "{\n      *puVar1 = DAT_002c3541;\n      *param_1 = *param_1 + 2;\n      return 1;\n    }" { (expression_statement "*puVar1 = DAT_002c3541;" (assignment_expression "*puVar1 = DAT_002c3541" (pointer_expression "*puVar1" * identifier) = identifier) ;) (expression_statement "*param_1 = *param_1 + 2;" (assignment_expression "*param_1 = *param_1 + 2" (pointer_expression "*param_1" * identifier) = (binary_expression "*param_1 + 2" (pointer_expression "*param_1" * identifier) + number_literal)) ;) (return_statement "return 1;" return number_literal ;) })))) }))) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.si replaced with injection: get_pc_thunk_si */\n/* bool std::(anonymous namespace)::write_utf16_bom<false>(std::(anonymous\n   namespace)::range<char16_t, false>&, std::codecvt_mode) */\n\nbool __regparm3 std::(anonymous_namespace)::write_utf16_bom<false>(int *param_1,uint param_2)\n\n{\n  undefined2 *puVar1;\n  bool bVar2;\n  \n  if ((param_2 & 2) == 0) {\n    bVar2 = true;\n  }\n  else {\n    puVar1 = (undefined2 *)*param_1;\n    bVar2 = false;\n    if ((param_2 & 1) == 0) {\n      if (1 < (uint)(param_1[1] - (int)puVar1)) {\n        *puVar1 = utf16_bom;\n        *param_1 = *param_1 + 2;\n        return true;\n      }\n    }\n    else if (1 < (uint)(param_1[1] - (int)puVar1)) {\n      *puVar1 = utf16le_bom;\n      *param_1 = *param_1 + 2;\n      return true;\n    }\n  }\n  return bVar2;\n}\n\n" comment comment (declaration "bool __regparm3" primitive_type identifier ;) (labeled_statement "std::(anonymous_namespace)::write_utf16_bom<false>(int *param_1,uint param_2)" statement_identifier (ERROR "::(anonymous_namespace):" : : (parenthesized_expression "(anonymous_namespace)" ( identifier )) :) : (expression_statement "write_utf16_bom<false>(int *param_1,uint param_2)" (binary_expression "write_utf16_bom<false>(int *param_1,uint param_2)" (binary_expression "write_utf16_bom<false" identifier < false) > (parenthesized_expression "(int *param_1,uint param_2)" ( (ERROR "int *" (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *))) (comma_expression "param_1,uint param_2" identifier , (ERROR "uint" identifier) identifier) ))) ;)) (compound_statement "{\n  undefined2 *puVar1;\n  bool bVar2;\n  \n  if ((param_2 & 2) == 0) {\n    bVar2 = true;\n  }\n  else {\n    puVar1 = (undefined2 *)*param_1;\n    bVar2 = false;\n    if ((param_2 & 1) == 0) {\n      if (1 < (uint)(param_1[1] - (int)puVar1)) {\n        *puVar1 = utf16_bom;\n        *param_1 = *param_1 + 2;\n        return true;\n      }\n    }\n    else if (1 < (uint)(param_1[1] - (int)puVar1)) {\n      *puVar1 = utf16le_bom;\n      *param_1 = *param_1 + 2;\n      return true;\n    }\n  }\n  return bVar2;\n}" { (declaration "undefined2 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "bool bVar2;" primitive_type identifier ;) (if_statement "if ((param_2 & 2) == 0) {\n    bVar2 = true;\n  }\n  else {\n    puVar1 = (undefined2 *)*param_1;\n    bVar2 = false;\n    if ((param_2 & 1) == 0) {\n      if (1 < (uint)(param_1[1] - (int)puVar1)) {\n        *puVar1 = utf16_bom;\n        *param_1 = *param_1 + 2;\n        return true;\n      }\n    }\n    else if (1 < (uint)(param_1[1] - (int)puVar1)) {\n      *puVar1 = utf16le_bom;\n      *param_1 = *param_1 + 2;\n      return true;\n    }\n  }" if (parenthesized_expression "((param_2 & 2) == 0)" ( (binary_expression "(param_2 & 2) == 0" (parenthesized_expression "(param_2 & 2)" ( (binary_expression "param_2 & 2" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n    bVar2 = true;\n  }" { (expression_statement "bVar2 = true;" (assignment_expression "bVar2 = true" identifier = true) ;) }) (else_clause "else {\n    puVar1 = (undefined2 *)*param_1;\n    bVar2 = false;\n    if ((param_2 & 1) == 0) {\n      if (1 < (uint)(param_1[1] - (int)puVar1)) {\n        *puVar1 = utf16_bom;\n        *param_1 = *param_1 + 2;\n        return true;\n      }\n    }\n    else if (1 < (uint)(param_1[1] - (int)puVar1)) {\n      *puVar1 = utf16le_bom;\n      *param_1 = *param_1 + 2;\n      return true;\n    }\n  }" else (compound_statement "{\n    puVar1 = (undefined2 *)*param_1;\n    bVar2 = false;\n    if ((param_2 & 1) == 0) {\n      if (1 < (uint)(param_1[1] - (int)puVar1)) {\n        *puVar1 = utf16_bom;\n        *param_1 = *param_1 + 2;\n        return true;\n      }\n    }\n    else if (1 < (uint)(param_1[1] - (int)puVar1)) {\n      *puVar1 = utf16le_bom;\n      *param_1 = *param_1 + 2;\n      return true;\n    }\n  }" { (expression_statement "puVar1 = (undefined2 *)*param_1;" (assignment_expression "puVar1 = (undefined2 *)*param_1" identifier = (cast_expression "(undefined2 *)*param_1" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (expression_statement "bVar2 = false;" (assignment_expression "bVar2 = false" identifier = false) ;) (if_statement "if ((param_2 & 1) == 0) {\n      if (1 < (uint)(param_1[1] - (int)puVar1)) {\n        *puVar1 = utf16_bom;\n        *param_1 = *param_1 + 2;\n        return true;\n      }\n    }\n    else if (1 < (uint)(param_1[1] - (int)puVar1)) {\n      *puVar1 = utf16le_bom;\n      *param_1 = *param_1 + 2;\n      return true;\n    }" if (parenthesized_expression "((param_2 & 1) == 0)" ( (binary_expression "(param_2 & 1) == 0" (parenthesized_expression "(param_2 & 1)" ( (binary_expression "param_2 & 1" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n      if (1 < (uint)(param_1[1] - (int)puVar1)) {\n        *puVar1 = utf16_bom;\n        *param_1 = *param_1 + 2;\n        return true;\n      }\n    }" { (if_statement "if (1 < (uint)(param_1[1] - (int)puVar1)) {\n        *puVar1 = utf16_bom;\n        *param_1 = *param_1 + 2;\n        return true;\n      }" if (parenthesized_expression "(1 < (uint)(param_1[1] - (int)puVar1))" ( (binary_expression "1 < (uint)(param_1[1] - (int)puVar1)" number_literal < (call_expression "(uint)(param_1[1] - (int)puVar1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_1[1] - (int)puVar1)" ( (binary_expression "param_1[1] - (int)puVar1" (subscript_expression "param_1[1]" identifier [ number_literal ]) - (cast_expression "(int)puVar1" ( (type_descriptor "int" primitive_type) ) identifier)) )))) )) (compound_statement "{\n        *puVar1 = utf16_bom;\n        *param_1 = *param_1 + 2;\n        return true;\n      }" { (expression_statement "*puVar1 = utf16_bom;" (assignment_expression "*puVar1 = utf16_bom" (pointer_expression "*puVar1" * identifier) = identifier) ;) (expression_statement "*param_1 = *param_1 + 2;" (assignment_expression "*param_1 = *param_1 + 2" (pointer_expression "*param_1" * identifier) = (binary_expression "*param_1 + 2" (pointer_expression "*param_1" * identifier) + number_literal)) ;) (return_statement "return true;" return true ;) })) }) (else_clause "else if (1 < (uint)(param_1[1] - (int)puVar1)) {\n      *puVar1 = utf16le_bom;\n      *param_1 = *param_1 + 2;\n      return true;\n    }" else (if_statement "if (1 < (uint)(param_1[1] - (int)puVar1)) {\n      *puVar1 = utf16le_bom;\n      *param_1 = *param_1 + 2;\n      return true;\n    }" if (parenthesized_expression "(1 < (uint)(param_1[1] - (int)puVar1))" ( (binary_expression "1 < (uint)(param_1[1] - (int)puVar1)" number_literal < (call_expression "(uint)(param_1[1] - (int)puVar1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_1[1] - (int)puVar1)" ( (binary_expression "param_1[1] - (int)puVar1" (subscript_expression "param_1[1]" identifier [ number_literal ]) - (cast_expression "(int)puVar1" ( (type_descriptor "int" primitive_type) ) identifier)) )))) )) (compound_statement "{\n      *puVar1 = utf16le_bom;\n      *param_1 = *param_1 + 2;\n      return true;\n    }" { (expression_statement "*puVar1 = utf16le_bom;" (assignment_expression "*puVar1 = utf16le_bom" (pointer_expression "*puVar1" * identifier) = identifier) ;) (expression_statement "*param_1 = *param_1 + 2;" (assignment_expression "*param_1 = *param_1 + 2" (pointer_expression "*param_1" * identifier) = (binary_expression "*param_1 + 2" (pointer_expression "*param_1" * identifier) + number_literal)) ;) (return_statement "return true;" return true ;) })))) }))) (return_statement "return bVar2;" return identifier ;) }))
(translation_unit "undefined4 __regparm3 FUN_00286480(int *param_1,uint param_2)\n\n{\n  undefined2 *puVar1;\n  undefined4 uVar2;\n  \n  if ((param_2 & 2) == 0) {\n    uVar2 = 1;\n  }\n  else {\n    puVar1 = (undefined2 *)*param_1;\n    uVar2 = 0;\n    if ((param_2 & 1) == 0) {\n      if (1 < (uint)(param_1[1] - (int)puVar1)) {\n        *puVar1 = DAT_002c3543;\n        *param_1 = *param_1 + 2;\n        return 1;\n      }\n    }\n    else if (1 < (uint)(param_1[1] - (int)puVar1)) {\n      *puVar1 = DAT_002c3541;\n      *param_1 = *param_1 + 2;\n      return 1;\n    }\n  }\n  return uVar2;\n}\n\n" (function_definition "undefined4 __regparm3 FUN_00286480(int *param_1,uint param_2)\n\n{\n  undefined2 *puVar1;\n  undefined4 uVar2;\n  \n  if ((param_2 & 2) == 0) {\n    uVar2 = 1;\n  }\n  else {\n    puVar1 = (undefined2 *)*param_1;\n    uVar2 = 0;\n    if ((param_2 & 1) == 0) {\n      if (1 < (uint)(param_1[1] - (int)puVar1)) {\n        *puVar1 = DAT_002c3543;\n        *param_1 = *param_1 + 2;\n        return 1;\n      }\n    }\n    else if (1 < (uint)(param_1[1] - (int)puVar1)) {\n      *puVar1 = DAT_002c3541;\n      *param_1 = *param_1 + 2;\n      return 1;\n    }\n  }\n  return uVar2;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_00286480(int *param_1,uint param_2)" identifier (parameter_list "(int *param_1,uint param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  undefined2 *puVar1;\n  undefined4 uVar2;\n  \n  if ((param_2 & 2) == 0) {\n    uVar2 = 1;\n  }\n  else {\n    puVar1 = (undefined2 *)*param_1;\n    uVar2 = 0;\n    if ((param_2 & 1) == 0) {\n      if (1 < (uint)(param_1[1] - (int)puVar1)) {\n        *puVar1 = DAT_002c3543;\n        *param_1 = *param_1 + 2;\n        return 1;\n      }\n    }\n    else if (1 < (uint)(param_1[1] - (int)puVar1)) {\n      *puVar1 = DAT_002c3541;\n      *param_1 = *param_1 + 2;\n      return 1;\n    }\n  }\n  return uVar2;\n}" { (declaration "undefined2 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (if_statement "if ((param_2 & 2) == 0) {\n    uVar2 = 1;\n  }\n  else {\n    puVar1 = (undefined2 *)*param_1;\n    uVar2 = 0;\n    if ((param_2 & 1) == 0) {\n      if (1 < (uint)(param_1[1] - (int)puVar1)) {\n        *puVar1 = DAT_002c3543;\n        *param_1 = *param_1 + 2;\n        return 1;\n      }\n    }\n    else if (1 < (uint)(param_1[1] - (int)puVar1)) {\n      *puVar1 = DAT_002c3541;\n      *param_1 = *param_1 + 2;\n      return 1;\n    }\n  }" if (parenthesized_expression "((param_2 & 2) == 0)" ( (binary_expression "(param_2 & 2) == 0" (parenthesized_expression "(param_2 & 2)" ( (binary_expression "param_2 & 2" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n    uVar2 = 1;\n  }" { (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" identifier = number_literal) ;) }) (else_clause "else {\n    puVar1 = (undefined2 *)*param_1;\n    uVar2 = 0;\n    if ((param_2 & 1) == 0) {\n      if (1 < (uint)(param_1[1] - (int)puVar1)) {\n        *puVar1 = DAT_002c3543;\n        *param_1 = *param_1 + 2;\n        return 1;\n      }\n    }\n    else if (1 < (uint)(param_1[1] - (int)puVar1)) {\n      *puVar1 = DAT_002c3541;\n      *param_1 = *param_1 + 2;\n      return 1;\n    }\n  }" else (compound_statement "{\n    puVar1 = (undefined2 *)*param_1;\n    uVar2 = 0;\n    if ((param_2 & 1) == 0) {\n      if (1 < (uint)(param_1[1] - (int)puVar1)) {\n        *puVar1 = DAT_002c3543;\n        *param_1 = *param_1 + 2;\n        return 1;\n      }\n    }\n    else if (1 < (uint)(param_1[1] - (int)puVar1)) {\n      *puVar1 = DAT_002c3541;\n      *param_1 = *param_1 + 2;\n      return 1;\n    }\n  }" { (expression_statement "puVar1 = (undefined2 *)*param_1;" (assignment_expression "puVar1 = (undefined2 *)*param_1" identifier = (cast_expression "(undefined2 *)*param_1" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (if_statement "if ((param_2 & 1) == 0) {\n      if (1 < (uint)(param_1[1] - (int)puVar1)) {\n        *puVar1 = DAT_002c3543;\n        *param_1 = *param_1 + 2;\n        return 1;\n      }\n    }\n    else if (1 < (uint)(param_1[1] - (int)puVar1)) {\n      *puVar1 = DAT_002c3541;\n      *param_1 = *param_1 + 2;\n      return 1;\n    }" if (parenthesized_expression "((param_2 & 1) == 0)" ( (binary_expression "(param_2 & 1) == 0" (parenthesized_expression "(param_2 & 1)" ( (binary_expression "param_2 & 1" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n      if (1 < (uint)(param_1[1] - (int)puVar1)) {\n        *puVar1 = DAT_002c3543;\n        *param_1 = *param_1 + 2;\n        return 1;\n      }\n    }" { (if_statement "if (1 < (uint)(param_1[1] - (int)puVar1)) {\n        *puVar1 = DAT_002c3543;\n        *param_1 = *param_1 + 2;\n        return 1;\n      }" if (parenthesized_expression "(1 < (uint)(param_1[1] - (int)puVar1))" ( (binary_expression "1 < (uint)(param_1[1] - (int)puVar1)" number_literal < (call_expression "(uint)(param_1[1] - (int)puVar1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_1[1] - (int)puVar1)" ( (binary_expression "param_1[1] - (int)puVar1" (subscript_expression "param_1[1]" identifier [ number_literal ]) - (cast_expression "(int)puVar1" ( (type_descriptor "int" primitive_type) ) identifier)) )))) )) (compound_statement "{\n        *puVar1 = DAT_002c3543;\n        *param_1 = *param_1 + 2;\n        return 1;\n      }" { (expression_statement "*puVar1 = DAT_002c3543;" (assignment_expression "*puVar1 = DAT_002c3543" (pointer_expression "*puVar1" * identifier) = identifier) ;) (expression_statement "*param_1 = *param_1 + 2;" (assignment_expression "*param_1 = *param_1 + 2" (pointer_expression "*param_1" * identifier) = (binary_expression "*param_1 + 2" (pointer_expression "*param_1" * identifier) + number_literal)) ;) (return_statement "return 1;" return number_literal ;) })) }) (else_clause "else if (1 < (uint)(param_1[1] - (int)puVar1)) {\n      *puVar1 = DAT_002c3541;\n      *param_1 = *param_1 + 2;\n      return 1;\n    }" else (if_statement "if (1 < (uint)(param_1[1] - (int)puVar1)) {\n      *puVar1 = DAT_002c3541;\n      *param_1 = *param_1 + 2;\n      return 1;\n    }" if (parenthesized_expression "(1 < (uint)(param_1[1] - (int)puVar1))" ( (binary_expression "1 < (uint)(param_1[1] - (int)puVar1)" number_literal < (call_expression "(uint)(param_1[1] - (int)puVar1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_1[1] - (int)puVar1)" ( (binary_expression "param_1[1] - (int)puVar1" (subscript_expression "param_1[1]" identifier [ number_literal ]) - (cast_expression "(int)puVar1" ( (type_descriptor "int" primitive_type) ) identifier)) )))) )) (compound_statement "{\n      *puVar1 = DAT_002c3541;\n      *param_1 = *param_1 + 2;\n      return 1;\n    }" { (expression_statement "*puVar1 = DAT_002c3541;" (assignment_expression "*puVar1 = DAT_002c3541" (pointer_expression "*puVar1" * identifier) = identifier) ;) (expression_statement "*param_1 = *param_1 + 2;" (assignment_expression "*param_1 = *param_1 + 2" (pointer_expression "*param_1" * identifier) = (binary_expression "*param_1 + 2" (pointer_expression "*param_1" * identifier) + number_literal)) ;) (return_statement "return 1;" 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)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression LIT < (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (subscript_expression IDENT [ LIT ]) - (cast_expression ( (type_descriptor TYPE) ) IDENT)) )))) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (pointer_expression * IDENT) + LIT)) ;) (return_statement return LIT ;) })) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression LIT < (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (subscript_expression IDENT [ LIT ]) - (cast_expression ( (type_descriptor TYPE) ) IDENT)) )))) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (pointer_expression * IDENT) + LIT)) ;) (return_statement return LIT ;) })))) }))) (return_statement return IDENT ;) })))
(function_definition "undefined4 __regparm3 FUN_00286480(int *param_1,uint param_2)\n\n{\n  undefined2 *puVar1;\n  undefined4 uVar2;\n  \n  if ((param_2 & 2) == 0) {\n    uVar2 = 1;\n  }\n  else {\n    puVar1 = (undefined2 *)*param_1;\n    uVar2 = 0;\n    if ((param_2 & 1) == 0) {\n      if (1 < (uint)(param_1[1] - (int)puVar1)) {\n        *puVar1 = DAT_002c3543;\n        *param_1 = *param_1 + 2;\n        return 1;\n      }\n    }\n    else if (1 < (uint)(param_1[1] - (int)puVar1)) {\n      *puVar1 = DAT_002c3541;\n      *param_1 = *param_1 + 2;\n      return 1;\n    }\n  }\n  return uVar2;\n}" (type_identifier "undefined4") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00286480(int *param_1,uint param_2)" (identifier "FUN_00286480") (parameter_list "(int *param_1,uint param_2)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) () ")"))) (compound_statement "{\n  undefined2 *puVar1;\n  undefined4 uVar2;\n  \n  if ((param_2 & 2) == 0) {\n    uVar2 = 1;\n  }\n  else {\n    puVar1 = (undefined2 *)*param_1;\n    uVar2 = 0;\n    if ((param_2 & 1) == 0) {\n      if (1 < (uint)(param_1[1] - (int)puVar1)) {\n        *puVar1 = DAT_002c3543;\n        *param_1 = *param_1 + 2;\n        return 1;\n      }\n    }\n    else if (1 < (uint)(param_1[1] - (int)puVar1)) {\n      *puVar1 = DAT_002c3541;\n      *param_1 = *param_1 + 2;\n      return 1;\n    }\n  }\n  return uVar2;\n}" ({ "{") (declaration "undefined2 *puVar1;" (type_identifier "undefined2") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (if_statement "if ((param_2 & 2) == 0) {\n    uVar2 = 1;\n  }\n  else {\n    puVar1 = (undefined2 *)*param_1;\n    uVar2 = 0;\n    if ((param_2 & 1) == 0) {\n      if (1 < (uint)(param_1[1] - (int)puVar1)) {\n        *puVar1 = DAT_002c3543;\n        *param_1 = *param_1 + 2;\n        return 1;\n      }\n    }\n    else if (1 < (uint)(param_1[1] - (int)puVar1)) {\n      *puVar1 = DAT_002c3541;\n      *param_1 = *param_1 + 2;\n      return 1;\n    }\n  }" (if "if") (parenthesized_expression "((param_2 & 2) == 0)" (( "(") (binary_expression "(param_2 & 2) == 0" (parenthesized_expression "(param_2 & 2)" (( "(") (binary_expression "param_2 & 2" (identifier "param_2") (& "&") (number_literal "2")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    uVar2 = 1;\n  }" ({ "{") (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" (identifier "uVar2") (= "=") (number_literal "1")) (; ";")) (} "}")) (else_clause "else {\n    puVar1 = (undefined2 *)*param_1;\n    uVar2 = 0;\n    if ((param_2 & 1) == 0) {\n      if (1 < (uint)(param_1[1] - (int)puVar1)) {\n        *puVar1 = DAT_002c3543;\n        *param_1 = *param_1 + 2;\n        return 1;\n      }\n    }\n    else if (1 < (uint)(param_1[1] - (int)puVar1)) {\n      *puVar1 = DAT_002c3541;\n      *param_1 = *param_1 + 2;\n      return 1;\n    }\n  }" (else "else") (compound_statement "{\n    puVar1 = (undefined2 *)*param_1;\n    uVar2 = 0;\n    if ((param_2 & 1) == 0) {\n      if (1 < (uint)(param_1[1] - (int)puVar1)) {\n        *puVar1 = DAT_002c3543;\n        *param_1 = *param_1 + 2;\n        return 1;\n      }\n    }\n    else if (1 < (uint)(param_1[1] - (int)puVar1)) {\n      *puVar1 = DAT_002c3541;\n      *param_1 = *param_1 + 2;\n      return 1;\n    }\n  }" ({ "{") (expression_statement "puVar1 = (undefined2 *)*param_1;" (assignment_expression "puVar1 = (undefined2 *)*param_1" (identifier "puVar1") (= "=") (cast_expression "(undefined2 *)*param_1" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" (identifier "uVar2") (= "=") (number_literal "0")) (; ";")) (if_statement "if ((param_2 & 1) == 0) {\n      if (1 < (uint)(param_1[1] - (int)puVar1)) {\n        *puVar1 = DAT_002c3543;\n        *param_1 = *param_1 + 2;\n        return 1;\n      }\n    }\n    else if (1 < (uint)(param_1[1] - (int)puVar1)) {\n      *puVar1 = DAT_002c3541;\n      *param_1 = *param_1 + 2;\n      return 1;\n    }" (if "if") (parenthesized_expression "((param_2 & 1) == 0)" (( "(") (binary_expression "(param_2 & 1) == 0" (parenthesized_expression "(param_2 & 1)" (( "(") (binary_expression "param_2 & 1" (identifier "param_2") (& "&") (number_literal "1")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      if (1 < (uint)(param_1[1] - (int)puVar1)) {\n        *puVar1 = DAT_002c3543;\n        *param_1 = *param_1 + 2;\n        return 1;\n      }\n    }" ({ "{") (if_statement "if (1 < (uint)(param_1[1] - (int)puVar1)) {\n        *puVar1 = DAT_002c3543;\n        *param_1 = *param_1 + 2;\n        return 1;\n      }" (if "if") (parenthesized_expression "(1 < (uint)(param_1[1] - (int)puVar1))" (( "(") (binary_expression "1 < (uint)(param_1[1] - (int)puVar1)" (number_literal "1") (< "<") (call_expression "(uint)(param_1[1] - (int)puVar1)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(param_1[1] - (int)puVar1)" (( "(") (binary_expression "param_1[1] - (int)puVar1" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (- "-") (cast_expression "(int)puVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar1"))) () ")")))) () ")")) (compound_statement "{\n        *puVar1 = DAT_002c3543;\n        *param_1 = *param_1 + 2;\n        return 1;\n      }" ({ "{") (expression_statement "*puVar1 = DAT_002c3543;" (assignment_expression "*puVar1 = DAT_002c3543" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (= "=") (identifier "DAT_002c3543")) (; ";")) (expression_statement "*param_1 = *param_1 + 2;" (assignment_expression "*param_1 = *param_1 + 2" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (binary_expression "*param_1 + 2" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "2"))) (; ";")) (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (} "}")) (else_clause "else if (1 < (uint)(param_1[1] - (int)puVar1)) {\n      *puVar1 = DAT_002c3541;\n      *param_1 = *param_1 + 2;\n      return 1;\n    }" (else "else") (if_statement "if (1 < (uint)(param_1[1] - (int)puVar1)) {\n      *puVar1 = DAT_002c3541;\n      *param_1 = *param_1 + 2;\n      return 1;\n    }" (if "if") (parenthesized_expression "(1 < (uint)(param_1[1] - (int)puVar1))" (( "(") (binary_expression "1 < (uint)(param_1[1] - (int)puVar1)" (number_literal "1") (< "<") (call_expression "(uint)(param_1[1] - (int)puVar1)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(param_1[1] - (int)puVar1)" (( "(") (binary_expression "param_1[1] - (int)puVar1" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (- "-") (cast_expression "(int)puVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar1"))) () ")")))) () ")")) (compound_statement "{\n      *puVar1 = DAT_002c3541;\n      *param_1 = *param_1 + 2;\n      return 1;\n    }" ({ "{") (expression_statement "*puVar1 = DAT_002c3541;" (assignment_expression "*puVar1 = DAT_002c3541" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (= "=") (identifier "DAT_002c3541")) (; ";")) (expression_statement "*param_1 = *param_1 + 2;" (assignment_expression "*param_1 = *param_1 + 2" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (binary_expression "*param_1 + 2" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "2"))) (; ";")) (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))))) (} "}")))) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.si replaced with injection: get_pc_thunk_si */
/* bool std::(anonymous namespace)::write_utf16_bom<false>(std::(anonymous
   namespace)::range<char16_t, false>&, std::codecvt_mode) */

bool __regparm3 std::(anonymous_namespace)::var_1<false>(int *param_1,uint var_2)

{
  type_1 *puVar1;
  bool bVar2;
  
  if ((var_2 & 2) == 0) {
    bVar2 = true;
  }
  else {
    puVar1 = (type_1 *)*param_1;
    bVar2 = false;
    if ((var_2 & 1) == 0) {
      if (1 < (uint)(param_1[1] - (int)puVar1)) {
        *puVar1 = utf16_bom;
        *param_1 = *param_1 + 2;
        return true;
      }
    }
    else if (1 < (uint)(param_1[1] - (int)puVar1)) {
      *puVar1 = utf16le_bom;
      *param_1 = *param_1 + 2;
      return true;
    }
  }
  return bVar2;
}


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

/* WARNING: Function: __i686.get_pc_thunk.si replaced with injection: get_pc_thunk_si */

undefined4 __regparm3 MASKED(int *param_1,uint param_2)

{
  undefined2 *puVar1;
  undefined4 uVar2;
  
  if ((param_2 & 2) == 0) {
    uVar2 = 1;
  }
  else {
    puVar1 = (undefined2 *)*param_1;
    uVar2 = 0;
    if ((param_2 & 1) == 0) {
      if (1 < (uint)(param_1[1] - (int)puVar1)) {
        *puVar1 = DAT_002c3543;
        *param_1 = *param_1 + 2;
        return 1;
      }
    }
    else if (1 < (uint)(param_1[1] - (int)puVar1)) {
      *puVar1 = DAT_002c3541;
      *param_1 = *param_1 + 2;
      return 1;
    }
  }
  return uVar2;
}

