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

size_t base_len(char *name)

{
  char cVar1;
  size_t sVar2;
  size_t sVar3;
  
  sVar3 = strlen(name);
  if ((1 < sVar3) && (name[sVar3 - 1] == '/')) {
    if (sVar3 - 1 == 1) {
      sVar3 = 1;
    }
    else {
      cVar1 = name[sVar3 - 2];
      sVar2 = sVar3 - 1;
      sVar3 = sVar3 - 2;
      while( true ) {
        if (cVar1 != '/') {
          return sVar2;
        }
        if (sVar3 == 1) break;
        cVar1 = name[sVar3 - 1];
        sVar2 = sVar3;
        sVar3 = sVar3 - 1;
      }
    }
  }
  return sVar3;
}



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

size_t FUN_0001d0d0(char *param_1)

{
  char cVar1;
  size_t sVar2;
  size_t sVar3;
  
  sVar3 = strlen(param_1);
  if ((1 < sVar3) && (param_1[sVar3 - 1] == '/')) {
    if (sVar3 - 1 == 1) {
      sVar3 = 1;
    }
    else {
      cVar1 = param_1[sVar3 - 2];
      sVar2 = sVar3 - 1;
      sVar3 = sVar3 - 2;
      while( true ) {
        if (cVar1 != '/') {
          return sVar2;
        }
        if (sVar3 == 1) break;
        cVar1 = param_1[sVar3 - 1];
        sVar2 = sVar3;
        sVar3 = sVar3 - 1;
      }
    }
  }
  return sVar3;
}


PUSH ESI
PUSH EBX
CALL 0x000142a0
ADD EBX,0x1ff29
SUB ESP,0x10
MOV ESI,dword ptr [ESP + 0x1c]
PUSH ESI
CALL 0x00012420
ADD ESP,0x10
CMP EAX,0x1
JBE 0x0001d0fc
CMP byte ptr [ESI + EAX*0x1 + -0x1],0x2f
LEA EDX,[EAX + -0x1]
JZ 0x0001d108
ADD ESP,0x4
POP EBX
POP ESI
RET
CMP EDX,0x1
JZ 0x0001d135
SUB EAX,0x2
CMP byte ptr [ESI + EAX*0x1],0x2f
JZ 0x0001d120
MOV EAX,EDX
ADD ESP,0x4
POP EBX
POP ESI
RET
MOV EAX,EDX
CMP EAX,0x1
JZ 0x0001d0fc
CMP byte ptr [ESI + EAX*0x1 + -0x1],0x2f
LEA EDX,[EAX + -0x1]
JZ 0x0001d11e
MOV EDX,EAX
MOV EAX,EDX
JMP 0x0001d118
MOV EAX,0x1
JMP 0x0001d0fc
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nsize_t FUN_0001d0d0(char *param_1)\n\n{\n  char cVar1;\n  size_t sVar2;\n  size_t sVar3;\n  \n  sVar3 = strlen(param_1);\n  if ((1 < sVar3) && (param_1[sVar3 - 1] == '/')) {\n    if (sVar3 - 1 == 1) {\n      sVar3 = 1;\n    }\n    else {\n      cVar1 = param_1[sVar3 - 2];\n      sVar2 = sVar3 - 1;\n      sVar3 = sVar3 - 2;\n      while( true ) {\n        if (cVar1 != '/') {\n          return sVar2;\n        }\n        if (sVar3 == 1) break;\n        cVar1 = param_1[sVar3 - 1];\n        sVar2 = sVar3;\n        sVar3 = sVar3 - 1;\n      }\n    }\n  }\n  return sVar3;\n}\n\n" comment (function_definition "size_t FUN_0001d0d0(char *param_1)\n\n{\n  char cVar1;\n  size_t sVar2;\n  size_t sVar3;\n  \n  sVar3 = strlen(param_1);\n  if ((1 < sVar3) && (param_1[sVar3 - 1] == '/')) {\n    if (sVar3 - 1 == 1) {\n      sVar3 = 1;\n    }\n    else {\n      cVar1 = param_1[sVar3 - 2];\n      sVar2 = sVar3 - 1;\n      sVar3 = sVar3 - 2;\n      while( true ) {\n        if (cVar1 != '/') {\n          return sVar2;\n        }\n        if (sVar3 == 1) break;\n        cVar1 = param_1[sVar3 - 1];\n        sVar2 = sVar3;\n        sVar3 = sVar3 - 1;\n      }\n    }\n  }\n  return sVar3;\n}" primitive_type (function_declarator "FUN_0001d0d0(char *param_1)" identifier (parameter_list "(char *param_1)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  char cVar1;\n  size_t sVar2;\n  size_t sVar3;\n  \n  sVar3 = strlen(param_1);\n  if ((1 < sVar3) && (param_1[sVar3 - 1] == '/')) {\n    if (sVar3 - 1 == 1) {\n      sVar3 = 1;\n    }\n    else {\n      cVar1 = param_1[sVar3 - 2];\n      sVar2 = sVar3 - 1;\n      sVar3 = sVar3 - 2;\n      while( true ) {\n        if (cVar1 != '/') {\n          return sVar2;\n        }\n        if (sVar3 == 1) break;\n        cVar1 = param_1[sVar3 - 1];\n        sVar2 = sVar3;\n        sVar3 = sVar3 - 1;\n      }\n    }\n  }\n  return sVar3;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "size_t sVar3;" primitive_type identifier ;) (expression_statement "sVar3 = strlen(param_1);" (assignment_expression "sVar3 = strlen(param_1)" identifier = (call_expression "strlen(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if ((1 < sVar3) && (param_1[sVar3 - 1] == '/')) {\n    if (sVar3 - 1 == 1) {\n      sVar3 = 1;\n    }\n    else {\n      cVar1 = param_1[sVar3 - 2];\n      sVar2 = sVar3 - 1;\n      sVar3 = sVar3 - 2;\n      while( true ) {\n        if (cVar1 != '/') {\n          return sVar2;\n        }\n        if (sVar3 == 1) break;\n        cVar1 = param_1[sVar3 - 1];\n        sVar2 = sVar3;\n        sVar3 = sVar3 - 1;\n      }\n    }\n  }" if (parenthesized_expression "((1 < sVar3) && (param_1[sVar3 - 1] == '/'))" ( (binary_expression "(1 < sVar3) && (param_1[sVar3 - 1] == '/')" (parenthesized_expression "(1 < sVar3)" ( (binary_expression "1 < sVar3" number_literal < identifier) )) && (parenthesized_expression "(param_1[sVar3 - 1] == '/')" ( (binary_expression "param_1[sVar3 - 1] == '/'" (subscript_expression "param_1[sVar3 - 1]" identifier [ (binary_expression "sVar3 - 1" identifier - number_literal) ]) == (char_literal "'/'" ' character ')) ))) )) (compound_statement "{\n    if (sVar3 - 1 == 1) {\n      sVar3 = 1;\n    }\n    else {\n      cVar1 = param_1[sVar3 - 2];\n      sVar2 = sVar3 - 1;\n      sVar3 = sVar3 - 2;\n      while( true ) {\n        if (cVar1 != '/') {\n          return sVar2;\n        }\n        if (sVar3 == 1) break;\n        cVar1 = param_1[sVar3 - 1];\n        sVar2 = sVar3;\n        sVar3 = sVar3 - 1;\n      }\n    }\n  }" { (if_statement "if (sVar3 - 1 == 1) {\n      sVar3 = 1;\n    }\n    else {\n      cVar1 = param_1[sVar3 - 2];\n      sVar2 = sVar3 - 1;\n      sVar3 = sVar3 - 2;\n      while( true ) {\n        if (cVar1 != '/') {\n          return sVar2;\n        }\n        if (sVar3 == 1) break;\n        cVar1 = param_1[sVar3 - 1];\n        sVar2 = sVar3;\n        sVar3 = sVar3 - 1;\n      }\n    }" if (parenthesized_expression "(sVar3 - 1 == 1)" ( (binary_expression "sVar3 - 1 == 1" (binary_expression "sVar3 - 1" identifier - number_literal) == number_literal) )) (compound_statement "{\n      sVar3 = 1;\n    }" { (expression_statement "sVar3 = 1;" (assignment_expression "sVar3 = 1" identifier = number_literal) ;) }) (else_clause "else {\n      cVar1 = param_1[sVar3 - 2];\n      sVar2 = sVar3 - 1;\n      sVar3 = sVar3 - 2;\n      while( true ) {\n        if (cVar1 != '/') {\n          return sVar2;\n        }\n        if (sVar3 == 1) break;\n        cVar1 = param_1[sVar3 - 1];\n        sVar2 = sVar3;\n        sVar3 = sVar3 - 1;\n      }\n    }" else (compound_statement "{\n      cVar1 = param_1[sVar3 - 2];\n      sVar2 = sVar3 - 1;\n      sVar3 = sVar3 - 2;\n      while( true ) {\n        if (cVar1 != '/') {\n          return sVar2;\n        }\n        if (sVar3 == 1) break;\n        cVar1 = param_1[sVar3 - 1];\n        sVar2 = sVar3;\n        sVar3 = sVar3 - 1;\n      }\n    }" { (expression_statement "cVar1 = param_1[sVar3 - 2];" (assignment_expression "cVar1 = param_1[sVar3 - 2]" identifier = (subscript_expression "param_1[sVar3 - 2]" identifier [ (binary_expression "sVar3 - 2" identifier - number_literal) ])) ;) (expression_statement "sVar2 = sVar3 - 1;" (assignment_expression "sVar2 = sVar3 - 1" identifier = (binary_expression "sVar3 - 1" identifier - number_literal)) ;) (expression_statement "sVar3 = sVar3 - 2;" (assignment_expression "sVar3 = sVar3 - 2" identifier = (binary_expression "sVar3 - 2" identifier - number_literal)) ;) (while_statement "while( true ) {\n        if (cVar1 != '/') {\n          return sVar2;\n        }\n        if (sVar3 == 1) break;\n        cVar1 = param_1[sVar3 - 1];\n        sVar2 = sVar3;\n        sVar3 = sVar3 - 1;\n      }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n        if (cVar1 != '/') {\n          return sVar2;\n        }\n        if (sVar3 == 1) break;\n        cVar1 = param_1[sVar3 - 1];\n        sVar2 = sVar3;\n        sVar3 = sVar3 - 1;\n      }" { (if_statement "if (cVar1 != '/') {\n          return sVar2;\n        }" if (parenthesized_expression "(cVar1 != '/')" ( (binary_expression "cVar1 != '/'" identifier != (char_literal "'/'" ' character ')) )) (compound_statement "{\n          return sVar2;\n        }" { (return_statement "return sVar2;" return identifier ;) })) (if_statement "if (sVar3 == 1) break;" if (parenthesized_expression "(sVar3 == 1)" ( (binary_expression "sVar3 == 1" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "cVar1 = param_1[sVar3 - 1];" (assignment_expression "cVar1 = param_1[sVar3 - 1]" identifier = (subscript_expression "param_1[sVar3 - 1]" identifier [ (binary_expression "sVar3 - 1" identifier - number_literal) ])) ;) (expression_statement "sVar2 = sVar3;" (assignment_expression "sVar2 = sVar3" identifier = identifier) ;) (expression_statement "sVar3 = sVar3 - 1;" (assignment_expression "sVar3 = sVar3 - 1" identifier = (binary_expression "sVar3 - 1" identifier - number_literal)) ;) })) }))) })) (return_statement "return sVar3;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nsize_t base_len(char *name)\n\n{\n  char cVar1;\n  size_t sVar2;\n  size_t sVar3;\n  \n  sVar3 = strlen(name);\n  if ((1 < sVar3) && (name[sVar3 - 1] == '/')) {\n    if (sVar3 - 1 == 1) {\n      sVar3 = 1;\n    }\n    else {\n      cVar1 = name[sVar3 - 2];\n      sVar2 = sVar3 - 1;\n      sVar3 = sVar3 - 2;\n      while( true ) {\n        if (cVar1 != '/') {\n          return sVar2;\n        }\n        if (sVar3 == 1) break;\n        cVar1 = name[sVar3 - 1];\n        sVar2 = sVar3;\n        sVar3 = sVar3 - 1;\n      }\n    }\n  }\n  return sVar3;\n}\n\n" comment comment (function_definition "size_t base_len(char *name)\n\n{\n  char cVar1;\n  size_t sVar2;\n  size_t sVar3;\n  \n  sVar3 = strlen(name);\n  if ((1 < sVar3) && (name[sVar3 - 1] == '/')) {\n    if (sVar3 - 1 == 1) {\n      sVar3 = 1;\n    }\n    else {\n      cVar1 = name[sVar3 - 2];\n      sVar2 = sVar3 - 1;\n      sVar3 = sVar3 - 2;\n      while( true ) {\n        if (cVar1 != '/') {\n          return sVar2;\n        }\n        if (sVar3 == 1) break;\n        cVar1 = name[sVar3 - 1];\n        sVar2 = sVar3;\n        sVar3 = sVar3 - 1;\n      }\n    }\n  }\n  return sVar3;\n}" primitive_type (function_declarator "base_len(char *name)" identifier (parameter_list "(char *name)" ( (parameter_declaration "char *name" primitive_type (pointer_declarator "*name" * identifier)) ))) (compound_statement "{\n  char cVar1;\n  size_t sVar2;\n  size_t sVar3;\n  \n  sVar3 = strlen(name);\n  if ((1 < sVar3) && (name[sVar3 - 1] == '/')) {\n    if (sVar3 - 1 == 1) {\n      sVar3 = 1;\n    }\n    else {\n      cVar1 = name[sVar3 - 2];\n      sVar2 = sVar3 - 1;\n      sVar3 = sVar3 - 2;\n      while( true ) {\n        if (cVar1 != '/') {\n          return sVar2;\n        }\n        if (sVar3 == 1) break;\n        cVar1 = name[sVar3 - 1];\n        sVar2 = sVar3;\n        sVar3 = sVar3 - 1;\n      }\n    }\n  }\n  return sVar3;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "size_t sVar3;" primitive_type identifier ;) (expression_statement "sVar3 = strlen(name);" (assignment_expression "sVar3 = strlen(name)" identifier = (call_expression "strlen(name)" identifier (argument_list "(name)" ( identifier )))) ;) (if_statement "if ((1 < sVar3) && (name[sVar3 - 1] == '/')) {\n    if (sVar3 - 1 == 1) {\n      sVar3 = 1;\n    }\n    else {\n      cVar1 = name[sVar3 - 2];\n      sVar2 = sVar3 - 1;\n      sVar3 = sVar3 - 2;\n      while( true ) {\n        if (cVar1 != '/') {\n          return sVar2;\n        }\n        if (sVar3 == 1) break;\n        cVar1 = name[sVar3 - 1];\n        sVar2 = sVar3;\n        sVar3 = sVar3 - 1;\n      }\n    }\n  }" if (parenthesized_expression "((1 < sVar3) && (name[sVar3 - 1] == '/'))" ( (binary_expression "(1 < sVar3) && (name[sVar3 - 1] == '/')" (parenthesized_expression "(1 < sVar3)" ( (binary_expression "1 < sVar3" number_literal < identifier) )) && (parenthesized_expression "(name[sVar3 - 1] == '/')" ( (binary_expression "name[sVar3 - 1] == '/'" (subscript_expression "name[sVar3 - 1]" identifier [ (binary_expression "sVar3 - 1" identifier - number_literal) ]) == (char_literal "'/'" ' character ')) ))) )) (compound_statement "{\n    if (sVar3 - 1 == 1) {\n      sVar3 = 1;\n    }\n    else {\n      cVar1 = name[sVar3 - 2];\n      sVar2 = sVar3 - 1;\n      sVar3 = sVar3 - 2;\n      while( true ) {\n        if (cVar1 != '/') {\n          return sVar2;\n        }\n        if (sVar3 == 1) break;\n        cVar1 = name[sVar3 - 1];\n        sVar2 = sVar3;\n        sVar3 = sVar3 - 1;\n      }\n    }\n  }" { (if_statement "if (sVar3 - 1 == 1) {\n      sVar3 = 1;\n    }\n    else {\n      cVar1 = name[sVar3 - 2];\n      sVar2 = sVar3 - 1;\n      sVar3 = sVar3 - 2;\n      while( true ) {\n        if (cVar1 != '/') {\n          return sVar2;\n        }\n        if (sVar3 == 1) break;\n        cVar1 = name[sVar3 - 1];\n        sVar2 = sVar3;\n        sVar3 = sVar3 - 1;\n      }\n    }" if (parenthesized_expression "(sVar3 - 1 == 1)" ( (binary_expression "sVar3 - 1 == 1" (binary_expression "sVar3 - 1" identifier - number_literal) == number_literal) )) (compound_statement "{\n      sVar3 = 1;\n    }" { (expression_statement "sVar3 = 1;" (assignment_expression "sVar3 = 1" identifier = number_literal) ;) }) (else_clause "else {\n      cVar1 = name[sVar3 - 2];\n      sVar2 = sVar3 - 1;\n      sVar3 = sVar3 - 2;\n      while( true ) {\n        if (cVar1 != '/') {\n          return sVar2;\n        }\n        if (sVar3 == 1) break;\n        cVar1 = name[sVar3 - 1];\n        sVar2 = sVar3;\n        sVar3 = sVar3 - 1;\n      }\n    }" else (compound_statement "{\n      cVar1 = name[sVar3 - 2];\n      sVar2 = sVar3 - 1;\n      sVar3 = sVar3 - 2;\n      while( true ) {\n        if (cVar1 != '/') {\n          return sVar2;\n        }\n        if (sVar3 == 1) break;\n        cVar1 = name[sVar3 - 1];\n        sVar2 = sVar3;\n        sVar3 = sVar3 - 1;\n      }\n    }" { (expression_statement "cVar1 = name[sVar3 - 2];" (assignment_expression "cVar1 = name[sVar3 - 2]" identifier = (subscript_expression "name[sVar3 - 2]" identifier [ (binary_expression "sVar3 - 2" identifier - number_literal) ])) ;) (expression_statement "sVar2 = sVar3 - 1;" (assignment_expression "sVar2 = sVar3 - 1" identifier = (binary_expression "sVar3 - 1" identifier - number_literal)) ;) (expression_statement "sVar3 = sVar3 - 2;" (assignment_expression "sVar3 = sVar3 - 2" identifier = (binary_expression "sVar3 - 2" identifier - number_literal)) ;) (while_statement "while( true ) {\n        if (cVar1 != '/') {\n          return sVar2;\n        }\n        if (sVar3 == 1) break;\n        cVar1 = name[sVar3 - 1];\n        sVar2 = sVar3;\n        sVar3 = sVar3 - 1;\n      }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n        if (cVar1 != '/') {\n          return sVar2;\n        }\n        if (sVar3 == 1) break;\n        cVar1 = name[sVar3 - 1];\n        sVar2 = sVar3;\n        sVar3 = sVar3 - 1;\n      }" { (if_statement "if (cVar1 != '/') {\n          return sVar2;\n        }" if (parenthesized_expression "(cVar1 != '/')" ( (binary_expression "cVar1 != '/'" identifier != (char_literal "'/'" ' character ')) )) (compound_statement "{\n          return sVar2;\n        }" { (return_statement "return sVar2;" return identifier ;) })) (if_statement "if (sVar3 == 1) break;" if (parenthesized_expression "(sVar3 == 1)" ( (binary_expression "sVar3 == 1" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "cVar1 = name[sVar3 - 1];" (assignment_expression "cVar1 = name[sVar3 - 1]" identifier = (subscript_expression "name[sVar3 - 1]" identifier [ (binary_expression "sVar3 - 1" identifier - number_literal) ])) ;) (expression_statement "sVar2 = sVar3;" (assignment_expression "sVar2 = sVar3" identifier = identifier) ;) (expression_statement "sVar3 = sVar3 - 1;" (assignment_expression "sVar3 = sVar3 - 1" identifier = (binary_expression "sVar3 - 1" identifier - number_literal)) ;) })) }))) })) (return_statement "return sVar3;" return identifier ;) })))
(translation_unit "size_t FUN_0001d0d0(char *param_1)\n\n{\n  char cVar1;\n  size_t sVar2;\n  size_t sVar3;\n  \n  sVar3 = strlen(param_1);\n  if ((1 < sVar3) && (param_1[sVar3 - 1] == '/')) {\n    if (sVar3 - 1 == 1) {\n      sVar3 = 1;\n    }\n    else {\n      cVar1 = param_1[sVar3 - 2];\n      sVar2 = sVar3 - 1;\n      sVar3 = sVar3 - 2;\n      while( true ) {\n        if (cVar1 != '/') {\n          return sVar2;\n        }\n        if (sVar3 == 1) break;\n        cVar1 = param_1[sVar3 - 1];\n        sVar2 = sVar3;\n        sVar3 = sVar3 - 1;\n      }\n    }\n  }\n  return sVar3;\n}\n\n" (function_definition "size_t FUN_0001d0d0(char *param_1)\n\n{\n  char cVar1;\n  size_t sVar2;\n  size_t sVar3;\n  \n  sVar3 = strlen(param_1);\n  if ((1 < sVar3) && (param_1[sVar3 - 1] == '/')) {\n    if (sVar3 - 1 == 1) {\n      sVar3 = 1;\n    }\n    else {\n      cVar1 = param_1[sVar3 - 2];\n      sVar2 = sVar3 - 1;\n      sVar3 = sVar3 - 2;\n      while( true ) {\n        if (cVar1 != '/') {\n          return sVar2;\n        }\n        if (sVar3 == 1) break;\n        cVar1 = param_1[sVar3 - 1];\n        sVar2 = sVar3;\n        sVar3 = sVar3 - 1;\n      }\n    }\n  }\n  return sVar3;\n}" primitive_type (function_declarator "FUN_0001d0d0(char *param_1)" identifier (parameter_list "(char *param_1)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  char cVar1;\n  size_t sVar2;\n  size_t sVar3;\n  \n  sVar3 = strlen(param_1);\n  if ((1 < sVar3) && (param_1[sVar3 - 1] == '/')) {\n    if (sVar3 - 1 == 1) {\n      sVar3 = 1;\n    }\n    else {\n      cVar1 = param_1[sVar3 - 2];\n      sVar2 = sVar3 - 1;\n      sVar3 = sVar3 - 2;\n      while( true ) {\n        if (cVar1 != '/') {\n          return sVar2;\n        }\n        if (sVar3 == 1) break;\n        cVar1 = param_1[sVar3 - 1];\n        sVar2 = sVar3;\n        sVar3 = sVar3 - 1;\n      }\n    }\n  }\n  return sVar3;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "size_t sVar3;" primitive_type identifier ;) (expression_statement "sVar3 = strlen(param_1);" (assignment_expression "sVar3 = strlen(param_1)" identifier = (call_expression "strlen(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if ((1 < sVar3) && (param_1[sVar3 - 1] == '/')) {\n    if (sVar3 - 1 == 1) {\n      sVar3 = 1;\n    }\n    else {\n      cVar1 = param_1[sVar3 - 2];\n      sVar2 = sVar3 - 1;\n      sVar3 = sVar3 - 2;\n      while( true ) {\n        if (cVar1 != '/') {\n          return sVar2;\n        }\n        if (sVar3 == 1) break;\n        cVar1 = param_1[sVar3 - 1];\n        sVar2 = sVar3;\n        sVar3 = sVar3 - 1;\n      }\n    }\n  }" if (parenthesized_expression "((1 < sVar3) && (param_1[sVar3 - 1] == '/'))" ( (binary_expression "(1 < sVar3) && (param_1[sVar3 - 1] == '/')" (parenthesized_expression "(1 < sVar3)" ( (binary_expression "1 < sVar3" number_literal < identifier) )) && (parenthesized_expression "(param_1[sVar3 - 1] == '/')" ( (binary_expression "param_1[sVar3 - 1] == '/'" (subscript_expression "param_1[sVar3 - 1]" identifier [ (binary_expression "sVar3 - 1" identifier - number_literal) ]) == (char_literal "'/'" ' character ')) ))) )) (compound_statement "{\n    if (sVar3 - 1 == 1) {\n      sVar3 = 1;\n    }\n    else {\n      cVar1 = param_1[sVar3 - 2];\n      sVar2 = sVar3 - 1;\n      sVar3 = sVar3 - 2;\n      while( true ) {\n        if (cVar1 != '/') {\n          return sVar2;\n        }\n        if (sVar3 == 1) break;\n        cVar1 = param_1[sVar3 - 1];\n        sVar2 = sVar3;\n        sVar3 = sVar3 - 1;\n      }\n    }\n  }" { (if_statement "if (sVar3 - 1 == 1) {\n      sVar3 = 1;\n    }\n    else {\n      cVar1 = param_1[sVar3 - 2];\n      sVar2 = sVar3 - 1;\n      sVar3 = sVar3 - 2;\n      while( true ) {\n        if (cVar1 != '/') {\n          return sVar2;\n        }\n        if (sVar3 == 1) break;\n        cVar1 = param_1[sVar3 - 1];\n        sVar2 = sVar3;\n        sVar3 = sVar3 - 1;\n      }\n    }" if (parenthesized_expression "(sVar3 - 1 == 1)" ( (binary_expression "sVar3 - 1 == 1" (binary_expression "sVar3 - 1" identifier - number_literal) == number_literal) )) (compound_statement "{\n      sVar3 = 1;\n    }" { (expression_statement "sVar3 = 1;" (assignment_expression "sVar3 = 1" identifier = number_literal) ;) }) (else_clause "else {\n      cVar1 = param_1[sVar3 - 2];\n      sVar2 = sVar3 - 1;\n      sVar3 = sVar3 - 2;\n      while( true ) {\n        if (cVar1 != '/') {\n          return sVar2;\n        }\n        if (sVar3 == 1) break;\n        cVar1 = param_1[sVar3 - 1];\n        sVar2 = sVar3;\n        sVar3 = sVar3 - 1;\n      }\n    }" else (compound_statement "{\n      cVar1 = param_1[sVar3 - 2];\n      sVar2 = sVar3 - 1;\n      sVar3 = sVar3 - 2;\n      while( true ) {\n        if (cVar1 != '/') {\n          return sVar2;\n        }\n        if (sVar3 == 1) break;\n        cVar1 = param_1[sVar3 - 1];\n        sVar2 = sVar3;\n        sVar3 = sVar3 - 1;\n      }\n    }" { (expression_statement "cVar1 = param_1[sVar3 - 2];" (assignment_expression "cVar1 = param_1[sVar3 - 2]" identifier = (subscript_expression "param_1[sVar3 - 2]" identifier [ (binary_expression "sVar3 - 2" identifier - number_literal) ])) ;) (expression_statement "sVar2 = sVar3 - 1;" (assignment_expression "sVar2 = sVar3 - 1" identifier = (binary_expression "sVar3 - 1" identifier - number_literal)) ;) (expression_statement "sVar3 = sVar3 - 2;" (assignment_expression "sVar3 = sVar3 - 2" identifier = (binary_expression "sVar3 - 2" identifier - number_literal)) ;) (while_statement "while( true ) {\n        if (cVar1 != '/') {\n          return sVar2;\n        }\n        if (sVar3 == 1) break;\n        cVar1 = param_1[sVar3 - 1];\n        sVar2 = sVar3;\n        sVar3 = sVar3 - 1;\n      }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n        if (cVar1 != '/') {\n          return sVar2;\n        }\n        if (sVar3 == 1) break;\n        cVar1 = param_1[sVar3 - 1];\n        sVar2 = sVar3;\n        sVar3 = sVar3 - 1;\n      }" { (if_statement "if (cVar1 != '/') {\n          return sVar2;\n        }" if (parenthesized_expression "(cVar1 != '/')" ( (binary_expression "cVar1 != '/'" identifier != (char_literal "'/'" ' character ')) )) (compound_statement "{\n          return sVar2;\n        }" { (return_statement "return sVar2;" return identifier ;) })) (if_statement "if (sVar3 == 1) break;" if (parenthesized_expression "(sVar3 == 1)" ( (binary_expression "sVar3 == 1" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "cVar1 = param_1[sVar3 - 1];" (assignment_expression "cVar1 = param_1[sVar3 - 1]" identifier = (subscript_expression "param_1[sVar3 - 1]" identifier [ (binary_expression "sVar3 - 1" identifier - number_literal) ])) ;) (expression_statement "sVar2 = sVar3;" (assignment_expression "sVar2 = sVar3" identifier = identifier) ;) (expression_statement "sVar3 = sVar3 - 1;" (assignment_expression "sVar3 = sVar3 - 1" identifier = (binary_expression "sVar3 - 1" identifier - number_literal)) ;) })) }))) })) (return_statement "return sVar3;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression LIT < IDENT) )) && (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ (binary_expression IDENT - LIT) ]) == (char_literal ' character ')) ))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT - LIT) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ (binary_expression IDENT - LIT) ])) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - LIT)) ;) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != (char_literal ' character ')) )) (compound_statement { (return_statement return IDENT ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ (binary_expression IDENT - LIT) ])) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - LIT)) ;) })) }))) })) (return_statement return IDENT ;) })))
(function_definition "size_t FUN_0001d0d0(char *param_1)\n\n{\n  char cVar1;\n  size_t sVar2;\n  size_t sVar3;\n  \n  sVar3 = strlen(param_1);\n  if ((1 < sVar3) && (param_1[sVar3 - 1] == '/')) {\n    if (sVar3 - 1 == 1) {\n      sVar3 = 1;\n    }\n    else {\n      cVar1 = param_1[sVar3 - 2];\n      sVar2 = sVar3 - 1;\n      sVar3 = sVar3 - 2;\n      while( true ) {\n        if (cVar1 != '/') {\n          return sVar2;\n        }\n        if (sVar3 == 1) break;\n        cVar1 = param_1[sVar3 - 1];\n        sVar2 = sVar3;\n        sVar3 = sVar3 - 1;\n      }\n    }\n  }\n  return sVar3;\n}" (primitive_type "size_t") (function_declarator "FUN_0001d0d0(char *param_1)" (identifier "FUN_0001d0d0") (parameter_list "(char *param_1)" (( "(") (parameter_declaration "char *param_1" (primitive_type "char") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  char cVar1;\n  size_t sVar2;\n  size_t sVar3;\n  \n  sVar3 = strlen(param_1);\n  if ((1 < sVar3) && (param_1[sVar3 - 1] == '/')) {\n    if (sVar3 - 1 == 1) {\n      sVar3 = 1;\n    }\n    else {\n      cVar1 = param_1[sVar3 - 2];\n      sVar2 = sVar3 - 1;\n      sVar3 = sVar3 - 2;\n      while( true ) {\n        if (cVar1 != '/') {\n          return sVar2;\n        }\n        if (sVar3 == 1) break;\n        cVar1 = param_1[sVar3 - 1];\n        sVar2 = sVar3;\n        sVar3 = sVar3 - 1;\n      }\n    }\n  }\n  return sVar3;\n}" ({ "{") (declaration "char cVar1;" (primitive_type "char") (identifier "cVar1") (; ";")) (declaration "size_t sVar2;" (primitive_type "size_t") (identifier "sVar2") (; ";")) (declaration "size_t sVar3;" (primitive_type "size_t") (identifier "sVar3") (; ";")) (expression_statement "sVar3 = strlen(param_1);" (assignment_expression "sVar3 = strlen(param_1)" (identifier "sVar3") (= "=") (call_expression "strlen(param_1)" (identifier "strlen") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (if_statement "if ((1 < sVar3) && (param_1[sVar3 - 1] == '/')) {\n    if (sVar3 - 1 == 1) {\n      sVar3 = 1;\n    }\n    else {\n      cVar1 = param_1[sVar3 - 2];\n      sVar2 = sVar3 - 1;\n      sVar3 = sVar3 - 2;\n      while( true ) {\n        if (cVar1 != '/') {\n          return sVar2;\n        }\n        if (sVar3 == 1) break;\n        cVar1 = param_1[sVar3 - 1];\n        sVar2 = sVar3;\n        sVar3 = sVar3 - 1;\n      }\n    }\n  }" (if "if") (parenthesized_expression "((1 < sVar3) && (param_1[sVar3 - 1] == '/'))" (( "(") (binary_expression "(1 < sVar3) && (param_1[sVar3 - 1] == '/')" (parenthesized_expression "(1 < sVar3)" (( "(") (binary_expression "1 < sVar3" (number_literal "1") (< "<") (identifier "sVar3")) () ")")) (&& "&&") (parenthesized_expression "(param_1[sVar3 - 1] == '/')" (( "(") (binary_expression "param_1[sVar3 - 1] == '/'" (subscript_expression "param_1[sVar3 - 1]" (identifier "param_1") ([ "[") (binary_expression "sVar3 - 1" (identifier "sVar3") (- "-") (number_literal "1")) (] "]")) (== "==") (char_literal "'/'" (' "'") (character "/") (' "'"))) () ")"))) () ")")) (compound_statement "{\n    if (sVar3 - 1 == 1) {\n      sVar3 = 1;\n    }\n    else {\n      cVar1 = param_1[sVar3 - 2];\n      sVar2 = sVar3 - 1;\n      sVar3 = sVar3 - 2;\n      while( true ) {\n        if (cVar1 != '/') {\n          return sVar2;\n        }\n        if (sVar3 == 1) break;\n        cVar1 = param_1[sVar3 - 1];\n        sVar2 = sVar3;\n        sVar3 = sVar3 - 1;\n      }\n    }\n  }" ({ "{") (if_statement "if (sVar3 - 1 == 1) {\n      sVar3 = 1;\n    }\n    else {\n      cVar1 = param_1[sVar3 - 2];\n      sVar2 = sVar3 - 1;\n      sVar3 = sVar3 - 2;\n      while( true ) {\n        if (cVar1 != '/') {\n          return sVar2;\n        }\n        if (sVar3 == 1) break;\n        cVar1 = param_1[sVar3 - 1];\n        sVar2 = sVar3;\n        sVar3 = sVar3 - 1;\n      }\n    }" (if "if") (parenthesized_expression "(sVar3 - 1 == 1)" (( "(") (binary_expression "sVar3 - 1 == 1" (binary_expression "sVar3 - 1" (identifier "sVar3") (- "-") (number_literal "1")) (== "==") (number_literal "1")) () ")")) (compound_statement "{\n      sVar3 = 1;\n    }" ({ "{") (expression_statement "sVar3 = 1;" (assignment_expression "sVar3 = 1" (identifier "sVar3") (= "=") (number_literal "1")) (; ";")) (} "}")) (else_clause "else {\n      cVar1 = param_1[sVar3 - 2];\n      sVar2 = sVar3 - 1;\n      sVar3 = sVar3 - 2;\n      while( true ) {\n        if (cVar1 != '/') {\n          return sVar2;\n        }\n        if (sVar3 == 1) break;\n        cVar1 = param_1[sVar3 - 1];\n        sVar2 = sVar3;\n        sVar3 = sVar3 - 1;\n      }\n    }" (else "else") (compound_statement "{\n      cVar1 = param_1[sVar3 - 2];\n      sVar2 = sVar3 - 1;\n      sVar3 = sVar3 - 2;\n      while( true ) {\n        if (cVar1 != '/') {\n          return sVar2;\n        }\n        if (sVar3 == 1) break;\n        cVar1 = param_1[sVar3 - 1];\n        sVar2 = sVar3;\n        sVar3 = sVar3 - 1;\n      }\n    }" ({ "{") (expression_statement "cVar1 = param_1[sVar3 - 2];" (assignment_expression "cVar1 = param_1[sVar3 - 2]" (identifier "cVar1") (= "=") (subscript_expression "param_1[sVar3 - 2]" (identifier "param_1") ([ "[") (binary_expression "sVar3 - 2" (identifier "sVar3") (- "-") (number_literal "2")) (] "]"))) (; ";")) (expression_statement "sVar2 = sVar3 - 1;" (assignment_expression "sVar2 = sVar3 - 1" (identifier "sVar2") (= "=") (binary_expression "sVar3 - 1" (identifier "sVar3") (- "-") (number_literal "1"))) (; ";")) (expression_statement "sVar3 = sVar3 - 2;" (assignment_expression "sVar3 = sVar3 - 2" (identifier "sVar3") (= "=") (binary_expression "sVar3 - 2" (identifier "sVar3") (- "-") (number_literal "2"))) (; ";")) (while_statement "while( true ) {\n        if (cVar1 != '/') {\n          return sVar2;\n        }\n        if (sVar3 == 1) break;\n        cVar1 = param_1[sVar3 - 1];\n        sVar2 = sVar3;\n        sVar3 = sVar3 - 1;\n      }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n        if (cVar1 != '/') {\n          return sVar2;\n        }\n        if (sVar3 == 1) break;\n        cVar1 = param_1[sVar3 - 1];\n        sVar2 = sVar3;\n        sVar3 = sVar3 - 1;\n      }" ({ "{") (if_statement "if (cVar1 != '/') {\n          return sVar2;\n        }" (if "if") (parenthesized_expression "(cVar1 != '/')" (( "(") (binary_expression "cVar1 != '/'" (identifier "cVar1") (!= "!=") (char_literal "'/'" (' "'") (character "/") (' "'"))) () ")")) (compound_statement "{\n          return sVar2;\n        }" ({ "{") (return_statement "return sVar2;" (return "return") (identifier "sVar2") (; ";")) (} "}"))) (if_statement "if (sVar3 == 1) break;" (if "if") (parenthesized_expression "(sVar3 == 1)" (( "(") (binary_expression "sVar3 == 1" (identifier "sVar3") (== "==") (number_literal "1")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "cVar1 = param_1[sVar3 - 1];" (assignment_expression "cVar1 = param_1[sVar3 - 1]" (identifier "cVar1") (= "=") (subscript_expression "param_1[sVar3 - 1]" (identifier "param_1") ([ "[") (binary_expression "sVar3 - 1" (identifier "sVar3") (- "-") (number_literal "1")) (] "]"))) (; ";")) (expression_statement "sVar2 = sVar3;" (assignment_expression "sVar2 = sVar3" (identifier "sVar2") (= "=") (identifier "sVar3")) (; ";")) (expression_statement "sVar3 = sVar3 - 1;" (assignment_expression "sVar3 = sVar3 - 1" (identifier "sVar3") (= "=") (binary_expression "sVar3 - 1" (identifier "sVar3") (- "-") (number_literal "1"))) (; ";")) (} "}"))) (} "}")))) (} "}"))) (return_statement "return sVar3;" (return "return") (identifier "sVar3") (; ";")) (} "}")))

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

size_t function_1(char *name)

{
  char var_3;
  size_t sVar2;
  size_t var_2;
  
  var_2 = var_1(name);
  if ((1 < var_2) && (name[var_2 - 1] == '/')) {
    if (var_2 - 1 == 1) {
      var_2 = 1;
    }
    else {
      var_3 = name[var_2 - 2];
      sVar2 = var_2 - 1;
      var_2 = var_2 - 2;
      while( true ) {
        if (var_3 != '/') {
          return sVar2;
        }
        if (var_2 == 1) break;
        var_3 = name[var_2 - 1];
        sVar2 = var_2;
        var_2 = var_2 - 1;
      }
    }
  }
  return var_2;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) right: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (binary_expression left: (identifier) right: (number_literal))) right: (char_literal (character)))))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (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)))) (while_statement condition: (parenthesized_expression (true)) body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (character)))) consequence: (compound_statement (return_statement (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (break_statement)) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (binary_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))))))))) (return_statement (identifier)))))

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

size_t MASKED(char *param_1)

{
  char cVar1;
  size_t sVar2;
  size_t sVar3;
  
  sVar3 = strlen(param_1);
  if ((1 < sVar3) && (param_1[sVar3 - 1] == '/')) {
    if (sVar3 - 1 == 1) {
      sVar3 = 1;
    }
    else {
      cVar1 = param_1[sVar3 - 2];
      sVar2 = sVar3 - 1;
      sVar3 = sVar3 - 2;
      while( true ) {
        if (cVar1 != '/') {
          return sVar2;
        }
        if (sVar3 == 1) break;
        cVar1 = param_1[sVar3 - 1];
        sVar2 = sVar3;
        sVar3 = sVar3 - 1;
      }
    }
  }
  return sVar3;
}

