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

tm * localtime_rz(timezone_t tz,time_t *t,tm *tm)

{
  _Bool _Var1;
  timezone_t tz_00;
  tm *ptVar2;
  
  if (tz == (timezone_t)0x0) {
    ptVar2 = gmtime_r(t,(tm *)tm);
    return (tm *)ptVar2;
  }
  tz_00 = set_tz(tz);
  if (tz_00 != (timezone_t)0x0) {
    ptVar2 = localtime_r(t,(tm *)tm);
    if ((ptVar2 == (tm *)0x0) || (_Var1 = save_abbr(tz,tm), !_Var1)) {
      if (tz_00 != (timezone_t)0x1) {
        revert_tz(tz_00);
      }
    }
    else if ((tz_00 == (timezone_t)0x1) || (_Var1 = revert_tz(tz_00), _Var1)) {
      return tm;
    }
  }
  return (tm *)0x0;
}



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

tm * FUN_0001dd60(int param_1,time_t *param_2,tm *param_3)

{
  char cVar1;
  int iVar2;
  tm *ptVar3;
  
  if (param_1 == 0) {
    ptVar3 = gmtime_r(param_2,param_3);
    return ptVar3;
  }
  iVar2 = FUN_0001dc10();
  if (iVar2 != 0) {
    ptVar3 = localtime_r(param_2,param_3);
    if ((ptVar3 == (tm *)0x0) || (cVar1 = FUN_0001da70(), cVar1 == '\0')) {
      if (iVar2 != 1) {
        FUN_0001dcf0();
      }
    }
    else if ((iVar2 == 1) || (cVar1 = FUN_0001dcf0(), cVar1 != '\0')) {
      return param_3;
    }
  }
  return (tm *)0x0;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00012eb0
ADD EBX,0xa297
SUB ESP,0xc
MOV EDI,dword ptr [ESP + 0x20]
MOV ESI,dword ptr [ESP + 0x28]
TEST EDI,EDI
JZ 0x0001ddf0
MOV EAX,EDI
CALL 0x0001dc10
MOV EBP,EAX
TEST EAX,EAX
JZ 0x0001ddcc
SUB ESP,0x8
PUSH ESI
PUSH dword ptr [ESP + 0x30]
CALL 0x00012490
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0001ddc0
MOV EDX,ESI
MOV EAX,EDI
CALL 0x0001da70
TEST AL,AL
JZ 0x0001ddc0
CMP EBP,0x1
JNZ 0x0001dde0
MOV EAX,ESI
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
CMP EBP,0x1
JZ 0x0001ddcc
MOV EAX,EBP
CALL 0x0001dcf0
ADD ESP,0xc
XOR EAX,EAX
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EAX,EBP
CALL 0x0001dcf0
TEST AL,AL
JZ 0x0001ddcc
MOV EAX,ESI
JMP 0x0001ddb3
SUB ESP,0x8
PUSH ESI
PUSH dword ptr [ESP + 0x30]
CALL 0x000124a0
ADD ESP,0x10
ADD ESP,0xc
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\ntm * FUN_0001dd60(int param_1,time_t *param_2,tm *param_3)\n\n{\n  char cVar1;\n  int iVar2;\n  tm *ptVar3;\n  \n  if (param_1 == 0) {\n    ptVar3 = gmtime_r(param_2,param_3);\n    return ptVar3;\n  }\n  iVar2 = FUN_0001dc10();\n  if (iVar2 != 0) {\n    ptVar3 = localtime_r(param_2,param_3);\n    if ((ptVar3 == (tm *)0x0) || (cVar1 = FUN_0001da70(), cVar1 == '\0')) {\n      if (iVar2 != 1) {\n        FUN_0001dcf0();\n      }\n    }\n    else if ((iVar2 == 1) || (cVar1 = FUN_0001dcf0(), cVar1 != '\0')) {\n      return param_3;\n    }\n  }\n  return (tm *)0x0;\n}\n\n" comment (function_definition "tm * FUN_0001dd60(int param_1,time_t *param_2,tm *param_3)\n\n{\n  char cVar1;\n  int iVar2;\n  tm *ptVar3;\n  \n  if (param_1 == 0) {\n    ptVar3 = gmtime_r(param_2,param_3);\n    return ptVar3;\n  }\n  iVar2 = FUN_0001dc10();\n  if (iVar2 != 0) {\n    ptVar3 = localtime_r(param_2,param_3);\n    if ((ptVar3 == (tm *)0x0) || (cVar1 = FUN_0001da70(), cVar1 == '\0')) {\n      if (iVar2 != 1) {\n        FUN_0001dcf0();\n      }\n    }\n    else if ((iVar2 == 1) || (cVar1 = FUN_0001dcf0(), cVar1 != '\0')) {\n      return param_3;\n    }\n  }\n  return (tm *)0x0;\n}" type_identifier (pointer_declarator "* FUN_0001dd60(int param_1,time_t *param_2,tm *param_3)" * (function_declarator "FUN_0001dd60(int param_1,time_t *param_2,tm *param_3)" identifier (parameter_list "(int param_1,time_t *param_2,tm *param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "time_t *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "tm *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) )))) (compound_statement "{\n  char cVar1;\n  int iVar2;\n  tm *ptVar3;\n  \n  if (param_1 == 0) {\n    ptVar3 = gmtime_r(param_2,param_3);\n    return ptVar3;\n  }\n  iVar2 = FUN_0001dc10();\n  if (iVar2 != 0) {\n    ptVar3 = localtime_r(param_2,param_3);\n    if ((ptVar3 == (tm *)0x0) || (cVar1 = FUN_0001da70(), cVar1 == '\0')) {\n      if (iVar2 != 1) {\n        FUN_0001dcf0();\n      }\n    }\n    else if ((iVar2 == 1) || (cVar1 = FUN_0001dcf0(), cVar1 != '\0')) {\n      return param_3;\n    }\n  }\n  return (tm *)0x0;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "tm *ptVar3;" type_identifier (pointer_declarator "*ptVar3" * identifier) ;) (if_statement "if (param_1 == 0) {\n    ptVar3 = gmtime_r(param_2,param_3);\n    return ptVar3;\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n    ptVar3 = gmtime_r(param_2,param_3);\n    return ptVar3;\n  }" { (expression_statement "ptVar3 = gmtime_r(param_2,param_3);" (assignment_expression "ptVar3 = gmtime_r(param_2,param_3)" identifier = (call_expression "gmtime_r(param_2,param_3)" identifier (argument_list "(param_2,param_3)" ( identifier , identifier )))) ;) (return_statement "return ptVar3;" return identifier ;) })) (expression_statement "iVar2 = FUN_0001dc10();" (assignment_expression "iVar2 = FUN_0001dc10()" identifier = (call_expression "FUN_0001dc10()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar2 != 0) {\n    ptVar3 = localtime_r(param_2,param_3);\n    if ((ptVar3 == (tm *)0x0) || (cVar1 = FUN_0001da70(), cVar1 == '\0')) {\n      if (iVar2 != 1) {\n        FUN_0001dcf0();\n      }\n    }\n    else if ((iVar2 == 1) || (cVar1 = FUN_0001dcf0(), cVar1 != '\0')) {\n      return param_3;\n    }\n  }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n    ptVar3 = localtime_r(param_2,param_3);\n    if ((ptVar3 == (tm *)0x0) || (cVar1 = FUN_0001da70(), cVar1 == '\0')) {\n      if (iVar2 != 1) {\n        FUN_0001dcf0();\n      }\n    }\n    else if ((iVar2 == 1) || (cVar1 = FUN_0001dcf0(), cVar1 != '\0')) {\n      return param_3;\n    }\n  }" { (expression_statement "ptVar3 = localtime_r(param_2,param_3);" (assignment_expression "ptVar3 = localtime_r(param_2,param_3)" identifier = (call_expression "localtime_r(param_2,param_3)" identifier (argument_list "(param_2,param_3)" ( identifier , identifier )))) ;) (if_statement "if ((ptVar3 == (tm *)0x0) || (cVar1 = FUN_0001da70(), cVar1 == '\0')) {\n      if (iVar2 != 1) {\n        FUN_0001dcf0();\n      }\n    }\n    else if ((iVar2 == 1) || (cVar1 = FUN_0001dcf0(), cVar1 != '\0')) {\n      return param_3;\n    }" if (parenthesized_expression "((ptVar3 == (tm *)0x0) || (cVar1 = FUN_0001da70(), cVar1 == '\0'))" ( (binary_expression "(ptVar3 == (tm *)0x0) || (cVar1 = FUN_0001da70(), cVar1 == '\0')" (parenthesized_expression "(ptVar3 == (tm *)0x0)" ( (binary_expression "ptVar3 == (tm *)0x0" identifier == (cast_expression "(tm *)0x0" ( (type_descriptor "tm *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(cVar1 = FUN_0001da70(), cVar1 == '\0')" ( (comma_expression "cVar1 = FUN_0001da70(), cVar1 == '\0'" (assignment_expression "cVar1 = FUN_0001da70()" identifier = (call_expression "FUN_0001da70()" identifier (argument_list "()" ( )))) , (binary_expression "cVar1 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence '))) ))) )) (compound_statement "{\n      if (iVar2 != 1) {\n        FUN_0001dcf0();\n      }\n    }" { (if_statement "if (iVar2 != 1) {\n        FUN_0001dcf0();\n      }" if (parenthesized_expression "(iVar2 != 1)" ( (binary_expression "iVar2 != 1" identifier != number_literal) )) (compound_statement "{\n        FUN_0001dcf0();\n      }" { (expression_statement "FUN_0001dcf0();" (call_expression "FUN_0001dcf0()" identifier (argument_list "()" ( ))) ;) })) }) (else_clause "else if ((iVar2 == 1) || (cVar1 = FUN_0001dcf0(), cVar1 != '\0')) {\n      return param_3;\n    }" else (if_statement "if ((iVar2 == 1) || (cVar1 = FUN_0001dcf0(), cVar1 != '\0')) {\n      return param_3;\n    }" if (parenthesized_expression "((iVar2 == 1) || (cVar1 = FUN_0001dcf0(), cVar1 != '\0'))" ( (binary_expression "(iVar2 == 1) || (cVar1 = FUN_0001dcf0(), cVar1 != '\0')" (parenthesized_expression "(iVar2 == 1)" ( (binary_expression "iVar2 == 1" identifier == number_literal) )) || (parenthesized_expression "(cVar1 = FUN_0001dcf0(), cVar1 != '\0')" ( (comma_expression "cVar1 = FUN_0001dcf0(), cVar1 != '\0'" (assignment_expression "cVar1 = FUN_0001dcf0()" identifier = (call_expression "FUN_0001dcf0()" identifier (argument_list "()" ( )))) , (binary_expression "cVar1 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence '))) ))) )) (compound_statement "{\n      return param_3;\n    }" { (return_statement "return param_3;" return identifier ;) })))) })) (return_statement "return (tm *)0x0;" return (cast_expression "(tm *)0x0" ( (type_descriptor "tm *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\ntm * localtime_rz(timezone_t tz,time_t *t,tm *tm)\n\n{\n  _Bool _Var1;\n  timezone_t tz_00;\n  tm *ptVar2;\n  \n  if (tz == (timezone_t)0x0) {\n    ptVar2 = gmtime_r(t,(tm *)tm);\n    return (tm *)ptVar2;\n  }\n  tz_00 = set_tz(tz);\n  if (tz_00 != (timezone_t)0x0) {\n    ptVar2 = localtime_r(t,(tm *)tm);\n    if ((ptVar2 == (tm *)0x0) || (_Var1 = save_abbr(tz,tm), !_Var1)) {\n      if (tz_00 != (timezone_t)0x1) {\n        revert_tz(tz_00);\n      }\n    }\n    else if ((tz_00 == (timezone_t)0x1) || (_Var1 = revert_tz(tz_00), _Var1)) {\n      return tm;\n    }\n  }\n  return (tm *)0x0;\n}\n\n" comment comment (function_definition "tm * localtime_rz(timezone_t tz,time_t *t,tm *tm)\n\n{\n  _Bool _Var1;\n  timezone_t tz_00;\n  tm *ptVar2;\n  \n  if (tz == (timezone_t)0x0) {\n    ptVar2 = gmtime_r(t,(tm *)tm);\n    return (tm *)ptVar2;\n  }\n  tz_00 = set_tz(tz);\n  if (tz_00 != (timezone_t)0x0) {\n    ptVar2 = localtime_r(t,(tm *)tm);\n    if ((ptVar2 == (tm *)0x0) || (_Var1 = save_abbr(tz,tm), !_Var1)) {\n      if (tz_00 != (timezone_t)0x1) {\n        revert_tz(tz_00);\n      }\n    }\n    else if ((tz_00 == (timezone_t)0x1) || (_Var1 = revert_tz(tz_00), _Var1)) {\n      return tm;\n    }\n  }\n  return (tm *)0x0;\n}" type_identifier (pointer_declarator "* localtime_rz(timezone_t tz,time_t *t,tm *tm)" * (function_declarator "localtime_rz(timezone_t tz,time_t *t,tm *tm)" identifier (parameter_list "(timezone_t tz,time_t *t,tm *tm)" ( (parameter_declaration "timezone_t tz" type_identifier identifier) , (parameter_declaration "time_t *t" type_identifier (pointer_declarator "*t" * identifier)) , (parameter_declaration "tm *tm" type_identifier (pointer_declarator "*tm" * identifier)) )))) (compound_statement "{\n  _Bool _Var1;\n  timezone_t tz_00;\n  tm *ptVar2;\n  \n  if (tz == (timezone_t)0x0) {\n    ptVar2 = gmtime_r(t,(tm *)tm);\n    return (tm *)ptVar2;\n  }\n  tz_00 = set_tz(tz);\n  if (tz_00 != (timezone_t)0x0) {\n    ptVar2 = localtime_r(t,(tm *)tm);\n    if ((ptVar2 == (tm *)0x0) || (_Var1 = save_abbr(tz,tm), !_Var1)) {\n      if (tz_00 != (timezone_t)0x1) {\n        revert_tz(tz_00);\n      }\n    }\n    else if ((tz_00 == (timezone_t)0x1) || (_Var1 = revert_tz(tz_00), _Var1)) {\n      return tm;\n    }\n  }\n  return (tm *)0x0;\n}" { (declaration "_Bool _Var1;" type_identifier identifier ;) (declaration "timezone_t tz_00;" type_identifier identifier ;) (declaration "tm *ptVar2;" type_identifier (pointer_declarator "*ptVar2" * identifier) ;) (if_statement "if (tz == (timezone_t)0x0) {\n    ptVar2 = gmtime_r(t,(tm *)tm);\n    return (tm *)ptVar2;\n  }" if (parenthesized_expression "(tz == (timezone_t)0x0)" ( (binary_expression "tz == (timezone_t)0x0" identifier == (cast_expression "(timezone_t)0x0" ( (type_descriptor "timezone_t" type_identifier) ) number_literal)) )) (compound_statement "{\n    ptVar2 = gmtime_r(t,(tm *)tm);\n    return (tm *)ptVar2;\n  }" { (expression_statement "ptVar2 = gmtime_r(t,(tm *)tm);" (assignment_expression "ptVar2 = gmtime_r(t,(tm *)tm)" identifier = (call_expression "gmtime_r(t,(tm *)tm)" identifier (argument_list "(t,(tm *)tm)" ( identifier , (cast_expression "(tm *)tm" ( (type_descriptor "tm *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (return_statement "return (tm *)ptVar2;" return (cast_expression "(tm *)ptVar2" ( (type_descriptor "tm *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) ;) })) (expression_statement "tz_00 = set_tz(tz);" (assignment_expression "tz_00 = set_tz(tz)" identifier = (call_expression "set_tz(tz)" identifier (argument_list "(tz)" ( identifier )))) ;) (if_statement "if (tz_00 != (timezone_t)0x0) {\n    ptVar2 = localtime_r(t,(tm *)tm);\n    if ((ptVar2 == (tm *)0x0) || (_Var1 = save_abbr(tz,tm), !_Var1)) {\n      if (tz_00 != (timezone_t)0x1) {\n        revert_tz(tz_00);\n      }\n    }\n    else if ((tz_00 == (timezone_t)0x1) || (_Var1 = revert_tz(tz_00), _Var1)) {\n      return tm;\n    }\n  }" if (parenthesized_expression "(tz_00 != (timezone_t)0x0)" ( (binary_expression "tz_00 != (timezone_t)0x0" identifier != (cast_expression "(timezone_t)0x0" ( (type_descriptor "timezone_t" type_identifier) ) number_literal)) )) (compound_statement "{\n    ptVar2 = localtime_r(t,(tm *)tm);\n    if ((ptVar2 == (tm *)0x0) || (_Var1 = save_abbr(tz,tm), !_Var1)) {\n      if (tz_00 != (timezone_t)0x1) {\n        revert_tz(tz_00);\n      }\n    }\n    else if ((tz_00 == (timezone_t)0x1) || (_Var1 = revert_tz(tz_00), _Var1)) {\n      return tm;\n    }\n  }" { (expression_statement "ptVar2 = localtime_r(t,(tm *)tm);" (assignment_expression "ptVar2 = localtime_r(t,(tm *)tm)" identifier = (call_expression "localtime_r(t,(tm *)tm)" identifier (argument_list "(t,(tm *)tm)" ( identifier , (cast_expression "(tm *)tm" ( (type_descriptor "tm *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (if_statement "if ((ptVar2 == (tm *)0x0) || (_Var1 = save_abbr(tz,tm), !_Var1)) {\n      if (tz_00 != (timezone_t)0x1) {\n        revert_tz(tz_00);\n      }\n    }\n    else if ((tz_00 == (timezone_t)0x1) || (_Var1 = revert_tz(tz_00), _Var1)) {\n      return tm;\n    }" if (parenthesized_expression "((ptVar2 == (tm *)0x0) || (_Var1 = save_abbr(tz,tm), !_Var1))" ( (binary_expression "(ptVar2 == (tm *)0x0) || (_Var1 = save_abbr(tz,tm), !_Var1)" (parenthesized_expression "(ptVar2 == (tm *)0x0)" ( (binary_expression "ptVar2 == (tm *)0x0" identifier == (cast_expression "(tm *)0x0" ( (type_descriptor "tm *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(_Var1 = save_abbr(tz,tm), !_Var1)" ( (comma_expression "_Var1 = save_abbr(tz,tm), !_Var1" (assignment_expression "_Var1 = save_abbr(tz,tm)" identifier = (call_expression "save_abbr(tz,tm)" identifier (argument_list "(tz,tm)" ( identifier , identifier )))) , (unary_expression "!_Var1" ! identifier)) ))) )) (compound_statement "{\n      if (tz_00 != (timezone_t)0x1) {\n        revert_tz(tz_00);\n      }\n    }" { (if_statement "if (tz_00 != (timezone_t)0x1) {\n        revert_tz(tz_00);\n      }" if (parenthesized_expression "(tz_00 != (timezone_t)0x1)" ( (binary_expression "tz_00 != (timezone_t)0x1" identifier != (cast_expression "(timezone_t)0x1" ( (type_descriptor "timezone_t" type_identifier) ) number_literal)) )) (compound_statement "{\n        revert_tz(tz_00);\n      }" { (expression_statement "revert_tz(tz_00);" (call_expression "revert_tz(tz_00)" identifier (argument_list "(tz_00)" ( identifier ))) ;) })) }) (else_clause "else if ((tz_00 == (timezone_t)0x1) || (_Var1 = revert_tz(tz_00), _Var1)) {\n      return tm;\n    }" else (if_statement "if ((tz_00 == (timezone_t)0x1) || (_Var1 = revert_tz(tz_00), _Var1)) {\n      return tm;\n    }" if (parenthesized_expression "((tz_00 == (timezone_t)0x1) || (_Var1 = revert_tz(tz_00), _Var1))" ( (binary_expression "(tz_00 == (timezone_t)0x1) || (_Var1 = revert_tz(tz_00), _Var1)" (parenthesized_expression "(tz_00 == (timezone_t)0x1)" ( (binary_expression "tz_00 == (timezone_t)0x1" identifier == (cast_expression "(timezone_t)0x1" ( (type_descriptor "timezone_t" type_identifier) ) number_literal)) )) || (parenthesized_expression "(_Var1 = revert_tz(tz_00), _Var1)" ( (comma_expression "_Var1 = revert_tz(tz_00), _Var1" (assignment_expression "_Var1 = revert_tz(tz_00)" identifier = (call_expression "revert_tz(tz_00)" identifier (argument_list "(tz_00)" ( identifier )))) , identifier) ))) )) (compound_statement "{\n      return tm;\n    }" { (return_statement "return tm;" return identifier ;) })))) })) (return_statement "return (tm *)0x0;" return (cast_expression "(tm *)0x0" ( (type_descriptor "tm *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })))
(translation_unit "tm * FUN_0001dd60(int param_1,time_t *param_2,tm *param_3)\n\n{\n  char cVar1;\n  int iVar2;\n  tm *ptVar3;\n  \n  if (param_1 == 0) {\n    ptVar3 = gmtime_r(param_2,param_3);\n    return ptVar3;\n  }\n  iVar2 = FUN_0001dc10();\n  if (iVar2 != 0) {\n    ptVar3 = localtime_r(param_2,param_3);\n    if ((ptVar3 == (tm *)0x0) || (cVar1 = FUN_0001da70(), cVar1 == '\0')) {\n      if (iVar2 != 1) {\n        FUN_0001dcf0();\n      }\n    }\n    else if ((iVar2 == 1) || (cVar1 = FUN_0001dcf0(), cVar1 != '\0')) {\n      return param_3;\n    }\n  }\n  return (tm *)0x0;\n}\n\n" (function_definition "tm * FUN_0001dd60(int param_1,time_t *param_2,tm *param_3)\n\n{\n  char cVar1;\n  int iVar2;\n  tm *ptVar3;\n  \n  if (param_1 == 0) {\n    ptVar3 = gmtime_r(param_2,param_3);\n    return ptVar3;\n  }\n  iVar2 = FUN_0001dc10();\n  if (iVar2 != 0) {\n    ptVar3 = localtime_r(param_2,param_3);\n    if ((ptVar3 == (tm *)0x0) || (cVar1 = FUN_0001da70(), cVar1 == '\0')) {\n      if (iVar2 != 1) {\n        FUN_0001dcf0();\n      }\n    }\n    else if ((iVar2 == 1) || (cVar1 = FUN_0001dcf0(), cVar1 != '\0')) {\n      return param_3;\n    }\n  }\n  return (tm *)0x0;\n}" type_identifier (pointer_declarator "* FUN_0001dd60(int param_1,time_t *param_2,tm *param_3)" * (function_declarator "FUN_0001dd60(int param_1,time_t *param_2,tm *param_3)" identifier (parameter_list "(int param_1,time_t *param_2,tm *param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "time_t *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "tm *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) )))) (compound_statement "{\n  char cVar1;\n  int iVar2;\n  tm *ptVar3;\n  \n  if (param_1 == 0) {\n    ptVar3 = gmtime_r(param_2,param_3);\n    return ptVar3;\n  }\n  iVar2 = FUN_0001dc10();\n  if (iVar2 != 0) {\n    ptVar3 = localtime_r(param_2,param_3);\n    if ((ptVar3 == (tm *)0x0) || (cVar1 = FUN_0001da70(), cVar1 == '\0')) {\n      if (iVar2 != 1) {\n        FUN_0001dcf0();\n      }\n    }\n    else if ((iVar2 == 1) || (cVar1 = FUN_0001dcf0(), cVar1 != '\0')) {\n      return param_3;\n    }\n  }\n  return (tm *)0x0;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "tm *ptVar3;" type_identifier (pointer_declarator "*ptVar3" * identifier) ;) (if_statement "if (param_1 == 0) {\n    ptVar3 = gmtime_r(param_2,param_3);\n    return ptVar3;\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n    ptVar3 = gmtime_r(param_2,param_3);\n    return ptVar3;\n  }" { (expression_statement "ptVar3 = gmtime_r(param_2,param_3);" (assignment_expression "ptVar3 = gmtime_r(param_2,param_3)" identifier = (call_expression "gmtime_r(param_2,param_3)" identifier (argument_list "(param_2,param_3)" ( identifier , identifier )))) ;) (return_statement "return ptVar3;" return identifier ;) })) (expression_statement "iVar2 = FUN_0001dc10();" (assignment_expression "iVar2 = FUN_0001dc10()" identifier = (call_expression "FUN_0001dc10()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar2 != 0) {\n    ptVar3 = localtime_r(param_2,param_3);\n    if ((ptVar3 == (tm *)0x0) || (cVar1 = FUN_0001da70(), cVar1 == '\0')) {\n      if (iVar2 != 1) {\n        FUN_0001dcf0();\n      }\n    }\n    else if ((iVar2 == 1) || (cVar1 = FUN_0001dcf0(), cVar1 != '\0')) {\n      return param_3;\n    }\n  }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n    ptVar3 = localtime_r(param_2,param_3);\n    if ((ptVar3 == (tm *)0x0) || (cVar1 = FUN_0001da70(), cVar1 == '\0')) {\n      if (iVar2 != 1) {\n        FUN_0001dcf0();\n      }\n    }\n    else if ((iVar2 == 1) || (cVar1 = FUN_0001dcf0(), cVar1 != '\0')) {\n      return param_3;\n    }\n  }" { (expression_statement "ptVar3 = localtime_r(param_2,param_3);" (assignment_expression "ptVar3 = localtime_r(param_2,param_3)" identifier = (call_expression "localtime_r(param_2,param_3)" identifier (argument_list "(param_2,param_3)" ( identifier , identifier )))) ;) (if_statement "if ((ptVar3 == (tm *)0x0) || (cVar1 = FUN_0001da70(), cVar1 == '\0')) {\n      if (iVar2 != 1) {\n        FUN_0001dcf0();\n      }\n    }\n    else if ((iVar2 == 1) || (cVar1 = FUN_0001dcf0(), cVar1 != '\0')) {\n      return param_3;\n    }" if (parenthesized_expression "((ptVar3 == (tm *)0x0) || (cVar1 = FUN_0001da70(), cVar1 == '\0'))" ( (binary_expression "(ptVar3 == (tm *)0x0) || (cVar1 = FUN_0001da70(), cVar1 == '\0')" (parenthesized_expression "(ptVar3 == (tm *)0x0)" ( (binary_expression "ptVar3 == (tm *)0x0" identifier == (cast_expression "(tm *)0x0" ( (type_descriptor "tm *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(cVar1 = FUN_0001da70(), cVar1 == '\0')" ( (comma_expression "cVar1 = FUN_0001da70(), cVar1 == '\0'" (assignment_expression "cVar1 = FUN_0001da70()" identifier = (call_expression "FUN_0001da70()" identifier (argument_list "()" ( )))) , (binary_expression "cVar1 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence '))) ))) )) (compound_statement "{\n      if (iVar2 != 1) {\n        FUN_0001dcf0();\n      }\n    }" { (if_statement "if (iVar2 != 1) {\n        FUN_0001dcf0();\n      }" if (parenthesized_expression "(iVar2 != 1)" ( (binary_expression "iVar2 != 1" identifier != number_literal) )) (compound_statement "{\n        FUN_0001dcf0();\n      }" { (expression_statement "FUN_0001dcf0();" (call_expression "FUN_0001dcf0()" identifier (argument_list "()" ( ))) ;) })) }) (else_clause "else if ((iVar2 == 1) || (cVar1 = FUN_0001dcf0(), cVar1 != '\0')) {\n      return param_3;\n    }" else (if_statement "if ((iVar2 == 1) || (cVar1 = FUN_0001dcf0(), cVar1 != '\0')) {\n      return param_3;\n    }" if (parenthesized_expression "((iVar2 == 1) || (cVar1 = FUN_0001dcf0(), cVar1 != '\0'))" ( (binary_expression "(iVar2 == 1) || (cVar1 = FUN_0001dcf0(), cVar1 != '\0')" (parenthesized_expression "(iVar2 == 1)" ( (binary_expression "iVar2 == 1" identifier == number_literal) )) || (parenthesized_expression "(cVar1 = FUN_0001dcf0(), cVar1 != '\0')" ( (comma_expression "cVar1 = FUN_0001dcf0(), cVar1 != '\0'" (assignment_expression "cVar1 = FUN_0001dcf0()" identifier = (call_expression "FUN_0001dcf0()" identifier (argument_list "()" ( )))) , (binary_expression "cVar1 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence '))) ))) )) (compound_statement "{\n      return param_3;\n    }" { (return_statement "return param_3;" return identifier ;) })))) })) (return_statement "return (tm *)0x0;" return (cast_expression "(tm *)0x0" ( (type_descriptor "tm *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) )))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) || (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) , (binary_expression IDENT == (char_literal ' escape_sequence '))) ))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) || (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) , (binary_expression IDENT != (char_literal ' escape_sequence '))) ))) )) (compound_statement { (return_statement return IDENT ;) })))) })) (return_statement return (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) ;) })))
(function_definition "tm * FUN_0001dd60(int param_1,time_t *param_2,tm *param_3)\n\n{\n  char cVar1;\n  int iVar2;\n  tm *ptVar3;\n  \n  if (param_1 == 0) {\n    ptVar3 = gmtime_r(param_2,param_3);\n    return ptVar3;\n  }\n  iVar2 = FUN_0001dc10();\n  if (iVar2 != 0) {\n    ptVar3 = localtime_r(param_2,param_3);\n    if ((ptVar3 == (tm *)0x0) || (cVar1 = FUN_0001da70(), cVar1 == '\0')) {\n      if (iVar2 != 1) {\n        FUN_0001dcf0();\n      }\n    }\n    else if ((iVar2 == 1) || (cVar1 = FUN_0001dcf0(), cVar1 != '\0')) {\n      return param_3;\n    }\n  }\n  return (tm *)0x0;\n}" (type_identifier "tm") (pointer_declarator "* FUN_0001dd60(int param_1,time_t *param_2,tm *param_3)" (* "*") (function_declarator "FUN_0001dd60(int param_1,time_t *param_2,tm *param_3)" (identifier "FUN_0001dd60") (parameter_list "(int param_1,time_t *param_2,tm *param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "time_t *param_2" (type_identifier "time_t") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "tm *param_3" (type_identifier "tm") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) () ")")))) (compound_statement "{\n  char cVar1;\n  int iVar2;\n  tm *ptVar3;\n  \n  if (param_1 == 0) {\n    ptVar3 = gmtime_r(param_2,param_3);\n    return ptVar3;\n  }\n  iVar2 = FUN_0001dc10();\n  if (iVar2 != 0) {\n    ptVar3 = localtime_r(param_2,param_3);\n    if ((ptVar3 == (tm *)0x0) || (cVar1 = FUN_0001da70(), cVar1 == '\0')) {\n      if (iVar2 != 1) {\n        FUN_0001dcf0();\n      }\n    }\n    else if ((iVar2 == 1) || (cVar1 = FUN_0001dcf0(), cVar1 != '\0')) {\n      return param_3;\n    }\n  }\n  return (tm *)0x0;\n}" ({ "{") (declaration "char cVar1;" (primitive_type "char") (identifier "cVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "tm *ptVar3;" (type_identifier "tm") (pointer_declarator "*ptVar3" (* "*") (identifier "ptVar3")) (; ";")) (if_statement "if (param_1 == 0) {\n    ptVar3 = gmtime_r(param_2,param_3);\n    return ptVar3;\n  }" (if "if") (parenthesized_expression "(param_1 == 0)" (( "(") (binary_expression "param_1 == 0" (identifier "param_1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    ptVar3 = gmtime_r(param_2,param_3);\n    return ptVar3;\n  }" ({ "{") (expression_statement "ptVar3 = gmtime_r(param_2,param_3);" (assignment_expression "ptVar3 = gmtime_r(param_2,param_3)" (identifier "ptVar3") (= "=") (call_expression "gmtime_r(param_2,param_3)" (identifier "gmtime_r") (argument_list "(param_2,param_3)" (( "(") (identifier "param_2") (, ",") (identifier "param_3") () ")")))) (; ";")) (return_statement "return ptVar3;" (return "return") (identifier "ptVar3") (; ";")) (} "}"))) (expression_statement "iVar2 = FUN_0001dc10();" (assignment_expression "iVar2 = FUN_0001dc10()" (identifier "iVar2") (= "=") (call_expression "FUN_0001dc10()" (identifier "FUN_0001dc10") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar2 != 0) {\n    ptVar3 = localtime_r(param_2,param_3);\n    if ((ptVar3 == (tm *)0x0) || (cVar1 = FUN_0001da70(), cVar1 == '\0')) {\n      if (iVar2 != 1) {\n        FUN_0001dcf0();\n      }\n    }\n    else if ((iVar2 == 1) || (cVar1 = FUN_0001dcf0(), cVar1 != '\0')) {\n      return param_3;\n    }\n  }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    ptVar3 = localtime_r(param_2,param_3);\n    if ((ptVar3 == (tm *)0x0) || (cVar1 = FUN_0001da70(), cVar1 == '\0')) {\n      if (iVar2 != 1) {\n        FUN_0001dcf0();\n      }\n    }\n    else if ((iVar2 == 1) || (cVar1 = FUN_0001dcf0(), cVar1 != '\0')) {\n      return param_3;\n    }\n  }" ({ "{") (expression_statement "ptVar3 = localtime_r(param_2,param_3);" (assignment_expression "ptVar3 = localtime_r(param_2,param_3)" (identifier "ptVar3") (= "=") (call_expression "localtime_r(param_2,param_3)" (identifier "localtime_r") (argument_list "(param_2,param_3)" (( "(") (identifier "param_2") (, ",") (identifier "param_3") () ")")))) (; ";")) (if_statement "if ((ptVar3 == (tm *)0x0) || (cVar1 = FUN_0001da70(), cVar1 == '\0')) {\n      if (iVar2 != 1) {\n        FUN_0001dcf0();\n      }\n    }\n    else if ((iVar2 == 1) || (cVar1 = FUN_0001dcf0(), cVar1 != '\0')) {\n      return param_3;\n    }" (if "if") (parenthesized_expression "((ptVar3 == (tm *)0x0) || (cVar1 = FUN_0001da70(), cVar1 == '\0'))" (( "(") (binary_expression "(ptVar3 == (tm *)0x0) || (cVar1 = FUN_0001da70(), cVar1 == '\0')" (parenthesized_expression "(ptVar3 == (tm *)0x0)" (( "(") (binary_expression "ptVar3 == (tm *)0x0" (identifier "ptVar3") (== "==") (cast_expression "(tm *)0x0" (( "(") (type_descriptor "tm *" (type_identifier "tm") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (|| "||") (parenthesized_expression "(cVar1 = FUN_0001da70(), cVar1 == '\0')" (( "(") (comma_expression "cVar1 = FUN_0001da70(), cVar1 == '\0'" (assignment_expression "cVar1 = FUN_0001da70()" (identifier "cVar1") (= "=") (call_expression "FUN_0001da70()" (identifier "FUN_0001da70") (argument_list "()" (( "(") () ")")))) (, ",") (binary_expression "cVar1 == '\0'" (identifier "cVar1") (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'")))) () ")"))) () ")")) (compound_statement "{\n      if (iVar2 != 1) {\n        FUN_0001dcf0();\n      }\n    }" ({ "{") (if_statement "if (iVar2 != 1) {\n        FUN_0001dcf0();\n      }" (if "if") (parenthesized_expression "(iVar2 != 1)" (( "(") (binary_expression "iVar2 != 1" (identifier "iVar2") (!= "!=") (number_literal "1")) () ")")) (compound_statement "{\n        FUN_0001dcf0();\n      }" ({ "{") (expression_statement "FUN_0001dcf0();" (call_expression "FUN_0001dcf0()" (identifier "FUN_0001dcf0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (} "}")) (else_clause "else if ((iVar2 == 1) || (cVar1 = FUN_0001dcf0(), cVar1 != '\0')) {\n      return param_3;\n    }" (else "else") (if_statement "if ((iVar2 == 1) || (cVar1 = FUN_0001dcf0(), cVar1 != '\0')) {\n      return param_3;\n    }" (if "if") (parenthesized_expression "((iVar2 == 1) || (cVar1 = FUN_0001dcf0(), cVar1 != '\0'))" (( "(") (binary_expression "(iVar2 == 1) || (cVar1 = FUN_0001dcf0(), cVar1 != '\0')" (parenthesized_expression "(iVar2 == 1)" (( "(") (binary_expression "iVar2 == 1" (identifier "iVar2") (== "==") (number_literal "1")) () ")")) (|| "||") (parenthesized_expression "(cVar1 = FUN_0001dcf0(), cVar1 != '\0')" (( "(") (comma_expression "cVar1 = FUN_0001dcf0(), cVar1 != '\0'" (assignment_expression "cVar1 = FUN_0001dcf0()" (identifier "cVar1") (= "=") (call_expression "FUN_0001dcf0()" (identifier "FUN_0001dcf0") (argument_list "()" (( "(") () ")")))) (, ",") (binary_expression "cVar1 != '\0'" (identifier "cVar1") (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'")))) () ")"))) () ")")) (compound_statement "{\n      return param_3;\n    }" ({ "{") (return_statement "return param_3;" (return "return") (identifier "param_3") (; ";")) (} "}"))))) (} "}"))) (return_statement "return (tm *)0x0;" (return "return") (cast_expression "(tm *)0x0" (( "(") (type_descriptor "tm *" (type_identifier "tm") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (; ";")) (} "}")))

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

type_1 * function_1(type_2 var_1,type_3 *t,type_1 *type_1)

{
  type_4 _Var1;
  type_2 var_4;
  type_1 *var_6;
  
  if (var_1 == (type_2)0x0) {
    var_6 = var_2(t,(type_1 *)type_1);
    return (type_1 *)var_6;
  }
  var_4 = var_3(var_1);
  if (var_4 != (type_2)0x0) {
    var_6 = var_5(t,(type_1 *)type_1);
    if ((var_6 == (type_1 *)0x0) || (_Var1 = var_7(var_1,type_1), !_Var1)) {
      if (var_4 != (type_2)0x1) {
        var_8(var_4);
      }
    }
    else if ((var_4 == (type_2)0x1) || (_Var1 = var_8(var_4), _Var1)) {
      return type_1;
    }
  }
  return (type_1 *)0x0;
}


(translation_unit (function_definition type: (type_identifier) declarator: (pointer_declarator declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)) (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: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (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))))) (return_statement (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (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))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list))) right: (binary_expression left: (identifier) right: (char_literal (escape_sequence))))))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list)))))) alternative: (else_clause (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list))) right: (binary_expression left: (identifier) right: (char_literal (escape_sequence))))))) consequence: (compound_statement (return_statement (identifier)))))))) (return_statement (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal))))))

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

tm * MASKED(int param_1,time_t *param_2,tm *param_3)

{
  char cVar1;
  int iVar2;
  tm *ptVar3;
  
  if (param_1 == 0) {
    ptVar3 = gmtime_r(param_2,param_3);
    return ptVar3;
  }
  iVar2 = FUN_0001dc10();
  if (iVar2 != 0) {
    ptVar3 = localtime_r(param_2,param_3);
    if ((ptVar3 == (tm *)0x0) || (cVar1 = FUN_0001da70(), cVar1 == '\0')) {
      if (iVar2 != 1) {
        FUN_0001dcf0();
      }
    }
    else if ((iVar2 == 1) || (cVar1 = FUN_0001dcf0(), cVar1 != '\0')) {
      return param_3;
    }
  }
  return (tm *)0x0;
}

