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

_Bool parse_datetime(timespec *result,char *p,timespec *now)

{
  _Bool _Var1;
  char *name;
  timezone_t tzdefault;
  
  _Var1 = false;
  name = getenv("TZ");
  tzdefault = tzalloc(name);
  if (tzdefault != (timezone_t)0x0) {
    _Var1 = parse_datetime2(result,p,now,0,tzdefault,name);
    tzfree(tzdefault);
  }
  return _Var1;
}



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

undefined4 FUN_0001cc60(undefined4 param_1,undefined4 param_2,undefined4 param_3)

{
  char *pcVar1;
  int iVar2;
  undefined4 uVar3;
  
  uVar3 = 0;
  pcVar1 = getenv("TZ");
  iVar2 = FUN_00021f60(pcVar1);
  if (iVar2 != 0) {
    uVar3 = FUN_0001a2c0(param_1,param_2,param_3,0,iVar2,pcVar1);
    FUN_00022170(iVar2);
  }
  return uVar3;
}


PUSH EBP
PUSH EDI
XOR EDI,EDI
PUSH ESI
PUSH EBX
CALL 0x00012e10
ADD EBX,0x15395
SUB ESP,0x18
LEA EAX,[EBX + 0xffff6111]
PUSH EAX
CALL 0x00012200
MOV dword ptr [ESP],EAX
MOV EBP,EAX
CALL 0x00021f60
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0001ccb9
SUB ESP,0x8
MOV ESI,EAX
PUSH EBP
PUSH EAX
PUSH 0x0
PUSH dword ptr [ESP + 0x3c]
PUSH dword ptr [ESP + 0x3c]
PUSH dword ptr [ESP + 0x3c]
CALL 0x0001a2c0
ADD ESP,0x14
PUSH ESI
MOV EDI,EAX
CALL 0x00022170
ADD ESP,0x10
ADD ESP,0xc
MOV EAX,EDI
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 FUN_0001cc60(undefined4 param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  char *pcVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  uVar3 = 0;\n  pcVar1 = getenv("TZ");\n  iVar2 = FUN_00021f60(pcVar1);\n  if (iVar2 != 0) {\n    uVar3 = FUN_0001a2c0(param_1,param_2,param_3,0,iVar2,pcVar1);\n    FUN_00022170(iVar2);\n  }\n  return uVar3;\n}\n\n" comment (function_definition "undefined4 FUN_0001cc60(undefined4 param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  char *pcVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  uVar3 = 0;\n  pcVar1 = getenv("TZ");\n  iVar2 = FUN_00021f60(pcVar1);\n  if (iVar2 != 0) {\n    uVar3 = FUN_0001a2c0(param_1,param_2,param_3,0,iVar2,pcVar1);\n    FUN_00022170(iVar2);\n  }\n  return uVar3;\n}" type_identifier (function_declarator "FUN_0001cc60(undefined4 param_1,undefined4 param_2,undefined4 param_3)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,undefined4 param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  char *pcVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  uVar3 = 0;\n  pcVar1 = getenv("TZ");\n  iVar2 = FUN_00021f60(pcVar1);\n  if (iVar2 != 0) {\n    uVar3 = FUN_0001a2c0(param_1,param_2,param_3,0,iVar2,pcVar1);\n    FUN_00022170(iVar2);\n  }\n  return uVar3;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (expression_statement "pcVar1 = getenv("TZ");" (assignment_expression "pcVar1 = getenv("TZ")" identifier = (call_expression "getenv("TZ")" identifier (argument_list "("TZ")" ( (string_literal ""TZ"" " string_content ") )))) ;) (expression_statement "iVar2 = FUN_00021f60(pcVar1);" (assignment_expression "iVar2 = FUN_00021f60(pcVar1)" identifier = (call_expression "FUN_00021f60(pcVar1)" identifier (argument_list "(pcVar1)" ( identifier )))) ;) (if_statement "if (iVar2 != 0) {\n    uVar3 = FUN_0001a2c0(param_1,param_2,param_3,0,iVar2,pcVar1);\n    FUN_00022170(iVar2);\n  }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n    uVar3 = FUN_0001a2c0(param_1,param_2,param_3,0,iVar2,pcVar1);\n    FUN_00022170(iVar2);\n  }" { (expression_statement "uVar3 = FUN_0001a2c0(param_1,param_2,param_3,0,iVar2,pcVar1);" (assignment_expression "uVar3 = FUN_0001a2c0(param_1,param_2,param_3,0,iVar2,pcVar1)" identifier = (call_expression "FUN_0001a2c0(param_1,param_2,param_3,0,iVar2,pcVar1)" identifier (argument_list "(param_1,param_2,param_3,0,iVar2,pcVar1)" ( identifier , identifier , identifier , number_literal , identifier , identifier )))) ;) (expression_statement "FUN_00022170(iVar2);" (call_expression "FUN_00022170(iVar2)" identifier (argument_list "(iVar2)" ( identifier ))) ;) })) (return_statement "return uVar3;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\n_Bool parse_datetime(timespec *result,char *p,timespec *now)\n\n{\n  _Bool _Var1;\n  char *name;\n  timezone_t tzdefault;\n  \n  _Var1 = false;\n  name = getenv("TZ");\n  tzdefault = tzalloc(name);\n  if (tzdefault != (timezone_t)0x0) {\n    _Var1 = parse_datetime2(result,p,now,0,tzdefault,name);\n    tzfree(tzdefault);\n  }\n  return _Var1;\n}\n\n" comment comment (function_definition "_Bool parse_datetime(timespec *result,char *p,timespec *now)\n\n{\n  _Bool _Var1;\n  char *name;\n  timezone_t tzdefault;\n  \n  _Var1 = false;\n  name = getenv("TZ");\n  tzdefault = tzalloc(name);\n  if (tzdefault != (timezone_t)0x0) {\n    _Var1 = parse_datetime2(result,p,now,0,tzdefault,name);\n    tzfree(tzdefault);\n  }\n  return _Var1;\n}" type_identifier (function_declarator "parse_datetime(timespec *result,char *p,timespec *now)" identifier (parameter_list "(timespec *result,char *p,timespec *now)" ( (parameter_declaration "timespec *result" type_identifier (pointer_declarator "*result" * identifier)) , (parameter_declaration "char *p" primitive_type (pointer_declarator "*p" * identifier)) , (parameter_declaration "timespec *now" type_identifier (pointer_declarator "*now" * identifier)) ))) (compound_statement "{\n  _Bool _Var1;\n  char *name;\n  timezone_t tzdefault;\n  \n  _Var1 = false;\n  name = getenv("TZ");\n  tzdefault = tzalloc(name);\n  if (tzdefault != (timezone_t)0x0) {\n    _Var1 = parse_datetime2(result,p,now,0,tzdefault,name);\n    tzfree(tzdefault);\n  }\n  return _Var1;\n}" { (declaration "_Bool _Var1;" type_identifier identifier ;) (declaration "char *name;" primitive_type (pointer_declarator "*name" * identifier) ;) (declaration "timezone_t tzdefault;" type_identifier identifier ;) (expression_statement "_Var1 = false;" (assignment_expression "_Var1 = false" identifier = false) ;) (expression_statement "name = getenv("TZ");" (assignment_expression "name = getenv("TZ")" identifier = (call_expression "getenv("TZ")" identifier (argument_list "("TZ")" ( (string_literal ""TZ"" " string_content ") )))) ;) (expression_statement "tzdefault = tzalloc(name);" (assignment_expression "tzdefault = tzalloc(name)" identifier = (call_expression "tzalloc(name)" identifier (argument_list "(name)" ( identifier )))) ;) (if_statement "if (tzdefault != (timezone_t)0x0) {\n    _Var1 = parse_datetime2(result,p,now,0,tzdefault,name);\n    tzfree(tzdefault);\n  }" if (parenthesized_expression "(tzdefault != (timezone_t)0x0)" ( (binary_expression "tzdefault != (timezone_t)0x0" identifier != (cast_expression "(timezone_t)0x0" ( (type_descriptor "timezone_t" type_identifier) ) number_literal)) )) (compound_statement "{\n    _Var1 = parse_datetime2(result,p,now,0,tzdefault,name);\n    tzfree(tzdefault);\n  }" { (expression_statement "_Var1 = parse_datetime2(result,p,now,0,tzdefault,name);" (assignment_expression "_Var1 = parse_datetime2(result,p,now,0,tzdefault,name)" identifier = (call_expression "parse_datetime2(result,p,now,0,tzdefault,name)" identifier (argument_list "(result,p,now,0,tzdefault,name)" ( identifier , identifier , identifier , number_literal , identifier , identifier )))) ;) (expression_statement "tzfree(tzdefault);" (call_expression "tzfree(tzdefault)" identifier (argument_list "(tzdefault)" ( identifier ))) ;) })) (return_statement "return _Var1;" return identifier ;) })))
(translation_unit "undefined4 FUN_0001cc60(undefined4 param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  char *pcVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  uVar3 = 0;\n  pcVar1 = getenv("TZ");\n  iVar2 = FUN_00021f60(pcVar1);\n  if (iVar2 != 0) {\n    uVar3 = FUN_0001a2c0(param_1,param_2,param_3,0,iVar2,pcVar1);\n    FUN_00022170(iVar2);\n  }\n  return uVar3;\n}\n\n" (function_definition "undefined4 FUN_0001cc60(undefined4 param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  char *pcVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  uVar3 = 0;\n  pcVar1 = getenv("TZ");\n  iVar2 = FUN_00021f60(pcVar1);\n  if (iVar2 != 0) {\n    uVar3 = FUN_0001a2c0(param_1,param_2,param_3,0,iVar2,pcVar1);\n    FUN_00022170(iVar2);\n  }\n  return uVar3;\n}" type_identifier (function_declarator "FUN_0001cc60(undefined4 param_1,undefined4 param_2,undefined4 param_3)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,undefined4 param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  char *pcVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  uVar3 = 0;\n  pcVar1 = getenv("TZ");\n  iVar2 = FUN_00021f60(pcVar1);\n  if (iVar2 != 0) {\n    uVar3 = FUN_0001a2c0(param_1,param_2,param_3,0,iVar2,pcVar1);\n    FUN_00022170(iVar2);\n  }\n  return uVar3;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (expression_statement "pcVar1 = getenv("TZ");" (assignment_expression "pcVar1 = getenv("TZ")" identifier = (call_expression "getenv("TZ")" identifier (argument_list "("TZ")" ( (string_literal ""TZ"" " string_content ") )))) ;) (expression_statement "iVar2 = FUN_00021f60(pcVar1);" (assignment_expression "iVar2 = FUN_00021f60(pcVar1)" identifier = (call_expression "FUN_00021f60(pcVar1)" identifier (argument_list "(pcVar1)" ( identifier )))) ;) (if_statement "if (iVar2 != 0) {\n    uVar3 = FUN_0001a2c0(param_1,param_2,param_3,0,iVar2,pcVar1);\n    FUN_00022170(iVar2);\n  }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n    uVar3 = FUN_0001a2c0(param_1,param_2,param_3,0,iVar2,pcVar1);\n    FUN_00022170(iVar2);\n  }" { (expression_statement "uVar3 = FUN_0001a2c0(param_1,param_2,param_3,0,iVar2,pcVar1);" (assignment_expression "uVar3 = FUN_0001a2c0(param_1,param_2,param_3,0,iVar2,pcVar1)" identifier = (call_expression "FUN_0001a2c0(param_1,param_2,param_3,0,iVar2,pcVar1)" identifier (argument_list "(param_1,param_2,param_3,0,iVar2,pcVar1)" ( identifier , identifier , identifier , number_literal , identifier , identifier )))) ;) (expression_statement "FUN_00022170(iVar2);" (call_expression "FUN_00022170(iVar2)" identifier (argument_list "(iVar2)" ( identifier ))) ;) })) (return_statement "return uVar3;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , LIT , IDENT , IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (return_statement return IDENT ;) })))
(function_definition "undefined4 FUN_0001cc60(undefined4 param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  char *pcVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  uVar3 = 0;\n  pcVar1 = getenv("TZ");\n  iVar2 = FUN_00021f60(pcVar1);\n  if (iVar2 != 0) {\n    uVar3 = FUN_0001a2c0(param_1,param_2,param_3,0,iVar2,pcVar1);\n    FUN_00022170(iVar2);\n  }\n  return uVar3;\n}" (type_identifier "undefined4") (function_declarator "FUN_0001cc60(undefined4 param_1,undefined4 param_2,undefined4 param_3)" (identifier "FUN_0001cc60") (parameter_list "(undefined4 param_1,undefined4 param_2,undefined4 param_3)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) () ")"))) (compound_statement "{\n  char *pcVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  uVar3 = 0;\n  pcVar1 = getenv("TZ");\n  iVar2 = FUN_00021f60(pcVar1);\n  if (iVar2 != 0) {\n    uVar3 = FUN_0001a2c0(param_1,param_2,param_3,0,iVar2,pcVar1);\n    FUN_00022170(iVar2);\n  }\n  return uVar3;\n}" ({ "{") (declaration "char *pcVar1;" (primitive_type "char") (pointer_declarator "*pcVar1" (* "*") (identifier "pcVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" (identifier "uVar3") (= "=") (number_literal "0")) (; ";")) (expression_statement "pcVar1 = getenv("TZ");" (assignment_expression "pcVar1 = getenv("TZ")" (identifier "pcVar1") (= "=") (call_expression "getenv("TZ")" (identifier "getenv") (argument_list "("TZ")" (( "(") (string_literal ""TZ"" (" """) (string_content "TZ") (" """)) () ")")))) (; ";")) (expression_statement "iVar2 = FUN_00021f60(pcVar1);" (assignment_expression "iVar2 = FUN_00021f60(pcVar1)" (identifier "iVar2") (= "=") (call_expression "FUN_00021f60(pcVar1)" (identifier "FUN_00021f60") (argument_list "(pcVar1)" (( "(") (identifier "pcVar1") () ")")))) (; ";")) (if_statement "if (iVar2 != 0) {\n    uVar3 = FUN_0001a2c0(param_1,param_2,param_3,0,iVar2,pcVar1);\n    FUN_00022170(iVar2);\n  }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    uVar3 = FUN_0001a2c0(param_1,param_2,param_3,0,iVar2,pcVar1);\n    FUN_00022170(iVar2);\n  }" ({ "{") (expression_statement "uVar3 = FUN_0001a2c0(param_1,param_2,param_3,0,iVar2,pcVar1);" (assignment_expression "uVar3 = FUN_0001a2c0(param_1,param_2,param_3,0,iVar2,pcVar1)" (identifier "uVar3") (= "=") (call_expression "FUN_0001a2c0(param_1,param_2,param_3,0,iVar2,pcVar1)" (identifier "FUN_0001a2c0") (argument_list "(param_1,param_2,param_3,0,iVar2,pcVar1)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "param_3") (, ",") (number_literal "0") (, ",") (identifier "iVar2") (, ",") (identifier "pcVar1") () ")")))) (; ";")) (expression_statement "FUN_00022170(iVar2);" (call_expression "FUN_00022170(iVar2)" (identifier "FUN_00022170") (argument_list "(iVar2)" (( "(") (identifier "iVar2") () ")"))) (; ";")) (} "}"))) (return_statement "return uVar3;" (return "return") (identifier "uVar3") (; ";")) (} "}")))

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

type_1 function_1(type_2 *result,char *p,type_2 *now)

{
  type_1 _Var1;
  char *name;
  type_3 var_3;
  
  _Var1 = false;
  name = var_1("TZ");
  var_3 = var_2(name);
  if (var_3 != (type_3)0x0) {
    _Var1 = var_4(result,p,now,0,var_3,name);
    var_5(var_3);
  }
  return _Var1;
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) 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 (string_literal (string_content)))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (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 (identifier) (identifier) (identifier) (number_literal) (identifier) (identifier))))) (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 */

undefined4 MASKED(undefined4 param_1,undefined4 param_2,undefined4 param_3)

{
  char *pcVar1;
  int iVar2;
  undefined4 uVar3;
  
  uVar3 = 0;
  pcVar1 = getenv("TZ");
  iVar2 = FUN_00021f60(pcVar1);
  if (iVar2 != 0) {
    uVar3 = FUN_0001a2c0(param_1,param_2,param_3,0,iVar2,pcVar1);
    FUN_00022170(iVar2);
  }
  return uVar3;
}

