void FUN_0040589c(int param_1)

{
  if (param_1 == 0) {
    return;
  }
  if (*(void **)(param_1 + 0x10) != (void *)0x0) {
    free(*(void **)(param_1 + 0x10));
  }
  if (*(int *)(param_1 + 8) != 0) {
    sloop_cancel_timeout();
  }
  (*(code *)(undefined *)0x0)(param_1);
  (*(code *)(undefined *)0x0)();
  (*(code *)(undefined *)0x0)();
  (*(code *)(undefined *)0x0)();
  (*(code *)(undefined *)0x0)();
  (*(code *)(undefined *)0x0)();
  (*(code *)(undefined *)0x0)();
  (*(code *)(undefined *)0x0)();
  (*(code *)(undefined *)0x0)();
  (*(code *)(undefined *)0x0)();
  (*(code *)(undefined *)0x0)();
  FUN_00401660();
  return;
}