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

char * xgetcwd(void)

{
  char *pcVar1;
  int *piVar2;
  
  pcVar1 = rpl_getcwd((char *)0x0,0);
  if (pcVar1 == (char *)0x0) {
    piVar2 = __errno_location();
    if (*piVar2 == 0xc) {
                    /* WARNING: Subroutine does not return */
      xalloc_die();
    }
  }
  return pcVar1;
}



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

int FUN_000168c0(void)

{
  int iVar1;
  int *piVar2;
  undefined4 uVar3;
  
  uVar3 = 0x168c7;
  iVar1 = FUN_00016900(0,0);
  if (iVar1 == 0) {
    piVar2 = __errno_location();
    if (*piVar2 == 0xc) {
                    /* WARNING: Subroutine does not return */
      FUN_00016880(uVar3);
    }
  }
  return iVar1;
}


PUSH ESI
PUSH EBX
CALL 0x00011970
ADD EBX,0x8739
SUB ESP,0xc
PUSH 0x0
PUSH 0x0
CALL 0x00016900
ADD ESP,0x10
MOV ESI,EAX
TEST EAX,EAX
JZ 0x000168f0
ADD ESP,0x4
MOV EAX,ESI
POP EBX
POP ESI
RET
CALL 0x00011270
CMP dword ptr [EAX],0xc
JNZ 0x000168e2
CALL 0x00016880
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint FUN_000168c0(void)\n\n{\n  int iVar1;\n  int *piVar2;\n  undefined4 uVar3;\n  \n  uVar3 = 0x168c7;\n  iVar1 = FUN_00016900(0,0);\n  if (iVar1 == 0) {\n    piVar2 = __errno_location();\n    if (*piVar2 == 0xc) {\n                    /* WARNING: Subroutine does not return */\n      FUN_00016880(uVar3);\n    }\n  }\n  return iVar1;\n}\n\n" comment (function_definition "int FUN_000168c0(void)\n\n{\n  int iVar1;\n  int *piVar2;\n  undefined4 uVar3;\n  \n  uVar3 = 0x168c7;\n  iVar1 = FUN_00016900(0,0);\n  if (iVar1 == 0) {\n    piVar2 = __errno_location();\n    if (*piVar2 == 0xc) {\n                    /* WARNING: Subroutine does not return */\n      FUN_00016880(uVar3);\n    }\n  }\n  return iVar1;\n}" primitive_type (function_declarator "FUN_000168c0(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  undefined4 uVar3;\n  \n  uVar3 = 0x168c7;\n  iVar1 = FUN_00016900(0,0);\n  if (iVar1 == 0) {\n    piVar2 = __errno_location();\n    if (*piVar2 == 0xc) {\n                    /* WARNING: Subroutine does not return */\n      FUN_00016880(uVar3);\n    }\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (expression_statement "uVar3 = 0x168c7;" (assignment_expression "uVar3 = 0x168c7" identifier = number_literal) ;) (expression_statement "iVar1 = FUN_00016900(0,0);" (assignment_expression "iVar1 = FUN_00016900(0,0)" identifier = (call_expression "FUN_00016900(0,0)" identifier (argument_list "(0,0)" ( number_literal , number_literal )))) ;) (if_statement "if (iVar1 == 0) {\n    piVar2 = __errno_location();\n    if (*piVar2 == 0xc) {\n                    /* WARNING: Subroutine does not return */\n      FUN_00016880(uVar3);\n    }\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    piVar2 = __errno_location();\n    if (*piVar2 == 0xc) {\n                    /* WARNING: Subroutine does not return */\n      FUN_00016880(uVar3);\n    }\n  }" { (expression_statement "piVar2 = __errno_location();" (assignment_expression "piVar2 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (if_statement "if (*piVar2 == 0xc) {\n                    /* WARNING: Subroutine does not return */\n      FUN_00016880(uVar3);\n    }" if (parenthesized_expression "(*piVar2 == 0xc)" ( (binary_expression "*piVar2 == 0xc" (pointer_expression "*piVar2" * identifier) == number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n      FUN_00016880(uVar3);\n    }" { comment (expression_statement "FUN_00016880(uVar3);" (call_expression "FUN_00016880(uVar3)" identifier (argument_list "(uVar3)" ( identifier ))) ;) })) })) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nchar * xgetcwd(void)\n\n{\n  char *pcVar1;\n  int *piVar2;\n  \n  pcVar1 = rpl_getcwd((char *)0x0,0);\n  if (pcVar1 == (char *)0x0) {\n    piVar2 = __errno_location();\n    if (*piVar2 == 0xc) {\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }\n  }\n  return pcVar1;\n}\n\n" comment comment (function_definition "char * xgetcwd(void)\n\n{\n  char *pcVar1;\n  int *piVar2;\n  \n  pcVar1 = rpl_getcwd((char *)0x0,0);\n  if (pcVar1 == (char *)0x0) {\n    piVar2 = __errno_location();\n    if (*piVar2 == 0xc) {\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }\n  }\n  return pcVar1;\n}" primitive_type (pointer_declarator "* xgetcwd(void)" * (function_declarator "xgetcwd(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) )))) (compound_statement "{\n  char *pcVar1;\n  int *piVar2;\n  \n  pcVar1 = rpl_getcwd((char *)0x0,0);\n  if (pcVar1 == (char *)0x0) {\n    piVar2 = __errno_location();\n    if (*piVar2 == 0xc) {\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }\n  }\n  return pcVar1;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (expression_statement "pcVar1 = rpl_getcwd((char *)0x0,0);" (assignment_expression "pcVar1 = rpl_getcwd((char *)0x0,0)" identifier = (call_expression "rpl_getcwd((char *)0x0,0)" identifier (argument_list "((char *)0x0,0)" ( (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) , number_literal )))) ;) (if_statement "if (pcVar1 == (char *)0x0) {\n    piVar2 = __errno_location();\n    if (*piVar2 == 0xc) {\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }\n  }" if (parenthesized_expression "(pcVar1 == (char *)0x0)" ( (binary_expression "pcVar1 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    piVar2 = __errno_location();\n    if (*piVar2 == 0xc) {\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }\n  }" { (expression_statement "piVar2 = __errno_location();" (assignment_expression "piVar2 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (if_statement "if (*piVar2 == 0xc) {\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }" if (parenthesized_expression "(*piVar2 == 0xc)" ( (binary_expression "*piVar2 == 0xc" (pointer_expression "*piVar2" * identifier) == number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n      xalloc_die();\n    }" { comment (expression_statement "xalloc_die();" (call_expression "xalloc_die()" identifier (argument_list "()" ( ))) ;) })) })) (return_statement "return pcVar1;" return identifier ;) })))
(translation_unit "int FUN_000168c0(void)\n\n{\n  int iVar1;\n  int *piVar2;\n  undefined4 uVar3;\n  \n  uVar3 = 0x168c7;\n  iVar1 = FUN_00016900(0,0);\n  if (iVar1 == 0) {\n    piVar2 = __errno_location();\n    if (*piVar2 == 0xc) {\n                    \n      FUN_00016880(uVar3);\n    }\n  }\n  return iVar1;\n}\n\n" (function_definition "int FUN_000168c0(void)\n\n{\n  int iVar1;\n  int *piVar2;\n  undefined4 uVar3;\n  \n  uVar3 = 0x168c7;\n  iVar1 = FUN_00016900(0,0);\n  if (iVar1 == 0) {\n    piVar2 = __errno_location();\n    if (*piVar2 == 0xc) {\n                    \n      FUN_00016880(uVar3);\n    }\n  }\n  return iVar1;\n}" primitive_type (function_declarator "FUN_000168c0(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  undefined4 uVar3;\n  \n  uVar3 = 0x168c7;\n  iVar1 = FUN_00016900(0,0);\n  if (iVar1 == 0) {\n    piVar2 = __errno_location();\n    if (*piVar2 == 0xc) {\n                    \n      FUN_00016880(uVar3);\n    }\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (expression_statement "uVar3 = 0x168c7;" (assignment_expression "uVar3 = 0x168c7" identifier = number_literal) ;) (expression_statement "iVar1 = FUN_00016900(0,0);" (assignment_expression "iVar1 = FUN_00016900(0,0)" identifier = (call_expression "FUN_00016900(0,0)" identifier (argument_list "(0,0)" ( number_literal , number_literal )))) ;) (if_statement "if (iVar1 == 0) {\n    piVar2 = __errno_location();\n    if (*piVar2 == 0xc) {\n                    \n      FUN_00016880(uVar3);\n    }\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    piVar2 = __errno_location();\n    if (*piVar2 == 0xc) {\n                    \n      FUN_00016880(uVar3);\n    }\n  }" { (expression_statement "piVar2 = __errno_location();" (assignment_expression "piVar2 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (if_statement "if (*piVar2 == 0xc) {\n                    \n      FUN_00016880(uVar3);\n    }" if (parenthesized_expression "(*piVar2 == 0xc)" ( (binary_expression "*piVar2 == 0xc" (pointer_expression "*piVar2" * identifier) == number_literal) )) (compound_statement "{\n                    \n      FUN_00016880(uVar3);\n    }" { (expression_statement "FUN_00016880(uVar3);" (call_expression "FUN_00016880(uVar3)" identifier (argument_list "(uVar3)" ( identifier ))) ;) })) })) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) })) (return_statement return IDENT ;) })))
(function_definition "int FUN_000168c0(void)\n\n{\n  int iVar1;\n  int *piVar2;\n  undefined4 uVar3;\n  \n  uVar3 = 0x168c7;\n  iVar1 = FUN_00016900(0,0);\n  if (iVar1 == 0) {\n    piVar2 = __errno_location();\n    if (*piVar2 == 0xc) {\n                    \n      FUN_00016880(uVar3);\n    }\n  }\n  return iVar1;\n}" (primitive_type "int") (function_declarator "FUN_000168c0(void)" (identifier "FUN_000168c0") (parameter_list "(void)" (( "(") (parameter_declaration "void" (primitive_type "void")) () ")"))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  undefined4 uVar3;\n  \n  uVar3 = 0x168c7;\n  iVar1 = FUN_00016900(0,0);\n  if (iVar1 == 0) {\n    piVar2 = __errno_location();\n    if (*piVar2 == 0xc) {\n                    \n      FUN_00016880(uVar3);\n    }\n  }\n  return iVar1;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (expression_statement "uVar3 = 0x168c7;" (assignment_expression "uVar3 = 0x168c7" (identifier "uVar3") (= "=") (number_literal "0x168c7")) (; ";")) (expression_statement "iVar1 = FUN_00016900(0,0);" (assignment_expression "iVar1 = FUN_00016900(0,0)" (identifier "iVar1") (= "=") (call_expression "FUN_00016900(0,0)" (identifier "FUN_00016900") (argument_list "(0,0)" (( "(") (number_literal "0") (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n    piVar2 = __errno_location();\n    if (*piVar2 == 0xc) {\n                    \n      FUN_00016880(uVar3);\n    }\n  }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    piVar2 = __errno_location();\n    if (*piVar2 == 0xc) {\n                    \n      FUN_00016880(uVar3);\n    }\n  }" ({ "{") (expression_statement "piVar2 = __errno_location();" (assignment_expression "piVar2 = __errno_location()" (identifier "piVar2") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (*piVar2 == 0xc) {\n                    \n      FUN_00016880(uVar3);\n    }" (if "if") (parenthesized_expression "(*piVar2 == 0xc)" (( "(") (binary_expression "*piVar2 == 0xc" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (== "==") (number_literal "0xc")) () ")")) (compound_statement "{\n                    \n      FUN_00016880(uVar3);\n    }" ({ "{") (expression_statement "FUN_00016880(uVar3);" (call_expression "FUN_00016880(uVar3)" (identifier "FUN_00016880") (argument_list "(uVar3)" (( "(") (identifier "uVar3") () ")"))) (; ";")) (} "}"))) (} "}"))) (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}")))

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

char * function_1(void)

{
  char *var_2;
  int *piVar2;
  
  var_2 = var_1((char *)0x0,0);
  if (var_2 == (char *)0x0) {
    piVar2 = var_3();
    if (*piVar2 == 0xc) {
                    /* WARNING: Subroutine does not return */
      var_4();
    }
  }
  return var_2;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal) (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))))))) (return_statement (identifier)))))

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

int MASKED(void)

{
  int iVar1;
  int *piVar2;
  undefined4 uVar3;
  
  uVar3 = 0x168c7;
  iVar1 = FUN_00016900(0,0);
  if (iVar1 == 0) {
    piVar2 = __errno_location();
    if (*piVar2 == 0xc) {
                    /* WARNING: Subroutine does not return */
      FUN_00016880(uVar3);
    }
  }
  return iVar1;
}

