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

char * __regparm3 num_or_unknown(uint8_t *xp,int num_bytes,_Bool in_hex,char *b,int blen)

{
  byte bVar1;
  char cVar2;
  uint uVar3;
  undefined3 in_register_00000005;
  char *pcVar4;
  byte *pbVar5;
  uint uVar6;
  
  pcVar4 = (char *)CONCAT31(in_register_00000005,in_hex);
  cVar2 = sg_all_ffs(xp,num_bytes);
  if (cVar2 != '\0') {
    builtin_strncpy(pcVar4,"unknown",8);
    return pcVar4;
  }
  uVar3 = 0;
  uVar6 = 0;
  if (num_bytes - 1U < 8) {
    uVar3 = (uint)*xp;
    uVar6 = 0;
    pbVar5 = xp + 1;
    if (num_bytes != 1) {
      do {
        bVar1 = *pbVar5;
        pbVar5 = pbVar5 + 1;
        uVar6 = uVar6 << 8 | uVar3 >> 0x18;
        uVar3 = (uint)bVar1 | uVar3 << 8;
      } while (xp + num_bytes != pbVar5);
    }
  }
  __snprintf_chk(pcVar4,0x40,1,0xffffffff,"%llu",uVar3,uVar6);
  return pcVar4;
}



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

undefined4 * __regparm3 FUN_00022ae0(byte *param_1,int param_2,undefined4 *param_3)

{
  byte bVar1;
  char cVar2;
  uint uVar3;
  byte *pbVar4;
  uint uVar5;
  
  cVar2 = sg_all_ffs(param_1,param_2);
  if (cVar2 != '\0') {
    *param_3 = 0x6e6b6e75;
    param_3[1] = 0x6e776f;
    return param_3;
  }
  uVar3 = 0;
  uVar5 = 0;
  if (param_2 - 1U < 8) {
    uVar3 = (uint)*param_1;
    uVar5 = 0;
    pbVar4 = param_1 + 1;
    if (param_2 != 1) {
      do {
        bVar1 = *pbVar4;
        pbVar4 = pbVar4 + 1;
        uVar5 = uVar5 << 8 | uVar3 >> 0x18;
        uVar3 = (uint)bVar1 | uVar3 << 8;
      } while (param_1 + param_2 != pbVar4);
    }
  }
  __snprintf_chk(param_3,0x40,1,0xffffffff,"%llu",uVar3,uVar5);
  return param_3;
}


PUSH EBP
MOV EBP,EDX
PUSH EDI
MOV EDI,EAX
PUSH ESI
MOV ESI,ECX
PUSH EBX
CALL 0x00013c20
ADD EBX,0x15411
SUB ESP,0x24
PUSH EDX
PUSH EAX
CALL 0x00012190
ADD ESP,0x10
TEST AL,AL
JNZ 0x00022b80
LEA ECX,[EBP + -0x1]
XOR EAX,EAX
XOR EDX,EDX
CMP ECX,0x7
JA 0x00022b51
MOVZX EAX,byte ptr [EDI]
XOR EDX,EDX
LEA ECX,[EDI + 0x1]
CMP EBP,0x1
JZ 0x00022b51
ADD EDI,EBP
MOV dword ptr [ESP + 0xc],ESI
MOV dword ptr [ESP + 0x8],EDI
LEA ESI,[ESI]
MOV ESI,EAX
MOVZX EBP,byte ptr [ECX]
MOV EDI,EDX
ADD ECX,0x1
SHL ESI,0x8
SHLD EDI,EAX,0x8
OR EBP,ESI
MOV EDX,EDI
MOV EAX,EBP
CMP dword ptr [ESP + 0x8],ECX
JNZ 0x00022b30
MOV ESI,dword ptr [ESP + 0xc]
SUB ESP,0x4
PUSH EDX
PUSH EAX
LEA EAX,[EBX + 0xffff534b]
PUSH EAX
PUSH -0x1
PUSH 0x1
PUSH 0x40
PUSH ESI
CALL 0x00012050
ADD ESP,0x20
MOV EAX,ESI
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV dword ptr [ESI],0x6e6b6e75
MOV EAX,ESI
MOV dword ptr [ESI + 0x4],0x6e776f
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 * __regparm3 FUN_00022ae0(byte *param_1,int param_2,undefined4 *param_3)\n\n{\n  byte bVar1;\n  char cVar2;\n  uint uVar3;\n  byte *pbVar4;\n  uint uVar5;\n  \n  cVar2 = sg_all_ffs(param_1,param_2);\n  if (cVar2 != '\0') {\n    *param_3 = 0x6e6b6e75;\n    param_3[1] = 0x6e776f;\n    return param_3;\n  }\n  uVar3 = 0;\n  uVar5 = 0;\n  if (param_2 - 1U < 8) {\n    uVar3 = (uint)*param_1;\n    uVar5 = 0;\n    pbVar4 = param_1 + 1;\n    if (param_2 != 1) {\n      do {\n        bVar1 = *pbVar4;\n        pbVar4 = pbVar4 + 1;\n        uVar5 = uVar5 << 8 | uVar3 >> 0x18;\n        uVar3 = (uint)bVar1 | uVar3 << 8;\n      } while (param_1 + param_2 != pbVar4);\n    }\n  }\n  __snprintf_chk(param_3,0x40,1,0xffffffff,"%llu",uVar3,uVar5);\n  return param_3;\n}\n\n" comment (ERROR "undefined4 * __regparm3 FUN_00022ae0(byte *param_1,int param_2,undefined4 *param_3)" (binary_expression "undefined4 * __regparm3 FUN_00022ae0(byte *param_1,int param_2,undefined4 *param_3)" identifier * (ERROR "__regparm3" identifier) (call_expression "FUN_00022ae0(byte *param_1,int param_2,undefined4 *param_3)" identifier (argument_list "(byte *param_1,int param_2,undefined4 *param_3)" ( (binary_expression "byte *param_1" identifier * identifier) , (ERROR "int" identifier) identifier , (binary_expression "undefined4 *param_3" identifier * identifier) ))))) (compound_statement "{\n  byte bVar1;\n  char cVar2;\n  uint uVar3;\n  byte *pbVar4;\n  uint uVar5;\n  \n  cVar2 = sg_all_ffs(param_1,param_2);\n  if (cVar2 != '\0') {\n    *param_3 = 0x6e6b6e75;\n    param_3[1] = 0x6e776f;\n    return param_3;\n  }\n  uVar3 = 0;\n  uVar5 = 0;\n  if (param_2 - 1U < 8) {\n    uVar3 = (uint)*param_1;\n    uVar5 = 0;\n    pbVar4 = param_1 + 1;\n    if (param_2 != 1) {\n      do {\n        bVar1 = *pbVar4;\n        pbVar4 = pbVar4 + 1;\n        uVar5 = uVar5 << 8 | uVar3 >> 0x18;\n        uVar3 = (uint)bVar1 | uVar3 << 8;\n      } while (param_1 + param_2 != pbVar4);\n    }\n  }\n  __snprintf_chk(param_3,0x40,1,0xffffffff,"%llu",uVar3,uVar5);\n  return param_3;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "char cVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "byte *pbVar4;" type_identifier (pointer_declarator "*pbVar4" * identifier) ;) (declaration "uint uVar5;" type_identifier identifier ;) (expression_statement "cVar2 = sg_all_ffs(param_1,param_2);" (assignment_expression "cVar2 = sg_all_ffs(param_1,param_2)" identifier = (call_expression "sg_all_ffs(param_1,param_2)" identifier (argument_list "(param_1,param_2)" ( identifier , identifier )))) ;) (if_statement "if (cVar2 != '\0') {\n    *param_3 = 0x6e6b6e75;\n    param_3[1] = 0x6e776f;\n    return param_3;\n  }" if (parenthesized_expression "(cVar2 != '\0')" ( (binary_expression "cVar2 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    *param_3 = 0x6e6b6e75;\n    param_3[1] = 0x6e776f;\n    return param_3;\n  }" { (expression_statement "*param_3 = 0x6e6b6e75;" (assignment_expression "*param_3 = 0x6e6b6e75" (pointer_expression "*param_3" * identifier) = number_literal) ;) (expression_statement "param_3[1] = 0x6e776f;" (assignment_expression "param_3[1] = 0x6e776f" (subscript_expression "param_3[1]" identifier [ number_literal ]) = number_literal) ;) (return_statement "return param_3;" return identifier ;) })) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) (if_statement "if (param_2 - 1U < 8) {\n    uVar3 = (uint)*param_1;\n    uVar5 = 0;\n    pbVar4 = param_1 + 1;\n    if (param_2 != 1) {\n      do {\n        bVar1 = *pbVar4;\n        pbVar4 = pbVar4 + 1;\n        uVar5 = uVar5 << 8 | uVar3 >> 0x18;\n        uVar3 = (uint)bVar1 | uVar3 << 8;\n      } while (param_1 + param_2 != pbVar4);\n    }\n  }" if (parenthesized_expression "(param_2 - 1U < 8)" ( (binary_expression "param_2 - 1U < 8" (binary_expression "param_2 - 1U" identifier - number_literal) < number_literal) )) (compound_statement "{\n    uVar3 = (uint)*param_1;\n    uVar5 = 0;\n    pbVar4 = param_1 + 1;\n    if (param_2 != 1) {\n      do {\n        bVar1 = *pbVar4;\n        pbVar4 = pbVar4 + 1;\n        uVar5 = uVar5 << 8 | uVar3 >> 0x18;\n        uVar3 = (uint)bVar1 | uVar3 << 8;\n      } while (param_1 + param_2 != pbVar4);\n    }\n  }" { (expression_statement "uVar3 = (uint)*param_1;" (assignment_expression "uVar3 = (uint)*param_1" identifier = (binary_expression "(uint)*param_1" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) (expression_statement "pbVar4 = param_1 + 1;" (assignment_expression "pbVar4 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) (if_statement "if (param_2 != 1) {\n      do {\n        bVar1 = *pbVar4;\n        pbVar4 = pbVar4 + 1;\n        uVar5 = uVar5 << 8 | uVar3 >> 0x18;\n        uVar3 = (uint)bVar1 | uVar3 << 8;\n      } while (param_1 + param_2 != pbVar4);\n    }" if (parenthesized_expression "(param_2 != 1)" ( (binary_expression "param_2 != 1" identifier != number_literal) )) (compound_statement "{\n      do {\n        bVar1 = *pbVar4;\n        pbVar4 = pbVar4 + 1;\n        uVar5 = uVar5 << 8 | uVar3 >> 0x18;\n        uVar3 = (uint)bVar1 | uVar3 << 8;\n      } while (param_1 + param_2 != pbVar4);\n    }" { (do_statement "do {\n        bVar1 = *pbVar4;\n        pbVar4 = pbVar4 + 1;\n        uVar5 = uVar5 << 8 | uVar3 >> 0x18;\n        uVar3 = (uint)bVar1 | uVar3 << 8;\n      } while (param_1 + param_2 != pbVar4);" do (compound_statement "{\n        bVar1 = *pbVar4;\n        pbVar4 = pbVar4 + 1;\n        uVar5 = uVar5 << 8 | uVar3 >> 0x18;\n        uVar3 = (uint)bVar1 | uVar3 << 8;\n      }" { (expression_statement "bVar1 = *pbVar4;" (assignment_expression "bVar1 = *pbVar4" identifier = (pointer_expression "*pbVar4" * identifier)) ;) (expression_statement "pbVar4 = pbVar4 + 1;" (assignment_expression "pbVar4 = pbVar4 + 1" identifier = (binary_expression "pbVar4 + 1" identifier + number_literal)) ;) (expression_statement "uVar5 = uVar5 << 8 | uVar3 >> 0x18;" (assignment_expression "uVar5 = uVar5 << 8 | uVar3 >> 0x18" identifier = (binary_expression "uVar5 << 8 | uVar3 >> 0x18" (binary_expression "uVar5 << 8" identifier << number_literal) | (binary_expression "uVar3 >> 0x18" identifier >> number_literal))) ;) (expression_statement "uVar3 = (uint)bVar1 | uVar3 << 8;" (assignment_expression "uVar3 = (uint)bVar1 | uVar3 << 8" identifier = (binary_expression "(uint)bVar1 | uVar3 << 8" (cast_expression "(uint)bVar1" ( (type_descriptor "uint" type_identifier) ) identifier) | (binary_expression "uVar3 << 8" identifier << number_literal))) ;) }) while (parenthesized_expression "(param_1 + param_2 != pbVar4)" ( (binary_expression "param_1 + param_2 != pbVar4" (binary_expression "param_1 + param_2" identifier + identifier) != identifier) )) ;) })) })) (expression_statement "__snprintf_chk(param_3,0x40,1,0xffffffff,"%llu",uVar3,uVar5);" (call_expression "__snprintf_chk(param_3,0x40,1,0xffffffff,"%llu",uVar3,uVar5)" identifier (argument_list "(param_3,0x40,1,0xffffffff,"%llu",uVar3,uVar5)" ( identifier , number_literal , number_literal , number_literal , (string_literal ""%llu"" " string_content ") , identifier , identifier ))) ;) (return_statement "return param_3;" return identifier ;) }))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nchar * __regparm3 num_or_unknown(uint8_t *xp,int num_bytes,_Bool in_hex,char *b,int blen)\n\n{\n  byte bVar1;\n  char cVar2;\n  uint uVar3;\n  undefined3 in_register_00000005;\n  char *pcVar4;\n  byte *pbVar5;\n  uint uVar6;\n  \n  pcVar4 = (char *)CONCAT31(in_register_00000005,in_hex);\n  cVar2 = sg_all_ffs(xp,num_bytes);\n  if (cVar2 != '\0') {\n    builtin_strncpy(pcVar4,"unknown",8);\n    return pcVar4;\n  }\n  uVar3 = 0;\n  uVar6 = 0;\n  if (num_bytes - 1U < 8) {\n    uVar3 = (uint)*xp;\n    uVar6 = 0;\n    pbVar5 = xp + 1;\n    if (num_bytes != 1) {\n      do {\n        bVar1 = *pbVar5;\n        pbVar5 = pbVar5 + 1;\n        uVar6 = uVar6 << 8 | uVar3 >> 0x18;\n        uVar3 = (uint)bVar1 | uVar3 << 8;\n      } while (xp + num_bytes != pbVar5);\n    }\n  }\n  __snprintf_chk(pcVar4,0x40,1,0xffffffff,"%llu",uVar3,uVar6);\n  return pcVar4;\n}\n\n" comment (function_definition "char * __regparm3 num_or_unknown(uint8_t *xp,int num_bytes,_Bool in_hex,char *b,int blen)\n\n{\n  byte bVar1;\n  char cVar2;\n  uint uVar3;\n  undefined3 in_register_00000005;\n  char *pcVar4;\n  byte *pbVar5;\n  uint uVar6;\n  \n  pcVar4 = (char *)CONCAT31(in_register_00000005,in_hex);\n  cVar2 = sg_all_ffs(xp,num_bytes);\n  if (cVar2 != '\0') {\n    builtin_strncpy(pcVar4,"unknown",8);\n    return pcVar4;\n  }\n  uVar3 = 0;\n  uVar6 = 0;\n  if (num_bytes - 1U < 8) {\n    uVar3 = (uint)*xp;\n    uVar6 = 0;\n    pbVar5 = xp + 1;\n    if (num_bytes != 1) {\n      do {\n        bVar1 = *pbVar5;\n        pbVar5 = pbVar5 + 1;\n        uVar6 = uVar6 << 8 | uVar3 >> 0x18;\n        uVar3 = (uint)bVar1 | uVar3 << 8;\n      } while (xp + num_bytes != pbVar5);\n    }\n  }\n  __snprintf_chk(pcVar4,0x40,1,0xffffffff,"%llu",uVar3,uVar6);\n  return pcVar4;\n}" primitive_type (pointer_declarator "* __regparm3 num_or_unknown(uint8_t *xp,int num_bytes,_Bool in_hex,char *b,int blen)" * (ERROR "__regparm3" identifier) (function_declarator "num_or_unknown(uint8_t *xp,int num_bytes,_Bool in_hex,char *b,int blen)" identifier (parameter_list "(uint8_t *xp,int num_bytes,_Bool in_hex,char *b,int blen)" ( (parameter_declaration "uint8_t *xp" primitive_type (pointer_declarator "*xp" * identifier)) , (parameter_declaration "int num_bytes" primitive_type identifier) , (parameter_declaration "_Bool in_hex" type_identifier identifier) , (parameter_declaration "char *b" primitive_type (pointer_declarator "*b" * identifier)) , (parameter_declaration "int blen" primitive_type identifier) )))) (compound_statement "{\n  byte bVar1;\n  char cVar2;\n  uint uVar3;\n  undefined3 in_register_00000005;\n  char *pcVar4;\n  byte *pbVar5;\n  uint uVar6;\n  \n  pcVar4 = (char *)CONCAT31(in_register_00000005,in_hex);\n  cVar2 = sg_all_ffs(xp,num_bytes);\n  if (cVar2 != '\0') {\n    builtin_strncpy(pcVar4,"unknown",8);\n    return pcVar4;\n  }\n  uVar3 = 0;\n  uVar6 = 0;\n  if (num_bytes - 1U < 8) {\n    uVar3 = (uint)*xp;\n    uVar6 = 0;\n    pbVar5 = xp + 1;\n    if (num_bytes != 1) {\n      do {\n        bVar1 = *pbVar5;\n        pbVar5 = pbVar5 + 1;\n        uVar6 = uVar6 << 8 | uVar3 >> 0x18;\n        uVar3 = (uint)bVar1 | uVar3 << 8;\n      } while (xp + num_bytes != pbVar5);\n    }\n  }\n  __snprintf_chk(pcVar4,0x40,1,0xffffffff,"%llu",uVar3,uVar6);\n  return pcVar4;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "char cVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "undefined3 in_register_00000005;" type_identifier identifier ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "byte *pbVar5;" type_identifier (pointer_declarator "*pbVar5" * identifier) ;) (declaration "uint uVar6;" type_identifier identifier ;) (expression_statement "pcVar4 = (char *)CONCAT31(in_register_00000005,in_hex);" (assignment_expression "pcVar4 = (char *)CONCAT31(in_register_00000005,in_hex)" identifier = (cast_expression "(char *)CONCAT31(in_register_00000005,in_hex)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "CONCAT31(in_register_00000005,in_hex)" identifier (argument_list "(in_register_00000005,in_hex)" ( identifier , identifier ))))) ;) (expression_statement "cVar2 = sg_all_ffs(xp,num_bytes);" (assignment_expression "cVar2 = sg_all_ffs(xp,num_bytes)" identifier = (call_expression "sg_all_ffs(xp,num_bytes)" identifier (argument_list "(xp,num_bytes)" ( identifier , identifier )))) ;) (if_statement "if (cVar2 != '\0') {\n    builtin_strncpy(pcVar4,"unknown",8);\n    return pcVar4;\n  }" if (parenthesized_expression "(cVar2 != '\0')" ( (binary_expression "cVar2 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    builtin_strncpy(pcVar4,"unknown",8);\n    return pcVar4;\n  }" { (expression_statement "builtin_strncpy(pcVar4,"unknown",8);" (call_expression "builtin_strncpy(pcVar4,"unknown",8)" identifier (argument_list "(pcVar4,"unknown",8)" ( identifier , (string_literal ""unknown"" " string_content ") , number_literal ))) ;) (return_statement "return pcVar4;" return identifier ;) })) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (expression_statement "uVar6 = 0;" (assignment_expression "uVar6 = 0" identifier = number_literal) ;) (if_statement "if (num_bytes - 1U < 8) {\n    uVar3 = (uint)*xp;\n    uVar6 = 0;\n    pbVar5 = xp + 1;\n    if (num_bytes != 1) {\n      do {\n        bVar1 = *pbVar5;\n        pbVar5 = pbVar5 + 1;\n        uVar6 = uVar6 << 8 | uVar3 >> 0x18;\n        uVar3 = (uint)bVar1 | uVar3 << 8;\n      } while (xp + num_bytes != pbVar5);\n    }\n  }" if (parenthesized_expression "(num_bytes - 1U < 8)" ( (binary_expression "num_bytes - 1U < 8" (binary_expression "num_bytes - 1U" identifier - number_literal) < number_literal) )) (compound_statement "{\n    uVar3 = (uint)*xp;\n    uVar6 = 0;\n    pbVar5 = xp + 1;\n    if (num_bytes != 1) {\n      do {\n        bVar1 = *pbVar5;\n        pbVar5 = pbVar5 + 1;\n        uVar6 = uVar6 << 8 | uVar3 >> 0x18;\n        uVar3 = (uint)bVar1 | uVar3 << 8;\n      } while (xp + num_bytes != pbVar5);\n    }\n  }" { (expression_statement "uVar3 = (uint)*xp;" (assignment_expression "uVar3 = (uint)*xp" identifier = (binary_expression "(uint)*xp" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (expression_statement "uVar6 = 0;" (assignment_expression "uVar6 = 0" identifier = number_literal) ;) (expression_statement "pbVar5 = xp + 1;" (assignment_expression "pbVar5 = xp + 1" identifier = (binary_expression "xp + 1" identifier + number_literal)) ;) (if_statement "if (num_bytes != 1) {\n      do {\n        bVar1 = *pbVar5;\n        pbVar5 = pbVar5 + 1;\n        uVar6 = uVar6 << 8 | uVar3 >> 0x18;\n        uVar3 = (uint)bVar1 | uVar3 << 8;\n      } while (xp + num_bytes != pbVar5);\n    }" if (parenthesized_expression "(num_bytes != 1)" ( (binary_expression "num_bytes != 1" identifier != number_literal) )) (compound_statement "{\n      do {\n        bVar1 = *pbVar5;\n        pbVar5 = pbVar5 + 1;\n        uVar6 = uVar6 << 8 | uVar3 >> 0x18;\n        uVar3 = (uint)bVar1 | uVar3 << 8;\n      } while (xp + num_bytes != pbVar5);\n    }" { (do_statement "do {\n        bVar1 = *pbVar5;\n        pbVar5 = pbVar5 + 1;\n        uVar6 = uVar6 << 8 | uVar3 >> 0x18;\n        uVar3 = (uint)bVar1 | uVar3 << 8;\n      } while (xp + num_bytes != pbVar5);" do (compound_statement "{\n        bVar1 = *pbVar5;\n        pbVar5 = pbVar5 + 1;\n        uVar6 = uVar6 << 8 | uVar3 >> 0x18;\n        uVar3 = (uint)bVar1 | uVar3 << 8;\n      }" { (expression_statement "bVar1 = *pbVar5;" (assignment_expression "bVar1 = *pbVar5" identifier = (pointer_expression "*pbVar5" * identifier)) ;) (expression_statement "pbVar5 = pbVar5 + 1;" (assignment_expression "pbVar5 = pbVar5 + 1" identifier = (binary_expression "pbVar5 + 1" identifier + number_literal)) ;) (expression_statement "uVar6 = uVar6 << 8 | uVar3 >> 0x18;" (assignment_expression "uVar6 = uVar6 << 8 | uVar3 >> 0x18" identifier = (binary_expression "uVar6 << 8 | uVar3 >> 0x18" (binary_expression "uVar6 << 8" identifier << number_literal) | (binary_expression "uVar3 >> 0x18" identifier >> number_literal))) ;) (expression_statement "uVar3 = (uint)bVar1 | uVar3 << 8;" (assignment_expression "uVar3 = (uint)bVar1 | uVar3 << 8" identifier = (binary_expression "(uint)bVar1 | uVar3 << 8" (cast_expression "(uint)bVar1" ( (type_descriptor "uint" type_identifier) ) identifier) | (binary_expression "uVar3 << 8" identifier << number_literal))) ;) }) while (parenthesized_expression "(xp + num_bytes != pbVar5)" ( (binary_expression "xp + num_bytes != pbVar5" (binary_expression "xp + num_bytes" identifier + identifier) != identifier) )) ;) })) })) (expression_statement "__snprintf_chk(pcVar4,0x40,1,0xffffffff,"%llu",uVar3,uVar6);" (call_expression "__snprintf_chk(pcVar4,0x40,1,0xffffffff,"%llu",uVar3,uVar6)" identifier (argument_list "(pcVar4,0x40,1,0xffffffff,"%llu",uVar3,uVar6)" ( identifier , number_literal , number_literal , number_literal , (string_literal ""%llu"" " string_content ") , identifier , identifier ))) ;) (return_statement "return pcVar4;" return identifier ;) })))
(translation_unit "undefined4 * __regparm3 FUN_00022ae0(byte *param_1,int param_2,undefined4 *param_3)\n\n{\n  byte bVar1;\n  char cVar2;\n  uint uVar3;\n  byte *pbVar4;\n  uint uVar5;\n  \n  cVar2 = sg_all_ffs(param_1,param_2);\n  if (cVar2 != '\0') {\n    *param_3 = 0x6e6b6e75;\n    param_3[1] = 0x6e776f;\n    return param_3;\n  }\n  uVar3 = 0;\n  uVar5 = 0;\n  if (param_2 - 1U < 8) {\n    uVar3 = (uint)*param_1;\n    uVar5 = 0;\n    pbVar4 = param_1 + 1;\n    if (param_2 != 1) {\n      do {\n        bVar1 = *pbVar4;\n        pbVar4 = pbVar4 + 1;\n        uVar5 = uVar5 << 8 | uVar3 >> 0x18;\n        uVar3 = (uint)bVar1 | uVar3 << 8;\n      } while (param_1 + param_2 != pbVar4);\n    }\n  }\n  __snprintf_chk(param_3,0x40,1,0xffffffff,"%llu",uVar3,uVar5);\n  return param_3;\n}\n\n" (ERROR "undefined4 * __regparm3 FUN_00022ae0(byte *param_1,int param_2,undefined4 *param_3)" (binary_expression "undefined4 * __regparm3 FUN_00022ae0(byte *param_1,int param_2,undefined4 *param_3)" identifier * (ERROR "__regparm3" identifier) (call_expression "FUN_00022ae0(byte *param_1,int param_2,undefined4 *param_3)" identifier (argument_list "(byte *param_1,int param_2,undefined4 *param_3)" ( (binary_expression "byte *param_1" identifier * identifier) , (ERROR "int" identifier) identifier , (binary_expression "undefined4 *param_3" identifier * identifier) ))))) (compound_statement "{\n  byte bVar1;\n  char cVar2;\n  uint uVar3;\n  byte *pbVar4;\n  uint uVar5;\n  \n  cVar2 = sg_all_ffs(param_1,param_2);\n  if (cVar2 != '\0') {\n    *param_3 = 0x6e6b6e75;\n    param_3[1] = 0x6e776f;\n    return param_3;\n  }\n  uVar3 = 0;\n  uVar5 = 0;\n  if (param_2 - 1U < 8) {\n    uVar3 = (uint)*param_1;\n    uVar5 = 0;\n    pbVar4 = param_1 + 1;\n    if (param_2 != 1) {\n      do {\n        bVar1 = *pbVar4;\n        pbVar4 = pbVar4 + 1;\n        uVar5 = uVar5 << 8 | uVar3 >> 0x18;\n        uVar3 = (uint)bVar1 | uVar3 << 8;\n      } while (param_1 + param_2 != pbVar4);\n    }\n  }\n  __snprintf_chk(param_3,0x40,1,0xffffffff,"%llu",uVar3,uVar5);\n  return param_3;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "char cVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "byte *pbVar4;" type_identifier (pointer_declarator "*pbVar4" * identifier) ;) (declaration "uint uVar5;" type_identifier identifier ;) (expression_statement "cVar2 = sg_all_ffs(param_1,param_2);" (assignment_expression "cVar2 = sg_all_ffs(param_1,param_2)" identifier = (call_expression "sg_all_ffs(param_1,param_2)" identifier (argument_list "(param_1,param_2)" ( identifier , identifier )))) ;) (if_statement "if (cVar2 != '\0') {\n    *param_3 = 0x6e6b6e75;\n    param_3[1] = 0x6e776f;\n    return param_3;\n  }" if (parenthesized_expression "(cVar2 != '\0')" ( (binary_expression "cVar2 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    *param_3 = 0x6e6b6e75;\n    param_3[1] = 0x6e776f;\n    return param_3;\n  }" { (expression_statement "*param_3 = 0x6e6b6e75;" (assignment_expression "*param_3 = 0x6e6b6e75" (pointer_expression "*param_3" * identifier) = number_literal) ;) (expression_statement "param_3[1] = 0x6e776f;" (assignment_expression "param_3[1] = 0x6e776f" (subscript_expression "param_3[1]" identifier [ number_literal ]) = number_literal) ;) (return_statement "return param_3;" return identifier ;) })) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) (if_statement "if (param_2 - 1U < 8) {\n    uVar3 = (uint)*param_1;\n    uVar5 = 0;\n    pbVar4 = param_1 + 1;\n    if (param_2 != 1) {\n      do {\n        bVar1 = *pbVar4;\n        pbVar4 = pbVar4 + 1;\n        uVar5 = uVar5 << 8 | uVar3 >> 0x18;\n        uVar3 = (uint)bVar1 | uVar3 << 8;\n      } while (param_1 + param_2 != pbVar4);\n    }\n  }" if (parenthesized_expression "(param_2 - 1U < 8)" ( (binary_expression "param_2 - 1U < 8" (binary_expression "param_2 - 1U" identifier - number_literal) < number_literal) )) (compound_statement "{\n    uVar3 = (uint)*param_1;\n    uVar5 = 0;\n    pbVar4 = param_1 + 1;\n    if (param_2 != 1) {\n      do {\n        bVar1 = *pbVar4;\n        pbVar4 = pbVar4 + 1;\n        uVar5 = uVar5 << 8 | uVar3 >> 0x18;\n        uVar3 = (uint)bVar1 | uVar3 << 8;\n      } while (param_1 + param_2 != pbVar4);\n    }\n  }" { (expression_statement "uVar3 = (uint)*param_1;" (assignment_expression "uVar3 = (uint)*param_1" identifier = (binary_expression "(uint)*param_1" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) (expression_statement "pbVar4 = param_1 + 1;" (assignment_expression "pbVar4 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) (if_statement "if (param_2 != 1) {\n      do {\n        bVar1 = *pbVar4;\n        pbVar4 = pbVar4 + 1;\n        uVar5 = uVar5 << 8 | uVar3 >> 0x18;\n        uVar3 = (uint)bVar1 | uVar3 << 8;\n      } while (param_1 + param_2 != pbVar4);\n    }" if (parenthesized_expression "(param_2 != 1)" ( (binary_expression "param_2 != 1" identifier != number_literal) )) (compound_statement "{\n      do {\n        bVar1 = *pbVar4;\n        pbVar4 = pbVar4 + 1;\n        uVar5 = uVar5 << 8 | uVar3 >> 0x18;\n        uVar3 = (uint)bVar1 | uVar3 << 8;\n      } while (param_1 + param_2 != pbVar4);\n    }" { (do_statement "do {\n        bVar1 = *pbVar4;\n        pbVar4 = pbVar4 + 1;\n        uVar5 = uVar5 << 8 | uVar3 >> 0x18;\n        uVar3 = (uint)bVar1 | uVar3 << 8;\n      } while (param_1 + param_2 != pbVar4);" do (compound_statement "{\n        bVar1 = *pbVar4;\n        pbVar4 = pbVar4 + 1;\n        uVar5 = uVar5 << 8 | uVar3 >> 0x18;\n        uVar3 = (uint)bVar1 | uVar3 << 8;\n      }" { (expression_statement "bVar1 = *pbVar4;" (assignment_expression "bVar1 = *pbVar4" identifier = (pointer_expression "*pbVar4" * identifier)) ;) (expression_statement "pbVar4 = pbVar4 + 1;" (assignment_expression "pbVar4 = pbVar4 + 1" identifier = (binary_expression "pbVar4 + 1" identifier + number_literal)) ;) (expression_statement "uVar5 = uVar5 << 8 | uVar3 >> 0x18;" (assignment_expression "uVar5 = uVar5 << 8 | uVar3 >> 0x18" identifier = (binary_expression "uVar5 << 8 | uVar3 >> 0x18" (binary_expression "uVar5 << 8" identifier << number_literal) | (binary_expression "uVar3 >> 0x18" identifier >> number_literal))) ;) (expression_statement "uVar3 = (uint)bVar1 | uVar3 << 8;" (assignment_expression "uVar3 = (uint)bVar1 | uVar3 << 8" identifier = (binary_expression "(uint)bVar1 | uVar3 << 8" (cast_expression "(uint)bVar1" ( (type_descriptor "uint" type_identifier) ) identifier) | (binary_expression "uVar3 << 8" identifier << number_literal))) ;) }) while (parenthesized_expression "(param_1 + param_2 != pbVar4)" ( (binary_expression "param_1 + param_2 != pbVar4" (binary_expression "param_1 + param_2" identifier + identifier) != identifier) )) ;) })) })) (expression_statement "__snprintf_chk(param_3,0x40,1,0xffffffff,"%llu",uVar3,uVar5);" (call_expression "__snprintf_chk(param_3,0x40,1,0xffffffff,"%llu",uVar3,uVar5)" identifier (argument_list "(param_3,0x40,1,0xffffffff,"%llu",uVar3,uVar5)" ( identifier , number_literal , number_literal , number_literal , (string_literal ""%llu"" " string_content ") , identifier , identifier ))) ;) (return_statement "return param_3;" return identifier ;) }))
(translation_unit (ERROR (binary_expression IDENT * (ERROR IDENT) (call_expression IDENT (argument_list ( (binary_expression IDENT * IDENT) , (ERROR IDENT) IDENT , (binary_expression IDENT * IDENT) ))))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT - LIT) < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( IDENT )) * IDENT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT << LIT) | (binary_expression IDENT >> LIT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) | (binary_expression IDENT << LIT))) ;) }) while (parenthesized_expression ( (binary_expression (binary_expression IDENT + IDENT) != IDENT) )) ;) })) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , LIT , LIT , (string_literal " string_content ") , IDENT , IDENT ))) ;) (return_statement return IDENT ;) }))
(ERROR "undefined4 * __regparm3 FUN_00022ae0(byte *param_1,int param_2,undefined4 *param_3)" (binary_expression "undefined4 * __regparm3 FUN_00022ae0(byte *param_1,int param_2,undefined4 *param_3)" (identifier "undefined4") (* "*") (ERROR "__regparm3" (identifier "__regparm3")) (call_expression "FUN_00022ae0(byte *param_1,int param_2,undefined4 *param_3)" (identifier "FUN_00022ae0") (argument_list "(byte *param_1,int param_2,undefined4 *param_3)" (( "(") (binary_expression "byte *param_1" (identifier "byte") (* "*") (identifier "param_1")) (, ",") (ERROR "int" (identifier "int")) (identifier "param_2") (, ",") (binary_expression "undefined4 *param_3" (identifier "undefined4") (* "*") (identifier "param_3")) () ")"))))) (compound_statement "{\n  byte bVar1;\n  char cVar2;\n  uint uVar3;\n  byte *pbVar4;\n  uint uVar5;\n  \n  cVar2 = sg_all_ffs(param_1,param_2);\n  if (cVar2 != '\0') {\n    *param_3 = 0x6e6b6e75;\n    param_3[1] = 0x6e776f;\n    return param_3;\n  }\n  uVar3 = 0;\n  uVar5 = 0;\n  if (param_2 - 1U < 8) {\n    uVar3 = (uint)*param_1;\n    uVar5 = 0;\n    pbVar4 = param_1 + 1;\n    if (param_2 != 1) {\n      do {\n        bVar1 = *pbVar4;\n        pbVar4 = pbVar4 + 1;\n        uVar5 = uVar5 << 8 | uVar3 >> 0x18;\n        uVar3 = (uint)bVar1 | uVar3 << 8;\n      } while (param_1 + param_2 != pbVar4);\n    }\n  }\n  __snprintf_chk(param_3,0x40,1,0xffffffff,"%llu",uVar3,uVar5);\n  return param_3;\n}" ({ "{") (declaration "byte bVar1;" (type_identifier "byte") (identifier "bVar1") (; ";")) (declaration "char cVar2;" (primitive_type "char") (identifier "cVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "byte *pbVar4;" (type_identifier "byte") (pointer_declarator "*pbVar4" (* "*") (identifier "pbVar4")) (; ";")) (declaration "uint uVar5;" (type_identifier "uint") (identifier "uVar5") (; ";")) (expression_statement "cVar2 = sg_all_ffs(param_1,param_2);" (assignment_expression "cVar2 = sg_all_ffs(param_1,param_2)" (identifier "cVar2") (= "=") (call_expression "sg_all_ffs(param_1,param_2)" (identifier "sg_all_ffs") (argument_list "(param_1,param_2)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") () ")")))) (; ";")) (if_statement "if (cVar2 != '\0') {\n    *param_3 = 0x6e6b6e75;\n    param_3[1] = 0x6e776f;\n    return param_3;\n  }" (if "if") (parenthesized_expression "(cVar2 != '\0')" (( "(") (binary_expression "cVar2 != '\0'" (identifier "cVar2") (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    *param_3 = 0x6e6b6e75;\n    param_3[1] = 0x6e776f;\n    return param_3;\n  }" ({ "{") (expression_statement "*param_3 = 0x6e6b6e75;" (assignment_expression "*param_3 = 0x6e6b6e75" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (number_literal "0x6e6b6e75")) (; ";")) (expression_statement "param_3[1] = 0x6e776f;" (assignment_expression "param_3[1] = 0x6e776f" (subscript_expression "param_3[1]" (identifier "param_3") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0x6e776f")) (; ";")) (return_statement "return param_3;" (return "return") (identifier "param_3") (; ";")) (} "}"))) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" (identifier "uVar3") (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" (identifier "uVar5") (= "=") (number_literal "0")) (; ";")) (if_statement "if (param_2 - 1U < 8) {\n    uVar3 = (uint)*param_1;\n    uVar5 = 0;\n    pbVar4 = param_1 + 1;\n    if (param_2 != 1) {\n      do {\n        bVar1 = *pbVar4;\n        pbVar4 = pbVar4 + 1;\n        uVar5 = uVar5 << 8 | uVar3 >> 0x18;\n        uVar3 = (uint)bVar1 | uVar3 << 8;\n      } while (param_1 + param_2 != pbVar4);\n    }\n  }" (if "if") (parenthesized_expression "(param_2 - 1U < 8)" (( "(") (binary_expression "param_2 - 1U < 8" (binary_expression "param_2 - 1U" (identifier "param_2") (- "-") (number_literal "1U")) (< "<") (number_literal "8")) () ")")) (compound_statement "{\n    uVar3 = (uint)*param_1;\n    uVar5 = 0;\n    pbVar4 = param_1 + 1;\n    if (param_2 != 1) {\n      do {\n        bVar1 = *pbVar4;\n        pbVar4 = pbVar4 + 1;\n        uVar5 = uVar5 << 8 | uVar3 >> 0x18;\n        uVar3 = (uint)bVar1 | uVar3 << 8;\n      } while (param_1 + param_2 != pbVar4);\n    }\n  }" ({ "{") (expression_statement "uVar3 = (uint)*param_1;" (assignment_expression "uVar3 = (uint)*param_1" (identifier "uVar3") (= "=") (binary_expression "(uint)*param_1" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (identifier "param_1"))) (; ";")) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" (identifier "uVar5") (= "=") (number_literal "0")) (; ";")) (expression_statement "pbVar4 = param_1 + 1;" (assignment_expression "pbVar4 = param_1 + 1" (identifier "pbVar4") (= "=") (binary_expression "param_1 + 1" (identifier "param_1") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (param_2 != 1) {\n      do {\n        bVar1 = *pbVar4;\n        pbVar4 = pbVar4 + 1;\n        uVar5 = uVar5 << 8 | uVar3 >> 0x18;\n        uVar3 = (uint)bVar1 | uVar3 << 8;\n      } while (param_1 + param_2 != pbVar4);\n    }" (if "if") (parenthesized_expression "(param_2 != 1)" (( "(") (binary_expression "param_2 != 1" (identifier "param_2") (!= "!=") (number_literal "1")) () ")")) (compound_statement "{\n      do {\n        bVar1 = *pbVar4;\n        pbVar4 = pbVar4 + 1;\n        uVar5 = uVar5 << 8 | uVar3 >> 0x18;\n        uVar3 = (uint)bVar1 | uVar3 << 8;\n      } while (param_1 + param_2 != pbVar4);\n    }" ({ "{") (do_statement "do {\n        bVar1 = *pbVar4;\n        pbVar4 = pbVar4 + 1;\n        uVar5 = uVar5 << 8 | uVar3 >> 0x18;\n        uVar3 = (uint)bVar1 | uVar3 << 8;\n      } while (param_1 + param_2 != pbVar4);" (do "do") (compound_statement "{\n        bVar1 = *pbVar4;\n        pbVar4 = pbVar4 + 1;\n        uVar5 = uVar5 << 8 | uVar3 >> 0x18;\n        uVar3 = (uint)bVar1 | uVar3 << 8;\n      }" ({ "{") (expression_statement "bVar1 = *pbVar4;" (assignment_expression "bVar1 = *pbVar4" (identifier "bVar1") (= "=") (pointer_expression "*pbVar4" (* "*") (identifier "pbVar4"))) (; ";")) (expression_statement "pbVar4 = pbVar4 + 1;" (assignment_expression "pbVar4 = pbVar4 + 1" (identifier "pbVar4") (= "=") (binary_expression "pbVar4 + 1" (identifier "pbVar4") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "uVar5 = uVar5 << 8 | uVar3 >> 0x18;" (assignment_expression "uVar5 = uVar5 << 8 | uVar3 >> 0x18" (identifier "uVar5") (= "=") (binary_expression "uVar5 << 8 | uVar3 >> 0x18" (binary_expression "uVar5 << 8" (identifier "uVar5") (<< "<<") (number_literal "8")) (| "|") (binary_expression "uVar3 >> 0x18" (identifier "uVar3") (>> ">>") (number_literal "0x18")))) (; ";")) (expression_statement "uVar3 = (uint)bVar1 | uVar3 << 8;" (assignment_expression "uVar3 = (uint)bVar1 | uVar3 << 8" (identifier "uVar3") (= "=") (binary_expression "(uint)bVar1 | uVar3 << 8" (cast_expression "(uint)bVar1" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "bVar1")) (| "|") (binary_expression "uVar3 << 8" (identifier "uVar3") (<< "<<") (number_literal "8")))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(param_1 + param_2 != pbVar4)" (( "(") (binary_expression "param_1 + param_2 != pbVar4" (binary_expression "param_1 + param_2" (identifier "param_1") (+ "+") (identifier "param_2")) (!= "!=") (identifier "pbVar4")) () ")")) (; ";")) (} "}"))) (} "}"))) (expression_statement "__snprintf_chk(param_3,0x40,1,0xffffffff,"%llu",uVar3,uVar5);" (call_expression "__snprintf_chk(param_3,0x40,1,0xffffffff,"%llu",uVar3,uVar5)" (identifier "__snprintf_chk") (argument_list "(param_3,0x40,1,0xffffffff,"%llu",uVar3,uVar5)" (( "(") (identifier "param_3") (, ",") (number_literal "0x40") (, ",") (number_literal "1") (, ",") (number_literal "0xffffffff") (, ",") (string_literal ""%llu"" (" """) (string_content "%llu") (" """)) (, ",") (identifier "uVar3") (, ",") (identifier "uVar5") () ")"))) (; ";")) (return_statement "return param_3;" (return "return") (identifier "param_3") (; ";")) (} "}"))

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

char * __regparm3 function_1(uint8_t *var_6,int var_5,type_1 in_hex,char *b,int blen)

{
  type_2 bVar1;
  char var_3;
  type_3 var_9;
  type_4 in_register_00000005;
  char *pcVar4;
  type_2 *var_7;
  type_3 var_8;
  
  pcVar4 = (char *)var_1(in_register_00000005,in_hex);
  var_3 = var_2(var_6,var_5);
  if (var_3 != '\0') {
    var_4(pcVar4,"unknown",8);
    return pcVar4;
  }
  var_9 = 0;
  var_8 = 0;
  if (var_5 - 1U < 8) {
    var_9 = (type_3)*var_6;
    var_8 = 0;
    var_7 = var_6 + 1;
    if (var_5 != 1) {
      do {
        bVar1 = *var_7;
        var_7 = var_7 + 1;
        var_8 = var_8 << 8 | var_9 >> 0x18;
        var_9 = (type_3)bVar1 | var_9 << 8;
      } while (var_6 + var_5 != var_7);
    }
  }
  var_10(pcVar4,0x40,1,0xffffffff,"%llu",var_9,var_8);
  return pcVar4;
}


(translation_unit (ERROR (binary_expression left: (identifier) (ERROR (identifier)) right: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (identifier)) (ERROR (identifier)) (identifier) (binary_expression left: (identifier) right: (identifier)))))) (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (escape_sequence)))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (return_statement (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (identifier)) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) right: (binary_expression left: (identifier) right: (number_literal)))))) condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (identifier)))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (number_literal) (number_literal) (string_literal (string_content)) (identifier) (identifier)))) (return_statement (identifier))))

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

undefined4 * __regparm3 MASKED(byte *param_1,int param_2,undefined4 *param_3)

{
  byte bVar1;
  char cVar2;
  uint uVar3;
  byte *pbVar4;
  uint uVar5;
  
  cVar2 = sg_all_ffs(param_1,param_2);
  if (cVar2 != '\0') {
    *param_3 = 0x6e6b6e75;
    param_3[1] = 0x6e776f;
    return param_3;
  }
  uVar3 = 0;
  uVar5 = 0;
  if (param_2 - 1U < 8) {
    uVar3 = (uint)*param_1;
    uVar5 = 0;
    pbVar4 = param_1 + 1;
    if (param_2 != 1) {
      do {
        bVar1 = *pbVar4;
        pbVar4 = pbVar4 + 1;
        uVar5 = uVar5 << 8 | uVar3 >> 0x18;
        uVar3 = (uint)bVar1 | uVar3 << 8;
      } while (param_1 + param_2 != pbVar4);
    }
  }
  __snprintf_chk(param_3,0x40,1,0xffffffff,"%llu",uVar3,uVar5);
  return param_3;
}

