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

void __regparm3 build_upper_buffer(re_string_t *pstr)

{
  __int32_t **pp_Var1;
  uint uVar2;
  int iVar3;
  int iVar4;
  
  iVar4 = pstr->valid_len;
  iVar3 = pstr->len;
  if (pstr->bufs_len <= pstr->len) {
    iVar3 = pstr->bufs_len;
  }
  if (iVar4 < iVar3) {
    pp_Var1 = __ctype_toupper_loc();
    do {
      uVar2 = (uint)pstr->raw_mbs[pstr->raw_mbs_idx + iVar4];
      if (pstr->trans != (uchar *)0x0) {
        uVar2 = (uint)pstr->trans[uVar2];
      }
      pstr->mbs[iVar4] = (uchar)(*pp_Var1)[uVar2];
      iVar4 = iVar4 + 1;
    } while (iVar3 != iVar4);
    pstr->valid_len = iVar3;
    pstr->valid_raw_len = iVar3;
    return;
  }
  pstr->valid_len = iVar4;
  pstr->valid_raw_len = iVar4;
  return;
}



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

void __regparm3 FUN_00016c30(int *param_1)

{
  __int32_t **pp_Var1;
  uint uVar2;
  int iVar3;
  int iVar4;
  
  iVar4 = param_1[7];
  iVar3 = param_1[0xc];
  if (param_1[9] <= param_1[0xc]) {
    iVar3 = param_1[9];
  }
  if (iVar4 < iVar3) {
    pp_Var1 = __ctype_toupper_loc();
    do {
      uVar2 = (uint)*(byte *)(*param_1 + iVar4 + param_1[6]);
      if (param_1[0x10] != 0) {
        uVar2 = (uint)*(byte *)(param_1[0x10] + uVar2);
      }
      *(char *)(param_1[1] + iVar4) = (char)(*pp_Var1)[uVar2];
      iVar4 = iVar4 + 1;
    } while (iVar3 != iVar4);
    param_1[7] = iVar3;
    param_1[8] = iVar3;
    return;
  }
  param_1[7] = iVar4;
  param_1[8] = iVar4;
  return;
}


PUSH EBP
PUSH EDI
MOV EDI,EAX
PUSH ESI
PUSH EBX
CALL 0x00011ce0
ADD EBX,0x163c5
SUB ESP,0xc
MOV EBP,dword ptr [EAX + 0x30]
MOV ESI,dword ptr [EAX + 0x1c]
CMP dword ptr [EAX + 0x24],EBP
CMOVLE EBP,dword ptr [EAX + 0x24]
CMP EBP,ESI
JLE 0x00016ca0
CALL 0x00011040
LEA ESI,[ESI]
MOV EDX,dword ptr [EDI]
MOV ECX,dword ptr [EDI + 0x40]
ADD EDX,ESI
ADD EDX,dword ptr [EDI + 0x18]
MOVZX EDX,byte ptr [EDX]
TEST ECX,ECX
JNZ 0x00016c98
MOV EBX,dword ptr [EAX]
MOV ECX,dword ptr [EDI + 0x4]
MOV EDX,dword ptr [EBX + EDX*0x4]
MOV byte ptr [ECX + ESI*0x1],DL
ADD ESI,0x1
CMP EBP,ESI
JNZ 0x00016c60
MOV dword ptr [EDI + 0x1c],EBP
MOV dword ptr [EDI + 0x20],EBP
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOVZX EDX,byte ptr [ECX + EDX*0x1]
JMP 0x00016c71
MOV EBP,ESI
MOV dword ptr [EDI + 0x1c],EBP
MOV dword ptr [EDI + 0x20],EBP
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 FUN_00016c30(int *param_1)\n\n{\n  __int32_t **pp_Var1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar4 = param_1[7];\n  iVar3 = param_1[0xc];\n  if (param_1[9] <= param_1[0xc]) {\n    iVar3 = param_1[9];\n  }\n  if (iVar4 < iVar3) {\n    pp_Var1 = __ctype_toupper_loc();\n    do {\n      uVar2 = (uint)*(byte *)(*param_1 + iVar4 + param_1[6]);\n      if (param_1[0x10] != 0) {\n        uVar2 = (uint)*(byte *)(param_1[0x10] + uVar2);\n      }\n      *(char *)(param_1[1] + iVar4) = (char)(*pp_Var1)[uVar2];\n      iVar4 = iVar4 + 1;\n    } while (iVar3 != iVar4);\n    param_1[7] = iVar3;\n    param_1[8] = iVar3;\n    return;\n  }\n  param_1[7] = iVar4;\n  param_1[8] = iVar4;\n  return;\n}\n\n" comment (function_definition "void __regparm3 FUN_00016c30(int *param_1)\n\n{\n  __int32_t **pp_Var1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar4 = param_1[7];\n  iVar3 = param_1[0xc];\n  if (param_1[9] <= param_1[0xc]) {\n    iVar3 = param_1[9];\n  }\n  if (iVar4 < iVar3) {\n    pp_Var1 = __ctype_toupper_loc();\n    do {\n      uVar2 = (uint)*(byte *)(*param_1 + iVar4 + param_1[6]);\n      if (param_1[0x10] != 0) {\n        uVar2 = (uint)*(byte *)(param_1[0x10] + uVar2);\n      }\n      *(char *)(param_1[1] + iVar4) = (char)(*pp_Var1)[uVar2];\n      iVar4 = iVar4 + 1;\n    } while (iVar3 != iVar4);\n    param_1[7] = iVar3;\n    param_1[8] = iVar3;\n    return;\n  }\n  param_1[7] = iVar4;\n  param_1[8] = iVar4;\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00016c30(int *param_1)" identifier (parameter_list "(int *param_1)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  __int32_t **pp_Var1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar4 = param_1[7];\n  iVar3 = param_1[0xc];\n  if (param_1[9] <= param_1[0xc]) {\n    iVar3 = param_1[9];\n  }\n  if (iVar4 < iVar3) {\n    pp_Var1 = __ctype_toupper_loc();\n    do {\n      uVar2 = (uint)*(byte *)(*param_1 + iVar4 + param_1[6]);\n      if (param_1[0x10] != 0) {\n        uVar2 = (uint)*(byte *)(param_1[0x10] + uVar2);\n      }\n      *(char *)(param_1[1] + iVar4) = (char)(*pp_Var1)[uVar2];\n      iVar4 = iVar4 + 1;\n    } while (iVar3 != iVar4);\n    param_1[7] = iVar3;\n    param_1[8] = iVar3;\n    return;\n  }\n  param_1[7] = iVar4;\n  param_1[8] = iVar4;\n  return;\n}" { (declaration "__int32_t **pp_Var1;" type_identifier (pointer_declarator "**pp_Var1" * (pointer_declarator "*pp_Var1" * identifier)) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "iVar4 = param_1[7];" (assignment_expression "iVar4 = param_1[7]" identifier = (subscript_expression "param_1[7]" identifier [ number_literal ])) ;) (expression_statement "iVar3 = param_1[0xc];" (assignment_expression "iVar3 = param_1[0xc]" identifier = (subscript_expression "param_1[0xc]" identifier [ number_literal ])) ;) (if_statement "if (param_1[9] <= param_1[0xc]) {\n    iVar3 = param_1[9];\n  }" if (parenthesized_expression "(param_1[9] <= param_1[0xc])" ( (binary_expression "param_1[9] <= param_1[0xc]" (subscript_expression "param_1[9]" identifier [ number_literal ]) <= (subscript_expression "param_1[0xc]" identifier [ number_literal ])) )) (compound_statement "{\n    iVar3 = param_1[9];\n  }" { (expression_statement "iVar3 = param_1[9];" (assignment_expression "iVar3 = param_1[9]" identifier = (subscript_expression "param_1[9]" identifier [ number_literal ])) ;) })) (if_statement "if (iVar4 < iVar3) {\n    pp_Var1 = __ctype_toupper_loc();\n    do {\n      uVar2 = (uint)*(byte *)(*param_1 + iVar4 + param_1[6]);\n      if (param_1[0x10] != 0) {\n        uVar2 = (uint)*(byte *)(param_1[0x10] + uVar2);\n      }\n      *(char *)(param_1[1] + iVar4) = (char)(*pp_Var1)[uVar2];\n      iVar4 = iVar4 + 1;\n    } while (iVar3 != iVar4);\n    param_1[7] = iVar3;\n    param_1[8] = iVar3;\n    return;\n  }" if (parenthesized_expression "(iVar4 < iVar3)" ( (binary_expression "iVar4 < iVar3" identifier < identifier) )) (compound_statement "{\n    pp_Var1 = __ctype_toupper_loc();\n    do {\n      uVar2 = (uint)*(byte *)(*param_1 + iVar4 + param_1[6]);\n      if (param_1[0x10] != 0) {\n        uVar2 = (uint)*(byte *)(param_1[0x10] + uVar2);\n      }\n      *(char *)(param_1[1] + iVar4) = (char)(*pp_Var1)[uVar2];\n      iVar4 = iVar4 + 1;\n    } while (iVar3 != iVar4);\n    param_1[7] = iVar3;\n    param_1[8] = iVar3;\n    return;\n  }" { (expression_statement "pp_Var1 = __ctype_toupper_loc();" (assignment_expression "pp_Var1 = __ctype_toupper_loc()" identifier = (call_expression "__ctype_toupper_loc()" identifier (argument_list "()" ( )))) ;) (do_statement "do {\n      uVar2 = (uint)*(byte *)(*param_1 + iVar4 + param_1[6]);\n      if (param_1[0x10] != 0) {\n        uVar2 = (uint)*(byte *)(param_1[0x10] + uVar2);\n      }\n      *(char *)(param_1[1] + iVar4) = (char)(*pp_Var1)[uVar2];\n      iVar4 = iVar4 + 1;\n    } while (iVar3 != iVar4);" do (compound_statement "{\n      uVar2 = (uint)*(byte *)(*param_1 + iVar4 + param_1[6]);\n      if (param_1[0x10] != 0) {\n        uVar2 = (uint)*(byte *)(param_1[0x10] + uVar2);\n      }\n      *(char *)(param_1[1] + iVar4) = (char)(*pp_Var1)[uVar2];\n      iVar4 = iVar4 + 1;\n    }" { (expression_statement "uVar2 = (uint)*(byte *)(*param_1 + iVar4 + param_1[6]);" (assignment_expression "uVar2 = (uint)*(byte *)(*param_1 + iVar4 + param_1[6])" identifier = (binary_expression "(uint)*(byte *)(*param_1 + iVar4 + param_1[6])" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(byte *)(*param_1 + iVar4 + param_1[6])" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + iVar4 + param_1[6])" ( (binary_expression "*param_1 + iVar4 + param_1[6]" (binary_expression "*param_1 + iVar4" (pointer_expression "*param_1" * identifier) + identifier) + (subscript_expression "param_1[6]" identifier [ number_literal ])) ))))) ;) (if_statement "if (param_1[0x10] != 0) {\n        uVar2 = (uint)*(byte *)(param_1[0x10] + uVar2);\n      }" if (parenthesized_expression "(param_1[0x10] != 0)" ( (binary_expression "param_1[0x10] != 0" (subscript_expression "param_1[0x10]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n        uVar2 = (uint)*(byte *)(param_1[0x10] + uVar2);\n      }" { (expression_statement "uVar2 = (uint)*(byte *)(param_1[0x10] + uVar2);" (assignment_expression "uVar2 = (uint)*(byte *)(param_1[0x10] + uVar2)" identifier = (binary_expression "(uint)*(byte *)(param_1[0x10] + uVar2)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(byte *)(param_1[0x10] + uVar2)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[0x10] + uVar2)" ( (binary_expression "param_1[0x10] + uVar2" (subscript_expression "param_1[0x10]" identifier [ number_literal ]) + identifier) ))))) ;) })) (expression_statement "*(char *)(param_1[1] + iVar4) = (char)(*pp_Var1)[uVar2];" (assignment_expression "*(char *)(param_1[1] + iVar4) = (char)(*pp_Var1)[uVar2]" (pointer_expression "*(char *)(param_1[1] + iVar4)" * (cast_expression "(char *)(param_1[1] + iVar4)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[1] + iVar4)" ( (binary_expression "param_1[1] + iVar4" (subscript_expression "param_1[1]" identifier [ number_literal ]) + identifier) )))) = (cast_expression "(char)(*pp_Var1)[uVar2]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "(*pp_Var1)[uVar2]" (parenthesized_expression "(*pp_Var1)" ( (pointer_expression "*pp_Var1" * identifier) )) [ identifier ]))) ;) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar3 != iVar4)" ( (binary_expression "iVar3 != iVar4" identifier != identifier) )) ;) (expression_statement "param_1[7] = iVar3;" (assignment_expression "param_1[7] = iVar3" (subscript_expression "param_1[7]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[8] = iVar3;" (assignment_expression "param_1[8] = iVar3" (subscript_expression "param_1[8]" identifier [ number_literal ]) = identifier) ;) (return_statement "return;" return ;) })) (expression_statement "param_1[7] = iVar4;" (assignment_expression "param_1[7] = iVar4" (subscript_expression "param_1[7]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[8] = iVar4;" (assignment_expression "param_1[8] = iVar4" (subscript_expression "param_1[8]" identifier [ number_literal ]) = identifier) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 build_upper_buffer(re_string_t *pstr)\n\n{\n  __int32_t **pp_Var1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar4 = pstr->valid_len;\n  iVar3 = pstr->len;\n  if (pstr->bufs_len <= pstr->len) {\n    iVar3 = pstr->bufs_len;\n  }\n  if (iVar4 < iVar3) {\n    pp_Var1 = __ctype_toupper_loc();\n    do {\n      uVar2 = (uint)pstr->raw_mbs[pstr->raw_mbs_idx + iVar4];\n      if (pstr->trans != (uchar *)0x0) {\n        uVar2 = (uint)pstr->trans[uVar2];\n      }\n      pstr->mbs[iVar4] = (uchar)(*pp_Var1)[uVar2];\n      iVar4 = iVar4 + 1;\n    } while (iVar3 != iVar4);\n    pstr->valid_len = iVar3;\n    pstr->valid_raw_len = iVar3;\n    return;\n  }\n  pstr->valid_len = iVar4;\n  pstr->valid_raw_len = iVar4;\n  return;\n}\n\n" comment (function_definition "void __regparm3 build_upper_buffer(re_string_t *pstr)\n\n{\n  __int32_t **pp_Var1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar4 = pstr->valid_len;\n  iVar3 = pstr->len;\n  if (pstr->bufs_len <= pstr->len) {\n    iVar3 = pstr->bufs_len;\n  }\n  if (iVar4 < iVar3) {\n    pp_Var1 = __ctype_toupper_loc();\n    do {\n      uVar2 = (uint)pstr->raw_mbs[pstr->raw_mbs_idx + iVar4];\n      if (pstr->trans != (uchar *)0x0) {\n        uVar2 = (uint)pstr->trans[uVar2];\n      }\n      pstr->mbs[iVar4] = (uchar)(*pp_Var1)[uVar2];\n      iVar4 = iVar4 + 1;\n    } while (iVar3 != iVar4);\n    pstr->valid_len = iVar3;\n    pstr->valid_raw_len = iVar3;\n    return;\n  }\n  pstr->valid_len = iVar4;\n  pstr->valid_raw_len = iVar4;\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "build_upper_buffer(re_string_t *pstr)" identifier (parameter_list "(re_string_t *pstr)" ( (parameter_declaration "re_string_t *pstr" type_identifier (pointer_declarator "*pstr" * identifier)) ))) (compound_statement "{\n  __int32_t **pp_Var1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar4 = pstr->valid_len;\n  iVar3 = pstr->len;\n  if (pstr->bufs_len <= pstr->len) {\n    iVar3 = pstr->bufs_len;\n  }\n  if (iVar4 < iVar3) {\n    pp_Var1 = __ctype_toupper_loc();\n    do {\n      uVar2 = (uint)pstr->raw_mbs[pstr->raw_mbs_idx + iVar4];\n      if (pstr->trans != (uchar *)0x0) {\n        uVar2 = (uint)pstr->trans[uVar2];\n      }\n      pstr->mbs[iVar4] = (uchar)(*pp_Var1)[uVar2];\n      iVar4 = iVar4 + 1;\n    } while (iVar3 != iVar4);\n    pstr->valid_len = iVar3;\n    pstr->valid_raw_len = iVar3;\n    return;\n  }\n  pstr->valid_len = iVar4;\n  pstr->valid_raw_len = iVar4;\n  return;\n}" { (declaration "__int32_t **pp_Var1;" type_identifier (pointer_declarator "**pp_Var1" * (pointer_declarator "*pp_Var1" * identifier)) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "iVar4 = pstr->valid_len;" (assignment_expression "iVar4 = pstr->valid_len" identifier = (field_expression "pstr->valid_len" identifier -> field_identifier)) ;) (expression_statement "iVar3 = pstr->len;" (assignment_expression "iVar3 = pstr->len" identifier = (field_expression "pstr->len" identifier -> field_identifier)) ;) (if_statement "if (pstr->bufs_len <= pstr->len) {\n    iVar3 = pstr->bufs_len;\n  }" if (parenthesized_expression "(pstr->bufs_len <= pstr->len)" ( (binary_expression "pstr->bufs_len <= pstr->len" (field_expression "pstr->bufs_len" identifier -> field_identifier) <= (field_expression "pstr->len" identifier -> field_identifier)) )) (compound_statement "{\n    iVar3 = pstr->bufs_len;\n  }" { (expression_statement "iVar3 = pstr->bufs_len;" (assignment_expression "iVar3 = pstr->bufs_len" identifier = (field_expression "pstr->bufs_len" identifier -> field_identifier)) ;) })) (if_statement "if (iVar4 < iVar3) {\n    pp_Var1 = __ctype_toupper_loc();\n    do {\n      uVar2 = (uint)pstr->raw_mbs[pstr->raw_mbs_idx + iVar4];\n      if (pstr->trans != (uchar *)0x0) {\n        uVar2 = (uint)pstr->trans[uVar2];\n      }\n      pstr->mbs[iVar4] = (uchar)(*pp_Var1)[uVar2];\n      iVar4 = iVar4 + 1;\n    } while (iVar3 != iVar4);\n    pstr->valid_len = iVar3;\n    pstr->valid_raw_len = iVar3;\n    return;\n  }" if (parenthesized_expression "(iVar4 < iVar3)" ( (binary_expression "iVar4 < iVar3" identifier < identifier) )) (compound_statement "{\n    pp_Var1 = __ctype_toupper_loc();\n    do {\n      uVar2 = (uint)pstr->raw_mbs[pstr->raw_mbs_idx + iVar4];\n      if (pstr->trans != (uchar *)0x0) {\n        uVar2 = (uint)pstr->trans[uVar2];\n      }\n      pstr->mbs[iVar4] = (uchar)(*pp_Var1)[uVar2];\n      iVar4 = iVar4 + 1;\n    } while (iVar3 != iVar4);\n    pstr->valid_len = iVar3;\n    pstr->valid_raw_len = iVar3;\n    return;\n  }" { (expression_statement "pp_Var1 = __ctype_toupper_loc();" (assignment_expression "pp_Var1 = __ctype_toupper_loc()" identifier = (call_expression "__ctype_toupper_loc()" identifier (argument_list "()" ( )))) ;) (do_statement "do {\n      uVar2 = (uint)pstr->raw_mbs[pstr->raw_mbs_idx + iVar4];\n      if (pstr->trans != (uchar *)0x0) {\n        uVar2 = (uint)pstr->trans[uVar2];\n      }\n      pstr->mbs[iVar4] = (uchar)(*pp_Var1)[uVar2];\n      iVar4 = iVar4 + 1;\n    } while (iVar3 != iVar4);" do (compound_statement "{\n      uVar2 = (uint)pstr->raw_mbs[pstr->raw_mbs_idx + iVar4];\n      if (pstr->trans != (uchar *)0x0) {\n        uVar2 = (uint)pstr->trans[uVar2];\n      }\n      pstr->mbs[iVar4] = (uchar)(*pp_Var1)[uVar2];\n      iVar4 = iVar4 + 1;\n    }" { (expression_statement "uVar2 = (uint)pstr->raw_mbs[pstr->raw_mbs_idx + iVar4];" (assignment_expression "uVar2 = (uint)pstr->raw_mbs[pstr->raw_mbs_idx + iVar4]" identifier = (cast_expression "(uint)pstr->raw_mbs[pstr->raw_mbs_idx + iVar4]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pstr->raw_mbs[pstr->raw_mbs_idx + iVar4]" (field_expression "pstr->raw_mbs" identifier -> field_identifier) [ (binary_expression "pstr->raw_mbs_idx + iVar4" (field_expression "pstr->raw_mbs_idx" identifier -> field_identifier) + identifier) ]))) ;) (if_statement "if (pstr->trans != (uchar *)0x0) {\n        uVar2 = (uint)pstr->trans[uVar2];\n      }" if (parenthesized_expression "(pstr->trans != (uchar *)0x0)" ( (binary_expression "pstr->trans != (uchar *)0x0" (field_expression "pstr->trans" identifier -> field_identifier) != (cast_expression "(uchar *)0x0" ( (type_descriptor "uchar *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        uVar2 = (uint)pstr->trans[uVar2];\n      }" { (expression_statement "uVar2 = (uint)pstr->trans[uVar2];" (assignment_expression "uVar2 = (uint)pstr->trans[uVar2]" identifier = (cast_expression "(uint)pstr->trans[uVar2]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "pstr->trans[uVar2]" (field_expression "pstr->trans" identifier -> field_identifier) [ identifier ]))) ;) })) (expression_statement "pstr->mbs[iVar4] = (uchar)(*pp_Var1)[uVar2];" (assignment_expression "pstr->mbs[iVar4] = (uchar)(*pp_Var1)[uVar2]" (subscript_expression "pstr->mbs[iVar4]" (field_expression "pstr->mbs" identifier -> field_identifier) [ identifier ]) = (subscript_expression "(uchar)(*pp_Var1)[uVar2]" (call_expression "(uchar)(*pp_Var1)" (parenthesized_expression "(uchar)" ( identifier )) (argument_list "(*pp_Var1)" ( (pointer_expression "*pp_Var1" * identifier) ))) [ identifier ])) ;) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar3 != iVar4)" ( (binary_expression "iVar3 != iVar4" identifier != identifier) )) ;) (expression_statement "pstr->valid_len = iVar3;" (assignment_expression "pstr->valid_len = iVar3" (field_expression "pstr->valid_len" identifier -> field_identifier) = identifier) ;) (expression_statement "pstr->valid_raw_len = iVar3;" (assignment_expression "pstr->valid_raw_len = iVar3" (field_expression "pstr->valid_raw_len" identifier -> field_identifier) = identifier) ;) (return_statement "return;" return ;) })) (expression_statement "pstr->valid_len = iVar4;" (assignment_expression "pstr->valid_len = iVar4" (field_expression "pstr->valid_len" identifier -> field_identifier) = identifier) ;) (expression_statement "pstr->valid_raw_len = iVar4;" (assignment_expression "pstr->valid_raw_len = iVar4" (field_expression "pstr->valid_raw_len" identifier -> field_identifier) = identifier) ;) (return_statement "return;" return ;) })))
(translation_unit "void __regparm3 FUN_00016c30(int *param_1)\n\n{\n  __int32_t **pp_Var1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar4 = param_1[7];\n  iVar3 = param_1[0xc];\n  if (param_1[9] <= param_1[0xc]) {\n    iVar3 = param_1[9];\n  }\n  if (iVar4 < iVar3) {\n    pp_Var1 = __ctype_toupper_loc();\n    do {\n      uVar2 = (uint)*(byte *)(*param_1 + iVar4 + param_1[6]);\n      if (param_1[0x10] != 0) {\n        uVar2 = (uint)*(byte *)(param_1[0x10] + uVar2);\n      }\n      *(char *)(param_1[1] + iVar4) = (char)(*pp_Var1)[uVar2];\n      iVar4 = iVar4 + 1;\n    } while (iVar3 != iVar4);\n    param_1[7] = iVar3;\n    param_1[8] = iVar3;\n    return;\n  }\n  param_1[7] = iVar4;\n  param_1[8] = iVar4;\n  return;\n}\n\n" (function_definition "void __regparm3 FUN_00016c30(int *param_1)\n\n{\n  __int32_t **pp_Var1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar4 = param_1[7];\n  iVar3 = param_1[0xc];\n  if (param_1[9] <= param_1[0xc]) {\n    iVar3 = param_1[9];\n  }\n  if (iVar4 < iVar3) {\n    pp_Var1 = __ctype_toupper_loc();\n    do {\n      uVar2 = (uint)*(byte *)(*param_1 + iVar4 + param_1[6]);\n      if (param_1[0x10] != 0) {\n        uVar2 = (uint)*(byte *)(param_1[0x10] + uVar2);\n      }\n      *(char *)(param_1[1] + iVar4) = (char)(*pp_Var1)[uVar2];\n      iVar4 = iVar4 + 1;\n    } while (iVar3 != iVar4);\n    param_1[7] = iVar3;\n    param_1[8] = iVar3;\n    return;\n  }\n  param_1[7] = iVar4;\n  param_1[8] = iVar4;\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00016c30(int *param_1)" identifier (parameter_list "(int *param_1)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  __int32_t **pp_Var1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar4 = param_1[7];\n  iVar3 = param_1[0xc];\n  if (param_1[9] <= param_1[0xc]) {\n    iVar3 = param_1[9];\n  }\n  if (iVar4 < iVar3) {\n    pp_Var1 = __ctype_toupper_loc();\n    do {\n      uVar2 = (uint)*(byte *)(*param_1 + iVar4 + param_1[6]);\n      if (param_1[0x10] != 0) {\n        uVar2 = (uint)*(byte *)(param_1[0x10] + uVar2);\n      }\n      *(char *)(param_1[1] + iVar4) = (char)(*pp_Var1)[uVar2];\n      iVar4 = iVar4 + 1;\n    } while (iVar3 != iVar4);\n    param_1[7] = iVar3;\n    param_1[8] = iVar3;\n    return;\n  }\n  param_1[7] = iVar4;\n  param_1[8] = iVar4;\n  return;\n}" { (declaration "__int32_t **pp_Var1;" type_identifier (pointer_declarator "**pp_Var1" * (pointer_declarator "*pp_Var1" * identifier)) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "iVar4 = param_1[7];" (assignment_expression "iVar4 = param_1[7]" identifier = (subscript_expression "param_1[7]" identifier [ number_literal ])) ;) (expression_statement "iVar3 = param_1[0xc];" (assignment_expression "iVar3 = param_1[0xc]" identifier = (subscript_expression "param_1[0xc]" identifier [ number_literal ])) ;) (if_statement "if (param_1[9] <= param_1[0xc]) {\n    iVar3 = param_1[9];\n  }" if (parenthesized_expression "(param_1[9] <= param_1[0xc])" ( (binary_expression "param_1[9] <= param_1[0xc]" (subscript_expression "param_1[9]" identifier [ number_literal ]) <= (subscript_expression "param_1[0xc]" identifier [ number_literal ])) )) (compound_statement "{\n    iVar3 = param_1[9];\n  }" { (expression_statement "iVar3 = param_1[9];" (assignment_expression "iVar3 = param_1[9]" identifier = (subscript_expression "param_1[9]" identifier [ number_literal ])) ;) })) (if_statement "if (iVar4 < iVar3) {\n    pp_Var1 = __ctype_toupper_loc();\n    do {\n      uVar2 = (uint)*(byte *)(*param_1 + iVar4 + param_1[6]);\n      if (param_1[0x10] != 0) {\n        uVar2 = (uint)*(byte *)(param_1[0x10] + uVar2);\n      }\n      *(char *)(param_1[1] + iVar4) = (char)(*pp_Var1)[uVar2];\n      iVar4 = iVar4 + 1;\n    } while (iVar3 != iVar4);\n    param_1[7] = iVar3;\n    param_1[8] = iVar3;\n    return;\n  }" if (parenthesized_expression "(iVar4 < iVar3)" ( (binary_expression "iVar4 < iVar3" identifier < identifier) )) (compound_statement "{\n    pp_Var1 = __ctype_toupper_loc();\n    do {\n      uVar2 = (uint)*(byte *)(*param_1 + iVar4 + param_1[6]);\n      if (param_1[0x10] != 0) {\n        uVar2 = (uint)*(byte *)(param_1[0x10] + uVar2);\n      }\n      *(char *)(param_1[1] + iVar4) = (char)(*pp_Var1)[uVar2];\n      iVar4 = iVar4 + 1;\n    } while (iVar3 != iVar4);\n    param_1[7] = iVar3;\n    param_1[8] = iVar3;\n    return;\n  }" { (expression_statement "pp_Var1 = __ctype_toupper_loc();" (assignment_expression "pp_Var1 = __ctype_toupper_loc()" identifier = (call_expression "__ctype_toupper_loc()" identifier (argument_list "()" ( )))) ;) (do_statement "do {\n      uVar2 = (uint)*(byte *)(*param_1 + iVar4 + param_1[6]);\n      if (param_1[0x10] != 0) {\n        uVar2 = (uint)*(byte *)(param_1[0x10] + uVar2);\n      }\n      *(char *)(param_1[1] + iVar4) = (char)(*pp_Var1)[uVar2];\n      iVar4 = iVar4 + 1;\n    } while (iVar3 != iVar4);" do (compound_statement "{\n      uVar2 = (uint)*(byte *)(*param_1 + iVar4 + param_1[6]);\n      if (param_1[0x10] != 0) {\n        uVar2 = (uint)*(byte *)(param_1[0x10] + uVar2);\n      }\n      *(char *)(param_1[1] + iVar4) = (char)(*pp_Var1)[uVar2];\n      iVar4 = iVar4 + 1;\n    }" { (expression_statement "uVar2 = (uint)*(byte *)(*param_1 + iVar4 + param_1[6]);" (assignment_expression "uVar2 = (uint)*(byte *)(*param_1 + iVar4 + param_1[6])" identifier = (binary_expression "(uint)*(byte *)(*param_1 + iVar4 + param_1[6])" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(byte *)(*param_1 + iVar4 + param_1[6])" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + iVar4 + param_1[6])" ( (binary_expression "*param_1 + iVar4 + param_1[6]" (binary_expression "*param_1 + iVar4" (pointer_expression "*param_1" * identifier) + identifier) + (subscript_expression "param_1[6]" identifier [ number_literal ])) ))))) ;) (if_statement "if (param_1[0x10] != 0) {\n        uVar2 = (uint)*(byte *)(param_1[0x10] + uVar2);\n      }" if (parenthesized_expression "(param_1[0x10] != 0)" ( (binary_expression "param_1[0x10] != 0" (subscript_expression "param_1[0x10]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n        uVar2 = (uint)*(byte *)(param_1[0x10] + uVar2);\n      }" { (expression_statement "uVar2 = (uint)*(byte *)(param_1[0x10] + uVar2);" (assignment_expression "uVar2 = (uint)*(byte *)(param_1[0x10] + uVar2)" identifier = (binary_expression "(uint)*(byte *)(param_1[0x10] + uVar2)" (parenthesized_expression "(uint)" ( identifier )) * (cast_expression "(byte *)(param_1[0x10] + uVar2)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[0x10] + uVar2)" ( (binary_expression "param_1[0x10] + uVar2" (subscript_expression "param_1[0x10]" identifier [ number_literal ]) + identifier) ))))) ;) })) (expression_statement "*(char *)(param_1[1] + iVar4) = (char)(*pp_Var1)[uVar2];" (assignment_expression "*(char *)(param_1[1] + iVar4) = (char)(*pp_Var1)[uVar2]" (pointer_expression "*(char *)(param_1[1] + iVar4)" * (cast_expression "(char *)(param_1[1] + iVar4)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1[1] + iVar4)" ( (binary_expression "param_1[1] + iVar4" (subscript_expression "param_1[1]" identifier [ number_literal ]) + identifier) )))) = (cast_expression "(char)(*pp_Var1)[uVar2]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "(*pp_Var1)[uVar2]" (parenthesized_expression "(*pp_Var1)" ( (pointer_expression "*pp_Var1" * identifier) )) [ identifier ]))) ;) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar3 != iVar4)" ( (binary_expression "iVar3 != iVar4" identifier != identifier) )) ;) (expression_statement "param_1[7] = iVar3;" (assignment_expression "param_1[7] = iVar3" (subscript_expression "param_1[7]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[8] = iVar3;" (assignment_expression "param_1[8] = iVar3" (subscript_expression "param_1[8]" identifier [ number_literal ]) = identifier) ;) (return_statement "return;" return ;) })) (expression_statement "param_1[7] = iVar4;" (assignment_expression "param_1[7] = iVar4" (subscript_expression "param_1[7]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[8] = iVar4;" (assignment_expression "param_1[8] = iVar4" (subscript_expression "param_1[8]" identifier [ number_literal ]) = identifier) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * (pointer_declarator * IDENT)) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) <= (subscript_expression IDENT [ LIT ])) )) (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( IDENT )) * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (pointer_expression * IDENT) + IDENT) + (subscript_expression IDENT [ LIT ])) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( IDENT )) * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + IDENT) ))))) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + IDENT) )))) = (cast_expression ( (type_descriptor TYPE) ) (subscript_expression (parenthesized_expression ( (pointer_expression * IDENT) )) [ IDENT ]))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (return_statement return ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (return_statement return ;) })))
(function_definition "void __regparm3 FUN_00016c30(int *param_1)\n\n{\n  __int32_t **pp_Var1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar4 = param_1[7];\n  iVar3 = param_1[0xc];\n  if (param_1[9] <= param_1[0xc]) {\n    iVar3 = param_1[9];\n  }\n  if (iVar4 < iVar3) {\n    pp_Var1 = __ctype_toupper_loc();\n    do {\n      uVar2 = (uint)*(byte *)(*param_1 + iVar4 + param_1[6]);\n      if (param_1[0x10] != 0) {\n        uVar2 = (uint)*(byte *)(param_1[0x10] + uVar2);\n      }\n      *(char *)(param_1[1] + iVar4) = (char)(*pp_Var1)[uVar2];\n      iVar4 = iVar4 + 1;\n    } while (iVar3 != iVar4);\n    param_1[7] = iVar3;\n    param_1[8] = iVar3;\n    return;\n  }\n  param_1[7] = iVar4;\n  param_1[8] = iVar4;\n  return;\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00016c30(int *param_1)" (identifier "FUN_00016c30") (parameter_list "(int *param_1)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  __int32_t **pp_Var1;\n  uint uVar2;\n  int iVar3;\n  int iVar4;\n  \n  iVar4 = param_1[7];\n  iVar3 = param_1[0xc];\n  if (param_1[9] <= param_1[0xc]) {\n    iVar3 = param_1[9];\n  }\n  if (iVar4 < iVar3) {\n    pp_Var1 = __ctype_toupper_loc();\n    do {\n      uVar2 = (uint)*(byte *)(*param_1 + iVar4 + param_1[6]);\n      if (param_1[0x10] != 0) {\n        uVar2 = (uint)*(byte *)(param_1[0x10] + uVar2);\n      }\n      *(char *)(param_1[1] + iVar4) = (char)(*pp_Var1)[uVar2];\n      iVar4 = iVar4 + 1;\n    } while (iVar3 != iVar4);\n    param_1[7] = iVar3;\n    param_1[8] = iVar3;\n    return;\n  }\n  param_1[7] = iVar4;\n  param_1[8] = iVar4;\n  return;\n}" ({ "{") (declaration "__int32_t **pp_Var1;" (type_identifier "__int32_t") (pointer_declarator "**pp_Var1" (* "*") (pointer_declarator "*pp_Var1" (* "*") (identifier "pp_Var1"))) (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (expression_statement "iVar4 = param_1[7];" (assignment_expression "iVar4 = param_1[7]" (identifier "iVar4") (= "=") (subscript_expression "param_1[7]" (identifier "param_1") ([ "[") (number_literal "7") (] "]"))) (; ";")) (expression_statement "iVar3 = param_1[0xc];" (assignment_expression "iVar3 = param_1[0xc]" (identifier "iVar3") (= "=") (subscript_expression "param_1[0xc]" (identifier "param_1") ([ "[") (number_literal "0xc") (] "]"))) (; ";")) (if_statement "if (param_1[9] <= param_1[0xc]) {\n    iVar3 = param_1[9];\n  }" (if "if") (parenthesized_expression "(param_1[9] <= param_1[0xc])" (( "(") (binary_expression "param_1[9] <= param_1[0xc]" (subscript_expression "param_1[9]" (identifier "param_1") ([ "[") (number_literal "9") (] "]")) (<= "<=") (subscript_expression "param_1[0xc]" (identifier "param_1") ([ "[") (number_literal "0xc") (] "]"))) () ")")) (compound_statement "{\n    iVar3 = param_1[9];\n  }" ({ "{") (expression_statement "iVar3 = param_1[9];" (assignment_expression "iVar3 = param_1[9]" (identifier "iVar3") (= "=") (subscript_expression "param_1[9]" (identifier "param_1") ([ "[") (number_literal "9") (] "]"))) (; ";")) (} "}"))) (if_statement "if (iVar4 < iVar3) {\n    pp_Var1 = __ctype_toupper_loc();\n    do {\n      uVar2 = (uint)*(byte *)(*param_1 + iVar4 + param_1[6]);\n      if (param_1[0x10] != 0) {\n        uVar2 = (uint)*(byte *)(param_1[0x10] + uVar2);\n      }\n      *(char *)(param_1[1] + iVar4) = (char)(*pp_Var1)[uVar2];\n      iVar4 = iVar4 + 1;\n    } while (iVar3 != iVar4);\n    param_1[7] = iVar3;\n    param_1[8] = iVar3;\n    return;\n  }" (if "if") (parenthesized_expression "(iVar4 < iVar3)" (( "(") (binary_expression "iVar4 < iVar3" (identifier "iVar4") (< "<") (identifier "iVar3")) () ")")) (compound_statement "{\n    pp_Var1 = __ctype_toupper_loc();\n    do {\n      uVar2 = (uint)*(byte *)(*param_1 + iVar4 + param_1[6]);\n      if (param_1[0x10] != 0) {\n        uVar2 = (uint)*(byte *)(param_1[0x10] + uVar2);\n      }\n      *(char *)(param_1[1] + iVar4) = (char)(*pp_Var1)[uVar2];\n      iVar4 = iVar4 + 1;\n    } while (iVar3 != iVar4);\n    param_1[7] = iVar3;\n    param_1[8] = iVar3;\n    return;\n  }" ({ "{") (expression_statement "pp_Var1 = __ctype_toupper_loc();" (assignment_expression "pp_Var1 = __ctype_toupper_loc()" (identifier "pp_Var1") (= "=") (call_expression "__ctype_toupper_loc()" (identifier "__ctype_toupper_loc") (argument_list "()" (( "(") () ")")))) (; ";")) (do_statement "do {\n      uVar2 = (uint)*(byte *)(*param_1 + iVar4 + param_1[6]);\n      if (param_1[0x10] != 0) {\n        uVar2 = (uint)*(byte *)(param_1[0x10] + uVar2);\n      }\n      *(char *)(param_1[1] + iVar4) = (char)(*pp_Var1)[uVar2];\n      iVar4 = iVar4 + 1;\n    } while (iVar3 != iVar4);" (do "do") (compound_statement "{\n      uVar2 = (uint)*(byte *)(*param_1 + iVar4 + param_1[6]);\n      if (param_1[0x10] != 0) {\n        uVar2 = (uint)*(byte *)(param_1[0x10] + uVar2);\n      }\n      *(char *)(param_1[1] + iVar4) = (char)(*pp_Var1)[uVar2];\n      iVar4 = iVar4 + 1;\n    }" ({ "{") (expression_statement "uVar2 = (uint)*(byte *)(*param_1 + iVar4 + param_1[6]);" (assignment_expression "uVar2 = (uint)*(byte *)(*param_1 + iVar4 + param_1[6])" (identifier "uVar2") (= "=") (binary_expression "(uint)*(byte *)(*param_1 + iVar4 + param_1[6])" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (cast_expression "(byte *)(*param_1 + iVar4 + param_1[6])" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + iVar4 + param_1[6])" (( "(") (binary_expression "*param_1 + iVar4 + param_1[6]" (binary_expression "*param_1 + iVar4" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (identifier "iVar4")) (+ "+") (subscript_expression "param_1[6]" (identifier "param_1") ([ "[") (number_literal "6") (] "]"))) () ")"))))) (; ";")) (if_statement "if (param_1[0x10] != 0) {\n        uVar2 = (uint)*(byte *)(param_1[0x10] + uVar2);\n      }" (if "if") (parenthesized_expression "(param_1[0x10] != 0)" (( "(") (binary_expression "param_1[0x10] != 0" (subscript_expression "param_1[0x10]" (identifier "param_1") ([ "[") (number_literal "0x10") (] "]")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        uVar2 = (uint)*(byte *)(param_1[0x10] + uVar2);\n      }" ({ "{") (expression_statement "uVar2 = (uint)*(byte *)(param_1[0x10] + uVar2);" (assignment_expression "uVar2 = (uint)*(byte *)(param_1[0x10] + uVar2)" (identifier "uVar2") (= "=") (binary_expression "(uint)*(byte *)(param_1[0x10] + uVar2)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (cast_expression "(byte *)(param_1[0x10] + uVar2)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1[0x10] + uVar2)" (( "(") (binary_expression "param_1[0x10] + uVar2" (subscript_expression "param_1[0x10]" (identifier "param_1") ([ "[") (number_literal "0x10") (] "]")) (+ "+") (identifier "uVar2")) () ")"))))) (; ";")) (} "}"))) (expression_statement "*(char *)(param_1[1] + iVar4) = (char)(*pp_Var1)[uVar2];" (assignment_expression "*(char *)(param_1[1] + iVar4) = (char)(*pp_Var1)[uVar2]" (pointer_expression "*(char *)(param_1[1] + iVar4)" (* "*") (cast_expression "(char *)(param_1[1] + iVar4)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1[1] + iVar4)" (( "(") (binary_expression "param_1[1] + iVar4" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (+ "+") (identifier "iVar4")) () ")")))) (= "=") (cast_expression "(char)(*pp_Var1)[uVar2]" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (subscript_expression "(*pp_Var1)[uVar2]" (parenthesized_expression "(*pp_Var1)" (( "(") (pointer_expression "*pp_Var1" (* "*") (identifier "pp_Var1")) () ")")) ([ "[") (identifier "uVar2") (] "]")))) (; ";")) (expression_statement "iVar4 = iVar4 + 1;" (assignment_expression "iVar4 = iVar4 + 1" (identifier "iVar4") (= "=") (binary_expression "iVar4 + 1" (identifier "iVar4") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar3 != iVar4)" (( "(") (binary_expression "iVar3 != iVar4" (identifier "iVar3") (!= "!=") (identifier "iVar4")) () ")")) (; ";")) (expression_statement "param_1[7] = iVar3;" (assignment_expression "param_1[7] = iVar3" (subscript_expression "param_1[7]" (identifier "param_1") ([ "[") (number_literal "7") (] "]")) (= "=") (identifier "iVar3")) (; ";")) (expression_statement "param_1[8] = iVar3;" (assignment_expression "param_1[8] = iVar3" (subscript_expression "param_1[8]" (identifier "param_1") ([ "[") (number_literal "8") (] "]")) (= "=") (identifier "iVar3")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "param_1[7] = iVar4;" (assignment_expression "param_1[7] = iVar4" (subscript_expression "param_1[7]" (identifier "param_1") ([ "[") (number_literal "7") (] "]")) (= "=") (identifier "iVar4")) (; ";")) (expression_statement "param_1[8] = iVar4;" (assignment_expression "param_1[8] = iVar4" (subscript_expression "param_1[8]" (identifier "param_1") ([ "[") (number_literal "8") (] "]")) (= "=") (identifier "iVar4")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void __regparm3 function_1(type_1 *pstr)

{
  type_2 **pp_Var1;
  type_3 uVar2;
  int var_2;
  int var_1;
  
  var_1 = pstr->valid_len;
  var_2 = pstr->len;
  if (pstr->bufs_len <= pstr->len) {
    var_2 = pstr->bufs_len;
  }
  if (var_1 < var_2) {
    pp_Var1 = var_3();
    do {
      uVar2 = (type_3)pstr->raw_mbs[pstr->raw_mbs_idx + var_1];
      if (pstr->trans != (type_4 *)0x0) {
        uVar2 = (type_3)pstr->trans[uVar2];
      }
      pstr->mbs[var_1] = (type_4)(*pp_Var1)[uVar2];
      var_1 = var_1 + 1;
    } while (var_2 != var_1);
    pstr->valid_len = var_2;
    pstr->valid_raw_len = var_2;
    return;
  }
  pstr->valid_len = var_1;
  pstr->valid_raw_len = var_1;
  return;
}


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

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

void __regparm3 MASKED(int *param_1)

{
  __int32_t **pp_Var1;
  uint uVar2;
  int iVar3;
  int iVar4;
  
  iVar4 = param_1[7];
  iVar3 = param_1[0xc];
  if (param_1[9] <= param_1[0xc]) {
    iVar3 = param_1[9];
  }
  if (iVar4 < iVar3) {
    pp_Var1 = __ctype_toupper_loc();
    do {
      uVar2 = (uint)*(byte *)(*param_1 + iVar4 + param_1[6]);
      if (param_1[0x10] != 0) {
        uVar2 = (uint)*(byte *)(param_1[0x10] + uVar2);
      }
      *(char *)(param_1[1] + iVar4) = (char)(*pp_Var1)[uVar2];
      iVar4 = iVar4 + 1;
    } while (iVar3 != iVar4);
    param_1[7] = iVar3;
    param_1[8] = iVar3;
    return;
  }
  param_1[7] = iVar4;
  param_1[8] = iVar4;
  return;
}

