this is a question of hackathon ctf challenge, where you have to get the flag from this code

#include "out.h"



void _DT_INIT(void)

{
  __gmon_start__();
  return;
}



void FUN_00101020(void)

{
  (*(code *)(undefined *)0x0)();
  return;
}



// WARNING: Unknown calling convention -- yet parameter storage is locked

char * strncpy(char *__dest,char *__src,size_t __n)

{
  char *pcVar1;
  
  pcVar1 = strncpy(__dest,__src,__n);
  return pcVar1;
}



// WARNING: Unknown calling convention -- yet parameter storage is locked

int puts(char *__s)

{
  int iVar1;
  
  iVar1 = puts(__s);
  return iVar1;
}



// WARNING: Unknown calling convention -- yet parameter storage is locked

size_t strlen(char *__s)

{
  size_t sVar1;
  
  sVar1 = strlen(__s);
  return sVar1;
}



void __stack_chk_fail(void)

{
                    // WARNING: Subroutine does not return
  __stack_chk_fail();
}



// WARNING: Unknown calling convention -- yet parameter storage is locked

int printf(char *__format,...)

{
  int iVar1;
  
  iVar1 = printf(__format);
  return iVar1;
}



// WARNING: Unknown calling convention -- yet parameter storage is locked

void * calloc(size_t __nmemb,size_t __size)

{
  void *pvVar1;
  
  pvVar1 = calloc(__nmemb,__size);
  return pvVar1;
}



// WARNING: Unknown calling convention -- yet parameter storage is locked

long strtol(char *__nptr,char **__endptr,int __base)

{
  long lVar1;
  
  lVar1 = strtol(__nptr,__endptr,__base);
  return lVar1;
}



// WARNING: Unknown calling convention -- yet parameter storage is locked

void perror(char *__s)

{
  perror(__s);
  return;
}



void __isoc99_scanf(void)

{
  __isoc99_scanf();
  return;
}



// WARNING: Unknown calling convention -- yet parameter storage is locked

void exit(int __status)

{
                    // WARNING: Subroutine does not return
  exit(__status);
}



void processEntry entry(undefined8 param_1,undefined8 param_2)

{
  undefined auStack_8 [8];
  
  __libc_start_main(FUN_00101754,param_2,&stack0x00000008,0,0,param_1,auStack_8);
  do {
                    // WARNING: Do nothing block with infinite loop
  } while( true );
}



// WARNING: Removing unreachable block (ram,0x00101113)
// WARNING: Removing unreachable block (ram,0x0010111f)

void FUN_00101100(void)

{
  return;
}



// WARNING: Removing unreachable block (ram,0x00101154)
// WARNING: Removing unreachable block (ram,0x00101160)

void FUN_00101130(void)

{
  return;
}



void _FINI_0(void)

{
  if (DAT_00104060 != '\0') {
    return;
  }
  __cxa_finalize(PTR_LOOP_00104058);
  FUN_00101100();
  DAT_00104060 = 1;
  return;
}



void _INIT_0(void)

{
  FUN_00101130();
  return;
}



undefined4 * FUN_001011c9(void)

{
  undefined4 *puVar1;
  
  puVar1 = (undefined4 *)calloc(1,0x38);
  *puVar1 = 0;
  puVar1[1] = 0;
  puVar1[2] = 0;
  puVar1[3] = 0;
  puVar1[0xc] = 0;
  *(undefined4 **)(puVar1 + 4) = puVar1;
  *(undefined4 **)(puVar1 + 6) = puVar1 + 1;
  *(undefined4 **)(puVar1 + 8) = puVar1 + 2;
  *(undefined4 **)(puVar1 + 10) = puVar1 + 3;
  return puVar1;
}



void FUN_0010125c(uint *param_1)

{
  printf("=====\na: 0x%x\nb: 0x%x\nc: 0x%x\nd: 0x%x\nflags: 0x%x\n=====\n",(ulong)*param_1,
         (ulong)param_1[1],(ulong)param_1[2],(ulong)param_1[3],(ulong)param_1[0xc]);
  return;
}



void FUN_001012a9(long param_1,int param_2)

{
  if (param_2 == 1) {
    *(uint *)(param_1 + 0x30) = *(uint *)(param_1 + 0x30) | 0x10000000;
  }
  else {
    if (param_2 != 0) {
      perror("Invalid value.");
                    // WARNING: Subroutine does not return
      exit(1);
    }
    *(uint *)(param_1 + 0x30) = *(uint *)(param_1 + 0x30) | 0x10000000;
    *(uint *)(param_1 + 0x30) = *(uint *)(param_1 + 0x30) ^ 0x10000000;
  }
  return;
}



void FUN_00101322(long param_1,uint param_2)

{
  uint uVar1;
  uint local_1c;
  
  if (((int)param_2 >> 0x14 & 0xfU) != 1) {
    perror("Invalid value.");
                    // WARNING: Subroutine does not return
    exit(1);
  }
  uVar1 = (int)param_2 >> 0xc & 0xf;
  if ((uVar1 != 0) && (uVar1 != 1)) {
    perror("Invalid value.");
                    // WARNING: Subroutine does not return
    exit(1);
  }
  local_1c = param_2 & 0xfff;
  if (uVar1 == 1) {
    local_1c = **(uint **)(param_1 + ((long)((int)local_1c >> 8) + 2) * 8);
  }
  **(uint **)(param_1 + ((long)(int)((int)param_2 >> 0x10 & 0xf) + 2) * 8) = local_1c;
  return;
}



void FUN_001013e9(long param_1,uint param_2)

{
  uint uVar1;
  uint uVar2;
  uint local_1c;
  
  if (((int)param_2 >> 0x14 & 0xfU) != 1) {
    perror("Invalid value.");
                    // WARNING: Subroutine does not return
    exit(1);
  }
  uVar1 = (int)param_2 >> 0x10 & 0xf;
  uVar2 = (int)param_2 >> 0xc & 0xf;
  if ((uVar2 != 0) && (uVar2 != 1)) {
    perror("Invalid value.");
                    // WARNING: Subroutine does not return
    exit(1);
  }
  local_1c = param_2 & 0xfff;
  if (uVar2 == 1) {
    local_1c = **(uint **)(param_1 + ((long)((int)local_1c >> 8) + 2) * 8);
  }
  **(int **)(param_1 + ((long)(int)uVar1 + 2) * 8) =
       local_1c + **(int **)(param_1 + ((long)(int)uVar1 + 2) * 8);
  return;
}



void FUN_001014c6(long param_1,uint param_2)

{
  uint uVar1;
  uint uVar2;
  uint local_1c;
  
  if (((int)param_2 >> 0x14 & 0xfU) != 1) {
    perror("Invalid value.");
                    // WARNING: Subroutine does not return
    exit(1);
  }
  uVar1 = (int)param_2 >> 0x10 & 0xf;
  uVar2 = (int)param_2 >> 0xc & 0xf;
  if ((uVar2 != 0) && (uVar2 != 1)) {
    perror("Invalid value.");
                    // WARNING: Subroutine does not return
    exit(1);
  }
  local_1c = param_2 & 0xfff;
  if (uVar2 == 1) {
    local_1c = **(uint **)(param_1 + ((long)((int)local_1c >> 8) + 2) * 8);
  }
  **(int **)(param_1 + ((long)(int)uVar1 + 2) * 8) =
       **(int **)(param_1 + ((long)(int)uVar1 + 2) * 8) - local_1c;
  return;
}



void FUN_001015a1(int *param_1)

{
                    // WARNING: Subroutine does not return
  exit(*param_1);
}



void FUN_001015bd(long param_1,uint param_2)

{
  uint uVar1;
  uint local_1c;
  
  if (((int)param_2 >> 0x14 & 0xfU) != 1) {
    perror("Invalid value.");
                    // WARNING: Subroutine does not return
    exit(1);
  }
  uVar1 = (int)param_2 >> 0xc & 0xf;
  if ((uVar1 != 0) && (uVar1 != 1)) {
    perror("Invalid value.");
                    // WARNING: Subroutine does not return
    exit(1);
  }
  local_1c = param_2 & 0xfff;
  if (uVar1 == 1) {
    local_1c = **(uint **)(param_1 + ((long)((int)local_1c >> 8) + 2) * 8);
  }
  if (local_1c == **(uint **)(param_1 + ((long)(int)((int)param_2 >> 0x10 & 0xf) + 2) * 8)) {
    FUN_001012a9(param_1,1);
  }
  else {
    FUN_001012a9(param_1,0);
  }
  return;
}



void FUN_001016aa(undefined8 param_1,uint param_2)

{
  long in_FS_OFFSET;
  code *apcStack_68 [4];
  code *local_48;
  code *local_40;
  long local_10;
  
  local_10 = *(long *)(in_FS_OFFSET + 0x28);
  apcStack_68[1] = FUN_00101322;
  apcStack_68[2] = FUN_001013e9;
  apcStack_68[3] = FUN_001014c6;
  local_48 = FUN_001015bd;
  local_40 = FUN_001015a1;
  (*apcStack_68[(int)(param_2 >> 0x18)])(param_1,param_2);
  if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) {
                    // WARNING: Subroutine does not return
    __stack_chk_fail();
  }
  return;
}



void FUN_00101737(void)

{
  puts("Bad instruction!");
                    // WARNING: Subroutine does not return
  exit(1);
}



undefined8 FUN_00101754(void)

{
  int iVar1;
  uint uVar2;
  uint uVar3;
  int *piVar4;
  size_t sVar5;
  undefined8 uVar6;
  ulong uVar7;
  long in_FS_OFFSET;
  uint local_140;
  char local_121 [8];
  undefined local_119;
  char local_118 [264];
  long local_10;
  
  local_10 = *(long *)(in_FS_OFFSET + 0x28);
  piVar4 = (int *)FUN_001011c9();
  printf("Give me code to execute: ");
  __isoc99_scanf(&DAT_0010207b,local_118);
  sVar5 = strlen(local_118);
  iVar1 = (int)sVar5;
  if ((sVar5 & 7) == 0) {
    if (iVar1 < 0) {
      iVar1 = iVar1 + 7;
    }
    uVar2 = iVar1 >> 3;
    printf("Executing %d opcodes.\n",(ulong)uVar2);
    for (local_140 = 0; (int)local_140 < (int)uVar2; local_140 = local_140 + 1) {
      strncpy(local_121,local_118 + (int)(local_140 << 3),8);
      local_119 = 0;
      uVar7 = strtol(local_121,(char **)0x0,0x10);
      uVar3 = (uint)uVar7;
      switch(local_140) {
      case 0:
        if (((uVar3 & 0xf000000) != 0x2000000) || ((uVar3 & 0xff0000) != 0x100000)) {
          FUN_00101737();
        }
        break;
      case 1:
        if (((uVar3 & 0xf000000) != 0x2000000) || ((uVar3 & 0xfff) != 0x100)) {
          FUN_00101737();
        }
        break;
      case 2:
        if (((uVar3 & 0xf000000) != 0x3000000) || ((uVar3 & 0xff0000) != 0x110000)) {
          FUN_00101737();
        }
        break;
      case 3:
        if (((uVar3 & 0xf000000) != 0x1000000) || ((uVar3 & 0xff0000) != 0x120000)) {
          FUN_00101737();
        }
        break;
      case 4:
        if (((uVar3 & 0xf000000) != 0x4000000) || ((uVar3 & 0xff0000) != 0x130000)) {
          FUN_00101737();
        }
      }
      if ((uVar3 & 0xfff) < 0x101) {
        FUN_001016aa(piVar4,uVar7 & 0xffffffff);
      }
      else {
        printf("Skipping opcode #%d, value too high (0x%x).\n",(ulong)local_140,
               (ulong)(uVar3 & 0xfff));
      }
    }
    FUN_0010125c(piVar4);
    if ((((*piVar4 == 0x200) && (piVar4[1] == -1)) && (piVar4[2] == -1)) &&
       (((piVar4[3] == 0 && (piVar4[0xc] == 0x10000000)) && (uVar2 == 5)))) {
      printf("This is the right answer! Validate the challenge with HTB{%s}\n",local_118);
    }
    uVar6 = 0;
  }
  else {
    puts("Invalid code.");
    uVar6 = 1;
  }
  if (local_10 == *(long *)(in_FS_OFFSET + 0x28)) {
    return uVar6;
  }
                    // WARNING: Subroutine does not return
  __stack_chk_fail();
}



void _DT_FINI(void)

{
  return;
}