
/* WARNING: Function: __x86.get_pc_thunk.si replaced with injection: get_pc_thunk_si */
/* WARNING: Removing unreachable block (ram,0x00220eeb) */
/* WARNING: Removing unreachable block (ram,0x00220e59) */
/* std::random_device::_M_init(std::string const&) */

void __thiscall std::random_device::_M_init(random_device *this,string *param_1)

{
  int *piVar1;
  int iVar2;
  FILE *pFVar3;
  char *__filename;
  byte in_ID;
  
  __filename = *(char **)param_1;
  iVar2 = std::string::compare(param_1,"default");
  if (iVar2 == 0) {
    if ((uint)((in_ID & 1) != 1) * 0x200000 != (uint)(in_ID & 1) * 0x200000) {
      piVar1 = (int *)cpuid_basic_info(0);
      if ((piVar1[1] == 0x756e6547) && (*piVar1 != 0)) {
        __filename = "/dev/urandom";
        iVar2 = cpuid_Version_info(1);
        if ((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0) {
          *(undefined4 *)this = 0;
          return;
        }
        goto LAB_00220e6d;
      }
    }
    __filename = "/dev/urandom";
  }
  else {
    iVar2 = std::string::compare(param_1,"/dev/urandom");
    if ((iVar2 != 0) && (iVar2 = std::string::compare(param_1,"/dev/random"), iVar2 != 0))
    goto LAB_00220ec6;
  }
LAB_00220e6d:
  pFVar3 = fopen(__filename,"rb");
  *(FILE **)this = pFVar3;
  if (pFVar3 != (FILE *)0x0) {
    return;
  }
LAB_00220ec6:
                    /* WARNING: Subroutine does not return */
  __throw_runtime_error("random_device::random_device(const std::string&)");
}



/* WARNING: Function: __i686.get_pc_thunk.si replaced with injection: get_pc_thunk_si */
/* WARNING: Removing unreachable block (ram,0x00220eeb) */
/* WARNING: Removing unreachable block (ram,0x00220e59) */

void FUN_00220e10(undefined4 *param_1,undefined4 *param_2)

{
  int *piVar1;
  int iVar2;
  FILE *pFVar3;
  char *__filename;
  byte in_ID;
  
  __filename = (char *)*param_2;
  iVar2 = FUN_0021e550(param_2,"default");
  if (iVar2 == 0) {
    if ((uint)((in_ID & 1) != 1) * 0x200000 != (uint)(in_ID & 1) * 0x200000) {
      piVar1 = (int *)cpuid_basic_info(0);
      if ((piVar1[1] == 0x756e6547) && (*piVar1 != 0)) {
        __filename = "/dev/urandom";
        iVar2 = cpuid_Version_info(1);
        if ((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0) {
          *param_1 = 0;
          return;
        }
        goto LAB_00220e6d;
      }
    }
    __filename = "/dev/urandom";
  }
  else {
    iVar2 = FUN_0021e550(param_2,"/dev/urandom");
    if ((iVar2 != 0) && (iVar2 = FUN_0021e550(param_2,"/dev/random"), iVar2 != 0))
    goto LAB_00220ec6;
  }
LAB_00220e6d:
  pFVar3 = fopen(__filename,"rb");
  *param_1 = pFVar3;
  if (pFVar3 != (FILE *)0x0) {
    return;
  }
LAB_00220ec6:
                    /* WARNING: Subroutine does not return */
  FUN_0022c8d0("random_device::random_device(const std::string&)");
}


PUSH EBP
PUSH EDI
PUSH ESI
CALL 0x000559ea
ADD ESI,0x16e1e8
PUSH EBX
SUB ESP,0x14
MOV EBP,dword ptr [ESP + 0x2c]
LEA EAX,[ESI + 0xffefe763]
MOV EDI,dword ptr [EBP]
MOV EBX,ESI
PUSH EAX
PUSH EBP
CALL 0x0021e550
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x00220e98
PUSHFD
PUSHFD
POP EDX
MOV ECX,EDX
XOR EDX,0x200000
PUSH EDX
POPFD
PUSHFD
POP EDX
POPFD
XOR EDX,ECX
AND EDX,0x200000
JZ 0x00220e67
CPUID
CMP EBX,0x756e6547
JNZ 0x00220e67
TEST EAX,EAX
JNZ 0x00220ee0
LEA EDI,[ESI + 0xffefb7a8]
SUB ESP,0x8
LEA EAX,[ESI + 0xfff14b11]
MOV EBX,ESI
PUSH EAX
PUSH EDI
CALL 0x00029600
MOV ECX,dword ptr [ESP + 0x30]
ADD ESP,0x10
MOV dword ptr [ECX],EAX
TEST EAX,EAX
JZ 0x00220ec6
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x8
LEA EAX,[ESI + 0xffefb7a8]
PUSH EAX
PUSH EBP
CALL 0x0021e550
ADD ESP,0x10
TEST EAX,EAX
JZ 0x00220e6d
SUB ESP,0x8
LEA EAX,[ESI + 0xfff15a0a]
PUSH EAX
PUSH EBP
CALL 0x0021e550
ADD ESP,0x10
TEST EAX,EAX
JZ 0x00220e6d
SUB ESP,0xc
LEA EAX,[ESI + 0xfff15a18]
MOV EBX,ESI
PUSH EAX
CALL 0x0022c8d0
MOV EAX,0x1
LEA EDI,[ESI + 0xffefb7a8]
CPUID
AND ECX,0x40000000
JZ 0x00220e6d
MOV EAX,dword ptr [ESP + 0x20]
MOV dword ptr [EAX],0x0
JMP 0x00220e8c
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.si replaced with injection: get_pc_thunk_si */\n/* WARNING: Removing unreachable block (ram,0x00220eeb) */\n/* WARNING: Removing unreachable block (ram,0x00220e59) */\n\nvoid FUN_00220e10(undefined4 *param_1,undefined4 *param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  FILE *pFVar3;\n  char *__filename;\n  byte in_ID;\n  \n  __filename = (char *)*param_2;\n  iVar2 = FUN_0021e550(param_2,"default");\n  if (iVar2 == 0) {\n    if ((uint)((in_ID & 1) != 1) * 0x200000 != (uint)(in_ID & 1) * 0x200000) {\n      piVar1 = (int *)cpuid_basic_info(0);\n      if ((piVar1[1] == 0x756e6547) && (*piVar1 != 0)) {\n        __filename = "/dev/urandom";\n        iVar2 = cpuid_Version_info(1);\n        if ((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0) {\n          *param_1 = 0;\n          return;\n        }\n        goto LAB_00220e6d;\n      }\n    }\n    __filename = "/dev/urandom";\n  }\n  else {\n    iVar2 = FUN_0021e550(param_2,"/dev/urandom");\n    if ((iVar2 != 0) && (iVar2 = FUN_0021e550(param_2,"/dev/random"), iVar2 != 0))\n    goto LAB_00220ec6;\n  }\nLAB_00220e6d:\n  pFVar3 = fopen(__filename,"rb");\n  *param_1 = pFVar3;\n  if (pFVar3 != (FILE *)0x0) {\n    return;\n  }\nLAB_00220ec6:\n                    /* WARNING: Subroutine does not return */\n  FUN_0022c8d0("random_device::random_device(const std::string&)");\n}\n\n" comment comment comment (function_definition "void FUN_00220e10(undefined4 *param_1,undefined4 *param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  FILE *pFVar3;\n  char *__filename;\n  byte in_ID;\n  \n  __filename = (char *)*param_2;\n  iVar2 = FUN_0021e550(param_2,"default");\n  if (iVar2 == 0) {\n    if ((uint)((in_ID & 1) != 1) * 0x200000 != (uint)(in_ID & 1) * 0x200000) {\n      piVar1 = (int *)cpuid_basic_info(0);\n      if ((piVar1[1] == 0x756e6547) && (*piVar1 != 0)) {\n        __filename = "/dev/urandom";\n        iVar2 = cpuid_Version_info(1);\n        if ((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0) {\n          *param_1 = 0;\n          return;\n        }\n        goto LAB_00220e6d;\n      }\n    }\n    __filename = "/dev/urandom";\n  }\n  else {\n    iVar2 = FUN_0021e550(param_2,"/dev/urandom");\n    if ((iVar2 != 0) && (iVar2 = FUN_0021e550(param_2,"/dev/random"), iVar2 != 0))\n    goto LAB_00220ec6;\n  }\nLAB_00220e6d:\n  pFVar3 = fopen(__filename,"rb");\n  *param_1 = pFVar3;\n  if (pFVar3 != (FILE *)0x0) {\n    return;\n  }\nLAB_00220ec6:\n                    /* WARNING: Subroutine does not return */\n  FUN_0022c8d0("random_device::random_device(const std::string&)");\n}" primitive_type (function_declarator "FUN_00220e10(undefined4 *param_1,undefined4 *param_2)" identifier (parameter_list "(undefined4 *param_1,undefined4 *param_2)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  FILE *pFVar3;\n  char *__filename;\n  byte in_ID;\n  \n  __filename = (char *)*param_2;\n  iVar2 = FUN_0021e550(param_2,"default");\n  if (iVar2 == 0) {\n    if ((uint)((in_ID & 1) != 1) * 0x200000 != (uint)(in_ID & 1) * 0x200000) {\n      piVar1 = (int *)cpuid_basic_info(0);\n      if ((piVar1[1] == 0x756e6547) && (*piVar1 != 0)) {\n        __filename = "/dev/urandom";\n        iVar2 = cpuid_Version_info(1);\n        if ((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0) {\n          *param_1 = 0;\n          return;\n        }\n        goto LAB_00220e6d;\n      }\n    }\n    __filename = "/dev/urandom";\n  }\n  else {\n    iVar2 = FUN_0021e550(param_2,"/dev/urandom");\n    if ((iVar2 != 0) && (iVar2 = FUN_0021e550(param_2,"/dev/random"), iVar2 != 0))\n    goto LAB_00220ec6;\n  }\nLAB_00220e6d:\n  pFVar3 = fopen(__filename,"rb");\n  *param_1 = pFVar3;\n  if (pFVar3 != (FILE *)0x0) {\n    return;\n  }\nLAB_00220ec6:\n                    /* WARNING: Subroutine does not return */\n  FUN_0022c8d0("random_device::random_device(const std::string&)");\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "FILE *pFVar3;" type_identifier (pointer_declarator "*pFVar3" * identifier) ;) (declaration "char *__filename;" primitive_type (pointer_declarator "*__filename" * identifier) ;) (declaration "byte in_ID;" type_identifier identifier ;) (expression_statement "__filename = (char *)*param_2;" (assignment_expression "__filename = (char *)*param_2" identifier = (cast_expression "(char *)*param_2" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier))) ;) (expression_statement "iVar2 = FUN_0021e550(param_2,"default");" (assignment_expression "iVar2 = FUN_0021e550(param_2,"default")" identifier = (call_expression "FUN_0021e550(param_2,"default")" identifier (argument_list "(param_2,"default")" ( identifier , (string_literal ""default"" " string_content ") )))) ;) (if_statement "if (iVar2 == 0) {\n    if ((uint)((in_ID & 1) != 1) * 0x200000 != (uint)(in_ID & 1) * 0x200000) {\n      piVar1 = (int *)cpuid_basic_info(0);\n      if ((piVar1[1] == 0x756e6547) && (*piVar1 != 0)) {\n        __filename = "/dev/urandom";\n        iVar2 = cpuid_Version_info(1);\n        if ((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0) {\n          *param_1 = 0;\n          return;\n        }\n        goto LAB_00220e6d;\n      }\n    }\n    __filename = "/dev/urandom";\n  }\n  else {\n    iVar2 = FUN_0021e550(param_2,"/dev/urandom");\n    if ((iVar2 != 0) && (iVar2 = FUN_0021e550(param_2,"/dev/random"), iVar2 != 0))\n    goto LAB_00220ec6;\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    if ((uint)((in_ID & 1) != 1) * 0x200000 != (uint)(in_ID & 1) * 0x200000) {\n      piVar1 = (int *)cpuid_basic_info(0);\n      if ((piVar1[1] == 0x756e6547) && (*piVar1 != 0)) {\n        __filename = "/dev/urandom";\n        iVar2 = cpuid_Version_info(1);\n        if ((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0) {\n          *param_1 = 0;\n          return;\n        }\n        goto LAB_00220e6d;\n      }\n    }\n    __filename = "/dev/urandom";\n  }" { (if_statement "if ((uint)((in_ID & 1) != 1) * 0x200000 != (uint)(in_ID & 1) * 0x200000) {\n      piVar1 = (int *)cpuid_basic_info(0);\n      if ((piVar1[1] == 0x756e6547) && (*piVar1 != 0)) {\n        __filename = "/dev/urandom";\n        iVar2 = cpuid_Version_info(1);\n        if ((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0) {\n          *param_1 = 0;\n          return;\n        }\n        goto LAB_00220e6d;\n      }\n    }" if (parenthesized_expression "((uint)((in_ID & 1) != 1) * 0x200000 != (uint)(in_ID & 1) * 0x200000)" ( (binary_expression "(uint)((in_ID & 1) != 1) * 0x200000 != (uint)(in_ID & 1) * 0x200000" (binary_expression "(uint)((in_ID & 1) != 1) * 0x200000" (call_expression "(uint)((in_ID & 1) != 1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((in_ID & 1) != 1)" ( (binary_expression "(in_ID & 1) != 1" (parenthesized_expression "(in_ID & 1)" ( (binary_expression "in_ID & 1" identifier & number_literal) )) != number_literal) ))) * number_literal) != (binary_expression "(uint)(in_ID & 1) * 0x200000" (call_expression "(uint)(in_ID & 1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(in_ID & 1)" ( (binary_expression "in_ID & 1" identifier & number_literal) ))) * number_literal)) )) (compound_statement "{\n      piVar1 = (int *)cpuid_basic_info(0);\n      if ((piVar1[1] == 0x756e6547) && (*piVar1 != 0)) {\n        __filename = "/dev/urandom";\n        iVar2 = cpuid_Version_info(1);\n        if ((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0) {\n          *param_1 = 0;\n          return;\n        }\n        goto LAB_00220e6d;\n      }\n    }" { (expression_statement "piVar1 = (int *)cpuid_basic_info(0);" (assignment_expression "piVar1 = (int *)cpuid_basic_info(0)" identifier = (cast_expression "(int *)cpuid_basic_info(0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "cpuid_basic_info(0)" identifier (argument_list "(0)" ( number_literal ))))) ;) (if_statement "if ((piVar1[1] == 0x756e6547) && (*piVar1 != 0)) {\n        __filename = "/dev/urandom";\n        iVar2 = cpuid_Version_info(1);\n        if ((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0) {\n          *param_1 = 0;\n          return;\n        }\n        goto LAB_00220e6d;\n      }" if (parenthesized_expression "((piVar1[1] == 0x756e6547) && (*piVar1 != 0))" ( (binary_expression "(piVar1[1] == 0x756e6547) && (*piVar1 != 0)" (parenthesized_expression "(piVar1[1] == 0x756e6547)" ( (binary_expression "piVar1[1] == 0x756e6547" (subscript_expression "piVar1[1]" identifier [ number_literal ]) == number_literal) )) && (parenthesized_expression "(*piVar1 != 0)" ( (binary_expression "*piVar1 != 0" (pointer_expression "*piVar1" * identifier) != number_literal) ))) )) (compound_statement "{\n        __filename = "/dev/urandom";\n        iVar2 = cpuid_Version_info(1);\n        if ((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0) {\n          *param_1 = 0;\n          return;\n        }\n        goto LAB_00220e6d;\n      }" { (expression_statement "__filename = "/dev/urandom";" (assignment_expression "__filename = "/dev/urandom"" identifier = (string_literal ""/dev/urandom"" " string_content ")) ;) (expression_statement "iVar2 = cpuid_Version_info(1);" (assignment_expression "iVar2 = cpuid_Version_info(1)" identifier = (call_expression "cpuid_Version_info(1)" identifier (argument_list "(1)" ( number_literal )))) ;) (if_statement "if ((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0) {\n          *param_1 = 0;\n          return;\n        }" if (parenthesized_expression "((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0)" ( (binary_expression "(*(uint *)(iVar2 + 0xc) & 0x40000000) != 0" (parenthesized_expression "(*(uint *)(iVar2 + 0xc) & 0x40000000)" ( (binary_expression "*(uint *)(iVar2 + 0xc) & 0x40000000" (pointer_expression "*(uint *)(iVar2 + 0xc)" * (cast_expression "(uint *)(iVar2 + 0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0xc)" ( (binary_expression "iVar2 + 0xc" identifier + number_literal) )))) & number_literal) )) != number_literal) )) (compound_statement "{\n          *param_1 = 0;\n          return;\n        }" { (expression_statement "*param_1 = 0;" (assignment_expression "*param_1 = 0" (pointer_expression "*param_1" * identifier) = number_literal) ;) (return_statement "return;" return ;) })) (goto_statement "goto LAB_00220e6d;" goto statement_identifier ;) })) })) (expression_statement "__filename = "/dev/urandom";" (assignment_expression "__filename = "/dev/urandom"" identifier = (string_literal ""/dev/urandom"" " string_content ")) ;) }) (else_clause "else {\n    iVar2 = FUN_0021e550(param_2,"/dev/urandom");\n    if ((iVar2 != 0) && (iVar2 = FUN_0021e550(param_2,"/dev/random"), iVar2 != 0))\n    goto LAB_00220ec6;\n  }" else (compound_statement "{\n    iVar2 = FUN_0021e550(param_2,"/dev/urandom");\n    if ((iVar2 != 0) && (iVar2 = FUN_0021e550(param_2,"/dev/random"), iVar2 != 0))\n    goto LAB_00220ec6;\n  }" { (expression_statement "iVar2 = FUN_0021e550(param_2,"/dev/urandom");" (assignment_expression "iVar2 = FUN_0021e550(param_2,"/dev/urandom")" identifier = (call_expression "FUN_0021e550(param_2,"/dev/urandom")" identifier (argument_list "(param_2,"/dev/urandom")" ( identifier , (string_literal ""/dev/urandom"" " string_content ") )))) ;) (if_statement "if ((iVar2 != 0) && (iVar2 = FUN_0021e550(param_2,"/dev/random"), iVar2 != 0))\n    goto LAB_00220ec6;" if (parenthesized_expression "((iVar2 != 0) && (iVar2 = FUN_0021e550(param_2,"/dev/random"), iVar2 != 0))" ( (binary_expression "(iVar2 != 0) && (iVar2 = FUN_0021e550(param_2,"/dev/random"), iVar2 != 0)" (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) && (parenthesized_expression "(iVar2 = FUN_0021e550(param_2,"/dev/random"), iVar2 != 0)" ( (comma_expression "iVar2 = FUN_0021e550(param_2,"/dev/random"), iVar2 != 0" (assignment_expression "iVar2 = FUN_0021e550(param_2,"/dev/random")" identifier = (call_expression "FUN_0021e550(param_2,"/dev/random")" identifier (argument_list "(param_2,"/dev/random")" ( identifier , (string_literal ""/dev/random"" " string_content ") )))) , (binary_expression "iVar2 != 0" identifier != number_literal)) ))) )) (goto_statement "goto LAB_00220ec6;" goto statement_identifier ;)) }))) (labeled_statement "LAB_00220e6d:\n  pFVar3 = fopen(__filename,"rb");" statement_identifier : (expression_statement "pFVar3 = fopen(__filename,"rb");" (assignment_expression "pFVar3 = fopen(__filename,"rb")" identifier = (call_expression "fopen(__filename,"rb")" identifier (argument_list "(__filename,"rb")" ( identifier , (string_literal ""rb"" " string_content ") )))) ;)) (expression_statement "*param_1 = pFVar3;" (assignment_expression "*param_1 = pFVar3" (pointer_expression "*param_1" * identifier) = identifier) ;) (if_statement "if (pFVar3 != (FILE *)0x0) {\n    return;\n  }" if (parenthesized_expression "(pFVar3 != (FILE *)0x0)" ( (binary_expression "pFVar3 != (FILE *)0x0" identifier != (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (labeled_statement "LAB_00220ec6:\n                    /* WARNING: Subroutine does not return */\n  FUN_0022c8d0("random_device::random_device(const std::string&)");" statement_identifier : comment (expression_statement "FUN_0022c8d0("random_device::random_device(const std::string&)");" (call_expression "FUN_0022c8d0("random_device::random_device(const std::string&)")" identifier (argument_list "("random_device::random_device(const std::string&)")" ( (string_literal ""random_device::random_device(const std::string&)"" " string_content ") ))) ;)) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.si replaced with injection: get_pc_thunk_si */\n/* WARNING: Removing unreachable block (ram,0x00220eeb) */\n/* WARNING: Removing unreachable block (ram,0x00220e59) */\n/* std::random_device::_M_init(std::string const&) */\n\nvoid __thiscall std::random_device::_M_init(random_device *this,string *param_1)\n\n{\n  int *piVar1;\n  int iVar2;\n  FILE *pFVar3;\n  char *__filename;\n  byte in_ID;\n  \n  __filename = *(char **)param_1;\n  iVar2 = std::string::compare(param_1,"default");\n  if (iVar2 == 0) {\n    if ((uint)((in_ID & 1) != 1) * 0x200000 != (uint)(in_ID & 1) * 0x200000) {\n      piVar1 = (int *)cpuid_basic_info(0);\n      if ((piVar1[1] == 0x756e6547) && (*piVar1 != 0)) {\n        __filename = "/dev/urandom";\n        iVar2 = cpuid_Version_info(1);\n        if ((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0) {\n          *(undefined4 *)this = 0;\n          return;\n        }\n        goto LAB_00220e6d;\n      }\n    }\n    __filename = "/dev/urandom";\n  }\n  else {\n    iVar2 = std::string::compare(param_1,"/dev/urandom");\n    if ((iVar2 != 0) && (iVar2 = std::string::compare(param_1,"/dev/random"), iVar2 != 0))\n    goto LAB_00220ec6;\n  }\nLAB_00220e6d:\n  pFVar3 = fopen(__filename,"rb");\n  *(FILE **)this = pFVar3;\n  if (pFVar3 != (FILE *)0x0) {\n    return;\n  }\nLAB_00220ec6:\n                    /* WARNING: Subroutine does not return */\n  __throw_runtime_error("random_device::random_device(const std::string&)");\n}\n\n" comment comment comment comment (function_definition "void __thiscall std::random_device::_M_init(random_device *this,string *param_1)\n\n{\n  int *piVar1;\n  int iVar2;\n  FILE *pFVar3;\n  char *__filename;\n  byte in_ID;\n  \n  __filename = *(char **)param_1;\n  iVar2 = std::string::compare(param_1,"default");\n  if (iVar2 == 0) {\n    if ((uint)((in_ID & 1) != 1) * 0x200000 != (uint)(in_ID & 1) * 0x200000) {\n      piVar1 = (int *)cpuid_basic_info(0);\n      if ((piVar1[1] == 0x756e6547) && (*piVar1 != 0)) {\n        __filename = "/dev/urandom";\n        iVar2 = cpuid_Version_info(1);\n        if ((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0) {\n          *(undefined4 *)this = 0;\n          return;\n        }\n        goto LAB_00220e6d;\n      }\n    }\n    __filename = "/dev/urandom";\n  }\n  else {\n    iVar2 = std::string::compare(param_1,"/dev/urandom");\n    if ((iVar2 != 0) && (iVar2 = std::string::compare(param_1,"/dev/random"), iVar2 != 0))\n    goto LAB_00220ec6;\n  }\nLAB_00220e6d:\n  pFVar3 = fopen(__filename,"rb");\n  *(FILE **)this = pFVar3;\n  if (pFVar3 != (FILE *)0x0) {\n    return;\n  }\nLAB_00220ec6:\n                    /* WARNING: Subroutine does not return */\n  __throw_runtime_error("random_device::random_device(const std::string&)");\n}" primitive_type (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::random_device::" identifier : : identifier : :) (function_declarator "_M_init(random_device *this,string *param_1)" identifier (parameter_list "(random_device *this,string *param_1)" ( (parameter_declaration "random_device *this" type_identifier (pointer_declarator "*this" * identifier)) , (parameter_declaration "string *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  FILE *pFVar3;\n  char *__filename;\n  byte in_ID;\n  \n  __filename = *(char **)param_1;\n  iVar2 = std::string::compare(param_1,"default");\n  if (iVar2 == 0) {\n    if ((uint)((in_ID & 1) != 1) * 0x200000 != (uint)(in_ID & 1) * 0x200000) {\n      piVar1 = (int *)cpuid_basic_info(0);\n      if ((piVar1[1] == 0x756e6547) && (*piVar1 != 0)) {\n        __filename = "/dev/urandom";\n        iVar2 = cpuid_Version_info(1);\n        if ((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0) {\n          *(undefined4 *)this = 0;\n          return;\n        }\n        goto LAB_00220e6d;\n      }\n    }\n    __filename = "/dev/urandom";\n  }\n  else {\n    iVar2 = std::string::compare(param_1,"/dev/urandom");\n    if ((iVar2 != 0) && (iVar2 = std::string::compare(param_1,"/dev/random"), iVar2 != 0))\n    goto LAB_00220ec6;\n  }\nLAB_00220e6d:\n  pFVar3 = fopen(__filename,"rb");\n  *(FILE **)this = pFVar3;\n  if (pFVar3 != (FILE *)0x0) {\n    return;\n  }\nLAB_00220ec6:\n                    /* WARNING: Subroutine does not return */\n  __throw_runtime_error("random_device::random_device(const std::string&)");\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "FILE *pFVar3;" type_identifier (pointer_declarator "*pFVar3" * identifier) ;) (declaration "char *__filename;" primitive_type (pointer_declarator "*__filename" * identifier) ;) (declaration "byte in_ID;" type_identifier identifier ;) (expression_statement "__filename = *(char **)param_1;" (assignment_expression "__filename = *(char **)param_1" identifier = (pointer_expression "*(char **)param_1" * (cast_expression "(char **)param_1" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (ERROR "iVar2 = std::" (assignment_expression "iVar2 = std" identifier = identifier) : :) (labeled_statement "string::compare(param_1,"default");" statement_identifier : (ERROR ":" :) (expression_statement "compare(param_1,"default");" (call_expression "compare(param_1,"default")" identifier (argument_list "(param_1,"default")" ( identifier , (string_literal ""default"" " string_content ") ))) ;)) (if_statement "if (iVar2 == 0) {\n    if ((uint)((in_ID & 1) != 1) * 0x200000 != (uint)(in_ID & 1) * 0x200000) {\n      piVar1 = (int *)cpuid_basic_info(0);\n      if ((piVar1[1] == 0x756e6547) && (*piVar1 != 0)) {\n        __filename = "/dev/urandom";\n        iVar2 = cpuid_Version_info(1);\n        if ((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0) {\n          *(undefined4 *)this = 0;\n          return;\n        }\n        goto LAB_00220e6d;\n      }\n    }\n    __filename = "/dev/urandom";\n  }\n  else {\n    iVar2 = std::string::compare(param_1,"/dev/urandom");\n    if ((iVar2 != 0) && (iVar2 = std::string::compare(param_1,"/dev/random"), iVar2 != 0))\n    goto LAB_00220ec6;\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    if ((uint)((in_ID & 1) != 1) * 0x200000 != (uint)(in_ID & 1) * 0x200000) {\n      piVar1 = (int *)cpuid_basic_info(0);\n      if ((piVar1[1] == 0x756e6547) && (*piVar1 != 0)) {\n        __filename = "/dev/urandom";\n        iVar2 = cpuid_Version_info(1);\n        if ((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0) {\n          *(undefined4 *)this = 0;\n          return;\n        }\n        goto LAB_00220e6d;\n      }\n    }\n    __filename = "/dev/urandom";\n  }" { (if_statement "if ((uint)((in_ID & 1) != 1) * 0x200000 != (uint)(in_ID & 1) * 0x200000) {\n      piVar1 = (int *)cpuid_basic_info(0);\n      if ((piVar1[1] == 0x756e6547) && (*piVar1 != 0)) {\n        __filename = "/dev/urandom";\n        iVar2 = cpuid_Version_info(1);\n        if ((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0) {\n          *(undefined4 *)this = 0;\n          return;\n        }\n        goto LAB_00220e6d;\n      }\n    }" if (parenthesized_expression "((uint)((in_ID & 1) != 1) * 0x200000 != (uint)(in_ID & 1) * 0x200000)" ( (binary_expression "(uint)((in_ID & 1) != 1) * 0x200000 != (uint)(in_ID & 1) * 0x200000" (binary_expression "(uint)((in_ID & 1) != 1) * 0x200000" (call_expression "(uint)((in_ID & 1) != 1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((in_ID & 1) != 1)" ( (binary_expression "(in_ID & 1) != 1" (parenthesized_expression "(in_ID & 1)" ( (binary_expression "in_ID & 1" identifier & number_literal) )) != number_literal) ))) * number_literal) != (binary_expression "(uint)(in_ID & 1) * 0x200000" (call_expression "(uint)(in_ID & 1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(in_ID & 1)" ( (binary_expression "in_ID & 1" identifier & number_literal) ))) * number_literal)) )) (compound_statement "{\n      piVar1 = (int *)cpuid_basic_info(0);\n      if ((piVar1[1] == 0x756e6547) && (*piVar1 != 0)) {\n        __filename = "/dev/urandom";\n        iVar2 = cpuid_Version_info(1);\n        if ((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0) {\n          *(undefined4 *)this = 0;\n          return;\n        }\n        goto LAB_00220e6d;\n      }\n    }" { (expression_statement "piVar1 = (int *)cpuid_basic_info(0);" (assignment_expression "piVar1 = (int *)cpuid_basic_info(0)" identifier = (cast_expression "(int *)cpuid_basic_info(0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "cpuid_basic_info(0)" identifier (argument_list "(0)" ( number_literal ))))) ;) (if_statement "if ((piVar1[1] == 0x756e6547) && (*piVar1 != 0)) {\n        __filename = "/dev/urandom";\n        iVar2 = cpuid_Version_info(1);\n        if ((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0) {\n          *(undefined4 *)this = 0;\n          return;\n        }\n        goto LAB_00220e6d;\n      }" if (parenthesized_expression "((piVar1[1] == 0x756e6547) && (*piVar1 != 0))" ( (binary_expression "(piVar1[1] == 0x756e6547) && (*piVar1 != 0)" (parenthesized_expression "(piVar1[1] == 0x756e6547)" ( (binary_expression "piVar1[1] == 0x756e6547" (subscript_expression "piVar1[1]" identifier [ number_literal ]) == number_literal) )) && (parenthesized_expression "(*piVar1 != 0)" ( (binary_expression "*piVar1 != 0" (pointer_expression "*piVar1" * identifier) != number_literal) ))) )) (compound_statement "{\n        __filename = "/dev/urandom";\n        iVar2 = cpuid_Version_info(1);\n        if ((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0) {\n          *(undefined4 *)this = 0;\n          return;\n        }\n        goto LAB_00220e6d;\n      }" { (expression_statement "__filename = "/dev/urandom";" (assignment_expression "__filename = "/dev/urandom"" identifier = (string_literal ""/dev/urandom"" " string_content ")) ;) (expression_statement "iVar2 = cpuid_Version_info(1);" (assignment_expression "iVar2 = cpuid_Version_info(1)" identifier = (call_expression "cpuid_Version_info(1)" identifier (argument_list "(1)" ( number_literal )))) ;) (if_statement "if ((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0) {\n          *(undefined4 *)this = 0;\n          return;\n        }" if (parenthesized_expression "((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0)" ( (binary_expression "(*(uint *)(iVar2 + 0xc) & 0x40000000) != 0" (parenthesized_expression "(*(uint *)(iVar2 + 0xc) & 0x40000000)" ( (binary_expression "*(uint *)(iVar2 + 0xc) & 0x40000000" (pointer_expression "*(uint *)(iVar2 + 0xc)" * (cast_expression "(uint *)(iVar2 + 0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0xc)" ( (binary_expression "iVar2 + 0xc" identifier + number_literal) )))) & number_literal) )) != number_literal) )) (compound_statement "{\n          *(undefined4 *)this = 0;\n          return;\n        }" { (expression_statement "*(undefined4 *)this = 0;" (assignment_expression "*(undefined4 *)this = 0" (pointer_expression "*(undefined4 *)this" * (cast_expression "(undefined4 *)this" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = number_literal) ;) (return_statement "return;" return ;) })) (goto_statement "goto LAB_00220e6d;" goto statement_identifier ;) })) })) (expression_statement "__filename = "/dev/urandom";" (assignment_expression "__filename = "/dev/urandom"" identifier = (string_literal ""/dev/urandom"" " string_content ")) ;) }) (else_clause "else {\n    iVar2 = std::string::compare(param_1,"/dev/urandom");\n    if ((iVar2 != 0) && (iVar2 = std::string::compare(param_1,"/dev/random"), iVar2 != 0))\n    goto LAB_00220ec6;\n  }" else (compound_statement "{\n    iVar2 = std::string::compare(param_1,"/dev/urandom");\n    if ((iVar2 != 0) && (iVar2 = std::string::compare(param_1,"/dev/random"), iVar2 != 0))\n    goto LAB_00220ec6;\n  }" { (ERROR "iVar2 = std::" (assignment_expression "iVar2 = std" identifier = identifier) : :) (labeled_statement "string::compare(param_1,"/dev/urandom");" statement_identifier : (ERROR ":" :) (expression_statement "compare(param_1,"/dev/urandom");" (call_expression "compare(param_1,"/dev/urandom")" identifier (argument_list "(param_1,"/dev/urandom")" ( identifier , (string_literal ""/dev/urandom"" " string_content ") ))) ;)) (if_statement "if ((iVar2 != 0) && (iVar2 = std::string::compare(param_1,"/dev/random"), iVar2 != 0))\n    goto LAB_00220ec6;" if (parenthesized_expression "((iVar2 != 0) && (iVar2 = std::string::compare(param_1,"/dev/random"), iVar2 != 0))" ( (binary_expression "(iVar2 != 0) && (iVar2 = std::string::compare(param_1,"/dev/random"), iVar2 != 0)" (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) && (parenthesized_expression "(iVar2 = std::string::compare(param_1,"/dev/random"), iVar2 != 0)" ( (ERROR "iVar2 = std::string::" (assignment_expression "iVar2 = std" identifier = identifier) : : identifier : :) (comma_expression "compare(param_1,"/dev/random"), iVar2 != 0" (call_expression "compare(param_1,"/dev/random")" identifier (argument_list "(param_1,"/dev/random")" ( identifier , (string_literal ""/dev/random"" " string_content ") ))) , (binary_expression "iVar2 != 0" identifier != number_literal)) ))) )) (goto_statement "goto LAB_00220ec6;" goto statement_identifier ;)) }))) (labeled_statement "LAB_00220e6d:\n  pFVar3 = fopen(__filename,"rb");" statement_identifier : (expression_statement "pFVar3 = fopen(__filename,"rb");" (assignment_expression "pFVar3 = fopen(__filename,"rb")" identifier = (call_expression "fopen(__filename,"rb")" identifier (argument_list "(__filename,"rb")" ( identifier , (string_literal ""rb"" " string_content ") )))) ;)) (expression_statement "*(FILE **)this = pFVar3;" (assignment_expression "*(FILE **)this = pFVar3" (pointer_expression "*(FILE **)this" * (cast_expression "(FILE **)this" ( (type_descriptor "FILE **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) = identifier) ;) (if_statement "if (pFVar3 != (FILE *)0x0) {\n    return;\n  }" if (parenthesized_expression "(pFVar3 != (FILE *)0x0)" ( (binary_expression "pFVar3 != (FILE *)0x0" identifier != (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (labeled_statement "LAB_00220ec6:\n                    /* WARNING: Subroutine does not return */\n  __throw_runtime_error("random_device::random_device(const std::string&)");" statement_identifier : comment (expression_statement "__throw_runtime_error("random_device::random_device(const std::string&)");" (call_expression "__throw_runtime_error("random_device::random_device(const std::string&)")" identifier (argument_list "("random_device::random_device(const std::string&)")" ( (string_literal ""random_device::random_device(const std::string&)"" " string_content ") ))) ;)) })))
(translation_unit "void FUN_00220e10(undefined4 *param_1,undefined4 *param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  FILE *pFVar3;\n  char *__filename;\n  byte in_ID;\n  \n  __filename = (char *)*param_2;\n  iVar2 = FUN_0021e550(param_2,"default");\n  if (iVar2 == 0) {\n    if ((uint)((in_ID & 1) != 1) * 0x200000 != (uint)(in_ID & 1) * 0x200000) {\n      piVar1 = (int *)cpuid_basic_info(0);\n      if ((piVar1[1] == 0x756e6547) && (*piVar1 != 0)) {\n        __filename = "/dev/urandom";\n        iVar2 = cpuid_Version_info(1);\n        if ((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0) {\n          *param_1 = 0;\n          return;\n        }\n        goto LAB_00220e6d;\n      }\n    }\n    __filename = "/dev/urandom";\n  }\n  else {\n    iVar2 = FUN_0021e550(param_2,"/dev/urandom");\n    if ((iVar2 != 0) && (iVar2 = FUN_0021e550(param_2,"/dev/random"), iVar2 != 0))\n    goto LAB_00220ec6;\n  }\nLAB_00220e6d:\n  pFVar3 = fopen(__filename,"rb");\n  *param_1 = pFVar3;\n  if (pFVar3 != (FILE *)0x0) {\n    return;\n  }\nLAB_00220ec6:\n                    \n  FUN_0022c8d0("random_device::random_device(const std::string&)");\n}\n\n" (function_definition "void FUN_00220e10(undefined4 *param_1,undefined4 *param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  FILE *pFVar3;\n  char *__filename;\n  byte in_ID;\n  \n  __filename = (char *)*param_2;\n  iVar2 = FUN_0021e550(param_2,"default");\n  if (iVar2 == 0) {\n    if ((uint)((in_ID & 1) != 1) * 0x200000 != (uint)(in_ID & 1) * 0x200000) {\n      piVar1 = (int *)cpuid_basic_info(0);\n      if ((piVar1[1] == 0x756e6547) && (*piVar1 != 0)) {\n        __filename = "/dev/urandom";\n        iVar2 = cpuid_Version_info(1);\n        if ((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0) {\n          *param_1 = 0;\n          return;\n        }\n        goto LAB_00220e6d;\n      }\n    }\n    __filename = "/dev/urandom";\n  }\n  else {\n    iVar2 = FUN_0021e550(param_2,"/dev/urandom");\n    if ((iVar2 != 0) && (iVar2 = FUN_0021e550(param_2,"/dev/random"), iVar2 != 0))\n    goto LAB_00220ec6;\n  }\nLAB_00220e6d:\n  pFVar3 = fopen(__filename,"rb");\n  *param_1 = pFVar3;\n  if (pFVar3 != (FILE *)0x0) {\n    return;\n  }\nLAB_00220ec6:\n                    \n  FUN_0022c8d0("random_device::random_device(const std::string&)");\n}" primitive_type (function_declarator "FUN_00220e10(undefined4 *param_1,undefined4 *param_2)" identifier (parameter_list "(undefined4 *param_1,undefined4 *param_2)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  FILE *pFVar3;\n  char *__filename;\n  byte in_ID;\n  \n  __filename = (char *)*param_2;\n  iVar2 = FUN_0021e550(param_2,"default");\n  if (iVar2 == 0) {\n    if ((uint)((in_ID & 1) != 1) * 0x200000 != (uint)(in_ID & 1) * 0x200000) {\n      piVar1 = (int *)cpuid_basic_info(0);\n      if ((piVar1[1] == 0x756e6547) && (*piVar1 != 0)) {\n        __filename = "/dev/urandom";\n        iVar2 = cpuid_Version_info(1);\n        if ((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0) {\n          *param_1 = 0;\n          return;\n        }\n        goto LAB_00220e6d;\n      }\n    }\n    __filename = "/dev/urandom";\n  }\n  else {\n    iVar2 = FUN_0021e550(param_2,"/dev/urandom");\n    if ((iVar2 != 0) && (iVar2 = FUN_0021e550(param_2,"/dev/random"), iVar2 != 0))\n    goto LAB_00220ec6;\n  }\nLAB_00220e6d:\n  pFVar3 = fopen(__filename,"rb");\n  *param_1 = pFVar3;\n  if (pFVar3 != (FILE *)0x0) {\n    return;\n  }\nLAB_00220ec6:\n                    \n  FUN_0022c8d0("random_device::random_device(const std::string&)");\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "FILE *pFVar3;" type_identifier (pointer_declarator "*pFVar3" * identifier) ;) (declaration "char *__filename;" primitive_type (pointer_declarator "*__filename" * identifier) ;) (declaration "byte in_ID;" type_identifier identifier ;) (expression_statement "__filename = (char *)*param_2;" (assignment_expression "__filename = (char *)*param_2" identifier = (cast_expression "(char *)*param_2" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier))) ;) (expression_statement "iVar2 = FUN_0021e550(param_2,"default");" (assignment_expression "iVar2 = FUN_0021e550(param_2,"default")" identifier = (call_expression "FUN_0021e550(param_2,"default")" identifier (argument_list "(param_2,"default")" ( identifier , (string_literal ""default"" " string_content ") )))) ;) (if_statement "if (iVar2 == 0) {\n    if ((uint)((in_ID & 1) != 1) * 0x200000 != (uint)(in_ID & 1) * 0x200000) {\n      piVar1 = (int *)cpuid_basic_info(0);\n      if ((piVar1[1] == 0x756e6547) && (*piVar1 != 0)) {\n        __filename = "/dev/urandom";\n        iVar2 = cpuid_Version_info(1);\n        if ((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0) {\n          *param_1 = 0;\n          return;\n        }\n        goto LAB_00220e6d;\n      }\n    }\n    __filename = "/dev/urandom";\n  }\n  else {\n    iVar2 = FUN_0021e550(param_2,"/dev/urandom");\n    if ((iVar2 != 0) && (iVar2 = FUN_0021e550(param_2,"/dev/random"), iVar2 != 0))\n    goto LAB_00220ec6;\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    if ((uint)((in_ID & 1) != 1) * 0x200000 != (uint)(in_ID & 1) * 0x200000) {\n      piVar1 = (int *)cpuid_basic_info(0);\n      if ((piVar1[1] == 0x756e6547) && (*piVar1 != 0)) {\n        __filename = "/dev/urandom";\n        iVar2 = cpuid_Version_info(1);\n        if ((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0) {\n          *param_1 = 0;\n          return;\n        }\n        goto LAB_00220e6d;\n      }\n    }\n    __filename = "/dev/urandom";\n  }" { (if_statement "if ((uint)((in_ID & 1) != 1) * 0x200000 != (uint)(in_ID & 1) * 0x200000) {\n      piVar1 = (int *)cpuid_basic_info(0);\n      if ((piVar1[1] == 0x756e6547) && (*piVar1 != 0)) {\n        __filename = "/dev/urandom";\n        iVar2 = cpuid_Version_info(1);\n        if ((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0) {\n          *param_1 = 0;\n          return;\n        }\n        goto LAB_00220e6d;\n      }\n    }" if (parenthesized_expression "((uint)((in_ID & 1) != 1) * 0x200000 != (uint)(in_ID & 1) * 0x200000)" ( (binary_expression "(uint)((in_ID & 1) != 1) * 0x200000 != (uint)(in_ID & 1) * 0x200000" (binary_expression "(uint)((in_ID & 1) != 1) * 0x200000" (call_expression "(uint)((in_ID & 1) != 1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((in_ID & 1) != 1)" ( (binary_expression "(in_ID & 1) != 1" (parenthesized_expression "(in_ID & 1)" ( (binary_expression "in_ID & 1" identifier & number_literal) )) != number_literal) ))) * number_literal) != (binary_expression "(uint)(in_ID & 1) * 0x200000" (call_expression "(uint)(in_ID & 1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(in_ID & 1)" ( (binary_expression "in_ID & 1" identifier & number_literal) ))) * number_literal)) )) (compound_statement "{\n      piVar1 = (int *)cpuid_basic_info(0);\n      if ((piVar1[1] == 0x756e6547) && (*piVar1 != 0)) {\n        __filename = "/dev/urandom";\n        iVar2 = cpuid_Version_info(1);\n        if ((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0) {\n          *param_1 = 0;\n          return;\n        }\n        goto LAB_00220e6d;\n      }\n    }" { (expression_statement "piVar1 = (int *)cpuid_basic_info(0);" (assignment_expression "piVar1 = (int *)cpuid_basic_info(0)" identifier = (cast_expression "(int *)cpuid_basic_info(0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "cpuid_basic_info(0)" identifier (argument_list "(0)" ( number_literal ))))) ;) (if_statement "if ((piVar1[1] == 0x756e6547) && (*piVar1 != 0)) {\n        __filename = "/dev/urandom";\n        iVar2 = cpuid_Version_info(1);\n        if ((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0) {\n          *param_1 = 0;\n          return;\n        }\n        goto LAB_00220e6d;\n      }" if (parenthesized_expression "((piVar1[1] == 0x756e6547) && (*piVar1 != 0))" ( (binary_expression "(piVar1[1] == 0x756e6547) && (*piVar1 != 0)" (parenthesized_expression "(piVar1[1] == 0x756e6547)" ( (binary_expression "piVar1[1] == 0x756e6547" (subscript_expression "piVar1[1]" identifier [ number_literal ]) == number_literal) )) && (parenthesized_expression "(*piVar1 != 0)" ( (binary_expression "*piVar1 != 0" (pointer_expression "*piVar1" * identifier) != number_literal) ))) )) (compound_statement "{\n        __filename = "/dev/urandom";\n        iVar2 = cpuid_Version_info(1);\n        if ((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0) {\n          *param_1 = 0;\n          return;\n        }\n        goto LAB_00220e6d;\n      }" { (expression_statement "__filename = "/dev/urandom";" (assignment_expression "__filename = "/dev/urandom"" identifier = (string_literal ""/dev/urandom"" " string_content ")) ;) (expression_statement "iVar2 = cpuid_Version_info(1);" (assignment_expression "iVar2 = cpuid_Version_info(1)" identifier = (call_expression "cpuid_Version_info(1)" identifier (argument_list "(1)" ( number_literal )))) ;) (if_statement "if ((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0) {\n          *param_1 = 0;\n          return;\n        }" if (parenthesized_expression "((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0)" ( (binary_expression "(*(uint *)(iVar2 + 0xc) & 0x40000000) != 0" (parenthesized_expression "(*(uint *)(iVar2 + 0xc) & 0x40000000)" ( (binary_expression "*(uint *)(iVar2 + 0xc) & 0x40000000" (pointer_expression "*(uint *)(iVar2 + 0xc)" * (cast_expression "(uint *)(iVar2 + 0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0xc)" ( (binary_expression "iVar2 + 0xc" identifier + number_literal) )))) & number_literal) )) != number_literal) )) (compound_statement "{\n          *param_1 = 0;\n          return;\n        }" { (expression_statement "*param_1 = 0;" (assignment_expression "*param_1 = 0" (pointer_expression "*param_1" * identifier) = number_literal) ;) (return_statement "return;" return ;) })) (goto_statement "goto LAB_00220e6d;" goto statement_identifier ;) })) })) (expression_statement "__filename = "/dev/urandom";" (assignment_expression "__filename = "/dev/urandom"" identifier = (string_literal ""/dev/urandom"" " string_content ")) ;) }) (else_clause "else {\n    iVar2 = FUN_0021e550(param_2,"/dev/urandom");\n    if ((iVar2 != 0) && (iVar2 = FUN_0021e550(param_2,"/dev/random"), iVar2 != 0))\n    goto LAB_00220ec6;\n  }" else (compound_statement "{\n    iVar2 = FUN_0021e550(param_2,"/dev/urandom");\n    if ((iVar2 != 0) && (iVar2 = FUN_0021e550(param_2,"/dev/random"), iVar2 != 0))\n    goto LAB_00220ec6;\n  }" { (expression_statement "iVar2 = FUN_0021e550(param_2,"/dev/urandom");" (assignment_expression "iVar2 = FUN_0021e550(param_2,"/dev/urandom")" identifier = (call_expression "FUN_0021e550(param_2,"/dev/urandom")" identifier (argument_list "(param_2,"/dev/urandom")" ( identifier , (string_literal ""/dev/urandom"" " string_content ") )))) ;) (if_statement "if ((iVar2 != 0) && (iVar2 = FUN_0021e550(param_2,"/dev/random"), iVar2 != 0))\n    goto LAB_00220ec6;" if (parenthesized_expression "((iVar2 != 0) && (iVar2 = FUN_0021e550(param_2,"/dev/random"), iVar2 != 0))" ( (binary_expression "(iVar2 != 0) && (iVar2 = FUN_0021e550(param_2,"/dev/random"), iVar2 != 0)" (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) && (parenthesized_expression "(iVar2 = FUN_0021e550(param_2,"/dev/random"), iVar2 != 0)" ( (comma_expression "iVar2 = FUN_0021e550(param_2,"/dev/random"), iVar2 != 0" (assignment_expression "iVar2 = FUN_0021e550(param_2,"/dev/random")" identifier = (call_expression "FUN_0021e550(param_2,"/dev/random")" identifier (argument_list "(param_2,"/dev/random")" ( identifier , (string_literal ""/dev/random"" " string_content ") )))) , (binary_expression "iVar2 != 0" identifier != number_literal)) ))) )) (goto_statement "goto LAB_00220ec6;" goto statement_identifier ;)) }))) (labeled_statement "LAB_00220e6d:\n  pFVar3 = fopen(__filename,"rb");" statement_identifier : (expression_statement "pFVar3 = fopen(__filename,"rb");" (assignment_expression "pFVar3 = fopen(__filename,"rb")" identifier = (call_expression "fopen(__filename,"rb")" identifier (argument_list "(__filename,"rb")" ( identifier , (string_literal ""rb"" " string_content ") )))) ;)) (expression_statement "*param_1 = pFVar3;" (assignment_expression "*param_1 = pFVar3" (pointer_expression "*param_1" * identifier) = identifier) ;) (if_statement "if (pFVar3 != (FILE *)0x0) {\n    return;\n  }" if (parenthesized_expression "(pFVar3 != (FILE *)0x0)" ( (binary_expression "pFVar3 != (FILE *)0x0" identifier != (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (labeled_statement "LAB_00220ec6:\n                    \n  FUN_0022c8d0("random_device::random_device(const std::string&)");" statement_identifier : (expression_statement "FUN_0022c8d0("random_device::random_device(const std::string&)");" (call_expression "FUN_0022c8d0("random_device::random_device(const std::string&)")" identifier (argument_list "("random_device::random_device(const std::string&)")" ( (string_literal ""random_device::random_device(const std::string&)"" " string_content ") ))) ;)) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) ))) * LIT) != (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT & LIT) ))) * LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == LIT) )) && (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (string_literal " string_content ")) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) != LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (return_statement return ;) })) (goto_statement goto statement_identifier ;) })) })) (expression_statement (assignment_expression IDENT = (string_literal " string_content ")) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") )))) ;) (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 ( IDENT , (string_literal " string_content ") )))) , (binary_expression IDENT != LIT)) ))) )) (goto_statement goto statement_identifier ;)) }))) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") )))) ;)) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (return_statement return ;) })) (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") ))) ;)) })))
(function_definition "void FUN_00220e10(undefined4 *param_1,undefined4 *param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  FILE *pFVar3;\n  char *__filename;\n  byte in_ID;\n  \n  __filename = (char *)*param_2;\n  iVar2 = FUN_0021e550(param_2,"default");\n  if (iVar2 == 0) {\n    if ((uint)((in_ID & 1) != 1) * 0x200000 != (uint)(in_ID & 1) * 0x200000) {\n      piVar1 = (int *)cpuid_basic_info(0);\n      if ((piVar1[1] == 0x756e6547) && (*piVar1 != 0)) {\n        __filename = "/dev/urandom";\n        iVar2 = cpuid_Version_info(1);\n        if ((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0) {\n          *param_1 = 0;\n          return;\n        }\n        goto LAB_00220e6d;\n      }\n    }\n    __filename = "/dev/urandom";\n  }\n  else {\n    iVar2 = FUN_0021e550(param_2,"/dev/urandom");\n    if ((iVar2 != 0) && (iVar2 = FUN_0021e550(param_2,"/dev/random"), iVar2 != 0))\n    goto LAB_00220ec6;\n  }\nLAB_00220e6d:\n  pFVar3 = fopen(__filename,"rb");\n  *param_1 = pFVar3;\n  if (pFVar3 != (FILE *)0x0) {\n    return;\n  }\nLAB_00220ec6:\n                    \n  FUN_0022c8d0("random_device::random_device(const std::string&)");\n}" (primitive_type "void") (function_declarator "FUN_00220e10(undefined4 *param_1,undefined4 *param_2)" (identifier "FUN_00220e10") (parameter_list "(undefined4 *param_1,undefined4 *param_2)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "undefined4 *param_2" (type_identifier "undefined4") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  FILE *pFVar3;\n  char *__filename;\n  byte in_ID;\n  \n  __filename = (char *)*param_2;\n  iVar2 = FUN_0021e550(param_2,"default");\n  if (iVar2 == 0) {\n    if ((uint)((in_ID & 1) != 1) * 0x200000 != (uint)(in_ID & 1) * 0x200000) {\n      piVar1 = (int *)cpuid_basic_info(0);\n      if ((piVar1[1] == 0x756e6547) && (*piVar1 != 0)) {\n        __filename = "/dev/urandom";\n        iVar2 = cpuid_Version_info(1);\n        if ((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0) {\n          *param_1 = 0;\n          return;\n        }\n        goto LAB_00220e6d;\n      }\n    }\n    __filename = "/dev/urandom";\n  }\n  else {\n    iVar2 = FUN_0021e550(param_2,"/dev/urandom");\n    if ((iVar2 != 0) && (iVar2 = FUN_0021e550(param_2,"/dev/random"), iVar2 != 0))\n    goto LAB_00220ec6;\n  }\nLAB_00220e6d:\n  pFVar3 = fopen(__filename,"rb");\n  *param_1 = pFVar3;\n  if (pFVar3 != (FILE *)0x0) {\n    return;\n  }\nLAB_00220ec6:\n                    \n  FUN_0022c8d0("random_device::random_device(const std::string&)");\n}" ({ "{") (declaration "int *piVar1;" (primitive_type "int") (pointer_declarator "*piVar1" (* "*") (identifier "piVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "FILE *pFVar3;" (type_identifier "FILE") (pointer_declarator "*pFVar3" (* "*") (identifier "pFVar3")) (; ";")) (declaration "char *__filename;" (primitive_type "char") (pointer_declarator "*__filename" (* "*") (identifier "__filename")) (; ";")) (declaration "byte in_ID;" (type_identifier "byte") (identifier "in_ID") (; ";")) (expression_statement "__filename = (char *)*param_2;" (assignment_expression "__filename = (char *)*param_2" (identifier "__filename") (= "=") (cast_expression "(char *)*param_2" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_2" (* "*") (identifier "param_2")))) (; ";")) (expression_statement "iVar2 = FUN_0021e550(param_2,"default");" (assignment_expression "iVar2 = FUN_0021e550(param_2,"default")" (identifier "iVar2") (= "=") (call_expression "FUN_0021e550(param_2,"default")" (identifier "FUN_0021e550") (argument_list "(param_2,"default")" (( "(") (identifier "param_2") (, ",") (string_literal ""default"" (" """) (string_content "default") (" """)) () ")")))) (; ";")) (if_statement "if (iVar2 == 0) {\n    if ((uint)((in_ID & 1) != 1) * 0x200000 != (uint)(in_ID & 1) * 0x200000) {\n      piVar1 = (int *)cpuid_basic_info(0);\n      if ((piVar1[1] == 0x756e6547) && (*piVar1 != 0)) {\n        __filename = "/dev/urandom";\n        iVar2 = cpuid_Version_info(1);\n        if ((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0) {\n          *param_1 = 0;\n          return;\n        }\n        goto LAB_00220e6d;\n      }\n    }\n    __filename = "/dev/urandom";\n  }\n  else {\n    iVar2 = FUN_0021e550(param_2,"/dev/urandom");\n    if ((iVar2 != 0) && (iVar2 = FUN_0021e550(param_2,"/dev/random"), iVar2 != 0))\n    goto LAB_00220ec6;\n  }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    if ((uint)((in_ID & 1) != 1) * 0x200000 != (uint)(in_ID & 1) * 0x200000) {\n      piVar1 = (int *)cpuid_basic_info(0);\n      if ((piVar1[1] == 0x756e6547) && (*piVar1 != 0)) {\n        __filename = "/dev/urandom";\n        iVar2 = cpuid_Version_info(1);\n        if ((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0) {\n          *param_1 = 0;\n          return;\n        }\n        goto LAB_00220e6d;\n      }\n    }\n    __filename = "/dev/urandom";\n  }" ({ "{") (if_statement "if ((uint)((in_ID & 1) != 1) * 0x200000 != (uint)(in_ID & 1) * 0x200000) {\n      piVar1 = (int *)cpuid_basic_info(0);\n      if ((piVar1[1] == 0x756e6547) && (*piVar1 != 0)) {\n        __filename = "/dev/urandom";\n        iVar2 = cpuid_Version_info(1);\n        if ((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0) {\n          *param_1 = 0;\n          return;\n        }\n        goto LAB_00220e6d;\n      }\n    }" (if "if") (parenthesized_expression "((uint)((in_ID & 1) != 1) * 0x200000 != (uint)(in_ID & 1) * 0x200000)" (( "(") (binary_expression "(uint)((in_ID & 1) != 1) * 0x200000 != (uint)(in_ID & 1) * 0x200000" (binary_expression "(uint)((in_ID & 1) != 1) * 0x200000" (call_expression "(uint)((in_ID & 1) != 1)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "((in_ID & 1) != 1)" (( "(") (binary_expression "(in_ID & 1) != 1" (parenthesized_expression "(in_ID & 1)" (( "(") (binary_expression "in_ID & 1" (identifier "in_ID") (& "&") (number_literal "1")) () ")")) (!= "!=") (number_literal "1")) () ")"))) (* "*") (number_literal "0x200000")) (!= "!=") (binary_expression "(uint)(in_ID & 1) * 0x200000" (call_expression "(uint)(in_ID & 1)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(in_ID & 1)" (( "(") (binary_expression "in_ID & 1" (identifier "in_ID") (& "&") (number_literal "1")) () ")"))) (* "*") (number_literal "0x200000"))) () ")")) (compound_statement "{\n      piVar1 = (int *)cpuid_basic_info(0);\n      if ((piVar1[1] == 0x756e6547) && (*piVar1 != 0)) {\n        __filename = "/dev/urandom";\n        iVar2 = cpuid_Version_info(1);\n        if ((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0) {\n          *param_1 = 0;\n          return;\n        }\n        goto LAB_00220e6d;\n      }\n    }" ({ "{") (expression_statement "piVar1 = (int *)cpuid_basic_info(0);" (assignment_expression "piVar1 = (int *)cpuid_basic_info(0)" (identifier "piVar1") (= "=") (cast_expression "(int *)cpuid_basic_info(0)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "cpuid_basic_info(0)" (identifier "cpuid_basic_info") (argument_list "(0)" (( "(") (number_literal "0") () ")"))))) (; ";")) (if_statement "if ((piVar1[1] == 0x756e6547) && (*piVar1 != 0)) {\n        __filename = "/dev/urandom";\n        iVar2 = cpuid_Version_info(1);\n        if ((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0) {\n          *param_1 = 0;\n          return;\n        }\n        goto LAB_00220e6d;\n      }" (if "if") (parenthesized_expression "((piVar1[1] == 0x756e6547) && (*piVar1 != 0))" (( "(") (binary_expression "(piVar1[1] == 0x756e6547) && (*piVar1 != 0)" (parenthesized_expression "(piVar1[1] == 0x756e6547)" (( "(") (binary_expression "piVar1[1] == 0x756e6547" (subscript_expression "piVar1[1]" (identifier "piVar1") ([ "[") (number_literal "1") (] "]")) (== "==") (number_literal "0x756e6547")) () ")")) (&& "&&") (parenthesized_expression "(*piVar1 != 0)" (( "(") (binary_expression "*piVar1 != 0" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n        __filename = "/dev/urandom";\n        iVar2 = cpuid_Version_info(1);\n        if ((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0) {\n          *param_1 = 0;\n          return;\n        }\n        goto LAB_00220e6d;\n      }" ({ "{") (expression_statement "__filename = "/dev/urandom";" (assignment_expression "__filename = "/dev/urandom"" (identifier "__filename") (= "=") (string_literal ""/dev/urandom"" (" """) (string_content "/dev/urandom") (" """))) (; ";")) (expression_statement "iVar2 = cpuid_Version_info(1);" (assignment_expression "iVar2 = cpuid_Version_info(1)" (identifier "iVar2") (= "=") (call_expression "cpuid_Version_info(1)" (identifier "cpuid_Version_info") (argument_list "(1)" (( "(") (number_literal "1") () ")")))) (; ";")) (if_statement "if ((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0) {\n          *param_1 = 0;\n          return;\n        }" (if "if") (parenthesized_expression "((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0)" (( "(") (binary_expression "(*(uint *)(iVar2 + 0xc) & 0x40000000) != 0" (parenthesized_expression "(*(uint *)(iVar2 + 0xc) & 0x40000000)" (( "(") (binary_expression "*(uint *)(iVar2 + 0xc) & 0x40000000" (pointer_expression "*(uint *)(iVar2 + 0xc)" (* "*") (cast_expression "(uint *)(iVar2 + 0xc)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0xc)" (( "(") (binary_expression "iVar2 + 0xc" (identifier "iVar2") (+ "+") (number_literal "0xc")) () ")")))) (& "&") (number_literal "0x40000000")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n          *param_1 = 0;\n          return;\n        }" ({ "{") (expression_statement "*param_1 = 0;" (assignment_expression "*param_1 = 0" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (number_literal "0")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (goto_statement "goto LAB_00220e6d;" (goto "goto") (statement_identifier "LAB_00220e6d") (; ";")) (} "}"))) (} "}"))) (expression_statement "__filename = "/dev/urandom";" (assignment_expression "__filename = "/dev/urandom"" (identifier "__filename") (= "=") (string_literal ""/dev/urandom"" (" """) (string_content "/dev/urandom") (" """))) (; ";")) (} "}")) (else_clause "else {\n    iVar2 = FUN_0021e550(param_2,"/dev/urandom");\n    if ((iVar2 != 0) && (iVar2 = FUN_0021e550(param_2,"/dev/random"), iVar2 != 0))\n    goto LAB_00220ec6;\n  }" (else "else") (compound_statement "{\n    iVar2 = FUN_0021e550(param_2,"/dev/urandom");\n    if ((iVar2 != 0) && (iVar2 = FUN_0021e550(param_2,"/dev/random"), iVar2 != 0))\n    goto LAB_00220ec6;\n  }" ({ "{") (expression_statement "iVar2 = FUN_0021e550(param_2,"/dev/urandom");" (assignment_expression "iVar2 = FUN_0021e550(param_2,"/dev/urandom")" (identifier "iVar2") (= "=") (call_expression "FUN_0021e550(param_2,"/dev/urandom")" (identifier "FUN_0021e550") (argument_list "(param_2,"/dev/urandom")" (( "(") (identifier "param_2") (, ",") (string_literal ""/dev/urandom"" (" """) (string_content "/dev/urandom") (" """)) () ")")))) (; ";")) (if_statement "if ((iVar2 != 0) && (iVar2 = FUN_0021e550(param_2,"/dev/random"), iVar2 != 0))\n    goto LAB_00220ec6;" (if "if") (parenthesized_expression "((iVar2 != 0) && (iVar2 = FUN_0021e550(param_2,"/dev/random"), iVar2 != 0))" (( "(") (binary_expression "(iVar2 != 0) && (iVar2 = FUN_0021e550(param_2,"/dev/random"), iVar2 != 0)" (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(iVar2 = FUN_0021e550(param_2,"/dev/random"), iVar2 != 0)" (( "(") (comma_expression "iVar2 = FUN_0021e550(param_2,"/dev/random"), iVar2 != 0" (assignment_expression "iVar2 = FUN_0021e550(param_2,"/dev/random")" (identifier "iVar2") (= "=") (call_expression "FUN_0021e550(param_2,"/dev/random")" (identifier "FUN_0021e550") (argument_list "(param_2,"/dev/random")" (( "(") (identifier "param_2") (, ",") (string_literal ""/dev/random"" (" """) (string_content "/dev/random") (" """)) () ")")))) (, ",") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0"))) () ")"))) () ")")) (goto_statement "goto LAB_00220ec6;" (goto "goto") (statement_identifier "LAB_00220ec6") (; ";"))) (} "}")))) (labeled_statement "LAB_00220e6d:\n  pFVar3 = fopen(__filename,"rb");" (statement_identifier "LAB_00220e6d") (: ":") (expression_statement "pFVar3 = fopen(__filename,"rb");" (assignment_expression "pFVar3 = fopen(__filename,"rb")" (identifier "pFVar3") (= "=") (call_expression "fopen(__filename,"rb")" (identifier "fopen") (argument_list "(__filename,"rb")" (( "(") (identifier "__filename") (, ",") (string_literal ""rb"" (" """) (string_content "rb") (" """)) () ")")))) (; ";"))) (expression_statement "*param_1 = pFVar3;" (assignment_expression "*param_1 = pFVar3" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (identifier "pFVar3")) (; ";")) (if_statement "if (pFVar3 != (FILE *)0x0) {\n    return;\n  }" (if "if") (parenthesized_expression "(pFVar3 != (FILE *)0x0)" (( "(") (binary_expression "pFVar3 != (FILE *)0x0" (identifier "pFVar3") (!= "!=") (cast_expression "(FILE *)0x0" (( "(") (type_descriptor "FILE *" (type_identifier "FILE") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (labeled_statement "LAB_00220ec6:\n                    \n  FUN_0022c8d0("random_device::random_device(const std::string&)");" (statement_identifier "LAB_00220ec6") (: ":") (expression_statement "FUN_0022c8d0("random_device::random_device(const std::string&)");" (call_expression "FUN_0022c8d0("random_device::random_device(const std::string&)")" (identifier "FUN_0022c8d0") (argument_list "("random_device::random_device(const std::string&)")" (( "(") (string_literal ""random_device::random_device(const std::string&)"" (" """) (string_content "random_device::random_device(const std::string&)") (" """)) () ")"))) (; ";"))) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.si replaced with injection: get_pc_thunk_si */
/* WARNING: Removing unreachable block (ram,0x00220eeb) */
/* WARNING: Removing unreachable block (ram,0x00220e59) */
/* std::random_device::_M_init(std::string const&) */

void __thiscall std::type_1::function_1(type_1 *this,type_2 *param_1)

{
  int *piVar1;
  int var_2;
  type_3 *var_7;
  char *__filename;
  type_4 var_3;
  
  __filename = *(char **)param_1;
  var_2 = std::string::var_1(param_1,"default");
  if (var_2 == 0) {
    if ((type_5)((var_3 & 1) != 1) * 0x200000 != (type_5)(var_3 & 1) * 0x200000) {
      piVar1 = (int *)var_4(0);
      if ((piVar1[1] == 0x756e6547) && (*piVar1 != 0)) {
        __filename = "/dev/urandom";
        var_2 = var_5(1);
        if ((*(type_5 *)(var_2 + 0xc) & 0x40000000) != 0) {
          *(type_6 *)this = 0;
          return;
        }
        goto LAB_00220e6d;
      }
    }
    __filename = "/dev/urandom";
  }
  else {
    var_2 = std::string::var_1(param_1,"/dev/urandom");
    if ((var_2 != 0) && (var_2 = std::type_2::var_1(param_1,"/dev/random"), var_2 != 0))
    goto LAB_00220ec6;
  }
LAB_00220e6d:
  var_7 = var_6(__filename,"rb");
  *(type_3 **)this = var_7;
  if (var_7 != (type_3 *)0x0) {
    return;
  }
LAB_00220ec6:
                    /* WARNING: Subroutine does not return */
  var_8("random_device::random_device(const std::string&)");
}


(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))) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (string_literal (string_content)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal)))) right: (number_literal)) right: (binary_expression left: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)))) right: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (string_literal (string_content)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_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: (number_literal))) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (return_statement))) (goto_statement label: (statement_identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (string_literal (string_content))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (string_literal (string_content)))))) (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 (identifier) (string_literal (string_content))))) right: (binary_expression left: (identifier) right: (number_literal)))))) consequence: (goto_statement label: (statement_identifier)))))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (string_literal (string_content))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (return_statement))) (labeled_statement label: (statement_identifier) (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)))))))))

/* WARNING: Function: __i686.get_pc_thunk.si replaced with injection: get_pc_thunk_si */
/* WARNING: Removing unreachable block (ram,0x00220eeb) */
/* WARNING: Removing unreachable block (ram,0x00220e59) */

void MASKED(undefined4 *param_1,undefined4 *param_2)

{
  int *piVar1;
  int iVar2;
  FILE *pFVar3;
  char *__filename;
  byte in_ID;
  
  __filename = (char *)*param_2;
  iVar2 = FUN_0021e550(param_2,"default");
  if (iVar2 == 0) {
    if ((uint)((in_ID & 1) != 1) * 0x200000 != (uint)(in_ID & 1) * 0x200000) {
      piVar1 = (int *)cpuid_basic_info(0);
      if ((piVar1[1] == 0x756e6547) && (*piVar1 != 0)) {
        __filename = "/dev/urandom";
        iVar2 = cpuid_Version_info(1);
        if ((*(uint *)(iVar2 + 0xc) & 0x40000000) != 0) {
          *param_1 = 0;
          return;
        }
        goto LAB_00220e6d;
      }
    }
    __filename = "/dev/urandom";
  }
  else {
    iVar2 = FUN_0021e550(param_2,"/dev/urandom");
    if ((iVar2 != 0) && (iVar2 = FUN_0021e550(param_2,"/dev/random"), iVar2 != 0))
    goto LAB_00220ec6;
  }
LAB_00220e6d:
  pFVar3 = fopen(__filename,"rb");
  *param_1 = pFVar3;
  if (pFVar3 != (FILE *)0x0) {
    return;
  }
LAB_00220ec6:
                    /* WARNING: Subroutine does not return */
  FUN_0022c8d0("random_device::random_device(const std::string&)");
}

