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

void __regparm3 make_dev_name(char *fname,char *leadin,int k,_Bool do_numeric)

{
  int iVar1;
  int iVar2;
  int in_GS_OFFSET;
  int local_70;
  char buff [64];
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  builtin_strncpy(fname,"/dev/sg",8);
  if ((char)k == '\0') {
    if ((int)leadin < 0x4766) {
      if ((int)leadin < 0x1a) {
        local_70 = 1;
        iVar2 = 0;
      }
      else {
        if (0x2bd < (int)leadin) {
          local_70 = 3;
          iVar2 = 2;
          buff[0] = (char)(ZEXT48(leadin + -0x2be) * 0x60f25deb >> 0x28) + 'a';
        }
        else {
          local_70 = 2;
          iVar2 = 1;
        }
        buff[0x2bd < (int)leadin] =
             (char)((uint)(leadin + -0x1a) / 0x1a) +
             (char)(((uint)(leadin + -0x1a) / 0x1a) / 0x1a) * -0x1a + 'a';
      }
      buff[iVar2] = (char)leadin + (char)((int)leadin / 0x1a) * -0x1a + 'a';
      buff[local_70] = '\0';
      strcpy(fname + 7,buff);
    }
    else {
      builtin_strncpy(fname + 7,"xxxx",5);
    }
  }
  else {
    __sprintf_chk(buff,1,0x40,"%d",leadin);
    strcat(fname,buff);
  }
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



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

void __regparm3 FUN_000124a0(char *param_1,int param_2,char param_3)

{
  uint uVar1;
  int iVar2;
  int in_GS_OFFSET;
  int local_70;
  char local_60 [64];
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x124ad;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  builtin_strncpy(param_1,"/dev/sg",8);
  if (param_3 == '\0') {
    if (param_2 < 0x4766) {
      if (param_2 < 0x1a) {
        local_70 = 1;
        iVar2 = 0;
      }
      else {
        uVar1 = (param_2 - 0x1aU) / 0x1a;
        if (0x2bd < param_2) {
          local_70 = 3;
          iVar2 = 2;
          local_60[0] = (char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a';
        }
        else {
          local_70 = 2;
          iVar2 = 1;
        }
        local_60[0x2bd < param_2] = (char)uVar1 + (char)(uVar1 / 0x1a) * -0x1a + 'a';
      }
      local_60[iVar2] = (char)param_2 + (char)(param_2 / 0x1a) * -0x1a + 'a';
      local_60[local_70] = '\0';
      strcpy(param_1 + 7,local_60);
    }
    else {
      builtin_strncpy(param_1 + 7,"xxxx",5);
    }
  }
  else {
    __sprintf_chk(local_60,1,0x40,"%d",param_2);
    strcat(param_1,local_60);
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00012680();
}


PUSH EBP
PUSH EDI
MOV EDI,EAX
PUSH ESI
MOV ESI,EDX
PUSH EBX
CALL 0x00011df0
ADD EBX,0x2acf
SUB ESP,0x6c
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x5c],EAX
XOR EAX,EAX
MOV dword ptr [EDI],0x7665642f
MOV dword ptr [EDI + 0x4],0x67732f
TEST CL,CL
JNZ 0x00012578
CMP EDX,0x4765
JG 0x00012550
MOV EAX,EDX
MOV EBP,0x4ec4ec4f
IMUL EBP
MOV EAX,ESI
SAR EAX,0x1f
SAR EDX,0x3
SUB EDX,EAX
MOV EAX,ESI
IMUL ECX,EDX,0x1a
SUB EAX,ECX
MOV ECX,EAX
CMP ESI,0x19
JLE 0x000125a0
LEA EDX,[ESI + -0x1a]
MOV EAX,EDX
MUL EBP
SHR EDX,0x3
MOV EAX,EDX
MOV dword ptr [ESP + 0xc],EDX
MUL EBP
MOV EAX,dword ptr [ESP + 0xc]
MOV EBP,EDX
SHR EBP,0x3
IMUL EBP,EBP,0x1a
SUB EAX,EBP
MOV EBP,EAX
CMP ESI,0x2bd
JG 0x000125d0
MOV dword ptr [ESP + 0xc],0x2
MOV ESI,0x1
XOR EDX,EDX
ADD EBP,0x61
MOV EAX,EBP
MOV byte ptr [ESP + EDX*0x1 + 0x1c],AL
JMP 0x000125aa
MOV dword ptr [EDI + 0x7],0x78787878
MOV byte ptr [EDI + 0xb],0x0
MOV EAX,dword ptr [ESP + 0x5c]
XOR EAX,dword ptr GS:[0x14]
JNZ 0x00012600
ADD ESP,0x6c
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0xc
LEA EAX,[EBX + 0xffffe20a]
PUSH EDX
PUSH EAX
PUSH 0x40
PUSH 0x1
LEA ESI,[ESP + 0x38]
PUSH ESI
CALL 0x000111b0
ADD ESP,0x18
PUSH ESI
PUSH EDI
CALL 0x000110c0
ADD ESP,0x10
JMP 0x0001255b
MOV dword ptr [ESP + 0xc],0x1
XOR ESI,ESI
MOV EAX,dword ptr [ESP + 0xc]
ADD ECX,0x61
SUB ESP,0x8
ADD EDI,0x7
MOV byte ptr [ESP + ESI*0x1 + 0x24],CL
MOV byte ptr [ESP + EAX*0x1 + 0x24],0x0
LEA EAX,[ESP + 0x24]
PUSH EAX
PUSH EDI
CALL 0x000110d0
ADD ESP,0x10
JMP 0x0001255b
SUB ESI,0x2be
MOV EDX,0x60f25deb
MOV dword ptr [ESP + 0xc],0x3
MOV EAX,ESI
MOV ESI,0x2
MUL EDX
SHR EDX,0x8
ADD EDX,0x61
MOV byte ptr [ESP + 0x1c],DL
MOV EDX,0x1
JMP 0x00012541
CALL 0x00012680
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 FUN_000124a0(char *param_1,int param_2,char param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  int local_70;\n  char local_60 [64];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x124ad;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  builtin_strncpy(param_1,"/dev/sg",8);\n  if (param_3 == '\0') {\n    if (param_2 < 0x4766) {\n      if (param_2 < 0x1a) {\n        local_70 = 1;\n        iVar2 = 0;\n      }\n      else {\n        uVar1 = (param_2 - 0x1aU) / 0x1a;\n        if (0x2bd < param_2) {\n          local_70 = 3;\n          iVar2 = 2;\n          local_60[0] = (char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }\n        else {\n          local_70 = 2;\n          iVar2 = 1;\n        }\n        local_60[0x2bd < param_2] = (char)uVar1 + (char)(uVar1 / 0x1a) * -0x1a + 'a';\n      }\n      local_60[iVar2] = (char)param_2 + (char)(param_2 / 0x1a) * -0x1a + 'a';\n      local_60[local_70] = '\0';\n      strcpy(param_1 + 7,local_60);\n    }\n    else {\n      builtin_strncpy(param_1 + 7,"xxxx",5);\n    }\n  }\n  else {\n    __sprintf_chk(local_60,1,0x40,"%d",param_2);\n    strcat(param_1,local_60);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00012680();\n}\n\n" comment (function_definition "void __regparm3 FUN_000124a0(char *param_1,int param_2,char param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  int local_70;\n  char local_60 [64];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x124ad;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  builtin_strncpy(param_1,"/dev/sg",8);\n  if (param_3 == '\0') {\n    if (param_2 < 0x4766) {\n      if (param_2 < 0x1a) {\n        local_70 = 1;\n        iVar2 = 0;\n      }\n      else {\n        uVar1 = (param_2 - 0x1aU) / 0x1a;\n        if (0x2bd < param_2) {\n          local_70 = 3;\n          iVar2 = 2;\n          local_60[0] = (char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }\n        else {\n          local_70 = 2;\n          iVar2 = 1;\n        }\n        local_60[0x2bd < param_2] = (char)uVar1 + (char)(uVar1 / 0x1a) * -0x1a + 'a';\n      }\n      local_60[iVar2] = (char)param_2 + (char)(param_2 / 0x1a) * -0x1a + 'a';\n      local_60[local_70] = '\0';\n      strcpy(param_1 + 7,local_60);\n    }\n    else {\n      builtin_strncpy(param_1 + 7,"xxxx",5);\n    }\n  }\n  else {\n    __sprintf_chk(local_60,1,0x40,"%d",param_2);\n    strcat(param_1,local_60);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00012680();\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_000124a0(char *param_1,int param_2,char param_3)" identifier (parameter_list "(char *param_1,int param_2,char param_3)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "char param_3" primitive_type identifier) ))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  int local_70;\n  char local_60 [64];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x124ad;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  builtin_strncpy(param_1,"/dev/sg",8);\n  if (param_3 == '\0') {\n    if (param_2 < 0x4766) {\n      if (param_2 < 0x1a) {\n        local_70 = 1;\n        iVar2 = 0;\n      }\n      else {\n        uVar1 = (param_2 - 0x1aU) / 0x1a;\n        if (0x2bd < param_2) {\n          local_70 = 3;\n          iVar2 = 2;\n          local_60[0] = (char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }\n        else {\n          local_70 = 2;\n          iVar2 = 1;\n        }\n        local_60[0x2bd < param_2] = (char)uVar1 + (char)(uVar1 / 0x1a) * -0x1a + 'a';\n      }\n      local_60[iVar2] = (char)param_2 + (char)(param_2 / 0x1a) * -0x1a + 'a';\n      local_60[local_70] = '\0';\n      strcpy(param_1 + 7,local_60);\n    }\n    else {\n      builtin_strncpy(param_1 + 7,"xxxx",5);\n    }\n  }\n  else {\n    __sprintf_chk(local_60,1,0x40,"%d",param_2);\n    strcat(param_1,local_60);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00012680();\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "int local_70;" primitive_type identifier ;) (declaration "char local_60 [64];" primitive_type (array_declarator "local_60 [64]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x124ad;" (assignment_expression "uStack_14 = 0x124ad" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "builtin_strncpy(param_1,"/dev/sg",8);" (call_expression "builtin_strncpy(param_1,"/dev/sg",8)" identifier (argument_list "(param_1,"/dev/sg",8)" ( identifier , (string_literal ""/dev/sg"" " string_content ") , number_literal ))) ;) (if_statement "if (param_3 == '\0') {\n    if (param_2 < 0x4766) {\n      if (param_2 < 0x1a) {\n        local_70 = 1;\n        iVar2 = 0;\n      }\n      else {\n        uVar1 = (param_2 - 0x1aU) / 0x1a;\n        if (0x2bd < param_2) {\n          local_70 = 3;\n          iVar2 = 2;\n          local_60[0] = (char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }\n        else {\n          local_70 = 2;\n          iVar2 = 1;\n        }\n        local_60[0x2bd < param_2] = (char)uVar1 + (char)(uVar1 / 0x1a) * -0x1a + 'a';\n      }\n      local_60[iVar2] = (char)param_2 + (char)(param_2 / 0x1a) * -0x1a + 'a';\n      local_60[local_70] = '\0';\n      strcpy(param_1 + 7,local_60);\n    }\n    else {\n      builtin_strncpy(param_1 + 7,"xxxx",5);\n    }\n  }\n  else {\n    __sprintf_chk(local_60,1,0x40,"%d",param_2);\n    strcat(param_1,local_60);\n  }" if (parenthesized_expression "(param_3 == '\0')" ( (binary_expression "param_3 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    if (param_2 < 0x4766) {\n      if (param_2 < 0x1a) {\n        local_70 = 1;\n        iVar2 = 0;\n      }\n      else {\n        uVar1 = (param_2 - 0x1aU) / 0x1a;\n        if (0x2bd < param_2) {\n          local_70 = 3;\n          iVar2 = 2;\n          local_60[0] = (char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }\n        else {\n          local_70 = 2;\n          iVar2 = 1;\n        }\n        local_60[0x2bd < param_2] = (char)uVar1 + (char)(uVar1 / 0x1a) * -0x1a + 'a';\n      }\n      local_60[iVar2] = (char)param_2 + (char)(param_2 / 0x1a) * -0x1a + 'a';\n      local_60[local_70] = '\0';\n      strcpy(param_1 + 7,local_60);\n    }\n    else {\n      builtin_strncpy(param_1 + 7,"xxxx",5);\n    }\n  }" { (if_statement "if (param_2 < 0x4766) {\n      if (param_2 < 0x1a) {\n        local_70 = 1;\n        iVar2 = 0;\n      }\n      else {\n        uVar1 = (param_2 - 0x1aU) / 0x1a;\n        if (0x2bd < param_2) {\n          local_70 = 3;\n          iVar2 = 2;\n          local_60[0] = (char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }\n        else {\n          local_70 = 2;\n          iVar2 = 1;\n        }\n        local_60[0x2bd < param_2] = (char)uVar1 + (char)(uVar1 / 0x1a) * -0x1a + 'a';\n      }\n      local_60[iVar2] = (char)param_2 + (char)(param_2 / 0x1a) * -0x1a + 'a';\n      local_60[local_70] = '\0';\n      strcpy(param_1 + 7,local_60);\n    }\n    else {\n      builtin_strncpy(param_1 + 7,"xxxx",5);\n    }" if (parenthesized_expression "(param_2 < 0x4766)" ( (binary_expression "param_2 < 0x4766" identifier < number_literal) )) (compound_statement "{\n      if (param_2 < 0x1a) {\n        local_70 = 1;\n        iVar2 = 0;\n      }\n      else {\n        uVar1 = (param_2 - 0x1aU) / 0x1a;\n        if (0x2bd < param_2) {\n          local_70 = 3;\n          iVar2 = 2;\n          local_60[0] = (char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }\n        else {\n          local_70 = 2;\n          iVar2 = 1;\n        }\n        local_60[0x2bd < param_2] = (char)uVar1 + (char)(uVar1 / 0x1a) * -0x1a + 'a';\n      }\n      local_60[iVar2] = (char)param_2 + (char)(param_2 / 0x1a) * -0x1a + 'a';\n      local_60[local_70] = '\0';\n      strcpy(param_1 + 7,local_60);\n    }" { (if_statement "if (param_2 < 0x1a) {\n        local_70 = 1;\n        iVar2 = 0;\n      }\n      else {\n        uVar1 = (param_2 - 0x1aU) / 0x1a;\n        if (0x2bd < param_2) {\n          local_70 = 3;\n          iVar2 = 2;\n          local_60[0] = (char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }\n        else {\n          local_70 = 2;\n          iVar2 = 1;\n        }\n        local_60[0x2bd < param_2] = (char)uVar1 + (char)(uVar1 / 0x1a) * -0x1a + 'a';\n      }" if (parenthesized_expression "(param_2 < 0x1a)" ( (binary_expression "param_2 < 0x1a" identifier < number_literal) )) (compound_statement "{\n        local_70 = 1;\n        iVar2 = 0;\n      }" { (expression_statement "local_70 = 1;" (assignment_expression "local_70 = 1" identifier = number_literal) ;) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) }) (else_clause "else {\n        uVar1 = (param_2 - 0x1aU) / 0x1a;\n        if (0x2bd < param_2) {\n          local_70 = 3;\n          iVar2 = 2;\n          local_60[0] = (char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }\n        else {\n          local_70 = 2;\n          iVar2 = 1;\n        }\n        local_60[0x2bd < param_2] = (char)uVar1 + (char)(uVar1 / 0x1a) * -0x1a + 'a';\n      }" else (compound_statement "{\n        uVar1 = (param_2 - 0x1aU) / 0x1a;\n        if (0x2bd < param_2) {\n          local_70 = 3;\n          iVar2 = 2;\n          local_60[0] = (char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }\n        else {\n          local_70 = 2;\n          iVar2 = 1;\n        }\n        local_60[0x2bd < param_2] = (char)uVar1 + (char)(uVar1 / 0x1a) * -0x1a + 'a';\n      }" { (expression_statement "uVar1 = (param_2 - 0x1aU) / 0x1a;" (assignment_expression "uVar1 = (param_2 - 0x1aU) / 0x1a" identifier = (binary_expression "(param_2 - 0x1aU) / 0x1a" (parenthesized_expression "(param_2 - 0x1aU)" ( (binary_expression "param_2 - 0x1aU" identifier - number_literal) )) / number_literal)) ;) (if_statement "if (0x2bd < param_2) {\n          local_70 = 3;\n          iVar2 = 2;\n          local_60[0] = (char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }\n        else {\n          local_70 = 2;\n          iVar2 = 1;\n        }" if (parenthesized_expression "(0x2bd < param_2)" ( (binary_expression "0x2bd < param_2" number_literal < identifier) )) (compound_statement "{\n          local_70 = 3;\n          iVar2 = 2;\n          local_60[0] = (char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }" { (expression_statement "local_70 = 3;" (assignment_expression "local_70 = 3" identifier = number_literal) ;) (expression_statement "iVar2 = 2;" (assignment_expression "iVar2 = 2" identifier = number_literal) ;) (expression_statement "local_60[0] = (char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a';" (assignment_expression "local_60[0] = (char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a'" (subscript_expression "local_60[0]" identifier [ number_literal ]) = (binary_expression "(char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a'" (cast_expression "(char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28)" ( (binary_expression "(ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28" (binary_expression "(ulonglong)(param_2 - 0x2be) * 0x60f25deb" (call_expression "(ulonglong)(param_2 - 0x2be)" (parenthesized_expression "(ulonglong)" ( identifier )) (argument_list "(param_2 - 0x2be)" ( (binary_expression "param_2 - 0x2be" identifier - number_literal) ))) * number_literal) >> number_literal) ))) + (char_literal "'a'" ' character '))) ;) }) (else_clause "else {\n          local_70 = 2;\n          iVar2 = 1;\n        }" else (compound_statement "{\n          local_70 = 2;\n          iVar2 = 1;\n        }" { (expression_statement "local_70 = 2;" (assignment_expression "local_70 = 2" identifier = number_literal) ;) (expression_statement "iVar2 = 1;" (assignment_expression "iVar2 = 1" identifier = number_literal) ;) }))) (expression_statement "local_60[0x2bd < param_2] = (char)uVar1 + (char)(uVar1 / 0x1a) * -0x1a + 'a';" (assignment_expression "local_60[0x2bd < param_2] = (char)uVar1 + (char)(uVar1 / 0x1a) * -0x1a + 'a'" (subscript_expression "local_60[0x2bd < param_2]" identifier [ (binary_expression "0x2bd < param_2" number_literal < identifier) ]) = (binary_expression "(char)uVar1 + (char)(uVar1 / 0x1a) * -0x1a + 'a'" (binary_expression "(char)uVar1 + (char)(uVar1 / 0x1a) * -0x1a" (cast_expression "(char)uVar1" ( (type_descriptor "char" primitive_type) ) identifier) + (binary_expression "(char)(uVar1 / 0x1a) * -0x1a" (cast_expression "(char)(uVar1 / 0x1a)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(uVar1 / 0x1a)" ( (binary_expression "uVar1 / 0x1a" identifier / number_literal) ))) * number_literal)) + (char_literal "'a'" ' character '))) ;) }))) (expression_statement "local_60[iVar2] = (char)param_2 + (char)(param_2 / 0x1a) * -0x1a + 'a';" (assignment_expression "local_60[iVar2] = (char)param_2 + (char)(param_2 / 0x1a) * -0x1a + 'a'" (subscript_expression "local_60[iVar2]" identifier [ identifier ]) = (binary_expression "(char)param_2 + (char)(param_2 / 0x1a) * -0x1a + 'a'" (binary_expression "(char)param_2 + (char)(param_2 / 0x1a) * -0x1a" (cast_expression "(char)param_2" ( (type_descriptor "char" primitive_type) ) identifier) + (binary_expression "(char)(param_2 / 0x1a) * -0x1a" (cast_expression "(char)(param_2 / 0x1a)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(param_2 / 0x1a)" ( (binary_expression "param_2 / 0x1a" identifier / number_literal) ))) * number_literal)) + (char_literal "'a'" ' character '))) ;) (expression_statement "local_60[local_70] = '\0';" (assignment_expression "local_60[local_70] = '\0'" (subscript_expression "local_60[local_70]" identifier [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "strcpy(param_1 + 7,local_60);" (call_expression "strcpy(param_1 + 7,local_60)" identifier (argument_list "(param_1 + 7,local_60)" ( (binary_expression "param_1 + 7" identifier + number_literal) , identifier ))) ;) }) (else_clause "else {\n      builtin_strncpy(param_1 + 7,"xxxx",5);\n    }" else (compound_statement "{\n      builtin_strncpy(param_1 + 7,"xxxx",5);\n    }" { (expression_statement "builtin_strncpy(param_1 + 7,"xxxx",5);" (call_expression "builtin_strncpy(param_1 + 7,"xxxx",5)" identifier (argument_list "(param_1 + 7,"xxxx",5)" ( (binary_expression "param_1 + 7" identifier + number_literal) , (string_literal ""xxxx"" " string_content ") , number_literal ))) ;) }))) }) (else_clause "else {\n    __sprintf_chk(local_60,1,0x40,"%d",param_2);\n    strcat(param_1,local_60);\n  }" else (compound_statement "{\n    __sprintf_chk(local_60,1,0x40,"%d",param_2);\n    strcat(param_1,local_60);\n  }" { (expression_statement "__sprintf_chk(local_60,1,0x40,"%d",param_2);" (call_expression "__sprintf_chk(local_60,1,0x40,"%d",param_2)" identifier (argument_list "(local_60,1,0x40,"%d",param_2)" ( identifier , number_literal , number_literal , (string_literal ""%d"" " string_content ") , identifier ))) ;) (expression_statement "strcat(param_1,local_60);" (call_expression "strcat(param_1,local_60)" identifier (argument_list "(param_1,local_60)" ( identifier , identifier ))) ;) }))) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) comment (expression_statement "FUN_00012680();" (call_expression "FUN_00012680()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 make_dev_name(char *fname,char *leadin,int k,_Bool do_numeric)\n\n{\n  int iVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  int local_70;\n  char buff [64];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  builtin_strncpy(fname,"/dev/sg",8);\n  if ((char)k == '\0') {\n    if ((int)leadin < 0x4766) {\n      if ((int)leadin < 0x1a) {\n        local_70 = 1;\n        iVar2 = 0;\n      }\n      else {\n        if (0x2bd < (int)leadin) {\n          local_70 = 3;\n          iVar2 = 2;\n          buff[0] = (char)(ZEXT48(leadin + -0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }\n        else {\n          local_70 = 2;\n          iVar2 = 1;\n        }\n        buff[0x2bd < (int)leadin] =\n             (char)((uint)(leadin + -0x1a) / 0x1a) +\n             (char)(((uint)(leadin + -0x1a) / 0x1a) / 0x1a) * -0x1a + 'a';\n      }\n      buff[iVar2] = (char)leadin + (char)((int)leadin / 0x1a) * -0x1a + 'a';\n      buff[local_70] = '\0';\n      strcpy(fname + 7,buff);\n    }\n    else {\n      builtin_strncpy(fname + 7,"xxxx",5);\n    }\n  }\n  else {\n    __sprintf_chk(buff,1,0x40,"%d",leadin);\n    strcat(fname,buff);\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment (function_definition "void __regparm3 make_dev_name(char *fname,char *leadin,int k,_Bool do_numeric)\n\n{\n  int iVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  int local_70;\n  char buff [64];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  builtin_strncpy(fname,"/dev/sg",8);\n  if ((char)k == '\0') {\n    if ((int)leadin < 0x4766) {\n      if ((int)leadin < 0x1a) {\n        local_70 = 1;\n        iVar2 = 0;\n      }\n      else {\n        if (0x2bd < (int)leadin) {\n          local_70 = 3;\n          iVar2 = 2;\n          buff[0] = (char)(ZEXT48(leadin + -0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }\n        else {\n          local_70 = 2;\n          iVar2 = 1;\n        }\n        buff[0x2bd < (int)leadin] =\n             (char)((uint)(leadin + -0x1a) / 0x1a) +\n             (char)(((uint)(leadin + -0x1a) / 0x1a) / 0x1a) * -0x1a + 'a';\n      }\n      buff[iVar2] = (char)leadin + (char)((int)leadin / 0x1a) * -0x1a + 'a';\n      buff[local_70] = '\0';\n      strcpy(fname + 7,buff);\n    }\n    else {\n      builtin_strncpy(fname + 7,"xxxx",5);\n    }\n  }\n  else {\n    __sprintf_chk(buff,1,0x40,"%d",leadin);\n    strcat(fname,buff);\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "make_dev_name(char *fname,char *leadin,int k,_Bool do_numeric)" identifier (parameter_list "(char *fname,char *leadin,int k,_Bool do_numeric)" ( (parameter_declaration "char *fname" primitive_type (pointer_declarator "*fname" * identifier)) , (parameter_declaration "char *leadin" primitive_type (pointer_declarator "*leadin" * identifier)) , (parameter_declaration "int k" primitive_type identifier) , (parameter_declaration "_Bool do_numeric" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  int local_70;\n  char buff [64];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  builtin_strncpy(fname,"/dev/sg",8);\n  if ((char)k == '\0') {\n    if ((int)leadin < 0x4766) {\n      if ((int)leadin < 0x1a) {\n        local_70 = 1;\n        iVar2 = 0;\n      }\n      else {\n        if (0x2bd < (int)leadin) {\n          local_70 = 3;\n          iVar2 = 2;\n          buff[0] = (char)(ZEXT48(leadin + -0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }\n        else {\n          local_70 = 2;\n          iVar2 = 1;\n        }\n        buff[0x2bd < (int)leadin] =\n             (char)((uint)(leadin + -0x1a) / 0x1a) +\n             (char)(((uint)(leadin + -0x1a) / 0x1a) / 0x1a) * -0x1a + 'a';\n      }\n      buff[iVar2] = (char)leadin + (char)((int)leadin / 0x1a) * -0x1a + 'a';\n      buff[local_70] = '\0';\n      strcpy(fname + 7,buff);\n    }\n    else {\n      builtin_strncpy(fname + 7,"xxxx",5);\n    }\n  }\n  else {\n    __sprintf_chk(buff,1,0x40,"%d",leadin);\n    strcat(fname,buff);\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "int local_70;" primitive_type identifier ;) (declaration "char buff [64];" primitive_type (array_declarator "buff [64]" identifier [ number_literal ]) ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "builtin_strncpy(fname,"/dev/sg",8);" (call_expression "builtin_strncpy(fname,"/dev/sg",8)" identifier (argument_list "(fname,"/dev/sg",8)" ( identifier , (string_literal ""/dev/sg"" " string_content ") , number_literal ))) ;) (if_statement "if ((char)k == '\0') {\n    if ((int)leadin < 0x4766) {\n      if ((int)leadin < 0x1a) {\n        local_70 = 1;\n        iVar2 = 0;\n      }\n      else {\n        if (0x2bd < (int)leadin) {\n          local_70 = 3;\n          iVar2 = 2;\n          buff[0] = (char)(ZEXT48(leadin + -0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }\n        else {\n          local_70 = 2;\n          iVar2 = 1;\n        }\n        buff[0x2bd < (int)leadin] =\n             (char)((uint)(leadin + -0x1a) / 0x1a) +\n             (char)(((uint)(leadin + -0x1a) / 0x1a) / 0x1a) * -0x1a + 'a';\n      }\n      buff[iVar2] = (char)leadin + (char)((int)leadin / 0x1a) * -0x1a + 'a';\n      buff[local_70] = '\0';\n      strcpy(fname + 7,buff);\n    }\n    else {\n      builtin_strncpy(fname + 7,"xxxx",5);\n    }\n  }\n  else {\n    __sprintf_chk(buff,1,0x40,"%d",leadin);\n    strcat(fname,buff);\n  }" if (parenthesized_expression "((char)k == '\0')" ( (binary_expression "(char)k == '\0'" (cast_expression "(char)k" ( (type_descriptor "char" primitive_type) ) identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    if ((int)leadin < 0x4766) {\n      if ((int)leadin < 0x1a) {\n        local_70 = 1;\n        iVar2 = 0;\n      }\n      else {\n        if (0x2bd < (int)leadin) {\n          local_70 = 3;\n          iVar2 = 2;\n          buff[0] = (char)(ZEXT48(leadin + -0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }\n        else {\n          local_70 = 2;\n          iVar2 = 1;\n        }\n        buff[0x2bd < (int)leadin] =\n             (char)((uint)(leadin + -0x1a) / 0x1a) +\n             (char)(((uint)(leadin + -0x1a) / 0x1a) / 0x1a) * -0x1a + 'a';\n      }\n      buff[iVar2] = (char)leadin + (char)((int)leadin / 0x1a) * -0x1a + 'a';\n      buff[local_70] = '\0';\n      strcpy(fname + 7,buff);\n    }\n    else {\n      builtin_strncpy(fname + 7,"xxxx",5);\n    }\n  }" { (if_statement "if ((int)leadin < 0x4766) {\n      if ((int)leadin < 0x1a) {\n        local_70 = 1;\n        iVar2 = 0;\n      }\n      else {\n        if (0x2bd < (int)leadin) {\n          local_70 = 3;\n          iVar2 = 2;\n          buff[0] = (char)(ZEXT48(leadin + -0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }\n        else {\n          local_70 = 2;\n          iVar2 = 1;\n        }\n        buff[0x2bd < (int)leadin] =\n             (char)((uint)(leadin + -0x1a) / 0x1a) +\n             (char)(((uint)(leadin + -0x1a) / 0x1a) / 0x1a) * -0x1a + 'a';\n      }\n      buff[iVar2] = (char)leadin + (char)((int)leadin / 0x1a) * -0x1a + 'a';\n      buff[local_70] = '\0';\n      strcpy(fname + 7,buff);\n    }\n    else {\n      builtin_strncpy(fname + 7,"xxxx",5);\n    }" if (parenthesized_expression "((int)leadin < 0x4766)" ( (binary_expression "(int)leadin < 0x4766" (cast_expression "(int)leadin" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n      if ((int)leadin < 0x1a) {\n        local_70 = 1;\n        iVar2 = 0;\n      }\n      else {\n        if (0x2bd < (int)leadin) {\n          local_70 = 3;\n          iVar2 = 2;\n          buff[0] = (char)(ZEXT48(leadin + -0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }\n        else {\n          local_70 = 2;\n          iVar2 = 1;\n        }\n        buff[0x2bd < (int)leadin] =\n             (char)((uint)(leadin + -0x1a) / 0x1a) +\n             (char)(((uint)(leadin + -0x1a) / 0x1a) / 0x1a) * -0x1a + 'a';\n      }\n      buff[iVar2] = (char)leadin + (char)((int)leadin / 0x1a) * -0x1a + 'a';\n      buff[local_70] = '\0';\n      strcpy(fname + 7,buff);\n    }" { (if_statement "if ((int)leadin < 0x1a) {\n        local_70 = 1;\n        iVar2 = 0;\n      }\n      else {\n        if (0x2bd < (int)leadin) {\n          local_70 = 3;\n          iVar2 = 2;\n          buff[0] = (char)(ZEXT48(leadin + -0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }\n        else {\n          local_70 = 2;\n          iVar2 = 1;\n        }\n        buff[0x2bd < (int)leadin] =\n             (char)((uint)(leadin + -0x1a) / 0x1a) +\n             (char)(((uint)(leadin + -0x1a) / 0x1a) / 0x1a) * -0x1a + 'a';\n      }" if (parenthesized_expression "((int)leadin < 0x1a)" ( (binary_expression "(int)leadin < 0x1a" (cast_expression "(int)leadin" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n        local_70 = 1;\n        iVar2 = 0;\n      }" { (expression_statement "local_70 = 1;" (assignment_expression "local_70 = 1" identifier = number_literal) ;) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) }) (else_clause "else {\n        if (0x2bd < (int)leadin) {\n          local_70 = 3;\n          iVar2 = 2;\n          buff[0] = (char)(ZEXT48(leadin + -0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }\n        else {\n          local_70 = 2;\n          iVar2 = 1;\n        }\n        buff[0x2bd < (int)leadin] =\n             (char)((uint)(leadin + -0x1a) / 0x1a) +\n             (char)(((uint)(leadin + -0x1a) / 0x1a) / 0x1a) * -0x1a + 'a';\n      }" else (compound_statement "{\n        if (0x2bd < (int)leadin) {\n          local_70 = 3;\n          iVar2 = 2;\n          buff[0] = (char)(ZEXT48(leadin + -0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }\n        else {\n          local_70 = 2;\n          iVar2 = 1;\n        }\n        buff[0x2bd < (int)leadin] =\n             (char)((uint)(leadin + -0x1a) / 0x1a) +\n             (char)(((uint)(leadin + -0x1a) / 0x1a) / 0x1a) * -0x1a + 'a';\n      }" { (if_statement "if (0x2bd < (int)leadin) {\n          local_70 = 3;\n          iVar2 = 2;\n          buff[0] = (char)(ZEXT48(leadin + -0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }\n        else {\n          local_70 = 2;\n          iVar2 = 1;\n        }" if (parenthesized_expression "(0x2bd < (int)leadin)" ( (binary_expression "0x2bd < (int)leadin" number_literal < (cast_expression "(int)leadin" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n          local_70 = 3;\n          iVar2 = 2;\n          buff[0] = (char)(ZEXT48(leadin + -0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }" { (expression_statement "local_70 = 3;" (assignment_expression "local_70 = 3" identifier = number_literal) ;) (expression_statement "iVar2 = 2;" (assignment_expression "iVar2 = 2" identifier = number_literal) ;) (expression_statement "buff[0] = (char)(ZEXT48(leadin + -0x2be) * 0x60f25deb >> 0x28) + 'a';" (assignment_expression "buff[0] = (char)(ZEXT48(leadin + -0x2be) * 0x60f25deb >> 0x28) + 'a'" (subscript_expression "buff[0]" identifier [ number_literal ]) = (binary_expression "(char)(ZEXT48(leadin + -0x2be) * 0x60f25deb >> 0x28) + 'a'" (cast_expression "(char)(ZEXT48(leadin + -0x2be) * 0x60f25deb >> 0x28)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(ZEXT48(leadin + -0x2be) * 0x60f25deb >> 0x28)" ( (binary_expression "ZEXT48(leadin + -0x2be) * 0x60f25deb >> 0x28" (binary_expression "ZEXT48(leadin + -0x2be) * 0x60f25deb" (call_expression "ZEXT48(leadin + -0x2be)" identifier (argument_list "(leadin + -0x2be)" ( (binary_expression "leadin + -0x2be" identifier + number_literal) ))) * number_literal) >> number_literal) ))) + (char_literal "'a'" ' character '))) ;) }) (else_clause "else {\n          local_70 = 2;\n          iVar2 = 1;\n        }" else (compound_statement "{\n          local_70 = 2;\n          iVar2 = 1;\n        }" { (expression_statement "local_70 = 2;" (assignment_expression "local_70 = 2" identifier = number_literal) ;) (expression_statement "iVar2 = 1;" (assignment_expression "iVar2 = 1" identifier = number_literal) ;) }))) (expression_statement "buff[0x2bd < (int)leadin] =\n             (char)((uint)(leadin + -0x1a) / 0x1a) +\n             (char)(((uint)(leadin + -0x1a) / 0x1a) / 0x1a) * -0x1a + 'a';" (assignment_expression "buff[0x2bd < (int)leadin] =\n             (char)((uint)(leadin + -0x1a) / 0x1a) +\n             (char)(((uint)(leadin + -0x1a) / 0x1a) / 0x1a) * -0x1a + 'a'" (subscript_expression "buff[0x2bd < (int)leadin]" identifier [ (binary_expression "0x2bd < (int)leadin" number_literal < (cast_expression "(int)leadin" ( (type_descriptor "int" primitive_type) ) identifier)) ]) = (binary_expression "(char)((uint)(leadin + -0x1a) / 0x1a) +\n             (char)(((uint)(leadin + -0x1a) / 0x1a) / 0x1a) * -0x1a + 'a'" (binary_expression "(char)((uint)(leadin + -0x1a) / 0x1a) +\n             (char)(((uint)(leadin + -0x1a) / 0x1a) / 0x1a) * -0x1a" (cast_expression "(char)((uint)(leadin + -0x1a) / 0x1a)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((uint)(leadin + -0x1a) / 0x1a)" ( (binary_expression "(uint)(leadin + -0x1a) / 0x1a" (call_expression "(uint)(leadin + -0x1a)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(leadin + -0x1a)" ( (binary_expression "leadin + -0x1a" identifier + number_literal) ))) / number_literal) ))) + (binary_expression "(char)(((uint)(leadin + -0x1a) / 0x1a) / 0x1a) * -0x1a" (cast_expression "(char)(((uint)(leadin + -0x1a) / 0x1a) / 0x1a)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(((uint)(leadin + -0x1a) / 0x1a) / 0x1a)" ( (binary_expression "((uint)(leadin + -0x1a) / 0x1a) / 0x1a" (parenthesized_expression "((uint)(leadin + -0x1a) / 0x1a)" ( (binary_expression "(uint)(leadin + -0x1a) / 0x1a" (call_expression "(uint)(leadin + -0x1a)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(leadin + -0x1a)" ( (binary_expression "leadin + -0x1a" identifier + number_literal) ))) / number_literal) )) / number_literal) ))) * number_literal)) + (char_literal "'a'" ' character '))) ;) }))) (expression_statement "buff[iVar2] = (char)leadin + (char)((int)leadin / 0x1a) * -0x1a + 'a';" (assignment_expression "buff[iVar2] = (char)leadin + (char)((int)leadin / 0x1a) * -0x1a + 'a'" (subscript_expression "buff[iVar2]" identifier [ identifier ]) = (binary_expression "(char)leadin + (char)((int)leadin / 0x1a) * -0x1a + 'a'" (binary_expression "(char)leadin + (char)((int)leadin / 0x1a) * -0x1a" (cast_expression "(char)leadin" ( (type_descriptor "char" primitive_type) ) identifier) + (binary_expression "(char)((int)leadin / 0x1a) * -0x1a" (cast_expression "(char)((int)leadin / 0x1a)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((int)leadin / 0x1a)" ( (binary_expression "(int)leadin / 0x1a" (cast_expression "(int)leadin" ( (type_descriptor "int" primitive_type) ) identifier) / number_literal) ))) * number_literal)) + (char_literal "'a'" ' character '))) ;) (expression_statement "buff[local_70] = '\0';" (assignment_expression "buff[local_70] = '\0'" (subscript_expression "buff[local_70]" identifier [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "strcpy(fname + 7,buff);" (call_expression "strcpy(fname + 7,buff)" identifier (argument_list "(fname + 7,buff)" ( (binary_expression "fname + 7" identifier + number_literal) , identifier ))) ;) }) (else_clause "else {\n      builtin_strncpy(fname + 7,"xxxx",5);\n    }" else (compound_statement "{\n      builtin_strncpy(fname + 7,"xxxx",5);\n    }" { (expression_statement "builtin_strncpy(fname + 7,"xxxx",5);" (call_expression "builtin_strncpy(fname + 7,"xxxx",5)" identifier (argument_list "(fname + 7,"xxxx",5)" ( (binary_expression "fname + 7" identifier + number_literal) , (string_literal ""xxxx"" " string_content ") , number_literal ))) ;) }))) }) (else_clause "else {\n    __sprintf_chk(buff,1,0x40,"%d",leadin);\n    strcat(fname,buff);\n  }" else (compound_statement "{\n    __sprintf_chk(buff,1,0x40,"%d",leadin);\n    strcat(fname,buff);\n  }" { (expression_statement "__sprintf_chk(buff,1,0x40,"%d",leadin);" (call_expression "__sprintf_chk(buff,1,0x40,"%d",leadin)" identifier (argument_list "(buff,1,0x40,"%d",leadin)" ( identifier , number_literal , number_literal , (string_literal ""%d"" " string_content ") , identifier ))) ;) (expression_statement "strcat(fname,buff);" (call_expression "strcat(fname,buff)" identifier (argument_list "(fname,buff)" ( identifier , identifier ))) ;) }))) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "void __regparm3 FUN_000124a0(char *param_1,int param_2,char param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  int local_70;\n  char local_60 [64];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x124ad;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  builtin_strncpy(param_1,"/dev/sg",8);\n  if (param_3 == '\0') {\n    if (param_2 < 0x4766) {\n      if (param_2 < 0x1a) {\n        local_70 = 1;\n        iVar2 = 0;\n      }\n      else {\n        uVar1 = (param_2 - 0x1aU) / 0x1a;\n        if (0x2bd < param_2) {\n          local_70 = 3;\n          iVar2 = 2;\n          local_60[0] = (char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }\n        else {\n          local_70 = 2;\n          iVar2 = 1;\n        }\n        local_60[0x2bd < param_2] = (char)uVar1 + (char)(uVar1 / 0x1a) * -0x1a + 'a';\n      }\n      local_60[iVar2] = (char)param_2 + (char)(param_2 / 0x1a) * -0x1a + 'a';\n      local_60[local_70] = '\0';\n      strcpy(param_1 + 7,local_60);\n    }\n    else {\n      builtin_strncpy(param_1 + 7,"xxxx",5);\n    }\n  }\n  else {\n    __sprintf_chk(local_60,1,0x40,"%d",param_2);\n    strcat(param_1,local_60);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_00012680();\n}\n\n" (function_definition "void __regparm3 FUN_000124a0(char *param_1,int param_2,char param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  int local_70;\n  char local_60 [64];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x124ad;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  builtin_strncpy(param_1,"/dev/sg",8);\n  if (param_3 == '\0') {\n    if (param_2 < 0x4766) {\n      if (param_2 < 0x1a) {\n        local_70 = 1;\n        iVar2 = 0;\n      }\n      else {\n        uVar1 = (param_2 - 0x1aU) / 0x1a;\n        if (0x2bd < param_2) {\n          local_70 = 3;\n          iVar2 = 2;\n          local_60[0] = (char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }\n        else {\n          local_70 = 2;\n          iVar2 = 1;\n        }\n        local_60[0x2bd < param_2] = (char)uVar1 + (char)(uVar1 / 0x1a) * -0x1a + 'a';\n      }\n      local_60[iVar2] = (char)param_2 + (char)(param_2 / 0x1a) * -0x1a + 'a';\n      local_60[local_70] = '\0';\n      strcpy(param_1 + 7,local_60);\n    }\n    else {\n      builtin_strncpy(param_1 + 7,"xxxx",5);\n    }\n  }\n  else {\n    __sprintf_chk(local_60,1,0x40,"%d",param_2);\n    strcat(param_1,local_60);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_00012680();\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_000124a0(char *param_1,int param_2,char param_3)" identifier (parameter_list "(char *param_1,int param_2,char param_3)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "char param_3" primitive_type identifier) ))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  int local_70;\n  char local_60 [64];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x124ad;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  builtin_strncpy(param_1,"/dev/sg",8);\n  if (param_3 == '\0') {\n    if (param_2 < 0x4766) {\n      if (param_2 < 0x1a) {\n        local_70 = 1;\n        iVar2 = 0;\n      }\n      else {\n        uVar1 = (param_2 - 0x1aU) / 0x1a;\n        if (0x2bd < param_2) {\n          local_70 = 3;\n          iVar2 = 2;\n          local_60[0] = (char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }\n        else {\n          local_70 = 2;\n          iVar2 = 1;\n        }\n        local_60[0x2bd < param_2] = (char)uVar1 + (char)(uVar1 / 0x1a) * -0x1a + 'a';\n      }\n      local_60[iVar2] = (char)param_2 + (char)(param_2 / 0x1a) * -0x1a + 'a';\n      local_60[local_70] = '\0';\n      strcpy(param_1 + 7,local_60);\n    }\n    else {\n      builtin_strncpy(param_1 + 7,"xxxx",5);\n    }\n  }\n  else {\n    __sprintf_chk(local_60,1,0x40,"%d",param_2);\n    strcat(param_1,local_60);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_00012680();\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "int local_70;" primitive_type identifier ;) (declaration "char local_60 [64];" primitive_type (array_declarator "local_60 [64]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x124ad;" (assignment_expression "uStack_14 = 0x124ad" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "builtin_strncpy(param_1,"/dev/sg",8);" (call_expression "builtin_strncpy(param_1,"/dev/sg",8)" identifier (argument_list "(param_1,"/dev/sg",8)" ( identifier , (string_literal ""/dev/sg"" " string_content ") , number_literal ))) ;) (if_statement "if (param_3 == '\0') {\n    if (param_2 < 0x4766) {\n      if (param_2 < 0x1a) {\n        local_70 = 1;\n        iVar2 = 0;\n      }\n      else {\n        uVar1 = (param_2 - 0x1aU) / 0x1a;\n        if (0x2bd < param_2) {\n          local_70 = 3;\n          iVar2 = 2;\n          local_60[0] = (char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }\n        else {\n          local_70 = 2;\n          iVar2 = 1;\n        }\n        local_60[0x2bd < param_2] = (char)uVar1 + (char)(uVar1 / 0x1a) * -0x1a + 'a';\n      }\n      local_60[iVar2] = (char)param_2 + (char)(param_2 / 0x1a) * -0x1a + 'a';\n      local_60[local_70] = '\0';\n      strcpy(param_1 + 7,local_60);\n    }\n    else {\n      builtin_strncpy(param_1 + 7,"xxxx",5);\n    }\n  }\n  else {\n    __sprintf_chk(local_60,1,0x40,"%d",param_2);\n    strcat(param_1,local_60);\n  }" if (parenthesized_expression "(param_3 == '\0')" ( (binary_expression "param_3 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    if (param_2 < 0x4766) {\n      if (param_2 < 0x1a) {\n        local_70 = 1;\n        iVar2 = 0;\n      }\n      else {\n        uVar1 = (param_2 - 0x1aU) / 0x1a;\n        if (0x2bd < param_2) {\n          local_70 = 3;\n          iVar2 = 2;\n          local_60[0] = (char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }\n        else {\n          local_70 = 2;\n          iVar2 = 1;\n        }\n        local_60[0x2bd < param_2] = (char)uVar1 + (char)(uVar1 / 0x1a) * -0x1a + 'a';\n      }\n      local_60[iVar2] = (char)param_2 + (char)(param_2 / 0x1a) * -0x1a + 'a';\n      local_60[local_70] = '\0';\n      strcpy(param_1 + 7,local_60);\n    }\n    else {\n      builtin_strncpy(param_1 + 7,"xxxx",5);\n    }\n  }" { (if_statement "if (param_2 < 0x4766) {\n      if (param_2 < 0x1a) {\n        local_70 = 1;\n        iVar2 = 0;\n      }\n      else {\n        uVar1 = (param_2 - 0x1aU) / 0x1a;\n        if (0x2bd < param_2) {\n          local_70 = 3;\n          iVar2 = 2;\n          local_60[0] = (char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }\n        else {\n          local_70 = 2;\n          iVar2 = 1;\n        }\n        local_60[0x2bd < param_2] = (char)uVar1 + (char)(uVar1 / 0x1a) * -0x1a + 'a';\n      }\n      local_60[iVar2] = (char)param_2 + (char)(param_2 / 0x1a) * -0x1a + 'a';\n      local_60[local_70] = '\0';\n      strcpy(param_1 + 7,local_60);\n    }\n    else {\n      builtin_strncpy(param_1 + 7,"xxxx",5);\n    }" if (parenthesized_expression "(param_2 < 0x4766)" ( (binary_expression "param_2 < 0x4766" identifier < number_literal) )) (compound_statement "{\n      if (param_2 < 0x1a) {\n        local_70 = 1;\n        iVar2 = 0;\n      }\n      else {\n        uVar1 = (param_2 - 0x1aU) / 0x1a;\n        if (0x2bd < param_2) {\n          local_70 = 3;\n          iVar2 = 2;\n          local_60[0] = (char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }\n        else {\n          local_70 = 2;\n          iVar2 = 1;\n        }\n        local_60[0x2bd < param_2] = (char)uVar1 + (char)(uVar1 / 0x1a) * -0x1a + 'a';\n      }\n      local_60[iVar2] = (char)param_2 + (char)(param_2 / 0x1a) * -0x1a + 'a';\n      local_60[local_70] = '\0';\n      strcpy(param_1 + 7,local_60);\n    }" { (if_statement "if (param_2 < 0x1a) {\n        local_70 = 1;\n        iVar2 = 0;\n      }\n      else {\n        uVar1 = (param_2 - 0x1aU) / 0x1a;\n        if (0x2bd < param_2) {\n          local_70 = 3;\n          iVar2 = 2;\n          local_60[0] = (char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }\n        else {\n          local_70 = 2;\n          iVar2 = 1;\n        }\n        local_60[0x2bd < param_2] = (char)uVar1 + (char)(uVar1 / 0x1a) * -0x1a + 'a';\n      }" if (parenthesized_expression "(param_2 < 0x1a)" ( (binary_expression "param_2 < 0x1a" identifier < number_literal) )) (compound_statement "{\n        local_70 = 1;\n        iVar2 = 0;\n      }" { (expression_statement "local_70 = 1;" (assignment_expression "local_70 = 1" identifier = number_literal) ;) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) }) (else_clause "else {\n        uVar1 = (param_2 - 0x1aU) / 0x1a;\n        if (0x2bd < param_2) {\n          local_70 = 3;\n          iVar2 = 2;\n          local_60[0] = (char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }\n        else {\n          local_70 = 2;\n          iVar2 = 1;\n        }\n        local_60[0x2bd < param_2] = (char)uVar1 + (char)(uVar1 / 0x1a) * -0x1a + 'a';\n      }" else (compound_statement "{\n        uVar1 = (param_2 - 0x1aU) / 0x1a;\n        if (0x2bd < param_2) {\n          local_70 = 3;\n          iVar2 = 2;\n          local_60[0] = (char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }\n        else {\n          local_70 = 2;\n          iVar2 = 1;\n        }\n        local_60[0x2bd < param_2] = (char)uVar1 + (char)(uVar1 / 0x1a) * -0x1a + 'a';\n      }" { (expression_statement "uVar1 = (param_2 - 0x1aU) / 0x1a;" (assignment_expression "uVar1 = (param_2 - 0x1aU) / 0x1a" identifier = (binary_expression "(param_2 - 0x1aU) / 0x1a" (parenthesized_expression "(param_2 - 0x1aU)" ( (binary_expression "param_2 - 0x1aU" identifier - number_literal) )) / number_literal)) ;) (if_statement "if (0x2bd < param_2) {\n          local_70 = 3;\n          iVar2 = 2;\n          local_60[0] = (char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }\n        else {\n          local_70 = 2;\n          iVar2 = 1;\n        }" if (parenthesized_expression "(0x2bd < param_2)" ( (binary_expression "0x2bd < param_2" number_literal < identifier) )) (compound_statement "{\n          local_70 = 3;\n          iVar2 = 2;\n          local_60[0] = (char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }" { (expression_statement "local_70 = 3;" (assignment_expression "local_70 = 3" identifier = number_literal) ;) (expression_statement "iVar2 = 2;" (assignment_expression "iVar2 = 2" identifier = number_literal) ;) (expression_statement "local_60[0] = (char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a';" (assignment_expression "local_60[0] = (char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a'" (subscript_expression "local_60[0]" identifier [ number_literal ]) = (binary_expression "(char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a'" (cast_expression "(char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28)" ( (binary_expression "(ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28" (binary_expression "(ulonglong)(param_2 - 0x2be) * 0x60f25deb" (call_expression "(ulonglong)(param_2 - 0x2be)" (parenthesized_expression "(ulonglong)" ( identifier )) (argument_list "(param_2 - 0x2be)" ( (binary_expression "param_2 - 0x2be" identifier - number_literal) ))) * number_literal) >> number_literal) ))) + (char_literal "'a'" ' character '))) ;) }) (else_clause "else {\n          local_70 = 2;\n          iVar2 = 1;\n        }" else (compound_statement "{\n          local_70 = 2;\n          iVar2 = 1;\n        }" { (expression_statement "local_70 = 2;" (assignment_expression "local_70 = 2" identifier = number_literal) ;) (expression_statement "iVar2 = 1;" (assignment_expression "iVar2 = 1" identifier = number_literal) ;) }))) (expression_statement "local_60[0x2bd < param_2] = (char)uVar1 + (char)(uVar1 / 0x1a) * -0x1a + 'a';" (assignment_expression "local_60[0x2bd < param_2] = (char)uVar1 + (char)(uVar1 / 0x1a) * -0x1a + 'a'" (subscript_expression "local_60[0x2bd < param_2]" identifier [ (binary_expression "0x2bd < param_2" number_literal < identifier) ]) = (binary_expression "(char)uVar1 + (char)(uVar1 / 0x1a) * -0x1a + 'a'" (binary_expression "(char)uVar1 + (char)(uVar1 / 0x1a) * -0x1a" (cast_expression "(char)uVar1" ( (type_descriptor "char" primitive_type) ) identifier) + (binary_expression "(char)(uVar1 / 0x1a) * -0x1a" (cast_expression "(char)(uVar1 / 0x1a)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(uVar1 / 0x1a)" ( (binary_expression "uVar1 / 0x1a" identifier / number_literal) ))) * number_literal)) + (char_literal "'a'" ' character '))) ;) }))) (expression_statement "local_60[iVar2] = (char)param_2 + (char)(param_2 / 0x1a) * -0x1a + 'a';" (assignment_expression "local_60[iVar2] = (char)param_2 + (char)(param_2 / 0x1a) * -0x1a + 'a'" (subscript_expression "local_60[iVar2]" identifier [ identifier ]) = (binary_expression "(char)param_2 + (char)(param_2 / 0x1a) * -0x1a + 'a'" (binary_expression "(char)param_2 + (char)(param_2 / 0x1a) * -0x1a" (cast_expression "(char)param_2" ( (type_descriptor "char" primitive_type) ) identifier) + (binary_expression "(char)(param_2 / 0x1a) * -0x1a" (cast_expression "(char)(param_2 / 0x1a)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(param_2 / 0x1a)" ( (binary_expression "param_2 / 0x1a" identifier / number_literal) ))) * number_literal)) + (char_literal "'a'" ' character '))) ;) (expression_statement "local_60[local_70] = '\0';" (assignment_expression "local_60[local_70] = '\0'" (subscript_expression "local_60[local_70]" identifier [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "strcpy(param_1 + 7,local_60);" (call_expression "strcpy(param_1 + 7,local_60)" identifier (argument_list "(param_1 + 7,local_60)" ( (binary_expression "param_1 + 7" identifier + number_literal) , identifier ))) ;) }) (else_clause "else {\n      builtin_strncpy(param_1 + 7,"xxxx",5);\n    }" else (compound_statement "{\n      builtin_strncpy(param_1 + 7,"xxxx",5);\n    }" { (expression_statement "builtin_strncpy(param_1 + 7,"xxxx",5);" (call_expression "builtin_strncpy(param_1 + 7,"xxxx",5)" identifier (argument_list "(param_1 + 7,"xxxx",5)" ( (binary_expression "param_1 + 7" identifier + number_literal) , (string_literal ""xxxx"" " string_content ") , number_literal ))) ;) }))) }) (else_clause "else {\n    __sprintf_chk(local_60,1,0x40,"%d",param_2);\n    strcat(param_1,local_60);\n  }" else (compound_statement "{\n    __sprintf_chk(local_60,1,0x40,"%d",param_2);\n    strcat(param_1,local_60);\n  }" { (expression_statement "__sprintf_chk(local_60,1,0x40,"%d",param_2);" (call_expression "__sprintf_chk(local_60,1,0x40,"%d",param_2)" identifier (argument_list "(local_60,1,0x40,"%d",param_2)" ( identifier , number_literal , number_literal , (string_literal ""%d"" " string_content ") , identifier ))) ;) (expression_statement "strcat(param_1,local_60);" (call_expression "strcat(param_1,local_60)" identifier (argument_list "(param_1,local_60)" ( identifier , identifier ))) ;) }))) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "FUN_00012680();" (call_expression "FUN_00012680()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") , LIT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (char_literal ' escape_sequence ')) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression IDENT - LIT) )) / LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT - LIT) ))) * LIT) >> LIT) ))) + (char_literal ' character '))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }))) (expression_statement (assignment_expression (subscript_expression IDENT [ (binary_expression LIT < IDENT) ]) = (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + (binary_expression (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression IDENT / LIT) ))) * LIT)) + (char_literal ' character '))) ;) }))) (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + (binary_expression (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression IDENT / LIT) ))) * LIT)) + (char_literal ' character '))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = (char_literal ' escape_sequence ')) ;) (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , IDENT ))) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , (string_literal " string_content ") , LIT ))) ;) }))) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , LIT , (string_literal " string_content ") , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "void __regparm3 FUN_000124a0(char *param_1,int param_2,char param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  int local_70;\n  char local_60 [64];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x124ad;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  builtin_strncpy(param_1,"/dev/sg",8);\n  if (param_3 == '\0') {\n    if (param_2 < 0x4766) {\n      if (param_2 < 0x1a) {\n        local_70 = 1;\n        iVar2 = 0;\n      }\n      else {\n        uVar1 = (param_2 - 0x1aU) / 0x1a;\n        if (0x2bd < param_2) {\n          local_70 = 3;\n          iVar2 = 2;\n          local_60[0] = (char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }\n        else {\n          local_70 = 2;\n          iVar2 = 1;\n        }\n        local_60[0x2bd < param_2] = (char)uVar1 + (char)(uVar1 / 0x1a) * -0x1a + 'a';\n      }\n      local_60[iVar2] = (char)param_2 + (char)(param_2 / 0x1a) * -0x1a + 'a';\n      local_60[local_70] = '\0';\n      strcpy(param_1 + 7,local_60);\n    }\n    else {\n      builtin_strncpy(param_1 + 7,"xxxx",5);\n    }\n  }\n  else {\n    __sprintf_chk(local_60,1,0x40,"%d",param_2);\n    strcat(param_1,local_60);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_00012680();\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_000124a0(char *param_1,int param_2,char param_3)" (identifier "FUN_000124a0") (parameter_list "(char *param_1,int param_2,char param_3)" (( "(") (parameter_declaration "char *param_1" (primitive_type "char") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "char param_3" (primitive_type "char") (identifier "param_3")) () ")"))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  int local_70;\n  char local_60 [64];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x124ad;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  builtin_strncpy(param_1,"/dev/sg",8);\n  if (param_3 == '\0') {\n    if (param_2 < 0x4766) {\n      if (param_2 < 0x1a) {\n        local_70 = 1;\n        iVar2 = 0;\n      }\n      else {\n        uVar1 = (param_2 - 0x1aU) / 0x1a;\n        if (0x2bd < param_2) {\n          local_70 = 3;\n          iVar2 = 2;\n          local_60[0] = (char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }\n        else {\n          local_70 = 2;\n          iVar2 = 1;\n        }\n        local_60[0x2bd < param_2] = (char)uVar1 + (char)(uVar1 / 0x1a) * -0x1a + 'a';\n      }\n      local_60[iVar2] = (char)param_2 + (char)(param_2 / 0x1a) * -0x1a + 'a';\n      local_60[local_70] = '\0';\n      strcpy(param_1 + 7,local_60);\n    }\n    else {\n      builtin_strncpy(param_1 + 7,"xxxx",5);\n    }\n  }\n  else {\n    __sprintf_chk(local_60,1,0x40,"%d",param_2);\n    strcat(param_1,local_60);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_00012680();\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "int local_70;" (primitive_type "int") (identifier "local_70") (; ";")) (declaration "char local_60 [64];" (primitive_type "char") (array_declarator "local_60 [64]" (identifier "local_60") ([ "[") (number_literal "64") (] "]")) (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x124ad;" (assignment_expression "uStack_14 = 0x124ad" (identifier "uStack_14") (= "=") (number_literal "0x124ad")) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "builtin_strncpy(param_1,"/dev/sg",8);" (call_expression "builtin_strncpy(param_1,"/dev/sg",8)" (identifier "builtin_strncpy") (argument_list "(param_1,"/dev/sg",8)" (( "(") (identifier "param_1") (, ",") (string_literal ""/dev/sg"" (" """) (string_content "/dev/sg") (" """)) (, ",") (number_literal "8") () ")"))) (; ";")) (if_statement "if (param_3 == '\0') {\n    if (param_2 < 0x4766) {\n      if (param_2 < 0x1a) {\n        local_70 = 1;\n        iVar2 = 0;\n      }\n      else {\n        uVar1 = (param_2 - 0x1aU) / 0x1a;\n        if (0x2bd < param_2) {\n          local_70 = 3;\n          iVar2 = 2;\n          local_60[0] = (char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }\n        else {\n          local_70 = 2;\n          iVar2 = 1;\n        }\n        local_60[0x2bd < param_2] = (char)uVar1 + (char)(uVar1 / 0x1a) * -0x1a + 'a';\n      }\n      local_60[iVar2] = (char)param_2 + (char)(param_2 / 0x1a) * -0x1a + 'a';\n      local_60[local_70] = '\0';\n      strcpy(param_1 + 7,local_60);\n    }\n    else {\n      builtin_strncpy(param_1 + 7,"xxxx",5);\n    }\n  }\n  else {\n    __sprintf_chk(local_60,1,0x40,"%d",param_2);\n    strcat(param_1,local_60);\n  }" (if "if") (parenthesized_expression "(param_3 == '\0')" (( "(") (binary_expression "param_3 == '\0'" (identifier "param_3") (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    if (param_2 < 0x4766) {\n      if (param_2 < 0x1a) {\n        local_70 = 1;\n        iVar2 = 0;\n      }\n      else {\n        uVar1 = (param_2 - 0x1aU) / 0x1a;\n        if (0x2bd < param_2) {\n          local_70 = 3;\n          iVar2 = 2;\n          local_60[0] = (char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }\n        else {\n          local_70 = 2;\n          iVar2 = 1;\n        }\n        local_60[0x2bd < param_2] = (char)uVar1 + (char)(uVar1 / 0x1a) * -0x1a + 'a';\n      }\n      local_60[iVar2] = (char)param_2 + (char)(param_2 / 0x1a) * -0x1a + 'a';\n      local_60[local_70] = '\0';\n      strcpy(param_1 + 7,local_60);\n    }\n    else {\n      builtin_strncpy(param_1 + 7,"xxxx",5);\n    }\n  }" ({ "{") (if_statement "if (param_2 < 0x4766) {\n      if (param_2 < 0x1a) {\n        local_70 = 1;\n        iVar2 = 0;\n      }\n      else {\n        uVar1 = (param_2 - 0x1aU) / 0x1a;\n        if (0x2bd < param_2) {\n          local_70 = 3;\n          iVar2 = 2;\n          local_60[0] = (char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }\n        else {\n          local_70 = 2;\n          iVar2 = 1;\n        }\n        local_60[0x2bd < param_2] = (char)uVar1 + (char)(uVar1 / 0x1a) * -0x1a + 'a';\n      }\n      local_60[iVar2] = (char)param_2 + (char)(param_2 / 0x1a) * -0x1a + 'a';\n      local_60[local_70] = '\0';\n      strcpy(param_1 + 7,local_60);\n    }\n    else {\n      builtin_strncpy(param_1 + 7,"xxxx",5);\n    }" (if "if") (parenthesized_expression "(param_2 < 0x4766)" (( "(") (binary_expression "param_2 < 0x4766" (identifier "param_2") (< "<") (number_literal "0x4766")) () ")")) (compound_statement "{\n      if (param_2 < 0x1a) {\n        local_70 = 1;\n        iVar2 = 0;\n      }\n      else {\n        uVar1 = (param_2 - 0x1aU) / 0x1a;\n        if (0x2bd < param_2) {\n          local_70 = 3;\n          iVar2 = 2;\n          local_60[0] = (char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }\n        else {\n          local_70 = 2;\n          iVar2 = 1;\n        }\n        local_60[0x2bd < param_2] = (char)uVar1 + (char)(uVar1 / 0x1a) * -0x1a + 'a';\n      }\n      local_60[iVar2] = (char)param_2 + (char)(param_2 / 0x1a) * -0x1a + 'a';\n      local_60[local_70] = '\0';\n      strcpy(param_1 + 7,local_60);\n    }" ({ "{") (if_statement "if (param_2 < 0x1a) {\n        local_70 = 1;\n        iVar2 = 0;\n      }\n      else {\n        uVar1 = (param_2 - 0x1aU) / 0x1a;\n        if (0x2bd < param_2) {\n          local_70 = 3;\n          iVar2 = 2;\n          local_60[0] = (char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }\n        else {\n          local_70 = 2;\n          iVar2 = 1;\n        }\n        local_60[0x2bd < param_2] = (char)uVar1 + (char)(uVar1 / 0x1a) * -0x1a + 'a';\n      }" (if "if") (parenthesized_expression "(param_2 < 0x1a)" (( "(") (binary_expression "param_2 < 0x1a" (identifier "param_2") (< "<") (number_literal "0x1a")) () ")")) (compound_statement "{\n        local_70 = 1;\n        iVar2 = 0;\n      }" ({ "{") (expression_statement "local_70 = 1;" (assignment_expression "local_70 = 1" (identifier "local_70") (= "=") (number_literal "1")) (; ";")) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" (identifier "iVar2") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n        uVar1 = (param_2 - 0x1aU) / 0x1a;\n        if (0x2bd < param_2) {\n          local_70 = 3;\n          iVar2 = 2;\n          local_60[0] = (char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }\n        else {\n          local_70 = 2;\n          iVar2 = 1;\n        }\n        local_60[0x2bd < param_2] = (char)uVar1 + (char)(uVar1 / 0x1a) * -0x1a + 'a';\n      }" (else "else") (compound_statement "{\n        uVar1 = (param_2 - 0x1aU) / 0x1a;\n        if (0x2bd < param_2) {\n          local_70 = 3;\n          iVar2 = 2;\n          local_60[0] = (char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }\n        else {\n          local_70 = 2;\n          iVar2 = 1;\n        }\n        local_60[0x2bd < param_2] = (char)uVar1 + (char)(uVar1 / 0x1a) * -0x1a + 'a';\n      }" ({ "{") (expression_statement "uVar1 = (param_2 - 0x1aU) / 0x1a;" (assignment_expression "uVar1 = (param_2 - 0x1aU) / 0x1a" (identifier "uVar1") (= "=") (binary_expression "(param_2 - 0x1aU) / 0x1a" (parenthesized_expression "(param_2 - 0x1aU)" (( "(") (binary_expression "param_2 - 0x1aU" (identifier "param_2") (- "-") (number_literal "0x1aU")) () ")")) (/ "/") (number_literal "0x1a"))) (; ";")) (if_statement "if (0x2bd < param_2) {\n          local_70 = 3;\n          iVar2 = 2;\n          local_60[0] = (char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }\n        else {\n          local_70 = 2;\n          iVar2 = 1;\n        }" (if "if") (parenthesized_expression "(0x2bd < param_2)" (( "(") (binary_expression "0x2bd < param_2" (number_literal "0x2bd") (< "<") (identifier "param_2")) () ")")) (compound_statement "{\n          local_70 = 3;\n          iVar2 = 2;\n          local_60[0] = (char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a';\n        }" ({ "{") (expression_statement "local_70 = 3;" (assignment_expression "local_70 = 3" (identifier "local_70") (= "=") (number_literal "3")) (; ";")) (expression_statement "iVar2 = 2;" (assignment_expression "iVar2 = 2" (identifier "iVar2") (= "=") (number_literal "2")) (; ";")) (expression_statement "local_60[0] = (char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a';" (assignment_expression "local_60[0] = (char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a'" (subscript_expression "local_60[0]" (identifier "local_60") ([ "[") (number_literal "0") (] "]")) (= "=") (binary_expression "(char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a'" (cast_expression "(char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (parenthesized_expression "((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28)" (( "(") (binary_expression "(ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28" (binary_expression "(ulonglong)(param_2 - 0x2be) * 0x60f25deb" (call_expression "(ulonglong)(param_2 - 0x2be)" (parenthesized_expression "(ulonglong)" (( "(") (identifier "ulonglong") () ")")) (argument_list "(param_2 - 0x2be)" (( "(") (binary_expression "param_2 - 0x2be" (identifier "param_2") (- "-") (number_literal "0x2be")) () ")"))) (* "*") (number_literal "0x60f25deb")) (>> ">>") (number_literal "0x28")) () ")"))) (+ "+") (char_literal "'a'" (' "'") (character "a") (' "'")))) (; ";")) (} "}")) (else_clause "else {\n          local_70 = 2;\n          iVar2 = 1;\n        }" (else "else") (compound_statement "{\n          local_70 = 2;\n          iVar2 = 1;\n        }" ({ "{") (expression_statement "local_70 = 2;" (assignment_expression "local_70 = 2" (identifier "local_70") (= "=") (number_literal "2")) (; ";")) (expression_statement "iVar2 = 1;" (assignment_expression "iVar2 = 1" (identifier "iVar2") (= "=") (number_literal "1")) (; ";")) (} "}")))) (expression_statement "local_60[0x2bd < param_2] = (char)uVar1 + (char)(uVar1 / 0x1a) * -0x1a + 'a';" (assignment_expression "local_60[0x2bd < param_2] = (char)uVar1 + (char)(uVar1 / 0x1a) * -0x1a + 'a'" (subscript_expression "local_60[0x2bd < param_2]" (identifier "local_60") ([ "[") (binary_expression "0x2bd < param_2" (number_literal "0x2bd") (< "<") (identifier "param_2")) (] "]")) (= "=") (binary_expression "(char)uVar1 + (char)(uVar1 / 0x1a) * -0x1a + 'a'" (binary_expression "(char)uVar1 + (char)(uVar1 / 0x1a) * -0x1a" (cast_expression "(char)uVar1" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "uVar1")) (+ "+") (binary_expression "(char)(uVar1 / 0x1a) * -0x1a" (cast_expression "(char)(uVar1 / 0x1a)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (parenthesized_expression "(uVar1 / 0x1a)" (( "(") (binary_expression "uVar1 / 0x1a" (identifier "uVar1") (/ "/") (number_literal "0x1a")) () ")"))) (* "*") (number_literal "-0x1a"))) (+ "+") (char_literal "'a'" (' "'") (character "a") (' "'")))) (; ";")) (} "}")))) (expression_statement "local_60[iVar2] = (char)param_2 + (char)(param_2 / 0x1a) * -0x1a + 'a';" (assignment_expression "local_60[iVar2] = (char)param_2 + (char)(param_2 / 0x1a) * -0x1a + 'a'" (subscript_expression "local_60[iVar2]" (identifier "local_60") ([ "[") (identifier "iVar2") (] "]")) (= "=") (binary_expression "(char)param_2 + (char)(param_2 / 0x1a) * -0x1a + 'a'" (binary_expression "(char)param_2 + (char)(param_2 / 0x1a) * -0x1a" (cast_expression "(char)param_2" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "param_2")) (+ "+") (binary_expression "(char)(param_2 / 0x1a) * -0x1a" (cast_expression "(char)(param_2 / 0x1a)" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (parenthesized_expression "(param_2 / 0x1a)" (( "(") (binary_expression "param_2 / 0x1a" (identifier "param_2") (/ "/") (number_literal "0x1a")) () ")"))) (* "*") (number_literal "-0x1a"))) (+ "+") (char_literal "'a'" (' "'") (character "a") (' "'")))) (; ";")) (expression_statement "local_60[local_70] = '\0';" (assignment_expression "local_60[local_70] = '\0'" (subscript_expression "local_60[local_70]" (identifier "local_60") ([ "[") (identifier "local_70") (] "]")) (= "=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) (; ";")) (expression_statement "strcpy(param_1 + 7,local_60);" (call_expression "strcpy(param_1 + 7,local_60)" (identifier "strcpy") (argument_list "(param_1 + 7,local_60)" (( "(") (binary_expression "param_1 + 7" (identifier "param_1") (+ "+") (number_literal "7")) (, ",") (identifier "local_60") () ")"))) (; ";")) (} "}")) (else_clause "else {\n      builtin_strncpy(param_1 + 7,"xxxx",5);\n    }" (else "else") (compound_statement "{\n      builtin_strncpy(param_1 + 7,"xxxx",5);\n    }" ({ "{") (expression_statement "builtin_strncpy(param_1 + 7,"xxxx",5);" (call_expression "builtin_strncpy(param_1 + 7,"xxxx",5)" (identifier "builtin_strncpy") (argument_list "(param_1 + 7,"xxxx",5)" (( "(") (binary_expression "param_1 + 7" (identifier "param_1") (+ "+") (number_literal "7")) (, ",") (string_literal ""xxxx"" (" """) (string_content "xxxx") (" """)) (, ",") (number_literal "5") () ")"))) (; ";")) (} "}")))) (} "}")) (else_clause "else {\n    __sprintf_chk(local_60,1,0x40,"%d",param_2);\n    strcat(param_1,local_60);\n  }" (else "else") (compound_statement "{\n    __sprintf_chk(local_60,1,0x40,"%d",param_2);\n    strcat(param_1,local_60);\n  }" ({ "{") (expression_statement "__sprintf_chk(local_60,1,0x40,"%d",param_2);" (call_expression "__sprintf_chk(local_60,1,0x40,"%d",param_2)" (identifier "__sprintf_chk") (argument_list "(local_60,1,0x40,"%d",param_2)" (( "(") (identifier "local_60") (, ",") (number_literal "1") (, ",") (number_literal "0x40") (, ",") (string_literal ""%d"" (" """) (string_content "%d") (" """)) (, ",") (identifier "param_2") () ")"))) (; ";")) (expression_statement "strcat(param_1,local_60);" (call_expression "strcat(param_1,local_60)" (identifier "strcat") (argument_list "(param_1,local_60)" (( "(") (identifier "param_1") (, ",") (identifier "local_60") () ")"))) (; ";")) (} "}")))) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" (if "if") (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_00012680();" (call_expression "FUN_00012680()" (identifier "FUN_00012680") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

void __regparm3 function_1(char *var_6,char *var_4,int k,type_1 do_numeric)

{
  int var_9;
  int iVar2;
  int var_1;
  int local_70;
  char buff [64];
  
  var_9 = *(int *)(var_1 + 0x14);
  var_2(var_6,"/dev/sg",8);
  if ((char)k == '\0') {
    if ((int)var_4 < 0x4766) {
      if ((int)var_4 < 0x1a) {
        local_70 = 1;
        iVar2 = 0;
      }
      else {
        if (0x2bd < (int)var_4) {
          local_70 = 3;
          iVar2 = 2;
          buff[0] = (char)(var_3(var_4 + -0x2be) * 0x60f25deb >> 0x28) + 'a';
        }
        else {
          local_70 = 2;
          iVar2 = 1;
        }
        buff[0x2bd < (int)var_4] =
             (char)((uint)(var_4 + -0x1a) / 0x1a) +
             (char)(((uint)(var_4 + -0x1a) / 0x1a) / 0x1a) * -0x1a + 'a';
      }
      buff[iVar2] = (char)var_4 + (char)((int)var_4 / 0x1a) * -0x1a + 'a';
      buff[local_70] = '\0';
      var_5(var_6 + 7,buff);
    }
    else {
      var_2(var_6 + 7,"xxxx",5);
    }
  }
  else {
    var_7(buff,1,0x40,"%d",var_4);
    var_8(var_6,buff);
  }
  if (var_9 == *(int *)(var_1 + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  var_10();
}


(translation_unit (function_definition type: (primitive_type) (ERROR (identifier)) 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)) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (string_literal (string_content)) (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (escape_sequence)))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)))) right: (number_literal)) right: (number_literal)))) right: (char_literal (character)))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal)))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (binary_expression left: (number_literal) right: (identifier))) right: (binary_expression left: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))) right: (number_literal))) right: (char_literal (character)))))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (identifier)) right: (binary_expression left: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))) right: (number_literal))) right: (char_literal (character))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (identifier)) right: (char_literal (escape_sequence)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)) (identifier))))) alternative: (else_clause (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)) (string_literal (string_content)) (number_literal)))))))) alternative: (else_clause (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (number_literal) (string_literal (string_content)) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) consequence: (compound_statement (return_statement))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))))))

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

void __regparm3 MASKED(char *param_1,int param_2,char param_3)

{
  uint uVar1;
  int iVar2;
  int in_GS_OFFSET;
  int local_70;
  char local_60 [64];
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x124ad;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  builtin_strncpy(param_1,"/dev/sg",8);
  if (param_3 == '\0') {
    if (param_2 < 0x4766) {
      if (param_2 < 0x1a) {
        local_70 = 1;
        iVar2 = 0;
      }
      else {
        uVar1 = (param_2 - 0x1aU) / 0x1a;
        if (0x2bd < param_2) {
          local_70 = 3;
          iVar2 = 2;
          local_60[0] = (char)((ulonglong)(param_2 - 0x2be) * 0x60f25deb >> 0x28) + 'a';
        }
        else {
          local_70 = 2;
          iVar2 = 1;
        }
        local_60[0x2bd < param_2] = (char)uVar1 + (char)(uVar1 / 0x1a) * -0x1a + 'a';
      }
      local_60[iVar2] = (char)param_2 + (char)(param_2 / 0x1a) * -0x1a + 'a';
      local_60[local_70] = '\0';
      strcpy(param_1 + 7,local_60);
    }
    else {
      builtin_strncpy(param_1 + 7,"xxxx",5);
    }
  }
  else {
    __sprintf_chk(local_60,1,0x40,"%d",param_2);
    strcat(param_1,local_60);
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00012680();
}

