
/* WARNING: Function: __x86.get_pc_thunk.dx replaced with injection: get_pc_thunk_dx */

int __regparm3 consume_count(char **type)

{
  int iVar1;
  byte *pbVar2;
  int iVar3;
  
  pbVar2 = (byte *)*type;
  if ((_sch_istable[*pbVar2] & 4) != 0) {
    iVar3 = 0;
    iVar1 = (char)*pbVar2 + -0x30;
    do {
      pbVar2 = pbVar2 + 1;
      *type = (char *)pbVar2;
      iVar3 = iVar1 + iVar3 * 10;
      if ((_sch_istable[*pbVar2] & 4) == 0) {
        iVar1 = -1;
        if (-1 < iVar3) {
          iVar1 = iVar3;
        }
        return iVar1;
      }
      iVar1 = (char)*pbVar2 + -0x30;
    } while (iVar3 <= (int)((0x7fffffffU - iVar1) / 10));
    do {
      pbVar2 = pbVar2 + 1;
      *type = (char *)pbVar2;
    } while ((_sch_istable[*pbVar2] & 4) != 0);
  }
  return -1;
}



/* WARNING: Function: __i686.get_pc_thunk.dx replaced with injection: get_pc_thunk_dx */

int __regparm3 FUN_003950b0(undefined4 *param_1)

{
  int iVar1;
  byte *pbVar2;
  int iVar3;
  
  pbVar2 = (byte *)*param_1;
  if (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0) {
    iVar3 = 0;
    iVar1 = (char)*pbVar2 + -0x30;
    do {
      pbVar2 = pbVar2 + 1;
      *param_1 = pbVar2;
      iVar3 = iVar1 + iVar3 * 10;
      if (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) == 0) {
        iVar1 = -1;
        if (-1 < iVar3) {
          iVar1 = iVar3;
        }
        return iVar1;
      }
      iVar1 = (char)*pbVar2 + -0x30;
    } while (iVar3 <= (int)((0x7fffffffU - iVar1) / 10));
    do {
      pbVar2 = pbVar2 + 1;
      *param_1 = pbVar2;
    } while (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0);
  }
  return -1;
}


CALL 0x00050c85
ADD EDX,0x254f4b
PUSH EBP
PUSH EDI
MOV EDI,EAX
PUSH ESI
PUSH EBX
SUB ESP,0x4
MOV EBX,dword ptr [EAX]
LEA EBP,[EDX + 0xffeb80a0]
MOVZX EAX,byte ptr [EBX]
TEST byte ptr [EBP + EAX*0x2],0x4
JZ 0x00395151
MOVSX ECX,AL
ADD EBX,0x1
XOR ESI,ESI
SUB ECX,0x30
JMP 0x00395103
SUB ECX,0x30
MOV EDX,0x7fffffff
MOV EAX,0xcccccccd
ADD EBX,0x1
SUB EDX,ECX
MUL EDX
SHR EDX,0x3
CMP EDX,ESI
JL 0x00395130
LEA EAX,[ESI + ESI*0x4]
MOV dword ptr [EDI],EBX
LEA ESI,[ECX + EAX*0x2]
MOVSX ECX,byte ptr [EBX]
MOV dword ptr [ESP],EBX
MOVZX EAX,CL
TEST byte ptr [EBP + EAX*0x2],0x4
JNZ 0x003950e8
TEST ESI,ESI
MOV EAX,0xffffffff
CMOVNS EAX,ESI
ADD ESP,0x4
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EAX,dword ptr [ESP]
ADD EAX,0x1
LEA ESI,[ESI]
LEA ESI,[ESI]
MOV EDX,EAX
MOV dword ptr [EDI],EAX
ADD EAX,0x1
MOVZX EDX,byte ptr [EDX]
TEST byte ptr [EBP + EDX*0x2],0x4
JNZ 0x00395140
ADD ESP,0x4
MOV EAX,0xffffffff
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.dx replaced with injection: get_pc_thunk_dx */\n\nint __regparm3 FUN_003950b0(undefined4 *param_1)\n\n{\n  int iVar1;\n  byte *pbVar2;\n  int iVar3;\n  \n  pbVar2 = (byte *)*param_1;\n  if (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0) {\n    iVar3 = 0;\n    iVar1 = (char)*pbVar2 + -0x30;\n    do {\n      pbVar2 = pbVar2 + 1;\n      *param_1 = pbVar2;\n      iVar3 = iVar1 + iVar3 * 10;\n      if (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) == 0) {\n        iVar1 = -1;\n        if (-1 < iVar3) {\n          iVar1 = iVar3;\n        }\n        return iVar1;\n      }\n      iVar1 = (char)*pbVar2 + -0x30;\n    } while (iVar3 <= (int)((0x7fffffffU - iVar1) / 10));\n    do {\n      pbVar2 = pbVar2 + 1;\n      *param_1 = pbVar2;\n    } while (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0);\n  }\n  return -1;\n}\n\n" comment (function_definition "int __regparm3 FUN_003950b0(undefined4 *param_1)\n\n{\n  int iVar1;\n  byte *pbVar2;\n  int iVar3;\n  \n  pbVar2 = (byte *)*param_1;\n  if (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0) {\n    iVar3 = 0;\n    iVar1 = (char)*pbVar2 + -0x30;\n    do {\n      pbVar2 = pbVar2 + 1;\n      *param_1 = pbVar2;\n      iVar3 = iVar1 + iVar3 * 10;\n      if (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) == 0) {\n        iVar1 = -1;\n        if (-1 < iVar3) {\n          iVar1 = iVar3;\n        }\n        return iVar1;\n      }\n      iVar1 = (char)*pbVar2 + -0x30;\n    } while (iVar3 <= (int)((0x7fffffffU - iVar1) / 10));\n    do {\n      pbVar2 = pbVar2 + 1;\n      *param_1 = pbVar2;\n    } while (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0);\n  }\n  return -1;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_003950b0(undefined4 *param_1)" identifier (parameter_list "(undefined4 *param_1)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  byte *pbVar2;\n  int iVar3;\n  \n  pbVar2 = (byte *)*param_1;\n  if (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0) {\n    iVar3 = 0;\n    iVar1 = (char)*pbVar2 + -0x30;\n    do {\n      pbVar2 = pbVar2 + 1;\n      *param_1 = pbVar2;\n      iVar3 = iVar1 + iVar3 * 10;\n      if (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) == 0) {\n        iVar1 = -1;\n        if (-1 < iVar3) {\n          iVar1 = iVar3;\n        }\n        return iVar1;\n      }\n      iVar1 = (char)*pbVar2 + -0x30;\n    } while (iVar3 <= (int)((0x7fffffffU - iVar1) / 10));\n    do {\n      pbVar2 = pbVar2 + 1;\n      *param_1 = pbVar2;\n    } while (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0);\n  }\n  return -1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "byte *pbVar2;" type_identifier (pointer_declarator "*pbVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "pbVar2 = (byte *)*param_1;" (assignment_expression "pbVar2 = (byte *)*param_1" identifier = (cast_expression "(byte *)*param_1" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (if_statement "if (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0) {\n    iVar3 = 0;\n    iVar1 = (char)*pbVar2 + -0x30;\n    do {\n      pbVar2 = pbVar2 + 1;\n      *param_1 = pbVar2;\n      iVar3 = iVar1 + iVar3 * 10;\n      if (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) == 0) {\n        iVar1 = -1;\n        if (-1 < iVar3) {\n          iVar1 = iVar3;\n        }\n        return iVar1;\n      }\n      iVar1 = (char)*pbVar2 + -0x30;\n    } while (iVar3 <= (int)((0x7fffffffU - iVar1) / 10));\n    do {\n      pbVar2 = pbVar2 + 1;\n      *param_1 = pbVar2;\n    } while (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0);\n  }" if (parenthesized_expression "(((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0)" ( (binary_expression "((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0" (parenthesized_expression "((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4)" ( (binary_expression "(&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4" (subscript_expression "(&DAT_004a20a0)[(uint)*pbVar2 * 2]" (parenthesized_expression "(&DAT_004a20a0)" ( (pointer_expression "&DAT_004a20a0" & identifier) )) [ (binary_expression "(uint)*pbVar2 * 2" (binary_expression "(uint)*pbVar2" (parenthesized_expression "(uint)" ( identifier )) * identifier) * number_literal) ]) & number_literal) )) != number_literal) )) (compound_statement "{\n    iVar3 = 0;\n    iVar1 = (char)*pbVar2 + -0x30;\n    do {\n      pbVar2 = pbVar2 + 1;\n      *param_1 = pbVar2;\n      iVar3 = iVar1 + iVar3 * 10;\n      if (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) == 0) {\n        iVar1 = -1;\n        if (-1 < iVar3) {\n          iVar1 = iVar3;\n        }\n        return iVar1;\n      }\n      iVar1 = (char)*pbVar2 + -0x30;\n    } while (iVar3 <= (int)((0x7fffffffU - iVar1) / 10));\n    do {\n      pbVar2 = pbVar2 + 1;\n      *param_1 = pbVar2;\n    } while (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0);\n  }" { (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (expression_statement "iVar1 = (char)*pbVar2 + -0x30;" (assignment_expression "iVar1 = (char)*pbVar2 + -0x30" identifier = (binary_expression "(char)*pbVar2 + -0x30" (cast_expression "(char)*pbVar2" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*pbVar2" * identifier)) + number_literal)) ;) (do_statement "do {\n      pbVar2 = pbVar2 + 1;\n      *param_1 = pbVar2;\n      iVar3 = iVar1 + iVar3 * 10;\n      if (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) == 0) {\n        iVar1 = -1;\n        if (-1 < iVar3) {\n          iVar1 = iVar3;\n        }\n        return iVar1;\n      }\n      iVar1 = (char)*pbVar2 + -0x30;\n    } while (iVar3 <= (int)((0x7fffffffU - iVar1) / 10));" do (compound_statement "{\n      pbVar2 = pbVar2 + 1;\n      *param_1 = pbVar2;\n      iVar3 = iVar1 + iVar3 * 10;\n      if (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) == 0) {\n        iVar1 = -1;\n        if (-1 < iVar3) {\n          iVar1 = iVar3;\n        }\n        return iVar1;\n      }\n      iVar1 = (char)*pbVar2 + -0x30;\n    }" { (expression_statement "pbVar2 = pbVar2 + 1;" (assignment_expression "pbVar2 = pbVar2 + 1" identifier = (binary_expression "pbVar2 + 1" identifier + number_literal)) ;) (expression_statement "*param_1 = pbVar2;" (assignment_expression "*param_1 = pbVar2" (pointer_expression "*param_1" * identifier) = identifier) ;) (expression_statement "iVar3 = iVar1 + iVar3 * 10;" (assignment_expression "iVar3 = iVar1 + iVar3 * 10" identifier = (binary_expression "iVar1 + iVar3 * 10" identifier + (binary_expression "iVar3 * 10" identifier * number_literal))) ;) (if_statement "if (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) == 0) {\n        iVar1 = -1;\n        if (-1 < iVar3) {\n          iVar1 = iVar3;\n        }\n        return iVar1;\n      }" if (parenthesized_expression "(((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) == 0)" ( (binary_expression "((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) == 0" (parenthesized_expression "((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4)" ( (binary_expression "(&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4" (subscript_expression "(&DAT_004a20a0)[(uint)*pbVar2 * 2]" (parenthesized_expression "(&DAT_004a20a0)" ( (pointer_expression "&DAT_004a20a0" & identifier) )) [ (binary_expression "(uint)*pbVar2 * 2" (binary_expression "(uint)*pbVar2" (parenthesized_expression "(uint)" ( identifier )) * identifier) * number_literal) ]) & number_literal) )) == number_literal) )) (compound_statement "{\n        iVar1 = -1;\n        if (-1 < iVar3) {\n          iVar1 = iVar3;\n        }\n        return iVar1;\n      }" { (expression_statement "iVar1 = -1;" (assignment_expression "iVar1 = -1" identifier = number_literal) ;) (if_statement "if (-1 < iVar3) {\n          iVar1 = iVar3;\n        }" if (parenthesized_expression "(-1 < iVar3)" ( (binary_expression "-1 < iVar3" number_literal < identifier) )) (compound_statement "{\n          iVar1 = iVar3;\n        }" { (expression_statement "iVar1 = iVar3;" (assignment_expression "iVar1 = iVar3" identifier = identifier) ;) })) (return_statement "return iVar1;" return identifier ;) })) (expression_statement "iVar1 = (char)*pbVar2 + -0x30;" (assignment_expression "iVar1 = (char)*pbVar2 + -0x30" identifier = (binary_expression "(char)*pbVar2 + -0x30" (cast_expression "(char)*pbVar2" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*pbVar2" * identifier)) + number_literal)) ;) }) while (parenthesized_expression "(iVar3 <= (int)((0x7fffffffU - iVar1) / 10))" ( (binary_expression "iVar3 <= (int)((0x7fffffffU - iVar1) / 10)" identifier <= (cast_expression "(int)((0x7fffffffU - iVar1) / 10)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((0x7fffffffU - iVar1) / 10)" ( (binary_expression "(0x7fffffffU - iVar1) / 10" (parenthesized_expression "(0x7fffffffU - iVar1)" ( (binary_expression "0x7fffffffU - iVar1" number_literal - identifier) )) / number_literal) )))) )) ;) (do_statement "do {\n      pbVar2 = pbVar2 + 1;\n      *param_1 = pbVar2;\n    } while (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0);" do (compound_statement "{\n      pbVar2 = pbVar2 + 1;\n      *param_1 = pbVar2;\n    }" { (expression_statement "pbVar2 = pbVar2 + 1;" (assignment_expression "pbVar2 = pbVar2 + 1" identifier = (binary_expression "pbVar2 + 1" identifier + number_literal)) ;) (expression_statement "*param_1 = pbVar2;" (assignment_expression "*param_1 = pbVar2" (pointer_expression "*param_1" * identifier) = identifier) ;) }) while (parenthesized_expression "(((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0)" ( (binary_expression "((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0" (parenthesized_expression "((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4)" ( (binary_expression "(&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4" (subscript_expression "(&DAT_004a20a0)[(uint)*pbVar2 * 2]" (parenthesized_expression "(&DAT_004a20a0)" ( (pointer_expression "&DAT_004a20a0" & identifier) )) [ (binary_expression "(uint)*pbVar2 * 2" (binary_expression "(uint)*pbVar2" (parenthesized_expression "(uint)" ( identifier )) * identifier) * number_literal) ]) & number_literal) )) != number_literal) )) ;) })) (return_statement "return -1;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.dx replaced with injection: get_pc_thunk_dx */\n\nint __regparm3 consume_count(char **type)\n\n{\n  int iVar1;\n  byte *pbVar2;\n  int iVar3;\n  \n  pbVar2 = (byte *)*type;\n  if ((_sch_istable[*pbVar2] & 4) != 0) {\n    iVar3 = 0;\n    iVar1 = (char)*pbVar2 + -0x30;\n    do {\n      pbVar2 = pbVar2 + 1;\n      *type = (char *)pbVar2;\n      iVar3 = iVar1 + iVar3 * 10;\n      if ((_sch_istable[*pbVar2] & 4) == 0) {\n        iVar1 = -1;\n        if (-1 < iVar3) {\n          iVar1 = iVar3;\n        }\n        return iVar1;\n      }\n      iVar1 = (char)*pbVar2 + -0x30;\n    } while (iVar3 <= (int)((0x7fffffffU - iVar1) / 10));\n    do {\n      pbVar2 = pbVar2 + 1;\n      *type = (char *)pbVar2;\n    } while ((_sch_istable[*pbVar2] & 4) != 0);\n  }\n  return -1;\n}\n\n" comment (function_definition "int __regparm3 consume_count(char **type)\n\n{\n  int iVar1;\n  byte *pbVar2;\n  int iVar3;\n  \n  pbVar2 = (byte *)*type;\n  if ((_sch_istable[*pbVar2] & 4) != 0) {\n    iVar3 = 0;\n    iVar1 = (char)*pbVar2 + -0x30;\n    do {\n      pbVar2 = pbVar2 + 1;\n      *type = (char *)pbVar2;\n      iVar3 = iVar1 + iVar3 * 10;\n      if ((_sch_istable[*pbVar2] & 4) == 0) {\n        iVar1 = -1;\n        if (-1 < iVar3) {\n          iVar1 = iVar3;\n        }\n        return iVar1;\n      }\n      iVar1 = (char)*pbVar2 + -0x30;\n    } while (iVar3 <= (int)((0x7fffffffU - iVar1) / 10));\n    do {\n      pbVar2 = pbVar2 + 1;\n      *type = (char *)pbVar2;\n    } while ((_sch_istable[*pbVar2] & 4) != 0);\n  }\n  return -1;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "consume_count(char **type)" identifier (parameter_list "(char **type)" ( (parameter_declaration "char **type" primitive_type (pointer_declarator "**type" * (pointer_declarator "*type" * identifier))) ))) (compound_statement "{\n  int iVar1;\n  byte *pbVar2;\n  int iVar3;\n  \n  pbVar2 = (byte *)*type;\n  if ((_sch_istable[*pbVar2] & 4) != 0) {\n    iVar3 = 0;\n    iVar1 = (char)*pbVar2 + -0x30;\n    do {\n      pbVar2 = pbVar2 + 1;\n      *type = (char *)pbVar2;\n      iVar3 = iVar1 + iVar3 * 10;\n      if ((_sch_istable[*pbVar2] & 4) == 0) {\n        iVar1 = -1;\n        if (-1 < iVar3) {\n          iVar1 = iVar3;\n        }\n        return iVar1;\n      }\n      iVar1 = (char)*pbVar2 + -0x30;\n    } while (iVar3 <= (int)((0x7fffffffU - iVar1) / 10));\n    do {\n      pbVar2 = pbVar2 + 1;\n      *type = (char *)pbVar2;\n    } while ((_sch_istable[*pbVar2] & 4) != 0);\n  }\n  return -1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "byte *pbVar2;" type_identifier (pointer_declarator "*pbVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "pbVar2 = (byte *)*type;" (assignment_expression "pbVar2 = (byte *)*type" identifier = (cast_expression "(byte *)*type" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*type" * identifier))) ;) (if_statement "if ((_sch_istable[*pbVar2] & 4) != 0) {\n    iVar3 = 0;\n    iVar1 = (char)*pbVar2 + -0x30;\n    do {\n      pbVar2 = pbVar2 + 1;\n      *type = (char *)pbVar2;\n      iVar3 = iVar1 + iVar3 * 10;\n      if ((_sch_istable[*pbVar2] & 4) == 0) {\n        iVar1 = -1;\n        if (-1 < iVar3) {\n          iVar1 = iVar3;\n        }\n        return iVar1;\n      }\n      iVar1 = (char)*pbVar2 + -0x30;\n    } while (iVar3 <= (int)((0x7fffffffU - iVar1) / 10));\n    do {\n      pbVar2 = pbVar2 + 1;\n      *type = (char *)pbVar2;\n    } while ((_sch_istable[*pbVar2] & 4) != 0);\n  }" if (parenthesized_expression "((_sch_istable[*pbVar2] & 4) != 0)" ( (binary_expression "(_sch_istable[*pbVar2] & 4) != 0" (parenthesized_expression "(_sch_istable[*pbVar2] & 4)" ( (binary_expression "_sch_istable[*pbVar2] & 4" (subscript_expression "_sch_istable[*pbVar2]" identifier [ (pointer_expression "*pbVar2" * identifier) ]) & number_literal) )) != number_literal) )) (compound_statement "{\n    iVar3 = 0;\n    iVar1 = (char)*pbVar2 + -0x30;\n    do {\n      pbVar2 = pbVar2 + 1;\n      *type = (char *)pbVar2;\n      iVar3 = iVar1 + iVar3 * 10;\n      if ((_sch_istable[*pbVar2] & 4) == 0) {\n        iVar1 = -1;\n        if (-1 < iVar3) {\n          iVar1 = iVar3;\n        }\n        return iVar1;\n      }\n      iVar1 = (char)*pbVar2 + -0x30;\n    } while (iVar3 <= (int)((0x7fffffffU - iVar1) / 10));\n    do {\n      pbVar2 = pbVar2 + 1;\n      *type = (char *)pbVar2;\n    } while ((_sch_istable[*pbVar2] & 4) != 0);\n  }" { (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (expression_statement "iVar1 = (char)*pbVar2 + -0x30;" (assignment_expression "iVar1 = (char)*pbVar2 + -0x30" identifier = (binary_expression "(char)*pbVar2 + -0x30" (cast_expression "(char)*pbVar2" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*pbVar2" * identifier)) + number_literal)) ;) (do_statement "do {\n      pbVar2 = pbVar2 + 1;\n      *type = (char *)pbVar2;\n      iVar3 = iVar1 + iVar3 * 10;\n      if ((_sch_istable[*pbVar2] & 4) == 0) {\n        iVar1 = -1;\n        if (-1 < iVar3) {\n          iVar1 = iVar3;\n        }\n        return iVar1;\n      }\n      iVar1 = (char)*pbVar2 + -0x30;\n    } while (iVar3 <= (int)((0x7fffffffU - iVar1) / 10));" do (compound_statement "{\n      pbVar2 = pbVar2 + 1;\n      *type = (char *)pbVar2;\n      iVar3 = iVar1 + iVar3 * 10;\n      if ((_sch_istable[*pbVar2] & 4) == 0) {\n        iVar1 = -1;\n        if (-1 < iVar3) {\n          iVar1 = iVar3;\n        }\n        return iVar1;\n      }\n      iVar1 = (char)*pbVar2 + -0x30;\n    }" { (expression_statement "pbVar2 = pbVar2 + 1;" (assignment_expression "pbVar2 = pbVar2 + 1" identifier = (binary_expression "pbVar2 + 1" identifier + number_literal)) ;) (expression_statement "*type = (char *)pbVar2;" (assignment_expression "*type = (char *)pbVar2" (pointer_expression "*type" * identifier) = (cast_expression "(char *)pbVar2" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "iVar3 = iVar1 + iVar3 * 10;" (assignment_expression "iVar3 = iVar1 + iVar3 * 10" identifier = (binary_expression "iVar1 + iVar3 * 10" identifier + (binary_expression "iVar3 * 10" identifier * number_literal))) ;) (if_statement "if ((_sch_istable[*pbVar2] & 4) == 0) {\n        iVar1 = -1;\n        if (-1 < iVar3) {\n          iVar1 = iVar3;\n        }\n        return iVar1;\n      }" if (parenthesized_expression "((_sch_istable[*pbVar2] & 4) == 0)" ( (binary_expression "(_sch_istable[*pbVar2] & 4) == 0" (parenthesized_expression "(_sch_istable[*pbVar2] & 4)" ( (binary_expression "_sch_istable[*pbVar2] & 4" (subscript_expression "_sch_istable[*pbVar2]" identifier [ (pointer_expression "*pbVar2" * identifier) ]) & number_literal) )) == number_literal) )) (compound_statement "{\n        iVar1 = -1;\n        if (-1 < iVar3) {\n          iVar1 = iVar3;\n        }\n        return iVar1;\n      }" { (expression_statement "iVar1 = -1;" (assignment_expression "iVar1 = -1" identifier = number_literal) ;) (if_statement "if (-1 < iVar3) {\n          iVar1 = iVar3;\n        }" if (parenthesized_expression "(-1 < iVar3)" ( (binary_expression "-1 < iVar3" number_literal < identifier) )) (compound_statement "{\n          iVar1 = iVar3;\n        }" { (expression_statement "iVar1 = iVar3;" (assignment_expression "iVar1 = iVar3" identifier = identifier) ;) })) (return_statement "return iVar1;" return identifier ;) })) (expression_statement "iVar1 = (char)*pbVar2 + -0x30;" (assignment_expression "iVar1 = (char)*pbVar2 + -0x30" identifier = (binary_expression "(char)*pbVar2 + -0x30" (cast_expression "(char)*pbVar2" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*pbVar2" * identifier)) + number_literal)) ;) }) while (parenthesized_expression "(iVar3 <= (int)((0x7fffffffU - iVar1) / 10))" ( (binary_expression "iVar3 <= (int)((0x7fffffffU - iVar1) / 10)" identifier <= (cast_expression "(int)((0x7fffffffU - iVar1) / 10)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((0x7fffffffU - iVar1) / 10)" ( (binary_expression "(0x7fffffffU - iVar1) / 10" (parenthesized_expression "(0x7fffffffU - iVar1)" ( (binary_expression "0x7fffffffU - iVar1" number_literal - identifier) )) / number_literal) )))) )) ;) (do_statement "do {\n      pbVar2 = pbVar2 + 1;\n      *type = (char *)pbVar2;\n    } while ((_sch_istable[*pbVar2] & 4) != 0);" do (compound_statement "{\n      pbVar2 = pbVar2 + 1;\n      *type = (char *)pbVar2;\n    }" { (expression_statement "pbVar2 = pbVar2 + 1;" (assignment_expression "pbVar2 = pbVar2 + 1" identifier = (binary_expression "pbVar2 + 1" identifier + number_literal)) ;) (expression_statement "*type = (char *)pbVar2;" (assignment_expression "*type = (char *)pbVar2" (pointer_expression "*type" * identifier) = (cast_expression "(char *)pbVar2" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) ;) }) while (parenthesized_expression "((_sch_istable[*pbVar2] & 4) != 0)" ( (binary_expression "(_sch_istable[*pbVar2] & 4) != 0" (parenthesized_expression "(_sch_istable[*pbVar2] & 4)" ( (binary_expression "_sch_istable[*pbVar2] & 4" (subscript_expression "_sch_istable[*pbVar2]" identifier [ (pointer_expression "*pbVar2" * identifier) ]) & number_literal) )) != number_literal) )) ;) })) (return_statement "return -1;" return number_literal ;) })))
(translation_unit "int __regparm3 FUN_003950b0(undefined4 *param_1)\n\n{\n  int iVar1;\n  byte *pbVar2;\n  int iVar3;\n  \n  pbVar2 = (byte *)*param_1;\n  if (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0) {\n    iVar3 = 0;\n    iVar1 = (char)*pbVar2 + -0x30;\n    do {\n      pbVar2 = pbVar2 + 1;\n      *param_1 = pbVar2;\n      iVar3 = iVar1 + iVar3 * 10;\n      if (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) == 0) {\n        iVar1 = -1;\n        if (-1 < iVar3) {\n          iVar1 = iVar3;\n        }\n        return iVar1;\n      }\n      iVar1 = (char)*pbVar2 + -0x30;\n    } while (iVar3 <= (int)((0x7fffffffU - iVar1) / 10));\n    do {\n      pbVar2 = pbVar2 + 1;\n      *param_1 = pbVar2;\n    } while (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0);\n  }\n  return -1;\n}\n\n" (function_definition "int __regparm3 FUN_003950b0(undefined4 *param_1)\n\n{\n  int iVar1;\n  byte *pbVar2;\n  int iVar3;\n  \n  pbVar2 = (byte *)*param_1;\n  if (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0) {\n    iVar3 = 0;\n    iVar1 = (char)*pbVar2 + -0x30;\n    do {\n      pbVar2 = pbVar2 + 1;\n      *param_1 = pbVar2;\n      iVar3 = iVar1 + iVar3 * 10;\n      if (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) == 0) {\n        iVar1 = -1;\n        if (-1 < iVar3) {\n          iVar1 = iVar3;\n        }\n        return iVar1;\n      }\n      iVar1 = (char)*pbVar2 + -0x30;\n    } while (iVar3 <= (int)((0x7fffffffU - iVar1) / 10));\n    do {\n      pbVar2 = pbVar2 + 1;\n      *param_1 = pbVar2;\n    } while (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0);\n  }\n  return -1;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_003950b0(undefined4 *param_1)" identifier (parameter_list "(undefined4 *param_1)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  byte *pbVar2;\n  int iVar3;\n  \n  pbVar2 = (byte *)*param_1;\n  if (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0) {\n    iVar3 = 0;\n    iVar1 = (char)*pbVar2 + -0x30;\n    do {\n      pbVar2 = pbVar2 + 1;\n      *param_1 = pbVar2;\n      iVar3 = iVar1 + iVar3 * 10;\n      if (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) == 0) {\n        iVar1 = -1;\n        if (-1 < iVar3) {\n          iVar1 = iVar3;\n        }\n        return iVar1;\n      }\n      iVar1 = (char)*pbVar2 + -0x30;\n    } while (iVar3 <= (int)((0x7fffffffU - iVar1) / 10));\n    do {\n      pbVar2 = pbVar2 + 1;\n      *param_1 = pbVar2;\n    } while (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0);\n  }\n  return -1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "byte *pbVar2;" type_identifier (pointer_declarator "*pbVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "pbVar2 = (byte *)*param_1;" (assignment_expression "pbVar2 = (byte *)*param_1" identifier = (cast_expression "(byte *)*param_1" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (if_statement "if (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0) {\n    iVar3 = 0;\n    iVar1 = (char)*pbVar2 + -0x30;\n    do {\n      pbVar2 = pbVar2 + 1;\n      *param_1 = pbVar2;\n      iVar3 = iVar1 + iVar3 * 10;\n      if (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) == 0) {\n        iVar1 = -1;\n        if (-1 < iVar3) {\n          iVar1 = iVar3;\n        }\n        return iVar1;\n      }\n      iVar1 = (char)*pbVar2 + -0x30;\n    } while (iVar3 <= (int)((0x7fffffffU - iVar1) / 10));\n    do {\n      pbVar2 = pbVar2 + 1;\n      *param_1 = pbVar2;\n    } while (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0);\n  }" if (parenthesized_expression "(((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0)" ( (binary_expression "((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0" (parenthesized_expression "((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4)" ( (binary_expression "(&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4" (subscript_expression "(&DAT_004a20a0)[(uint)*pbVar2 * 2]" (parenthesized_expression "(&DAT_004a20a0)" ( (pointer_expression "&DAT_004a20a0" & identifier) )) [ (binary_expression "(uint)*pbVar2 * 2" (binary_expression "(uint)*pbVar2" (parenthesized_expression "(uint)" ( identifier )) * identifier) * number_literal) ]) & number_literal) )) != number_literal) )) (compound_statement "{\n    iVar3 = 0;\n    iVar1 = (char)*pbVar2 + -0x30;\n    do {\n      pbVar2 = pbVar2 + 1;\n      *param_1 = pbVar2;\n      iVar3 = iVar1 + iVar3 * 10;\n      if (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) == 0) {\n        iVar1 = -1;\n        if (-1 < iVar3) {\n          iVar1 = iVar3;\n        }\n        return iVar1;\n      }\n      iVar1 = (char)*pbVar2 + -0x30;\n    } while (iVar3 <= (int)((0x7fffffffU - iVar1) / 10));\n    do {\n      pbVar2 = pbVar2 + 1;\n      *param_1 = pbVar2;\n    } while (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0);\n  }" { (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (expression_statement "iVar1 = (char)*pbVar2 + -0x30;" (assignment_expression "iVar1 = (char)*pbVar2 + -0x30" identifier = (binary_expression "(char)*pbVar2 + -0x30" (cast_expression "(char)*pbVar2" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*pbVar2" * identifier)) + number_literal)) ;) (do_statement "do {\n      pbVar2 = pbVar2 + 1;\n      *param_1 = pbVar2;\n      iVar3 = iVar1 + iVar3 * 10;\n      if (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) == 0) {\n        iVar1 = -1;\n        if (-1 < iVar3) {\n          iVar1 = iVar3;\n        }\n        return iVar1;\n      }\n      iVar1 = (char)*pbVar2 + -0x30;\n    } while (iVar3 <= (int)((0x7fffffffU - iVar1) / 10));" do (compound_statement "{\n      pbVar2 = pbVar2 + 1;\n      *param_1 = pbVar2;\n      iVar3 = iVar1 + iVar3 * 10;\n      if (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) == 0) {\n        iVar1 = -1;\n        if (-1 < iVar3) {\n          iVar1 = iVar3;\n        }\n        return iVar1;\n      }\n      iVar1 = (char)*pbVar2 + -0x30;\n    }" { (expression_statement "pbVar2 = pbVar2 + 1;" (assignment_expression "pbVar2 = pbVar2 + 1" identifier = (binary_expression "pbVar2 + 1" identifier + number_literal)) ;) (expression_statement "*param_1 = pbVar2;" (assignment_expression "*param_1 = pbVar2" (pointer_expression "*param_1" * identifier) = identifier) ;) (expression_statement "iVar3 = iVar1 + iVar3 * 10;" (assignment_expression "iVar3 = iVar1 + iVar3 * 10" identifier = (binary_expression "iVar1 + iVar3 * 10" identifier + (binary_expression "iVar3 * 10" identifier * number_literal))) ;) (if_statement "if (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) == 0) {\n        iVar1 = -1;\n        if (-1 < iVar3) {\n          iVar1 = iVar3;\n        }\n        return iVar1;\n      }" if (parenthesized_expression "(((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) == 0)" ( (binary_expression "((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) == 0" (parenthesized_expression "((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4)" ( (binary_expression "(&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4" (subscript_expression "(&DAT_004a20a0)[(uint)*pbVar2 * 2]" (parenthesized_expression "(&DAT_004a20a0)" ( (pointer_expression "&DAT_004a20a0" & identifier) )) [ (binary_expression "(uint)*pbVar2 * 2" (binary_expression "(uint)*pbVar2" (parenthesized_expression "(uint)" ( identifier )) * identifier) * number_literal) ]) & number_literal) )) == number_literal) )) (compound_statement "{\n        iVar1 = -1;\n        if (-1 < iVar3) {\n          iVar1 = iVar3;\n        }\n        return iVar1;\n      }" { (expression_statement "iVar1 = -1;" (assignment_expression "iVar1 = -1" identifier = number_literal) ;) (if_statement "if (-1 < iVar3) {\n          iVar1 = iVar3;\n        }" if (parenthesized_expression "(-1 < iVar3)" ( (binary_expression "-1 < iVar3" number_literal < identifier) )) (compound_statement "{\n          iVar1 = iVar3;\n        }" { (expression_statement "iVar1 = iVar3;" (assignment_expression "iVar1 = iVar3" identifier = identifier) ;) })) (return_statement "return iVar1;" return identifier ;) })) (expression_statement "iVar1 = (char)*pbVar2 + -0x30;" (assignment_expression "iVar1 = (char)*pbVar2 + -0x30" identifier = (binary_expression "(char)*pbVar2 + -0x30" (cast_expression "(char)*pbVar2" ( (type_descriptor "char" primitive_type) ) (pointer_expression "*pbVar2" * identifier)) + number_literal)) ;) }) while (parenthesized_expression "(iVar3 <= (int)((0x7fffffffU - iVar1) / 10))" ( (binary_expression "iVar3 <= (int)((0x7fffffffU - iVar1) / 10)" identifier <= (cast_expression "(int)((0x7fffffffU - iVar1) / 10)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((0x7fffffffU - iVar1) / 10)" ( (binary_expression "(0x7fffffffU - iVar1) / 10" (parenthesized_expression "(0x7fffffffU - iVar1)" ( (binary_expression "0x7fffffffU - iVar1" number_literal - identifier) )) / number_literal) )))) )) ;) (do_statement "do {\n      pbVar2 = pbVar2 + 1;\n      *param_1 = pbVar2;\n    } while (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0);" do (compound_statement "{\n      pbVar2 = pbVar2 + 1;\n      *param_1 = pbVar2;\n    }" { (expression_statement "pbVar2 = pbVar2 + 1;" (assignment_expression "pbVar2 = pbVar2 + 1" identifier = (binary_expression "pbVar2 + 1" identifier + number_literal)) ;) (expression_statement "*param_1 = pbVar2;" (assignment_expression "*param_1 = pbVar2" (pointer_expression "*param_1" * identifier) = identifier) ;) }) while (parenthesized_expression "(((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0)" ( (binary_expression "((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0" (parenthesized_expression "((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4)" ( (binary_expression "(&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4" (subscript_expression "(&DAT_004a20a0)[(uint)*pbVar2 * 2]" (parenthesized_expression "(&DAT_004a20a0)" ( (pointer_expression "&DAT_004a20a0" & identifier) )) [ (binary_expression "(uint)*pbVar2 * 2" (binary_expression "(uint)*pbVar2" (parenthesized_expression "(uint)" ( identifier )) * identifier) * number_literal) ]) & number_literal) )) != number_literal) )) ;) })) (return_statement "return -1;" return number_literal ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression (parenthesized_expression ( (pointer_expression & IDENT) )) [ (binary_expression (binary_expression (parenthesized_expression ( IDENT )) * IDENT) * LIT) ]) & LIT) )) != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) (pointer_expression * IDENT)) + LIT)) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (binary_expression IDENT * LIT))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression (parenthesized_expression ( (pointer_expression & IDENT) )) [ (binary_expression (binary_expression (parenthesized_expression ( IDENT )) * IDENT) * LIT) ]) & LIT) )) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) (pointer_expression * IDENT)) + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT <= (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression LIT - IDENT) )) / LIT) )))) )) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) }) while (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression (parenthesized_expression ( (pointer_expression & IDENT) )) [ (binary_expression (binary_expression (parenthesized_expression ( IDENT )) * IDENT) * LIT) ]) & LIT) )) != LIT) )) ;) })) (return_statement return LIT ;) })))
(function_definition "int __regparm3 FUN_003950b0(undefined4 *param_1)\n\n{\n  int iVar1;\n  byte *pbVar2;\n  int iVar3;\n  \n  pbVar2 = (byte *)*param_1;\n  if (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0) {\n    iVar3 = 0;\n    iVar1 = (char)*pbVar2 + -0x30;\n    do {\n      pbVar2 = pbVar2 + 1;\n      *param_1 = pbVar2;\n      iVar3 = iVar1 + iVar3 * 10;\n      if (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) == 0) {\n        iVar1 = -1;\n        if (-1 < iVar3) {\n          iVar1 = iVar3;\n        }\n        return iVar1;\n      }\n      iVar1 = (char)*pbVar2 + -0x30;\n    } while (iVar3 <= (int)((0x7fffffffU - iVar1) / 10));\n    do {\n      pbVar2 = pbVar2 + 1;\n      *param_1 = pbVar2;\n    } while (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0);\n  }\n  return -1;\n}" (primitive_type "int") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_003950b0(undefined4 *param_1)" (identifier "FUN_003950b0") (parameter_list "(undefined4 *param_1)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  int iVar1;\n  byte *pbVar2;\n  int iVar3;\n  \n  pbVar2 = (byte *)*param_1;\n  if (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0) {\n    iVar3 = 0;\n    iVar1 = (char)*pbVar2 + -0x30;\n    do {\n      pbVar2 = pbVar2 + 1;\n      *param_1 = pbVar2;\n      iVar3 = iVar1 + iVar3 * 10;\n      if (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) == 0) {\n        iVar1 = -1;\n        if (-1 < iVar3) {\n          iVar1 = iVar3;\n        }\n        return iVar1;\n      }\n      iVar1 = (char)*pbVar2 + -0x30;\n    } while (iVar3 <= (int)((0x7fffffffU - iVar1) / 10));\n    do {\n      pbVar2 = pbVar2 + 1;\n      *param_1 = pbVar2;\n    } while (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0);\n  }\n  return -1;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "byte *pbVar2;" (type_identifier "byte") (pointer_declarator "*pbVar2" (* "*") (identifier "pbVar2")) (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (expression_statement "pbVar2 = (byte *)*param_1;" (assignment_expression "pbVar2 = (byte *)*param_1" (identifier "pbVar2") (= "=") (cast_expression "(byte *)*param_1" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (if_statement "if (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0) {\n    iVar3 = 0;\n    iVar1 = (char)*pbVar2 + -0x30;\n    do {\n      pbVar2 = pbVar2 + 1;\n      *param_1 = pbVar2;\n      iVar3 = iVar1 + iVar3 * 10;\n      if (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) == 0) {\n        iVar1 = -1;\n        if (-1 < iVar3) {\n          iVar1 = iVar3;\n        }\n        return iVar1;\n      }\n      iVar1 = (char)*pbVar2 + -0x30;\n    } while (iVar3 <= (int)((0x7fffffffU - iVar1) / 10));\n    do {\n      pbVar2 = pbVar2 + 1;\n      *param_1 = pbVar2;\n    } while (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0);\n  }" (if "if") (parenthesized_expression "(((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0)" (( "(") (binary_expression "((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0" (parenthesized_expression "((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4)" (( "(") (binary_expression "(&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4" (subscript_expression "(&DAT_004a20a0)[(uint)*pbVar2 * 2]" (parenthesized_expression "(&DAT_004a20a0)" (( "(") (pointer_expression "&DAT_004a20a0" (& "&") (identifier "DAT_004a20a0")) () ")")) ([ "[") (binary_expression "(uint)*pbVar2 * 2" (binary_expression "(uint)*pbVar2" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (identifier "pbVar2")) (* "*") (number_literal "2")) (] "]")) (& "&") (number_literal "4")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    iVar3 = 0;\n    iVar1 = (char)*pbVar2 + -0x30;\n    do {\n      pbVar2 = pbVar2 + 1;\n      *param_1 = pbVar2;\n      iVar3 = iVar1 + iVar3 * 10;\n      if (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) == 0) {\n        iVar1 = -1;\n        if (-1 < iVar3) {\n          iVar1 = iVar3;\n        }\n        return iVar1;\n      }\n      iVar1 = (char)*pbVar2 + -0x30;\n    } while (iVar3 <= (int)((0x7fffffffU - iVar1) / 10));\n    do {\n      pbVar2 = pbVar2 + 1;\n      *param_1 = pbVar2;\n    } while (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0);\n  }" ({ "{") (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" (identifier "iVar3") (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar1 = (char)*pbVar2 + -0x30;" (assignment_expression "iVar1 = (char)*pbVar2 + -0x30" (identifier "iVar1") (= "=") (binary_expression "(char)*pbVar2 + -0x30" (cast_expression "(char)*pbVar2" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (pointer_expression "*pbVar2" (* "*") (identifier "pbVar2"))) (+ "+") (number_literal "-0x30"))) (; ";")) (do_statement "do {\n      pbVar2 = pbVar2 + 1;\n      *param_1 = pbVar2;\n      iVar3 = iVar1 + iVar3 * 10;\n      if (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) == 0) {\n        iVar1 = -1;\n        if (-1 < iVar3) {\n          iVar1 = iVar3;\n        }\n        return iVar1;\n      }\n      iVar1 = (char)*pbVar2 + -0x30;\n    } while (iVar3 <= (int)((0x7fffffffU - iVar1) / 10));" (do "do") (compound_statement "{\n      pbVar2 = pbVar2 + 1;\n      *param_1 = pbVar2;\n      iVar3 = iVar1 + iVar3 * 10;\n      if (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) == 0) {\n        iVar1 = -1;\n        if (-1 < iVar3) {\n          iVar1 = iVar3;\n        }\n        return iVar1;\n      }\n      iVar1 = (char)*pbVar2 + -0x30;\n    }" ({ "{") (expression_statement "pbVar2 = pbVar2 + 1;" (assignment_expression "pbVar2 = pbVar2 + 1" (identifier "pbVar2") (= "=") (binary_expression "pbVar2 + 1" (identifier "pbVar2") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "*param_1 = pbVar2;" (assignment_expression "*param_1 = pbVar2" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (identifier "pbVar2")) (; ";")) (expression_statement "iVar3 = iVar1 + iVar3 * 10;" (assignment_expression "iVar3 = iVar1 + iVar3 * 10" (identifier "iVar3") (= "=") (binary_expression "iVar1 + iVar3 * 10" (identifier "iVar1") (+ "+") (binary_expression "iVar3 * 10" (identifier "iVar3") (* "*") (number_literal "10")))) (; ";")) (if_statement "if (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) == 0) {\n        iVar1 = -1;\n        if (-1 < iVar3) {\n          iVar1 = iVar3;\n        }\n        return iVar1;\n      }" (if "if") (parenthesized_expression "(((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) == 0)" (( "(") (binary_expression "((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) == 0" (parenthesized_expression "((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4)" (( "(") (binary_expression "(&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4" (subscript_expression "(&DAT_004a20a0)[(uint)*pbVar2 * 2]" (parenthesized_expression "(&DAT_004a20a0)" (( "(") (pointer_expression "&DAT_004a20a0" (& "&") (identifier "DAT_004a20a0")) () ")")) ([ "[") (binary_expression "(uint)*pbVar2 * 2" (binary_expression "(uint)*pbVar2" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (identifier "pbVar2")) (* "*") (number_literal "2")) (] "]")) (& "&") (number_literal "4")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        iVar1 = -1;\n        if (-1 < iVar3) {\n          iVar1 = iVar3;\n        }\n        return iVar1;\n      }" ({ "{") (expression_statement "iVar1 = -1;" (assignment_expression "iVar1 = -1" (identifier "iVar1") (= "=") (number_literal "-1")) (; ";")) (if_statement "if (-1 < iVar3) {\n          iVar1 = iVar3;\n        }" (if "if") (parenthesized_expression "(-1 < iVar3)" (( "(") (binary_expression "-1 < iVar3" (number_literal "-1") (< "<") (identifier "iVar3")) () ")")) (compound_statement "{\n          iVar1 = iVar3;\n        }" ({ "{") (expression_statement "iVar1 = iVar3;" (assignment_expression "iVar1 = iVar3" (identifier "iVar1") (= "=") (identifier "iVar3")) (; ";")) (} "}"))) (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}"))) (expression_statement "iVar1 = (char)*pbVar2 + -0x30;" (assignment_expression "iVar1 = (char)*pbVar2 + -0x30" (identifier "iVar1") (= "=") (binary_expression "(char)*pbVar2 + -0x30" (cast_expression "(char)*pbVar2" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (pointer_expression "*pbVar2" (* "*") (identifier "pbVar2"))) (+ "+") (number_literal "-0x30"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar3 <= (int)((0x7fffffffU - iVar1) / 10))" (( "(") (binary_expression "iVar3 <= (int)((0x7fffffffU - iVar1) / 10)" (identifier "iVar3") (<= "<=") (cast_expression "(int)((0x7fffffffU - iVar1) / 10)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "((0x7fffffffU - iVar1) / 10)" (( "(") (binary_expression "(0x7fffffffU - iVar1) / 10" (parenthesized_expression "(0x7fffffffU - iVar1)" (( "(") (binary_expression "0x7fffffffU - iVar1" (number_literal "0x7fffffffU") (- "-") (identifier "iVar1")) () ")")) (/ "/") (number_literal "10")) () ")")))) () ")")) (; ";")) (do_statement "do {\n      pbVar2 = pbVar2 + 1;\n      *param_1 = pbVar2;\n    } while (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0);" (do "do") (compound_statement "{\n      pbVar2 = pbVar2 + 1;\n      *param_1 = pbVar2;\n    }" ({ "{") (expression_statement "pbVar2 = pbVar2 + 1;" (assignment_expression "pbVar2 = pbVar2 + 1" (identifier "pbVar2") (= "=") (binary_expression "pbVar2 + 1" (identifier "pbVar2") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "*param_1 = pbVar2;" (assignment_expression "*param_1 = pbVar2" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (identifier "pbVar2")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0)" (( "(") (binary_expression "((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0" (parenthesized_expression "((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4)" (( "(") (binary_expression "(&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4" (subscript_expression "(&DAT_004a20a0)[(uint)*pbVar2 * 2]" (parenthesized_expression "(&DAT_004a20a0)" (( "(") (pointer_expression "&DAT_004a20a0" (& "&") (identifier "DAT_004a20a0")) () ")")) ([ "[") (binary_expression "(uint)*pbVar2 * 2" (binary_expression "(uint)*pbVar2" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (identifier "pbVar2")) (* "*") (number_literal "2")) (] "]")) (& "&") (number_literal "4")) () ")")) (!= "!=") (number_literal "0")) () ")")) (; ";")) (} "}"))) (return_statement "return -1;" (return "return") (number_literal "-1") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.dx replaced with injection: get_pc_thunk_dx */

int __regparm3 function_1(char **type)

{
  int var_2;
  type_1 *var_1;
  int var_3;
  
  var_1 = (type_1 *)*type;
  if ((_sch_istable[*var_1] & 4) != 0) {
    var_3 = 0;
    var_2 = (char)*var_1 + -0x30;
    do {
      var_1 = var_1 + 1;
      *type = (char *)var_1;
      var_3 = var_2 + var_3 * 10;
      if ((_sch_istable[*var_1] & 4) == 0) {
        var_2 = -1;
        if (-1 < var_3) {
          var_2 = var_3;
        }
        return var_2;
      }
      var_2 = (char)*var_1 + -0x30;
    } while (var_3 <= (int)((0x7fffffffU - var_2) / 10));
    do {
      var_1 = var_1 + 1;
      *type = (char *)var_1;
    } while ((_sch_istable[*var_1] & 4) != 0);
  }
  return -1;
}


(translation_unit (function_definition type: (primitive_type) (ERROR (identifier)) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (subscript_expression argument: (parenthesized_expression (pointer_expression argument: (identifier))) index: (binary_expression left: (binary_expression left: (parenthesized_expression (identifier)) right: (identifier)) right: (number_literal))) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (pointer_expression argument: (identifier))) right: (number_literal)))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (subscript_expression argument: (parenthesized_expression (pointer_expression argument: (identifier))) index: (binary_expression left: (binary_expression left: (parenthesized_expression (identifier)) right: (identifier)) right: (number_literal))) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (return_statement (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (pointer_expression argument: (identifier))) right: (number_literal))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) right: (number_literal))))))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier)))) condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (subscript_expression argument: (parenthesized_expression (pointer_expression argument: (identifier))) index: (binary_expression left: (binary_expression left: (parenthesized_expression (identifier)) right: (identifier)) right: (number_literal))) right: (number_literal))) right: (number_literal)))))) (return_statement (number_literal)))))

/* WARNING: Function: __i686.get_pc_thunk.dx replaced with injection: get_pc_thunk_dx */

int __regparm3 MASKED(undefined4 *param_1)

{
  int iVar1;
  byte *pbVar2;
  int iVar3;
  
  pbVar2 = (byte *)*param_1;
  if (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0) {
    iVar3 = 0;
    iVar1 = (char)*pbVar2 + -0x30;
    do {
      pbVar2 = pbVar2 + 1;
      *param_1 = pbVar2;
      iVar3 = iVar1 + iVar3 * 10;
      if (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) == 0) {
        iVar1 = -1;
        if (-1 < iVar3) {
          iVar1 = iVar3;
        }
        return iVar1;
      }
      iVar1 = (char)*pbVar2 + -0x30;
    } while (iVar3 <= (int)((0x7fffffffU - iVar1) / 10));
    do {
      pbVar2 = pbVar2 + 1;
      *param_1 = pbVar2;
    } while (((&DAT_004a20a0)[(uint)*pbVar2 * 2] & 4) != 0);
  }
  return -1;
}

