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

SHELL_VAR * get_epochseconds(SHELL_VAR *var)

{
  time_t tVar1;
  char *pcVar2;
  
  tVar1 = time((time_t *)0x0);
  pcVar2 = itos((longlong)tVar1);
  if (var->value != (char *)0x0) {
    free(var->value);
  }
  var->value = pcVar2;
  return var;
}



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

int FUN_00050990(int param_1)

{
  time_t tVar1;
  undefined4 uVar2;
  
  tVar1 = time((time_t *)0x0);
  uVar2 = itos(tVar1,tVar1 >> 0x1f);
  if (*(void **)(param_1 + 4) != (void *)0x0) {
    free(*(void **)(param_1 + 4));
  }
  *(undefined4 *)(param_1 + 4) = uVar2;
  return param_1;
}


PUSH EDI
PUSH ESI
PUSH EBX
MOV ESI,dword ptr [ESP + 0x10]
CALL 0x00031ed0
ADD EBX,0xf9664
SUB ESP,0xc
PUSH 0x0
CALL 0x0002f2d0
POP EDX
POP ECX
CDQ
PUSH EDX
PUSH EAX
CALL 0x000bbf60
MOV EDX,dword ptr [ESI + 0x4]
ADD ESP,0x10
MOV EDI,EAX
TEST EDX,EDX
JZ 0x000509ce
SUB ESP,0xc
PUSH EDX
CALL 0x0002f200
ADD ESP,0x10
MOV dword ptr [ESI + 0x4],EDI
MOV EAX,ESI
POP EBX
POP ESI
POP EDI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint FUN_00050990(int param_1)\n\n{\n  time_t tVar1;\n  undefined4 uVar2;\n  \n  tVar1 = time((time_t *)0x0);\n  uVar2 = itos(tVar1,tVar1 >> 0x1f);\n  if (*(void **)(param_1 + 4) != (void *)0x0) {\n    free(*(void **)(param_1 + 4));\n  }\n  *(undefined4 *)(param_1 + 4) = uVar2;\n  return param_1;\n}\n\n" comment (function_definition "int FUN_00050990(int param_1)\n\n{\n  time_t tVar1;\n  undefined4 uVar2;\n  \n  tVar1 = time((time_t *)0x0);\n  uVar2 = itos(tVar1,tVar1 >> 0x1f);\n  if (*(void **)(param_1 + 4) != (void *)0x0) {\n    free(*(void **)(param_1 + 4));\n  }\n  *(undefined4 *)(param_1 + 4) = uVar2;\n  return param_1;\n}" primitive_type (function_declarator "FUN_00050990(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  time_t tVar1;\n  undefined4 uVar2;\n  \n  tVar1 = time((time_t *)0x0);\n  uVar2 = itos(tVar1,tVar1 >> 0x1f);\n  if (*(void **)(param_1 + 4) != (void *)0x0) {\n    free(*(void **)(param_1 + 4));\n  }\n  *(undefined4 *)(param_1 + 4) = uVar2;\n  return param_1;\n}" { (declaration "time_t tVar1;" type_identifier identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (expression_statement "tVar1 = time((time_t *)0x0);" (assignment_expression "tVar1 = time((time_t *)0x0)" identifier = (call_expression "time((time_t *)0x0)" identifier (argument_list "((time_t *)0x0)" ( (cast_expression "(time_t *)0x0" ( (type_descriptor "time_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) )))) ;) (expression_statement "uVar2 = itos(tVar1,tVar1 >> 0x1f);" (assignment_expression "uVar2 = itos(tVar1,tVar1 >> 0x1f)" identifier = (call_expression "itos(tVar1,tVar1 >> 0x1f)" identifier (argument_list "(tVar1,tVar1 >> 0x1f)" ( identifier , (binary_expression "tVar1 >> 0x1f" identifier >> number_literal) )))) ;) (if_statement "if (*(void **)(param_1 + 4) != (void *)0x0) {\n    free(*(void **)(param_1 + 4));\n  }" if (parenthesized_expression "(*(void **)(param_1 + 4) != (void *)0x0)" ( (binary_expression "*(void **)(param_1 + 4) != (void *)0x0" (pointer_expression "*(void **)(param_1 + 4)" * (cast_expression "(void **)(param_1 + 4)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    free(*(void **)(param_1 + 4));\n  }" { (expression_statement "free(*(void **)(param_1 + 4));" (call_expression "free(*(void **)(param_1 + 4))" identifier (argument_list "(*(void **)(param_1 + 4))" ( (pointer_expression "*(void **)(param_1 + 4)" * (cast_expression "(void **)(param_1 + 4)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) ))) ;) })) (expression_statement "*(undefined4 *)(param_1 + 4) = uVar2;" (assignment_expression "*(undefined4 *)(param_1 + 4) = uVar2" (pointer_expression "*(undefined4 *)(param_1 + 4)" * (cast_expression "(undefined4 *)(param_1 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) = identifier) ;) (return_statement "return param_1;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nSHELL_VAR * get_epochseconds(SHELL_VAR *var)\n\n{\n  time_t tVar1;\n  char *pcVar2;\n  \n  tVar1 = time((time_t *)0x0);\n  pcVar2 = itos((longlong)tVar1);\n  if (var->value != (char *)0x0) {\n    free(var->value);\n  }\n  var->value = pcVar2;\n  return var;\n}\n\n" comment comment (function_definition "SHELL_VAR * get_epochseconds(SHELL_VAR *var)\n\n{\n  time_t tVar1;\n  char *pcVar2;\n  \n  tVar1 = time((time_t *)0x0);\n  pcVar2 = itos((longlong)tVar1);\n  if (var->value != (char *)0x0) {\n    free(var->value);\n  }\n  var->value = pcVar2;\n  return var;\n}" type_identifier (pointer_declarator "* get_epochseconds(SHELL_VAR *var)" * (function_declarator "get_epochseconds(SHELL_VAR *var)" identifier (parameter_list "(SHELL_VAR *var)" ( (parameter_declaration "SHELL_VAR *var" type_identifier (pointer_declarator "*var" * identifier)) )))) (compound_statement "{\n  time_t tVar1;\n  char *pcVar2;\n  \n  tVar1 = time((time_t *)0x0);\n  pcVar2 = itos((longlong)tVar1);\n  if (var->value != (char *)0x0) {\n    free(var->value);\n  }\n  var->value = pcVar2;\n  return var;\n}" { (declaration "time_t tVar1;" type_identifier identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (expression_statement "tVar1 = time((time_t *)0x0);" (assignment_expression "tVar1 = time((time_t *)0x0)" identifier = (call_expression "time((time_t *)0x0)" identifier (argument_list "((time_t *)0x0)" ( (cast_expression "(time_t *)0x0" ( (type_descriptor "time_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) )))) ;) (expression_statement "pcVar2 = itos((longlong)tVar1);" (assignment_expression "pcVar2 = itos((longlong)tVar1)" identifier = (call_expression "itos((longlong)tVar1)" identifier (argument_list "((longlong)tVar1)" ( (cast_expression "(longlong)tVar1" ( (type_descriptor "longlong" type_identifier) ) identifier) )))) ;) (if_statement "if (var->value != (char *)0x0) {\n    free(var->value);\n  }" if (parenthesized_expression "(var->value != (char *)0x0)" ( (binary_expression "var->value != (char *)0x0" (field_expression "var->value" identifier -> field_identifier) != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    free(var->value);\n  }" { (expression_statement "free(var->value);" (call_expression "free(var->value)" identifier (argument_list "(var->value)" ( (field_expression "var->value" identifier -> field_identifier) ))) ;) })) (expression_statement "var->value = pcVar2;" (assignment_expression "var->value = pcVar2" (field_expression "var->value" identifier -> field_identifier) = identifier) ;) (return_statement "return var;" return identifier ;) })))
(translation_unit "int FUN_00050990(int param_1)\n\n{\n  time_t tVar1;\n  undefined4 uVar2;\n  \n  tVar1 = time((time_t *)0x0);\n  uVar2 = itos(tVar1,tVar1 >> 0x1f);\n  if (*(void **)(param_1 + 4) != (void *)0x0) {\n    free(*(void **)(param_1 + 4));\n  }\n  *(undefined4 *)(param_1 + 4) = uVar2;\n  return param_1;\n}\n\n" (function_definition "int FUN_00050990(int param_1)\n\n{\n  time_t tVar1;\n  undefined4 uVar2;\n  \n  tVar1 = time((time_t *)0x0);\n  uVar2 = itos(tVar1,tVar1 >> 0x1f);\n  if (*(void **)(param_1 + 4) != (void *)0x0) {\n    free(*(void **)(param_1 + 4));\n  }\n  *(undefined4 *)(param_1 + 4) = uVar2;\n  return param_1;\n}" primitive_type (function_declarator "FUN_00050990(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  time_t tVar1;\n  undefined4 uVar2;\n  \n  tVar1 = time((time_t *)0x0);\n  uVar2 = itos(tVar1,tVar1 >> 0x1f);\n  if (*(void **)(param_1 + 4) != (void *)0x0) {\n    free(*(void **)(param_1 + 4));\n  }\n  *(undefined4 *)(param_1 + 4) = uVar2;\n  return param_1;\n}" { (declaration "time_t tVar1;" type_identifier identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (expression_statement "tVar1 = time((time_t *)0x0);" (assignment_expression "tVar1 = time((time_t *)0x0)" identifier = (call_expression "time((time_t *)0x0)" identifier (argument_list "((time_t *)0x0)" ( (cast_expression "(time_t *)0x0" ( (type_descriptor "time_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) )))) ;) (expression_statement "uVar2 = itos(tVar1,tVar1 >> 0x1f);" (assignment_expression "uVar2 = itos(tVar1,tVar1 >> 0x1f)" identifier = (call_expression "itos(tVar1,tVar1 >> 0x1f)" identifier (argument_list "(tVar1,tVar1 >> 0x1f)" ( identifier , (binary_expression "tVar1 >> 0x1f" identifier >> number_literal) )))) ;) (if_statement "if (*(void **)(param_1 + 4) != (void *)0x0) {\n    free(*(void **)(param_1 + 4));\n  }" if (parenthesized_expression "(*(void **)(param_1 + 4) != (void *)0x0)" ( (binary_expression "*(void **)(param_1 + 4) != (void *)0x0" (pointer_expression "*(void **)(param_1 + 4)" * (cast_expression "(void **)(param_1 + 4)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    free(*(void **)(param_1 + 4));\n  }" { (expression_statement "free(*(void **)(param_1 + 4));" (call_expression "free(*(void **)(param_1 + 4))" identifier (argument_list "(*(void **)(param_1 + 4))" ( (pointer_expression "*(void **)(param_1 + 4)" * (cast_expression "(void **)(param_1 + 4)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) ))) ;) })) (expression_statement "*(undefined4 *)(param_1 + 4) = uVar2;" (assignment_expression "*(undefined4 *)(param_1 + 4) = uVar2" (pointer_expression "*(undefined4 *)(param_1 + 4)" * (cast_expression "(undefined4 *)(param_1 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) = identifier) ;) (return_statement "return param_1;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT >> LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (return_statement return IDENT ;) })))
(function_definition "int FUN_00050990(int param_1)\n\n{\n  time_t tVar1;\n  undefined4 uVar2;\n  \n  tVar1 = time((time_t *)0x0);\n  uVar2 = itos(tVar1,tVar1 >> 0x1f);\n  if (*(void **)(param_1 + 4) != (void *)0x0) {\n    free(*(void **)(param_1 + 4));\n  }\n  *(undefined4 *)(param_1 + 4) = uVar2;\n  return param_1;\n}" (primitive_type "int") (function_declarator "FUN_00050990(int param_1)" (identifier "FUN_00050990") (parameter_list "(int param_1)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) () ")"))) (compound_statement "{\n  time_t tVar1;\n  undefined4 uVar2;\n  \n  tVar1 = time((time_t *)0x0);\n  uVar2 = itos(tVar1,tVar1 >> 0x1f);\n  if (*(void **)(param_1 + 4) != (void *)0x0) {\n    free(*(void **)(param_1 + 4));\n  }\n  *(undefined4 *)(param_1 + 4) = uVar2;\n  return param_1;\n}" ({ "{") (declaration "time_t tVar1;" (type_identifier "time_t") (identifier "tVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (expression_statement "tVar1 = time((time_t *)0x0);" (assignment_expression "tVar1 = time((time_t *)0x0)" (identifier "tVar1") (= "=") (call_expression "time((time_t *)0x0)" (identifier "time") (argument_list "((time_t *)0x0)" (( "(") (cast_expression "(time_t *)0x0" (( "(") (type_descriptor "time_t *" (type_identifier "time_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) () ")")))) (; ";")) (expression_statement "uVar2 = itos(tVar1,tVar1 >> 0x1f);" (assignment_expression "uVar2 = itos(tVar1,tVar1 >> 0x1f)" (identifier "uVar2") (= "=") (call_expression "itos(tVar1,tVar1 >> 0x1f)" (identifier "itos") (argument_list "(tVar1,tVar1 >> 0x1f)" (( "(") (identifier "tVar1") (, ",") (binary_expression "tVar1 >> 0x1f" (identifier "tVar1") (>> ">>") (number_literal "0x1f")) () ")")))) (; ";")) (if_statement "if (*(void **)(param_1 + 4) != (void *)0x0) {\n    free(*(void **)(param_1 + 4));\n  }" (if "if") (parenthesized_expression "(*(void **)(param_1 + 4) != (void *)0x0)" (( "(") (binary_expression "*(void **)(param_1 + 4) != (void *)0x0" (pointer_expression "*(void **)(param_1 + 4)" (* "*") (cast_expression "(void **)(param_1 + 4)" (( "(") (type_descriptor "void **" (primitive_type "void") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")")))) (!= "!=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    free(*(void **)(param_1 + 4));\n  }" ({ "{") (expression_statement "free(*(void **)(param_1 + 4));" (call_expression "free(*(void **)(param_1 + 4))" (identifier "free") (argument_list "(*(void **)(param_1 + 4))" (( "(") (pointer_expression "*(void **)(param_1 + 4)" (* "*") (cast_expression "(void **)(param_1 + 4)" (( "(") (type_descriptor "void **" (primitive_type "void") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")")))) () ")"))) (; ";")) (} "}"))) (expression_statement "*(undefined4 *)(param_1 + 4) = uVar2;" (assignment_expression "*(undefined4 *)(param_1 + 4) = uVar2" (pointer_expression "*(undefined4 *)(param_1 + 4)" (* "*") (cast_expression "(undefined4 *)(param_1 + 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")")))) (= "=") (identifier "uVar2")) (; ";")) (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}")))

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

type_1 * function_1(type_1 *var)

{
  type_2 tVar1;
  char *pcVar2;
  
  tVar1 = var_1((type_2 *)0x0);
  pcVar2 = var_2((type_3)tVar1);
  if (var->value != (char *)0x0) {
    var_3(var->value);
  }
  var->value = pcVar2;
  return var;
}


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

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

int MASKED(int param_1)

{
  time_t tVar1;
  undefined4 uVar2;
  
  tVar1 = time((time_t *)0x0);
  uVar2 = itos(tVar1,tVar1 >> 0x1f);
  if (*(void **)(param_1 + 4) != (void *)0x0) {
    free(*(void **)(param_1 + 4));
  }
  *(undefined4 *)(param_1 + 4) = uVar2;
  return param_1;
}

