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

void write_random_seed(void *data,int len)

{
  char *__file;
  int iVar1;
  ssize_t sVar2;
  int *piVar3;
  char *pcVar4;
  char *ptr;
  
  __file = make_filename(3,(char *)0x0);
  iVar1 = open64(__file,0x41,0x180);
  if (iVar1 < 0) {
    piVar3 = __errno_location();
    iVar1 = *piVar3;
    if (iVar1 == 2) {
      pcVar4 = make_filename(0,(char *)0x0);
      ptr = make_dir_path(pcVar4,0x1c0);
      if (ptr != (char *)0x0) {
        nonfatal("Unable to write random seed: %s",ptr);
        safefree(ptr);
        safefree(__file);
        safefree(pcVar4);
        return;
      }
      safefree(pcVar4);
      iVar1 = open64(__file,0x41,0x180);
      if (-1 < iVar1) goto LAB_0006d0a3;
      iVar1 = *piVar3;
    }
    pcVar4 = strerror(iVar1);
    nonfatal("Unable to write random seed: open(\"%s\") returned \'%s\'",__file,pcVar4);
    safefree(__file);
    return;
  }
LAB_0006d0a3:
  if (0 < len) {
    do {
      sVar2 = write(iVar1,data,len);
      if (sVar2 < 0) {
        piVar3 = __errno_location();
        pcVar4 = strerror(*piVar3);
        nonfatal("Unable to write random seed: write returned \'%s\'",pcVar4);
        break;
      }
      len = len - sVar2;
      data = (void *)((int)data + len);
    } while (0 < len);
  }
  close(iVar1);
  safefree(__file);
  return;
}



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

void FUN_0006d060(void *param_1,size_t param_2)

{
  char *__file;
  int iVar1;
  ssize_t sVar2;
  int *piVar3;
  char *pcVar4;
  undefined4 uVar5;
  
  __file = (char *)FUN_0006b890();
  iVar1 = open64(__file,0x41,0x180);
  if (iVar1 < 0) {
    piVar3 = __errno_location();
    iVar1 = *piVar3;
    if (iVar1 == 2) {
      uVar5 = FUN_0006b890();
      iVar1 = FUN_000661c0(uVar5,0x1c0);
      if (iVar1 != 0) {
        FUN_00020bd0("Unable to write random seed: %s",iVar1);
        FUN_0001b240(iVar1);
        FUN_0001b240(__file);
        FUN_0001b240(uVar5);
        return;
      }
      FUN_0001b240(uVar5);
      iVar1 = open64(__file,0x41,0x180);
      if (-1 < iVar1) goto LAB_0006d0a3;
      iVar1 = *piVar3;
    }
    pcVar4 = strerror(iVar1);
    FUN_00020bd0("Unable to write random seed: open(\"%s\") returned \'%s\'",__file,pcVar4);
    FUN_0001b240(__file);
    return;
  }
LAB_0006d0a3:
  if (0 < (int)param_2) {
    do {
      sVar2 = write(iVar1,param_1,param_2);
      if (sVar2 < 0) {
        piVar3 = __errno_location();
        pcVar4 = strerror(*piVar3);
        FUN_00020bd0("Unable to write random seed: write returned \'%s\'",pcVar4);
        break;
      }
      param_2 = param_2 - sVar2;
      param_1 = (void *)((int)param_1 + param_2);
    } while (0 < (int)param_2);
  }
  close(iVar1);
  FUN_0001b240(__file);
  return;
}


PUSH EBP
XOR EDX,EDX
MOV EAX,0x3
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00014970
ADD EBX,0x3cd20
SUB ESP,0x1c
MOV ESI,dword ptr [ESP + 0x30]
MOV EBP,dword ptr [ESP + 0x34]
CALL 0x0006b890
SUB ESP,0x4
PUSH 0x180
PUSH 0x41
MOV dword ptr [ESP + 0x14],EAX
PUSH EAX
CALL 0x000144a0
ADD ESP,0x10
MOV EDI,EAX
TEST EAX,EAX
JS 0x0006d110
TEST EBP,EBP
JG 0x0006d0b8
JMP 0x0006d0eb
SUB EBP,EAX
ADD ESI,EBP
TEST EBP,EBP
JLE 0x0006d0eb
SUB ESP,0x4
PUSH EBP
PUSH ESI
PUSH EDI
CALL 0x00014490
ADD ESP,0x10
TEST EAX,EAX
JNS 0x0006d0b0
CALL 0x00014550
SUB ESP,0xc
PUSH dword ptr [EAX]
CALL 0x00014390
POP EDX
POP ECX
PUSH EAX
LEA EAX,[EBX + 0xfffd8228]
PUSH EAX
CALL 0x00020bd0
ADD ESP,0x10
SUB ESP,0xc
PUSH EDI
CALL 0x00014810
POP EAX
PUSH dword ptr [ESP + 0x14]
CALL 0x0001b240
ADD ESP,0x10
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
CALL 0x00014550
MOV ECX,EAX
MOV EAX,dword ptr [EAX]
CMP EAX,0x2
JZ 0x0006d150
SUB ESP,0xc
PUSH EAX
CALL 0x00014390
ADD ESP,0xc
PUSH EAX
MOV EDI,dword ptr [ESP + 0x10]
LEA EAX,[EBX + 0xfffd81d0]
PUSH EDI
PUSH EAX
CALL 0x00020bd0
MOV dword ptr [ESP],EDI
CALL 0x0001b240
ADD ESP,0x10
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
XOR EDX,EDX
XOR EAX,EAX
MOV dword ptr [ESP + 0xc],ECX
CALL 0x0006b890
SUB ESP,0x8
PUSH 0x1c0
MOV EDI,EAX
PUSH EAX
CALL 0x000661c0
ADD ESP,0x10
MOV ECX,dword ptr [ESP + 0xc]
TEST EAX,EAX
JZ 0x0006d1b8
SUB ESP,0x8
LEA EDX,[EBX + 0xfffd8208]
PUSH EAX
MOV dword ptr [ESP + 0x18],EAX
PUSH EDX
CALL 0x00020bd0
MOV EAX,dword ptr [ESP + 0x1c]
MOV dword ptr [ESP],EAX
CALL 0x0001b240
POP ESI
PUSH dword ptr [ESP + 0x14]
CALL 0x0001b240
MOV dword ptr [ESP],EDI
CALL 0x0001b240
ADD ESP,0x10
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV dword ptr [ESP + 0xc],ECX
SUB ESP,0xc
PUSH EDI
CALL 0x0001b240
ADD ESP,0xc
PUSH 0x180
PUSH 0x41
PUSH dword ptr [ESP + 0x14]
CALL 0x000144a0
ADD ESP,0x10
MOV ECX,dword ptr [ESP + 0xc]
TEST EAX,EAX
MOV EDI,EAX
JNS 0x0006d0a3
SUB ESP,0xc
PUSH dword ptr [ECX]
JMP 0x0006d122
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_0006d060(void *param_1,size_t param_2)\n\n{\n  char *__file;\n  int iVar1;\n  ssize_t sVar2;\n  int *piVar3;\n  char *pcVar4;\n  undefined4 uVar5;\n  \n  __file = (char *)FUN_0006b890();\n  iVar1 = open64(__file,0x41,0x180);\n  if (iVar1 < 0) {\n    piVar3 = __errno_location();\n    iVar1 = *piVar3;\n    if (iVar1 == 2) {\n      uVar5 = FUN_0006b890();\n      iVar1 = FUN_000661c0(uVar5,0x1c0);\n      if (iVar1 != 0) {\n        FUN_00020bd0("Unable to write random seed: %s",iVar1);\n        FUN_0001b240(iVar1);\n        FUN_0001b240(__file);\n        FUN_0001b240(uVar5);\n        return;\n      }\n      FUN_0001b240(uVar5);\n      iVar1 = open64(__file,0x41,0x180);\n      if (-1 < iVar1) goto LAB_0006d0a3;\n      iVar1 = *piVar3;\n    }\n    pcVar4 = strerror(iVar1);\n    FUN_00020bd0("Unable to write random seed: open(\"%s\") returned \'%s\'",__file,pcVar4);\n    FUN_0001b240(__file);\n    return;\n  }\nLAB_0006d0a3:\n  if (0 < (int)param_2) {\n    do {\n      sVar2 = write(iVar1,param_1,param_2);\n      if (sVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        FUN_00020bd0("Unable to write random seed: write returned \'%s\'",pcVar4);\n        break;\n      }\n      param_2 = param_2 - sVar2;\n      param_1 = (void *)((int)param_1 + param_2);\n    } while (0 < (int)param_2);\n  }\n  close(iVar1);\n  FUN_0001b240(__file);\n  return;\n}\n\n" comment (function_definition "void FUN_0006d060(void *param_1,size_t param_2)\n\n{\n  char *__file;\n  int iVar1;\n  ssize_t sVar2;\n  int *piVar3;\n  char *pcVar4;\n  undefined4 uVar5;\n  \n  __file = (char *)FUN_0006b890();\n  iVar1 = open64(__file,0x41,0x180);\n  if (iVar1 < 0) {\n    piVar3 = __errno_location();\n    iVar1 = *piVar3;\n    if (iVar1 == 2) {\n      uVar5 = FUN_0006b890();\n      iVar1 = FUN_000661c0(uVar5,0x1c0);\n      if (iVar1 != 0) {\n        FUN_00020bd0("Unable to write random seed: %s",iVar1);\n        FUN_0001b240(iVar1);\n        FUN_0001b240(__file);\n        FUN_0001b240(uVar5);\n        return;\n      }\n      FUN_0001b240(uVar5);\n      iVar1 = open64(__file,0x41,0x180);\n      if (-1 < iVar1) goto LAB_0006d0a3;\n      iVar1 = *piVar3;\n    }\n    pcVar4 = strerror(iVar1);\n    FUN_00020bd0("Unable to write random seed: open(\"%s\") returned \'%s\'",__file,pcVar4);\n    FUN_0001b240(__file);\n    return;\n  }\nLAB_0006d0a3:\n  if (0 < (int)param_2) {\n    do {\n      sVar2 = write(iVar1,param_1,param_2);\n      if (sVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        FUN_00020bd0("Unable to write random seed: write returned \'%s\'",pcVar4);\n        break;\n      }\n      param_2 = param_2 - sVar2;\n      param_1 = (void *)((int)param_1 + param_2);\n    } while (0 < (int)param_2);\n  }\n  close(iVar1);\n  FUN_0001b240(__file);\n  return;\n}" primitive_type (function_declarator "FUN_0006d060(void *param_1,size_t param_2)" identifier (parameter_list "(void *param_1,size_t param_2)" ( (parameter_declaration "void *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "size_t param_2" primitive_type identifier) ))) (compound_statement "{\n  char *__file;\n  int iVar1;\n  ssize_t sVar2;\n  int *piVar3;\n  char *pcVar4;\n  undefined4 uVar5;\n  \n  __file = (char *)FUN_0006b890();\n  iVar1 = open64(__file,0x41,0x180);\n  if (iVar1 < 0) {\n    piVar3 = __errno_location();\n    iVar1 = *piVar3;\n    if (iVar1 == 2) {\n      uVar5 = FUN_0006b890();\n      iVar1 = FUN_000661c0(uVar5,0x1c0);\n      if (iVar1 != 0) {\n        FUN_00020bd0("Unable to write random seed: %s",iVar1);\n        FUN_0001b240(iVar1);\n        FUN_0001b240(__file);\n        FUN_0001b240(uVar5);\n        return;\n      }\n      FUN_0001b240(uVar5);\n      iVar1 = open64(__file,0x41,0x180);\n      if (-1 < iVar1) goto LAB_0006d0a3;\n      iVar1 = *piVar3;\n    }\n    pcVar4 = strerror(iVar1);\n    FUN_00020bd0("Unable to write random seed: open(\"%s\") returned \'%s\'",__file,pcVar4);\n    FUN_0001b240(__file);\n    return;\n  }\nLAB_0006d0a3:\n  if (0 < (int)param_2) {\n    do {\n      sVar2 = write(iVar1,param_1,param_2);\n      if (sVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        FUN_00020bd0("Unable to write random seed: write returned \'%s\'",pcVar4);\n        break;\n      }\n      param_2 = param_2 - sVar2;\n      param_1 = (void *)((int)param_1 + param_2);\n    } while (0 < (int)param_2);\n  }\n  close(iVar1);\n  FUN_0001b240(__file);\n  return;\n}" { (declaration "char *__file;" primitive_type (pointer_declarator "*__file" * identifier) ;) (declaration "int iVar1;" primitive_type identifier ;) (declaration "ssize_t sVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (expression_statement "__file = (char *)FUN_0006b890();" (assignment_expression "__file = (char *)FUN_0006b890()" identifier = (cast_expression "(char *)FUN_0006b890()" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0006b890()" identifier (argument_list "()" ( ))))) ;) (expression_statement "iVar1 = open64(__file,0x41,0x180);" (assignment_expression "iVar1 = open64(__file,0x41,0x180)" identifier = (call_expression "open64(__file,0x41,0x180)" identifier (argument_list "(__file,0x41,0x180)" ( identifier , number_literal , number_literal )))) ;) (if_statement "if (iVar1 < 0) {\n    piVar3 = __errno_location();\n    iVar1 = *piVar3;\n    if (iVar1 == 2) {\n      uVar5 = FUN_0006b890();\n      iVar1 = FUN_000661c0(uVar5,0x1c0);\n      if (iVar1 != 0) {\n        FUN_00020bd0("Unable to write random seed: %s",iVar1);\n        FUN_0001b240(iVar1);\n        FUN_0001b240(__file);\n        FUN_0001b240(uVar5);\n        return;\n      }\n      FUN_0001b240(uVar5);\n      iVar1 = open64(__file,0x41,0x180);\n      if (-1 < iVar1) goto LAB_0006d0a3;\n      iVar1 = *piVar3;\n    }\n    pcVar4 = strerror(iVar1);\n    FUN_00020bd0("Unable to write random seed: open(\"%s\") returned \'%s\'",__file,pcVar4);\n    FUN_0001b240(__file);\n    return;\n  }" if (parenthesized_expression "(iVar1 < 0)" ( (binary_expression "iVar1 < 0" identifier < number_literal) )) (compound_statement "{\n    piVar3 = __errno_location();\n    iVar1 = *piVar3;\n    if (iVar1 == 2) {\n      uVar5 = FUN_0006b890();\n      iVar1 = FUN_000661c0(uVar5,0x1c0);\n      if (iVar1 != 0) {\n        FUN_00020bd0("Unable to write random seed: %s",iVar1);\n        FUN_0001b240(iVar1);\n        FUN_0001b240(__file);\n        FUN_0001b240(uVar5);\n        return;\n      }\n      FUN_0001b240(uVar5);\n      iVar1 = open64(__file,0x41,0x180);\n      if (-1 < iVar1) goto LAB_0006d0a3;\n      iVar1 = *piVar3;\n    }\n    pcVar4 = strerror(iVar1);\n    FUN_00020bd0("Unable to write random seed: open(\"%s\") returned \'%s\'",__file,pcVar4);\n    FUN_0001b240(__file);\n    return;\n  }" { (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar1 = *piVar3;" (assignment_expression "iVar1 = *piVar3" identifier = (pointer_expression "*piVar3" * identifier)) ;) (if_statement "if (iVar1 == 2) {\n      uVar5 = FUN_0006b890();\n      iVar1 = FUN_000661c0(uVar5,0x1c0);\n      if (iVar1 != 0) {\n        FUN_00020bd0("Unable to write random seed: %s",iVar1);\n        FUN_0001b240(iVar1);\n        FUN_0001b240(__file);\n        FUN_0001b240(uVar5);\n        return;\n      }\n      FUN_0001b240(uVar5);\n      iVar1 = open64(__file,0x41,0x180);\n      if (-1 < iVar1) goto LAB_0006d0a3;\n      iVar1 = *piVar3;\n    }" if (parenthesized_expression "(iVar1 == 2)" ( (binary_expression "iVar1 == 2" identifier == number_literal) )) (compound_statement "{\n      uVar5 = FUN_0006b890();\n      iVar1 = FUN_000661c0(uVar5,0x1c0);\n      if (iVar1 != 0) {\n        FUN_00020bd0("Unable to write random seed: %s",iVar1);\n        FUN_0001b240(iVar1);\n        FUN_0001b240(__file);\n        FUN_0001b240(uVar5);\n        return;\n      }\n      FUN_0001b240(uVar5);\n      iVar1 = open64(__file,0x41,0x180);\n      if (-1 < iVar1) goto LAB_0006d0a3;\n      iVar1 = *piVar3;\n    }" { (expression_statement "uVar5 = FUN_0006b890();" (assignment_expression "uVar5 = FUN_0006b890()" identifier = (call_expression "FUN_0006b890()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar1 = FUN_000661c0(uVar5,0x1c0);" (assignment_expression "iVar1 = FUN_000661c0(uVar5,0x1c0)" identifier = (call_expression "FUN_000661c0(uVar5,0x1c0)" identifier (argument_list "(uVar5,0x1c0)" ( identifier , number_literal )))) ;) (if_statement "if (iVar1 != 0) {\n        FUN_00020bd0("Unable to write random seed: %s",iVar1);\n        FUN_0001b240(iVar1);\n        FUN_0001b240(__file);\n        FUN_0001b240(uVar5);\n        return;\n      }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n        FUN_00020bd0("Unable to write random seed: %s",iVar1);\n        FUN_0001b240(iVar1);\n        FUN_0001b240(__file);\n        FUN_0001b240(uVar5);\n        return;\n      }" { (expression_statement "FUN_00020bd0("Unable to write random seed: %s",iVar1);" (call_expression "FUN_00020bd0("Unable to write random seed: %s",iVar1)" identifier (argument_list "("Unable to write random seed: %s",iVar1)" ( (string_literal ""Unable to write random seed: %s"" " string_content ") , identifier ))) ;) (expression_statement "FUN_0001b240(iVar1);" (call_expression "FUN_0001b240(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))) ;) (expression_statement "FUN_0001b240(__file);" (call_expression "FUN_0001b240(__file)" identifier (argument_list "(__file)" ( identifier ))) ;) (expression_statement "FUN_0001b240(uVar5);" (call_expression "FUN_0001b240(uVar5)" identifier (argument_list "(uVar5)" ( identifier ))) ;) (return_statement "return;" return ;) })) (expression_statement "FUN_0001b240(uVar5);" (call_expression "FUN_0001b240(uVar5)" identifier (argument_list "(uVar5)" ( identifier ))) ;) (expression_statement "iVar1 = open64(__file,0x41,0x180);" (assignment_expression "iVar1 = open64(__file,0x41,0x180)" identifier = (call_expression "open64(__file,0x41,0x180)" identifier (argument_list "(__file,0x41,0x180)" ( identifier , number_literal , number_literal )))) ;) (if_statement "if (-1 < iVar1) goto LAB_0006d0a3;" if (parenthesized_expression "(-1 < iVar1)" ( (binary_expression "-1 < iVar1" number_literal < identifier) )) (goto_statement "goto LAB_0006d0a3;" goto statement_identifier ;)) (expression_statement "iVar1 = *piVar3;" (assignment_expression "iVar1 = *piVar3" identifier = (pointer_expression "*piVar3" * identifier)) ;) })) (expression_statement "pcVar4 = strerror(iVar1);" (assignment_expression "pcVar4 = strerror(iVar1)" identifier = (call_expression "strerror(iVar1)" identifier (argument_list "(iVar1)" ( identifier )))) ;) (expression_statement "FUN_00020bd0("Unable to write random seed: open(\"%s\") returned \'%s\'",__file,pcVar4);" (call_expression "FUN_00020bd0("Unable to write random seed: open(\"%s\") returned \'%s\'",__file,pcVar4)" identifier (argument_list "("Unable to write random seed: open(\"%s\") returned \'%s\'",__file,pcVar4)" ( (string_literal ""Unable to write random seed: open(\"%s\") returned \'%s\'"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence ") , identifier , identifier ))) ;) (expression_statement "FUN_0001b240(__file);" (call_expression "FUN_0001b240(__file)" identifier (argument_list "(__file)" ( identifier ))) ;) (return_statement "return;" return ;) })) (labeled_statement "LAB_0006d0a3:\n  if (0 < (int)param_2) {\n    do {\n      sVar2 = write(iVar1,param_1,param_2);\n      if (sVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        FUN_00020bd0("Unable to write random seed: write returned \'%s\'",pcVar4);\n        break;\n      }\n      param_2 = param_2 - sVar2;\n      param_1 = (void *)((int)param_1 + param_2);\n    } while (0 < (int)param_2);\n  }" statement_identifier : (if_statement "if (0 < (int)param_2) {\n    do {\n      sVar2 = write(iVar1,param_1,param_2);\n      if (sVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        FUN_00020bd0("Unable to write random seed: write returned \'%s\'",pcVar4);\n        break;\n      }\n      param_2 = param_2 - sVar2;\n      param_1 = (void *)((int)param_1 + param_2);\n    } while (0 < (int)param_2);\n  }" if (parenthesized_expression "(0 < (int)param_2)" ( (binary_expression "0 < (int)param_2" number_literal < (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n    do {\n      sVar2 = write(iVar1,param_1,param_2);\n      if (sVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        FUN_00020bd0("Unable to write random seed: write returned \'%s\'",pcVar4);\n        break;\n      }\n      param_2 = param_2 - sVar2;\n      param_1 = (void *)((int)param_1 + param_2);\n    } while (0 < (int)param_2);\n  }" { (do_statement "do {\n      sVar2 = write(iVar1,param_1,param_2);\n      if (sVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        FUN_00020bd0("Unable to write random seed: write returned \'%s\'",pcVar4);\n        break;\n      }\n      param_2 = param_2 - sVar2;\n      param_1 = (void *)((int)param_1 + param_2);\n    } while (0 < (int)param_2);" do (compound_statement "{\n      sVar2 = write(iVar1,param_1,param_2);\n      if (sVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        FUN_00020bd0("Unable to write random seed: write returned \'%s\'",pcVar4);\n        break;\n      }\n      param_2 = param_2 - sVar2;\n      param_1 = (void *)((int)param_1 + param_2);\n    }" { (expression_statement "sVar2 = write(iVar1,param_1,param_2);" (assignment_expression "sVar2 = write(iVar1,param_1,param_2)" identifier = (call_expression "write(iVar1,param_1,param_2)" identifier (argument_list "(iVar1,param_1,param_2)" ( identifier , identifier , identifier )))) ;) (if_statement "if (sVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        FUN_00020bd0("Unable to write random seed: write returned \'%s\'",pcVar4);\n        break;\n      }" if (parenthesized_expression "(sVar2 < 0)" ( (binary_expression "sVar2 < 0" identifier < number_literal) )) (compound_statement "{\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        FUN_00020bd0("Unable to write random seed: write returned \'%s\'",pcVar4);\n        break;\n      }" { (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar4 = strerror(*piVar3);" (assignment_expression "pcVar4 = strerror(*piVar3)" identifier = (call_expression "strerror(*piVar3)" identifier (argument_list "(*piVar3)" ( (pointer_expression "*piVar3" * identifier) )))) ;) (expression_statement "FUN_00020bd0("Unable to write random seed: write returned \'%s\'",pcVar4);" (call_expression "FUN_00020bd0("Unable to write random seed: write returned \'%s\'",pcVar4)" identifier (argument_list "("Unable to write random seed: write returned \'%s\'",pcVar4)" ( (string_literal ""Unable to write random seed: write returned \'%s\'"" " string_content escape_sequence string_content escape_sequence ") , identifier ))) ;) (break_statement "break;" break ;) })) (expression_statement "param_2 = param_2 - sVar2;" (assignment_expression "param_2 = param_2 - sVar2" identifier = (binary_expression "param_2 - sVar2" identifier - identifier)) ;) (expression_statement "param_1 = (void *)((int)param_1 + param_2);" (assignment_expression "param_1 = (void *)((int)param_1 + param_2)" identifier = (cast_expression "(void *)((int)param_1 + param_2)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + param_2)" ( (binary_expression "(int)param_1 + param_2" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) }) while (parenthesized_expression "(0 < (int)param_2)" ( (binary_expression "0 < (int)param_2" number_literal < (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) )) ;) }))) (expression_statement "close(iVar1);" (call_expression "close(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))) ;) (expression_statement "FUN_0001b240(__file);" (call_expression "FUN_0001b240(__file)" identifier (argument_list "(__file)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid write_random_seed(void *data,int len)\n\n{\n  char *__file;\n  int iVar1;\n  ssize_t sVar2;\n  int *piVar3;\n  char *pcVar4;\n  char *ptr;\n  \n  __file = make_filename(3,(char *)0x0);\n  iVar1 = open64(__file,0x41,0x180);\n  if (iVar1 < 0) {\n    piVar3 = __errno_location();\n    iVar1 = *piVar3;\n    if (iVar1 == 2) {\n      pcVar4 = make_filename(0,(char *)0x0);\n      ptr = make_dir_path(pcVar4,0x1c0);\n      if (ptr != (char *)0x0) {\n        nonfatal("Unable to write random seed: %s",ptr);\n        safefree(ptr);\n        safefree(__file);\n        safefree(pcVar4);\n        return;\n      }\n      safefree(pcVar4);\n      iVar1 = open64(__file,0x41,0x180);\n      if (-1 < iVar1) goto LAB_0006d0a3;\n      iVar1 = *piVar3;\n    }\n    pcVar4 = strerror(iVar1);\n    nonfatal("Unable to write random seed: open(\"%s\") returned \'%s\'",__file,pcVar4);\n    safefree(__file);\n    return;\n  }\nLAB_0006d0a3:\n  if (0 < len) {\n    do {\n      sVar2 = write(iVar1,data,len);\n      if (sVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        nonfatal("Unable to write random seed: write returned \'%s\'",pcVar4);\n        break;\n      }\n      len = len - sVar2;\n      data = (void *)((int)data + len);\n    } while (0 < len);\n  }\n  close(iVar1);\n  safefree(__file);\n  return;\n}\n\n" comment (function_definition "void write_random_seed(void *data,int len)\n\n{\n  char *__file;\n  int iVar1;\n  ssize_t sVar2;\n  int *piVar3;\n  char *pcVar4;\n  char *ptr;\n  \n  __file = make_filename(3,(char *)0x0);\n  iVar1 = open64(__file,0x41,0x180);\n  if (iVar1 < 0) {\n    piVar3 = __errno_location();\n    iVar1 = *piVar3;\n    if (iVar1 == 2) {\n      pcVar4 = make_filename(0,(char *)0x0);\n      ptr = make_dir_path(pcVar4,0x1c0);\n      if (ptr != (char *)0x0) {\n        nonfatal("Unable to write random seed: %s",ptr);\n        safefree(ptr);\n        safefree(__file);\n        safefree(pcVar4);\n        return;\n      }\n      safefree(pcVar4);\n      iVar1 = open64(__file,0x41,0x180);\n      if (-1 < iVar1) goto LAB_0006d0a3;\n      iVar1 = *piVar3;\n    }\n    pcVar4 = strerror(iVar1);\n    nonfatal("Unable to write random seed: open(\"%s\") returned \'%s\'",__file,pcVar4);\n    safefree(__file);\n    return;\n  }\nLAB_0006d0a3:\n  if (0 < len) {\n    do {\n      sVar2 = write(iVar1,data,len);\n      if (sVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        nonfatal("Unable to write random seed: write returned \'%s\'",pcVar4);\n        break;\n      }\n      len = len - sVar2;\n      data = (void *)((int)data + len);\n    } while (0 < len);\n  }\n  close(iVar1);\n  safefree(__file);\n  return;\n}" primitive_type (function_declarator "write_random_seed(void *data,int len)" identifier (parameter_list "(void *data,int len)" ( (parameter_declaration "void *data" primitive_type (pointer_declarator "*data" * identifier)) , (parameter_declaration "int len" primitive_type identifier) ))) (compound_statement "{\n  char *__file;\n  int iVar1;\n  ssize_t sVar2;\n  int *piVar3;\n  char *pcVar4;\n  char *ptr;\n  \n  __file = make_filename(3,(char *)0x0);\n  iVar1 = open64(__file,0x41,0x180);\n  if (iVar1 < 0) {\n    piVar3 = __errno_location();\n    iVar1 = *piVar3;\n    if (iVar1 == 2) {\n      pcVar4 = make_filename(0,(char *)0x0);\n      ptr = make_dir_path(pcVar4,0x1c0);\n      if (ptr != (char *)0x0) {\n        nonfatal("Unable to write random seed: %s",ptr);\n        safefree(ptr);\n        safefree(__file);\n        safefree(pcVar4);\n        return;\n      }\n      safefree(pcVar4);\n      iVar1 = open64(__file,0x41,0x180);\n      if (-1 < iVar1) goto LAB_0006d0a3;\n      iVar1 = *piVar3;\n    }\n    pcVar4 = strerror(iVar1);\n    nonfatal("Unable to write random seed: open(\"%s\") returned \'%s\'",__file,pcVar4);\n    safefree(__file);\n    return;\n  }\nLAB_0006d0a3:\n  if (0 < len) {\n    do {\n      sVar2 = write(iVar1,data,len);\n      if (sVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        nonfatal("Unable to write random seed: write returned \'%s\'",pcVar4);\n        break;\n      }\n      len = len - sVar2;\n      data = (void *)((int)data + len);\n    } while (0 < len);\n  }\n  close(iVar1);\n  safefree(__file);\n  return;\n}" { (declaration "char *__file;" primitive_type (pointer_declarator "*__file" * identifier) ;) (declaration "int iVar1;" primitive_type identifier ;) (declaration "ssize_t sVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "char *ptr;" primitive_type (pointer_declarator "*ptr" * identifier) ;) (expression_statement "__file = make_filename(3,(char *)0x0);" (assignment_expression "__file = make_filename(3,(char *)0x0)" identifier = (call_expression "make_filename(3,(char *)0x0)" identifier (argument_list "(3,(char *)0x0)" ( number_literal , (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) )))) ;) (expression_statement "iVar1 = open64(__file,0x41,0x180);" (assignment_expression "iVar1 = open64(__file,0x41,0x180)" identifier = (call_expression "open64(__file,0x41,0x180)" identifier (argument_list "(__file,0x41,0x180)" ( identifier , number_literal , number_literal )))) ;) (if_statement "if (iVar1 < 0) {\n    piVar3 = __errno_location();\n    iVar1 = *piVar3;\n    if (iVar1 == 2) {\n      pcVar4 = make_filename(0,(char *)0x0);\n      ptr = make_dir_path(pcVar4,0x1c0);\n      if (ptr != (char *)0x0) {\n        nonfatal("Unable to write random seed: %s",ptr);\n        safefree(ptr);\n        safefree(__file);\n        safefree(pcVar4);\n        return;\n      }\n      safefree(pcVar4);\n      iVar1 = open64(__file,0x41,0x180);\n      if (-1 < iVar1) goto LAB_0006d0a3;\n      iVar1 = *piVar3;\n    }\n    pcVar4 = strerror(iVar1);\n    nonfatal("Unable to write random seed: open(\"%s\") returned \'%s\'",__file,pcVar4);\n    safefree(__file);\n    return;\n  }" if (parenthesized_expression "(iVar1 < 0)" ( (binary_expression "iVar1 < 0" identifier < number_literal) )) (compound_statement "{\n    piVar3 = __errno_location();\n    iVar1 = *piVar3;\n    if (iVar1 == 2) {\n      pcVar4 = make_filename(0,(char *)0x0);\n      ptr = make_dir_path(pcVar4,0x1c0);\n      if (ptr != (char *)0x0) {\n        nonfatal("Unable to write random seed: %s",ptr);\n        safefree(ptr);\n        safefree(__file);\n        safefree(pcVar4);\n        return;\n      }\n      safefree(pcVar4);\n      iVar1 = open64(__file,0x41,0x180);\n      if (-1 < iVar1) goto LAB_0006d0a3;\n      iVar1 = *piVar3;\n    }\n    pcVar4 = strerror(iVar1);\n    nonfatal("Unable to write random seed: open(\"%s\") returned \'%s\'",__file,pcVar4);\n    safefree(__file);\n    return;\n  }" { (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar1 = *piVar3;" (assignment_expression "iVar1 = *piVar3" identifier = (pointer_expression "*piVar3" * identifier)) ;) (if_statement "if (iVar1 == 2) {\n      pcVar4 = make_filename(0,(char *)0x0);\n      ptr = make_dir_path(pcVar4,0x1c0);\n      if (ptr != (char *)0x0) {\n        nonfatal("Unable to write random seed: %s",ptr);\n        safefree(ptr);\n        safefree(__file);\n        safefree(pcVar4);\n        return;\n      }\n      safefree(pcVar4);\n      iVar1 = open64(__file,0x41,0x180);\n      if (-1 < iVar1) goto LAB_0006d0a3;\n      iVar1 = *piVar3;\n    }" if (parenthesized_expression "(iVar1 == 2)" ( (binary_expression "iVar1 == 2" identifier == number_literal) )) (compound_statement "{\n      pcVar4 = make_filename(0,(char *)0x0);\n      ptr = make_dir_path(pcVar4,0x1c0);\n      if (ptr != (char *)0x0) {\n        nonfatal("Unable to write random seed: %s",ptr);\n        safefree(ptr);\n        safefree(__file);\n        safefree(pcVar4);\n        return;\n      }\n      safefree(pcVar4);\n      iVar1 = open64(__file,0x41,0x180);\n      if (-1 < iVar1) goto LAB_0006d0a3;\n      iVar1 = *piVar3;\n    }" { (expression_statement "pcVar4 = make_filename(0,(char *)0x0);" (assignment_expression "pcVar4 = make_filename(0,(char *)0x0)" identifier = (call_expression "make_filename(0,(char *)0x0)" identifier (argument_list "(0,(char *)0x0)" ( number_literal , (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) )))) ;) (expression_statement "ptr = make_dir_path(pcVar4,0x1c0);" (assignment_expression "ptr = make_dir_path(pcVar4,0x1c0)" identifier = (call_expression "make_dir_path(pcVar4,0x1c0)" identifier (argument_list "(pcVar4,0x1c0)" ( identifier , number_literal )))) ;) (if_statement "if (ptr != (char *)0x0) {\n        nonfatal("Unable to write random seed: %s",ptr);\n        safefree(ptr);\n        safefree(__file);\n        safefree(pcVar4);\n        return;\n      }" if (parenthesized_expression "(ptr != (char *)0x0)" ( (binary_expression "ptr != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        nonfatal("Unable to write random seed: %s",ptr);\n        safefree(ptr);\n        safefree(__file);\n        safefree(pcVar4);\n        return;\n      }" { (expression_statement "nonfatal("Unable to write random seed: %s",ptr);" (call_expression "nonfatal("Unable to write random seed: %s",ptr)" identifier (argument_list "("Unable to write random seed: %s",ptr)" ( (string_literal ""Unable to write random seed: %s"" " string_content ") , identifier ))) ;) (expression_statement "safefree(ptr);" (call_expression "safefree(ptr)" identifier (argument_list "(ptr)" ( identifier ))) ;) (expression_statement "safefree(__file);" (call_expression "safefree(__file)" identifier (argument_list "(__file)" ( identifier ))) ;) (expression_statement "safefree(pcVar4);" (call_expression "safefree(pcVar4)" identifier (argument_list "(pcVar4)" ( identifier ))) ;) (return_statement "return;" return ;) })) (expression_statement "safefree(pcVar4);" (call_expression "safefree(pcVar4)" identifier (argument_list "(pcVar4)" ( identifier ))) ;) (expression_statement "iVar1 = open64(__file,0x41,0x180);" (assignment_expression "iVar1 = open64(__file,0x41,0x180)" identifier = (call_expression "open64(__file,0x41,0x180)" identifier (argument_list "(__file,0x41,0x180)" ( identifier , number_literal , number_literal )))) ;) (if_statement "if (-1 < iVar1) goto LAB_0006d0a3;" if (parenthesized_expression "(-1 < iVar1)" ( (binary_expression "-1 < iVar1" number_literal < identifier) )) (goto_statement "goto LAB_0006d0a3;" goto statement_identifier ;)) (expression_statement "iVar1 = *piVar3;" (assignment_expression "iVar1 = *piVar3" identifier = (pointer_expression "*piVar3" * identifier)) ;) })) (expression_statement "pcVar4 = strerror(iVar1);" (assignment_expression "pcVar4 = strerror(iVar1)" identifier = (call_expression "strerror(iVar1)" identifier (argument_list "(iVar1)" ( identifier )))) ;) (expression_statement "nonfatal("Unable to write random seed: open(\"%s\") returned \'%s\'",__file,pcVar4);" (call_expression "nonfatal("Unable to write random seed: open(\"%s\") returned \'%s\'",__file,pcVar4)" identifier (argument_list "("Unable to write random seed: open(\"%s\") returned \'%s\'",__file,pcVar4)" ( (string_literal ""Unable to write random seed: open(\"%s\") returned \'%s\'"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence ") , identifier , identifier ))) ;) (expression_statement "safefree(__file);" (call_expression "safefree(__file)" identifier (argument_list "(__file)" ( identifier ))) ;) (return_statement "return;" return ;) })) (labeled_statement "LAB_0006d0a3:\n  if (0 < len) {\n    do {\n      sVar2 = write(iVar1,data,len);\n      if (sVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        nonfatal("Unable to write random seed: write returned \'%s\'",pcVar4);\n        break;\n      }\n      len = len - sVar2;\n      data = (void *)((int)data + len);\n    } while (0 < len);\n  }" statement_identifier : (if_statement "if (0 < len) {\n    do {\n      sVar2 = write(iVar1,data,len);\n      if (sVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        nonfatal("Unable to write random seed: write returned \'%s\'",pcVar4);\n        break;\n      }\n      len = len - sVar2;\n      data = (void *)((int)data + len);\n    } while (0 < len);\n  }" if (parenthesized_expression "(0 < len)" ( (binary_expression "0 < len" number_literal < identifier) )) (compound_statement "{\n    do {\n      sVar2 = write(iVar1,data,len);\n      if (sVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        nonfatal("Unable to write random seed: write returned \'%s\'",pcVar4);\n        break;\n      }\n      len = len - sVar2;\n      data = (void *)((int)data + len);\n    } while (0 < len);\n  }" { (do_statement "do {\n      sVar2 = write(iVar1,data,len);\n      if (sVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        nonfatal("Unable to write random seed: write returned \'%s\'",pcVar4);\n        break;\n      }\n      len = len - sVar2;\n      data = (void *)((int)data + len);\n    } while (0 < len);" do (compound_statement "{\n      sVar2 = write(iVar1,data,len);\n      if (sVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        nonfatal("Unable to write random seed: write returned \'%s\'",pcVar4);\n        break;\n      }\n      len = len - sVar2;\n      data = (void *)((int)data + len);\n    }" { (expression_statement "sVar2 = write(iVar1,data,len);" (assignment_expression "sVar2 = write(iVar1,data,len)" identifier = (call_expression "write(iVar1,data,len)" identifier (argument_list "(iVar1,data,len)" ( identifier , identifier , identifier )))) ;) (if_statement "if (sVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        nonfatal("Unable to write random seed: write returned \'%s\'",pcVar4);\n        break;\n      }" if (parenthesized_expression "(sVar2 < 0)" ( (binary_expression "sVar2 < 0" identifier < number_literal) )) (compound_statement "{\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        nonfatal("Unable to write random seed: write returned \'%s\'",pcVar4);\n        break;\n      }" { (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar4 = strerror(*piVar3);" (assignment_expression "pcVar4 = strerror(*piVar3)" identifier = (call_expression "strerror(*piVar3)" identifier (argument_list "(*piVar3)" ( (pointer_expression "*piVar3" * identifier) )))) ;) (expression_statement "nonfatal("Unable to write random seed: write returned \'%s\'",pcVar4);" (call_expression "nonfatal("Unable to write random seed: write returned \'%s\'",pcVar4)" identifier (argument_list "("Unable to write random seed: write returned \'%s\'",pcVar4)" ( (string_literal ""Unable to write random seed: write returned \'%s\'"" " string_content escape_sequence string_content escape_sequence ") , identifier ))) ;) (break_statement "break;" break ;) })) (expression_statement "len = len - sVar2;" (assignment_expression "len = len - sVar2" identifier = (binary_expression "len - sVar2" identifier - identifier)) ;) (expression_statement "data = (void *)((int)data + len);" (assignment_expression "data = (void *)((int)data + len)" identifier = (cast_expression "(void *)((int)data + len)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)data + len)" ( (binary_expression "(int)data + len" (cast_expression "(int)data" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) }) while (parenthesized_expression "(0 < len)" ( (binary_expression "0 < len" number_literal < identifier) )) ;) }))) (expression_statement "close(iVar1);" (call_expression "close(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))) ;) (expression_statement "safefree(__file);" (call_expression "safefree(__file)" identifier (argument_list "(__file)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_0006d060(void *param_1,size_t param_2)\n\n{\n  char *__file;\n  int iVar1;\n  ssize_t sVar2;\n  int *piVar3;\n  char *pcVar4;\n  undefined4 uVar5;\n  \n  __file = (char *)FUN_0006b890();\n  iVar1 = open64(__file,0x41,0x180);\n  if (iVar1 < 0) {\n    piVar3 = __errno_location();\n    iVar1 = *piVar3;\n    if (iVar1 == 2) {\n      uVar5 = FUN_0006b890();\n      iVar1 = FUN_000661c0(uVar5,0x1c0);\n      if (iVar1 != 0) {\n        FUN_00020bd0("Unable to write random seed: %s",iVar1);\n        FUN_0001b240(iVar1);\n        FUN_0001b240(__file);\n        FUN_0001b240(uVar5);\n        return;\n      }\n      FUN_0001b240(uVar5);\n      iVar1 = open64(__file,0x41,0x180);\n      if (-1 < iVar1) goto LAB_0006d0a3;\n      iVar1 = *piVar3;\n    }\n    pcVar4 = strerror(iVar1);\n    FUN_00020bd0("Unable to write random seed: open(\"%s\") returned \'%s\'",__file,pcVar4);\n    FUN_0001b240(__file);\n    return;\n  }\nLAB_0006d0a3:\n  if (0 < (int)param_2) {\n    do {\n      sVar2 = write(iVar1,param_1,param_2);\n      if (sVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        FUN_00020bd0("Unable to write random seed: write returned \'%s\'",pcVar4);\n        break;\n      }\n      param_2 = param_2 - sVar2;\n      param_1 = (void *)((int)param_1 + param_2);\n    } while (0 < (int)param_2);\n  }\n  close(iVar1);\n  FUN_0001b240(__file);\n  return;\n}\n\n" (function_definition "void FUN_0006d060(void *param_1,size_t param_2)\n\n{\n  char *__file;\n  int iVar1;\n  ssize_t sVar2;\n  int *piVar3;\n  char *pcVar4;\n  undefined4 uVar5;\n  \n  __file = (char *)FUN_0006b890();\n  iVar1 = open64(__file,0x41,0x180);\n  if (iVar1 < 0) {\n    piVar3 = __errno_location();\n    iVar1 = *piVar3;\n    if (iVar1 == 2) {\n      uVar5 = FUN_0006b890();\n      iVar1 = FUN_000661c0(uVar5,0x1c0);\n      if (iVar1 != 0) {\n        FUN_00020bd0("Unable to write random seed: %s",iVar1);\n        FUN_0001b240(iVar1);\n        FUN_0001b240(__file);\n        FUN_0001b240(uVar5);\n        return;\n      }\n      FUN_0001b240(uVar5);\n      iVar1 = open64(__file,0x41,0x180);\n      if (-1 < iVar1) goto LAB_0006d0a3;\n      iVar1 = *piVar3;\n    }\n    pcVar4 = strerror(iVar1);\n    FUN_00020bd0("Unable to write random seed: open(\"%s\") returned \'%s\'",__file,pcVar4);\n    FUN_0001b240(__file);\n    return;\n  }\nLAB_0006d0a3:\n  if (0 < (int)param_2) {\n    do {\n      sVar2 = write(iVar1,param_1,param_2);\n      if (sVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        FUN_00020bd0("Unable to write random seed: write returned \'%s\'",pcVar4);\n        break;\n      }\n      param_2 = param_2 - sVar2;\n      param_1 = (void *)((int)param_1 + param_2);\n    } while (0 < (int)param_2);\n  }\n  close(iVar1);\n  FUN_0001b240(__file);\n  return;\n}" primitive_type (function_declarator "FUN_0006d060(void *param_1,size_t param_2)" identifier (parameter_list "(void *param_1,size_t param_2)" ( (parameter_declaration "void *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "size_t param_2" primitive_type identifier) ))) (compound_statement "{\n  char *__file;\n  int iVar1;\n  ssize_t sVar2;\n  int *piVar3;\n  char *pcVar4;\n  undefined4 uVar5;\n  \n  __file = (char *)FUN_0006b890();\n  iVar1 = open64(__file,0x41,0x180);\n  if (iVar1 < 0) {\n    piVar3 = __errno_location();\n    iVar1 = *piVar3;\n    if (iVar1 == 2) {\n      uVar5 = FUN_0006b890();\n      iVar1 = FUN_000661c0(uVar5,0x1c0);\n      if (iVar1 != 0) {\n        FUN_00020bd0("Unable to write random seed: %s",iVar1);\n        FUN_0001b240(iVar1);\n        FUN_0001b240(__file);\n        FUN_0001b240(uVar5);\n        return;\n      }\n      FUN_0001b240(uVar5);\n      iVar1 = open64(__file,0x41,0x180);\n      if (-1 < iVar1) goto LAB_0006d0a3;\n      iVar1 = *piVar3;\n    }\n    pcVar4 = strerror(iVar1);\n    FUN_00020bd0("Unable to write random seed: open(\"%s\") returned \'%s\'",__file,pcVar4);\n    FUN_0001b240(__file);\n    return;\n  }\nLAB_0006d0a3:\n  if (0 < (int)param_2) {\n    do {\n      sVar2 = write(iVar1,param_1,param_2);\n      if (sVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        FUN_00020bd0("Unable to write random seed: write returned \'%s\'",pcVar4);\n        break;\n      }\n      param_2 = param_2 - sVar2;\n      param_1 = (void *)((int)param_1 + param_2);\n    } while (0 < (int)param_2);\n  }\n  close(iVar1);\n  FUN_0001b240(__file);\n  return;\n}" { (declaration "char *__file;" primitive_type (pointer_declarator "*__file" * identifier) ;) (declaration "int iVar1;" primitive_type identifier ;) (declaration "ssize_t sVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (expression_statement "__file = (char *)FUN_0006b890();" (assignment_expression "__file = (char *)FUN_0006b890()" identifier = (cast_expression "(char *)FUN_0006b890()" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0006b890()" identifier (argument_list "()" ( ))))) ;) (expression_statement "iVar1 = open64(__file,0x41,0x180);" (assignment_expression "iVar1 = open64(__file,0x41,0x180)" identifier = (call_expression "open64(__file,0x41,0x180)" identifier (argument_list "(__file,0x41,0x180)" ( identifier , number_literal , number_literal )))) ;) (if_statement "if (iVar1 < 0) {\n    piVar3 = __errno_location();\n    iVar1 = *piVar3;\n    if (iVar1 == 2) {\n      uVar5 = FUN_0006b890();\n      iVar1 = FUN_000661c0(uVar5,0x1c0);\n      if (iVar1 != 0) {\n        FUN_00020bd0("Unable to write random seed: %s",iVar1);\n        FUN_0001b240(iVar1);\n        FUN_0001b240(__file);\n        FUN_0001b240(uVar5);\n        return;\n      }\n      FUN_0001b240(uVar5);\n      iVar1 = open64(__file,0x41,0x180);\n      if (-1 < iVar1) goto LAB_0006d0a3;\n      iVar1 = *piVar3;\n    }\n    pcVar4 = strerror(iVar1);\n    FUN_00020bd0("Unable to write random seed: open(\"%s\") returned \'%s\'",__file,pcVar4);\n    FUN_0001b240(__file);\n    return;\n  }" if (parenthesized_expression "(iVar1 < 0)" ( (binary_expression "iVar1 < 0" identifier < number_literal) )) (compound_statement "{\n    piVar3 = __errno_location();\n    iVar1 = *piVar3;\n    if (iVar1 == 2) {\n      uVar5 = FUN_0006b890();\n      iVar1 = FUN_000661c0(uVar5,0x1c0);\n      if (iVar1 != 0) {\n        FUN_00020bd0("Unable to write random seed: %s",iVar1);\n        FUN_0001b240(iVar1);\n        FUN_0001b240(__file);\n        FUN_0001b240(uVar5);\n        return;\n      }\n      FUN_0001b240(uVar5);\n      iVar1 = open64(__file,0x41,0x180);\n      if (-1 < iVar1) goto LAB_0006d0a3;\n      iVar1 = *piVar3;\n    }\n    pcVar4 = strerror(iVar1);\n    FUN_00020bd0("Unable to write random seed: open(\"%s\") returned \'%s\'",__file,pcVar4);\n    FUN_0001b240(__file);\n    return;\n  }" { (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar1 = *piVar3;" (assignment_expression "iVar1 = *piVar3" identifier = (pointer_expression "*piVar3" * identifier)) ;) (if_statement "if (iVar1 == 2) {\n      uVar5 = FUN_0006b890();\n      iVar1 = FUN_000661c0(uVar5,0x1c0);\n      if (iVar1 != 0) {\n        FUN_00020bd0("Unable to write random seed: %s",iVar1);\n        FUN_0001b240(iVar1);\n        FUN_0001b240(__file);\n        FUN_0001b240(uVar5);\n        return;\n      }\n      FUN_0001b240(uVar5);\n      iVar1 = open64(__file,0x41,0x180);\n      if (-1 < iVar1) goto LAB_0006d0a3;\n      iVar1 = *piVar3;\n    }" if (parenthesized_expression "(iVar1 == 2)" ( (binary_expression "iVar1 == 2" identifier == number_literal) )) (compound_statement "{\n      uVar5 = FUN_0006b890();\n      iVar1 = FUN_000661c0(uVar5,0x1c0);\n      if (iVar1 != 0) {\n        FUN_00020bd0("Unable to write random seed: %s",iVar1);\n        FUN_0001b240(iVar1);\n        FUN_0001b240(__file);\n        FUN_0001b240(uVar5);\n        return;\n      }\n      FUN_0001b240(uVar5);\n      iVar1 = open64(__file,0x41,0x180);\n      if (-1 < iVar1) goto LAB_0006d0a3;\n      iVar1 = *piVar3;\n    }" { (expression_statement "uVar5 = FUN_0006b890();" (assignment_expression "uVar5 = FUN_0006b890()" identifier = (call_expression "FUN_0006b890()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar1 = FUN_000661c0(uVar5,0x1c0);" (assignment_expression "iVar1 = FUN_000661c0(uVar5,0x1c0)" identifier = (call_expression "FUN_000661c0(uVar5,0x1c0)" identifier (argument_list "(uVar5,0x1c0)" ( identifier , number_literal )))) ;) (if_statement "if (iVar1 != 0) {\n        FUN_00020bd0("Unable to write random seed: %s",iVar1);\n        FUN_0001b240(iVar1);\n        FUN_0001b240(__file);\n        FUN_0001b240(uVar5);\n        return;\n      }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n        FUN_00020bd0("Unable to write random seed: %s",iVar1);\n        FUN_0001b240(iVar1);\n        FUN_0001b240(__file);\n        FUN_0001b240(uVar5);\n        return;\n      }" { (expression_statement "FUN_00020bd0("Unable to write random seed: %s",iVar1);" (call_expression "FUN_00020bd0("Unable to write random seed: %s",iVar1)" identifier (argument_list "("Unable to write random seed: %s",iVar1)" ( (string_literal ""Unable to write random seed: %s"" " string_content ") , identifier ))) ;) (expression_statement "FUN_0001b240(iVar1);" (call_expression "FUN_0001b240(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))) ;) (expression_statement "FUN_0001b240(__file);" (call_expression "FUN_0001b240(__file)" identifier (argument_list "(__file)" ( identifier ))) ;) (expression_statement "FUN_0001b240(uVar5);" (call_expression "FUN_0001b240(uVar5)" identifier (argument_list "(uVar5)" ( identifier ))) ;) (return_statement "return;" return ;) })) (expression_statement "FUN_0001b240(uVar5);" (call_expression "FUN_0001b240(uVar5)" identifier (argument_list "(uVar5)" ( identifier ))) ;) (expression_statement "iVar1 = open64(__file,0x41,0x180);" (assignment_expression "iVar1 = open64(__file,0x41,0x180)" identifier = (call_expression "open64(__file,0x41,0x180)" identifier (argument_list "(__file,0x41,0x180)" ( identifier , number_literal , number_literal )))) ;) (if_statement "if (-1 < iVar1) goto LAB_0006d0a3;" if (parenthesized_expression "(-1 < iVar1)" ( (binary_expression "-1 < iVar1" number_literal < identifier) )) (goto_statement "goto LAB_0006d0a3;" goto statement_identifier ;)) (expression_statement "iVar1 = *piVar3;" (assignment_expression "iVar1 = *piVar3" identifier = (pointer_expression "*piVar3" * identifier)) ;) })) (expression_statement "pcVar4 = strerror(iVar1);" (assignment_expression "pcVar4 = strerror(iVar1)" identifier = (call_expression "strerror(iVar1)" identifier (argument_list "(iVar1)" ( identifier )))) ;) (expression_statement "FUN_00020bd0("Unable to write random seed: open(\"%s\") returned \'%s\'",__file,pcVar4);" (call_expression "FUN_00020bd0("Unable to write random seed: open(\"%s\") returned \'%s\'",__file,pcVar4)" identifier (argument_list "("Unable to write random seed: open(\"%s\") returned \'%s\'",__file,pcVar4)" ( (string_literal ""Unable to write random seed: open(\"%s\") returned \'%s\'"" " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence ") , identifier , identifier ))) ;) (expression_statement "FUN_0001b240(__file);" (call_expression "FUN_0001b240(__file)" identifier (argument_list "(__file)" ( identifier ))) ;) (return_statement "return;" return ;) })) (labeled_statement "LAB_0006d0a3:\n  if (0 < (int)param_2) {\n    do {\n      sVar2 = write(iVar1,param_1,param_2);\n      if (sVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        FUN_00020bd0("Unable to write random seed: write returned \'%s\'",pcVar4);\n        break;\n      }\n      param_2 = param_2 - sVar2;\n      param_1 = (void *)((int)param_1 + param_2);\n    } while (0 < (int)param_2);\n  }" statement_identifier : (if_statement "if (0 < (int)param_2) {\n    do {\n      sVar2 = write(iVar1,param_1,param_2);\n      if (sVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        FUN_00020bd0("Unable to write random seed: write returned \'%s\'",pcVar4);\n        break;\n      }\n      param_2 = param_2 - sVar2;\n      param_1 = (void *)((int)param_1 + param_2);\n    } while (0 < (int)param_2);\n  }" if (parenthesized_expression "(0 < (int)param_2)" ( (binary_expression "0 < (int)param_2" number_literal < (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n    do {\n      sVar2 = write(iVar1,param_1,param_2);\n      if (sVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        FUN_00020bd0("Unable to write random seed: write returned \'%s\'",pcVar4);\n        break;\n      }\n      param_2 = param_2 - sVar2;\n      param_1 = (void *)((int)param_1 + param_2);\n    } while (0 < (int)param_2);\n  }" { (do_statement "do {\n      sVar2 = write(iVar1,param_1,param_2);\n      if (sVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        FUN_00020bd0("Unable to write random seed: write returned \'%s\'",pcVar4);\n        break;\n      }\n      param_2 = param_2 - sVar2;\n      param_1 = (void *)((int)param_1 + param_2);\n    } while (0 < (int)param_2);" do (compound_statement "{\n      sVar2 = write(iVar1,param_1,param_2);\n      if (sVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        FUN_00020bd0("Unable to write random seed: write returned \'%s\'",pcVar4);\n        break;\n      }\n      param_2 = param_2 - sVar2;\n      param_1 = (void *)((int)param_1 + param_2);\n    }" { (expression_statement "sVar2 = write(iVar1,param_1,param_2);" (assignment_expression "sVar2 = write(iVar1,param_1,param_2)" identifier = (call_expression "write(iVar1,param_1,param_2)" identifier (argument_list "(iVar1,param_1,param_2)" ( identifier , identifier , identifier )))) ;) (if_statement "if (sVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        FUN_00020bd0("Unable to write random seed: write returned \'%s\'",pcVar4);\n        break;\n      }" if (parenthesized_expression "(sVar2 < 0)" ( (binary_expression "sVar2 < 0" identifier < number_literal) )) (compound_statement "{\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        FUN_00020bd0("Unable to write random seed: write returned \'%s\'",pcVar4);\n        break;\n      }" { (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar4 = strerror(*piVar3);" (assignment_expression "pcVar4 = strerror(*piVar3)" identifier = (call_expression "strerror(*piVar3)" identifier (argument_list "(*piVar3)" ( (pointer_expression "*piVar3" * identifier) )))) ;) (expression_statement "FUN_00020bd0("Unable to write random seed: write returned \'%s\'",pcVar4);" (call_expression "FUN_00020bd0("Unable to write random seed: write returned \'%s\'",pcVar4)" identifier (argument_list "("Unable to write random seed: write returned \'%s\'",pcVar4)" ( (string_literal ""Unable to write random seed: write returned \'%s\'"" " string_content escape_sequence string_content escape_sequence ") , identifier ))) ;) (break_statement "break;" break ;) })) (expression_statement "param_2 = param_2 - sVar2;" (assignment_expression "param_2 = param_2 - sVar2" identifier = (binary_expression "param_2 - sVar2" identifier - identifier)) ;) (expression_statement "param_1 = (void *)((int)param_1 + param_2);" (assignment_expression "param_1 = (void *)((int)param_1 + param_2)" identifier = (cast_expression "(void *)((int)param_1 + param_2)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + param_2)" ( (binary_expression "(int)param_1 + param_2" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) }) while (parenthesized_expression "(0 < (int)param_2)" ( (binary_expression "0 < (int)param_2" number_literal < (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier)) )) ;) }))) (expression_statement "close(iVar1);" (call_expression "close(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))) ;) (expression_statement "FUN_0001b240(__file);" (call_expression "FUN_0001b240(__file)" identifier (argument_list "(__file)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE 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 *)) ) (call_expression IDENT (argument_list ( ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence string_content escape_sequence string_content escape_sequence string_content escape_sequence ") , IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return ;) })) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression LIT < (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * IDENT) )))) ;) (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence string_content escape_sequence ") , IDENT ))) ;) (break_statement break ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + IDENT) )))) ;) }) while (parenthesized_expression ( (binary_expression LIT < (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) ;) }))) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return ;) })))
(function_definition "void FUN_0006d060(void *param_1,size_t param_2)\n\n{\n  char *__file;\n  int iVar1;\n  ssize_t sVar2;\n  int *piVar3;\n  char *pcVar4;\n  undefined4 uVar5;\n  \n  __file = (char *)FUN_0006b890();\n  iVar1 = open64(__file,0x41,0x180);\n  if (iVar1 < 0) {\n    piVar3 = __errno_location();\n    iVar1 = *piVar3;\n    if (iVar1 == 2) {\n      uVar5 = FUN_0006b890();\n      iVar1 = FUN_000661c0(uVar5,0x1c0);\n      if (iVar1 != 0) {\n        FUN_00020bd0("Unable to write random seed: %s",iVar1);\n        FUN_0001b240(iVar1);\n        FUN_0001b240(__file);\n        FUN_0001b240(uVar5);\n        return;\n      }\n      FUN_0001b240(uVar5);\n      iVar1 = open64(__file,0x41,0x180);\n      if (-1 < iVar1) goto LAB_0006d0a3;\n      iVar1 = *piVar3;\n    }\n    pcVar4 = strerror(iVar1);\n    FUN_00020bd0("Unable to write random seed: open(\"%s\") returned \'%s\'",__file,pcVar4);\n    FUN_0001b240(__file);\n    return;\n  }\nLAB_0006d0a3:\n  if (0 < (int)param_2) {\n    do {\n      sVar2 = write(iVar1,param_1,param_2);\n      if (sVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        FUN_00020bd0("Unable to write random seed: write returned \'%s\'",pcVar4);\n        break;\n      }\n      param_2 = param_2 - sVar2;\n      param_1 = (void *)((int)param_1 + param_2);\n    } while (0 < (int)param_2);\n  }\n  close(iVar1);\n  FUN_0001b240(__file);\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0006d060(void *param_1,size_t param_2)" (identifier "FUN_0006d060") (parameter_list "(void *param_1,size_t param_2)" (( "(") (parameter_declaration "void *param_1" (primitive_type "void") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "size_t param_2" (primitive_type "size_t") (identifier "param_2")) () ")"))) (compound_statement "{\n  char *__file;\n  int iVar1;\n  ssize_t sVar2;\n  int *piVar3;\n  char *pcVar4;\n  undefined4 uVar5;\n  \n  __file = (char *)FUN_0006b890();\n  iVar1 = open64(__file,0x41,0x180);\n  if (iVar1 < 0) {\n    piVar3 = __errno_location();\n    iVar1 = *piVar3;\n    if (iVar1 == 2) {\n      uVar5 = FUN_0006b890();\n      iVar1 = FUN_000661c0(uVar5,0x1c0);\n      if (iVar1 != 0) {\n        FUN_00020bd0("Unable to write random seed: %s",iVar1);\n        FUN_0001b240(iVar1);\n        FUN_0001b240(__file);\n        FUN_0001b240(uVar5);\n        return;\n      }\n      FUN_0001b240(uVar5);\n      iVar1 = open64(__file,0x41,0x180);\n      if (-1 < iVar1) goto LAB_0006d0a3;\n      iVar1 = *piVar3;\n    }\n    pcVar4 = strerror(iVar1);\n    FUN_00020bd0("Unable to write random seed: open(\"%s\") returned \'%s\'",__file,pcVar4);\n    FUN_0001b240(__file);\n    return;\n  }\nLAB_0006d0a3:\n  if (0 < (int)param_2) {\n    do {\n      sVar2 = write(iVar1,param_1,param_2);\n      if (sVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        FUN_00020bd0("Unable to write random seed: write returned \'%s\'",pcVar4);\n        break;\n      }\n      param_2 = param_2 - sVar2;\n      param_1 = (void *)((int)param_1 + param_2);\n    } while (0 < (int)param_2);\n  }\n  close(iVar1);\n  FUN_0001b240(__file);\n  return;\n}" ({ "{") (declaration "char *__file;" (primitive_type "char") (pointer_declarator "*__file" (* "*") (identifier "__file")) (; ";")) (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "ssize_t sVar2;" (primitive_type "ssize_t") (identifier "sVar2") (; ";")) (declaration "int *piVar3;" (primitive_type "int") (pointer_declarator "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (declaration "char *pcVar4;" (primitive_type "char") (pointer_declarator "*pcVar4" (* "*") (identifier "pcVar4")) (; ";")) (declaration "undefined4 uVar5;" (type_identifier "undefined4") (identifier "uVar5") (; ";")) (expression_statement "__file = (char *)FUN_0006b890();" (assignment_expression "__file = (char *)FUN_0006b890()" (identifier "__file") (= "=") (cast_expression "(char *)FUN_0006b890()" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0006b890()" (identifier "FUN_0006b890") (argument_list "()" (( "(") () ")"))))) (; ";")) (expression_statement "iVar1 = open64(__file,0x41,0x180);" (assignment_expression "iVar1 = open64(__file,0x41,0x180)" (identifier "iVar1") (= "=") (call_expression "open64(__file,0x41,0x180)" (identifier "open64") (argument_list "(__file,0x41,0x180)" (( "(") (identifier "__file") (, ",") (number_literal "0x41") (, ",") (number_literal "0x180") () ")")))) (; ";")) (if_statement "if (iVar1 < 0) {\n    piVar3 = __errno_location();\n    iVar1 = *piVar3;\n    if (iVar1 == 2) {\n      uVar5 = FUN_0006b890();\n      iVar1 = FUN_000661c0(uVar5,0x1c0);\n      if (iVar1 != 0) {\n        FUN_00020bd0("Unable to write random seed: %s",iVar1);\n        FUN_0001b240(iVar1);\n        FUN_0001b240(__file);\n        FUN_0001b240(uVar5);\n        return;\n      }\n      FUN_0001b240(uVar5);\n      iVar1 = open64(__file,0x41,0x180);\n      if (-1 < iVar1) goto LAB_0006d0a3;\n      iVar1 = *piVar3;\n    }\n    pcVar4 = strerror(iVar1);\n    FUN_00020bd0("Unable to write random seed: open(\"%s\") returned \'%s\'",__file,pcVar4);\n    FUN_0001b240(__file);\n    return;\n  }" (if "if") (parenthesized_expression "(iVar1 < 0)" (( "(") (binary_expression "iVar1 < 0" (identifier "iVar1") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n    piVar3 = __errno_location();\n    iVar1 = *piVar3;\n    if (iVar1 == 2) {\n      uVar5 = FUN_0006b890();\n      iVar1 = FUN_000661c0(uVar5,0x1c0);\n      if (iVar1 != 0) {\n        FUN_00020bd0("Unable to write random seed: %s",iVar1);\n        FUN_0001b240(iVar1);\n        FUN_0001b240(__file);\n        FUN_0001b240(uVar5);\n        return;\n      }\n      FUN_0001b240(uVar5);\n      iVar1 = open64(__file,0x41,0x180);\n      if (-1 < iVar1) goto LAB_0006d0a3;\n      iVar1 = *piVar3;\n    }\n    pcVar4 = strerror(iVar1);\n    FUN_00020bd0("Unable to write random seed: open(\"%s\") returned \'%s\'",__file,pcVar4);\n    FUN_0001b240(__file);\n    return;\n  }" ({ "{") (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" (identifier "piVar3") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "iVar1 = *piVar3;" (assignment_expression "iVar1 = *piVar3" (identifier "iVar1") (= "=") (pointer_expression "*piVar3" (* "*") (identifier "piVar3"))) (; ";")) (if_statement "if (iVar1 == 2) {\n      uVar5 = FUN_0006b890();\n      iVar1 = FUN_000661c0(uVar5,0x1c0);\n      if (iVar1 != 0) {\n        FUN_00020bd0("Unable to write random seed: %s",iVar1);\n        FUN_0001b240(iVar1);\n        FUN_0001b240(__file);\n        FUN_0001b240(uVar5);\n        return;\n      }\n      FUN_0001b240(uVar5);\n      iVar1 = open64(__file,0x41,0x180);\n      if (-1 < iVar1) goto LAB_0006d0a3;\n      iVar1 = *piVar3;\n    }" (if "if") (parenthesized_expression "(iVar1 == 2)" (( "(") (binary_expression "iVar1 == 2" (identifier "iVar1") (== "==") (number_literal "2")) () ")")) (compound_statement "{\n      uVar5 = FUN_0006b890();\n      iVar1 = FUN_000661c0(uVar5,0x1c0);\n      if (iVar1 != 0) {\n        FUN_00020bd0("Unable to write random seed: %s",iVar1);\n        FUN_0001b240(iVar1);\n        FUN_0001b240(__file);\n        FUN_0001b240(uVar5);\n        return;\n      }\n      FUN_0001b240(uVar5);\n      iVar1 = open64(__file,0x41,0x180);\n      if (-1 < iVar1) goto LAB_0006d0a3;\n      iVar1 = *piVar3;\n    }" ({ "{") (expression_statement "uVar5 = FUN_0006b890();" (assignment_expression "uVar5 = FUN_0006b890()" (identifier "uVar5") (= "=") (call_expression "FUN_0006b890()" (identifier "FUN_0006b890") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "iVar1 = FUN_000661c0(uVar5,0x1c0);" (assignment_expression "iVar1 = FUN_000661c0(uVar5,0x1c0)" (identifier "iVar1") (= "=") (call_expression "FUN_000661c0(uVar5,0x1c0)" (identifier "FUN_000661c0") (argument_list "(uVar5,0x1c0)" (( "(") (identifier "uVar5") (, ",") (number_literal "0x1c0") () ")")))) (; ";")) (if_statement "if (iVar1 != 0) {\n        FUN_00020bd0("Unable to write random seed: %s",iVar1);\n        FUN_0001b240(iVar1);\n        FUN_0001b240(__file);\n        FUN_0001b240(uVar5);\n        return;\n      }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        FUN_00020bd0("Unable to write random seed: %s",iVar1);\n        FUN_0001b240(iVar1);\n        FUN_0001b240(__file);\n        FUN_0001b240(uVar5);\n        return;\n      }" ({ "{") (expression_statement "FUN_00020bd0("Unable to write random seed: %s",iVar1);" (call_expression "FUN_00020bd0("Unable to write random seed: %s",iVar1)" (identifier "FUN_00020bd0") (argument_list "("Unable to write random seed: %s",iVar1)" (( "(") (string_literal ""Unable to write random seed: %s"" (" """) (string_content "Unable to write random seed: %s") (" """)) (, ",") (identifier "iVar1") () ")"))) (; ";")) (expression_statement "FUN_0001b240(iVar1);" (call_expression "FUN_0001b240(iVar1)" (identifier "FUN_0001b240") (argument_list "(iVar1)" (( "(") (identifier "iVar1") () ")"))) (; ";")) (expression_statement "FUN_0001b240(__file);" (call_expression "FUN_0001b240(__file)" (identifier "FUN_0001b240") (argument_list "(__file)" (( "(") (identifier "__file") () ")"))) (; ";")) (expression_statement "FUN_0001b240(uVar5);" (call_expression "FUN_0001b240(uVar5)" (identifier "FUN_0001b240") (argument_list "(uVar5)" (( "(") (identifier "uVar5") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_0001b240(uVar5);" (call_expression "FUN_0001b240(uVar5)" (identifier "FUN_0001b240") (argument_list "(uVar5)" (( "(") (identifier "uVar5") () ")"))) (; ";")) (expression_statement "iVar1 = open64(__file,0x41,0x180);" (assignment_expression "iVar1 = open64(__file,0x41,0x180)" (identifier "iVar1") (= "=") (call_expression "open64(__file,0x41,0x180)" (identifier "open64") (argument_list "(__file,0x41,0x180)" (( "(") (identifier "__file") (, ",") (number_literal "0x41") (, ",") (number_literal "0x180") () ")")))) (; ";")) (if_statement "if (-1 < iVar1) goto LAB_0006d0a3;" (if "if") (parenthesized_expression "(-1 < iVar1)" (( "(") (binary_expression "-1 < iVar1" (number_literal "-1") (< "<") (identifier "iVar1")) () ")")) (goto_statement "goto LAB_0006d0a3;" (goto "goto") (statement_identifier "LAB_0006d0a3") (; ";"))) (expression_statement "iVar1 = *piVar3;" (assignment_expression "iVar1 = *piVar3" (identifier "iVar1") (= "=") (pointer_expression "*piVar3" (* "*") (identifier "piVar3"))) (; ";")) (} "}"))) (expression_statement "pcVar4 = strerror(iVar1);" (assignment_expression "pcVar4 = strerror(iVar1)" (identifier "pcVar4") (= "=") (call_expression "strerror(iVar1)" (identifier "strerror") (argument_list "(iVar1)" (( "(") (identifier "iVar1") () ")")))) (; ";")) (expression_statement "FUN_00020bd0("Unable to write random seed: open(\"%s\") returned \'%s\'",__file,pcVar4);" (call_expression "FUN_00020bd0("Unable to write random seed: open(\"%s\") returned \'%s\'",__file,pcVar4)" (identifier "FUN_00020bd0") (argument_list "("Unable to write random seed: open(\"%s\") returned \'%s\'",__file,pcVar4)" (( "(") (string_literal ""Unable to write random seed: open(\"%s\") returned \'%s\'"" (" """) (string_content "Unable to write random seed: open(") (escape_sequence "\"") (string_content "%s") (escape_sequence "\"") (string_content ") returned ") (escape_sequence "\'") (string_content "%s") (escape_sequence "\'") (" """)) (, ",") (identifier "__file") (, ",") (identifier "pcVar4") () ")"))) (; ";")) (expression_statement "FUN_0001b240(__file);" (call_expression "FUN_0001b240(__file)" (identifier "FUN_0001b240") (argument_list "(__file)" (( "(") (identifier "__file") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (labeled_statement "LAB_0006d0a3:\n  if (0 < (int)param_2) {\n    do {\n      sVar2 = write(iVar1,param_1,param_2);\n      if (sVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        FUN_00020bd0("Unable to write random seed: write returned \'%s\'",pcVar4);\n        break;\n      }\n      param_2 = param_2 - sVar2;\n      param_1 = (void *)((int)param_1 + param_2);\n    } while (0 < (int)param_2);\n  }" (statement_identifier "LAB_0006d0a3") (: ":") (if_statement "if (0 < (int)param_2) {\n    do {\n      sVar2 = write(iVar1,param_1,param_2);\n      if (sVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        FUN_00020bd0("Unable to write random seed: write returned \'%s\'",pcVar4);\n        break;\n      }\n      param_2 = param_2 - sVar2;\n      param_1 = (void *)((int)param_1 + param_2);\n    } while (0 < (int)param_2);\n  }" (if "if") (parenthesized_expression "(0 < (int)param_2)" (( "(") (binary_expression "0 < (int)param_2" (number_literal "0") (< "<") (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2"))) () ")")) (compound_statement "{\n    do {\n      sVar2 = write(iVar1,param_1,param_2);\n      if (sVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        FUN_00020bd0("Unable to write random seed: write returned \'%s\'",pcVar4);\n        break;\n      }\n      param_2 = param_2 - sVar2;\n      param_1 = (void *)((int)param_1 + param_2);\n    } while (0 < (int)param_2);\n  }" ({ "{") (do_statement "do {\n      sVar2 = write(iVar1,param_1,param_2);\n      if (sVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        FUN_00020bd0("Unable to write random seed: write returned \'%s\'",pcVar4);\n        break;\n      }\n      param_2 = param_2 - sVar2;\n      param_1 = (void *)((int)param_1 + param_2);\n    } while (0 < (int)param_2);" (do "do") (compound_statement "{\n      sVar2 = write(iVar1,param_1,param_2);\n      if (sVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        FUN_00020bd0("Unable to write random seed: write returned \'%s\'",pcVar4);\n        break;\n      }\n      param_2 = param_2 - sVar2;\n      param_1 = (void *)((int)param_1 + param_2);\n    }" ({ "{") (expression_statement "sVar2 = write(iVar1,param_1,param_2);" (assignment_expression "sVar2 = write(iVar1,param_1,param_2)" (identifier "sVar2") (= "=") (call_expression "write(iVar1,param_1,param_2)" (identifier "write") (argument_list "(iVar1,param_1,param_2)" (( "(") (identifier "iVar1") (, ",") (identifier "param_1") (, ",") (identifier "param_2") () ")")))) (; ";")) (if_statement "if (sVar2 < 0) {\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        FUN_00020bd0("Unable to write random seed: write returned \'%s\'",pcVar4);\n        break;\n      }" (if "if") (parenthesized_expression "(sVar2 < 0)" (( "(") (binary_expression "sVar2 < 0" (identifier "sVar2") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n        piVar3 = __errno_location();\n        pcVar4 = strerror(*piVar3);\n        FUN_00020bd0("Unable to write random seed: write returned \'%s\'",pcVar4);\n        break;\n      }" ({ "{") (expression_statement "piVar3 = __errno_location();" (assignment_expression "piVar3 = __errno_location()" (identifier "piVar3") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "pcVar4 = strerror(*piVar3);" (assignment_expression "pcVar4 = strerror(*piVar3)" (identifier "pcVar4") (= "=") (call_expression "strerror(*piVar3)" (identifier "strerror") (argument_list "(*piVar3)" (( "(") (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) () ")")))) (; ";")) (expression_statement "FUN_00020bd0("Unable to write random seed: write returned \'%s\'",pcVar4);" (call_expression "FUN_00020bd0("Unable to write random seed: write returned \'%s\'",pcVar4)" (identifier "FUN_00020bd0") (argument_list "("Unable to write random seed: write returned \'%s\'",pcVar4)" (( "(") (string_literal ""Unable to write random seed: write returned \'%s\'"" (" """) (string_content "Unable to write random seed: write returned ") (escape_sequence "\'") (string_content "%s") (escape_sequence "\'") (" """)) (, ",") (identifier "pcVar4") () ")"))) (; ";")) (break_statement "break;" (break "break") (; ";")) (} "}"))) (expression_statement "param_2 = param_2 - sVar2;" (assignment_expression "param_2 = param_2 - sVar2" (identifier "param_2") (= "=") (binary_expression "param_2 - sVar2" (identifier "param_2") (- "-") (identifier "sVar2"))) (; ";")) (expression_statement "param_1 = (void *)((int)param_1 + param_2);" (assignment_expression "param_1 = (void *)((int)param_1 + param_2)" (identifier "param_1") (= "=") (cast_expression "(void *)((int)param_1 + param_2)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)param_1 + param_2)" (( "(") (binary_expression "(int)param_1 + param_2" (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1")) (+ "+") (identifier "param_2")) () ")")))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(0 < (int)param_2)" (( "(") (binary_expression "0 < (int)param_2" (number_literal "0") (< "<") (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2"))) () ")")) (; ";")) (} "}")))) (expression_statement "close(iVar1);" (call_expression "close(iVar1)" (identifier "close") (argument_list "(iVar1)" (( "(") (identifier "iVar1") () ")"))) (; ";")) (expression_statement "FUN_0001b240(__file);" (call_expression "FUN_0001b240(__file)" (identifier "FUN_0001b240") (argument_list "(__file)" (( "(") (identifier "__file") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void function_1(void *data,int var_10)

{
  char *__file;
  int var_3;
  ssize_t var_12;
  int *piVar3;
  char *pcVar4;
  char *var_6;
  
  __file = var_1(3,(char *)0x0);
  var_3 = var_2(__file,0x41,0x180);
  if (var_3 < 0) {
    piVar3 = var_4();
    var_3 = *piVar3;
    if (var_3 == 2) {
      pcVar4 = var_1(0,(char *)0x0);
      var_6 = var_5(pcVar4,0x1c0);
      if (var_6 != (char *)0x0) {
        var_7("Unable to write random seed: %s",var_6);
        var_8(var_6);
        var_8(__file);
        var_8(pcVar4);
        return;
      }
      var_8(pcVar4);
      var_3 = var_2(__file,0x41,0x180);
      if (-1 < var_3) goto LAB_0006d0a3;
      var_3 = *piVar3;
    }
    pcVar4 = var_9(var_3);
    var_7("Unable to write random seed: open(\"%s\") returned \'%s\'",__file,pcVar4);
    var_8(__file);
    return;
  }
LAB_0006d0a3:
  if (0 < var_10) {
    do {
      var_12 = var_11(var_3,data,var_10);
      if (var_12 < 0) {
        piVar3 = var_4();
        pcVar4 = var_9(*piVar3);
        var_7("Unable to write random seed: write returned \'%s\'",pcVar4);
        break;
      }
      var_10 = var_10 - var_12;
      data = (void *)((int)data + var_10);
    } while (0 < var_10);
  }
  var_13(var_3);
  var_8(__file);
  return;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) 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: (call_expression function: (identifier) arguments: (argument_list))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (return_statement))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (goto_statement label: (statement_identifier))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence) (string_content) (escape_sequence)) (identifier) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (return_statement))) (labeled_statement label: (statement_identifier) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) consequence: (compound_statement (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content) (escape_sequence) (string_content) (escape_sequence)) (identifier)))) (break_statement))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (identifier))))))) condition: (parenthesized_expression (binary_expression left: (number_literal) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (return_statement))))

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

void MASKED(void *param_1,size_t param_2)

{
  char *__file;
  int iVar1;
  ssize_t sVar2;
  int *piVar3;
  char *pcVar4;
  undefined4 uVar5;
  
  __file = (char *)FUN_0006b890();
  iVar1 = open64(__file,0x41,0x180);
  if (iVar1 < 0) {
    piVar3 = __errno_location();
    iVar1 = *piVar3;
    if (iVar1 == 2) {
      uVar5 = FUN_0006b890();
      iVar1 = FUN_000661c0(uVar5,0x1c0);
      if (iVar1 != 0) {
        FUN_00020bd0("Unable to write random seed: %s",iVar1);
        FUN_0001b240(iVar1);
        FUN_0001b240(__file);
        FUN_0001b240(uVar5);
        return;
      }
      FUN_0001b240(uVar5);
      iVar1 = open64(__file,0x41,0x180);
      if (-1 < iVar1) goto LAB_0006d0a3;
      iVar1 = *piVar3;
    }
    pcVar4 = strerror(iVar1);
    FUN_00020bd0("Unable to write random seed: open(\"%s\") returned \'%s\'",__file,pcVar4);
    FUN_0001b240(__file);
    return;
  }
LAB_0006d0a3:
  if (0 < (int)param_2) {
    do {
      sVar2 = write(iVar1,param_1,param_2);
      if (sVar2 < 0) {
        piVar3 = __errno_location();
        pcVar4 = strerror(*piVar3);
        FUN_00020bd0("Unable to write random seed: write returned \'%s\'",pcVar4);
        break;
      }
      param_2 = param_2 - sVar2;
      param_1 = (void *)((int)param_1 + param_2);
    } while (0 < (int)param_2);
  }
  close(iVar1);
  FUN_0001b240(__file);
  return;
}

