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

void noise_get_light(_func_void_void_ptr_int *func)

{
  int iVar1;
  int in_GS_OFFSET;
  timeval tv;
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  gettimeofday((timeval *)&tv,(__timezone_ptr_t)0x0);
  (*func)((timeval *)&tv,8);
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



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

void FUN_00068ac0(code *param_1)

{
  int in_GS_OFFSET;
  timeval local_18;
  int local_10;
  
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  gettimeofday(&local_18,(__timezone_ptr_t)0x0);
  (*param_1)(&local_18,8);
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0006f430();
}


PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00014970
ADD EBX,0x412c8
SUB ESP,0x18
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x14],EAX
XOR EAX,EAX
MOV EDI,dword ptr [ESP + 0x28]
PUSH 0x0
LEA ESI,[ESP + 0x10]
PUSH ESI
CALL 0x000141b0
POP EAX
POP EDX
PUSH 0x8
PUSH ESI
CALL EDI
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0xc]
XOR EAX,dword ptr GS:[0x14]
JNZ 0x00068b0b
ADD ESP,0x10
POP EBX
POP ESI
POP EDI
RET
CALL 0x0006f430
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_00068ac0(code *param_1)\n\n{\n  int in_GS_OFFSET;\n  timeval local_18;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  gettimeofday(&local_18,(__timezone_ptr_t)0x0);\n  (*param_1)(&local_18,8);\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0006f430();\n}\n\n" comment (function_definition "void FUN_00068ac0(code *param_1)\n\n{\n  int in_GS_OFFSET;\n  timeval local_18;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  gettimeofday(&local_18,(__timezone_ptr_t)0x0);\n  (*param_1)(&local_18,8);\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0006f430();\n}" primitive_type (function_declarator "FUN_00068ac0(code *param_1)" identifier (parameter_list "(code *param_1)" ( (parameter_declaration "code *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int in_GS_OFFSET;\n  timeval local_18;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  gettimeofday(&local_18,(__timezone_ptr_t)0x0);\n  (*param_1)(&local_18,8);\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0006f430();\n}" { (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "timeval local_18;" type_identifier identifier ;) (declaration "int local_10;" primitive_type identifier ;) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "gettimeofday(&local_18,(__timezone_ptr_t)0x0);" (call_expression "gettimeofday(&local_18,(__timezone_ptr_t)0x0)" identifier (argument_list "(&local_18,(__timezone_ptr_t)0x0)" ( (pointer_expression "&local_18" & identifier) , (cast_expression "(__timezone_ptr_t)0x0" ( (type_descriptor "__timezone_ptr_t" type_identifier) ) number_literal) ))) ;) (expression_statement "(*param_1)(&local_18,8);" (call_expression "(*param_1)(&local_18,8)" (parenthesized_expression "(*param_1)" ( (pointer_expression "*param_1" * identifier) )) (argument_list "(&local_18,8)" ( (pointer_expression "&local_18" & identifier) , number_literal ))) ;) (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_10 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) comment (expression_statement "FUN_0006f430();" (call_expression "FUN_0006f430()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nvoid noise_get_light(_func_void_void_ptr_int *func)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  timeval tv;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  gettimeofday((timeval *)&tv,(__timezone_ptr_t)0x0);\n  (*func)((timeval *)&tv,8);\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment comment (function_definition "void noise_get_light(_func_void_void_ptr_int *func)\n\n{\n  int iVar1;\n  int in_GS_OFFSET;\n  timeval tv;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  gettimeofday((timeval *)&tv,(__timezone_ptr_t)0x0);\n  (*func)((timeval *)&tv,8);\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (function_declarator "noise_get_light(_func_void_void_ptr_int *func)" identifier (parameter_list "(_func_void_void_ptr_int *func)" ( (parameter_declaration "_func_void_void_ptr_int *func" type_identifier (pointer_declarator "*func" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int in_GS_OFFSET;\n  timeval tv;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  gettimeofday((timeval *)&tv,(__timezone_ptr_t)0x0);\n  (*func)((timeval *)&tv,8);\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "timeval tv;" type_identifier identifier ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "gettimeofday((timeval *)&tv,(__timezone_ptr_t)0x0);" (call_expression "gettimeofday((timeval *)&tv,(__timezone_ptr_t)0x0)" identifier (argument_list "((timeval *)&tv,(__timezone_ptr_t)0x0)" ( (cast_expression "(timeval *)&tv" ( (type_descriptor "timeval *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&tv" & identifier)) , (cast_expression "(__timezone_ptr_t)0x0" ( (type_descriptor "__timezone_ptr_t" type_identifier) ) number_literal) ))) ;) (expression_statement "(*func)((timeval *)&tv,8);" (call_expression "(*func)((timeval *)&tv,8)" (parenthesized_expression "(*func)" ( (pointer_expression "*func" * identifier) )) (argument_list "((timeval *)&tv,8)" ( (cast_expression "(timeval *)&tv" ( (type_descriptor "timeval *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&tv" & identifier)) , number_literal ))) ;) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "void FUN_00068ac0(code *param_1)\n\n{\n  int in_GS_OFFSET;\n  timeval local_18;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  gettimeofday(&local_18,(__timezone_ptr_t)0x0);\n  (*param_1)(&local_18,8);\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0006f430();\n}\n\n" (function_definition "void FUN_00068ac0(code *param_1)\n\n{\n  int in_GS_OFFSET;\n  timeval local_18;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  gettimeofday(&local_18,(__timezone_ptr_t)0x0);\n  (*param_1)(&local_18,8);\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0006f430();\n}" primitive_type (function_declarator "FUN_00068ac0(code *param_1)" identifier (parameter_list "(code *param_1)" ( (parameter_declaration "code *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int in_GS_OFFSET;\n  timeval local_18;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  gettimeofday(&local_18,(__timezone_ptr_t)0x0);\n  (*param_1)(&local_18,8);\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0006f430();\n}" { (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "timeval local_18;" type_identifier identifier ;) (declaration "int local_10;" primitive_type identifier ;) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "gettimeofday(&local_18,(__timezone_ptr_t)0x0);" (call_expression "gettimeofday(&local_18,(__timezone_ptr_t)0x0)" identifier (argument_list "(&local_18,(__timezone_ptr_t)0x0)" ( (pointer_expression "&local_18" & identifier) , (cast_expression "(__timezone_ptr_t)0x0" ( (type_descriptor "__timezone_ptr_t" type_identifier) ) number_literal) ))) ;) (expression_statement "(*param_1)(&local_18,8);" (call_expression "(*param_1)(&local_18,8)" (parenthesized_expression "(*param_1)" ( (pointer_expression "*param_1" * identifier) )) (argument_list "(&local_18,8)" ( (pointer_expression "&local_18" & identifier) , number_literal ))) ;) (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_10 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "FUN_0006f430();" (call_expression "FUN_0006f430()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression & IDENT) , (cast_expression ( (type_descriptor TYPE) ) LIT) ))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( (pointer_expression & IDENT) , LIT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "void FUN_00068ac0(code *param_1)\n\n{\n  int in_GS_OFFSET;\n  timeval local_18;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  gettimeofday(&local_18,(__timezone_ptr_t)0x0);\n  (*param_1)(&local_18,8);\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0006f430();\n}" (primitive_type "void") (function_declarator "FUN_00068ac0(code *param_1)" (identifier "FUN_00068ac0") (parameter_list "(code *param_1)" (( "(") (parameter_declaration "code *param_1" (type_identifier "code") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  int in_GS_OFFSET;\n  timeval local_18;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  gettimeofday(&local_18,(__timezone_ptr_t)0x0);\n  (*param_1)(&local_18,8);\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0006f430();\n}" ({ "{") (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "timeval local_18;" (type_identifier "timeval") (identifier "local_18") (; ";")) (declaration "int local_10;" (primitive_type "int") (identifier "local_10") (; ";")) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_10") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "gettimeofday(&local_18,(__timezone_ptr_t)0x0);" (call_expression "gettimeofday(&local_18,(__timezone_ptr_t)0x0)" (identifier "gettimeofday") (argument_list "(&local_18,(__timezone_ptr_t)0x0)" (( "(") (pointer_expression "&local_18" (& "&") (identifier "local_18")) (, ",") (cast_expression "(__timezone_ptr_t)0x0" (( "(") (type_descriptor "__timezone_ptr_t" (type_identifier "__timezone_ptr_t")) () ")") (number_literal "0x0")) () ")"))) (; ";")) (expression_statement "(*param_1)(&local_18,8);" (call_expression "(*param_1)(&local_18,8)" (parenthesized_expression "(*param_1)" (( "(") (pointer_expression "*param_1" (* "*") (identifier "param_1")) () ")")) (argument_list "(&local_18,8)" (( "(") (pointer_expression "&local_18" (& "&") (identifier "local_18")) (, ",") (number_literal "8") () ")"))) (; ";")) (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" (if "if") (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_10 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_10") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_0006f430();" (call_expression "FUN_0006f430()" (identifier "FUN_0006f430") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

void function_1(type_1 *func)

{
  int var_3;
  int var_1;
  type_2 tv;
  
  var_3 = *(int *)(var_1 + 0x14);
  var_2((type_2 *)&tv,(type_3)0x0);
  (*func)((type_2 *)&tv,8);
  if (var_3 == *(int *)(var_1 + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  var_4();
}


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

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

void MASKED(code *param_1)

{
  int in_GS_OFFSET;
  timeval local_18;
  int local_10;
  
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  gettimeofday(&local_18,(__timezone_ptr_t)0x0);
  (*param_1)(&local_18,8);
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0006f430();
}

