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

char * __regparm3 sysfs_attr(char *dev,char *attr)

{
  int iVar1;
  char *pcVar2;
  ssize_t sVar3;
  ushort **ppuVar4;
  int iVar5;
  char *pcVar6;
  int in_GS_OFFSET;
  char path [4096];
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  pcVar2 = sysfs_attr::buf;
  pcVar6 = pcVar2;
  for (iVar5 = 0x20; iVar5 != 0; iVar5 = iVar5 + -1) {
    pcVar6[0] = '\0';
    pcVar6[1] = '\0';
    pcVar6[2] = '\0';
    pcVar6[3] = '\0';
    pcVar6 = pcVar6 + 4;
  }
  *pcVar6 = '\0';
  snprintf(path,0xfff,"/sys/bus/usb/devices/%s/%s",dev,attr);
  iVar5 = open(path,0);
  if (-1 < iVar5) {
    sVar3 = read(iVar5,sysfs_attr::buf,0x80);
    close(iVar5);
    iVar5 = sVar3 + -1;
    if (0 < iVar5) {
      ppuVar4 = __ctype_b_loc();
      do {
        if ((*(byte *)((int)*ppuVar4 + sysfs_attr::buf[iVar5] * 2 + 1) & 0x20) == 0) break;
        sysfs_attr::buf[iVar5] = '\0';
        iVar5 = iVar5 + -1;
      } while (iVar5 != 0);
      goto LAB_00011534;
    }
    if (iVar5 == 0) goto LAB_00011534;
  }
  pcVar2 = (char *)0x0;
LAB_00011534:
  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail_local();
  }
  return pcVar2;
}



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

undefined4 * __regparm3 FUN_000114d0(undefined4 param_1,undefined4 param_2)

{
  undefined4 *puVar1;
  ssize_t sVar2;
  ushort **ppuVar3;
  int iVar4;
  undefined4 *puVar5;
  int in_GS_OFFSET;
  char local_1020 [4096];
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x114e0;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  puVar1 = (undefined4 *)&DAT_000140a0;
  puVar5 = puVar1;
  for (iVar4 = 0x20; iVar4 != 0; iVar4 = iVar4 + -1) {
    *puVar5 = 0;
    puVar5 = puVar5 + 1;
  }
  *(undefined1 *)puVar5 = 0;
  snprintf(local_1020,0xfff,"/sys/bus/usb/devices/%s/%s",param_1,param_2);
  iVar4 = open(local_1020,0);
  if (-1 < iVar4) {
    sVar2 = read(iVar4,&DAT_000140a0,0x80);
    close(iVar4);
    iVar4 = sVar2 + -1;
    if (0 < iVar4) {
      ppuVar3 = __ctype_b_loc();
      do {
        if ((*(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1) & 0x20) == 0) break;
        (&DAT_000140a0)[iVar4] = 0;
        iVar4 = iVar4 + -1;
      } while (iVar4 != 0);
      goto LAB_00011534;
    }
    if (iVar4 == 0) goto LAB_00011534;
  }
  puVar1 = (undefined4 *)0x0;
LAB_00011534:
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_000119a0();
  }
  return puVar1;
}


PUSH EBP
MOV ECX,0x20
PUSH EDI
PUSH ESI
MOV ESI,EAX
PUSH EBX
CALL 0x00011390
ADD EBX,0x2b20
SUB ESP,0x1028
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x1018],EAX
XOR EAX,EAX
LEA EBP,[EBX + 0xa0]
MOV EDI,EBP
STOSD.REP ES:EDI
LEA EAX,[EBX + 0xffffe008]
MOV byte ptr [EDI],0x0
PUSH EDX
PUSH ESI
PUSH EAX
PUSH 0xfff
LEA ESI,[ESP + 0x28]
PUSH ESI
CALL 0x00011120
ADD ESP,0x18
PUSH 0x0
PUSH ESI
CALL 0x000110c0
ADD ESP,0x10
TEST EAX,EAX
JNS 0x00011550
XOR EAX,EAX
MOV EDI,dword ptr [ESP + 0x100c]
XOR EDI,dword ptr GS:[0x14]
JNZ 0x000115a8
ADD ESP,0x101c
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x4
MOV EDI,EAX
PUSH 0x80
PUSH EBP
PUSH EAX
CALL 0x00011040
MOV dword ptr [ESP],EDI
MOV ESI,EAX
CALL 0x00011150
SUB ESI,0x1
ADD ESP,0x10
TEST ESI,ESI
JLE 0x000115a2
CALL 0x00011180
JMP 0x0001158d
MOV byte ptr [ESI + EBX*0x1 + 0xa0],0x0
SUB ESI,0x1
JZ 0x0001159e
MOVSX ECX,byte ptr [ESI + EBX*0x1 + 0xa0]
MOV EDX,dword ptr [EAX]
TEST byte ptr [EDX + ECX*0x2 + 0x1],0x20
JNZ 0x00011580
MOV EAX,EBP
JMP 0x00011534
JNZ 0x00011532
MOV EAX,EBP
JMP 0x00011534
CALL 0x000119a0
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 * __regparm3 FUN_000114d0(undefined4 param_1,undefined4 param_2)\n\n{\n  undefined4 *puVar1;\n  ssize_t sVar2;\n  ushort **ppuVar3;\n  int iVar4;\n  undefined4 *puVar5;\n  int in_GS_OFFSET;\n  char local_1020 [4096];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x114e0;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar1 = (undefined4 *)&DAT_000140a0;\n  puVar5 = puVar1;\n  for (iVar4 = 0x20; iVar4 != 0; iVar4 = iVar4 + -1) {\n    *puVar5 = 0;\n    puVar5 = puVar5 + 1;\n  }\n  *(undefined1 *)puVar5 = 0;\n  snprintf(local_1020,0xfff,"/sys/bus/usb/devices/%s/%s",param_1,param_2);\n  iVar4 = open(local_1020,0);\n  if (-1 < iVar4) {\n    sVar2 = read(iVar4,&DAT_000140a0,0x80);\n    close(iVar4);\n    iVar4 = sVar2 + -1;\n    if (0 < iVar4) {\n      ppuVar3 = __ctype_b_loc();\n      do {\n        if ((*(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1) & 0x20) == 0) break;\n        (&DAT_000140a0)[iVar4] = 0;\n        iVar4 = iVar4 + -1;\n      } while (iVar4 != 0);\n      goto LAB_00011534;\n    }\n    if (iVar4 == 0) goto LAB_00011534;\n  }\n  puVar1 = (undefined4 *)0x0;\nLAB_00011534:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_000119a0();\n  }\n  return puVar1;\n}\n\n" comment (ERROR "undefined4 * __regparm3 FUN_000114d0(undefined4 param_1,undefined4 param_2)" (binary_expression "undefined4 * __regparm3 FUN_000114d0(undefined4 param_1,undefined4 param_2)" identifier * (ERROR "__regparm3" identifier) (call_expression "FUN_000114d0(undefined4 param_1,undefined4 param_2)" identifier (argument_list "(undefined4 param_1,undefined4 param_2)" ( identifier (ERROR "param_1" identifier) , identifier (ERROR "param_2" identifier) ))))) (compound_statement "{\n  undefined4 *puVar1;\n  ssize_t sVar2;\n  ushort **ppuVar3;\n  int iVar4;\n  undefined4 *puVar5;\n  int in_GS_OFFSET;\n  char local_1020 [4096];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x114e0;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar1 = (undefined4 *)&DAT_000140a0;\n  puVar5 = puVar1;\n  for (iVar4 = 0x20; iVar4 != 0; iVar4 = iVar4 + -1) {\n    *puVar5 = 0;\n    puVar5 = puVar5 + 1;\n  }\n  *(undefined1 *)puVar5 = 0;\n  snprintf(local_1020,0xfff,"/sys/bus/usb/devices/%s/%s",param_1,param_2);\n  iVar4 = open(local_1020,0);\n  if (-1 < iVar4) {\n    sVar2 = read(iVar4,&DAT_000140a0,0x80);\n    close(iVar4);\n    iVar4 = sVar2 + -1;\n    if (0 < iVar4) {\n      ppuVar3 = __ctype_b_loc();\n      do {\n        if ((*(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1) & 0x20) == 0) break;\n        (&DAT_000140a0)[iVar4] = 0;\n        iVar4 = iVar4 + -1;\n      } while (iVar4 != 0);\n      goto LAB_00011534;\n    }\n    if (iVar4 == 0) goto LAB_00011534;\n  }\n  puVar1 = (undefined4 *)0x0;\nLAB_00011534:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_000119a0();\n  }\n  return puVar1;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "ssize_t sVar2;" primitive_type identifier ;) (declaration "ushort **ppuVar3;" type_identifier (pointer_declarator "**ppuVar3" * (pointer_declarator "*ppuVar3" * identifier)) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "undefined4 *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char local_1020 [4096];" primitive_type (array_declarator "local_1020 [4096]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x114e0;" (assignment_expression "uStack_14 = 0x114e0" 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 "puVar1 = (undefined4 *)&DAT_000140a0;" (assignment_expression "puVar1 = (undefined4 *)&DAT_000140a0" identifier = (cast_expression "(undefined4 *)&DAT_000140a0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&DAT_000140a0" & identifier))) ;) (expression_statement "puVar5 = puVar1;" (assignment_expression "puVar5 = puVar1" identifier = identifier) ;) (for_statement "for (iVar4 = 0x20; iVar4 != 0; iVar4 = iVar4 + -1) {\n    *puVar5 = 0;\n    puVar5 = puVar5 + 1;\n  }" for ( (assignment_expression "iVar4 = 0x20" identifier = number_literal) ; (binary_expression "iVar4 != 0" identifier != number_literal) ; (assignment_expression "iVar4 = iVar4 + -1" identifier = (binary_expression "iVar4 + -1" identifier + number_literal)) ) (compound_statement "{\n    *puVar5 = 0;\n    puVar5 = puVar5 + 1;\n  }" { (expression_statement "*puVar5 = 0;" (assignment_expression "*puVar5 = 0" (pointer_expression "*puVar5" * identifier) = number_literal) ;) (expression_statement "puVar5 = puVar5 + 1;" (assignment_expression "puVar5 = puVar5 + 1" identifier = (binary_expression "puVar5 + 1" identifier + number_literal)) ;) })) (expression_statement "*(undefined1 *)puVar5 = 0;" (assignment_expression "*(undefined1 *)puVar5 = 0" (pointer_expression "*(undefined1 *)puVar5" * (cast_expression "(undefined1 *)puVar5" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = number_literal) ;) (expression_statement "snprintf(local_1020,0xfff,"/sys/bus/usb/devices/%s/%s",param_1,param_2);" (call_expression "snprintf(local_1020,0xfff,"/sys/bus/usb/devices/%s/%s",param_1,param_2)" identifier (argument_list "(local_1020,0xfff,"/sys/bus/usb/devices/%s/%s",param_1,param_2)" ( identifier , number_literal , (string_literal ""/sys/bus/usb/devices/%s/%s"" " string_content ") , identifier , identifier ))) ;) (expression_statement "iVar4 = open(local_1020,0);" (assignment_expression "iVar4 = open(local_1020,0)" identifier = (call_expression "open(local_1020,0)" identifier (argument_list "(local_1020,0)" ( identifier , number_literal )))) ;) (if_statement "if (-1 < iVar4) {\n    sVar2 = read(iVar4,&DAT_000140a0,0x80);\n    close(iVar4);\n    iVar4 = sVar2 + -1;\n    if (0 < iVar4) {\n      ppuVar3 = __ctype_b_loc();\n      do {\n        if ((*(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1) & 0x20) == 0) break;\n        (&DAT_000140a0)[iVar4] = 0;\n        iVar4 = iVar4 + -1;\n      } while (iVar4 != 0);\n      goto LAB_00011534;\n    }\n    if (iVar4 == 0) goto LAB_00011534;\n  }" if (parenthesized_expression "(-1 < iVar4)" ( (binary_expression "-1 < iVar4" number_literal < identifier) )) (compound_statement "{\n    sVar2 = read(iVar4,&DAT_000140a0,0x80);\n    close(iVar4);\n    iVar4 = sVar2 + -1;\n    if (0 < iVar4) {\n      ppuVar3 = __ctype_b_loc();\n      do {\n        if ((*(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1) & 0x20) == 0) break;\n        (&DAT_000140a0)[iVar4] = 0;\n        iVar4 = iVar4 + -1;\n      } while (iVar4 != 0);\n      goto LAB_00011534;\n    }\n    if (iVar4 == 0) goto LAB_00011534;\n  }" { (expression_statement "sVar2 = read(iVar4,&DAT_000140a0,0x80);" (assignment_expression "sVar2 = read(iVar4,&DAT_000140a0,0x80)" identifier = (call_expression "read(iVar4,&DAT_000140a0,0x80)" identifier (argument_list "(iVar4,&DAT_000140a0,0x80)" ( identifier , (pointer_expression "&DAT_000140a0" & identifier) , number_literal )))) ;) (expression_statement "close(iVar4);" (call_expression "close(iVar4)" identifier (argument_list "(iVar4)" ( identifier ))) ;) (expression_statement "iVar4 = sVar2 + -1;" (assignment_expression "iVar4 = sVar2 + -1" identifier = (binary_expression "sVar2 + -1" identifier + number_literal)) ;) (if_statement "if (0 < iVar4) {\n      ppuVar3 = __ctype_b_loc();\n      do {\n        if ((*(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1) & 0x20) == 0) break;\n        (&DAT_000140a0)[iVar4] = 0;\n        iVar4 = iVar4 + -1;\n      } while (iVar4 != 0);\n      goto LAB_00011534;\n    }" if (parenthesized_expression "(0 < iVar4)" ( (binary_expression "0 < iVar4" number_literal < identifier) )) (compound_statement "{\n      ppuVar3 = __ctype_b_loc();\n      do {\n        if ((*(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1) & 0x20) == 0) break;\n        (&DAT_000140a0)[iVar4] = 0;\n        iVar4 = iVar4 + -1;\n      } while (iVar4 != 0);\n      goto LAB_00011534;\n    }" { (expression_statement "ppuVar3 = __ctype_b_loc();" (assignment_expression "ppuVar3 = __ctype_b_loc()" identifier = (call_expression "__ctype_b_loc()" identifier (argument_list "()" ( )))) ;) (do_statement "do {\n        if ((*(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1) & 0x20) == 0) break;\n        (&DAT_000140a0)[iVar4] = 0;\n        iVar4 = iVar4 + -1;\n      } while (iVar4 != 0);" do (compound_statement "{\n        if ((*(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1) & 0x20) == 0) break;\n        (&DAT_000140a0)[iVar4] = 0;\n        iVar4 = iVar4 + -1;\n      }" { (if_statement "if ((*(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1) & 0x20) == 0) break;" if (parenthesized_expression "((*(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1) & 0x20) == 0)" ( (binary_expression "(*(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1) & 0x20) == 0" (parenthesized_expression "(*(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1) & 0x20)" ( (binary_expression "*(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1) & 0x20" (pointer_expression "*(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1)" * (cast_expression "(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1)" ( (binary_expression "(int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1" (binary_expression "(int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2" (cast_expression "(int)*ppuVar3" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*ppuVar3" * identifier)) + (binary_expression "(char)(&DAT_000140a0)[iVar4] * 2" (cast_expression "(char)(&DAT_000140a0)[iVar4]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "(&DAT_000140a0)[iVar4]" (parenthesized_expression "(&DAT_000140a0)" ( (pointer_expression "&DAT_000140a0" & identifier) )) [ identifier ])) * number_literal)) + number_literal) )))) & number_literal) )) == number_literal) )) (break_statement "break;" break ;)) (expression_statement "(&DAT_000140a0)[iVar4] = 0;" (assignment_expression "(&DAT_000140a0)[iVar4] = 0" (subscript_expression "(&DAT_000140a0)[iVar4]" (parenthesized_expression "(&DAT_000140a0)" ( (pointer_expression "&DAT_000140a0" & identifier) )) [ identifier ]) = number_literal) ;) (expression_statement "iVar4 = iVar4 + -1;" (assignment_expression "iVar4 = iVar4 + -1" identifier = (binary_expression "iVar4 + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) ;) (goto_statement "goto LAB_00011534;" goto statement_identifier ;) })) (if_statement "if (iVar4 == 0) goto LAB_00011534;" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (goto_statement "goto LAB_00011534;" goto statement_identifier ;)) })) (expression_statement "puVar1 = (undefined4 *)0x0;" (assignment_expression "puVar1 = (undefined4 *)0x0" identifier = (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (labeled_statement "LAB_00011534:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_000119a0();\n  }" statement_identifier : (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_000119a0();\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                    /* WARNING: Subroutine does not return */\n    FUN_000119a0();\n  }" { comment (expression_statement "FUN_000119a0();" (call_expression "FUN_000119a0()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return puVar1;" return identifier ;) }))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nchar * __regparm3 sysfs_attr(char *dev,char *attr)\n\n{\n  int iVar1;\n  char *pcVar2;\n  ssize_t sVar3;\n  ushort **ppuVar4;\n  int iVar5;\n  char *pcVar6;\n  int in_GS_OFFSET;\n  char path [4096];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  pcVar2 = sysfs_attr::buf;\n  pcVar6 = pcVar2;\n  for (iVar5 = 0x20; iVar5 != 0; iVar5 = iVar5 + -1) {\n    pcVar6[0] = '\0';\n    pcVar6[1] = '\0';\n    pcVar6[2] = '\0';\n    pcVar6[3] = '\0';\n    pcVar6 = pcVar6 + 4;\n  }\n  *pcVar6 = '\0';\n  snprintf(path,0xfff,"/sys/bus/usb/devices/%s/%s",dev,attr);\n  iVar5 = open(path,0);\n  if (-1 < iVar5) {\n    sVar3 = read(iVar5,sysfs_attr::buf,0x80);\n    close(iVar5);\n    iVar5 = sVar3 + -1;\n    if (0 < iVar5) {\n      ppuVar4 = __ctype_b_loc();\n      do {\n        if ((*(byte *)((int)*ppuVar4 + sysfs_attr::buf[iVar5] * 2 + 1) & 0x20) == 0) break;\n        sysfs_attr::buf[iVar5] = '\0';\n        iVar5 = iVar5 + -1;\n      } while (iVar5 != 0);\n      goto LAB_00011534;\n    }\n    if (iVar5 == 0) goto LAB_00011534;\n  }\n  pcVar2 = (char *)0x0;\nLAB_00011534:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return pcVar2;\n}\n\n" comment (function_definition "char * __regparm3 sysfs_attr(char *dev,char *attr)\n\n{\n  int iVar1;\n  char *pcVar2;\n  ssize_t sVar3;\n  ushort **ppuVar4;\n  int iVar5;\n  char *pcVar6;\n  int in_GS_OFFSET;\n  char path [4096];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  pcVar2 = sysfs_attr::buf;\n  pcVar6 = pcVar2;\n  for (iVar5 = 0x20; iVar5 != 0; iVar5 = iVar5 + -1) {\n    pcVar6[0] = '\0';\n    pcVar6[1] = '\0';\n    pcVar6[2] = '\0';\n    pcVar6[3] = '\0';\n    pcVar6 = pcVar6 + 4;\n  }\n  *pcVar6 = '\0';\n  snprintf(path,0xfff,"/sys/bus/usb/devices/%s/%s",dev,attr);\n  iVar5 = open(path,0);\n  if (-1 < iVar5) {\n    sVar3 = read(iVar5,sysfs_attr::buf,0x80);\n    close(iVar5);\n    iVar5 = sVar3 + -1;\n    if (0 < iVar5) {\n      ppuVar4 = __ctype_b_loc();\n      do {\n        if ((*(byte *)((int)*ppuVar4 + sysfs_attr::buf[iVar5] * 2 + 1) & 0x20) == 0) break;\n        sysfs_attr::buf[iVar5] = '\0';\n        iVar5 = iVar5 + -1;\n      } while (iVar5 != 0);\n      goto LAB_00011534;\n    }\n    if (iVar5 == 0) goto LAB_00011534;\n  }\n  pcVar2 = (char *)0x0;\nLAB_00011534:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return pcVar2;\n}" primitive_type (pointer_declarator "* __regparm3 sysfs_attr(char *dev,char *attr)" * (ERROR "__regparm3" identifier) (function_declarator "sysfs_attr(char *dev,char *attr)" identifier (parameter_list "(char *dev,char *attr)" ( (parameter_declaration "char *dev" primitive_type (pointer_declarator "*dev" * identifier)) , (parameter_declaration "char *attr" primitive_type (pointer_declarator "*attr" * identifier)) )))) (compound_statement "{\n  int iVar1;\n  char *pcVar2;\n  ssize_t sVar3;\n  ushort **ppuVar4;\n  int iVar5;\n  char *pcVar6;\n  int in_GS_OFFSET;\n  char path [4096];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  pcVar2 = sysfs_attr::buf;\n  pcVar6 = pcVar2;\n  for (iVar5 = 0x20; iVar5 != 0; iVar5 = iVar5 + -1) {\n    pcVar6[0] = '\0';\n    pcVar6[1] = '\0';\n    pcVar6[2] = '\0';\n    pcVar6[3] = '\0';\n    pcVar6 = pcVar6 + 4;\n  }\n  *pcVar6 = '\0';\n  snprintf(path,0xfff,"/sys/bus/usb/devices/%s/%s",dev,attr);\n  iVar5 = open(path,0);\n  if (-1 < iVar5) {\n    sVar3 = read(iVar5,sysfs_attr::buf,0x80);\n    close(iVar5);\n    iVar5 = sVar3 + -1;\n    if (0 < iVar5) {\n      ppuVar4 = __ctype_b_loc();\n      do {\n        if ((*(byte *)((int)*ppuVar4 + sysfs_attr::buf[iVar5] * 2 + 1) & 0x20) == 0) break;\n        sysfs_attr::buf[iVar5] = '\0';\n        iVar5 = iVar5 + -1;\n      } while (iVar5 != 0);\n      goto LAB_00011534;\n    }\n    if (iVar5 == 0) goto LAB_00011534;\n  }\n  pcVar2 = (char *)0x0;\nLAB_00011534:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return pcVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "ssize_t sVar3;" primitive_type identifier ;) (declaration "ushort **ppuVar4;" type_identifier (pointer_declarator "**ppuVar4" * (pointer_declarator "*ppuVar4" * identifier)) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "char *pcVar6;" primitive_type (pointer_declarator "*pcVar6" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char path [4096];" primitive_type (array_declarator "path [4096]" 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 "pcVar2 = sysfs_attr::buf;" (assignment_expression "pcVar2 = sysfs_attr" identifier = identifier) (ERROR "::buf" : : identifier) ;) (expression_statement "pcVar6 = pcVar2;" (assignment_expression "pcVar6 = pcVar2" identifier = identifier) ;) (for_statement "for (iVar5 = 0x20; iVar5 != 0; iVar5 = iVar5 + -1) {\n    pcVar6[0] = '\0';\n    pcVar6[1] = '\0';\n    pcVar6[2] = '\0';\n    pcVar6[3] = '\0';\n    pcVar6 = pcVar6 + 4;\n  }" for ( (assignment_expression "iVar5 = 0x20" identifier = number_literal) ; (binary_expression "iVar5 != 0" identifier != number_literal) ; (assignment_expression "iVar5 = iVar5 + -1" identifier = (binary_expression "iVar5 + -1" identifier + number_literal)) ) (compound_statement "{\n    pcVar6[0] = '\0';\n    pcVar6[1] = '\0';\n    pcVar6[2] = '\0';\n    pcVar6[3] = '\0';\n    pcVar6 = pcVar6 + 4;\n  }" { (expression_statement "pcVar6[0] = '\0';" (assignment_expression "pcVar6[0] = '\0'" (subscript_expression "pcVar6[0]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "pcVar6[1] = '\0';" (assignment_expression "pcVar6[1] = '\0'" (subscript_expression "pcVar6[1]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "pcVar6[2] = '\0';" (assignment_expression "pcVar6[2] = '\0'" (subscript_expression "pcVar6[2]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "pcVar6[3] = '\0';" (assignment_expression "pcVar6[3] = '\0'" (subscript_expression "pcVar6[3]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "pcVar6 = pcVar6 + 4;" (assignment_expression "pcVar6 = pcVar6 + 4" identifier = (binary_expression "pcVar6 + 4" identifier + number_literal)) ;) })) (expression_statement "*pcVar6 = '\0';" (assignment_expression "*pcVar6 = '\0'" (pointer_expression "*pcVar6" * identifier) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "snprintf(path,0xfff,"/sys/bus/usb/devices/%s/%s",dev,attr);" (call_expression "snprintf(path,0xfff,"/sys/bus/usb/devices/%s/%s",dev,attr)" identifier (argument_list "(path,0xfff,"/sys/bus/usb/devices/%s/%s",dev,attr)" ( identifier , number_literal , (string_literal ""/sys/bus/usb/devices/%s/%s"" " string_content ") , identifier , identifier ))) ;) (expression_statement "iVar5 = open(path,0);" (assignment_expression "iVar5 = open(path,0)" identifier = (call_expression "open(path,0)" identifier (argument_list "(path,0)" ( identifier , number_literal )))) ;) (if_statement "if (-1 < iVar5) {\n    sVar3 = read(iVar5,sysfs_attr::buf,0x80);\n    close(iVar5);\n    iVar5 = sVar3 + -1;\n    if (0 < iVar5) {\n      ppuVar4 = __ctype_b_loc();\n      do {\n        if ((*(byte *)((int)*ppuVar4 + sysfs_attr::buf[iVar5] * 2 + 1) & 0x20) == 0) break;\n        sysfs_attr::buf[iVar5] = '\0';\n        iVar5 = iVar5 + -1;\n      } while (iVar5 != 0);\n      goto LAB_00011534;\n    }\n    if (iVar5 == 0) goto LAB_00011534;\n  }" if (parenthesized_expression "(-1 < iVar5)" ( (binary_expression "-1 < iVar5" number_literal < identifier) )) (compound_statement "{\n    sVar3 = read(iVar5,sysfs_attr::buf,0x80);\n    close(iVar5);\n    iVar5 = sVar3 + -1;\n    if (0 < iVar5) {\n      ppuVar4 = __ctype_b_loc();\n      do {\n        if ((*(byte *)((int)*ppuVar4 + sysfs_attr::buf[iVar5] * 2 + 1) & 0x20) == 0) break;\n        sysfs_attr::buf[iVar5] = '\0';\n        iVar5 = iVar5 + -1;\n      } while (iVar5 != 0);\n      goto LAB_00011534;\n    }\n    if (iVar5 == 0) goto LAB_00011534;\n  }" { (expression_statement "sVar3 = read(iVar5,sysfs_attr::buf,0x80);" (assignment_expression "sVar3 = read(iVar5,sysfs_attr::buf,0x80)" identifier = (call_expression "read(iVar5,sysfs_attr::buf,0x80)" identifier (argument_list "(iVar5,sysfs_attr::buf,0x80)" ( identifier , identifier (ERROR "::buf" : : identifier) , number_literal )))) ;) (expression_statement "close(iVar5);" (call_expression "close(iVar5)" identifier (argument_list "(iVar5)" ( identifier ))) ;) (expression_statement "iVar5 = sVar3 + -1;" (assignment_expression "iVar5 = sVar3 + -1" identifier = (binary_expression "sVar3 + -1" identifier + number_literal)) ;) (if_statement "if (0 < iVar5) {\n      ppuVar4 = __ctype_b_loc();\n      do {\n        if ((*(byte *)((int)*ppuVar4 + sysfs_attr::buf[iVar5] * 2 + 1) & 0x20) == 0) break;\n        sysfs_attr::buf[iVar5] = '\0';\n        iVar5 = iVar5 + -1;\n      } while (iVar5 != 0);\n      goto LAB_00011534;\n    }" if (parenthesized_expression "(0 < iVar5)" ( (binary_expression "0 < iVar5" number_literal < identifier) )) (compound_statement "{\n      ppuVar4 = __ctype_b_loc();\n      do {\n        if ((*(byte *)((int)*ppuVar4 + sysfs_attr::buf[iVar5] * 2 + 1) & 0x20) == 0) break;\n        sysfs_attr::buf[iVar5] = '\0';\n        iVar5 = iVar5 + -1;\n      } while (iVar5 != 0);\n      goto LAB_00011534;\n    }" { (expression_statement "ppuVar4 = __ctype_b_loc();" (assignment_expression "ppuVar4 = __ctype_b_loc()" identifier = (call_expression "__ctype_b_loc()" identifier (argument_list "()" ( )))) ;) (do_statement "do {\n        if ((*(byte *)((int)*ppuVar4 + sysfs_attr::buf[iVar5] * 2 + 1) & 0x20) == 0) break;\n        sysfs_attr::buf[iVar5] = '\0';\n        iVar5 = iVar5 + -1;\n      } while (iVar5 != 0);" do (compound_statement "{\n        if ((*(byte *)((int)*ppuVar4 + sysfs_attr::buf[iVar5] * 2 + 1) & 0x20) == 0) break;\n        sysfs_attr::buf[iVar5] = '\0';\n        iVar5 = iVar5 + -1;\n      }" { (if_statement "if ((*(byte *)((int)*ppuVar4 + sysfs_attr::buf[iVar5] * 2 + 1) & 0x20) == 0) break;" if (parenthesized_expression "((*(byte *)((int)*ppuVar4 + sysfs_attr::buf[iVar5] * 2 + 1) & 0x20) == 0)" ( (binary_expression "(*(byte *)((int)*ppuVar4 + sysfs_attr::buf[iVar5] * 2 + 1) & 0x20) == 0" (parenthesized_expression "(*(byte *)((int)*ppuVar4 + sysfs_attr::buf[iVar5] * 2 + 1) & 0x20)" ( (binary_expression "*(byte *)((int)*ppuVar4 + sysfs_attr::buf[iVar5] * 2 + 1) & 0x20" (pointer_expression "*(byte *)((int)*ppuVar4 + sysfs_attr::buf[iVar5] * 2 + 1)" * (cast_expression "(byte *)((int)*ppuVar4 + sysfs_attr::buf[iVar5] * 2 + 1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)*ppuVar4 + sysfs_attr::buf[iVar5] * 2 + 1)" ( (binary_expression "(int)*ppuVar4 + sysfs_attr::buf[iVar5] * 2 + 1" (binary_expression "(int)*ppuVar4 + sysfs_attr::buf[iVar5] * 2" (subscript_expression "(int)*ppuVar4 + sysfs_attr::buf[iVar5]" (binary_expression "(int)*ppuVar4 + sysfs_attr" (cast_expression "(int)*ppuVar4" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*ppuVar4" * identifier)) + identifier) (ERROR "::buf" : : identifier) [ identifier ]) * number_literal) + number_literal) )))) & number_literal) )) == number_literal) )) (break_statement "break;" break ;)) (labeled_statement "sysfs_attr::buf[iVar5] = '\0';" statement_identifier : (ERROR ":" :) (expression_statement "buf[iVar5] = '\0';" (assignment_expression "buf[iVar5] = '\0'" (subscript_expression "buf[iVar5]" identifier [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;)) (expression_statement "iVar5 = iVar5 + -1;" (assignment_expression "iVar5 = iVar5 + -1" identifier = (binary_expression "iVar5 + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar5 != 0)" ( (binary_expression "iVar5 != 0" identifier != number_literal) )) ;) (goto_statement "goto LAB_00011534;" goto statement_identifier ;) })) (if_statement "if (iVar5 == 0) goto LAB_00011534;" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (goto_statement "goto LAB_00011534;" goto statement_identifier ;)) })) (expression_statement "pcVar2 = (char *)0x0;" (assignment_expression "pcVar2 = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (labeled_statement "LAB_00011534:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" statement_identifier : (if_statement "if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\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                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" { comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return pcVar2;" return identifier ;) })))
(translation_unit "undefined4 * __regparm3 FUN_000114d0(undefined4 param_1,undefined4 param_2)\n\n{\n  undefined4 *puVar1;\n  ssize_t sVar2;\n  ushort **ppuVar3;\n  int iVar4;\n  undefined4 *puVar5;\n  int in_GS_OFFSET;\n  char local_1020 [4096];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x114e0;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar1 = (undefined4 *)&DAT_000140a0;\n  puVar5 = puVar1;\n  for (iVar4 = 0x20; iVar4 != 0; iVar4 = iVar4 + -1) {\n    *puVar5 = 0;\n    puVar5 = puVar5 + 1;\n  }\n  *(undefined1 *)puVar5 = 0;\n  snprintf(local_1020,0xfff,"/sys/bus/usb/devices/%s/%s",param_1,param_2);\n  iVar4 = open(local_1020,0);\n  if (-1 < iVar4) {\n    sVar2 = read(iVar4,&DAT_000140a0,0x80);\n    close(iVar4);\n    iVar4 = sVar2 + -1;\n    if (0 < iVar4) {\n      ppuVar3 = __ctype_b_loc();\n      do {\n        if ((*(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1) & 0x20) == 0) break;\n        (&DAT_000140a0)[iVar4] = 0;\n        iVar4 = iVar4 + -1;\n      } while (iVar4 != 0);\n      goto LAB_00011534;\n    }\n    if (iVar4 == 0) goto LAB_00011534;\n  }\n  puVar1 = (undefined4 *)0x0;\nLAB_00011534:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000119a0();\n  }\n  return puVar1;\n}\n\n" (ERROR "undefined4 * __regparm3 FUN_000114d0(undefined4 param_1,undefined4 param_2)" (binary_expression "undefined4 * __regparm3 FUN_000114d0(undefined4 param_1,undefined4 param_2)" identifier * (ERROR "__regparm3" identifier) (call_expression "FUN_000114d0(undefined4 param_1,undefined4 param_2)" identifier (argument_list "(undefined4 param_1,undefined4 param_2)" ( identifier (ERROR "param_1" identifier) , identifier (ERROR "param_2" identifier) ))))) (compound_statement "{\n  undefined4 *puVar1;\n  ssize_t sVar2;\n  ushort **ppuVar3;\n  int iVar4;\n  undefined4 *puVar5;\n  int in_GS_OFFSET;\n  char local_1020 [4096];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x114e0;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar1 = (undefined4 *)&DAT_000140a0;\n  puVar5 = puVar1;\n  for (iVar4 = 0x20; iVar4 != 0; iVar4 = iVar4 + -1) {\n    *puVar5 = 0;\n    puVar5 = puVar5 + 1;\n  }\n  *(undefined1 *)puVar5 = 0;\n  snprintf(local_1020,0xfff,"/sys/bus/usb/devices/%s/%s",param_1,param_2);\n  iVar4 = open(local_1020,0);\n  if (-1 < iVar4) {\n    sVar2 = read(iVar4,&DAT_000140a0,0x80);\n    close(iVar4);\n    iVar4 = sVar2 + -1;\n    if (0 < iVar4) {\n      ppuVar3 = __ctype_b_loc();\n      do {\n        if ((*(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1) & 0x20) == 0) break;\n        (&DAT_000140a0)[iVar4] = 0;\n        iVar4 = iVar4 + -1;\n      } while (iVar4 != 0);\n      goto LAB_00011534;\n    }\n    if (iVar4 == 0) goto LAB_00011534;\n  }\n  puVar1 = (undefined4 *)0x0;\nLAB_00011534:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000119a0();\n  }\n  return puVar1;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "ssize_t sVar2;" primitive_type identifier ;) (declaration "ushort **ppuVar3;" type_identifier (pointer_declarator "**ppuVar3" * (pointer_declarator "*ppuVar3" * identifier)) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "undefined4 *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char local_1020 [4096];" primitive_type (array_declarator "local_1020 [4096]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x114e0;" (assignment_expression "uStack_14 = 0x114e0" 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 "puVar1 = (undefined4 *)&DAT_000140a0;" (assignment_expression "puVar1 = (undefined4 *)&DAT_000140a0" identifier = (cast_expression "(undefined4 *)&DAT_000140a0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&DAT_000140a0" & identifier))) ;) (expression_statement "puVar5 = puVar1;" (assignment_expression "puVar5 = puVar1" identifier = identifier) ;) (for_statement "for (iVar4 = 0x20; iVar4 != 0; iVar4 = iVar4 + -1) {\n    *puVar5 = 0;\n    puVar5 = puVar5 + 1;\n  }" for ( (assignment_expression "iVar4 = 0x20" identifier = number_literal) ; (binary_expression "iVar4 != 0" identifier != number_literal) ; (assignment_expression "iVar4 = iVar4 + -1" identifier = (binary_expression "iVar4 + -1" identifier + number_literal)) ) (compound_statement "{\n    *puVar5 = 0;\n    puVar5 = puVar5 + 1;\n  }" { (expression_statement "*puVar5 = 0;" (assignment_expression "*puVar5 = 0" (pointer_expression "*puVar5" * identifier) = number_literal) ;) (expression_statement "puVar5 = puVar5 + 1;" (assignment_expression "puVar5 = puVar5 + 1" identifier = (binary_expression "puVar5 + 1" identifier + number_literal)) ;) })) (expression_statement "*(undefined1 *)puVar5 = 0;" (assignment_expression "*(undefined1 *)puVar5 = 0" (pointer_expression "*(undefined1 *)puVar5" * (cast_expression "(undefined1 *)puVar5" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = number_literal) ;) (expression_statement "snprintf(local_1020,0xfff,"/sys/bus/usb/devices/%s/%s",param_1,param_2);" (call_expression "snprintf(local_1020,0xfff,"/sys/bus/usb/devices/%s/%s",param_1,param_2)" identifier (argument_list "(local_1020,0xfff,"/sys/bus/usb/devices/%s/%s",param_1,param_2)" ( identifier , number_literal , (string_literal ""/sys/bus/usb/devices/%s/%s"" " string_content ") , identifier , identifier ))) ;) (expression_statement "iVar4 = open(local_1020,0);" (assignment_expression "iVar4 = open(local_1020,0)" identifier = (call_expression "open(local_1020,0)" identifier (argument_list "(local_1020,0)" ( identifier , number_literal )))) ;) (if_statement "if (-1 < iVar4) {\n    sVar2 = read(iVar4,&DAT_000140a0,0x80);\n    close(iVar4);\n    iVar4 = sVar2 + -1;\n    if (0 < iVar4) {\n      ppuVar3 = __ctype_b_loc();\n      do {\n        if ((*(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1) & 0x20) == 0) break;\n        (&DAT_000140a0)[iVar4] = 0;\n        iVar4 = iVar4 + -1;\n      } while (iVar4 != 0);\n      goto LAB_00011534;\n    }\n    if (iVar4 == 0) goto LAB_00011534;\n  }" if (parenthesized_expression "(-1 < iVar4)" ( (binary_expression "-1 < iVar4" number_literal < identifier) )) (compound_statement "{\n    sVar2 = read(iVar4,&DAT_000140a0,0x80);\n    close(iVar4);\n    iVar4 = sVar2 + -1;\n    if (0 < iVar4) {\n      ppuVar3 = __ctype_b_loc();\n      do {\n        if ((*(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1) & 0x20) == 0) break;\n        (&DAT_000140a0)[iVar4] = 0;\n        iVar4 = iVar4 + -1;\n      } while (iVar4 != 0);\n      goto LAB_00011534;\n    }\n    if (iVar4 == 0) goto LAB_00011534;\n  }" { (expression_statement "sVar2 = read(iVar4,&DAT_000140a0,0x80);" (assignment_expression "sVar2 = read(iVar4,&DAT_000140a0,0x80)" identifier = (call_expression "read(iVar4,&DAT_000140a0,0x80)" identifier (argument_list "(iVar4,&DAT_000140a0,0x80)" ( identifier , (pointer_expression "&DAT_000140a0" & identifier) , number_literal )))) ;) (expression_statement "close(iVar4);" (call_expression "close(iVar4)" identifier (argument_list "(iVar4)" ( identifier ))) ;) (expression_statement "iVar4 = sVar2 + -1;" (assignment_expression "iVar4 = sVar2 + -1" identifier = (binary_expression "sVar2 + -1" identifier + number_literal)) ;) (if_statement "if (0 < iVar4) {\n      ppuVar3 = __ctype_b_loc();\n      do {\n        if ((*(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1) & 0x20) == 0) break;\n        (&DAT_000140a0)[iVar4] = 0;\n        iVar4 = iVar4 + -1;\n      } while (iVar4 != 0);\n      goto LAB_00011534;\n    }" if (parenthesized_expression "(0 < iVar4)" ( (binary_expression "0 < iVar4" number_literal < identifier) )) (compound_statement "{\n      ppuVar3 = __ctype_b_loc();\n      do {\n        if ((*(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1) & 0x20) == 0) break;\n        (&DAT_000140a0)[iVar4] = 0;\n        iVar4 = iVar4 + -1;\n      } while (iVar4 != 0);\n      goto LAB_00011534;\n    }" { (expression_statement "ppuVar3 = __ctype_b_loc();" (assignment_expression "ppuVar3 = __ctype_b_loc()" identifier = (call_expression "__ctype_b_loc()" identifier (argument_list "()" ( )))) ;) (do_statement "do {\n        if ((*(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1) & 0x20) == 0) break;\n        (&DAT_000140a0)[iVar4] = 0;\n        iVar4 = iVar4 + -1;\n      } while (iVar4 != 0);" do (compound_statement "{\n        if ((*(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1) & 0x20) == 0) break;\n        (&DAT_000140a0)[iVar4] = 0;\n        iVar4 = iVar4 + -1;\n      }" { (if_statement "if ((*(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1) & 0x20) == 0) break;" if (parenthesized_expression "((*(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1) & 0x20) == 0)" ( (binary_expression "(*(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1) & 0x20) == 0" (parenthesized_expression "(*(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1) & 0x20)" ( (binary_expression "*(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1) & 0x20" (pointer_expression "*(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1)" * (cast_expression "(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1)" ( (binary_expression "(int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1" (binary_expression "(int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2" (cast_expression "(int)*ppuVar3" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*ppuVar3" * identifier)) + (binary_expression "(char)(&DAT_000140a0)[iVar4] * 2" (cast_expression "(char)(&DAT_000140a0)[iVar4]" ( (type_descriptor "char" primitive_type) ) (subscript_expression "(&DAT_000140a0)[iVar4]" (parenthesized_expression "(&DAT_000140a0)" ( (pointer_expression "&DAT_000140a0" & identifier) )) [ identifier ])) * number_literal)) + number_literal) )))) & number_literal) )) == number_literal) )) (break_statement "break;" break ;)) (expression_statement "(&DAT_000140a0)[iVar4] = 0;" (assignment_expression "(&DAT_000140a0)[iVar4] = 0" (subscript_expression "(&DAT_000140a0)[iVar4]" (parenthesized_expression "(&DAT_000140a0)" ( (pointer_expression "&DAT_000140a0" & identifier) )) [ identifier ]) = number_literal) ;) (expression_statement "iVar4 = iVar4 + -1;" (assignment_expression "iVar4 = iVar4 + -1" identifier = (binary_expression "iVar4 + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) ;) (goto_statement "goto LAB_00011534;" goto statement_identifier ;) })) (if_statement "if (iVar4 == 0) goto LAB_00011534;" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (goto_statement "goto LAB_00011534;" goto statement_identifier ;)) })) (expression_statement "puVar1 = (undefined4 *)0x0;" (assignment_expression "puVar1 = (undefined4 *)0x0" identifier = (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (labeled_statement "LAB_00011534:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000119a0();\n  }" statement_identifier : (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000119a0();\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                    \n    FUN_000119a0();\n  }" { (expression_statement "FUN_000119a0();" (call_expression "FUN_000119a0()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return puVar1;" return identifier ;) }))
(translation_unit (ERROR (binary_expression IDENT * (ERROR IDENT) (call_expression IDENT (argument_list ( IDENT (ERROR IDENT) , IDENT (ERROR IDENT) ))))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * (pointer_declarator * IDENT)) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * 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 (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression & IDENT))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (for_statement for ( (assignment_expression IDENT = LIT) ; (binary_expression IDENT != LIT) ; (assignment_expression IDENT = (binary_expression IDENT + LIT)) ) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , (string_literal " string_content ") , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (pointer_expression & IDENT) , LIT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) (pointer_expression * IDENT)) + (binary_expression (cast_expression ( (type_descriptor TYPE) ) (subscript_expression (parenthesized_expression ( (pointer_expression & IDENT) )) [ IDENT ])) * LIT)) + LIT) )))) & LIT) )) == LIT) )) (break_statement break ;)) (expression_statement (assignment_expression (subscript_expression (parenthesized_expression ( (pointer_expression & IDENT) )) [ IDENT ]) = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) (goto_statement goto statement_identifier ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (labeled_statement statement_identifier : (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 { (expression_statement (call_expression IDENT (argument_list ( ))) ;) }))) (return_statement return IDENT ;) }))
(ERROR "undefined4 * __regparm3 FUN_000114d0(undefined4 param_1,undefined4 param_2)" (binary_expression "undefined4 * __regparm3 FUN_000114d0(undefined4 param_1,undefined4 param_2)" (identifier "undefined4") (* "*") (ERROR "__regparm3" (identifier "__regparm3")) (call_expression "FUN_000114d0(undefined4 param_1,undefined4 param_2)" (identifier "FUN_000114d0") (argument_list "(undefined4 param_1,undefined4 param_2)" (( "(") (identifier "undefined4") (ERROR "param_1" (identifier "param_1")) (, ",") (identifier "undefined4") (ERROR "param_2" (identifier "param_2")) () ")"))))) (compound_statement "{\n  undefined4 *puVar1;\n  ssize_t sVar2;\n  ushort **ppuVar3;\n  int iVar4;\n  undefined4 *puVar5;\n  int in_GS_OFFSET;\n  char local_1020 [4096];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x114e0;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar1 = (undefined4 *)&DAT_000140a0;\n  puVar5 = puVar1;\n  for (iVar4 = 0x20; iVar4 != 0; iVar4 = iVar4 + -1) {\n    *puVar5 = 0;\n    puVar5 = puVar5 + 1;\n  }\n  *(undefined1 *)puVar5 = 0;\n  snprintf(local_1020,0xfff,"/sys/bus/usb/devices/%s/%s",param_1,param_2);\n  iVar4 = open(local_1020,0);\n  if (-1 < iVar4) {\n    sVar2 = read(iVar4,&DAT_000140a0,0x80);\n    close(iVar4);\n    iVar4 = sVar2 + -1;\n    if (0 < iVar4) {\n      ppuVar3 = __ctype_b_loc();\n      do {\n        if ((*(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1) & 0x20) == 0) break;\n        (&DAT_000140a0)[iVar4] = 0;\n        iVar4 = iVar4 + -1;\n      } while (iVar4 != 0);\n      goto LAB_00011534;\n    }\n    if (iVar4 == 0) goto LAB_00011534;\n  }\n  puVar1 = (undefined4 *)0x0;\nLAB_00011534:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000119a0();\n  }\n  return puVar1;\n}" ({ "{") (declaration "undefined4 *puVar1;" (type_identifier "undefined4") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "ssize_t sVar2;" (primitive_type "ssize_t") (identifier "sVar2") (; ";")) (declaration "ushort **ppuVar3;" (type_identifier "ushort") (pointer_declarator "**ppuVar3" (* "*") (pointer_declarator "*ppuVar3" (* "*") (identifier "ppuVar3"))) (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "undefined4 *puVar5;" (type_identifier "undefined4") (pointer_declarator "*puVar5" (* "*") (identifier "puVar5")) (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "char local_1020 [4096];" (primitive_type "char") (array_declarator "local_1020 [4096]" (identifier "local_1020") ([ "[") (number_literal "4096") (] "]")) (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x114e0;" (assignment_expression "uStack_14 = 0x114e0" (identifier "uStack_14") (= "=") (number_literal "0x114e0")) (; ";")) (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 "puVar1 = (undefined4 *)&DAT_000140a0;" (assignment_expression "puVar1 = (undefined4 *)&DAT_000140a0" (identifier "puVar1") (= "=") (cast_expression "(undefined4 *)&DAT_000140a0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "&DAT_000140a0" (& "&") (identifier "DAT_000140a0")))) (; ";")) (expression_statement "puVar5 = puVar1;" (assignment_expression "puVar5 = puVar1" (identifier "puVar5") (= "=") (identifier "puVar1")) (; ";")) (for_statement "for (iVar4 = 0x20; iVar4 != 0; iVar4 = iVar4 + -1) {\n    *puVar5 = 0;\n    puVar5 = puVar5 + 1;\n  }" (for "for") (( "(") (assignment_expression "iVar4 = 0x20" (identifier "iVar4") (= "=") (number_literal "0x20")) (; ";") (binary_expression "iVar4 != 0" (identifier "iVar4") (!= "!=") (number_literal "0")) (; ";") (assignment_expression "iVar4 = iVar4 + -1" (identifier "iVar4") (= "=") (binary_expression "iVar4 + -1" (identifier "iVar4") (+ "+") (number_literal "-1"))) () ")") (compound_statement "{\n    *puVar5 = 0;\n    puVar5 = puVar5 + 1;\n  }" ({ "{") (expression_statement "*puVar5 = 0;" (assignment_expression "*puVar5 = 0" (pointer_expression "*puVar5" (* "*") (identifier "puVar5")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar5 = puVar5 + 1;" (assignment_expression "puVar5 = puVar5 + 1" (identifier "puVar5") (= "=") (binary_expression "puVar5 + 1" (identifier "puVar5") (+ "+") (number_literal "1"))) (; ";")) (} "}"))) (expression_statement "*(undefined1 *)puVar5 = 0;" (assignment_expression "*(undefined1 *)puVar5 = 0" (pointer_expression "*(undefined1 *)puVar5" (* "*") (cast_expression "(undefined1 *)puVar5" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar5"))) (= "=") (number_literal "0")) (; ";")) (expression_statement "snprintf(local_1020,0xfff,"/sys/bus/usb/devices/%s/%s",param_1,param_2);" (call_expression "snprintf(local_1020,0xfff,"/sys/bus/usb/devices/%s/%s",param_1,param_2)" (identifier "snprintf") (argument_list "(local_1020,0xfff,"/sys/bus/usb/devices/%s/%s",param_1,param_2)" (( "(") (identifier "local_1020") (, ",") (number_literal "0xfff") (, ",") (string_literal ""/sys/bus/usb/devices/%s/%s"" (" """) (string_content "/sys/bus/usb/devices/%s/%s") (" """)) (, ",") (identifier "param_1") (, ",") (identifier "param_2") () ")"))) (; ";")) (expression_statement "iVar4 = open(local_1020,0);" (assignment_expression "iVar4 = open(local_1020,0)" (identifier "iVar4") (= "=") (call_expression "open(local_1020,0)" (identifier "open") (argument_list "(local_1020,0)" (( "(") (identifier "local_1020") (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if (-1 < iVar4) {\n    sVar2 = read(iVar4,&DAT_000140a0,0x80);\n    close(iVar4);\n    iVar4 = sVar2 + -1;\n    if (0 < iVar4) {\n      ppuVar3 = __ctype_b_loc();\n      do {\n        if ((*(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1) & 0x20) == 0) break;\n        (&DAT_000140a0)[iVar4] = 0;\n        iVar4 = iVar4 + -1;\n      } while (iVar4 != 0);\n      goto LAB_00011534;\n    }\n    if (iVar4 == 0) goto LAB_00011534;\n  }" (if "if") (parenthesized_expression "(-1 < iVar4)" (( "(") (binary_expression "-1 < iVar4" (number_literal "-1") (< "<") (identifier "iVar4")) () ")")) (compound_statement "{\n    sVar2 = read(iVar4,&DAT_000140a0,0x80);\n    close(iVar4);\n    iVar4 = sVar2 + -1;\n    if (0 < iVar4) {\n      ppuVar3 = __ctype_b_loc();\n      do {\n        if ((*(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1) & 0x20) == 0) break;\n        (&DAT_000140a0)[iVar4] = 0;\n        iVar4 = iVar4 + -1;\n      } while (iVar4 != 0);\n      goto LAB_00011534;\n    }\n    if (iVar4 == 0) goto LAB_00011534;\n  }" ({ "{") (expression_statement "sVar2 = read(iVar4,&DAT_000140a0,0x80);" (assignment_expression "sVar2 = read(iVar4,&DAT_000140a0,0x80)" (identifier "sVar2") (= "=") (call_expression "read(iVar4,&DAT_000140a0,0x80)" (identifier "read") (argument_list "(iVar4,&DAT_000140a0,0x80)" (( "(") (identifier "iVar4") (, ",") (pointer_expression "&DAT_000140a0" (& "&") (identifier "DAT_000140a0")) (, ",") (number_literal "0x80") () ")")))) (; ";")) (expression_statement "close(iVar4);" (call_expression "close(iVar4)" (identifier "close") (argument_list "(iVar4)" (( "(") (identifier "iVar4") () ")"))) (; ";")) (expression_statement "iVar4 = sVar2 + -1;" (assignment_expression "iVar4 = sVar2 + -1" (identifier "iVar4") (= "=") (binary_expression "sVar2 + -1" (identifier "sVar2") (+ "+") (number_literal "-1"))) (; ";")) (if_statement "if (0 < iVar4) {\n      ppuVar3 = __ctype_b_loc();\n      do {\n        if ((*(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1) & 0x20) == 0) break;\n        (&DAT_000140a0)[iVar4] = 0;\n        iVar4 = iVar4 + -1;\n      } while (iVar4 != 0);\n      goto LAB_00011534;\n    }" (if "if") (parenthesized_expression "(0 < iVar4)" (( "(") (binary_expression "0 < iVar4" (number_literal "0") (< "<") (identifier "iVar4")) () ")")) (compound_statement "{\n      ppuVar3 = __ctype_b_loc();\n      do {\n        if ((*(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1) & 0x20) == 0) break;\n        (&DAT_000140a0)[iVar4] = 0;\n        iVar4 = iVar4 + -1;\n      } while (iVar4 != 0);\n      goto LAB_00011534;\n    }" ({ "{") (expression_statement "ppuVar3 = __ctype_b_loc();" (assignment_expression "ppuVar3 = __ctype_b_loc()" (identifier "ppuVar3") (= "=") (call_expression "__ctype_b_loc()" (identifier "__ctype_b_loc") (argument_list "()" (( "(") () ")")))) (; ";")) (do_statement "do {\n        if ((*(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1) & 0x20) == 0) break;\n        (&DAT_000140a0)[iVar4] = 0;\n        iVar4 = iVar4 + -1;\n      } while (iVar4 != 0);" (do "do") (compound_statement "{\n        if ((*(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1) & 0x20) == 0) break;\n        (&DAT_000140a0)[iVar4] = 0;\n        iVar4 = iVar4 + -1;\n      }" ({ "{") (if_statement "if ((*(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1) & 0x20) == 0) break;" (if "if") (parenthesized_expression "((*(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1) & 0x20) == 0)" (( "(") (binary_expression "(*(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1) & 0x20) == 0" (parenthesized_expression "(*(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1) & 0x20)" (( "(") (binary_expression "*(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1) & 0x20" (pointer_expression "*(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1)" (* "*") (cast_expression "(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1)" (( "(") (binary_expression "(int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1" (binary_expression "(int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2" (cast_expression "(int)*ppuVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (pointer_expression "*ppuVar3" (* "*") (identifier "ppuVar3"))) (+ "+") (binary_expression "(char)(&DAT_000140a0)[iVar4] * 2" (cast_expression "(char)(&DAT_000140a0)[iVar4]" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (subscript_expression "(&DAT_000140a0)[iVar4]" (parenthesized_expression "(&DAT_000140a0)" (( "(") (pointer_expression "&DAT_000140a0" (& "&") (identifier "DAT_000140a0")) () ")")) ([ "[") (identifier "iVar4") (] "]"))) (* "*") (number_literal "2"))) (+ "+") (number_literal "1")) () ")")))) (& "&") (number_literal "0x20")) () ")")) (== "==") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "(&DAT_000140a0)[iVar4] = 0;" (assignment_expression "(&DAT_000140a0)[iVar4] = 0" (subscript_expression "(&DAT_000140a0)[iVar4]" (parenthesized_expression "(&DAT_000140a0)" (( "(") (pointer_expression "&DAT_000140a0" (& "&") (identifier "DAT_000140a0")) () ")")) ([ "[") (identifier "iVar4") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar4 = iVar4 + -1;" (assignment_expression "iVar4 = iVar4 + -1" (identifier "iVar4") (= "=") (binary_expression "iVar4 + -1" (identifier "iVar4") (+ "+") (number_literal "-1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar4 != 0)" (( "(") (binary_expression "iVar4 != 0" (identifier "iVar4") (!= "!=") (number_literal "0")) () ")")) (; ";")) (goto_statement "goto LAB_00011534;" (goto "goto") (statement_identifier "LAB_00011534") (; ";")) (} "}"))) (if_statement "if (iVar4 == 0) goto LAB_00011534;" (if "if") (parenthesized_expression "(iVar4 == 0)" (( "(") (binary_expression "iVar4 == 0" (identifier "iVar4") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_00011534;" (goto "goto") (statement_identifier "LAB_00011534") (; ";"))) (} "}"))) (expression_statement "puVar1 = (undefined4 *)0x0;" (assignment_expression "puVar1 = (undefined4 *)0x0" (identifier "puVar1") (= "=") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (labeled_statement "LAB_00011534:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000119a0();\n  }" (statement_identifier "LAB_00011534") (: ":") (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_000119a0();\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                    \n    FUN_000119a0();\n  }" ({ "{") (expression_statement "FUN_000119a0();" (call_expression "FUN_000119a0()" (identifier "FUN_000119a0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))) (return_statement "return puVar1;" (return "return") (identifier "puVar1") (; ";")) (} "}"))

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

char * __regparm3 function_1(char *dev,char *attr)

{
  int var_10;
  char *pcVar2;
  ssize_t var_8;
  type_1 **ppuVar4;
  int var_2;
  char *var_3;
  int var_1;
  char path [4096];
  
  var_10 = *(int *)(var_1 + 0x14);
  pcVar2 = function_1::buf;
  var_3 = pcVar2;
  for (var_2 = 0x20; var_2 != 0; var_2 = var_2 + -1) {
    var_3[0] = '\0';
    var_3[1] = '\0';
    var_3[2] = '\0';
    var_3[3] = '\0';
    var_3 = var_3 + 4;
  }
  *var_3 = '\0';
  var_4(path,0xfff,"/sys/bus/usb/devices/%s/%s",dev,attr);
  var_2 = var_5(path,0);
  if (-1 < var_2) {
    var_8 = var_6(var_2,function_1::buf,0x80);
    var_7(var_2);
    var_2 = var_8 + -1;
    if (0 < var_2) {
      ppuVar4 = var_9();
      do {
        if ((*(type_2 *)((int)*ppuVar4 + function_1::buf[var_2] * 2 + 1) & 0x20) == 0) break;
        sysfs_attr::buf[var_2] = '\0';
        var_2 = var_2 + -1;
      } while (var_2 != 0);
      goto LAB_00011534;
    }
    if (var_2 == 0) goto LAB_00011534;
  }
  pcVar2 = (char *)0x0;
LAB_00011534:
  if (var_10 != *(int *)(var_1 + 0x14)) {
                    /* WARNING: Subroutine does not return */
    var_11();
  }
  return pcVar2;
}


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

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

undefined4 * __regparm3 MASKED(undefined4 param_1,undefined4 param_2)

{
  undefined4 *puVar1;
  ssize_t sVar2;
  ushort **ppuVar3;
  int iVar4;
  undefined4 *puVar5;
  int in_GS_OFFSET;
  char local_1020 [4096];
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x114e0;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  puVar1 = (undefined4 *)&DAT_000140a0;
  puVar5 = puVar1;
  for (iVar4 = 0x20; iVar4 != 0; iVar4 = iVar4 + -1) {
    *puVar5 = 0;
    puVar5 = puVar5 + 1;
  }
  *(undefined1 *)puVar5 = 0;
  snprintf(local_1020,0xfff,"/sys/bus/usb/devices/%s/%s",param_1,param_2);
  iVar4 = open(local_1020,0);
  if (-1 < iVar4) {
    sVar2 = read(iVar4,&DAT_000140a0,0x80);
    close(iVar4);
    iVar4 = sVar2 + -1;
    if (0 < iVar4) {
      ppuVar3 = __ctype_b_loc();
      do {
        if ((*(byte *)((int)*ppuVar3 + (char)(&DAT_000140a0)[iVar4] * 2 + 1) & 0x20) == 0) break;
        (&DAT_000140a0)[iVar4] = 0;
        iVar4 = iVar4 + -1;
      } while (iVar4 != 0);
      goto LAB_00011534;
    }
    if (iVar4 == 0) goto LAB_00011534;
  }
  puVar1 = (undefined4 *)0x0;
LAB_00011534:
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_000119a0();
  }
  return puVar1;
}

