
/* WARNING: Function: __x86.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */

int getDigits(char *zDate,char *zFormat,...)

{
  byte *pbVar1;
  int *piVar2;
  bool bVar3;
  int iVar4;
  uint uVar5;
  int local_28;
  undefined4 *local_20;
  
  bVar3 = false;
  local_28 = 0;
  local_20 = (undefined4 *)&stack0x0000000c;
  do {
    if (*zFormat == 0x30) {
      if ('\0' < (char)(((byte *)zFormat)[1] - 0x30)) {
        return local_28;
      }
      iVar4 = 0;
    }
    else {
      uVar5 = (uint)(byte)*zDate;
      if ((""[uVar5] & 4) == 0) {
        return local_28;
      }
      pbVar1 = (byte *)zDate + ((byte)*zFormat - 0x31 & 0xff) + 1;
      iVar4 = 0;
      while( true ) {
        zDate = (char *)((byte *)zDate + 1);
        iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;
        if ((byte *)zDate == pbVar1) break;
        uVar5 = (uint)(byte)*zDate;
        if ((""[uVar5] & 4) == 0) {
          return local_28;
        }
      }
      if (iVar4 < (char)(((byte *)zFormat)[1] - 0x30)) {
        return local_28;
      }
      if ((int)(uint)*(ushort *)(misuse_39145 + (char)((byte *)zFormat)[2] * 2 + 0x42) < iVar4) {
        return local_28;
      }
    }
    if (((byte *)zFormat)[3] == 0) {
      if (!bVar3) {
        local_20 = (undefined4 *)&stack0x0000000c;
      }
      *(int *)*local_20 = iVar4;
      return local_28 + 1;
    }
    if (*zDate != ((byte *)zFormat)[3]) {
      return local_28;
    }
    zDate = (char *)((byte *)zDate + 1);
    local_28 = local_28 + 1;
    zFormat = (char *)((byte *)zFormat + 4);
    bVar3 = true;
    piVar2 = (int *)*local_20;
    local_20 = local_20 + 1;
    *piVar2 = iVar4;
  } while( true );
}



/* WARNING: Function: __i686.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */

int FUN_00022a50(byte *param_1,byte *param_2)

{
  byte *pbVar1;
  int *piVar2;
  bool bVar3;
  int iVar4;
  uint uVar5;
  int local_28;
  undefined4 *local_20;
  
  bVar3 = false;
  local_28 = 0;
  local_20 = (undefined4 *)&stack0x0000000c;
  do {
    if (*param_2 == 0x30) {
      if ('\0' < (char)(param_2[1] - 0x30)) {
        return local_28;
      }
      iVar4 = 0;
    }
    else {
      uVar5 = (uint)*param_1;
      if (((&DAT_000b4f80)[uVar5] & 4) == 0) {
        return local_28;
      }
      pbVar1 = param_1 + (*param_2 - 0x31 & 0xff) + 1;
      iVar4 = 0;
      while( true ) {
        param_1 = param_1 + 1;
        iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;
        if (param_1 == pbVar1) break;
        uVar5 = (uint)*param_1;
        if (((&DAT_000b4f80)[uVar5] & 4) == 0) {
          return local_28;
        }
      }
      if (iVar4 < (char)(param_2[1] - 0x30)) {
        return local_28;
      }
      if ((int)(uint)(ushort)L"bad parameter or other API misuse"[(char)param_2[2] + 0x21] < iVar4)
      {
        return local_28;
      }
    }
    if (param_2[3] == 0) {
      if (!bVar3) {
        local_20 = (undefined4 *)&stack0x0000000c;
      }
      *(int *)*local_20 = iVar4;
      return local_28 + 1;
    }
    if (*param_1 != param_2[3]) {
      return local_28;
    }
    param_1 = param_1 + 1;
    local_28 = local_28 + 1;
    param_2 = param_2 + 4;
    bVar3 = true;
    piVar2 = (int *)*local_20;
    local_20 = local_20 + 1;
    *piVar2 = iVar4;
  } while( true );
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x000a94f3
ADD EAX,0xbb5a7
SUB ESP,0x18
LEA EDI,[ESP + 0x34]
MOV dword ptr [ESP + 0x4],EAX
MOV EDX,dword ptr [ESP + 0x2c]
LEA EAX,[EAX + 0xfffd2f04]
MOV EBP,dword ptr [ESP + 0x30]
MOV byte ptr [ESP + 0xf],0x0
MOV dword ptr [ESP + 0x14],EDI
MOV dword ptr [ESP + 0x8],EDI
MOV dword ptr [ESP],0x0
MOV dword ptr [ESP + 0x10],EAX
MOVZX EDI,byte ptr [EBP + 0x1]
MOVZX EAX,byte ptr [EBP]
LEA EBX,[EDI + -0x30]
CMP AL,0x30
LEA ECX,[EAX + -0x31]
MOV byte ptr [ESP + 0xe],BL
JZ 0x00022b68
MOVZX EBX,byte ptr [EDX]
MOV ESI,dword ptr [ESP + 0x4]
LEA EDI,[ESI + 0xfffd6f80]
TEST byte ptr [ESI + EBX*0x1 + 0xfffd6f80],0x4
MOV EAX,EBX
JZ 0x00022b56
MOVZX ECX,CL
LEA ESI,[EDX + ECX*0x1 + 0x1]
XOR ECX,ECX
JMP 0x00022ae3
MOVZX EBX,byte ptr [EDX]
TEST byte ptr [EDI + EBX*0x1],0x4
MOV EAX,EBX
JZ 0x00022b56
LEA ECX,[ECX + ECX*0x4]
ADD EDX,0x1
MOVSX EAX,AL
CMP EDX,ESI
LEA ECX,[EAX + ECX*0x2 + -0x30]
JNZ 0x00022ad8
MOVSX EAX,byte ptr [ESP + 0xe]
CMP EAX,ECX
JG 0x00022b56
MOVSX EAX,byte ptr [EBP + 0x2]
MOV ESI,dword ptr [ESP + 0x10]
MOVZX EAX,word ptr [ESI + EAX*0x2 + 0xffffff3e]
CMP EAX,ECX
JL 0x00022b56
MOVZX EAX,byte ptr [EBP + 0x3]
TEST AL,AL
JZ 0x00022b40
CMP byte ptr [EDX],AL
JNZ 0x00022b56
MOV EDI,dword ptr [ESP + 0x8]
ADD EDX,0x1
ADD dword ptr [ESP],0x1
ADD EBP,0x4
MOV byte ptr [ESP + 0xf],0x1
MOV EAX,dword ptr [EDI]
ADD EDI,0x4
MOV dword ptr [ESP + 0x8],EDI
MOV dword ptr [EAX],ECX
JMP 0x00022a8f
CMP byte ptr [ESP + 0xf],0x0
MOV EAX,dword ptr [ESP + 0x8]
CMOVZ EAX,dword ptr [ESP + 0x14]
ADD dword ptr [ESP],0x1
MOV EAX,dword ptr [EAX]
MOV dword ptr [EAX],ECX
MOV EAX,dword ptr [ESP]
ADD ESP,0x18
POP EBX
POP ESI
POP EDI
POP EBP
RET
CMP byte ptr [ESP + 0xe],0x0
JG 0x00022b56
XOR ECX,ECX
JMP 0x00022b11
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */\n\nint FUN_00022a50(byte *param_1,byte *param_2)\n\n{\n  byte *pbVar1;\n  int *piVar2;\n  bool bVar3;\n  int iVar4;\n  uint uVar5;\n  int local_28;\n  undefined4 *local_20;\n  \n  bVar3 = false;\n  local_28 = 0;\n  local_20 = (undefined4 *)&stack0x0000000c;\n  do {\n    if (*param_2 == 0x30) {\n      if ('\0' < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }\n      iVar4 = 0;\n    }\n    else {\n      uVar5 = (uint)*param_1;\n      if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n        return local_28;\n      }\n      pbVar1 = param_1 + (*param_2 - 0x31 & 0xff) + 1;\n      iVar4 = 0;\n      while( true ) {\n        param_1 = param_1 + 1;\n        iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;\n        if (param_1 == pbVar1) break;\n        uVar5 = (uint)*param_1;\n        if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n          return local_28;\n        }\n      }\n      if (iVar4 < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }\n      if ((int)(uint)(ushort)L"bad parameter or other API misuse"[(char)param_2[2] + 0x21] < iVar4)\n      {\n        return local_28;\n      }\n    }\n    if (param_2[3] == 0) {\n      if (!bVar3) {\n        local_20 = (undefined4 *)&stack0x0000000c;\n      }\n      *(int *)*local_20 = iVar4;\n      return local_28 + 1;\n    }\n    if (*param_1 != param_2[3]) {\n      return local_28;\n    }\n    param_1 = param_1 + 1;\n    local_28 = local_28 + 1;\n    param_2 = param_2 + 4;\n    bVar3 = true;\n    piVar2 = (int *)*local_20;\n    local_20 = local_20 + 1;\n    *piVar2 = iVar4;\n  } while( true );\n}\n\n" comment (function_definition "int FUN_00022a50(byte *param_1,byte *param_2)\n\n{\n  byte *pbVar1;\n  int *piVar2;\n  bool bVar3;\n  int iVar4;\n  uint uVar5;\n  int local_28;\n  undefined4 *local_20;\n  \n  bVar3 = false;\n  local_28 = 0;\n  local_20 = (undefined4 *)&stack0x0000000c;\n  do {\n    if (*param_2 == 0x30) {\n      if ('\0' < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }\n      iVar4 = 0;\n    }\n    else {\n      uVar5 = (uint)*param_1;\n      if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n        return local_28;\n      }\n      pbVar1 = param_1 + (*param_2 - 0x31 & 0xff) + 1;\n      iVar4 = 0;\n      while( true ) {\n        param_1 = param_1 + 1;\n        iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;\n        if (param_1 == pbVar1) break;\n        uVar5 = (uint)*param_1;\n        if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n          return local_28;\n        }\n      }\n      if (iVar4 < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }\n      if ((int)(uint)(ushort)L"bad parameter or other API misuse"[(char)param_2[2] + 0x21] < iVar4)\n      {\n        return local_28;\n      }\n    }\n    if (param_2[3] == 0) {\n      if (!bVar3) {\n        local_20 = (undefined4 *)&stack0x0000000c;\n      }\n      *(int *)*local_20 = iVar4;\n      return local_28 + 1;\n    }\n    if (*param_1 != param_2[3]) {\n      return local_28;\n    }\n    param_1 = param_1 + 1;\n    local_28 = local_28 + 1;\n    param_2 = param_2 + 4;\n    bVar3 = true;\n    piVar2 = (int *)*local_20;\n    local_20 = local_20 + 1;\n    *piVar2 = iVar4;\n  } while( true );\n}" primitive_type (function_declarator "FUN_00022a50(byte *param_1,byte *param_2)" identifier (parameter_list "(byte *param_1,byte *param_2)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "byte *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  byte *pbVar1;\n  int *piVar2;\n  bool bVar3;\n  int iVar4;\n  uint uVar5;\n  int local_28;\n  undefined4 *local_20;\n  \n  bVar3 = false;\n  local_28 = 0;\n  local_20 = (undefined4 *)&stack0x0000000c;\n  do {\n    if (*param_2 == 0x30) {\n      if ('\0' < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }\n      iVar4 = 0;\n    }\n    else {\n      uVar5 = (uint)*param_1;\n      if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n        return local_28;\n      }\n      pbVar1 = param_1 + (*param_2 - 0x31 & 0xff) + 1;\n      iVar4 = 0;\n      while( true ) {\n        param_1 = param_1 + 1;\n        iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;\n        if (param_1 == pbVar1) break;\n        uVar5 = (uint)*param_1;\n        if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n          return local_28;\n        }\n      }\n      if (iVar4 < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }\n      if ((int)(uint)(ushort)L"bad parameter or other API misuse"[(char)param_2[2] + 0x21] < iVar4)\n      {\n        return local_28;\n      }\n    }\n    if (param_2[3] == 0) {\n      if (!bVar3) {\n        local_20 = (undefined4 *)&stack0x0000000c;\n      }\n      *(int *)*local_20 = iVar4;\n      return local_28 + 1;\n    }\n    if (*param_1 != param_2[3]) {\n      return local_28;\n    }\n    param_1 = param_1 + 1;\n    local_28 = local_28 + 1;\n    param_2 = param_2 + 4;\n    bVar3 = true;\n    piVar2 = (int *)*local_20;\n    local_20 = local_20 + 1;\n    *piVar2 = iVar4;\n  } while( true );\n}" { (declaration "byte *pbVar1;" type_identifier (pointer_declarator "*pbVar1" * identifier) ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "bool bVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "int local_28;" primitive_type identifier ;) (declaration "undefined4 *local_20;" type_identifier (pointer_declarator "*local_20" * identifier) ;) (expression_statement "bVar3 = false;" (assignment_expression "bVar3 = false" identifier = false) ;) (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" identifier = number_literal) ;) (expression_statement "local_20 = (undefined4 *)&stack0x0000000c;" (assignment_expression "local_20 = (undefined4 *)&stack0x0000000c" identifier = (cast_expression "(undefined4 *)&stack0x0000000c" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&stack0x0000000c" & identifier))) ;) (do_statement "do {\n    if (*param_2 == 0x30) {\n      if ('\0' < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }\n      iVar4 = 0;\n    }\n    else {\n      uVar5 = (uint)*param_1;\n      if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n        return local_28;\n      }\n      pbVar1 = param_1 + (*param_2 - 0x31 & 0xff) + 1;\n      iVar4 = 0;\n      while( true ) {\n        param_1 = param_1 + 1;\n        iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;\n        if (param_1 == pbVar1) break;\n        uVar5 = (uint)*param_1;\n        if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n          return local_28;\n        }\n      }\n      if (iVar4 < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }\n      if ((int)(uint)(ushort)L"bad parameter or other API misuse"[(char)param_2[2] + 0x21] < iVar4)\n      {\n        return local_28;\n      }\n    }\n    if (param_2[3] == 0) {\n      if (!bVar3) {\n        local_20 = (undefined4 *)&stack0x0000000c;\n      }\n      *(int *)*local_20 = iVar4;\n      return local_28 + 1;\n    }\n    if (*param_1 != param_2[3]) {\n      return local_28;\n    }\n    param_1 = param_1 + 1;\n    local_28 = local_28 + 1;\n    param_2 = param_2 + 4;\n    bVar3 = true;\n    piVar2 = (int *)*local_20;\n    local_20 = local_20 + 1;\n    *piVar2 = iVar4;\n  } while( true );" do (compound_statement "{\n    if (*param_2 == 0x30) {\n      if ('\0' < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }\n      iVar4 = 0;\n    }\n    else {\n      uVar5 = (uint)*param_1;\n      if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n        return local_28;\n      }\n      pbVar1 = param_1 + (*param_2 - 0x31 & 0xff) + 1;\n      iVar4 = 0;\n      while( true ) {\n        param_1 = param_1 + 1;\n        iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;\n        if (param_1 == pbVar1) break;\n        uVar5 = (uint)*param_1;\n        if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n          return local_28;\n        }\n      }\n      if (iVar4 < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }\n      if ((int)(uint)(ushort)L"bad parameter or other API misuse"[(char)param_2[2] + 0x21] < iVar4)\n      {\n        return local_28;\n      }\n    }\n    if (param_2[3] == 0) {\n      if (!bVar3) {\n        local_20 = (undefined4 *)&stack0x0000000c;\n      }\n      *(int *)*local_20 = iVar4;\n      return local_28 + 1;\n    }\n    if (*param_1 != param_2[3]) {\n      return local_28;\n    }\n    param_1 = param_1 + 1;\n    local_28 = local_28 + 1;\n    param_2 = param_2 + 4;\n    bVar3 = true;\n    piVar2 = (int *)*local_20;\n    local_20 = local_20 + 1;\n    *piVar2 = iVar4;\n  }" { (if_statement "if (*param_2 == 0x30) {\n      if ('\0' < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }\n      iVar4 = 0;\n    }\n    else {\n      uVar5 = (uint)*param_1;\n      if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n        return local_28;\n      }\n      pbVar1 = param_1 + (*param_2 - 0x31 & 0xff) + 1;\n      iVar4 = 0;\n      while( true ) {\n        param_1 = param_1 + 1;\n        iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;\n        if (param_1 == pbVar1) break;\n        uVar5 = (uint)*param_1;\n        if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n          return local_28;\n        }\n      }\n      if (iVar4 < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }\n      if ((int)(uint)(ushort)L"bad parameter or other API misuse"[(char)param_2[2] + 0x21] < iVar4)\n      {\n        return local_28;\n      }\n    }" if (parenthesized_expression "(*param_2 == 0x30)" ( (binary_expression "*param_2 == 0x30" (pointer_expression "*param_2" * identifier) == number_literal) )) (compound_statement "{\n      if ('\0' < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }\n      iVar4 = 0;\n    }" { (if_statement "if ('\0' < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }" if (parenthesized_expression "('\0' < (char)(param_2[1] - 0x30))" ( (binary_expression "'\0' < (char)(param_2[1] - 0x30)" (char_literal "'\0'" ' escape_sequence ') < (cast_expression "(char)(param_2[1] - 0x30)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(param_2[1] - 0x30)" ( (binary_expression "param_2[1] - 0x30" (subscript_expression "param_2[1]" identifier [ number_literal ]) - number_literal) )))) )) (compound_statement "{\n        return local_28;\n      }" { (return_statement "return local_28;" return identifier ;) })) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) }) (else_clause "else {\n      uVar5 = (uint)*param_1;\n      if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n        return local_28;\n      }\n      pbVar1 = param_1 + (*param_2 - 0x31 & 0xff) + 1;\n      iVar4 = 0;\n      while( true ) {\n        param_1 = param_1 + 1;\n        iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;\n        if (param_1 == pbVar1) break;\n        uVar5 = (uint)*param_1;\n        if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n          return local_28;\n        }\n      }\n      if (iVar4 < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }\n      if ((int)(uint)(ushort)L"bad parameter or other API misuse"[(char)param_2[2] + 0x21] < iVar4)\n      {\n        return local_28;\n      }\n    }" else (compound_statement "{\n      uVar5 = (uint)*param_1;\n      if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n        return local_28;\n      }\n      pbVar1 = param_1 + (*param_2 - 0x31 & 0xff) + 1;\n      iVar4 = 0;\n      while( true ) {\n        param_1 = param_1 + 1;\n        iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;\n        if (param_1 == pbVar1) break;\n        uVar5 = (uint)*param_1;\n        if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n          return local_28;\n        }\n      }\n      if (iVar4 < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }\n      if ((int)(uint)(ushort)L"bad parameter or other API misuse"[(char)param_2[2] + 0x21] < iVar4)\n      {\n        return local_28;\n      }\n    }" { (expression_statement "uVar5 = (uint)*param_1;" (assignment_expression "uVar5 = (uint)*param_1" identifier = (binary_expression "(uint)*param_1" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (if_statement "if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n        return local_28;\n      }" if (parenthesized_expression "(((&DAT_000b4f80)[uVar5] & 4) == 0)" ( (binary_expression "((&DAT_000b4f80)[uVar5] & 4) == 0" (parenthesized_expression "((&DAT_000b4f80)[uVar5] & 4)" ( (binary_expression "(&DAT_000b4f80)[uVar5] & 4" (subscript_expression "(&DAT_000b4f80)[uVar5]" (parenthesized_expression "(&DAT_000b4f80)" ( (pointer_expression "&DAT_000b4f80" & identifier) )) [ identifier ]) & number_literal) )) == number_literal) )) (compound_statement "{\n        return local_28;\n      }" { (return_statement "return local_28;" return identifier ;) })) (expression_statement "pbVar1 = param_1 + (*param_2 - 0x31 & 0xff) + 1;" (assignment_expression "pbVar1 = param_1 + (*param_2 - 0x31 & 0xff) + 1" identifier = (binary_expression "param_1 + (*param_2 - 0x31 & 0xff) + 1" (binary_expression "param_1 + (*param_2 - 0x31 & 0xff)" identifier + (parenthesized_expression "(*param_2 - 0x31 & 0xff)" ( (binary_expression "*param_2 - 0x31 & 0xff" (binary_expression "*param_2 - 0x31" (pointer_expression "*param_2" * identifier) - number_literal) & number_literal) ))) + number_literal)) ;) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (while_statement "while( true ) {\n        param_1 = param_1 + 1;\n        iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;\n        if (param_1 == pbVar1) break;\n        uVar5 = (uint)*param_1;\n        if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n          return local_28;\n        }\n      }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n        param_1 = param_1 + 1;\n        iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;\n        if (param_1 == pbVar1) break;\n        uVar5 = (uint)*param_1;\n        if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n          return local_28;\n        }\n      }" { (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) (expression_statement "iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;" (assignment_expression "iVar4 = (char)uVar5 + -0x30 + iVar4 * 10" identifier = (binary_expression "(char)uVar5 + -0x30 + iVar4 * 10" (binary_expression "(char)uVar5 + -0x30" (cast_expression "(char)uVar5" ( (type_descriptor "char" primitive_type) ) identifier) + number_literal) + (binary_expression "iVar4 * 10" identifier * number_literal))) ;) (if_statement "if (param_1 == pbVar1) break;" if (parenthesized_expression "(param_1 == pbVar1)" ( (binary_expression "param_1 == pbVar1" identifier == identifier) )) (break_statement "break;" break ;)) (expression_statement "uVar5 = (uint)*param_1;" (assignment_expression "uVar5 = (uint)*param_1" identifier = (binary_expression "(uint)*param_1" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (if_statement "if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n          return local_28;\n        }" if (parenthesized_expression "(((&DAT_000b4f80)[uVar5] & 4) == 0)" ( (binary_expression "((&DAT_000b4f80)[uVar5] & 4) == 0" (parenthesized_expression "((&DAT_000b4f80)[uVar5] & 4)" ( (binary_expression "(&DAT_000b4f80)[uVar5] & 4" (subscript_expression "(&DAT_000b4f80)[uVar5]" (parenthesized_expression "(&DAT_000b4f80)" ( (pointer_expression "&DAT_000b4f80" & identifier) )) [ identifier ]) & number_literal) )) == number_literal) )) (compound_statement "{\n          return local_28;\n        }" { (return_statement "return local_28;" return identifier ;) })) })) (if_statement "if (iVar4 < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }" if (parenthesized_expression "(iVar4 < (char)(param_2[1] - 0x30))" ( (binary_expression "iVar4 < (char)(param_2[1] - 0x30)" identifier < (cast_expression "(char)(param_2[1] - 0x30)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(param_2[1] - 0x30)" ( (binary_expression "param_2[1] - 0x30" (subscript_expression "param_2[1]" identifier [ number_literal ]) - number_literal) )))) )) (compound_statement "{\n        return local_28;\n      }" { (return_statement "return local_28;" return identifier ;) })) (if_statement "if ((int)(uint)(ushort)L"bad parameter or other API misuse"[(char)param_2[2] + 0x21] < iVar4)\n      {\n        return local_28;\n      }" if (parenthesized_expression "((int)(uint)(ushort)L"bad parameter or other API misuse"[(char)param_2[2] + 0x21] < iVar4)" ( (binary_expression "(int)(uint)(ushort)L"bad parameter or other API misuse"[(char)param_2[2] + 0x21] < iVar4" (cast_expression "(int)(uint)(ushort)L"bad parameter or other API misuse"[(char)param_2[2] + 0x21]" ( (type_descriptor "int" primitive_type) ) (cast_expression "(uint)(ushort)L"bad parameter or other API misuse"[(char)param_2[2] + 0x21]" ( (type_descriptor "uint" type_identifier) ) (cast_expression "(ushort)L"bad parameter or other API misuse"[(char)param_2[2] + 0x21]" ( (type_descriptor "ushort" type_identifier) ) (subscript_expression "L"bad parameter or other API misuse"[(char)param_2[2] + 0x21]" (string_literal "L"bad parameter or other API misuse"" L" string_content ") [ (binary_expression "(char)param_2[2] + 0x21" (cast_expression "(char)param_2[2]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "param_2[2]" identifier [ number_literal ])) + number_literal) ])))) < identifier) )) (compound_statement "{\n        return local_28;\n      }" { (return_statement "return local_28;" return identifier ;) })) }))) (if_statement "if (param_2[3] == 0) {\n      if (!bVar3) {\n        local_20 = (undefined4 *)&stack0x0000000c;\n      }\n      *(int *)*local_20 = iVar4;\n      return local_28 + 1;\n    }" if (parenthesized_expression "(param_2[3] == 0)" ( (binary_expression "param_2[3] == 0" (subscript_expression "param_2[3]" identifier [ number_literal ]) == number_literal) )) (compound_statement "{\n      if (!bVar3) {\n        local_20 = (undefined4 *)&stack0x0000000c;\n      }\n      *(int *)*local_20 = iVar4;\n      return local_28 + 1;\n    }" { (if_statement "if (!bVar3) {\n        local_20 = (undefined4 *)&stack0x0000000c;\n      }" if (parenthesized_expression "(!bVar3)" ( (unary_expression "!bVar3" ! identifier) )) (compound_statement "{\n        local_20 = (undefined4 *)&stack0x0000000c;\n      }" { (expression_statement "local_20 = (undefined4 *)&stack0x0000000c;" (assignment_expression "local_20 = (undefined4 *)&stack0x0000000c" identifier = (cast_expression "(undefined4 *)&stack0x0000000c" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&stack0x0000000c" & identifier))) ;) })) (expression_statement "*(int *)*local_20 = iVar4;" (assignment_expression "*(int *)*local_20 = iVar4" (pointer_expression "*(int *)*local_20" * (cast_expression "(int *)*local_20" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*local_20" * identifier))) = identifier) ;) (return_statement "return local_28 + 1;" return (binary_expression "local_28 + 1" identifier + number_literal) ;) })) (if_statement "if (*param_1 != param_2[3]) {\n      return local_28;\n    }" if (parenthesized_expression "(*param_1 != param_2[3])" ( (binary_expression "*param_1 != param_2[3]" (pointer_expression "*param_1" * identifier) != (subscript_expression "param_2[3]" identifier [ number_literal ])) )) (compound_statement "{\n      return local_28;\n    }" { (return_statement "return local_28;" return identifier ;) })) (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) (expression_statement "local_28 = local_28 + 1;" (assignment_expression "local_28 = local_28 + 1" identifier = (binary_expression "local_28 + 1" identifier + number_literal)) ;) (expression_statement "param_2 = param_2 + 4;" (assignment_expression "param_2 = param_2 + 4" identifier = (binary_expression "param_2 + 4" identifier + number_literal)) ;) (expression_statement "bVar3 = true;" (assignment_expression "bVar3 = true" identifier = true) ;) (expression_statement "piVar2 = (int *)*local_20;" (assignment_expression "piVar2 = (int *)*local_20" identifier = (cast_expression "(int *)*local_20" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*local_20" * identifier))) ;) (expression_statement "local_20 = local_20 + 1;" (assignment_expression "local_20 = local_20 + 1" identifier = (binary_expression "local_20 + 1" identifier + number_literal)) ;) (expression_statement "*piVar2 = iVar4;" (assignment_expression "*piVar2 = iVar4" (pointer_expression "*piVar2" * identifier) = identifier) ;) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */\n\nint getDigits(char *zDate,char *zFormat,...)\n\n{\n  byte *pbVar1;\n  int *piVar2;\n  bool bVar3;\n  int iVar4;\n  uint uVar5;\n  int local_28;\n  undefined4 *local_20;\n  \n  bVar3 = false;\n  local_28 = 0;\n  local_20 = (undefined4 *)&stack0x0000000c;\n  do {\n    if (*zFormat == 0x30) {\n      if ('\0' < (char)(((byte *)zFormat)[1] - 0x30)) {\n        return local_28;\n      }\n      iVar4 = 0;\n    }\n    else {\n      uVar5 = (uint)(byte)*zDate;\n      if ((""[uVar5] & 4) == 0) {\n        return local_28;\n      }\n      pbVar1 = (byte *)zDate + ((byte)*zFormat - 0x31 & 0xff) + 1;\n      iVar4 = 0;\n      while( true ) {\n        zDate = (char *)((byte *)zDate + 1);\n        iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;\n        if ((byte *)zDate == pbVar1) break;\n        uVar5 = (uint)(byte)*zDate;\n        if ((""[uVar5] & 4) == 0) {\n          return local_28;\n        }\n      }\n      if (iVar4 < (char)(((byte *)zFormat)[1] - 0x30)) {\n        return local_28;\n      }\n      if ((int)(uint)*(ushort *)(misuse_39145 + (char)((byte *)zFormat)[2] * 2 + 0x42) < iVar4) {\n        return local_28;\n      }\n    }\n    if (((byte *)zFormat)[3] == 0) {\n      if (!bVar3) {\n        local_20 = (undefined4 *)&stack0x0000000c;\n      }\n      *(int *)*local_20 = iVar4;\n      return local_28 + 1;\n    }\n    if (*zDate != ((byte *)zFormat)[3]) {\n      return local_28;\n    }\n    zDate = (char *)((byte *)zDate + 1);\n    local_28 = local_28 + 1;\n    zFormat = (char *)((byte *)zFormat + 4);\n    bVar3 = true;\n    piVar2 = (int *)*local_20;\n    local_20 = local_20 + 1;\n    *piVar2 = iVar4;\n  } while( true );\n}\n\n" comment (function_definition "int getDigits(char *zDate,char *zFormat,...)\n\n{\n  byte *pbVar1;\n  int *piVar2;\n  bool bVar3;\n  int iVar4;\n  uint uVar5;\n  int local_28;\n  undefined4 *local_20;\n  \n  bVar3 = false;\n  local_28 = 0;\n  local_20 = (undefined4 *)&stack0x0000000c;\n  do {\n    if (*zFormat == 0x30) {\n      if ('\0' < (char)(((byte *)zFormat)[1] - 0x30)) {\n        return local_28;\n      }\n      iVar4 = 0;\n    }\n    else {\n      uVar5 = (uint)(byte)*zDate;\n      if ((""[uVar5] & 4) == 0) {\n        return local_28;\n      }\n      pbVar1 = (byte *)zDate + ((byte)*zFormat - 0x31 & 0xff) + 1;\n      iVar4 = 0;\n      while( true ) {\n        zDate = (char *)((byte *)zDate + 1);\n        iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;\n        if ((byte *)zDate == pbVar1) break;\n        uVar5 = (uint)(byte)*zDate;\n        if ((""[uVar5] & 4) == 0) {\n          return local_28;\n        }\n      }\n      if (iVar4 < (char)(((byte *)zFormat)[1] - 0x30)) {\n        return local_28;\n      }\n      if ((int)(uint)*(ushort *)(misuse_39145 + (char)((byte *)zFormat)[2] * 2 + 0x42) < iVar4) {\n        return local_28;\n      }\n    }\n    if (((byte *)zFormat)[3] == 0) {\n      if (!bVar3) {\n        local_20 = (undefined4 *)&stack0x0000000c;\n      }\n      *(int *)*local_20 = iVar4;\n      return local_28 + 1;\n    }\n    if (*zDate != ((byte *)zFormat)[3]) {\n      return local_28;\n    }\n    zDate = (char *)((byte *)zDate + 1);\n    local_28 = local_28 + 1;\n    zFormat = (char *)((byte *)zFormat + 4);\n    bVar3 = true;\n    piVar2 = (int *)*local_20;\n    local_20 = local_20 + 1;\n    *piVar2 = iVar4;\n  } while( true );\n}" primitive_type (function_declarator "getDigits(char *zDate,char *zFormat,...)" identifier (parameter_list "(char *zDate,char *zFormat,...)" ( (parameter_declaration "char *zDate" primitive_type (pointer_declarator "*zDate" * identifier)) , (parameter_declaration "char *zFormat" primitive_type (pointer_declarator "*zFormat" * identifier)) , (variadic_parameter "..." ...) ))) (compound_statement "{\n  byte *pbVar1;\n  int *piVar2;\n  bool bVar3;\n  int iVar4;\n  uint uVar5;\n  int local_28;\n  undefined4 *local_20;\n  \n  bVar3 = false;\n  local_28 = 0;\n  local_20 = (undefined4 *)&stack0x0000000c;\n  do {\n    if (*zFormat == 0x30) {\n      if ('\0' < (char)(((byte *)zFormat)[1] - 0x30)) {\n        return local_28;\n      }\n      iVar4 = 0;\n    }\n    else {\n      uVar5 = (uint)(byte)*zDate;\n      if ((""[uVar5] & 4) == 0) {\n        return local_28;\n      }\n      pbVar1 = (byte *)zDate + ((byte)*zFormat - 0x31 & 0xff) + 1;\n      iVar4 = 0;\n      while( true ) {\n        zDate = (char *)((byte *)zDate + 1);\n        iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;\n        if ((byte *)zDate == pbVar1) break;\n        uVar5 = (uint)(byte)*zDate;\n        if ((""[uVar5] & 4) == 0) {\n          return local_28;\n        }\n      }\n      if (iVar4 < (char)(((byte *)zFormat)[1] - 0x30)) {\n        return local_28;\n      }\n      if ((int)(uint)*(ushort *)(misuse_39145 + (char)((byte *)zFormat)[2] * 2 + 0x42) < iVar4) {\n        return local_28;\n      }\n    }\n    if (((byte *)zFormat)[3] == 0) {\n      if (!bVar3) {\n        local_20 = (undefined4 *)&stack0x0000000c;\n      }\n      *(int *)*local_20 = iVar4;\n      return local_28 + 1;\n    }\n    if (*zDate != ((byte *)zFormat)[3]) {\n      return local_28;\n    }\n    zDate = (char *)((byte *)zDate + 1);\n    local_28 = local_28 + 1;\n    zFormat = (char *)((byte *)zFormat + 4);\n    bVar3 = true;\n    piVar2 = (int *)*local_20;\n    local_20 = local_20 + 1;\n    *piVar2 = iVar4;\n  } while( true );\n}" { (declaration "byte *pbVar1;" type_identifier (pointer_declarator "*pbVar1" * identifier) ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "bool bVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "int local_28;" primitive_type identifier ;) (declaration "undefined4 *local_20;" type_identifier (pointer_declarator "*local_20" * identifier) ;) (expression_statement "bVar3 = false;" (assignment_expression "bVar3 = false" identifier = false) ;) (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" identifier = number_literal) ;) (expression_statement "local_20 = (undefined4 *)&stack0x0000000c;" (assignment_expression "local_20 = (undefined4 *)&stack0x0000000c" identifier = (cast_expression "(undefined4 *)&stack0x0000000c" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&stack0x0000000c" & identifier))) ;) (do_statement "do {\n    if (*zFormat == 0x30) {\n      if ('\0' < (char)(((byte *)zFormat)[1] - 0x30)) {\n        return local_28;\n      }\n      iVar4 = 0;\n    }\n    else {\n      uVar5 = (uint)(byte)*zDate;\n      if ((""[uVar5] & 4) == 0) {\n        return local_28;\n      }\n      pbVar1 = (byte *)zDate + ((byte)*zFormat - 0x31 & 0xff) + 1;\n      iVar4 = 0;\n      while( true ) {\n        zDate = (char *)((byte *)zDate + 1);\n        iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;\n        if ((byte *)zDate == pbVar1) break;\n        uVar5 = (uint)(byte)*zDate;\n        if ((""[uVar5] & 4) == 0) {\n          return local_28;\n        }\n      }\n      if (iVar4 < (char)(((byte *)zFormat)[1] - 0x30)) {\n        return local_28;\n      }\n      if ((int)(uint)*(ushort *)(misuse_39145 + (char)((byte *)zFormat)[2] * 2 + 0x42) < iVar4) {\n        return local_28;\n      }\n    }\n    if (((byte *)zFormat)[3] == 0) {\n      if (!bVar3) {\n        local_20 = (undefined4 *)&stack0x0000000c;\n      }\n      *(int *)*local_20 = iVar4;\n      return local_28 + 1;\n    }\n    if (*zDate != ((byte *)zFormat)[3]) {\n      return local_28;\n    }\n    zDate = (char *)((byte *)zDate + 1);\n    local_28 = local_28 + 1;\n    zFormat = (char *)((byte *)zFormat + 4);\n    bVar3 = true;\n    piVar2 = (int *)*local_20;\n    local_20 = local_20 + 1;\n    *piVar2 = iVar4;\n  } while( true );" do (compound_statement "{\n    if (*zFormat == 0x30) {\n      if ('\0' < (char)(((byte *)zFormat)[1] - 0x30)) {\n        return local_28;\n      }\n      iVar4 = 0;\n    }\n    else {\n      uVar5 = (uint)(byte)*zDate;\n      if ((""[uVar5] & 4) == 0) {\n        return local_28;\n      }\n      pbVar1 = (byte *)zDate + ((byte)*zFormat - 0x31 & 0xff) + 1;\n      iVar4 = 0;\n      while( true ) {\n        zDate = (char *)((byte *)zDate + 1);\n        iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;\n        if ((byte *)zDate == pbVar1) break;\n        uVar5 = (uint)(byte)*zDate;\n        if ((""[uVar5] & 4) == 0) {\n          return local_28;\n        }\n      }\n      if (iVar4 < (char)(((byte *)zFormat)[1] - 0x30)) {\n        return local_28;\n      }\n      if ((int)(uint)*(ushort *)(misuse_39145 + (char)((byte *)zFormat)[2] * 2 + 0x42) < iVar4) {\n        return local_28;\n      }\n    }\n    if (((byte *)zFormat)[3] == 0) {\n      if (!bVar3) {\n        local_20 = (undefined4 *)&stack0x0000000c;\n      }\n      *(int *)*local_20 = iVar4;\n      return local_28 + 1;\n    }\n    if (*zDate != ((byte *)zFormat)[3]) {\n      return local_28;\n    }\n    zDate = (char *)((byte *)zDate + 1);\n    local_28 = local_28 + 1;\n    zFormat = (char *)((byte *)zFormat + 4);\n    bVar3 = true;\n    piVar2 = (int *)*local_20;\n    local_20 = local_20 + 1;\n    *piVar2 = iVar4;\n  }" { (if_statement "if (*zFormat == 0x30) {\n      if ('\0' < (char)(((byte *)zFormat)[1] - 0x30)) {\n        return local_28;\n      }\n      iVar4 = 0;\n    }\n    else {\n      uVar5 = (uint)(byte)*zDate;\n      if ((""[uVar5] & 4) == 0) {\n        return local_28;\n      }\n      pbVar1 = (byte *)zDate + ((byte)*zFormat - 0x31 & 0xff) + 1;\n      iVar4 = 0;\n      while( true ) {\n        zDate = (char *)((byte *)zDate + 1);\n        iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;\n        if ((byte *)zDate == pbVar1) break;\n        uVar5 = (uint)(byte)*zDate;\n        if ((""[uVar5] & 4) == 0) {\n          return local_28;\n        }\n      }\n      if (iVar4 < (char)(((byte *)zFormat)[1] - 0x30)) {\n        return local_28;\n      }\n      if ((int)(uint)*(ushort *)(misuse_39145 + (char)((byte *)zFormat)[2] * 2 + 0x42) < iVar4) {\n        return local_28;\n      }\n    }" if (parenthesized_expression "(*zFormat == 0x30)" ( (binary_expression "*zFormat == 0x30" (pointer_expression "*zFormat" * identifier) == number_literal) )) (compound_statement "{\n      if ('\0' < (char)(((byte *)zFormat)[1] - 0x30)) {\n        return local_28;\n      }\n      iVar4 = 0;\n    }" { (if_statement "if ('\0' < (char)(((byte *)zFormat)[1] - 0x30)) {\n        return local_28;\n      }" if (parenthesized_expression "('\0' < (char)(((byte *)zFormat)[1] - 0x30))" ( (binary_expression "'\0' < (char)(((byte *)zFormat)[1] - 0x30)" (char_literal "'\0'" ' escape_sequence ') < (cast_expression "(char)(((byte *)zFormat)[1] - 0x30)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(((byte *)zFormat)[1] - 0x30)" ( (binary_expression "((byte *)zFormat)[1] - 0x30" (subscript_expression "((byte *)zFormat)[1]" (parenthesized_expression "((byte *)zFormat)" ( (cast_expression "(byte *)zFormat" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) )) [ number_literal ]) - number_literal) )))) )) (compound_statement "{\n        return local_28;\n      }" { (return_statement "return local_28;" return identifier ;) })) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) }) (else_clause "else {\n      uVar5 = (uint)(byte)*zDate;\n      if ((""[uVar5] & 4) == 0) {\n        return local_28;\n      }\n      pbVar1 = (byte *)zDate + ((byte)*zFormat - 0x31 & 0xff) + 1;\n      iVar4 = 0;\n      while( true ) {\n        zDate = (char *)((byte *)zDate + 1);\n        iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;\n        if ((byte *)zDate == pbVar1) break;\n        uVar5 = (uint)(byte)*zDate;\n        if ((""[uVar5] & 4) == 0) {\n          return local_28;\n        }\n      }\n      if (iVar4 < (char)(((byte *)zFormat)[1] - 0x30)) {\n        return local_28;\n      }\n      if ((int)(uint)*(ushort *)(misuse_39145 + (char)((byte *)zFormat)[2] * 2 + 0x42) < iVar4) {\n        return local_28;\n      }\n    }" else (compound_statement "{\n      uVar5 = (uint)(byte)*zDate;\n      if ((""[uVar5] & 4) == 0) {\n        return local_28;\n      }\n      pbVar1 = (byte *)zDate + ((byte)*zFormat - 0x31 & 0xff) + 1;\n      iVar4 = 0;\n      while( true ) {\n        zDate = (char *)((byte *)zDate + 1);\n        iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;\n        if ((byte *)zDate == pbVar1) break;\n        uVar5 = (uint)(byte)*zDate;\n        if ((""[uVar5] & 4) == 0) {\n          return local_28;\n        }\n      }\n      if (iVar4 < (char)(((byte *)zFormat)[1] - 0x30)) {\n        return local_28;\n      }\n      if ((int)(uint)*(ushort *)(misuse_39145 + (char)((byte *)zFormat)[2] * 2 + 0x42) < iVar4) {\n        return local_28;\n      }\n    }" { (expression_statement "uVar5 = (uint)(byte)*zDate;" (assignment_expression "uVar5 = (uint)(byte)*zDate" identifier = (binary_expression "(uint)(byte)*zDate" (call_expression "(uint)(byte)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(byte)" ( identifier ))) * identifier)) ;) (if_statement "if ((""[uVar5] & 4) == 0) {\n        return local_28;\n      }" if (parenthesized_expression "((""[uVar5] & 4) == 0)" ( (binary_expression "(""[uVar5] & 4) == 0" (parenthesized_expression "(""[uVar5] & 4)" ( (binary_expression """[uVar5] & 4" (subscript_expression """[uVar5]" (string_literal """" " ") [ identifier ]) & number_literal) )) == number_literal) )) (compound_statement "{\n        return local_28;\n      }" { (return_statement "return local_28;" return identifier ;) })) (expression_statement "pbVar1 = (byte *)zDate + ((byte)*zFormat - 0x31 & 0xff) + 1;" (assignment_expression "pbVar1 = (byte *)zDate + ((byte)*zFormat - 0x31 & 0xff) + 1" identifier = (binary_expression "(byte *)zDate + ((byte)*zFormat - 0x31 & 0xff) + 1" (binary_expression "(byte *)zDate + ((byte)*zFormat - 0x31 & 0xff)" (cast_expression "(byte *)zDate" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) + (parenthesized_expression "((byte)*zFormat - 0x31 & 0xff)" ( (binary_expression "(byte)*zFormat - 0x31 & 0xff" (binary_expression "(byte)*zFormat - 0x31" (binary_expression "(byte)*zFormat" (parenthesized_expression "(byte)" ( identifier )) * identifier) - number_literal) & number_literal) ))) + number_literal)) ;) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (while_statement "while( true ) {\n        zDate = (char *)((byte *)zDate + 1);\n        iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;\n        if ((byte *)zDate == pbVar1) break;\n        uVar5 = (uint)(byte)*zDate;\n        if ((""[uVar5] & 4) == 0) {\n          return local_28;\n        }\n      }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n        zDate = (char *)((byte *)zDate + 1);\n        iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;\n        if ((byte *)zDate == pbVar1) break;\n        uVar5 = (uint)(byte)*zDate;\n        if ((""[uVar5] & 4) == 0) {\n          return local_28;\n        }\n      }" { (expression_statement "zDate = (char *)((byte *)zDate + 1);" (assignment_expression "zDate = (char *)((byte *)zDate + 1)" identifier = (cast_expression "(char *)((byte *)zDate + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((byte *)zDate + 1)" ( (binary_expression "(byte *)zDate + 1" (cast_expression "(byte *)zDate" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) + number_literal) )))) ;) (expression_statement "iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;" (assignment_expression "iVar4 = (char)uVar5 + -0x30 + iVar4 * 10" identifier = (binary_expression "(char)uVar5 + -0x30 + iVar4 * 10" (binary_expression "(char)uVar5 + -0x30" (cast_expression "(char)uVar5" ( (type_descriptor "char" primitive_type) ) identifier) + number_literal) + (binary_expression "iVar4 * 10" identifier * number_literal))) ;) (if_statement "if ((byte *)zDate == pbVar1) break;" if (parenthesized_expression "((byte *)zDate == pbVar1)" ( (binary_expression "(byte *)zDate == pbVar1" (cast_expression "(byte *)zDate" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) == identifier) )) (break_statement "break;" break ;)) (expression_statement "uVar5 = (uint)(byte)*zDate;" (assignment_expression "uVar5 = (uint)(byte)*zDate" identifier = (binary_expression "(uint)(byte)*zDate" (call_expression "(uint)(byte)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(byte)" ( identifier ))) * identifier)) ;) (if_statement "if ((""[uVar5] & 4) == 0) {\n          return local_28;\n        }" if (parenthesized_expression "((""[uVar5] & 4) == 0)" ( (binary_expression "(""[uVar5] & 4) == 0" (parenthesized_expression "(""[uVar5] & 4)" ( (binary_expression """[uVar5] & 4" (subscript_expression """[uVar5]" (string_literal """" " ") [ identifier ]) & number_literal) )) == number_literal) )) (compound_statement "{\n          return local_28;\n        }" { (return_statement "return local_28;" return identifier ;) })) })) (if_statement "if (iVar4 < (char)(((byte *)zFormat)[1] - 0x30)) {\n        return local_28;\n      }" if (parenthesized_expression "(iVar4 < (char)(((byte *)zFormat)[1] - 0x30))" ( (binary_expression "iVar4 < (char)(((byte *)zFormat)[1] - 0x30)" identifier < (cast_expression "(char)(((byte *)zFormat)[1] - 0x30)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(((byte *)zFormat)[1] - 0x30)" ( (binary_expression "((byte *)zFormat)[1] - 0x30" (subscript_expression "((byte *)zFormat)[1]" (parenthesized_expression "((byte *)zFormat)" ( (cast_expression "(byte *)zFormat" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) )) [ number_literal ]) - number_literal) )))) )) (compound_statement "{\n        return local_28;\n      }" { (return_statement "return local_28;" return identifier ;) })) (if_statement "if ((int)(uint)*(ushort *)(misuse_39145 + (char)((byte *)zFormat)[2] * 2 + 0x42) < iVar4) {\n        return local_28;\n      }" if (parenthesized_expression "((int)(uint)*(ushort *)(misuse_39145 + (char)((byte *)zFormat)[2] * 2 + 0x42) < iVar4)" ( (binary_expression "(int)(uint)*(ushort *)(misuse_39145 + (char)((byte *)zFormat)[2] * 2 + 0x42) < iVar4" (binary_expression "(int)(uint)*(ushort *)(misuse_39145 + (char)((byte *)zFormat)[2] * 2 + 0x42)" (cast_expression "(int)(uint)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(uint)" ( identifier ))) * (cast_expression "(ushort *)(misuse_39145 + (char)((byte *)zFormat)[2] * 2 + 0x42)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(misuse_39145 + (char)((byte *)zFormat)[2] * 2 + 0x42)" ( (binary_expression "misuse_39145 + (char)((byte *)zFormat)[2] * 2 + 0x42" (binary_expression "misuse_39145 + (char)((byte *)zFormat)[2] * 2" identifier + (binary_expression "(char)((byte *)zFormat)[2] * 2" (cast_expression "(char)((byte *)zFormat)[2]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "((byte *)zFormat)[2]" (parenthesized_expression "((byte *)zFormat)" ( (cast_expression "(byte *)zFormat" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) )) [ number_literal ])) * number_literal)) + number_literal) )))) < identifier) )) (compound_statement "{\n        return local_28;\n      }" { (return_statement "return local_28;" return identifier ;) })) }))) (if_statement "if (((byte *)zFormat)[3] == 0) {\n      if (!bVar3) {\n        local_20 = (undefined4 *)&stack0x0000000c;\n      }\n      *(int *)*local_20 = iVar4;\n      return local_28 + 1;\n    }" if (parenthesized_expression "(((byte *)zFormat)[3] == 0)" ( (binary_expression "((byte *)zFormat)[3] == 0" (subscript_expression "((byte *)zFormat)[3]" (parenthesized_expression "((byte *)zFormat)" ( (cast_expression "(byte *)zFormat" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) )) [ number_literal ]) == number_literal) )) (compound_statement "{\n      if (!bVar3) {\n        local_20 = (undefined4 *)&stack0x0000000c;\n      }\n      *(int *)*local_20 = iVar4;\n      return local_28 + 1;\n    }" { (if_statement "if (!bVar3) {\n        local_20 = (undefined4 *)&stack0x0000000c;\n      }" if (parenthesized_expression "(!bVar3)" ( (unary_expression "!bVar3" ! identifier) )) (compound_statement "{\n        local_20 = (undefined4 *)&stack0x0000000c;\n      }" { (expression_statement "local_20 = (undefined4 *)&stack0x0000000c;" (assignment_expression "local_20 = (undefined4 *)&stack0x0000000c" identifier = (cast_expression "(undefined4 *)&stack0x0000000c" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&stack0x0000000c" & identifier))) ;) })) (expression_statement "*(int *)*local_20 = iVar4;" (assignment_expression "*(int *)*local_20 = iVar4" (pointer_expression "*(int *)*local_20" * (cast_expression "(int *)*local_20" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*local_20" * identifier))) = identifier) ;) (return_statement "return local_28 + 1;" return (binary_expression "local_28 + 1" identifier + number_literal) ;) })) (if_statement "if (*zDate != ((byte *)zFormat)[3]) {\n      return local_28;\n    }" if (parenthesized_expression "(*zDate != ((byte *)zFormat)[3])" ( (binary_expression "*zDate != ((byte *)zFormat)[3]" (pointer_expression "*zDate" * identifier) != (subscript_expression "((byte *)zFormat)[3]" (parenthesized_expression "((byte *)zFormat)" ( (cast_expression "(byte *)zFormat" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) )) [ number_literal ])) )) (compound_statement "{\n      return local_28;\n    }" { (return_statement "return local_28;" return identifier ;) })) (expression_statement "zDate = (char *)((byte *)zDate + 1);" (assignment_expression "zDate = (char *)((byte *)zDate + 1)" identifier = (cast_expression "(char *)((byte *)zDate + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((byte *)zDate + 1)" ( (binary_expression "(byte *)zDate + 1" (cast_expression "(byte *)zDate" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) + number_literal) )))) ;) (expression_statement "local_28 = local_28 + 1;" (assignment_expression "local_28 = local_28 + 1" identifier = (binary_expression "local_28 + 1" identifier + number_literal)) ;) (expression_statement "zFormat = (char *)((byte *)zFormat + 4);" (assignment_expression "zFormat = (char *)((byte *)zFormat + 4)" identifier = (cast_expression "(char *)((byte *)zFormat + 4)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((byte *)zFormat + 4)" ( (binary_expression "(byte *)zFormat + 4" (cast_expression "(byte *)zFormat" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) + number_literal) )))) ;) (expression_statement "bVar3 = true;" (assignment_expression "bVar3 = true" identifier = true) ;) (expression_statement "piVar2 = (int *)*local_20;" (assignment_expression "piVar2 = (int *)*local_20" identifier = (cast_expression "(int *)*local_20" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*local_20" * identifier))) ;) (expression_statement "local_20 = local_20 + 1;" (assignment_expression "local_20 = local_20 + 1" identifier = (binary_expression "local_20 + 1" identifier + number_literal)) ;) (expression_statement "*piVar2 = iVar4;" (assignment_expression "*piVar2 = iVar4" (pointer_expression "*piVar2" * identifier) = identifier) ;) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit "int FUN_00022a50(byte *param_1,byte *param_2)\n\n{\n  byte *pbVar1;\n  int *piVar2;\n  bool bVar3;\n  int iVar4;\n  uint uVar5;\n  int local_28;\n  undefined4 *local_20;\n  \n  bVar3 = false;\n  local_28 = 0;\n  local_20 = (undefined4 *)&stack0x0000000c;\n  do {\n    if (*param_2 == 0x30) {\n      if ('\0' < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }\n      iVar4 = 0;\n    }\n    else {\n      uVar5 = (uint)*param_1;\n      if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n        return local_28;\n      }\n      pbVar1 = param_1 + (*param_2 - 0x31 & 0xff) + 1;\n      iVar4 = 0;\n      while( true ) {\n        param_1 = param_1 + 1;\n        iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;\n        if (param_1 == pbVar1) break;\n        uVar5 = (uint)*param_1;\n        if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n          return local_28;\n        }\n      }\n      if (iVar4 < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }\n      if ((int)(uint)(ushort)L"bad parameter or other API misuse"[(char)param_2[2] + 0x21] < iVar4)\n      {\n        return local_28;\n      }\n    }\n    if (param_2[3] == 0) {\n      if (!bVar3) {\n        local_20 = (undefined4 *)&stack0x0000000c;\n      }\n      *(int *)*local_20 = iVar4;\n      return local_28 + 1;\n    }\n    if (*param_1 != param_2[3]) {\n      return local_28;\n    }\n    param_1 = param_1 + 1;\n    local_28 = local_28 + 1;\n    param_2 = param_2 + 4;\n    bVar3 = true;\n    piVar2 = (int *)*local_20;\n    local_20 = local_20 + 1;\n    *piVar2 = iVar4;\n  } while( true );\n}\n\n" (function_definition "int FUN_00022a50(byte *param_1,byte *param_2)\n\n{\n  byte *pbVar1;\n  int *piVar2;\n  bool bVar3;\n  int iVar4;\n  uint uVar5;\n  int local_28;\n  undefined4 *local_20;\n  \n  bVar3 = false;\n  local_28 = 0;\n  local_20 = (undefined4 *)&stack0x0000000c;\n  do {\n    if (*param_2 == 0x30) {\n      if ('\0' < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }\n      iVar4 = 0;\n    }\n    else {\n      uVar5 = (uint)*param_1;\n      if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n        return local_28;\n      }\n      pbVar1 = param_1 + (*param_2 - 0x31 & 0xff) + 1;\n      iVar4 = 0;\n      while( true ) {\n        param_1 = param_1 + 1;\n        iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;\n        if (param_1 == pbVar1) break;\n        uVar5 = (uint)*param_1;\n        if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n          return local_28;\n        }\n      }\n      if (iVar4 < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }\n      if ((int)(uint)(ushort)L"bad parameter or other API misuse"[(char)param_2[2] + 0x21] < iVar4)\n      {\n        return local_28;\n      }\n    }\n    if (param_2[3] == 0) {\n      if (!bVar3) {\n        local_20 = (undefined4 *)&stack0x0000000c;\n      }\n      *(int *)*local_20 = iVar4;\n      return local_28 + 1;\n    }\n    if (*param_1 != param_2[3]) {\n      return local_28;\n    }\n    param_1 = param_1 + 1;\n    local_28 = local_28 + 1;\n    param_2 = param_2 + 4;\n    bVar3 = true;\n    piVar2 = (int *)*local_20;\n    local_20 = local_20 + 1;\n    *piVar2 = iVar4;\n  } while( true );\n}" primitive_type (function_declarator "FUN_00022a50(byte *param_1,byte *param_2)" identifier (parameter_list "(byte *param_1,byte *param_2)" ( (parameter_declaration "byte *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "byte *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  byte *pbVar1;\n  int *piVar2;\n  bool bVar3;\n  int iVar4;\n  uint uVar5;\n  int local_28;\n  undefined4 *local_20;\n  \n  bVar3 = false;\n  local_28 = 0;\n  local_20 = (undefined4 *)&stack0x0000000c;\n  do {\n    if (*param_2 == 0x30) {\n      if ('\0' < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }\n      iVar4 = 0;\n    }\n    else {\n      uVar5 = (uint)*param_1;\n      if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n        return local_28;\n      }\n      pbVar1 = param_1 + (*param_2 - 0x31 & 0xff) + 1;\n      iVar4 = 0;\n      while( true ) {\n        param_1 = param_1 + 1;\n        iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;\n        if (param_1 == pbVar1) break;\n        uVar5 = (uint)*param_1;\n        if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n          return local_28;\n        }\n      }\n      if (iVar4 < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }\n      if ((int)(uint)(ushort)L"bad parameter or other API misuse"[(char)param_2[2] + 0x21] < iVar4)\n      {\n        return local_28;\n      }\n    }\n    if (param_2[3] == 0) {\n      if (!bVar3) {\n        local_20 = (undefined4 *)&stack0x0000000c;\n      }\n      *(int *)*local_20 = iVar4;\n      return local_28 + 1;\n    }\n    if (*param_1 != param_2[3]) {\n      return local_28;\n    }\n    param_1 = param_1 + 1;\n    local_28 = local_28 + 1;\n    param_2 = param_2 + 4;\n    bVar3 = true;\n    piVar2 = (int *)*local_20;\n    local_20 = local_20 + 1;\n    *piVar2 = iVar4;\n  } while( true );\n}" { (declaration "byte *pbVar1;" type_identifier (pointer_declarator "*pbVar1" * identifier) ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "bool bVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "int local_28;" primitive_type identifier ;) (declaration "undefined4 *local_20;" type_identifier (pointer_declarator "*local_20" * identifier) ;) (expression_statement "bVar3 = false;" (assignment_expression "bVar3 = false" identifier = false) ;) (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" identifier = number_literal) ;) (expression_statement "local_20 = (undefined4 *)&stack0x0000000c;" (assignment_expression "local_20 = (undefined4 *)&stack0x0000000c" identifier = (cast_expression "(undefined4 *)&stack0x0000000c" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&stack0x0000000c" & identifier))) ;) (do_statement "do {\n    if (*param_2 == 0x30) {\n      if ('\0' < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }\n      iVar4 = 0;\n    }\n    else {\n      uVar5 = (uint)*param_1;\n      if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n        return local_28;\n      }\n      pbVar1 = param_1 + (*param_2 - 0x31 & 0xff) + 1;\n      iVar4 = 0;\n      while( true ) {\n        param_1 = param_1 + 1;\n        iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;\n        if (param_1 == pbVar1) break;\n        uVar5 = (uint)*param_1;\n        if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n          return local_28;\n        }\n      }\n      if (iVar4 < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }\n      if ((int)(uint)(ushort)L"bad parameter or other API misuse"[(char)param_2[2] + 0x21] < iVar4)\n      {\n        return local_28;\n      }\n    }\n    if (param_2[3] == 0) {\n      if (!bVar3) {\n        local_20 = (undefined4 *)&stack0x0000000c;\n      }\n      *(int *)*local_20 = iVar4;\n      return local_28 + 1;\n    }\n    if (*param_1 != param_2[3]) {\n      return local_28;\n    }\n    param_1 = param_1 + 1;\n    local_28 = local_28 + 1;\n    param_2 = param_2 + 4;\n    bVar3 = true;\n    piVar2 = (int *)*local_20;\n    local_20 = local_20 + 1;\n    *piVar2 = iVar4;\n  } while( true );" do (compound_statement "{\n    if (*param_2 == 0x30) {\n      if ('\0' < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }\n      iVar4 = 0;\n    }\n    else {\n      uVar5 = (uint)*param_1;\n      if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n        return local_28;\n      }\n      pbVar1 = param_1 + (*param_2 - 0x31 & 0xff) + 1;\n      iVar4 = 0;\n      while( true ) {\n        param_1 = param_1 + 1;\n        iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;\n        if (param_1 == pbVar1) break;\n        uVar5 = (uint)*param_1;\n        if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n          return local_28;\n        }\n      }\n      if (iVar4 < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }\n      if ((int)(uint)(ushort)L"bad parameter or other API misuse"[(char)param_2[2] + 0x21] < iVar4)\n      {\n        return local_28;\n      }\n    }\n    if (param_2[3] == 0) {\n      if (!bVar3) {\n        local_20 = (undefined4 *)&stack0x0000000c;\n      }\n      *(int *)*local_20 = iVar4;\n      return local_28 + 1;\n    }\n    if (*param_1 != param_2[3]) {\n      return local_28;\n    }\n    param_1 = param_1 + 1;\n    local_28 = local_28 + 1;\n    param_2 = param_2 + 4;\n    bVar3 = true;\n    piVar2 = (int *)*local_20;\n    local_20 = local_20 + 1;\n    *piVar2 = iVar4;\n  }" { (if_statement "if (*param_2 == 0x30) {\n      if ('\0' < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }\n      iVar4 = 0;\n    }\n    else {\n      uVar5 = (uint)*param_1;\n      if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n        return local_28;\n      }\n      pbVar1 = param_1 + (*param_2 - 0x31 & 0xff) + 1;\n      iVar4 = 0;\n      while( true ) {\n        param_1 = param_1 + 1;\n        iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;\n        if (param_1 == pbVar1) break;\n        uVar5 = (uint)*param_1;\n        if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n          return local_28;\n        }\n      }\n      if (iVar4 < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }\n      if ((int)(uint)(ushort)L"bad parameter or other API misuse"[(char)param_2[2] + 0x21] < iVar4)\n      {\n        return local_28;\n      }\n    }" if (parenthesized_expression "(*param_2 == 0x30)" ( (binary_expression "*param_2 == 0x30" (pointer_expression "*param_2" * identifier) == number_literal) )) (compound_statement "{\n      if ('\0' < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }\n      iVar4 = 0;\n    }" { (if_statement "if ('\0' < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }" if (parenthesized_expression "('\0' < (char)(param_2[1] - 0x30))" ( (binary_expression "'\0' < (char)(param_2[1] - 0x30)" (char_literal "'\0'" ' escape_sequence ') < (cast_expression "(char)(param_2[1] - 0x30)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(param_2[1] - 0x30)" ( (binary_expression "param_2[1] - 0x30" (subscript_expression "param_2[1]" identifier [ number_literal ]) - number_literal) )))) )) (compound_statement "{\n        return local_28;\n      }" { (return_statement "return local_28;" return identifier ;) })) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) }) (else_clause "else {\n      uVar5 = (uint)*param_1;\n      if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n        return local_28;\n      }\n      pbVar1 = param_1 + (*param_2 - 0x31 & 0xff) + 1;\n      iVar4 = 0;\n      while( true ) {\n        param_1 = param_1 + 1;\n        iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;\n        if (param_1 == pbVar1) break;\n        uVar5 = (uint)*param_1;\n        if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n          return local_28;\n        }\n      }\n      if (iVar4 < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }\n      if ((int)(uint)(ushort)L"bad parameter or other API misuse"[(char)param_2[2] + 0x21] < iVar4)\n      {\n        return local_28;\n      }\n    }" else (compound_statement "{\n      uVar5 = (uint)*param_1;\n      if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n        return local_28;\n      }\n      pbVar1 = param_1 + (*param_2 - 0x31 & 0xff) + 1;\n      iVar4 = 0;\n      while( true ) {\n        param_1 = param_1 + 1;\n        iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;\n        if (param_1 == pbVar1) break;\n        uVar5 = (uint)*param_1;\n        if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n          return local_28;\n        }\n      }\n      if (iVar4 < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }\n      if ((int)(uint)(ushort)L"bad parameter or other API misuse"[(char)param_2[2] + 0x21] < iVar4)\n      {\n        return local_28;\n      }\n    }" { (expression_statement "uVar5 = (uint)*param_1;" (assignment_expression "uVar5 = (uint)*param_1" identifier = (binary_expression "(uint)*param_1" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (if_statement "if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n        return local_28;\n      }" if (parenthesized_expression "(((&DAT_000b4f80)[uVar5] & 4) == 0)" ( (binary_expression "((&DAT_000b4f80)[uVar5] & 4) == 0" (parenthesized_expression "((&DAT_000b4f80)[uVar5] & 4)" ( (binary_expression "(&DAT_000b4f80)[uVar5] & 4" (subscript_expression "(&DAT_000b4f80)[uVar5]" (parenthesized_expression "(&DAT_000b4f80)" ( (pointer_expression "&DAT_000b4f80" & identifier) )) [ identifier ]) & number_literal) )) == number_literal) )) (compound_statement "{\n        return local_28;\n      }" { (return_statement "return local_28;" return identifier ;) })) (expression_statement "pbVar1 = param_1 + (*param_2 - 0x31 & 0xff) + 1;" (assignment_expression "pbVar1 = param_1 + (*param_2 - 0x31 & 0xff) + 1" identifier = (binary_expression "param_1 + (*param_2 - 0x31 & 0xff) + 1" (binary_expression "param_1 + (*param_2 - 0x31 & 0xff)" identifier + (parenthesized_expression "(*param_2 - 0x31 & 0xff)" ( (binary_expression "*param_2 - 0x31 & 0xff" (binary_expression "*param_2 - 0x31" (pointer_expression "*param_2" * identifier) - number_literal) & number_literal) ))) + number_literal)) ;) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" identifier = number_literal) ;) (while_statement "while( true ) {\n        param_1 = param_1 + 1;\n        iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;\n        if (param_1 == pbVar1) break;\n        uVar5 = (uint)*param_1;\n        if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n          return local_28;\n        }\n      }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n        param_1 = param_1 + 1;\n        iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;\n        if (param_1 == pbVar1) break;\n        uVar5 = (uint)*param_1;\n        if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n          return local_28;\n        }\n      }" { (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) (expression_statement "iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;" (assignment_expression "iVar4 = (char)uVar5 + -0x30 + iVar4 * 10" identifier = (binary_expression "(char)uVar5 + -0x30 + iVar4 * 10" (binary_expression "(char)uVar5 + -0x30" (cast_expression "(char)uVar5" ( (type_descriptor "char" primitive_type) ) identifier) + number_literal) + (binary_expression "iVar4 * 10" identifier * number_literal))) ;) (if_statement "if (param_1 == pbVar1) break;" if (parenthesized_expression "(param_1 == pbVar1)" ( (binary_expression "param_1 == pbVar1" identifier == identifier) )) (break_statement "break;" break ;)) (expression_statement "uVar5 = (uint)*param_1;" (assignment_expression "uVar5 = (uint)*param_1" identifier = (binary_expression "(uint)*param_1" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (if_statement "if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n          return local_28;\n        }" if (parenthesized_expression "(((&DAT_000b4f80)[uVar5] & 4) == 0)" ( (binary_expression "((&DAT_000b4f80)[uVar5] & 4) == 0" (parenthesized_expression "((&DAT_000b4f80)[uVar5] & 4)" ( (binary_expression "(&DAT_000b4f80)[uVar5] & 4" (subscript_expression "(&DAT_000b4f80)[uVar5]" (parenthesized_expression "(&DAT_000b4f80)" ( (pointer_expression "&DAT_000b4f80" & identifier) )) [ identifier ]) & number_literal) )) == number_literal) )) (compound_statement "{\n          return local_28;\n        }" { (return_statement "return local_28;" return identifier ;) })) })) (if_statement "if (iVar4 < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }" if (parenthesized_expression "(iVar4 < (char)(param_2[1] - 0x30))" ( (binary_expression "iVar4 < (char)(param_2[1] - 0x30)" identifier < (cast_expression "(char)(param_2[1] - 0x30)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(param_2[1] - 0x30)" ( (binary_expression "param_2[1] - 0x30" (subscript_expression "param_2[1]" identifier [ number_literal ]) - number_literal) )))) )) (compound_statement "{\n        return local_28;\n      }" { (return_statement "return local_28;" return identifier ;) })) (if_statement "if ((int)(uint)(ushort)L"bad parameter or other API misuse"[(char)param_2[2] + 0x21] < iVar4)\n      {\n        return local_28;\n      }" if (parenthesized_expression "((int)(uint)(ushort)L"bad parameter or other API misuse"[(char)param_2[2] + 0x21] < iVar4)" ( (binary_expression "(int)(uint)(ushort)L"bad parameter or other API misuse"[(char)param_2[2] + 0x21] < iVar4" (cast_expression "(int)(uint)(ushort)L"bad parameter or other API misuse"[(char)param_2[2] + 0x21]" ( (type_descriptor "int" primitive_type) ) (cast_expression "(uint)(ushort)L"bad parameter or other API misuse"[(char)param_2[2] + 0x21]" ( (type_descriptor "uint" type_identifier) ) (cast_expression "(ushort)L"bad parameter or other API misuse"[(char)param_2[2] + 0x21]" ( (type_descriptor "ushort" type_identifier) ) (subscript_expression "L"bad parameter or other API misuse"[(char)param_2[2] + 0x21]" (string_literal "L"bad parameter or other API misuse"" L" string_content ") [ (binary_expression "(char)param_2[2] + 0x21" (cast_expression "(char)param_2[2]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "param_2[2]" identifier [ number_literal ])) + number_literal) ])))) < identifier) )) (compound_statement "{\n        return local_28;\n      }" { (return_statement "return local_28;" return identifier ;) })) }))) (if_statement "if (param_2[3] == 0) {\n      if (!bVar3) {\n        local_20 = (undefined4 *)&stack0x0000000c;\n      }\n      *(int *)*local_20 = iVar4;\n      return local_28 + 1;\n    }" if (parenthesized_expression "(param_2[3] == 0)" ( (binary_expression "param_2[3] == 0" (subscript_expression "param_2[3]" identifier [ number_literal ]) == number_literal) )) (compound_statement "{\n      if (!bVar3) {\n        local_20 = (undefined4 *)&stack0x0000000c;\n      }\n      *(int *)*local_20 = iVar4;\n      return local_28 + 1;\n    }" { (if_statement "if (!bVar3) {\n        local_20 = (undefined4 *)&stack0x0000000c;\n      }" if (parenthesized_expression "(!bVar3)" ( (unary_expression "!bVar3" ! identifier) )) (compound_statement "{\n        local_20 = (undefined4 *)&stack0x0000000c;\n      }" { (expression_statement "local_20 = (undefined4 *)&stack0x0000000c;" (assignment_expression "local_20 = (undefined4 *)&stack0x0000000c" identifier = (cast_expression "(undefined4 *)&stack0x0000000c" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&stack0x0000000c" & identifier))) ;) })) (expression_statement "*(int *)*local_20 = iVar4;" (assignment_expression "*(int *)*local_20 = iVar4" (pointer_expression "*(int *)*local_20" * (cast_expression "(int *)*local_20" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*local_20" * identifier))) = identifier) ;) (return_statement "return local_28 + 1;" return (binary_expression "local_28 + 1" identifier + number_literal) ;) })) (if_statement "if (*param_1 != param_2[3]) {\n      return local_28;\n    }" if (parenthesized_expression "(*param_1 != param_2[3])" ( (binary_expression "*param_1 != param_2[3]" (pointer_expression "*param_1" * identifier) != (subscript_expression "param_2[3]" identifier [ number_literal ])) )) (compound_statement "{\n      return local_28;\n    }" { (return_statement "return local_28;" return identifier ;) })) (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) (expression_statement "local_28 = local_28 + 1;" (assignment_expression "local_28 = local_28 + 1" identifier = (binary_expression "local_28 + 1" identifier + number_literal)) ;) (expression_statement "param_2 = param_2 + 4;" (assignment_expression "param_2 = param_2 + 4" identifier = (binary_expression "param_2 + 4" identifier + number_literal)) ;) (expression_statement "bVar3 = true;" (assignment_expression "bVar3 = true" identifier = true) ;) (expression_statement "piVar2 = (int *)*local_20;" (assignment_expression "piVar2 = (int *)*local_20" identifier = (cast_expression "(int *)*local_20" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*local_20" * identifier))) ;) (expression_statement "local_20 = local_20 + 1;" (assignment_expression "local_20 = local_20 + 1" identifier = (binary_expression "local_20 + 1" identifier + number_literal)) ;) (expression_statement "*piVar2 = iVar4;" (assignment_expression "*piVar2 = iVar4" (pointer_expression "*piVar2" * identifier) = identifier) ;) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = BOOL) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression & IDENT))) ;) (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (char_literal ' escape_sequence ') < (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) - LIT) )))) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( IDENT )) * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression (parenthesized_expression ( (pointer_expression & IDENT) )) [ IDENT ]) & LIT) )) == LIT) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + (parenthesized_expression ( (binary_expression (binary_expression (pointer_expression * IDENT) - LIT) & LIT) ))) + LIT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) + (binary_expression IDENT * LIT))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( IDENT )) * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression (parenthesized_expression ( (pointer_expression & IDENT) )) [ IDENT ]) & LIT) )) == LIT) )) (compound_statement { (return_statement return IDENT ;) })) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT < (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) - LIT) )))) )) (compound_statement { (return_statement return IDENT ;) })) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor TYPE) ) (subscript_expression (string_literal L" string_content ") [ (binary_expression (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])) + LIT) ])))) < IDENT) )) (compound_statement { (return_statement return IDENT ;) })) }))) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (unary_expression ! IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression & IDENT))) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) = IDENT) ;) (return_statement return (binary_expression IDENT + LIT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != (subscript_expression IDENT [ LIT ])) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = BOOL) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) }) while (parenthesized_expression ( BOOL )) ;) })))
(function_definition "int FUN_00022a50(byte *param_1,byte *param_2)\n\n{\n  byte *pbVar1;\n  int *piVar2;\n  bool bVar3;\n  int iVar4;\n  uint uVar5;\n  int local_28;\n  undefined4 *local_20;\n  \n  bVar3 = false;\n  local_28 = 0;\n  local_20 = (undefined4 *)&stack0x0000000c;\n  do {\n    if (*param_2 == 0x30) {\n      if ('\0' < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }\n      iVar4 = 0;\n    }\n    else {\n      uVar5 = (uint)*param_1;\n      if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n        return local_28;\n      }\n      pbVar1 = param_1 + (*param_2 - 0x31 & 0xff) + 1;\n      iVar4 = 0;\n      while( true ) {\n        param_1 = param_1 + 1;\n        iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;\n        if (param_1 == pbVar1) break;\n        uVar5 = (uint)*param_1;\n        if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n          return local_28;\n        }\n      }\n      if (iVar4 < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }\n      if ((int)(uint)(ushort)L"bad parameter or other API misuse"[(char)param_2[2] + 0x21] < iVar4)\n      {\n        return local_28;\n      }\n    }\n    if (param_2[3] == 0) {\n      if (!bVar3) {\n        local_20 = (undefined4 *)&stack0x0000000c;\n      }\n      *(int *)*local_20 = iVar4;\n      return local_28 + 1;\n    }\n    if (*param_1 != param_2[3]) {\n      return local_28;\n    }\n    param_1 = param_1 + 1;\n    local_28 = local_28 + 1;\n    param_2 = param_2 + 4;\n    bVar3 = true;\n    piVar2 = (int *)*local_20;\n    local_20 = local_20 + 1;\n    *piVar2 = iVar4;\n  } while( true );\n}" (primitive_type "int") (function_declarator "FUN_00022a50(byte *param_1,byte *param_2)" (identifier "FUN_00022a50") (parameter_list "(byte *param_1,byte *param_2)" (( "(") (parameter_declaration "byte *param_1" (type_identifier "byte") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "byte *param_2" (type_identifier "byte") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  byte *pbVar1;\n  int *piVar2;\n  bool bVar3;\n  int iVar4;\n  uint uVar5;\n  int local_28;\n  undefined4 *local_20;\n  \n  bVar3 = false;\n  local_28 = 0;\n  local_20 = (undefined4 *)&stack0x0000000c;\n  do {\n    if (*param_2 == 0x30) {\n      if ('\0' < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }\n      iVar4 = 0;\n    }\n    else {\n      uVar5 = (uint)*param_1;\n      if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n        return local_28;\n      }\n      pbVar1 = param_1 + (*param_2 - 0x31 & 0xff) + 1;\n      iVar4 = 0;\n      while( true ) {\n        param_1 = param_1 + 1;\n        iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;\n        if (param_1 == pbVar1) break;\n        uVar5 = (uint)*param_1;\n        if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n          return local_28;\n        }\n      }\n      if (iVar4 < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }\n      if ((int)(uint)(ushort)L"bad parameter or other API misuse"[(char)param_2[2] + 0x21] < iVar4)\n      {\n        return local_28;\n      }\n    }\n    if (param_2[3] == 0) {\n      if (!bVar3) {\n        local_20 = (undefined4 *)&stack0x0000000c;\n      }\n      *(int *)*local_20 = iVar4;\n      return local_28 + 1;\n    }\n    if (*param_1 != param_2[3]) {\n      return local_28;\n    }\n    param_1 = param_1 + 1;\n    local_28 = local_28 + 1;\n    param_2 = param_2 + 4;\n    bVar3 = true;\n    piVar2 = (int *)*local_20;\n    local_20 = local_20 + 1;\n    *piVar2 = iVar4;\n  } while( true );\n}" ({ "{") (declaration "byte *pbVar1;" (type_identifier "byte") (pointer_declarator "*pbVar1" (* "*") (identifier "pbVar1")) (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (declaration "bool bVar3;" (primitive_type "bool") (identifier "bVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "uint uVar5;" (type_identifier "uint") (identifier "uVar5") (; ";")) (declaration "int local_28;" (primitive_type "int") (identifier "local_28") (; ";")) (declaration "undefined4 *local_20;" (type_identifier "undefined4") (pointer_declarator "*local_20" (* "*") (identifier "local_20")) (; ";")) (expression_statement "bVar3 = false;" (assignment_expression "bVar3 = false" (identifier "bVar3") (= "=") (false "false")) (; ";")) (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" (identifier "local_28") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_20 = (undefined4 *)&stack0x0000000c;" (assignment_expression "local_20 = (undefined4 *)&stack0x0000000c" (identifier "local_20") (= "=") (cast_expression "(undefined4 *)&stack0x0000000c" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "&stack0x0000000c" (& "&") (identifier "stack0x0000000c")))) (; ";")) (do_statement "do {\n    if (*param_2 == 0x30) {\n      if ('\0' < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }\n      iVar4 = 0;\n    }\n    else {\n      uVar5 = (uint)*param_1;\n      if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n        return local_28;\n      }\n      pbVar1 = param_1 + (*param_2 - 0x31 & 0xff) + 1;\n      iVar4 = 0;\n      while( true ) {\n        param_1 = param_1 + 1;\n        iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;\n        if (param_1 == pbVar1) break;\n        uVar5 = (uint)*param_1;\n        if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n          return local_28;\n        }\n      }\n      if (iVar4 < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }\n      if ((int)(uint)(ushort)L"bad parameter or other API misuse"[(char)param_2[2] + 0x21] < iVar4)\n      {\n        return local_28;\n      }\n    }\n    if (param_2[3] == 0) {\n      if (!bVar3) {\n        local_20 = (undefined4 *)&stack0x0000000c;\n      }\n      *(int *)*local_20 = iVar4;\n      return local_28 + 1;\n    }\n    if (*param_1 != param_2[3]) {\n      return local_28;\n    }\n    param_1 = param_1 + 1;\n    local_28 = local_28 + 1;\n    param_2 = param_2 + 4;\n    bVar3 = true;\n    piVar2 = (int *)*local_20;\n    local_20 = local_20 + 1;\n    *piVar2 = iVar4;\n  } while( true );" (do "do") (compound_statement "{\n    if (*param_2 == 0x30) {\n      if ('\0' < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }\n      iVar4 = 0;\n    }\n    else {\n      uVar5 = (uint)*param_1;\n      if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n        return local_28;\n      }\n      pbVar1 = param_1 + (*param_2 - 0x31 & 0xff) + 1;\n      iVar4 = 0;\n      while( true ) {\n        param_1 = param_1 + 1;\n        iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;\n        if (param_1 == pbVar1) break;\n        uVar5 = (uint)*param_1;\n        if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n          return local_28;\n        }\n      }\n      if (iVar4 < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }\n      if ((int)(uint)(ushort)L"bad parameter or other API misuse"[(char)param_2[2] + 0x21] < iVar4)\n      {\n        return local_28;\n      }\n    }\n    if (param_2[3] == 0) {\n      if (!bVar3) {\n        local_20 = (undefined4 *)&stack0x0000000c;\n      }\n      *(int *)*local_20 = iVar4;\n      return local_28 + 1;\n    }\n    if (*param_1 != param_2[3]) {\n      return local_28;\n    }\n    param_1 = param_1 + 1;\n    local_28 = local_28 + 1;\n    param_2 = param_2 + 4;\n    bVar3 = true;\n    piVar2 = (int *)*local_20;\n    local_20 = local_20 + 1;\n    *piVar2 = iVar4;\n  }" ({ "{") (if_statement "if (*param_2 == 0x30) {\n      if ('\0' < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }\n      iVar4 = 0;\n    }\n    else {\n      uVar5 = (uint)*param_1;\n      if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n        return local_28;\n      }\n      pbVar1 = param_1 + (*param_2 - 0x31 & 0xff) + 1;\n      iVar4 = 0;\n      while( true ) {\n        param_1 = param_1 + 1;\n        iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;\n        if (param_1 == pbVar1) break;\n        uVar5 = (uint)*param_1;\n        if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n          return local_28;\n        }\n      }\n      if (iVar4 < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }\n      if ((int)(uint)(ushort)L"bad parameter or other API misuse"[(char)param_2[2] + 0x21] < iVar4)\n      {\n        return local_28;\n      }\n    }" (if "if") (parenthesized_expression "(*param_2 == 0x30)" (( "(") (binary_expression "*param_2 == 0x30" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (== "==") (number_literal "0x30")) () ")")) (compound_statement "{\n      if ('\0' < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }\n      iVar4 = 0;\n    }" ({ "{") (if_statement "if ('\0' < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }" (if "if") (parenthesized_expression "('\0' < (char)(param_2[1] - 0x30))" (( "(") (binary_expression "'\0' < (char)(param_2[1] - 0x30)" (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'")) (< "<") (cast_expression "(char)(param_2[1] - 0x30)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (parenthesized_expression "(param_2[1] - 0x30)" (( "(") (binary_expression "param_2[1] - 0x30" (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]")) (- "-") (number_literal "0x30")) () ")")))) () ")")) (compound_statement "{\n        return local_28;\n      }" ({ "{") (return_statement "return local_28;" (return "return") (identifier "local_28") (; ";")) (} "}"))) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" (identifier "iVar4") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n      uVar5 = (uint)*param_1;\n      if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n        return local_28;\n      }\n      pbVar1 = param_1 + (*param_2 - 0x31 & 0xff) + 1;\n      iVar4 = 0;\n      while( true ) {\n        param_1 = param_1 + 1;\n        iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;\n        if (param_1 == pbVar1) break;\n        uVar5 = (uint)*param_1;\n        if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n          return local_28;\n        }\n      }\n      if (iVar4 < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }\n      if ((int)(uint)(ushort)L"bad parameter or other API misuse"[(char)param_2[2] + 0x21] < iVar4)\n      {\n        return local_28;\n      }\n    }" (else "else") (compound_statement "{\n      uVar5 = (uint)*param_1;\n      if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n        return local_28;\n      }\n      pbVar1 = param_1 + (*param_2 - 0x31 & 0xff) + 1;\n      iVar4 = 0;\n      while( true ) {\n        param_1 = param_1 + 1;\n        iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;\n        if (param_1 == pbVar1) break;\n        uVar5 = (uint)*param_1;\n        if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n          return local_28;\n        }\n      }\n      if (iVar4 < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }\n      if ((int)(uint)(ushort)L"bad parameter or other API misuse"[(char)param_2[2] + 0x21] < iVar4)\n      {\n        return local_28;\n      }\n    }" ({ "{") (expression_statement "uVar5 = (uint)*param_1;" (assignment_expression "uVar5 = (uint)*param_1" (identifier "uVar5") (= "=") (binary_expression "(uint)*param_1" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (identifier "param_1"))) (; ";")) (if_statement "if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n        return local_28;\n      }" (if "if") (parenthesized_expression "(((&DAT_000b4f80)[uVar5] & 4) == 0)" (( "(") (binary_expression "((&DAT_000b4f80)[uVar5] & 4) == 0" (parenthesized_expression "((&DAT_000b4f80)[uVar5] & 4)" (( "(") (binary_expression "(&DAT_000b4f80)[uVar5] & 4" (subscript_expression "(&DAT_000b4f80)[uVar5]" (parenthesized_expression "(&DAT_000b4f80)" (( "(") (pointer_expression "&DAT_000b4f80" (& "&") (identifier "DAT_000b4f80")) () ")")) ([ "[") (identifier "uVar5") (] "]")) (& "&") (number_literal "4")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        return local_28;\n      }" ({ "{") (return_statement "return local_28;" (return "return") (identifier "local_28") (; ";")) (} "}"))) (expression_statement "pbVar1 = param_1 + (*param_2 - 0x31 & 0xff) + 1;" (assignment_expression "pbVar1 = param_1 + (*param_2 - 0x31 & 0xff) + 1" (identifier "pbVar1") (= "=") (binary_expression "param_1 + (*param_2 - 0x31 & 0xff) + 1" (binary_expression "param_1 + (*param_2 - 0x31 & 0xff)" (identifier "param_1") (+ "+") (parenthesized_expression "(*param_2 - 0x31 & 0xff)" (( "(") (binary_expression "*param_2 - 0x31 & 0xff" (binary_expression "*param_2 - 0x31" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (- "-") (number_literal "0x31")) (& "&") (number_literal "0xff")) () ")"))) (+ "+") (number_literal "1"))) (; ";")) (expression_statement "iVar4 = 0;" (assignment_expression "iVar4 = 0" (identifier "iVar4") (= "=") (number_literal "0")) (; ";")) (while_statement "while( true ) {\n        param_1 = param_1 + 1;\n        iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;\n        if (param_1 == pbVar1) break;\n        uVar5 = (uint)*param_1;\n        if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n          return local_28;\n        }\n      }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n        param_1 = param_1 + 1;\n        iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;\n        if (param_1 == pbVar1) break;\n        uVar5 = (uint)*param_1;\n        if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n          return local_28;\n        }\n      }" ({ "{") (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" (identifier "param_1") (= "=") (binary_expression "param_1 + 1" (identifier "param_1") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;" (assignment_expression "iVar4 = (char)uVar5 + -0x30 + iVar4 * 10" (identifier "iVar4") (= "=") (binary_expression "(char)uVar5 + -0x30 + iVar4 * 10" (binary_expression "(char)uVar5 + -0x30" (cast_expression "(char)uVar5" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "uVar5")) (+ "+") (number_literal "-0x30")) (+ "+") (binary_expression "iVar4 * 10" (identifier "iVar4") (* "*") (number_literal "10")))) (; ";")) (if_statement "if (param_1 == pbVar1) break;" (if "if") (parenthesized_expression "(param_1 == pbVar1)" (( "(") (binary_expression "param_1 == pbVar1" (identifier "param_1") (== "==") (identifier "pbVar1")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "uVar5 = (uint)*param_1;" (assignment_expression "uVar5 = (uint)*param_1" (identifier "uVar5") (= "=") (binary_expression "(uint)*param_1" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (identifier "param_1"))) (; ";")) (if_statement "if (((&DAT_000b4f80)[uVar5] & 4) == 0) {\n          return local_28;\n        }" (if "if") (parenthesized_expression "(((&DAT_000b4f80)[uVar5] & 4) == 0)" (( "(") (binary_expression "((&DAT_000b4f80)[uVar5] & 4) == 0" (parenthesized_expression "((&DAT_000b4f80)[uVar5] & 4)" (( "(") (binary_expression "(&DAT_000b4f80)[uVar5] & 4" (subscript_expression "(&DAT_000b4f80)[uVar5]" (parenthesized_expression "(&DAT_000b4f80)" (( "(") (pointer_expression "&DAT_000b4f80" (& "&") (identifier "DAT_000b4f80")) () ")")) ([ "[") (identifier "uVar5") (] "]")) (& "&") (number_literal "4")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n          return local_28;\n        }" ({ "{") (return_statement "return local_28;" (return "return") (identifier "local_28") (; ";")) (} "}"))) (} "}"))) (if_statement "if (iVar4 < (char)(param_2[1] - 0x30)) {\n        return local_28;\n      }" (if "if") (parenthesized_expression "(iVar4 < (char)(param_2[1] - 0x30))" (( "(") (binary_expression "iVar4 < (char)(param_2[1] - 0x30)" (identifier "iVar4") (< "<") (cast_expression "(char)(param_2[1] - 0x30)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (parenthesized_expression "(param_2[1] - 0x30)" (( "(") (binary_expression "param_2[1] - 0x30" (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]")) (- "-") (number_literal "0x30")) () ")")))) () ")")) (compound_statement "{\n        return local_28;\n      }" ({ "{") (return_statement "return local_28;" (return "return") (identifier "local_28") (; ";")) (} "}"))) (if_statement "if ((int)(uint)(ushort)L"bad parameter or other API misuse"[(char)param_2[2] + 0x21] < iVar4)\n      {\n        return local_28;\n      }" (if "if") (parenthesized_expression "((int)(uint)(ushort)L"bad parameter or other API misuse"[(char)param_2[2] + 0x21] < iVar4)" (( "(") (binary_expression "(int)(uint)(ushort)L"bad parameter or other API misuse"[(char)param_2[2] + 0x21] < iVar4" (cast_expression "(int)(uint)(ushort)L"bad parameter or other API misuse"[(char)param_2[2] + 0x21]" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (cast_expression "(uint)(ushort)L"bad parameter or other API misuse"[(char)param_2[2] + 0x21]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (cast_expression "(ushort)L"bad parameter or other API misuse"[(char)param_2[2] + 0x21]" (( "(") (type_descriptor "ushort" (type_identifier "ushort")) () ")") (subscript_expression "L"bad parameter or other API misuse"[(char)param_2[2] + 0x21]" (string_literal "L"bad parameter or other API misuse"" (L" "L"") (string_content "bad parameter or other API misuse") (" """)) ([ "[") (binary_expression "(char)param_2[2] + 0x21" (cast_expression "(char)param_2[2]" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (subscript_expression "param_2[2]" (identifier "param_2") ([ "[") (number_literal "2") (] "]"))) (+ "+") (number_literal "0x21")) (] "]"))))) (< "<") (identifier "iVar4")) () ")")) (compound_statement "{\n        return local_28;\n      }" ({ "{") (return_statement "return local_28;" (return "return") (identifier "local_28") (; ";")) (} "}"))) (} "}")))) (if_statement "if (param_2[3] == 0) {\n      if (!bVar3) {\n        local_20 = (undefined4 *)&stack0x0000000c;\n      }\n      *(int *)*local_20 = iVar4;\n      return local_28 + 1;\n    }" (if "if") (parenthesized_expression "(param_2[3] == 0)" (( "(") (binary_expression "param_2[3] == 0" (subscript_expression "param_2[3]" (identifier "param_2") ([ "[") (number_literal "3") (] "]")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      if (!bVar3) {\n        local_20 = (undefined4 *)&stack0x0000000c;\n      }\n      *(int *)*local_20 = iVar4;\n      return local_28 + 1;\n    }" ({ "{") (if_statement "if (!bVar3) {\n        local_20 = (undefined4 *)&stack0x0000000c;\n      }" (if "if") (parenthesized_expression "(!bVar3)" (( "(") (unary_expression "!bVar3" (! "!") (identifier "bVar3")) () ")")) (compound_statement "{\n        local_20 = (undefined4 *)&stack0x0000000c;\n      }" ({ "{") (expression_statement "local_20 = (undefined4 *)&stack0x0000000c;" (assignment_expression "local_20 = (undefined4 *)&stack0x0000000c" (identifier "local_20") (= "=") (cast_expression "(undefined4 *)&stack0x0000000c" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "&stack0x0000000c" (& "&") (identifier "stack0x0000000c")))) (; ";")) (} "}"))) (expression_statement "*(int *)*local_20 = iVar4;" (assignment_expression "*(int *)*local_20 = iVar4" (pointer_expression "*(int *)*local_20" (* "*") (cast_expression "(int *)*local_20" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*local_20" (* "*") (identifier "local_20")))) (= "=") (identifier "iVar4")) (; ";")) (return_statement "return local_28 + 1;" (return "return") (binary_expression "local_28 + 1" (identifier "local_28") (+ "+") (number_literal "1")) (; ";")) (} "}"))) (if_statement "if (*param_1 != param_2[3]) {\n      return local_28;\n    }" (if "if") (parenthesized_expression "(*param_1 != param_2[3])" (( "(") (binary_expression "*param_1 != param_2[3]" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (!= "!=") (subscript_expression "param_2[3]" (identifier "param_2") ([ "[") (number_literal "3") (] "]"))) () ")")) (compound_statement "{\n      return local_28;\n    }" ({ "{") (return_statement "return local_28;" (return "return") (identifier "local_28") (; ";")) (} "}"))) (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" (identifier "param_1") (= "=") (binary_expression "param_1 + 1" (identifier "param_1") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "local_28 = local_28 + 1;" (assignment_expression "local_28 = local_28 + 1" (identifier "local_28") (= "=") (binary_expression "local_28 + 1" (identifier "local_28") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "param_2 = param_2 + 4;" (assignment_expression "param_2 = param_2 + 4" (identifier "param_2") (= "=") (binary_expression "param_2 + 4" (identifier "param_2") (+ "+") (number_literal "4"))) (; ";")) (expression_statement "bVar3 = true;" (assignment_expression "bVar3 = true" (identifier "bVar3") (= "=") (true "true")) (; ";")) (expression_statement "piVar2 = (int *)*local_20;" (assignment_expression "piVar2 = (int *)*local_20" (identifier "piVar2") (= "=") (cast_expression "(int *)*local_20" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*local_20" (* "*") (identifier "local_20")))) (; ";")) (expression_statement "local_20 = local_20 + 1;" (assignment_expression "local_20 = local_20 + 1" (identifier "local_20") (= "=") (binary_expression "local_20 + 1" (identifier "local_20") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "*piVar2 = iVar4;" (assignment_expression "*piVar2 = iVar4" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (= "=") (identifier "iVar4")) (; ";")) (} "}")) (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */

int function_1(char *var_1,char *var_2,...)

{
  type_1 *var_4;
  int *piVar2;
  bool bVar3;
  int var_3;
  type_2 uVar5;
  int var_6;
  type_3 *var_7;
  
  bVar3 = false;
  var_6 = 0;
  var_7 = (type_3 *)&stack0x0000000c;
  do {
    if (*var_2 == 0x30) {
      if ('\0' < (char)(((type_1 *)var_2)[1] - 0x30)) {
        return var_6;
      }
      var_3 = 0;
    }
    else {
      uVar5 = (type_2)(type_1)*var_1;
      if ((""[uVar5] & 4) == 0) {
        return var_6;
      }
      var_4 = (type_1 *)var_1 + ((type_1)*var_2 - 0x31 & 0xff) + 1;
      var_3 = 0;
      while( true ) {
        var_1 = (char *)((type_1 *)var_1 + 1);
        var_3 = (char)uVar5 + -0x30 + var_3 * 10;
        if ((type_1 *)var_1 == var_4) break;
        uVar5 = (type_2)(type_1)*var_1;
        if ((""[uVar5] & 4) == 0) {
          return var_6;
        }
      }
      if (var_3 < (char)(((type_1 *)var_2)[1] - 0x30)) {
        return var_6;
      }
      if ((int)(type_2)*(type_4 *)(var_5 + (char)((type_1 *)var_2)[2] * 2 + 0x42) < var_3) {
        return var_6;
      }
    }
    if (((type_1 *)var_2)[3] == 0) {
      if (!bVar3) {
        var_7 = (type_3 *)&stack0x0000000c;
      }
      *(int *)*var_7 = var_3;
      return var_6 + 1;
    }
    if (*var_1 != ((type_1 *)var_2)[3]) {
      return var_6;
    }
    var_1 = (char *)((type_1 *)var_1 + 1);
    var_6 = var_6 + 1;
    var_2 = (char *)((type_1 *)var_2 + 4);
    bVar3 = true;
    piVar2 = (int *)*var_7;
    var_7 = var_7 + 1;
    *piVar2 = var_3;
  } while( true );
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (pointer_declarator 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: (pointer_declarator declarator: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (false))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))) (do_statement body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (char_literal (escape_sequence)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal)))))) consequence: (compound_statement (return_statement (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (identifier)) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (subscript_expression argument: (parenthesized_expression (pointer_expression argument: (identifier))) index: (identifier)) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (return_statement (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal)) right: (number_literal)))) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (while_statement condition: (parenthesized_expression (true)) body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (break_statement)) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (identifier)) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (subscript_expression argument: (parenthesized_expression (pointer_expression argument: (identifier))) index: (identifier)) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (return_statement (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal)))))) consequence: (compound_statement (return_statement (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (cast_expression type: (type_descriptor type: (type_identifier)) value: (cast_expression type: (type_descriptor type: (type_identifier)) value: (subscript_expression argument: (string_literal (string_content)) index: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (subscript_expression argument: (identifier) index: (number_literal))) right: (number_literal)))))) right: (identifier))) consequence: (compound_statement (return_statement (identifier))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (unary_expression argument: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier)))) right: (identifier))) (return_statement (binary_expression left: (identifier) right: (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (subscript_expression argument: (identifier) index: (number_literal)))) consequence: (compound_statement (return_statement (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (true))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))) (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 (true))))))

/* WARNING: Function: __i686.get_pc_thunk.ax replaced with injection: get_pc_thunk_ax */

int MASKED(byte *param_1,byte *param_2)

{
  byte *pbVar1;
  int *piVar2;
  bool bVar3;
  int iVar4;
  uint uVar5;
  int local_28;
  undefined4 *local_20;
  
  bVar3 = false;
  local_28 = 0;
  local_20 = (undefined4 *)&stack0x0000000c;
  do {
    if (*param_2 == 0x30) {
      if ('\0' < (char)(param_2[1] - 0x30)) {
        return local_28;
      }
      iVar4 = 0;
    }
    else {
      uVar5 = (uint)*param_1;
      if (((&DAT_000b4f80)[uVar5] & 4) == 0) {
        return local_28;
      }
      pbVar1 = param_1 + (*param_2 - 0x31 & 0xff) + 1;
      iVar4 = 0;
      while( true ) {
        param_1 = param_1 + 1;
        iVar4 = (char)uVar5 + -0x30 + iVar4 * 10;
        if (param_1 == pbVar1) break;
        uVar5 = (uint)*param_1;
        if (((&DAT_000b4f80)[uVar5] & 4) == 0) {
          return local_28;
        }
      }
      if (iVar4 < (char)(param_2[1] - 0x30)) {
        return local_28;
      }
      if ((int)(uint)(ushort)L"bad parameter or other API misuse"[(char)param_2[2] + 0x21] < iVar4)
      {
        return local_28;
      }
    }
    if (param_2[3] == 0) {
      if (!bVar3) {
        local_20 = (undefined4 *)&stack0x0000000c;
      }
      *(int *)*local_20 = iVar4;
      return local_28 + 1;
    }
    if (*param_1 != param_2[3]) {
      return local_28;
    }
    param_1 = param_1 + 1;
    local_28 = local_28 + 1;
    param_2 = param_2 + 4;
    bVar3 = true;
    piVar2 = (int *)*local_20;
    local_20 = local_20 + 1;
    *piVar2 = iVar4;
  } while( true );
}

