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

char * mbschr(char *s,int c)

{
  int iVar1;
  byte bVar2;
  size_t __n;
  size_t sVar3;
  int in_GS_OFFSET;
  mbstate_t state;
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  if ((locale_utf8locale == 0) || (0x7f < c)) {
    if (((byte)c < 0x30) || (locale_mb_cur_max < 2)) {
      s = strchr(s,c);
    }
    else {
      state.__count = 0;
      state.__value.__wch = 0;
      __n = strlen(s);
      for (; __n != 0; __n = __n - sVar3) {
        bVar2 = *s;
        if (((uint)(&is_basic_table)[bVar2 >> 5] >> (bVar2 & 0x1f) & 1) == 0) {
          sVar3 = mbrtowc((wchar_t *)0x0,s,__n,(mbstate_t *)&state);
          if (0xfffffffb < sVar3 - 2) {
            bVar2 = *s;
            goto joined_r0x000ddae2;
          }
        }
        else {
joined_r0x000ddae2:
          if ((uint)bVar2 == c) goto LAB_000ddb45;
          sVar3 = 1;
        }
        s = (char *)((byte *)s + sVar3);
      }
      s = (char *)0x0;
    }
  }
  else {
    s = utf8_mbschr(s,c);
  }
LAB_000ddb45:
  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail_local();
  }
  return s;
}



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

byte * mbschr(byte *param_1,uint param_2)

{
  byte bVar1;
  size_t __n;
  size_t sVar2;
  int in_GS_OFFSET;
  mbstate_t local_28;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0xdda59;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if ((locale_utf8locale == 0) || (0x7f < (int)param_2)) {
    if (((byte)param_2 < 0x30) || (locale_mb_cur_max < 2)) {
      param_1 = (byte *)strchr((char *)param_1,param_2);
    }
    else {
      local_28.__count = 0;
      local_28.__value.__wch = 0;
      __n = strlen((char *)param_1);
      for (; __n != 0; __n = __n - sVar2) {
        bVar1 = *param_1;
        if (((uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1) == 0) {
          sVar2 = mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28);
          if (0xfffffffb < sVar2 - 2) {
            bVar1 = *param_1;
            goto joined_r0x000ddae2;
          }
        }
        else {
joined_r0x000ddae2:
          if (bVar1 == param_2) goto LAB_000ddb45;
          sVar2 = 1;
        }
        param_1 = param_1 + sVar2;
      }
      param_1 = (byte *)0x0;
    }
  }
  else {
    param_1 = (byte *)utf8_mbschr(param_1,param_2);
  }
LAB_000ddb45:
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_0010f8b0();
  }
  return param_1;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x000312b0
ADD EBX,0x945a7
SUB ESP,0x2c
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x1c],EAX
XOR EAX,EAX
MOV ESI,dword ptr [ESP + 0x40]
MOV EBP,dword ptr [ESP + 0x44]
LEA EAX,[EBX + 0xd4b8]
MOV EAX,dword ptr [EAX]
TEST EAX,EAX
JZ 0x000dda8b
CMP EBP,0x7f
JLE 0x000ddb60
MOV EAX,EBP
CMP AL,0x2f
JBE 0x000ddb38
LEA EAX,[EBX + 0xd4b0]
CMP dword ptr [EAX],0x1
JLE 0x000ddb38
MOV dword ptr [ESP + 0x14],0x0
SUB ESP,0xc
MOV dword ptr [ESP + 0x24],0x0
PUSH ESI
CALL 0x0002e760
ADD ESP,0x10
LEA EDX,[EBX + 0xfffb6460]
MOV EDI,EAX
LEA EAX,[ESP + 0x14]
MOV dword ptr [ESP + 0xc],EAX
TEST EDI,EDI
JNZ 0x000ddaf3
JMP 0x000ddb70
CMP ECX,EBP
JZ 0x000ddb2e
MOV EAX,0x1
ADD ESI,EAX
SUB EDI,EAX
JZ 0x000ddb70
MOVZX ECX,byte ptr [ESI]
MOV EAX,ECX
SHR AL,0x5
MOVZX EAX,AL
MOV EAX,dword ptr [EDX + EAX*0x4]
SHR EAX,CL
TEST AL,0x1
JNZ 0x000ddae0
MOV dword ptr [ESP + 0x8],EDX
PUSH dword ptr [ESP + 0xc]
PUSH EDI
PUSH ESI
PUSH 0x0
CALL 0x0002e5b0
ADD ESP,0x10
MOV EDX,dword ptr [ESP + 0x8]
LEA ECX,[EAX + -0x2]
CMP ECX,-0x5
JBE 0x000ddae9
MOVZX ECX,byte ptr [ESI]
CMP ECX,EBP
JNZ 0x000ddae4
MOV EAX,ESI
JMP 0x000ddb45
SUB ESP,0x8
PUSH EBP
PUSH ESI
CALL 0x0002e730
ADD ESP,0x10
MOV EDI,dword ptr [ESP + 0x1c]
XOR EDI,dword ptr GS:[0x14]
JNZ 0x000ddb74
ADD ESP,0x2c
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x8
PUSH EBP
PUSH ESI
CALL 0x000dd660
ADD ESP,0x10
JMP 0x000ddb45
XOR EAX,EAX
JMP 0x000ddb45
CALL 0x0010f8b0
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nbyte * mbschr(byte *param_1,uint param_2)\n\n{\n  byte bVar1;\n  size_t __n;\n  size_t sVar2;\n  int in_GS_OFFSET;\n  mbstate_t local_28;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0xdda59;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((locale_utf8locale == 0) || (0x7f < (int)param_2)) {\n    if (((byte)param_2 < 0x30) || (locale_mb_cur_max < 2)) {\n      param_1 = (byte *)strchr((char *)param_1,param_2);\n    }\n    else {\n      local_28.__count = 0;\n      local_28.__value.__wch = 0;\n      __n = strlen((char *)param_1);\n      for (; __n != 0; __n = __n - sVar2) {\n        bVar1 = *param_1;\n        if (((uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1) == 0) {\n          sVar2 = mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28);\n          if (0xfffffffb < sVar2 - 2) {\n            bVar1 = *param_1;\n            goto joined_r0x000ddae2;\n          }\n        }\n        else {\njoined_r0x000ddae2:\n          if (bVar1 == param_2) goto LAB_000ddb45;\n          sVar2 = 1;\n        }\n        param_1 = param_1 + sVar2;\n      }\n      param_1 = (byte *)0x0;\n    }\n  }\n  else {\n    param_1 = (byte *)utf8_mbschr(param_1,param_2);\n  }\nLAB_000ddb45:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0010f8b0();\n  }\n  return param_1;\n}\n\n" comment (function_definition "byte * mbschr(byte *param_1,uint param_2)\n\n{\n  byte bVar1;\n  size_t __n;\n  size_t sVar2;\n  int in_GS_OFFSET;\n  mbstate_t local_28;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0xdda59;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((locale_utf8locale == 0) || (0x7f < (int)param_2)) {\n    if (((byte)param_2 < 0x30) || (locale_mb_cur_max < 2)) {\n      param_1 = (byte *)strchr((char *)param_1,param_2);\n    }\n    else {\n      local_28.__count = 0;\n      local_28.__value.__wch = 0;\n      __n = strlen((char *)param_1);\n      for (; __n != 0; __n = __n - sVar2) {\n        bVar1 = *param_1;\n        if (((uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1) == 0) {\n          sVar2 = mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28);\n          if (0xfffffffb < sVar2 - 2) {\n            bVar1 = *param_1;\n            goto joined_r0x000ddae2;\n          }\n        }\n        else {\njoined_r0x000ddae2:\n          if (bVar1 == param_2) goto LAB_000ddb45;\n          sVar2 = 1;\n        }\n        param_1 = param_1 + sVar2;\n      }\n      param_1 = (byte *)0x0;\n    }\n  }\n  else {\n    param_1 = (byte *)utf8_mbschr(param_1,param_2);\n  }\nLAB_000ddb45:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0010f8b0();\n  }\n  return param_1;\n}" type_identifier (pointer_declarator "* mbschr(byte *param_1,uint param_2)" * (function_declarator "mbschr(byte *param_1,uint param_2)" identifier (parameter_list "(byte *param_1,uint param_2)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) )))) (compound_statement "{\n  byte bVar1;\n  size_t __n;\n  size_t sVar2;\n  int in_GS_OFFSET;\n  mbstate_t local_28;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0xdda59;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((locale_utf8locale == 0) || (0x7f < (int)param_2)) {\n    if (((byte)param_2 < 0x30) || (locale_mb_cur_max < 2)) {\n      param_1 = (byte *)strchr((char *)param_1,param_2);\n    }\n    else {\n      local_28.__count = 0;\n      local_28.__value.__wch = 0;\n      __n = strlen((char *)param_1);\n      for (; __n != 0; __n = __n - sVar2) {\n        bVar1 = *param_1;\n        if (((uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1) == 0) {\n          sVar2 = mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28);\n          if (0xfffffffb < sVar2 - 2) {\n            bVar1 = *param_1;\n            goto joined_r0x000ddae2;\n          }\n        }\n        else {\njoined_r0x000ddae2:\n          if (bVar1 == param_2) goto LAB_000ddb45;\n          sVar2 = 1;\n        }\n        param_1 = param_1 + sVar2;\n      }\n      param_1 = (byte *)0x0;\n    }\n  }\n  else {\n    param_1 = (byte *)utf8_mbschr(param_1,param_2);\n  }\nLAB_000ddb45:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0010f8b0();\n  }\n  return param_1;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "mbstate_t local_28;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0xdda59;" (assignment_expression "uStack_14 = 0xdda59" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if ((locale_utf8locale == 0) || (0x7f < (int)param_2)) {\n    if (((byte)param_2 < 0x30) || (locale_mb_cur_max < 2)) {\n      param_1 = (byte *)strchr((char *)param_1,param_2);\n    }\n    else {\n      local_28.__count = 0;\n      local_28.__value.__wch = 0;\n      __n = strlen((char *)param_1);\n      for (; __n != 0; __n = __n - sVar2) {\n        bVar1 = *param_1;\n        if (((uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1) == 0) {\n          sVar2 = mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28);\n          if (0xfffffffb < sVar2 - 2) {\n            bVar1 = *param_1;\n            goto joined_r0x000ddae2;\n          }\n        }\n        else {\njoined_r0x000ddae2:\n          if (bVar1 == param_2) goto LAB_000ddb45;\n          sVar2 = 1;\n        }\n        param_1 = param_1 + sVar2;\n      }\n      param_1 = (byte *)0x0;\n    }\n  }\n  else {\n    param_1 = (byte *)utf8_mbschr(param_1,param_2);\n  }" if (parenthesized_expression "((locale_utf8locale == 0) || (0x7f < (int)param_2))" ( (binary_expression "(locale_utf8locale == 0) || (0x7f < (int)param_2)" (parenthesized_expression "(locale_utf8locale == 0)" ( (binary_expression "locale_utf8locale == 0" identifier == number_literal) )) || (parenthesized_expression "(0x7f < (int)param_2)" ( (binary_expression "0x7f < (int)param_2" number_literal < (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) ))) )) (compound_statement "{\n    if (((byte)param_2 < 0x30) || (locale_mb_cur_max < 2)) {\n      param_1 = (byte *)strchr((char *)param_1,param_2);\n    }\n    else {\n      local_28.__count = 0;\n      local_28.__value.__wch = 0;\n      __n = strlen((char *)param_1);\n      for (; __n != 0; __n = __n - sVar2) {\n        bVar1 = *param_1;\n        if (((uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1) == 0) {\n          sVar2 = mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28);\n          if (0xfffffffb < sVar2 - 2) {\n            bVar1 = *param_1;\n            goto joined_r0x000ddae2;\n          }\n        }\n        else {\njoined_r0x000ddae2:\n          if (bVar1 == param_2) goto LAB_000ddb45;\n          sVar2 = 1;\n        }\n        param_1 = param_1 + sVar2;\n      }\n      param_1 = (byte *)0x0;\n    }\n  }" { (if_statement "if (((byte)param_2 < 0x30) || (locale_mb_cur_max < 2)) {\n      param_1 = (byte *)strchr((char *)param_1,param_2);\n    }\n    else {\n      local_28.__count = 0;\n      local_28.__value.__wch = 0;\n      __n = strlen((char *)param_1);\n      for (; __n != 0; __n = __n - sVar2) {\n        bVar1 = *param_1;\n        if (((uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1) == 0) {\n          sVar2 = mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28);\n          if (0xfffffffb < sVar2 - 2) {\n            bVar1 = *param_1;\n            goto joined_r0x000ddae2;\n          }\n        }\n        else {\njoined_r0x000ddae2:\n          if (bVar1 == param_2) goto LAB_000ddb45;\n          sVar2 = 1;\n        }\n        param_1 = param_1 + sVar2;\n      }\n      param_1 = (byte *)0x0;\n    }" if (parenthesized_expression "(((byte)param_2 < 0x30) || (locale_mb_cur_max < 2))" ( (binary_expression "((byte)param_2 < 0x30) || (locale_mb_cur_max < 2)" (parenthesized_expression "((byte)param_2 < 0x30)" ( (binary_expression "(byte)param_2 < 0x30" (cast_expression "(byte)param_2" ( (type_descriptor "byte" type_identifier) ) identifier) < number_literal) )) || (parenthesized_expression "(locale_mb_cur_max < 2)" ( (binary_expression "locale_mb_cur_max < 2" identifier < number_literal) ))) )) (compound_statement "{\n      param_1 = (byte *)strchr((char *)param_1,param_2);\n    }" { (expression_statement "param_1 = (byte *)strchr((char *)param_1,param_2);" (assignment_expression "param_1 = (byte *)strchr((char *)param_1,param_2)" identifier = (cast_expression "(byte *)strchr((char *)param_1,param_2)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "strchr((char *)param_1,param_2)" identifier (argument_list "((char *)param_1,param_2)" ( (cast_expression "(char *)param_1" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , identifier ))))) ;) }) (else_clause "else {\n      local_28.__count = 0;\n      local_28.__value.__wch = 0;\n      __n = strlen((char *)param_1);\n      for (; __n != 0; __n = __n - sVar2) {\n        bVar1 = *param_1;\n        if (((uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1) == 0) {\n          sVar2 = mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28);\n          if (0xfffffffb < sVar2 - 2) {\n            bVar1 = *param_1;\n            goto joined_r0x000ddae2;\n          }\n        }\n        else {\njoined_r0x000ddae2:\n          if (bVar1 == param_2) goto LAB_000ddb45;\n          sVar2 = 1;\n        }\n        param_1 = param_1 + sVar2;\n      }\n      param_1 = (byte *)0x0;\n    }" else (compound_statement "{\n      local_28.__count = 0;\n      local_28.__value.__wch = 0;\n      __n = strlen((char *)param_1);\n      for (; __n != 0; __n = __n - sVar2) {\n        bVar1 = *param_1;\n        if (((uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1) == 0) {\n          sVar2 = mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28);\n          if (0xfffffffb < sVar2 - 2) {\n            bVar1 = *param_1;\n            goto joined_r0x000ddae2;\n          }\n        }\n        else {\njoined_r0x000ddae2:\n          if (bVar1 == param_2) goto LAB_000ddb45;\n          sVar2 = 1;\n        }\n        param_1 = param_1 + sVar2;\n      }\n      param_1 = (byte *)0x0;\n    }" { (expression_statement "local_28.__count = 0;" (assignment_expression "local_28.__count = 0" (field_expression "local_28.__count" identifier . field_identifier) = number_literal) ;) (expression_statement "local_28.__value.__wch = 0;" (assignment_expression "local_28.__value.__wch = 0" (field_expression "local_28.__value.__wch" (field_expression "local_28.__value" identifier . field_identifier) . field_identifier) = number_literal) ;) (expression_statement "__n = strlen((char *)param_1);" (assignment_expression "__n = strlen((char *)param_1)" identifier = (call_expression "strlen((char *)param_1)" identifier (argument_list "((char *)param_1)" ( (cast_expression "(char *)param_1" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (for_statement "for (; __n != 0; __n = __n - sVar2) {\n        bVar1 = *param_1;\n        if (((uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1) == 0) {\n          sVar2 = mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28);\n          if (0xfffffffb < sVar2 - 2) {\n            bVar1 = *param_1;\n            goto joined_r0x000ddae2;\n          }\n        }\n        else {\njoined_r0x000ddae2:\n          if (bVar1 == param_2) goto LAB_000ddb45;\n          sVar2 = 1;\n        }\n        param_1 = param_1 + sVar2;\n      }" for ( ; (binary_expression "__n != 0" identifier != number_literal) ; (assignment_expression "__n = __n - sVar2" identifier = (binary_expression "__n - sVar2" identifier - identifier)) ) (compound_statement "{\n        bVar1 = *param_1;\n        if (((uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1) == 0) {\n          sVar2 = mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28);\n          if (0xfffffffb < sVar2 - 2) {\n            bVar1 = *param_1;\n            goto joined_r0x000ddae2;\n          }\n        }\n        else {\njoined_r0x000ddae2:\n          if (bVar1 == param_2) goto LAB_000ddb45;\n          sVar2 = 1;\n        }\n        param_1 = param_1 + sVar2;\n      }" { (expression_statement "bVar1 = *param_1;" (assignment_expression "bVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (if_statement "if (((uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1) == 0) {\n          sVar2 = mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28);\n          if (0xfffffffb < sVar2 - 2) {\n            bVar1 = *param_1;\n            goto joined_r0x000ddae2;\n          }\n        }\n        else {\njoined_r0x000ddae2:\n          if (bVar1 == param_2) goto LAB_000ddb45;\n          sVar2 = 1;\n        }" if (parenthesized_expression "(((uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1) == 0)" ( (binary_expression "((uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1) == 0" (parenthesized_expression "((uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1)" ( (binary_expression "(uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1" (binary_expression "(uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f)" (subscript_expression "(uint)(&is_basic_table)[bVar1 >> 5]" (call_expression "(uint)(&is_basic_table)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(&is_basic_table)" ( (pointer_expression "&is_basic_table" & identifier) ))) [ (binary_expression "bVar1 >> 5" identifier >> number_literal) ]) >> (parenthesized_expression "(bVar1 & 0x1f)" ( (binary_expression "bVar1 & 0x1f" identifier & number_literal) ))) & number_literal) )) == number_literal) )) (compound_statement "{\n          sVar2 = mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28);\n          if (0xfffffffb < sVar2 - 2) {\n            bVar1 = *param_1;\n            goto joined_r0x000ddae2;\n          }\n        }" { (expression_statement "sVar2 = mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28);" (assignment_expression "sVar2 = mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28)" identifier = (call_expression "mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28)" identifier (argument_list "((wchar_t *)0x0,(char *)param_1,__n,&local_28)" ( (cast_expression "(wchar_t *)0x0" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) , (cast_expression "(char *)param_1" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , identifier , (pointer_expression "&local_28" & identifier) )))) ;) (if_statement "if (0xfffffffb < sVar2 - 2) {\n            bVar1 = *param_1;\n            goto joined_r0x000ddae2;\n          }" if (parenthesized_expression "(0xfffffffb < sVar2 - 2)" ( (binary_expression "0xfffffffb < sVar2 - 2" number_literal < (binary_expression "sVar2 - 2" identifier - number_literal)) )) (compound_statement "{\n            bVar1 = *param_1;\n            goto joined_r0x000ddae2;\n          }" { (expression_statement "bVar1 = *param_1;" (assignment_expression "bVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (goto_statement "goto joined_r0x000ddae2;" goto statement_identifier ;) })) }) (else_clause "else {\njoined_r0x000ddae2:\n          if (bVar1 == param_2) goto LAB_000ddb45;\n          sVar2 = 1;\n        }" else (compound_statement "{\njoined_r0x000ddae2:\n          if (bVar1 == param_2) goto LAB_000ddb45;\n          sVar2 = 1;\n        }" { (labeled_statement "joined_r0x000ddae2:\n          if (bVar1 == param_2) goto LAB_000ddb45;" statement_identifier : (if_statement "if (bVar1 == param_2) goto LAB_000ddb45;" if (parenthesized_expression "(bVar1 == param_2)" ( (binary_expression "bVar1 == param_2" identifier == identifier) )) (goto_statement "goto LAB_000ddb45;" goto statement_identifier ;))) (expression_statement "sVar2 = 1;" (assignment_expression "sVar2 = 1" identifier = number_literal) ;) }))) (expression_statement "param_1 = param_1 + sVar2;" (assignment_expression "param_1 = param_1 + sVar2" identifier = (binary_expression "param_1 + sVar2" identifier + identifier)) ;) })) (expression_statement "param_1 = (byte *)0x0;" (assignment_expression "param_1 = (byte *)0x0" identifier = (cast_expression "(byte *)0x0" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }))) }) (else_clause "else {\n    param_1 = (byte *)utf8_mbschr(param_1,param_2);\n  }" else (compound_statement "{\n    param_1 = (byte *)utf8_mbschr(param_1,param_2);\n  }" { (expression_statement "param_1 = (byte *)utf8_mbschr(param_1,param_2);" (assignment_expression "param_1 = (byte *)utf8_mbschr(param_1,param_2)" identifier = (cast_expression "(byte *)utf8_mbschr(param_1,param_2)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "utf8_mbschr(param_1,param_2)" identifier (argument_list "(param_1,param_2)" ( identifier , identifier ))))) ;) }))) (labeled_statement "LAB_000ddb45:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0010f8b0();\n  }" statement_identifier : (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0010f8b0();\n  }" if (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    FUN_0010f8b0();\n  }" { comment (expression_statement "FUN_0010f8b0();" (call_expression "FUN_0010f8b0()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return param_1;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nchar * mbschr(char *s,int c)\n\n{\n  int iVar1;\n  byte bVar2;\n  size_t __n;\n  size_t sVar3;\n  int in_GS_OFFSET;\n  mbstate_t state;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((locale_utf8locale == 0) || (0x7f < c)) {\n    if (((byte)c < 0x30) || (locale_mb_cur_max < 2)) {\n      s = strchr(s,c);\n    }\n    else {\n      state.__count = 0;\n      state.__value.__wch = 0;\n      __n = strlen(s);\n      for (; __n != 0; __n = __n - sVar3) {\n        bVar2 = *s;\n        if (((uint)(&is_basic_table)[bVar2 >> 5] >> (bVar2 & 0x1f) & 1) == 0) {\n          sVar3 = mbrtowc((wchar_t *)0x0,s,__n,(mbstate_t *)&state);\n          if (0xfffffffb < sVar3 - 2) {\n            bVar2 = *s;\n            goto joined_r0x000ddae2;\n          }\n        }\n        else {\njoined_r0x000ddae2:\n          if ((uint)bVar2 == c) goto LAB_000ddb45;\n          sVar3 = 1;\n        }\n        s = (char *)((byte *)s + sVar3);\n      }\n      s = (char *)0x0;\n    }\n  }\n  else {\n    s = utf8_mbschr(s,c);\n  }\nLAB_000ddb45:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return s;\n}\n\n" comment comment (function_definition "char * mbschr(char *s,int c)\n\n{\n  int iVar1;\n  byte bVar2;\n  size_t __n;\n  size_t sVar3;\n  int in_GS_OFFSET;\n  mbstate_t state;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((locale_utf8locale == 0) || (0x7f < c)) {\n    if (((byte)c < 0x30) || (locale_mb_cur_max < 2)) {\n      s = strchr(s,c);\n    }\n    else {\n      state.__count = 0;\n      state.__value.__wch = 0;\n      __n = strlen(s);\n      for (; __n != 0; __n = __n - sVar3) {\n        bVar2 = *s;\n        if (((uint)(&is_basic_table)[bVar2 >> 5] >> (bVar2 & 0x1f) & 1) == 0) {\n          sVar3 = mbrtowc((wchar_t *)0x0,s,__n,(mbstate_t *)&state);\n          if (0xfffffffb < sVar3 - 2) {\n            bVar2 = *s;\n            goto joined_r0x000ddae2;\n          }\n        }\n        else {\njoined_r0x000ddae2:\n          if ((uint)bVar2 == c) goto LAB_000ddb45;\n          sVar3 = 1;\n        }\n        s = (char *)((byte *)s + sVar3);\n      }\n      s = (char *)0x0;\n    }\n  }\n  else {\n    s = utf8_mbschr(s,c);\n  }\nLAB_000ddb45:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return s;\n}" primitive_type (pointer_declarator "* mbschr(char *s,int c)" * (function_declarator "mbschr(char *s,int c)" identifier (parameter_list "(char *s,int c)" ( (parameter_declaration "char *s" primitive_type (pointer_declarator "*s" * identifier)) , (parameter_declaration "int c" primitive_type identifier) )))) (compound_statement "{\n  int iVar1;\n  byte bVar2;\n  size_t __n;\n  size_t sVar3;\n  int in_GS_OFFSET;\n  mbstate_t state;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((locale_utf8locale == 0) || (0x7f < c)) {\n    if (((byte)c < 0x30) || (locale_mb_cur_max < 2)) {\n      s = strchr(s,c);\n    }\n    else {\n      state.__count = 0;\n      state.__value.__wch = 0;\n      __n = strlen(s);\n      for (; __n != 0; __n = __n - sVar3) {\n        bVar2 = *s;\n        if (((uint)(&is_basic_table)[bVar2 >> 5] >> (bVar2 & 0x1f) & 1) == 0) {\n          sVar3 = mbrtowc((wchar_t *)0x0,s,__n,(mbstate_t *)&state);\n          if (0xfffffffb < sVar3 - 2) {\n            bVar2 = *s;\n            goto joined_r0x000ddae2;\n          }\n        }\n        else {\njoined_r0x000ddae2:\n          if ((uint)bVar2 == c) goto LAB_000ddb45;\n          sVar3 = 1;\n        }\n        s = (char *)((byte *)s + sVar3);\n      }\n      s = (char *)0x0;\n    }\n  }\n  else {\n    s = utf8_mbschr(s,c);\n  }\nLAB_000ddb45:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return s;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "byte bVar2;" type_identifier identifier ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "size_t sVar3;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "mbstate_t state;" type_identifier identifier ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if ((locale_utf8locale == 0) || (0x7f < c)) {\n    if (((byte)c < 0x30) || (locale_mb_cur_max < 2)) {\n      s = strchr(s,c);\n    }\n    else {\n      state.__count = 0;\n      state.__value.__wch = 0;\n      __n = strlen(s);\n      for (; __n != 0; __n = __n - sVar3) {\n        bVar2 = *s;\n        if (((uint)(&is_basic_table)[bVar2 >> 5] >> (bVar2 & 0x1f) & 1) == 0) {\n          sVar3 = mbrtowc((wchar_t *)0x0,s,__n,(mbstate_t *)&state);\n          if (0xfffffffb < sVar3 - 2) {\n            bVar2 = *s;\n            goto joined_r0x000ddae2;\n          }\n        }\n        else {\njoined_r0x000ddae2:\n          if ((uint)bVar2 == c) goto LAB_000ddb45;\n          sVar3 = 1;\n        }\n        s = (char *)((byte *)s + sVar3);\n      }\n      s = (char *)0x0;\n    }\n  }\n  else {\n    s = utf8_mbschr(s,c);\n  }" if (parenthesized_expression "((locale_utf8locale == 0) || (0x7f < c))" ( (binary_expression "(locale_utf8locale == 0) || (0x7f < c)" (parenthesized_expression "(locale_utf8locale == 0)" ( (binary_expression "locale_utf8locale == 0" identifier == number_literal) )) || (parenthesized_expression "(0x7f < c)" ( (binary_expression "0x7f < c" number_literal < identifier) ))) )) (compound_statement "{\n    if (((byte)c < 0x30) || (locale_mb_cur_max < 2)) {\n      s = strchr(s,c);\n    }\n    else {\n      state.__count = 0;\n      state.__value.__wch = 0;\n      __n = strlen(s);\n      for (; __n != 0; __n = __n - sVar3) {\n        bVar2 = *s;\n        if (((uint)(&is_basic_table)[bVar2 >> 5] >> (bVar2 & 0x1f) & 1) == 0) {\n          sVar3 = mbrtowc((wchar_t *)0x0,s,__n,(mbstate_t *)&state);\n          if (0xfffffffb < sVar3 - 2) {\n            bVar2 = *s;\n            goto joined_r0x000ddae2;\n          }\n        }\n        else {\njoined_r0x000ddae2:\n          if ((uint)bVar2 == c) goto LAB_000ddb45;\n          sVar3 = 1;\n        }\n        s = (char *)((byte *)s + sVar3);\n      }\n      s = (char *)0x0;\n    }\n  }" { (if_statement "if (((byte)c < 0x30) || (locale_mb_cur_max < 2)) {\n      s = strchr(s,c);\n    }\n    else {\n      state.__count = 0;\n      state.__value.__wch = 0;\n      __n = strlen(s);\n      for (; __n != 0; __n = __n - sVar3) {\n        bVar2 = *s;\n        if (((uint)(&is_basic_table)[bVar2 >> 5] >> (bVar2 & 0x1f) & 1) == 0) {\n          sVar3 = mbrtowc((wchar_t *)0x0,s,__n,(mbstate_t *)&state);\n          if (0xfffffffb < sVar3 - 2) {\n            bVar2 = *s;\n            goto joined_r0x000ddae2;\n          }\n        }\n        else {\njoined_r0x000ddae2:\n          if ((uint)bVar2 == c) goto LAB_000ddb45;\n          sVar3 = 1;\n        }\n        s = (char *)((byte *)s + sVar3);\n      }\n      s = (char *)0x0;\n    }" if (parenthesized_expression "(((byte)c < 0x30) || (locale_mb_cur_max < 2))" ( (binary_expression "((byte)c < 0x30) || (locale_mb_cur_max < 2)" (parenthesized_expression "((byte)c < 0x30)" ( (binary_expression "(byte)c < 0x30" (cast_expression "(byte)c" ( (type_descriptor "byte" type_identifier) ) identifier) < number_literal) )) || (parenthesized_expression "(locale_mb_cur_max < 2)" ( (binary_expression "locale_mb_cur_max < 2" identifier < number_literal) ))) )) (compound_statement "{\n      s = strchr(s,c);\n    }" { (expression_statement "s = strchr(s,c);" (assignment_expression "s = strchr(s,c)" identifier = (call_expression "strchr(s,c)" identifier (argument_list "(s,c)" ( identifier , identifier )))) ;) }) (else_clause "else {\n      state.__count = 0;\n      state.__value.__wch = 0;\n      __n = strlen(s);\n      for (; __n != 0; __n = __n - sVar3) {\n        bVar2 = *s;\n        if (((uint)(&is_basic_table)[bVar2 >> 5] >> (bVar2 & 0x1f) & 1) == 0) {\n          sVar3 = mbrtowc((wchar_t *)0x0,s,__n,(mbstate_t *)&state);\n          if (0xfffffffb < sVar3 - 2) {\n            bVar2 = *s;\n            goto joined_r0x000ddae2;\n          }\n        }\n        else {\njoined_r0x000ddae2:\n          if ((uint)bVar2 == c) goto LAB_000ddb45;\n          sVar3 = 1;\n        }\n        s = (char *)((byte *)s + sVar3);\n      }\n      s = (char *)0x0;\n    }" else (compound_statement "{\n      state.__count = 0;\n      state.__value.__wch = 0;\n      __n = strlen(s);\n      for (; __n != 0; __n = __n - sVar3) {\n        bVar2 = *s;\n        if (((uint)(&is_basic_table)[bVar2 >> 5] >> (bVar2 & 0x1f) & 1) == 0) {\n          sVar3 = mbrtowc((wchar_t *)0x0,s,__n,(mbstate_t *)&state);\n          if (0xfffffffb < sVar3 - 2) {\n            bVar2 = *s;\n            goto joined_r0x000ddae2;\n          }\n        }\n        else {\njoined_r0x000ddae2:\n          if ((uint)bVar2 == c) goto LAB_000ddb45;\n          sVar3 = 1;\n        }\n        s = (char *)((byte *)s + sVar3);\n      }\n      s = (char *)0x0;\n    }" { (expression_statement "state.__count = 0;" (assignment_expression "state.__count = 0" (field_expression "state.__count" identifier . field_identifier) = number_literal) ;) (expression_statement "state.__value.__wch = 0;" (assignment_expression "state.__value.__wch = 0" (field_expression "state.__value.__wch" (field_expression "state.__value" identifier . field_identifier) . field_identifier) = number_literal) ;) (expression_statement "__n = strlen(s);" (assignment_expression "__n = strlen(s)" identifier = (call_expression "strlen(s)" identifier (argument_list "(s)" ( identifier )))) ;) (for_statement "for (; __n != 0; __n = __n - sVar3) {\n        bVar2 = *s;\n        if (((uint)(&is_basic_table)[bVar2 >> 5] >> (bVar2 & 0x1f) & 1) == 0) {\n          sVar3 = mbrtowc((wchar_t *)0x0,s,__n,(mbstate_t *)&state);\n          if (0xfffffffb < sVar3 - 2) {\n            bVar2 = *s;\n            goto joined_r0x000ddae2;\n          }\n        }\n        else {\njoined_r0x000ddae2:\n          if ((uint)bVar2 == c) goto LAB_000ddb45;\n          sVar3 = 1;\n        }\n        s = (char *)((byte *)s + sVar3);\n      }" for ( ; (binary_expression "__n != 0" identifier != number_literal) ; (assignment_expression "__n = __n - sVar3" identifier = (binary_expression "__n - sVar3" identifier - identifier)) ) (compound_statement "{\n        bVar2 = *s;\n        if (((uint)(&is_basic_table)[bVar2 >> 5] >> (bVar2 & 0x1f) & 1) == 0) {\n          sVar3 = mbrtowc((wchar_t *)0x0,s,__n,(mbstate_t *)&state);\n          if (0xfffffffb < sVar3 - 2) {\n            bVar2 = *s;\n            goto joined_r0x000ddae2;\n          }\n        }\n        else {\njoined_r0x000ddae2:\n          if ((uint)bVar2 == c) goto LAB_000ddb45;\n          sVar3 = 1;\n        }\n        s = (char *)((byte *)s + sVar3);\n      }" { (expression_statement "bVar2 = *s;" (assignment_expression "bVar2 = *s" identifier = (pointer_expression "*s" * identifier)) ;) (if_statement "if (((uint)(&is_basic_table)[bVar2 >> 5] >> (bVar2 & 0x1f) & 1) == 0) {\n          sVar3 = mbrtowc((wchar_t *)0x0,s,__n,(mbstate_t *)&state);\n          if (0xfffffffb < sVar3 - 2) {\n            bVar2 = *s;\n            goto joined_r0x000ddae2;\n          }\n        }\n        else {\njoined_r0x000ddae2:\n          if ((uint)bVar2 == c) goto LAB_000ddb45;\n          sVar3 = 1;\n        }" if (parenthesized_expression "(((uint)(&is_basic_table)[bVar2 >> 5] >> (bVar2 & 0x1f) & 1) == 0)" ( (binary_expression "((uint)(&is_basic_table)[bVar2 >> 5] >> (bVar2 & 0x1f) & 1) == 0" (parenthesized_expression "((uint)(&is_basic_table)[bVar2 >> 5] >> (bVar2 & 0x1f) & 1)" ( (binary_expression "(uint)(&is_basic_table)[bVar2 >> 5] >> (bVar2 & 0x1f) & 1" (binary_expression "(uint)(&is_basic_table)[bVar2 >> 5] >> (bVar2 & 0x1f)" (subscript_expression "(uint)(&is_basic_table)[bVar2 >> 5]" (call_expression "(uint)(&is_basic_table)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(&is_basic_table)" ( (pointer_expression "&is_basic_table" & identifier) ))) [ (binary_expression "bVar2 >> 5" identifier >> number_literal) ]) >> (parenthesized_expression "(bVar2 & 0x1f)" ( (binary_expression "bVar2 & 0x1f" identifier & number_literal) ))) & number_literal) )) == number_literal) )) (compound_statement "{\n          sVar3 = mbrtowc((wchar_t *)0x0,s,__n,(mbstate_t *)&state);\n          if (0xfffffffb < sVar3 - 2) {\n            bVar2 = *s;\n            goto joined_r0x000ddae2;\n          }\n        }" { (expression_statement "sVar3 = mbrtowc((wchar_t *)0x0,s,__n,(mbstate_t *)&state);" (assignment_expression "sVar3 = mbrtowc((wchar_t *)0x0,s,__n,(mbstate_t *)&state)" identifier = (call_expression "mbrtowc((wchar_t *)0x0,s,__n,(mbstate_t *)&state)" identifier (argument_list "((wchar_t *)0x0,s,__n,(mbstate_t *)&state)" ( (cast_expression "(wchar_t *)0x0" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) , identifier , identifier , (cast_expression "(mbstate_t *)&state" ( (type_descriptor "mbstate_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&state" & identifier)) )))) ;) (if_statement "if (0xfffffffb < sVar3 - 2) {\n            bVar2 = *s;\n            goto joined_r0x000ddae2;\n          }" if (parenthesized_expression "(0xfffffffb < sVar3 - 2)" ( (binary_expression "0xfffffffb < sVar3 - 2" number_literal < (binary_expression "sVar3 - 2" identifier - number_literal)) )) (compound_statement "{\n            bVar2 = *s;\n            goto joined_r0x000ddae2;\n          }" { (expression_statement "bVar2 = *s;" (assignment_expression "bVar2 = *s" identifier = (pointer_expression "*s" * identifier)) ;) (goto_statement "goto joined_r0x000ddae2;" goto statement_identifier ;) })) }) (else_clause "else {\njoined_r0x000ddae2:\n          if ((uint)bVar2 == c) goto LAB_000ddb45;\n          sVar3 = 1;\n        }" else (compound_statement "{\njoined_r0x000ddae2:\n          if ((uint)bVar2 == c) goto LAB_000ddb45;\n          sVar3 = 1;\n        }" { (labeled_statement "joined_r0x000ddae2:\n          if ((uint)bVar2 == c) goto LAB_000ddb45;" statement_identifier : (if_statement "if ((uint)bVar2 == c) goto LAB_000ddb45;" if (parenthesized_expression "((uint)bVar2 == c)" ( (binary_expression "(uint)bVar2 == c" (cast_expression "(uint)bVar2" ( (type_descriptor "uint" type_identifier) ) identifier) == identifier) )) (goto_statement "goto LAB_000ddb45;" goto statement_identifier ;))) (expression_statement "sVar3 = 1;" (assignment_expression "sVar3 = 1" identifier = number_literal) ;) }))) (expression_statement "s = (char *)((byte *)s + sVar3);" (assignment_expression "s = (char *)((byte *)s + sVar3)" identifier = (cast_expression "(char *)((byte *)s + sVar3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((byte *)s + sVar3)" ( (binary_expression "(byte *)s + sVar3" (cast_expression "(byte *)s" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) + identifier) )))) ;) })) (expression_statement "s = (char *)0x0;" (assignment_expression "s = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }))) }) (else_clause "else {\n    s = utf8_mbschr(s,c);\n  }" else (compound_statement "{\n    s = utf8_mbschr(s,c);\n  }" { (expression_statement "s = utf8_mbschr(s,c);" (assignment_expression "s = utf8_mbschr(s,c)" identifier = (call_expression "utf8_mbschr(s,c)" identifier (argument_list "(s,c)" ( identifier , identifier )))) ;) }))) (labeled_statement "LAB_000ddb45:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" statement_identifier : (if_statement "if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" if (parenthesized_expression "(iVar1 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" { comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return s;" return identifier ;) })))
(translation_unit "byte * mbschr(byte *param_1,uint param_2)\n\n{\n  byte bVar1;\n  size_t __n;\n  size_t sVar2;\n  int in_GS_OFFSET;\n  mbstate_t local_28;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0xdda59;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((locale_utf8locale == 0) || (0x7f < (int)param_2)) {\n    if (((byte)param_2 < 0x30) || (locale_mb_cur_max < 2)) {\n      param_1 = (byte *)strchr((char *)param_1,param_2);\n    }\n    else {\n      local_28.__count = 0;\n      local_28.__value.__wch = 0;\n      __n = strlen((char *)param_1);\n      for (; __n != 0; __n = __n - sVar2) {\n        bVar1 = *param_1;\n        if (((uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1) == 0) {\n          sVar2 = mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28);\n          if (0xfffffffb < sVar2 - 2) {\n            bVar1 = *param_1;\n            goto joined_r0x000ddae2;\n          }\n        }\n        else {\njoined_r0x000ddae2:\n          if (bVar1 == param_2) goto LAB_000ddb45;\n          sVar2 = 1;\n        }\n        param_1 = param_1 + sVar2;\n      }\n      param_1 = (byte *)0x0;\n    }\n  }\n  else {\n    param_1 = (byte *)utf8_mbschr(param_1,param_2);\n  }\nLAB_000ddb45:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0010f8b0();\n  }\n  return param_1;\n}\n\n" (function_definition "byte * mbschr(byte *param_1,uint param_2)\n\n{\n  byte bVar1;\n  size_t __n;\n  size_t sVar2;\n  int in_GS_OFFSET;\n  mbstate_t local_28;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0xdda59;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((locale_utf8locale == 0) || (0x7f < (int)param_2)) {\n    if (((byte)param_2 < 0x30) || (locale_mb_cur_max < 2)) {\n      param_1 = (byte *)strchr((char *)param_1,param_2);\n    }\n    else {\n      local_28.__count = 0;\n      local_28.__value.__wch = 0;\n      __n = strlen((char *)param_1);\n      for (; __n != 0; __n = __n - sVar2) {\n        bVar1 = *param_1;\n        if (((uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1) == 0) {\n          sVar2 = mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28);\n          if (0xfffffffb < sVar2 - 2) {\n            bVar1 = *param_1;\n            goto joined_r0x000ddae2;\n          }\n        }\n        else {\njoined_r0x000ddae2:\n          if (bVar1 == param_2) goto LAB_000ddb45;\n          sVar2 = 1;\n        }\n        param_1 = param_1 + sVar2;\n      }\n      param_1 = (byte *)0x0;\n    }\n  }\n  else {\n    param_1 = (byte *)utf8_mbschr(param_1,param_2);\n  }\nLAB_000ddb45:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0010f8b0();\n  }\n  return param_1;\n}" type_identifier (pointer_declarator "* mbschr(byte *param_1,uint param_2)" * (function_declarator "mbschr(byte *param_1,uint param_2)" identifier (parameter_list "(byte *param_1,uint param_2)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) )))) (compound_statement "{\n  byte bVar1;\n  size_t __n;\n  size_t sVar2;\n  int in_GS_OFFSET;\n  mbstate_t local_28;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0xdda59;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((locale_utf8locale == 0) || (0x7f < (int)param_2)) {\n    if (((byte)param_2 < 0x30) || (locale_mb_cur_max < 2)) {\n      param_1 = (byte *)strchr((char *)param_1,param_2);\n    }\n    else {\n      local_28.__count = 0;\n      local_28.__value.__wch = 0;\n      __n = strlen((char *)param_1);\n      for (; __n != 0; __n = __n - sVar2) {\n        bVar1 = *param_1;\n        if (((uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1) == 0) {\n          sVar2 = mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28);\n          if (0xfffffffb < sVar2 - 2) {\n            bVar1 = *param_1;\n            goto joined_r0x000ddae2;\n          }\n        }\n        else {\njoined_r0x000ddae2:\n          if (bVar1 == param_2) goto LAB_000ddb45;\n          sVar2 = 1;\n        }\n        param_1 = param_1 + sVar2;\n      }\n      param_1 = (byte *)0x0;\n    }\n  }\n  else {\n    param_1 = (byte *)utf8_mbschr(param_1,param_2);\n  }\nLAB_000ddb45:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0010f8b0();\n  }\n  return param_1;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "mbstate_t local_28;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0xdda59;" (assignment_expression "uStack_14 = 0xdda59" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if ((locale_utf8locale == 0) || (0x7f < (int)param_2)) {\n    if (((byte)param_2 < 0x30) || (locale_mb_cur_max < 2)) {\n      param_1 = (byte *)strchr((char *)param_1,param_2);\n    }\n    else {\n      local_28.__count = 0;\n      local_28.__value.__wch = 0;\n      __n = strlen((char *)param_1);\n      for (; __n != 0; __n = __n - sVar2) {\n        bVar1 = *param_1;\n        if (((uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1) == 0) {\n          sVar2 = mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28);\n          if (0xfffffffb < sVar2 - 2) {\n            bVar1 = *param_1;\n            goto joined_r0x000ddae2;\n          }\n        }\n        else {\njoined_r0x000ddae2:\n          if (bVar1 == param_2) goto LAB_000ddb45;\n          sVar2 = 1;\n        }\n        param_1 = param_1 + sVar2;\n      }\n      param_1 = (byte *)0x0;\n    }\n  }\n  else {\n    param_1 = (byte *)utf8_mbschr(param_1,param_2);\n  }" if (parenthesized_expression "((locale_utf8locale == 0) || (0x7f < (int)param_2))" ( (binary_expression "(locale_utf8locale == 0) || (0x7f < (int)param_2)" (parenthesized_expression "(locale_utf8locale == 0)" ( (binary_expression "locale_utf8locale == 0" identifier == number_literal) )) || (parenthesized_expression "(0x7f < (int)param_2)" ( (binary_expression "0x7f < (int)param_2" number_literal < (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) ))) )) (compound_statement "{\n    if (((byte)param_2 < 0x30) || (locale_mb_cur_max < 2)) {\n      param_1 = (byte *)strchr((char *)param_1,param_2);\n    }\n    else {\n      local_28.__count = 0;\n      local_28.__value.__wch = 0;\n      __n = strlen((char *)param_1);\n      for (; __n != 0; __n = __n - sVar2) {\n        bVar1 = *param_1;\n        if (((uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1) == 0) {\n          sVar2 = mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28);\n          if (0xfffffffb < sVar2 - 2) {\n            bVar1 = *param_1;\n            goto joined_r0x000ddae2;\n          }\n        }\n        else {\njoined_r0x000ddae2:\n          if (bVar1 == param_2) goto LAB_000ddb45;\n          sVar2 = 1;\n        }\n        param_1 = param_1 + sVar2;\n      }\n      param_1 = (byte *)0x0;\n    }\n  }" { (if_statement "if (((byte)param_2 < 0x30) || (locale_mb_cur_max < 2)) {\n      param_1 = (byte *)strchr((char *)param_1,param_2);\n    }\n    else {\n      local_28.__count = 0;\n      local_28.__value.__wch = 0;\n      __n = strlen((char *)param_1);\n      for (; __n != 0; __n = __n - sVar2) {\n        bVar1 = *param_1;\n        if (((uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1) == 0) {\n          sVar2 = mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28);\n          if (0xfffffffb < sVar2 - 2) {\n            bVar1 = *param_1;\n            goto joined_r0x000ddae2;\n          }\n        }\n        else {\njoined_r0x000ddae2:\n          if (bVar1 == param_2) goto LAB_000ddb45;\n          sVar2 = 1;\n        }\n        param_1 = param_1 + sVar2;\n      }\n      param_1 = (byte *)0x0;\n    }" if (parenthesized_expression "(((byte)param_2 < 0x30) || (locale_mb_cur_max < 2))" ( (binary_expression "((byte)param_2 < 0x30) || (locale_mb_cur_max < 2)" (parenthesized_expression "((byte)param_2 < 0x30)" ( (binary_expression "(byte)param_2 < 0x30" (cast_expression "(byte)param_2" ( (type_descriptor "byte" type_identifier) ) identifier) < number_literal) )) || (parenthesized_expression "(locale_mb_cur_max < 2)" ( (binary_expression "locale_mb_cur_max < 2" identifier < number_literal) ))) )) (compound_statement "{\n      param_1 = (byte *)strchr((char *)param_1,param_2);\n    }" { (expression_statement "param_1 = (byte *)strchr((char *)param_1,param_2);" (assignment_expression "param_1 = (byte *)strchr((char *)param_1,param_2)" identifier = (cast_expression "(byte *)strchr((char *)param_1,param_2)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "strchr((char *)param_1,param_2)" identifier (argument_list "((char *)param_1,param_2)" ( (cast_expression "(char *)param_1" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , identifier ))))) ;) }) (else_clause "else {\n      local_28.__count = 0;\n      local_28.__value.__wch = 0;\n      __n = strlen((char *)param_1);\n      for (; __n != 0; __n = __n - sVar2) {\n        bVar1 = *param_1;\n        if (((uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1) == 0) {\n          sVar2 = mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28);\n          if (0xfffffffb < sVar2 - 2) {\n            bVar1 = *param_1;\n            goto joined_r0x000ddae2;\n          }\n        }\n        else {\njoined_r0x000ddae2:\n          if (bVar1 == param_2) goto LAB_000ddb45;\n          sVar2 = 1;\n        }\n        param_1 = param_1 + sVar2;\n      }\n      param_1 = (byte *)0x0;\n    }" else (compound_statement "{\n      local_28.__count = 0;\n      local_28.__value.__wch = 0;\n      __n = strlen((char *)param_1);\n      for (; __n != 0; __n = __n - sVar2) {\n        bVar1 = *param_1;\n        if (((uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1) == 0) {\n          sVar2 = mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28);\n          if (0xfffffffb < sVar2 - 2) {\n            bVar1 = *param_1;\n            goto joined_r0x000ddae2;\n          }\n        }\n        else {\njoined_r0x000ddae2:\n          if (bVar1 == param_2) goto LAB_000ddb45;\n          sVar2 = 1;\n        }\n        param_1 = param_1 + sVar2;\n      }\n      param_1 = (byte *)0x0;\n    }" { (expression_statement "local_28.__count = 0;" (assignment_expression "local_28.__count = 0" (field_expression "local_28.__count" identifier . field_identifier) = number_literal) ;) (expression_statement "local_28.__value.__wch = 0;" (assignment_expression "local_28.__value.__wch = 0" (field_expression "local_28.__value.__wch" (field_expression "local_28.__value" identifier . field_identifier) . field_identifier) = number_literal) ;) (expression_statement "__n = strlen((char *)param_1);" (assignment_expression "__n = strlen((char *)param_1)" identifier = (call_expression "strlen((char *)param_1)" identifier (argument_list "((char *)param_1)" ( (cast_expression "(char *)param_1" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (for_statement "for (; __n != 0; __n = __n - sVar2) {\n        bVar1 = *param_1;\n        if (((uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1) == 0) {\n          sVar2 = mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28);\n          if (0xfffffffb < sVar2 - 2) {\n            bVar1 = *param_1;\n            goto joined_r0x000ddae2;\n          }\n        }\n        else {\njoined_r0x000ddae2:\n          if (bVar1 == param_2) goto LAB_000ddb45;\n          sVar2 = 1;\n        }\n        param_1 = param_1 + sVar2;\n      }" for ( ; (binary_expression "__n != 0" identifier != number_literal) ; (assignment_expression "__n = __n - sVar2" identifier = (binary_expression "__n - sVar2" identifier - identifier)) ) (compound_statement "{\n        bVar1 = *param_1;\n        if (((uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1) == 0) {\n          sVar2 = mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28);\n          if (0xfffffffb < sVar2 - 2) {\n            bVar1 = *param_1;\n            goto joined_r0x000ddae2;\n          }\n        }\n        else {\njoined_r0x000ddae2:\n          if (bVar1 == param_2) goto LAB_000ddb45;\n          sVar2 = 1;\n        }\n        param_1 = param_1 + sVar2;\n      }" { (expression_statement "bVar1 = *param_1;" (assignment_expression "bVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (if_statement "if (((uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1) == 0) {\n          sVar2 = mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28);\n          if (0xfffffffb < sVar2 - 2) {\n            bVar1 = *param_1;\n            goto joined_r0x000ddae2;\n          }\n        }\n        else {\njoined_r0x000ddae2:\n          if (bVar1 == param_2) goto LAB_000ddb45;\n          sVar2 = 1;\n        }" if (parenthesized_expression "(((uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1) == 0)" ( (binary_expression "((uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1) == 0" (parenthesized_expression "((uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1)" ( (binary_expression "(uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1" (binary_expression "(uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f)" (subscript_expression "(uint)(&is_basic_table)[bVar1 >> 5]" (call_expression "(uint)(&is_basic_table)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(&is_basic_table)" ( (pointer_expression "&is_basic_table" & identifier) ))) [ (binary_expression "bVar1 >> 5" identifier >> number_literal) ]) >> (parenthesized_expression "(bVar1 & 0x1f)" ( (binary_expression "bVar1 & 0x1f" identifier & number_literal) ))) & number_literal) )) == number_literal) )) (compound_statement "{\n          sVar2 = mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28);\n          if (0xfffffffb < sVar2 - 2) {\n            bVar1 = *param_1;\n            goto joined_r0x000ddae2;\n          }\n        }" { (expression_statement "sVar2 = mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28);" (assignment_expression "sVar2 = mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28)" identifier = (call_expression "mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28)" identifier (argument_list "((wchar_t *)0x0,(char *)param_1,__n,&local_28)" ( (cast_expression "(wchar_t *)0x0" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) , (cast_expression "(char *)param_1" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , identifier , (pointer_expression "&local_28" & identifier) )))) ;) (if_statement "if (0xfffffffb < sVar2 - 2) {\n            bVar1 = *param_1;\n            goto joined_r0x000ddae2;\n          }" if (parenthesized_expression "(0xfffffffb < sVar2 - 2)" ( (binary_expression "0xfffffffb < sVar2 - 2" number_literal < (binary_expression "sVar2 - 2" identifier - number_literal)) )) (compound_statement "{\n            bVar1 = *param_1;\n            goto joined_r0x000ddae2;\n          }" { (expression_statement "bVar1 = *param_1;" (assignment_expression "bVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (goto_statement "goto joined_r0x000ddae2;" goto statement_identifier ;) })) }) (else_clause "else {\njoined_r0x000ddae2:\n          if (bVar1 == param_2) goto LAB_000ddb45;\n          sVar2 = 1;\n        }" else (compound_statement "{\njoined_r0x000ddae2:\n          if (bVar1 == param_2) goto LAB_000ddb45;\n          sVar2 = 1;\n        }" { (labeled_statement "joined_r0x000ddae2:\n          if (bVar1 == param_2) goto LAB_000ddb45;" statement_identifier : (if_statement "if (bVar1 == param_2) goto LAB_000ddb45;" if (parenthesized_expression "(bVar1 == param_2)" ( (binary_expression "bVar1 == param_2" identifier == identifier) )) (goto_statement "goto LAB_000ddb45;" goto statement_identifier ;))) (expression_statement "sVar2 = 1;" (assignment_expression "sVar2 = 1" identifier = number_literal) ;) }))) (expression_statement "param_1 = param_1 + sVar2;" (assignment_expression "param_1 = param_1 + sVar2" identifier = (binary_expression "param_1 + sVar2" identifier + identifier)) ;) })) (expression_statement "param_1 = (byte *)0x0;" (assignment_expression "param_1 = (byte *)0x0" identifier = (cast_expression "(byte *)0x0" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }))) }) (else_clause "else {\n    param_1 = (byte *)utf8_mbschr(param_1,param_2);\n  }" else (compound_statement "{\n    param_1 = (byte *)utf8_mbschr(param_1,param_2);\n  }" { (expression_statement "param_1 = (byte *)utf8_mbschr(param_1,param_2);" (assignment_expression "param_1 = (byte *)utf8_mbschr(param_1,param_2)" identifier = (cast_expression "(byte *)utf8_mbschr(param_1,param_2)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "utf8_mbschr(param_1,param_2)" identifier (argument_list "(param_1,param_2)" ( identifier , identifier ))))) ;) }))) (labeled_statement "LAB_000ddb45:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0010f8b0();\n  }" statement_identifier : (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0010f8b0();\n  }" if (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    \n    FUN_0010f8b0();\n  }" { (expression_statement "FUN_0010f8b0();" (call_expression "FUN_0010f8b0()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return param_1;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) || (parenthesized_expression ( (binary_expression LIT < (cast_expression ( (type_descriptor TYPE) ) IDENT)) ))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < LIT) )) || (parenthesized_expression ( (binary_expression IDENT < LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT) , IDENT ))))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression (field_expression IDENT . field_identifier) = LIT) ;) (expression_statement (assignment_expression (field_expression (field_expression IDENT . field_identifier) . field_identifier) = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT) )))) ;) (for_statement for ( ; (binary_expression IDENT != LIT) ; (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (binary_expression (subscript_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (pointer_expression & IDENT) ))) [ (binary_expression IDENT >> LIT) ]) >> (parenthesized_expression ( (binary_expression IDENT & LIT) ))) & LIT) )) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) , (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT) , IDENT , (pointer_expression & IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < (binary_expression IDENT - LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (goto_statement goto statement_identifier ;) })) }) (else_clause else (compound_statement { (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (goto_statement goto statement_identifier ;))) (expression_statement (assignment_expression IDENT = LIT) ;) }))) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) }))) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , IDENT ))))) ;) }))) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) }))) (return_statement return IDENT ;) })))
(function_definition "byte * mbschr(byte *param_1,uint param_2)\n\n{\n  byte bVar1;\n  size_t __n;\n  size_t sVar2;\n  int in_GS_OFFSET;\n  mbstate_t local_28;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0xdda59;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((locale_utf8locale == 0) || (0x7f < (int)param_2)) {\n    if (((byte)param_2 < 0x30) || (locale_mb_cur_max < 2)) {\n      param_1 = (byte *)strchr((char *)param_1,param_2);\n    }\n    else {\n      local_28.__count = 0;\n      local_28.__value.__wch = 0;\n      __n = strlen((char *)param_1);\n      for (; __n != 0; __n = __n - sVar2) {\n        bVar1 = *param_1;\n        if (((uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1) == 0) {\n          sVar2 = mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28);\n          if (0xfffffffb < sVar2 - 2) {\n            bVar1 = *param_1;\n            goto joined_r0x000ddae2;\n          }\n        }\n        else {\njoined_r0x000ddae2:\n          if (bVar1 == param_2) goto LAB_000ddb45;\n          sVar2 = 1;\n        }\n        param_1 = param_1 + sVar2;\n      }\n      param_1 = (byte *)0x0;\n    }\n  }\n  else {\n    param_1 = (byte *)utf8_mbschr(param_1,param_2);\n  }\nLAB_000ddb45:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0010f8b0();\n  }\n  return param_1;\n}" (type_identifier "byte") (pointer_declarator "* mbschr(byte *param_1,uint param_2)" (* "*") (function_declarator "mbschr(byte *param_1,uint param_2)" (identifier "mbschr") (parameter_list "(byte *param_1,uint param_2)" (( "(") (parameter_declaration "byte *param_1" (type_identifier "byte") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) () ")")))) (compound_statement "{\n  byte bVar1;\n  size_t __n;\n  size_t sVar2;\n  int in_GS_OFFSET;\n  mbstate_t local_28;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0xdda59;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((locale_utf8locale == 0) || (0x7f < (int)param_2)) {\n    if (((byte)param_2 < 0x30) || (locale_mb_cur_max < 2)) {\n      param_1 = (byte *)strchr((char *)param_1,param_2);\n    }\n    else {\n      local_28.__count = 0;\n      local_28.__value.__wch = 0;\n      __n = strlen((char *)param_1);\n      for (; __n != 0; __n = __n - sVar2) {\n        bVar1 = *param_1;\n        if (((uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1) == 0) {\n          sVar2 = mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28);\n          if (0xfffffffb < sVar2 - 2) {\n            bVar1 = *param_1;\n            goto joined_r0x000ddae2;\n          }\n        }\n        else {\njoined_r0x000ddae2:\n          if (bVar1 == param_2) goto LAB_000ddb45;\n          sVar2 = 1;\n        }\n        param_1 = param_1 + sVar2;\n      }\n      param_1 = (byte *)0x0;\n    }\n  }\n  else {\n    param_1 = (byte *)utf8_mbschr(param_1,param_2);\n  }\nLAB_000ddb45:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0010f8b0();\n  }\n  return param_1;\n}" ({ "{") (declaration "byte bVar1;" (type_identifier "byte") (identifier "bVar1") (; ";")) (declaration "size_t __n;" (primitive_type "size_t") (identifier "__n") (; ";")) (declaration "size_t sVar2;" (primitive_type "size_t") (identifier "sVar2") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "mbstate_t local_28;" (type_identifier "mbstate_t") (identifier "local_28") (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0xdda59;" (assignment_expression "uStack_14 = 0xdda59" (identifier "uStack_14") (= "=") (number_literal "0xdda59")) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (if_statement "if ((locale_utf8locale == 0) || (0x7f < (int)param_2)) {\n    if (((byte)param_2 < 0x30) || (locale_mb_cur_max < 2)) {\n      param_1 = (byte *)strchr((char *)param_1,param_2);\n    }\n    else {\n      local_28.__count = 0;\n      local_28.__value.__wch = 0;\n      __n = strlen((char *)param_1);\n      for (; __n != 0; __n = __n - sVar2) {\n        bVar1 = *param_1;\n        if (((uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1) == 0) {\n          sVar2 = mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28);\n          if (0xfffffffb < sVar2 - 2) {\n            bVar1 = *param_1;\n            goto joined_r0x000ddae2;\n          }\n        }\n        else {\njoined_r0x000ddae2:\n          if (bVar1 == param_2) goto LAB_000ddb45;\n          sVar2 = 1;\n        }\n        param_1 = param_1 + sVar2;\n      }\n      param_1 = (byte *)0x0;\n    }\n  }\n  else {\n    param_1 = (byte *)utf8_mbschr(param_1,param_2);\n  }" (if "if") (parenthesized_expression "((locale_utf8locale == 0) || (0x7f < (int)param_2))" (( "(") (binary_expression "(locale_utf8locale == 0) || (0x7f < (int)param_2)" (parenthesized_expression "(locale_utf8locale == 0)" (( "(") (binary_expression "locale_utf8locale == 0" (identifier "locale_utf8locale") (== "==") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(0x7f < (int)param_2)" (( "(") (binary_expression "0x7f < (int)param_2" (number_literal "0x7f") (< "<") (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2"))) () ")"))) () ")")) (compound_statement "{\n    if (((byte)param_2 < 0x30) || (locale_mb_cur_max < 2)) {\n      param_1 = (byte *)strchr((char *)param_1,param_2);\n    }\n    else {\n      local_28.__count = 0;\n      local_28.__value.__wch = 0;\n      __n = strlen((char *)param_1);\n      for (; __n != 0; __n = __n - sVar2) {\n        bVar1 = *param_1;\n        if (((uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1) == 0) {\n          sVar2 = mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28);\n          if (0xfffffffb < sVar2 - 2) {\n            bVar1 = *param_1;\n            goto joined_r0x000ddae2;\n          }\n        }\n        else {\njoined_r0x000ddae2:\n          if (bVar1 == param_2) goto LAB_000ddb45;\n          sVar2 = 1;\n        }\n        param_1 = param_1 + sVar2;\n      }\n      param_1 = (byte *)0x0;\n    }\n  }" ({ "{") (if_statement "if (((byte)param_2 < 0x30) || (locale_mb_cur_max < 2)) {\n      param_1 = (byte *)strchr((char *)param_1,param_2);\n    }\n    else {\n      local_28.__count = 0;\n      local_28.__value.__wch = 0;\n      __n = strlen((char *)param_1);\n      for (; __n != 0; __n = __n - sVar2) {\n        bVar1 = *param_1;\n        if (((uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1) == 0) {\n          sVar2 = mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28);\n          if (0xfffffffb < sVar2 - 2) {\n            bVar1 = *param_1;\n            goto joined_r0x000ddae2;\n          }\n        }\n        else {\njoined_r0x000ddae2:\n          if (bVar1 == param_2) goto LAB_000ddb45;\n          sVar2 = 1;\n        }\n        param_1 = param_1 + sVar2;\n      }\n      param_1 = (byte *)0x0;\n    }" (if "if") (parenthesized_expression "(((byte)param_2 < 0x30) || (locale_mb_cur_max < 2))" (( "(") (binary_expression "((byte)param_2 < 0x30) || (locale_mb_cur_max < 2)" (parenthesized_expression "((byte)param_2 < 0x30)" (( "(") (binary_expression "(byte)param_2 < 0x30" (cast_expression "(byte)param_2" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "param_2")) (< "<") (number_literal "0x30")) () ")")) (|| "||") (parenthesized_expression "(locale_mb_cur_max < 2)" (( "(") (binary_expression "locale_mb_cur_max < 2" (identifier "locale_mb_cur_max") (< "<") (number_literal "2")) () ")"))) () ")")) (compound_statement "{\n      param_1 = (byte *)strchr((char *)param_1,param_2);\n    }" ({ "{") (expression_statement "param_1 = (byte *)strchr((char *)param_1,param_2);" (assignment_expression "param_1 = (byte *)strchr((char *)param_1,param_2)" (identifier "param_1") (= "=") (cast_expression "(byte *)strchr((char *)param_1,param_2)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "strchr((char *)param_1,param_2)" (identifier "strchr") (argument_list "((char *)param_1,param_2)" (( "(") (cast_expression "(char *)param_1" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "param_1")) (, ",") (identifier "param_2") () ")"))))) (; ";")) (} "}")) (else_clause "else {\n      local_28.__count = 0;\n      local_28.__value.__wch = 0;\n      __n = strlen((char *)param_1);\n      for (; __n != 0; __n = __n - sVar2) {\n        bVar1 = *param_1;\n        if (((uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1) == 0) {\n          sVar2 = mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28);\n          if (0xfffffffb < sVar2 - 2) {\n            bVar1 = *param_1;\n            goto joined_r0x000ddae2;\n          }\n        }\n        else {\njoined_r0x000ddae2:\n          if (bVar1 == param_2) goto LAB_000ddb45;\n          sVar2 = 1;\n        }\n        param_1 = param_1 + sVar2;\n      }\n      param_1 = (byte *)0x0;\n    }" (else "else") (compound_statement "{\n      local_28.__count = 0;\n      local_28.__value.__wch = 0;\n      __n = strlen((char *)param_1);\n      for (; __n != 0; __n = __n - sVar2) {\n        bVar1 = *param_1;\n        if (((uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1) == 0) {\n          sVar2 = mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28);\n          if (0xfffffffb < sVar2 - 2) {\n            bVar1 = *param_1;\n            goto joined_r0x000ddae2;\n          }\n        }\n        else {\njoined_r0x000ddae2:\n          if (bVar1 == param_2) goto LAB_000ddb45;\n          sVar2 = 1;\n        }\n        param_1 = param_1 + sVar2;\n      }\n      param_1 = (byte *)0x0;\n    }" ({ "{") (expression_statement "local_28.__count = 0;" (assignment_expression "local_28.__count = 0" (field_expression "local_28.__count" (identifier "local_28") (. ".") (field_identifier "__count")) (= "=") (number_literal "0")) (; ";")) (expression_statement "local_28.__value.__wch = 0;" (assignment_expression "local_28.__value.__wch = 0" (field_expression "local_28.__value.__wch" (field_expression "local_28.__value" (identifier "local_28") (. ".") (field_identifier "__value")) (. ".") (field_identifier "__wch")) (= "=") (number_literal "0")) (; ";")) (expression_statement "__n = strlen((char *)param_1);" (assignment_expression "__n = strlen((char *)param_1)" (identifier "__n") (= "=") (call_expression "strlen((char *)param_1)" (identifier "strlen") (argument_list "((char *)param_1)" (( "(") (cast_expression "(char *)param_1" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "param_1")) () ")")))) (; ";")) (for_statement "for (; __n != 0; __n = __n - sVar2) {\n        bVar1 = *param_1;\n        if (((uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1) == 0) {\n          sVar2 = mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28);\n          if (0xfffffffb < sVar2 - 2) {\n            bVar1 = *param_1;\n            goto joined_r0x000ddae2;\n          }\n        }\n        else {\njoined_r0x000ddae2:\n          if (bVar1 == param_2) goto LAB_000ddb45;\n          sVar2 = 1;\n        }\n        param_1 = param_1 + sVar2;\n      }" (for "for") (( "(") (; ";") (binary_expression "__n != 0" (identifier "__n") (!= "!=") (number_literal "0")) (; ";") (assignment_expression "__n = __n - sVar2" (identifier "__n") (= "=") (binary_expression "__n - sVar2" (identifier "__n") (- "-") (identifier "sVar2"))) () ")") (compound_statement "{\n        bVar1 = *param_1;\n        if (((uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1) == 0) {\n          sVar2 = mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28);\n          if (0xfffffffb < sVar2 - 2) {\n            bVar1 = *param_1;\n            goto joined_r0x000ddae2;\n          }\n        }\n        else {\njoined_r0x000ddae2:\n          if (bVar1 == param_2) goto LAB_000ddb45;\n          sVar2 = 1;\n        }\n        param_1 = param_1 + sVar2;\n      }" ({ "{") (expression_statement "bVar1 = *param_1;" (assignment_expression "bVar1 = *param_1" (identifier "bVar1") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (if_statement "if (((uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1) == 0) {\n          sVar2 = mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28);\n          if (0xfffffffb < sVar2 - 2) {\n            bVar1 = *param_1;\n            goto joined_r0x000ddae2;\n          }\n        }\n        else {\njoined_r0x000ddae2:\n          if (bVar1 == param_2) goto LAB_000ddb45;\n          sVar2 = 1;\n        }" (if "if") (parenthesized_expression "(((uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1) == 0)" (( "(") (binary_expression "((uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1) == 0" (parenthesized_expression "((uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1)" (( "(") (binary_expression "(uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1" (binary_expression "(uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f)" (subscript_expression "(uint)(&is_basic_table)[bVar1 >> 5]" (call_expression "(uint)(&is_basic_table)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(&is_basic_table)" (( "(") (pointer_expression "&is_basic_table" (& "&") (identifier "is_basic_table")) () ")"))) ([ "[") (binary_expression "bVar1 >> 5" (identifier "bVar1") (>> ">>") (number_literal "5")) (] "]")) (>> ">>") (parenthesized_expression "(bVar1 & 0x1f)" (( "(") (binary_expression "bVar1 & 0x1f" (identifier "bVar1") (& "&") (number_literal "0x1f")) () ")"))) (& "&") (number_literal "1")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n          sVar2 = mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28);\n          if (0xfffffffb < sVar2 - 2) {\n            bVar1 = *param_1;\n            goto joined_r0x000ddae2;\n          }\n        }" ({ "{") (expression_statement "sVar2 = mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28);" (assignment_expression "sVar2 = mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28)" (identifier "sVar2") (= "=") (call_expression "mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28)" (identifier "mbrtowc") (argument_list "((wchar_t *)0x0,(char *)param_1,__n,&local_28)" (( "(") (cast_expression "(wchar_t *)0x0" (( "(") (type_descriptor "wchar_t *" (type_identifier "wchar_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (, ",") (cast_expression "(char *)param_1" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "param_1")) (, ",") (identifier "__n") (, ",") (pointer_expression "&local_28" (& "&") (identifier "local_28")) () ")")))) (; ";")) (if_statement "if (0xfffffffb < sVar2 - 2) {\n            bVar1 = *param_1;\n            goto joined_r0x000ddae2;\n          }" (if "if") (parenthesized_expression "(0xfffffffb < sVar2 - 2)" (( "(") (binary_expression "0xfffffffb < sVar2 - 2" (number_literal "0xfffffffb") (< "<") (binary_expression "sVar2 - 2" (identifier "sVar2") (- "-") (number_literal "2"))) () ")")) (compound_statement "{\n            bVar1 = *param_1;\n            goto joined_r0x000ddae2;\n          }" ({ "{") (expression_statement "bVar1 = *param_1;" (assignment_expression "bVar1 = *param_1" (identifier "bVar1") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (goto_statement "goto joined_r0x000ddae2;" (goto "goto") (statement_identifier "joined_r0x000ddae2") (; ";")) (} "}"))) (} "}")) (else_clause "else {\njoined_r0x000ddae2:\n          if (bVar1 == param_2) goto LAB_000ddb45;\n          sVar2 = 1;\n        }" (else "else") (compound_statement "{\njoined_r0x000ddae2:\n          if (bVar1 == param_2) goto LAB_000ddb45;\n          sVar2 = 1;\n        }" ({ "{") (labeled_statement "joined_r0x000ddae2:\n          if (bVar1 == param_2) goto LAB_000ddb45;" (statement_identifier "joined_r0x000ddae2") (: ":") (if_statement "if (bVar1 == param_2) goto LAB_000ddb45;" (if "if") (parenthesized_expression "(bVar1 == param_2)" (( "(") (binary_expression "bVar1 == param_2" (identifier "bVar1") (== "==") (identifier "param_2")) () ")")) (goto_statement "goto LAB_000ddb45;" (goto "goto") (statement_identifier "LAB_000ddb45") (; ";")))) (expression_statement "sVar2 = 1;" (assignment_expression "sVar2 = 1" (identifier "sVar2") (= "=") (number_literal "1")) (; ";")) (} "}")))) (expression_statement "param_1 = param_1 + sVar2;" (assignment_expression "param_1 = param_1 + sVar2" (identifier "param_1") (= "=") (binary_expression "param_1 + sVar2" (identifier "param_1") (+ "+") (identifier "sVar2"))) (; ";")) (} "}"))) (expression_statement "param_1 = (byte *)0x0;" (assignment_expression "param_1 = (byte *)0x0" (identifier "param_1") (= "=") (cast_expression "(byte *)0x0" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (} "}")))) (} "}")) (else_clause "else {\n    param_1 = (byte *)utf8_mbschr(param_1,param_2);\n  }" (else "else") (compound_statement "{\n    param_1 = (byte *)utf8_mbschr(param_1,param_2);\n  }" ({ "{") (expression_statement "param_1 = (byte *)utf8_mbschr(param_1,param_2);" (assignment_expression "param_1 = (byte *)utf8_mbschr(param_1,param_2)" (identifier "param_1") (= "=") (cast_expression "(byte *)utf8_mbschr(param_1,param_2)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "utf8_mbschr(param_1,param_2)" (identifier "utf8_mbschr") (argument_list "(param_1,param_2)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") () ")"))))) (; ";")) (} "}")))) (labeled_statement "LAB_000ddb45:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0010f8b0();\n  }" (statement_identifier "LAB_000ddb45") (: ":") (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0010f8b0();\n  }" (if "if") (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (!= "!=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n                    \n    FUN_0010f8b0();\n  }" ({ "{") (expression_statement "FUN_0010f8b0();" (call_expression "FUN_0010f8b0()" (identifier "FUN_0010f8b0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))) (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}")))

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

char * function_1(char *s,int var_3)

{
  int var_12;
  type_1 var_9;
  size_t var_7;
  size_t var_8;
  int var_1;
  type_2 state;
  
  var_12 = *(int *)(var_1 + 0x14);
  if ((var_2 == 0) || (0x7f < var_3)) {
    if (((type_1)var_3 < 0x30) || (var_4 < 2)) {
      s = var_5(s,var_3);
    }
    else {
      state.__count = 0;
      state.__value.__wch = 0;
      var_7 = var_6(s);
      for (; var_7 != 0; var_7 = var_7 - var_8) {
        var_9 = *s;
        if (((type_4)(&is_basic_table)[var_9 >> 5] >> (var_9 & 0x1f) & 1) == 0) {
          var_8 = var_10((type_3 *)0x0,s,var_7,(type_2 *)&state);
          if (0xfffffffb < var_8 - 2) {
            var_9 = *s;
            goto joined_r0x000ddae2;
          }
        }
        else {
joined_r0x000ddae2:
          if ((type_4)var_9 == var_3) goto LAB_000ddb45;
          var_8 = 1;
        }
        s = (char *)((type_1 *)s + var_8);
      }
      s = (char *)0x0;
    }
  }
  else {
    s = var_11(s,var_3);
  }
LAB_000ddb45:
  if (var_12 != *(int *)(var_1 + 0x14)) {
                    /* WARNING: Subroutine does not return */
    var_13();
  }
  return s;
}


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

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

byte * MASKED(byte *param_1,uint param_2)

{
  byte bVar1;
  size_t __n;
  size_t sVar2;
  int in_GS_OFFSET;
  mbstate_t local_28;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0xdda59;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if ((locale_utf8locale == 0) || (0x7f < (int)param_2)) {
    if (((byte)param_2 < 0x30) || (locale_mb_cur_max < 2)) {
      param_1 = (byte *)strchr((char *)param_1,param_2);
    }
    else {
      local_28.__count = 0;
      local_28.__value.__wch = 0;
      __n = strlen((char *)param_1);
      for (; __n != 0; __n = __n - sVar2) {
        bVar1 = *param_1;
        if (((uint)(&is_basic_table)[bVar1 >> 5] >> (bVar1 & 0x1f) & 1) == 0) {
          sVar2 = mbrtowc((wchar_t *)0x0,(char *)param_1,__n,&local_28);
          if (0xfffffffb < sVar2 - 2) {
            bVar1 = *param_1;
            goto joined_r0x000ddae2;
          }
        }
        else {
joined_r0x000ddae2:
          if (bVar1 == param_2) goto LAB_000ddb45;
          sVar2 = 1;
        }
        param_1 = param_1 + sVar2;
      }
      param_1 = (byte *)0x0;
    }
  }
  else {
    param_1 = (byte *)utf8_MASKED(param_1,param_2);
  }
LAB_000ddb45:
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_0010f8b0();
  }
  return param_1;
}

