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

size_t base_len(char *name)

{
  size_t sVar1;
  size_t sVar2;
  
  sVar1 = strlen(name);
  sVar2 = sVar1;
  if (1 < sVar1) {
    do {
      sVar1 = sVar2 - 1;
      if (name[sVar2 - 1] != '/') {
        return sVar2;
      }
      sVar2 = sVar1;
    } while (sVar1 != 1);
  }
  return sVar1;
}



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

void FUN_000156a0(char *param_1)

{
  int iVar1;
  size_t sVar2;
  
  sVar2 = strlen(param_1);
  if (1 < sVar2) {
    do {
      iVar1 = sVar2 - 1;
      sVar2 = sVar2 - 1;
      if (param_1[iVar1] != '/') {
        return;
      }
    } while (sVar2 != 1);
  }
  return;
}


PUSH ESI
PUSH EBX
CALL 0x00012eb0
ADD EBX,0xf959
SUB ESP,0x10
MOV ESI,dword ptr [ESP + 0x1c]
PUSH ESI
CALL 0x000122f0
ADD ESP,0x10
CMP EAX,0x1
JBE 0x000156cc
CMP byte ptr [ESI + EAX*0x1 + -0x1],0x2f
LEA EDX,[EAX + -0x1]
JZ 0x000156d8
ADD ESP,0x4
POP EBX
POP ESI
RET
MOV EAX,EDX
CMP EDX,0x1
JNZ 0x000156c2
JMP 0x000156cc
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_000156a0(char *param_1)\n\n{\n  int iVar1;\n  size_t sVar2;\n  \n  sVar2 = strlen(param_1);\n  if (1 < sVar2) {\n    do {\n      iVar1 = sVar2 - 1;\n      sVar2 = sVar2 - 1;\n      if (param_1[iVar1] != '/') {\n        return;\n      }\n    } while (sVar2 != 1);\n  }\n  return;\n}\n\n" comment (function_definition "void FUN_000156a0(char *param_1)\n\n{\n  int iVar1;\n  size_t sVar2;\n  \n  sVar2 = strlen(param_1);\n  if (1 < sVar2) {\n    do {\n      iVar1 = sVar2 - 1;\n      sVar2 = sVar2 - 1;\n      if (param_1[iVar1] != '/') {\n        return;\n      }\n    } while (sVar2 != 1);\n  }\n  return;\n}" primitive_type (function_declarator "FUN_000156a0(char *param_1)" identifier (parameter_list "(char *param_1)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  size_t sVar2;\n  \n  sVar2 = strlen(param_1);\n  if (1 < sVar2) {\n    do {\n      iVar1 = sVar2 - 1;\n      sVar2 = sVar2 - 1;\n      if (param_1[iVar1] != '/') {\n        return;\n      }\n    } while (sVar2 != 1);\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (expression_statement "sVar2 = strlen(param_1);" (assignment_expression "sVar2 = strlen(param_1)" identifier = (call_expression "strlen(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (1 < sVar2) {\n    do {\n      iVar1 = sVar2 - 1;\n      sVar2 = sVar2 - 1;\n      if (param_1[iVar1] != '/') {\n        return;\n      }\n    } while (sVar2 != 1);\n  }" if (parenthesized_expression "(1 < sVar2)" ( (binary_expression "1 < sVar2" number_literal < identifier) )) (compound_statement "{\n    do {\n      iVar1 = sVar2 - 1;\n      sVar2 = sVar2 - 1;\n      if (param_1[iVar1] != '/') {\n        return;\n      }\n    } while (sVar2 != 1);\n  }" { (do_statement "do {\n      iVar1 = sVar2 - 1;\n      sVar2 = sVar2 - 1;\n      if (param_1[iVar1] != '/') {\n        return;\n      }\n    } while (sVar2 != 1);" do (compound_statement "{\n      iVar1 = sVar2 - 1;\n      sVar2 = sVar2 - 1;\n      if (param_1[iVar1] != '/') {\n        return;\n      }\n    }" { (expression_statement "iVar1 = sVar2 - 1;" (assignment_expression "iVar1 = sVar2 - 1" identifier = (binary_expression "sVar2 - 1" identifier - number_literal)) ;) (expression_statement "sVar2 = sVar2 - 1;" (assignment_expression "sVar2 = sVar2 - 1" identifier = (binary_expression "sVar2 - 1" identifier - number_literal)) ;) (if_statement "if (param_1[iVar1] != '/') {\n        return;\n      }" if (parenthesized_expression "(param_1[iVar1] != '/')" ( (binary_expression "param_1[iVar1] != '/'" (subscript_expression "param_1[iVar1]" identifier [ identifier ]) != (char_literal "'/'" ' character ')) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) })) }) while (parenthesized_expression "(sVar2 != 1)" ( (binary_expression "sVar2 != 1" identifier != number_literal) )) ;) })) (return_statement "return;" return ;) })))
(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  size_t sVar1;\n  size_t sVar2;\n  \n  sVar1 = strlen(name);\n  sVar2 = sVar1;\n  if (1 < sVar1) {\n    do {\n      sVar1 = sVar2 - 1;\n      if (name[sVar2 - 1] != '/') {\n        return sVar2;\n      }\n      sVar2 = sVar1;\n    } while (sVar1 != 1);\n  }\n  return sVar1;\n}\n\n" comment comment (function_definition "size_t base_len(char *name)\n\n{\n  size_t sVar1;\n  size_t sVar2;\n  \n  sVar1 = strlen(name);\n  sVar2 = sVar1;\n  if (1 < sVar1) {\n    do {\n      sVar1 = sVar2 - 1;\n      if (name[sVar2 - 1] != '/') {\n        return sVar2;\n      }\n      sVar2 = sVar1;\n    } while (sVar1 != 1);\n  }\n  return sVar1;\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  size_t sVar1;\n  size_t sVar2;\n  \n  sVar1 = strlen(name);\n  sVar2 = sVar1;\n  if (1 < sVar1) {\n    do {\n      sVar1 = sVar2 - 1;\n      if (name[sVar2 - 1] != '/') {\n        return sVar2;\n      }\n      sVar2 = sVar1;\n    } while (sVar1 != 1);\n  }\n  return sVar1;\n}" { (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (expression_statement "sVar1 = strlen(name);" (assignment_expression "sVar1 = strlen(name)" identifier = (call_expression "strlen(name)" identifier (argument_list "(name)" ( identifier )))) ;) (expression_statement "sVar2 = sVar1;" (assignment_expression "sVar2 = sVar1" identifier = identifier) ;) (if_statement "if (1 < sVar1) {\n    do {\n      sVar1 = sVar2 - 1;\n      if (name[sVar2 - 1] != '/') {\n        return sVar2;\n      }\n      sVar2 = sVar1;\n    } while (sVar1 != 1);\n  }" if (parenthesized_expression "(1 < sVar1)" ( (binary_expression "1 < sVar1" number_literal < identifier) )) (compound_statement "{\n    do {\n      sVar1 = sVar2 - 1;\n      if (name[sVar2 - 1] != '/') {\n        return sVar2;\n      }\n      sVar2 = sVar1;\n    } while (sVar1 != 1);\n  }" { (do_statement "do {\n      sVar1 = sVar2 - 1;\n      if (name[sVar2 - 1] != '/') {\n        return sVar2;\n      }\n      sVar2 = sVar1;\n    } while (sVar1 != 1);" do (compound_statement "{\n      sVar1 = sVar2 - 1;\n      if (name[sVar2 - 1] != '/') {\n        return sVar2;\n      }\n      sVar2 = sVar1;\n    }" { (expression_statement "sVar1 = sVar2 - 1;" (assignment_expression "sVar1 = sVar2 - 1" identifier = (binary_expression "sVar2 - 1" identifier - number_literal)) ;) (if_statement "if (name[sVar2 - 1] != '/') {\n        return sVar2;\n      }" if (parenthesized_expression "(name[sVar2 - 1] != '/')" ( (binary_expression "name[sVar2 - 1] != '/'" (subscript_expression "name[sVar2 - 1]" identifier [ (binary_expression "sVar2 - 1" identifier - number_literal) ]) != (char_literal "'/'" ' character ')) )) (compound_statement "{\n        return sVar2;\n      }" { (return_statement "return sVar2;" return identifier ;) })) (expression_statement "sVar2 = sVar1;" (assignment_expression "sVar2 = sVar1" identifier = identifier) ;) }) while (parenthesized_expression "(sVar1 != 1)" ( (binary_expression "sVar1 != 1" identifier != number_literal) )) ;) })) (return_statement "return sVar1;" return identifier ;) })))
(translation_unit "void FUN_000156a0(char *param_1)\n\n{\n  int iVar1;\n  size_t sVar2;\n  \n  sVar2 = strlen(param_1);\n  if (1 < sVar2) {\n    do {\n      iVar1 = sVar2 - 1;\n      sVar2 = sVar2 - 1;\n      if (param_1[iVar1] != '/') {\n        return;\n      }\n    } while (sVar2 != 1);\n  }\n  return;\n}\n\n" (function_definition "void FUN_000156a0(char *param_1)\n\n{\n  int iVar1;\n  size_t sVar2;\n  \n  sVar2 = strlen(param_1);\n  if (1 < sVar2) {\n    do {\n      iVar1 = sVar2 - 1;\n      sVar2 = sVar2 - 1;\n      if (param_1[iVar1] != '/') {\n        return;\n      }\n    } while (sVar2 != 1);\n  }\n  return;\n}" primitive_type (function_declarator "FUN_000156a0(char *param_1)" identifier (parameter_list "(char *param_1)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  size_t sVar2;\n  \n  sVar2 = strlen(param_1);\n  if (1 < sVar2) {\n    do {\n      iVar1 = sVar2 - 1;\n      sVar2 = sVar2 - 1;\n      if (param_1[iVar1] != '/') {\n        return;\n      }\n    } while (sVar2 != 1);\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (expression_statement "sVar2 = strlen(param_1);" (assignment_expression "sVar2 = strlen(param_1)" identifier = (call_expression "strlen(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (1 < sVar2) {\n    do {\n      iVar1 = sVar2 - 1;\n      sVar2 = sVar2 - 1;\n      if (param_1[iVar1] != '/') {\n        return;\n      }\n    } while (sVar2 != 1);\n  }" if (parenthesized_expression "(1 < sVar2)" ( (binary_expression "1 < sVar2" number_literal < identifier) )) (compound_statement "{\n    do {\n      iVar1 = sVar2 - 1;\n      sVar2 = sVar2 - 1;\n      if (param_1[iVar1] != '/') {\n        return;\n      }\n    } while (sVar2 != 1);\n  }" { (do_statement "do {\n      iVar1 = sVar2 - 1;\n      sVar2 = sVar2 - 1;\n      if (param_1[iVar1] != '/') {\n        return;\n      }\n    } while (sVar2 != 1);" do (compound_statement "{\n      iVar1 = sVar2 - 1;\n      sVar2 = sVar2 - 1;\n      if (param_1[iVar1] != '/') {\n        return;\n      }\n    }" { (expression_statement "iVar1 = sVar2 - 1;" (assignment_expression "iVar1 = sVar2 - 1" identifier = (binary_expression "sVar2 - 1" identifier - number_literal)) ;) (expression_statement "sVar2 = sVar2 - 1;" (assignment_expression "sVar2 = sVar2 - 1" identifier = (binary_expression "sVar2 - 1" identifier - number_literal)) ;) (if_statement "if (param_1[iVar1] != '/') {\n        return;\n      }" if (parenthesized_expression "(param_1[iVar1] != '/')" ( (binary_expression "param_1[iVar1] != '/'" (subscript_expression "param_1[iVar1]" identifier [ identifier ]) != (char_literal "'/'" ' character ')) )) (compound_statement "{\n        return;\n      }" { (return_statement "return;" return ;) })) }) while (parenthesized_expression "(sVar2 != 1)" ( (binary_expression "sVar2 != 1" identifier != number_literal) )) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT - LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ IDENT ]) != (char_literal ' character ')) )) (compound_statement { (return_statement return ;) })) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) })) (return_statement return ;) })))
(function_definition "void FUN_000156a0(char *param_1)\n\n{\n  int iVar1;\n  size_t sVar2;\n  \n  sVar2 = strlen(param_1);\n  if (1 < sVar2) {\n    do {\n      iVar1 = sVar2 - 1;\n      sVar2 = sVar2 - 1;\n      if (param_1[iVar1] != '/') {\n        return;\n      }\n    } while (sVar2 != 1);\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_000156a0(char *param_1)" (identifier "FUN_000156a0") (parameter_list "(char *param_1)" (( "(") (parameter_declaration "char *param_1" (primitive_type "char") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  int iVar1;\n  size_t sVar2;\n  \n  sVar2 = strlen(param_1);\n  if (1 < sVar2) {\n    do {\n      iVar1 = sVar2 - 1;\n      sVar2 = sVar2 - 1;\n      if (param_1[iVar1] != '/') {\n        return;\n      }\n    } while (sVar2 != 1);\n  }\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "size_t sVar2;" (primitive_type "size_t") (identifier "sVar2") (; ";")) (expression_statement "sVar2 = strlen(param_1);" (assignment_expression "sVar2 = strlen(param_1)" (identifier "sVar2") (= "=") (call_expression "strlen(param_1)" (identifier "strlen") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (if_statement "if (1 < sVar2) {\n    do {\n      iVar1 = sVar2 - 1;\n      sVar2 = sVar2 - 1;\n      if (param_1[iVar1] != '/') {\n        return;\n      }\n    } while (sVar2 != 1);\n  }" (if "if") (parenthesized_expression "(1 < sVar2)" (( "(") (binary_expression "1 < sVar2" (number_literal "1") (< "<") (identifier "sVar2")) () ")")) (compound_statement "{\n    do {\n      iVar1 = sVar2 - 1;\n      sVar2 = sVar2 - 1;\n      if (param_1[iVar1] != '/') {\n        return;\n      }\n    } while (sVar2 != 1);\n  }" ({ "{") (do_statement "do {\n      iVar1 = sVar2 - 1;\n      sVar2 = sVar2 - 1;\n      if (param_1[iVar1] != '/') {\n        return;\n      }\n    } while (sVar2 != 1);" (do "do") (compound_statement "{\n      iVar1 = sVar2 - 1;\n      sVar2 = sVar2 - 1;\n      if (param_1[iVar1] != '/') {\n        return;\n      }\n    }" ({ "{") (expression_statement "iVar1 = sVar2 - 1;" (assignment_expression "iVar1 = sVar2 - 1" (identifier "iVar1") (= "=") (binary_expression "sVar2 - 1" (identifier "sVar2") (- "-") (number_literal "1"))) (; ";")) (expression_statement "sVar2 = sVar2 - 1;" (assignment_expression "sVar2 = sVar2 - 1" (identifier "sVar2") (= "=") (binary_expression "sVar2 - 1" (identifier "sVar2") (- "-") (number_literal "1"))) (; ";")) (if_statement "if (param_1[iVar1] != '/') {\n        return;\n      }" (if "if") (parenthesized_expression "(param_1[iVar1] != '/')" (( "(") (binary_expression "param_1[iVar1] != '/'" (subscript_expression "param_1[iVar1]" (identifier "param_1") ([ "[") (identifier "iVar1") (] "]")) (!= "!=") (char_literal "'/'" (' "'") (character "/") (' "'"))) () ")")) (compound_statement "{\n        return;\n      }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (} "}")) (while "while") (parenthesized_expression "(sVar2 != 1)" (( "(") (binary_expression "sVar2 != 1" (identifier "sVar2") (!= "!=") (number_literal "1")) () ")")) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

size_t function_1(char *name)

{
  size_t var_2;
  size_t var_3;
  
  var_2 = var_1(name);
  var_3 = var_2;
  if (1 < var_2) {
    do {
      var_2 = var_3 - 1;
      if (name[var_3 - 1] != '/') {
        return var_3;
      }
      var_3 = var_2;
    } while (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)) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (do_statement 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: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (identifier)) right: (char_literal (character)))) consequence: (compound_statement (return_statement)))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) (return_statement))))

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

void MASKED(char *param_1)

{
  int iVar1;
  size_t sVar2;
  
  sVar2 = strlen(param_1);
  if (1 < sVar2) {
    do {
      iVar1 = sVar2 - 1;
      sVar2 = sVar2 - 1;
      if (param_1[iVar1] != '/') {
        return;
      }
    } while (sVar2 != 1);
  }
  return;
}

