
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* DWARF original name: find_shdr<32, false>
   DWARF original prototype: uchar * find_shdr<32,_false>(Object * this, uchar * pshdrs, char *
   name, char * names, section_size_type names_size, uchar * hdr) */

uchar * __thiscall
gold::Object::find_shdr<32,_false>
          (Object *this,uchar *pshdrs,char *name,char *names,section_size_type names_size,uchar *hdr
          )

{
  int iVar1;
  uint uVar2;
  size_t sVar3;
  void *pvVar4;
  int iVar5;
  size_t __haystacklen;
  int *piVar6;
  char *__haystack;
  
  uVar2 = this->shnum_;
  if (hdr == (uchar *)0x0) {
    sVar3 = strlen(name);
    sVar3 = sVar3 + 1;
    __haystacklen = names_size;
    __haystack = names;
    goto LAB_000c846f;
  }
  iVar5 = *(int *)hdr;
  while( true ) {
    piVar6 = (int *)(hdr + 0x28);
    if (piVar6 < pshdrs + uVar2 * 0x28) {
      iVar1 = *(int *)(hdr + 0x28);
      while( true ) {
        if (iVar5 == iVar1) {
          return (uchar *)piVar6;
        }
        piVar6 = piVar6 + 10;
        if (pshdrs + uVar2 * 0x28 <= piVar6) break;
        iVar1 = *piVar6;
      }
    }
    if (iVar5 == 0) break;
    sVar3 = strlen(name);
    sVar3 = sVar3 + 1;
    __haystacklen = names_size - (iVar5 + sVar3);
    __haystack = names + iVar5 + sVar3;
LAB_000c846f:
    pvVar4 = memmem(__haystack,__haystacklen,name,sVar3);
    if (pvVar4 == (void *)0x0) {
      return (uchar *)0x0;
    }
    iVar5 = (int)pvVar4 - (int)names;
    hdr = pshdrs;
    if (iVar5 == 0) {
      return pshdrs;
    }
  }
  return (uchar *)0x0;
}



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

int * FUN_000c8400(int param_1,int *param_2,char *param_3,void *param_4,size_t param_5,int *param_6)

{
  int iVar1;
  int iVar2;
  size_t sVar3;
  void *pvVar4;
  int iVar5;
  size_t __haystacklen;
  int *piVar6;
  
  iVar2 = *(int *)(param_1 + 0x28);
  if (param_6 == (int *)0x0) {
    sVar3 = strlen(param_3);
    sVar3 = sVar3 + 1;
    __haystacklen = param_5;
    pvVar4 = param_4;
    goto LAB_000c846f;
  }
  iVar5 = *param_6;
  while( true ) {
    piVar6 = param_6 + 10;
    if (piVar6 < param_2 + iVar2 * 10) {
      iVar1 = param_6[10];
      while( true ) {
        if (iVar5 == iVar1) {
          return piVar6;
        }
        piVar6 = piVar6 + 10;
        if (param_2 + iVar2 * 10 <= piVar6) break;
        iVar1 = *piVar6;
      }
    }
    if (iVar5 == 0) break;
    sVar3 = strlen(param_3);
    sVar3 = sVar3 + 1;
    __haystacklen = param_5 - (iVar5 + sVar3);
    pvVar4 = (void *)((int)param_4 + iVar5 + sVar3);
LAB_000c846f:
    pvVar4 = memmem(pvVar4,__haystacklen,param_3,sVar3);
    if (pvVar4 == (void *)0x0) {
      return (int *)0x0;
    }
    iVar5 = (int)pvVar4 - (int)param_4;
    param_6 = param_2;
    if (iVar5 == 0) {
      return param_2;
    }
  }
  return (int *)0x0;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00036db0
ADD EBX,0x2e1bf7
SUB ESP,0xc
MOV EAX,dword ptr [ESP + 0x20]
MOV ECX,dword ptr [ESP + 0x34]
MOV EDI,dword ptr [ESP + 0x24]
MOV EBP,dword ptr [EAX + 0x28]
TEST ECX,ECX
JZ 0x000c84a0
MOV ESI,dword ptr [ECX]
LEA EAX,[EBP + EBP*0x4]
LEA EDX,[ECX + 0x28]
LEA EAX,[EDI + EAX*0x8]
CMP EAX,EDX
JBE 0x000c844b
CMP ESI,dword ptr [ECX + 0x28]
JNZ 0x000c8444
JMP 0x000c848e
CMP ESI,dword ptr [EDX]
JZ 0x000c848e
ADD EDX,0x28
CMP EAX,EDX
JA 0x000c8440
TEST ESI,ESI
JZ 0x000c84c0
SUB ESP,0xc
PUSH dword ptr [ESP + 0x34]
CALL 0x0002a5f0
ADD ESP,0x10
MOV EDX,dword ptr [ESP + 0x2c]
MOV ECX,dword ptr [ESP + 0x30]
ADD EAX,0x1
ADD ESI,EAX
ADD EDX,ESI
SUB ECX,ESI
PUSH EAX
PUSH dword ptr [ESP + 0x2c]
PUSH ECX
PUSH EDX
CALL 0x0002a6f0
ADD ESP,0x10
TEST EAX,EAX
JZ 0x000c84c0
SUB EAX,dword ptr [ESP + 0x2c]
MOV ECX,EDI
MOV EDX,EDI
MOV ESI,EAX
JNZ 0x000c8427
ADD ESP,0xc
MOV EAX,EDX
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0xc
PUSH dword ptr [ESP + 0x34]
CALL 0x0002a5f0
ADD ESP,0x10
MOV ECX,dword ptr [ESP + 0x30]
MOV EDX,dword ptr [ESP + 0x2c]
ADD EAX,0x1
JMP 0x000c846f
ADD ESP,0xc
XOR EDX,EDX
POP EBX
MOV EAX,EDX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint * FUN_000c8400(int param_1,int *param_2,char *param_3,void *param_4,size_t param_5,int *param_6)\n\n{\n  int iVar1;\n  int iVar2;\n  size_t sVar3;\n  void *pvVar4;\n  int iVar5;\n  size_t __haystacklen;\n  int *piVar6;\n  \n  iVar2 = *(int *)(param_1 + 0x28);\n  if (param_6 == (int *)0x0) {\n    sVar3 = strlen(param_3);\n    sVar3 = sVar3 + 1;\n    __haystacklen = param_5;\n    pvVar4 = param_4;\n    goto LAB_000c846f;\n  }\n  iVar5 = *param_6;\n  while( true ) {\n    piVar6 = param_6 + 10;\n    if (piVar6 < param_2 + iVar2 * 10) {\n      iVar1 = param_6[10];\n      while( true ) {\n        if (iVar5 == iVar1) {\n          return piVar6;\n        }\n        piVar6 = piVar6 + 10;\n        if (param_2 + iVar2 * 10 <= piVar6) break;\n        iVar1 = *piVar6;\n      }\n    }\n    if (iVar5 == 0) break;\n    sVar3 = strlen(param_3);\n    sVar3 = sVar3 + 1;\n    __haystacklen = param_5 - (iVar5 + sVar3);\n    pvVar4 = (void *)((int)param_4 + iVar5 + sVar3);\nLAB_000c846f:\n    pvVar4 = memmem(pvVar4,__haystacklen,param_3,sVar3);\n    if (pvVar4 == (void *)0x0) {\n      return (int *)0x0;\n    }\n    iVar5 = (int)pvVar4 - (int)param_4;\n    param_6 = param_2;\n    if (iVar5 == 0) {\n      return param_2;\n    }\n  }\n  return (int *)0x0;\n}\n\n" comment (function_definition "int * FUN_000c8400(int param_1,int *param_2,char *param_3,void *param_4,size_t param_5,int *param_6)\n\n{\n  int iVar1;\n  int iVar2;\n  size_t sVar3;\n  void *pvVar4;\n  int iVar5;\n  size_t __haystacklen;\n  int *piVar6;\n  \n  iVar2 = *(int *)(param_1 + 0x28);\n  if (param_6 == (int *)0x0) {\n    sVar3 = strlen(param_3);\n    sVar3 = sVar3 + 1;\n    __haystacklen = param_5;\n    pvVar4 = param_4;\n    goto LAB_000c846f;\n  }\n  iVar5 = *param_6;\n  while( true ) {\n    piVar6 = param_6 + 10;\n    if (piVar6 < param_2 + iVar2 * 10) {\n      iVar1 = param_6[10];\n      while( true ) {\n        if (iVar5 == iVar1) {\n          return piVar6;\n        }\n        piVar6 = piVar6 + 10;\n        if (param_2 + iVar2 * 10 <= piVar6) break;\n        iVar1 = *piVar6;\n      }\n    }\n    if (iVar5 == 0) break;\n    sVar3 = strlen(param_3);\n    sVar3 = sVar3 + 1;\n    __haystacklen = param_5 - (iVar5 + sVar3);\n    pvVar4 = (void *)((int)param_4 + iVar5 + sVar3);\nLAB_000c846f:\n    pvVar4 = memmem(pvVar4,__haystacklen,param_3,sVar3);\n    if (pvVar4 == (void *)0x0) {\n      return (int *)0x0;\n    }\n    iVar5 = (int)pvVar4 - (int)param_4;\n    param_6 = param_2;\n    if (iVar5 == 0) {\n      return param_2;\n    }\n  }\n  return (int *)0x0;\n}" primitive_type (pointer_declarator "* FUN_000c8400(int param_1,int *param_2,char *param_3,void *param_4,size_t param_5,int *param_6)" * (function_declarator "FUN_000c8400(int param_1,int *param_2,char *param_3,void *param_4,size_t param_5,int *param_6)" identifier (parameter_list "(int param_1,int *param_2,char *param_3,void *param_4,size_t param_5,int *param_6)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "char *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "void *param_4" primitive_type (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "size_t param_5" primitive_type identifier) , (parameter_declaration "int *param_6" primitive_type (pointer_declarator "*param_6" * identifier)) )))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  size_t sVar3;\n  void *pvVar4;\n  int iVar5;\n  size_t __haystacklen;\n  int *piVar6;\n  \n  iVar2 = *(int *)(param_1 + 0x28);\n  if (param_6 == (int *)0x0) {\n    sVar3 = strlen(param_3);\n    sVar3 = sVar3 + 1;\n    __haystacklen = param_5;\n    pvVar4 = param_4;\n    goto LAB_000c846f;\n  }\n  iVar5 = *param_6;\n  while( true ) {\n    piVar6 = param_6 + 10;\n    if (piVar6 < param_2 + iVar2 * 10) {\n      iVar1 = param_6[10];\n      while( true ) {\n        if (iVar5 == iVar1) {\n          return piVar6;\n        }\n        piVar6 = piVar6 + 10;\n        if (param_2 + iVar2 * 10 <= piVar6) break;\n        iVar1 = *piVar6;\n      }\n    }\n    if (iVar5 == 0) break;\n    sVar3 = strlen(param_3);\n    sVar3 = sVar3 + 1;\n    __haystacklen = param_5 - (iVar5 + sVar3);\n    pvVar4 = (void *)((int)param_4 + iVar5 + sVar3);\nLAB_000c846f:\n    pvVar4 = memmem(pvVar4,__haystacklen,param_3,sVar3);\n    if (pvVar4 == (void *)0x0) {\n      return (int *)0x0;\n    }\n    iVar5 = (int)pvVar4 - (int)param_4;\n    param_6 = param_2;\n    if (iVar5 == 0) {\n      return param_2;\n    }\n  }\n  return (int *)0x0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "size_t sVar3;" primitive_type identifier ;) (declaration "void *pvVar4;" primitive_type (pointer_declarator "*pvVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "size_t __haystacklen;" primitive_type identifier ;) (declaration "int *piVar6;" primitive_type (pointer_declarator "*piVar6" * identifier) ;) (expression_statement "iVar2 = *(int *)(param_1 + 0x28);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x28)" identifier = (pointer_expression "*(int *)(param_1 + 0x28)" * (cast_expression "(int *)(param_1 + 0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) ))))) ;) (if_statement "if (param_6 == (int *)0x0) {\n    sVar3 = strlen(param_3);\n    sVar3 = sVar3 + 1;\n    __haystacklen = param_5;\n    pvVar4 = param_4;\n    goto LAB_000c846f;\n  }" if (parenthesized_expression "(param_6 == (int *)0x0)" ( (binary_expression "param_6 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    sVar3 = strlen(param_3);\n    sVar3 = sVar3 + 1;\n    __haystacklen = param_5;\n    pvVar4 = param_4;\n    goto LAB_000c846f;\n  }" { (expression_statement "sVar3 = strlen(param_3);" (assignment_expression "sVar3 = strlen(param_3)" identifier = (call_expression "strlen(param_3)" identifier (argument_list "(param_3)" ( identifier )))) ;) (expression_statement "sVar3 = sVar3 + 1;" (assignment_expression "sVar3 = sVar3 + 1" identifier = (binary_expression "sVar3 + 1" identifier + number_literal)) ;) (expression_statement "__haystacklen = param_5;" (assignment_expression "__haystacklen = param_5" identifier = identifier) ;) (expression_statement "pvVar4 = param_4;" (assignment_expression "pvVar4 = param_4" identifier = identifier) ;) (goto_statement "goto LAB_000c846f;" goto statement_identifier ;) })) (expression_statement "iVar5 = *param_6;" (assignment_expression "iVar5 = *param_6" identifier = (pointer_expression "*param_6" * identifier)) ;) (while_statement "while( true ) {\n    piVar6 = param_6 + 10;\n    if (piVar6 < param_2 + iVar2 * 10) {\n      iVar1 = param_6[10];\n      while( true ) {\n        if (iVar5 == iVar1) {\n          return piVar6;\n        }\n        piVar6 = piVar6 + 10;\n        if (param_2 + iVar2 * 10 <= piVar6) break;\n        iVar1 = *piVar6;\n      }\n    }\n    if (iVar5 == 0) break;\n    sVar3 = strlen(param_3);\n    sVar3 = sVar3 + 1;\n    __haystacklen = param_5 - (iVar5 + sVar3);\n    pvVar4 = (void *)((int)param_4 + iVar5 + sVar3);\nLAB_000c846f:\n    pvVar4 = memmem(pvVar4,__haystacklen,param_3,sVar3);\n    if (pvVar4 == (void *)0x0) {\n      return (int *)0x0;\n    }\n    iVar5 = (int)pvVar4 - (int)param_4;\n    param_6 = param_2;\n    if (iVar5 == 0) {\n      return param_2;\n    }\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    piVar6 = param_6 + 10;\n    if (piVar6 < param_2 + iVar2 * 10) {\n      iVar1 = param_6[10];\n      while( true ) {\n        if (iVar5 == iVar1) {\n          return piVar6;\n        }\n        piVar6 = piVar6 + 10;\n        if (param_2 + iVar2 * 10 <= piVar6) break;\n        iVar1 = *piVar6;\n      }\n    }\n    if (iVar5 == 0) break;\n    sVar3 = strlen(param_3);\n    sVar3 = sVar3 + 1;\n    __haystacklen = param_5 - (iVar5 + sVar3);\n    pvVar4 = (void *)((int)param_4 + iVar5 + sVar3);\nLAB_000c846f:\n    pvVar4 = memmem(pvVar4,__haystacklen,param_3,sVar3);\n    if (pvVar4 == (void *)0x0) {\n      return (int *)0x0;\n    }\n    iVar5 = (int)pvVar4 - (int)param_4;\n    param_6 = param_2;\n    if (iVar5 == 0) {\n      return param_2;\n    }\n  }" { (expression_statement "piVar6 = param_6 + 10;" (assignment_expression "piVar6 = param_6 + 10" identifier = (binary_expression "param_6 + 10" identifier + number_literal)) ;) (if_statement "if (piVar6 < param_2 + iVar2 * 10) {\n      iVar1 = param_6[10];\n      while( true ) {\n        if (iVar5 == iVar1) {\n          return piVar6;\n        }\n        piVar6 = piVar6 + 10;\n        if (param_2 + iVar2 * 10 <= piVar6) break;\n        iVar1 = *piVar6;\n      }\n    }" if (parenthesized_expression "(piVar6 < param_2 + iVar2 * 10)" ( (binary_expression "piVar6 < param_2 + iVar2 * 10" identifier < (binary_expression "param_2 + iVar2 * 10" identifier + (binary_expression "iVar2 * 10" identifier * number_literal))) )) (compound_statement "{\n      iVar1 = param_6[10];\n      while( true ) {\n        if (iVar5 == iVar1) {\n          return piVar6;\n        }\n        piVar6 = piVar6 + 10;\n        if (param_2 + iVar2 * 10 <= piVar6) break;\n        iVar1 = *piVar6;\n      }\n    }" { (expression_statement "iVar1 = param_6[10];" (assignment_expression "iVar1 = param_6[10]" identifier = (subscript_expression "param_6[10]" identifier [ number_literal ])) ;) (while_statement "while( true ) {\n        if (iVar5 == iVar1) {\n          return piVar6;\n        }\n        piVar6 = piVar6 + 10;\n        if (param_2 + iVar2 * 10 <= piVar6) break;\n        iVar1 = *piVar6;\n      }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n        if (iVar5 == iVar1) {\n          return piVar6;\n        }\n        piVar6 = piVar6 + 10;\n        if (param_2 + iVar2 * 10 <= piVar6) break;\n        iVar1 = *piVar6;\n      }" { (if_statement "if (iVar5 == iVar1) {\n          return piVar6;\n        }" if (parenthesized_expression "(iVar5 == iVar1)" ( (binary_expression "iVar5 == iVar1" identifier == identifier) )) (compound_statement "{\n          return piVar6;\n        }" { (return_statement "return piVar6;" return identifier ;) })) (expression_statement "piVar6 = piVar6 + 10;" (assignment_expression "piVar6 = piVar6 + 10" identifier = (binary_expression "piVar6 + 10" identifier + number_literal)) ;) (if_statement "if (param_2 + iVar2 * 10 <= piVar6) break;" if (parenthesized_expression "(param_2 + iVar2 * 10 <= piVar6)" ( (binary_expression "param_2 + iVar2 * 10 <= piVar6" (binary_expression "param_2 + iVar2 * 10" identifier + (binary_expression "iVar2 * 10" identifier * number_literal)) <= identifier) )) (break_statement "break;" break ;)) (expression_statement "iVar1 = *piVar6;" (assignment_expression "iVar1 = *piVar6" identifier = (pointer_expression "*piVar6" * identifier)) ;) })) })) (if_statement "if (iVar5 == 0) break;" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "sVar3 = strlen(param_3);" (assignment_expression "sVar3 = strlen(param_3)" identifier = (call_expression "strlen(param_3)" identifier (argument_list "(param_3)" ( identifier )))) ;) (expression_statement "sVar3 = sVar3 + 1;" (assignment_expression "sVar3 = sVar3 + 1" identifier = (binary_expression "sVar3 + 1" identifier + number_literal)) ;) (expression_statement "__haystacklen = param_5 - (iVar5 + sVar3);" (assignment_expression "__haystacklen = param_5 - (iVar5 + sVar3)" identifier = (binary_expression "param_5 - (iVar5 + sVar3)" identifier - (parenthesized_expression "(iVar5 + sVar3)" ( (binary_expression "iVar5 + sVar3" identifier + identifier) )))) ;) (expression_statement "pvVar4 = (void *)((int)param_4 + iVar5 + sVar3);" (assignment_expression "pvVar4 = (void *)((int)param_4 + iVar5 + sVar3)" identifier = (cast_expression "(void *)((int)param_4 + iVar5 + sVar3)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_4 + iVar5 + sVar3)" ( (binary_expression "(int)param_4 + iVar5 + sVar3" (binary_expression "(int)param_4 + iVar5" (cast_expression "(int)param_4" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) + identifier) )))) ;) (labeled_statement "LAB_000c846f:\n    pvVar4 = memmem(pvVar4,__haystacklen,param_3,sVar3);" statement_identifier : (expression_statement "pvVar4 = memmem(pvVar4,__haystacklen,param_3,sVar3);" (assignment_expression "pvVar4 = memmem(pvVar4,__haystacklen,param_3,sVar3)" identifier = (call_expression "memmem(pvVar4,__haystacklen,param_3,sVar3)" identifier (argument_list "(pvVar4,__haystacklen,param_3,sVar3)" ( identifier , identifier , identifier , identifier )))) ;)) (if_statement "if (pvVar4 == (void *)0x0) {\n      return (int *)0x0;\n    }" if (parenthesized_expression "(pvVar4 == (void *)0x0)" ( (binary_expression "pvVar4 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return (int *)0x0;\n    }" { (return_statement "return (int *)0x0;" return (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "iVar5 = (int)pvVar4 - (int)param_4;" (assignment_expression "iVar5 = (int)pvVar4 - (int)param_4" identifier = (binary_expression "(int)pvVar4 - (int)param_4" (cast_expression "(int)pvVar4" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)param_4" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (expression_statement "param_6 = param_2;" (assignment_expression "param_6 = param_2" identifier = identifier) ;) (if_statement "if (iVar5 == 0) {\n      return param_2;\n    }" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (compound_statement "{\n      return param_2;\n    }" { (return_statement "return param_2;" return identifier ;) })) })) (return_statement "return (int *)0x0;" return (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* DWARF original name: find_shdr<32, false>\n   DWARF original prototype: uchar * find_shdr<32,_false>(Object * this, uchar * pshdrs, char *\n   name, char * names, section_size_type names_size, uchar * hdr) */\n\nuchar * __thiscall\ngold::Object::find_shdr<32,_false>\n          (Object *this,uchar *pshdrs,char *name,char *names,section_size_type names_size,uchar *hdr\n          )\n\n{\n  int iVar1;\n  uint uVar2;\n  size_t sVar3;\n  void *pvVar4;\n  int iVar5;\n  size_t __haystacklen;\n  int *piVar6;\n  char *__haystack;\n  \n  uVar2 = this->shnum_;\n  if (hdr == (uchar *)0x0) {\n    sVar3 = strlen(name);\n    sVar3 = sVar3 + 1;\n    __haystacklen = names_size;\n    __haystack = names;\n    goto LAB_000c846f;\n  }\n  iVar5 = *(int *)hdr;\n  while( true ) {\n    piVar6 = (int *)(hdr + 0x28);\n    if (piVar6 < pshdrs + uVar2 * 0x28) {\n      iVar1 = *(int *)(hdr + 0x28);\n      while( true ) {\n        if (iVar5 == iVar1) {\n          return (uchar *)piVar6;\n        }\n        piVar6 = piVar6 + 10;\n        if (pshdrs + uVar2 * 0x28 <= piVar6) break;\n        iVar1 = *piVar6;\n      }\n    }\n    if (iVar5 == 0) break;\n    sVar3 = strlen(name);\n    sVar3 = sVar3 + 1;\n    __haystacklen = names_size - (iVar5 + sVar3);\n    __haystack = names + iVar5 + sVar3;\nLAB_000c846f:\n    pvVar4 = memmem(__haystack,__haystacklen,name,sVar3);\n    if (pvVar4 == (void *)0x0) {\n      return (uchar *)0x0;\n    }\n    iVar5 = (int)pvVar4 - (int)names;\n    hdr = pshdrs;\n    if (iVar5 == 0) {\n      return pshdrs;\n    }\n  }\n  return (uchar *)0x0;\n}\n\n" comment comment (ERROR "uchar * __thiscall\ngold::Object::find_shdr<32,_false>\n          (Object *this,uchar *pshdrs,char *name,char *names,section_size_type names_size,uchar *hdr\n          )" (binary_expression "uchar * __thiscall\ngold::Object::find_shdr<32,_false>\n          (Object *this,uchar *pshdrs,char *name,char *names,section_size_type names_size,uchar *hdr\n          )" (binary_expression "uchar * __thiscall\ngold::Object::find_shdr<32" (binary_expression "uchar * __thiscall" identifier * identifier) (ERROR "gold::Object::find_shdr" identifier : : identifier : : identifier) < number_literal) (ERROR ",_false" , identifier) > (parenthesized_expression "(Object *this,uchar *pshdrs,char *name,char *names,section_size_type names_size,uchar *hdr\n          )" ( (comma_expression "Object *this,uchar *pshdrs,char *name,char *names,section_size_type names_size,uchar *hdr" (binary_expression "Object *this" identifier * identifier) , (comma_expression "uchar *pshdrs,char *name,char *names,section_size_type names_size,uchar *hdr" (binary_expression "uchar *pshdrs" identifier * identifier) , (comma_expression "char *name,char *names,section_size_type names_size,uchar *hdr" (binary_expression "char *name" identifier * identifier) , (comma_expression "char *names,section_size_type names_size,uchar *hdr" (binary_expression "char *names" identifier * identifier) , (comma_expression "section_size_type names_size,uchar *hdr" identifier (ERROR "names_size" identifier) , (binary_expression "uchar *hdr" identifier * identifier)))))) )))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  size_t sVar3;\n  void *pvVar4;\n  int iVar5;\n  size_t __haystacklen;\n  int *piVar6;\n  char *__haystack;\n  \n  uVar2 = this->shnum_;\n  if (hdr == (uchar *)0x0) {\n    sVar3 = strlen(name);\n    sVar3 = sVar3 + 1;\n    __haystacklen = names_size;\n    __haystack = names;\n    goto LAB_000c846f;\n  }\n  iVar5 = *(int *)hdr;\n  while( true ) {\n    piVar6 = (int *)(hdr + 0x28);\n    if (piVar6 < pshdrs + uVar2 * 0x28) {\n      iVar1 = *(int *)(hdr + 0x28);\n      while( true ) {\n        if (iVar5 == iVar1) {\n          return (uchar *)piVar6;\n        }\n        piVar6 = piVar6 + 10;\n        if (pshdrs + uVar2 * 0x28 <= piVar6) break;\n        iVar1 = *piVar6;\n      }\n    }\n    if (iVar5 == 0) break;\n    sVar3 = strlen(name);\n    sVar3 = sVar3 + 1;\n    __haystacklen = names_size - (iVar5 + sVar3);\n    __haystack = names + iVar5 + sVar3;\nLAB_000c846f:\n    pvVar4 = memmem(__haystack,__haystacklen,name,sVar3);\n    if (pvVar4 == (void *)0x0) {\n      return (uchar *)0x0;\n    }\n    iVar5 = (int)pvVar4 - (int)names;\n    hdr = pshdrs;\n    if (iVar5 == 0) {\n      return pshdrs;\n    }\n  }\n  return (uchar *)0x0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "size_t sVar3;" primitive_type identifier ;) (declaration "void *pvVar4;" primitive_type (pointer_declarator "*pvVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "size_t __haystacklen;" primitive_type identifier ;) (declaration "int *piVar6;" primitive_type (pointer_declarator "*piVar6" * identifier) ;) (declaration "char *__haystack;" primitive_type (pointer_declarator "*__haystack" * identifier) ;) (expression_statement "uVar2 = this->shnum_;" (assignment_expression "uVar2 = this->shnum_" identifier = (field_expression "this->shnum_" identifier -> field_identifier)) ;) (if_statement "if (hdr == (uchar *)0x0) {\n    sVar3 = strlen(name);\n    sVar3 = sVar3 + 1;\n    __haystacklen = names_size;\n    __haystack = names;\n    goto LAB_000c846f;\n  }" if (parenthesized_expression "(hdr == (uchar *)0x0)" ( (binary_expression "hdr == (uchar *)0x0" identifier == (cast_expression "(uchar *)0x0" ( (type_descriptor "uchar *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    sVar3 = strlen(name);\n    sVar3 = sVar3 + 1;\n    __haystacklen = names_size;\n    __haystack = names;\n    goto LAB_000c846f;\n  }" { (expression_statement "sVar3 = strlen(name);" (assignment_expression "sVar3 = strlen(name)" identifier = (call_expression "strlen(name)" identifier (argument_list "(name)" ( identifier )))) ;) (expression_statement "sVar3 = sVar3 + 1;" (assignment_expression "sVar3 = sVar3 + 1" identifier = (binary_expression "sVar3 + 1" identifier + number_literal)) ;) (expression_statement "__haystacklen = names_size;" (assignment_expression "__haystacklen = names_size" identifier = identifier) ;) (expression_statement "__haystack = names;" (assignment_expression "__haystack = names" identifier = identifier) ;) (goto_statement "goto LAB_000c846f;" goto statement_identifier ;) })) (expression_statement "iVar5 = *(int *)hdr;" (assignment_expression "iVar5 = *(int *)hdr" identifier = (pointer_expression "*(int *)hdr" * (cast_expression "(int *)hdr" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (while_statement "while( true ) {\n    piVar6 = (int *)(hdr + 0x28);\n    if (piVar6 < pshdrs + uVar2 * 0x28) {\n      iVar1 = *(int *)(hdr + 0x28);\n      while( true ) {\n        if (iVar5 == iVar1) {\n          return (uchar *)piVar6;\n        }\n        piVar6 = piVar6 + 10;\n        if (pshdrs + uVar2 * 0x28 <= piVar6) break;\n        iVar1 = *piVar6;\n      }\n    }\n    if (iVar5 == 0) break;\n    sVar3 = strlen(name);\n    sVar3 = sVar3 + 1;\n    __haystacklen = names_size - (iVar5 + sVar3);\n    __haystack = names + iVar5 + sVar3;\nLAB_000c846f:\n    pvVar4 = memmem(__haystack,__haystacklen,name,sVar3);\n    if (pvVar4 == (void *)0x0) {\n      return (uchar *)0x0;\n    }\n    iVar5 = (int)pvVar4 - (int)names;\n    hdr = pshdrs;\n    if (iVar5 == 0) {\n      return pshdrs;\n    }\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    piVar6 = (int *)(hdr + 0x28);\n    if (piVar6 < pshdrs + uVar2 * 0x28) {\n      iVar1 = *(int *)(hdr + 0x28);\n      while( true ) {\n        if (iVar5 == iVar1) {\n          return (uchar *)piVar6;\n        }\n        piVar6 = piVar6 + 10;\n        if (pshdrs + uVar2 * 0x28 <= piVar6) break;\n        iVar1 = *piVar6;\n      }\n    }\n    if (iVar5 == 0) break;\n    sVar3 = strlen(name);\n    sVar3 = sVar3 + 1;\n    __haystacklen = names_size - (iVar5 + sVar3);\n    __haystack = names + iVar5 + sVar3;\nLAB_000c846f:\n    pvVar4 = memmem(__haystack,__haystacklen,name,sVar3);\n    if (pvVar4 == (void *)0x0) {\n      return (uchar *)0x0;\n    }\n    iVar5 = (int)pvVar4 - (int)names;\n    hdr = pshdrs;\n    if (iVar5 == 0) {\n      return pshdrs;\n    }\n  }" { (expression_statement "piVar6 = (int *)(hdr + 0x28);" (assignment_expression "piVar6 = (int *)(hdr + 0x28)" identifier = (cast_expression "(int *)(hdr + 0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(hdr + 0x28)" ( (binary_expression "hdr + 0x28" identifier + number_literal) )))) ;) (if_statement "if (piVar6 < pshdrs + uVar2 * 0x28) {\n      iVar1 = *(int *)(hdr + 0x28);\n      while( true ) {\n        if (iVar5 == iVar1) {\n          return (uchar *)piVar6;\n        }\n        piVar6 = piVar6 + 10;\n        if (pshdrs + uVar2 * 0x28 <= piVar6) break;\n        iVar1 = *piVar6;\n      }\n    }" if (parenthesized_expression "(piVar6 < pshdrs + uVar2 * 0x28)" ( (binary_expression "piVar6 < pshdrs + uVar2 * 0x28" identifier < (binary_expression "pshdrs + uVar2 * 0x28" identifier + (binary_expression "uVar2 * 0x28" identifier * number_literal))) )) (compound_statement "{\n      iVar1 = *(int *)(hdr + 0x28);\n      while( true ) {\n        if (iVar5 == iVar1) {\n          return (uchar *)piVar6;\n        }\n        piVar6 = piVar6 + 10;\n        if (pshdrs + uVar2 * 0x28 <= piVar6) break;\n        iVar1 = *piVar6;\n      }\n    }" { (expression_statement "iVar1 = *(int *)(hdr + 0x28);" (assignment_expression "iVar1 = *(int *)(hdr + 0x28)" identifier = (pointer_expression "*(int *)(hdr + 0x28)" * (cast_expression "(int *)(hdr + 0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(hdr + 0x28)" ( (binary_expression "hdr + 0x28" identifier + number_literal) ))))) ;) (while_statement "while( true ) {\n        if (iVar5 == iVar1) {\n          return (uchar *)piVar6;\n        }\n        piVar6 = piVar6 + 10;\n        if (pshdrs + uVar2 * 0x28 <= piVar6) break;\n        iVar1 = *piVar6;\n      }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n        if (iVar5 == iVar1) {\n          return (uchar *)piVar6;\n        }\n        piVar6 = piVar6 + 10;\n        if (pshdrs + uVar2 * 0x28 <= piVar6) break;\n        iVar1 = *piVar6;\n      }" { (if_statement "if (iVar5 == iVar1) {\n          return (uchar *)piVar6;\n        }" if (parenthesized_expression "(iVar5 == iVar1)" ( (binary_expression "iVar5 == iVar1" identifier == identifier) )) (compound_statement "{\n          return (uchar *)piVar6;\n        }" { (return_statement "return (uchar *)piVar6;" return (cast_expression "(uchar *)piVar6" ( (type_descriptor "uchar *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) ;) })) (expression_statement "piVar6 = piVar6 + 10;" (assignment_expression "piVar6 = piVar6 + 10" identifier = (binary_expression "piVar6 + 10" identifier + number_literal)) ;) (if_statement "if (pshdrs + uVar2 * 0x28 <= piVar6) break;" if (parenthesized_expression "(pshdrs + uVar2 * 0x28 <= piVar6)" ( (binary_expression "pshdrs + uVar2 * 0x28 <= piVar6" (binary_expression "pshdrs + uVar2 * 0x28" identifier + (binary_expression "uVar2 * 0x28" identifier * number_literal)) <= identifier) )) (break_statement "break;" break ;)) (expression_statement "iVar1 = *piVar6;" (assignment_expression "iVar1 = *piVar6" identifier = (pointer_expression "*piVar6" * identifier)) ;) })) })) (if_statement "if (iVar5 == 0) break;" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "sVar3 = strlen(name);" (assignment_expression "sVar3 = strlen(name)" identifier = (call_expression "strlen(name)" identifier (argument_list "(name)" ( identifier )))) ;) (expression_statement "sVar3 = sVar3 + 1;" (assignment_expression "sVar3 = sVar3 + 1" identifier = (binary_expression "sVar3 + 1" identifier + number_literal)) ;) (expression_statement "__haystacklen = names_size - (iVar5 + sVar3);" (assignment_expression "__haystacklen = names_size - (iVar5 + sVar3)" identifier = (binary_expression "names_size - (iVar5 + sVar3)" identifier - (parenthesized_expression "(iVar5 + sVar3)" ( (binary_expression "iVar5 + sVar3" identifier + identifier) )))) ;) (expression_statement "__haystack = names + iVar5 + sVar3;" (assignment_expression "__haystack = names + iVar5 + sVar3" identifier = (binary_expression "names + iVar5 + sVar3" (binary_expression "names + iVar5" identifier + identifier) + identifier)) ;) (labeled_statement "LAB_000c846f:\n    pvVar4 = memmem(__haystack,__haystacklen,name,sVar3);" statement_identifier : (expression_statement "pvVar4 = memmem(__haystack,__haystacklen,name,sVar3);" (assignment_expression "pvVar4 = memmem(__haystack,__haystacklen,name,sVar3)" identifier = (call_expression "memmem(__haystack,__haystacklen,name,sVar3)" identifier (argument_list "(__haystack,__haystacklen,name,sVar3)" ( identifier , identifier , identifier , identifier )))) ;)) (if_statement "if (pvVar4 == (void *)0x0) {\n      return (uchar *)0x0;\n    }" if (parenthesized_expression "(pvVar4 == (void *)0x0)" ( (binary_expression "pvVar4 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return (uchar *)0x0;\n    }" { (return_statement "return (uchar *)0x0;" return (cast_expression "(uchar *)0x0" ( (type_descriptor "uchar *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "iVar5 = (int)pvVar4 - (int)names;" (assignment_expression "iVar5 = (int)pvVar4 - (int)names" identifier = (binary_expression "(int)pvVar4 - (int)names" (cast_expression "(int)pvVar4" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)names" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (expression_statement "hdr = pshdrs;" (assignment_expression "hdr = pshdrs" identifier = identifier) ;) (if_statement "if (iVar5 == 0) {\n      return pshdrs;\n    }" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (compound_statement "{\n      return pshdrs;\n    }" { (return_statement "return pshdrs;" return identifier ;) })) })) (return_statement "return (uchar *)0x0;" return (cast_expression "(uchar *)0x0" ( (type_descriptor "uchar *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) }))
(translation_unit "int * FUN_000c8400(int param_1,int *param_2,char *param_3,void *param_4,size_t param_5,int *param_6)\n\n{\n  int iVar1;\n  int iVar2;\n  size_t sVar3;\n  void *pvVar4;\n  int iVar5;\n  size_t __haystacklen;\n  int *piVar6;\n  \n  iVar2 = *(int *)(param_1 + 0x28);\n  if (param_6 == (int *)0x0) {\n    sVar3 = strlen(param_3);\n    sVar3 = sVar3 + 1;\n    __haystacklen = param_5;\n    pvVar4 = param_4;\n    goto LAB_000c846f;\n  }\n  iVar5 = *param_6;\n  while( true ) {\n    piVar6 = param_6 + 10;\n    if (piVar6 < param_2 + iVar2 * 10) {\n      iVar1 = param_6[10];\n      while( true ) {\n        if (iVar5 == iVar1) {\n          return piVar6;\n        }\n        piVar6 = piVar6 + 10;\n        if (param_2 + iVar2 * 10 <= piVar6) break;\n        iVar1 = *piVar6;\n      }\n    }\n    if (iVar5 == 0) break;\n    sVar3 = strlen(param_3);\n    sVar3 = sVar3 + 1;\n    __haystacklen = param_5 - (iVar5 + sVar3);\n    pvVar4 = (void *)((int)param_4 + iVar5 + sVar3);\nLAB_000c846f:\n    pvVar4 = memmem(pvVar4,__haystacklen,param_3,sVar3);\n    if (pvVar4 == (void *)0x0) {\n      return (int *)0x0;\n    }\n    iVar5 = (int)pvVar4 - (int)param_4;\n    param_6 = param_2;\n    if (iVar5 == 0) {\n      return param_2;\n    }\n  }\n  return (int *)0x0;\n}\n\n" (function_definition "int * FUN_000c8400(int param_1,int *param_2,char *param_3,void *param_4,size_t param_5,int *param_6)\n\n{\n  int iVar1;\n  int iVar2;\n  size_t sVar3;\n  void *pvVar4;\n  int iVar5;\n  size_t __haystacklen;\n  int *piVar6;\n  \n  iVar2 = *(int *)(param_1 + 0x28);\n  if (param_6 == (int *)0x0) {\n    sVar3 = strlen(param_3);\n    sVar3 = sVar3 + 1;\n    __haystacklen = param_5;\n    pvVar4 = param_4;\n    goto LAB_000c846f;\n  }\n  iVar5 = *param_6;\n  while( true ) {\n    piVar6 = param_6 + 10;\n    if (piVar6 < param_2 + iVar2 * 10) {\n      iVar1 = param_6[10];\n      while( true ) {\n        if (iVar5 == iVar1) {\n          return piVar6;\n        }\n        piVar6 = piVar6 + 10;\n        if (param_2 + iVar2 * 10 <= piVar6) break;\n        iVar1 = *piVar6;\n      }\n    }\n    if (iVar5 == 0) break;\n    sVar3 = strlen(param_3);\n    sVar3 = sVar3 + 1;\n    __haystacklen = param_5 - (iVar5 + sVar3);\n    pvVar4 = (void *)((int)param_4 + iVar5 + sVar3);\nLAB_000c846f:\n    pvVar4 = memmem(pvVar4,__haystacklen,param_3,sVar3);\n    if (pvVar4 == (void *)0x0) {\n      return (int *)0x0;\n    }\n    iVar5 = (int)pvVar4 - (int)param_4;\n    param_6 = param_2;\n    if (iVar5 == 0) {\n      return param_2;\n    }\n  }\n  return (int *)0x0;\n}" primitive_type (pointer_declarator "* FUN_000c8400(int param_1,int *param_2,char *param_3,void *param_4,size_t param_5,int *param_6)" * (function_declarator "FUN_000c8400(int param_1,int *param_2,char *param_3,void *param_4,size_t param_5,int *param_6)" identifier (parameter_list "(int param_1,int *param_2,char *param_3,void *param_4,size_t param_5,int *param_6)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "char *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "void *param_4" primitive_type (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "size_t param_5" primitive_type identifier) , (parameter_declaration "int *param_6" primitive_type (pointer_declarator "*param_6" * identifier)) )))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  size_t sVar3;\n  void *pvVar4;\n  int iVar5;\n  size_t __haystacklen;\n  int *piVar6;\n  \n  iVar2 = *(int *)(param_1 + 0x28);\n  if (param_6 == (int *)0x0) {\n    sVar3 = strlen(param_3);\n    sVar3 = sVar3 + 1;\n    __haystacklen = param_5;\n    pvVar4 = param_4;\n    goto LAB_000c846f;\n  }\n  iVar5 = *param_6;\n  while( true ) {\n    piVar6 = param_6 + 10;\n    if (piVar6 < param_2 + iVar2 * 10) {\n      iVar1 = param_6[10];\n      while( true ) {\n        if (iVar5 == iVar1) {\n          return piVar6;\n        }\n        piVar6 = piVar6 + 10;\n        if (param_2 + iVar2 * 10 <= piVar6) break;\n        iVar1 = *piVar6;\n      }\n    }\n    if (iVar5 == 0) break;\n    sVar3 = strlen(param_3);\n    sVar3 = sVar3 + 1;\n    __haystacklen = param_5 - (iVar5 + sVar3);\n    pvVar4 = (void *)((int)param_4 + iVar5 + sVar3);\nLAB_000c846f:\n    pvVar4 = memmem(pvVar4,__haystacklen,param_3,sVar3);\n    if (pvVar4 == (void *)0x0) {\n      return (int *)0x0;\n    }\n    iVar5 = (int)pvVar4 - (int)param_4;\n    param_6 = param_2;\n    if (iVar5 == 0) {\n      return param_2;\n    }\n  }\n  return (int *)0x0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "size_t sVar3;" primitive_type identifier ;) (declaration "void *pvVar4;" primitive_type (pointer_declarator "*pvVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "size_t __haystacklen;" primitive_type identifier ;) (declaration "int *piVar6;" primitive_type (pointer_declarator "*piVar6" * identifier) ;) (expression_statement "iVar2 = *(int *)(param_1 + 0x28);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x28)" identifier = (pointer_expression "*(int *)(param_1 + 0x28)" * (cast_expression "(int *)(param_1 + 0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) ))))) ;) (if_statement "if (param_6 == (int *)0x0) {\n    sVar3 = strlen(param_3);\n    sVar3 = sVar3 + 1;\n    __haystacklen = param_5;\n    pvVar4 = param_4;\n    goto LAB_000c846f;\n  }" if (parenthesized_expression "(param_6 == (int *)0x0)" ( (binary_expression "param_6 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    sVar3 = strlen(param_3);\n    sVar3 = sVar3 + 1;\n    __haystacklen = param_5;\n    pvVar4 = param_4;\n    goto LAB_000c846f;\n  }" { (expression_statement "sVar3 = strlen(param_3);" (assignment_expression "sVar3 = strlen(param_3)" identifier = (call_expression "strlen(param_3)" identifier (argument_list "(param_3)" ( identifier )))) ;) (expression_statement "sVar3 = sVar3 + 1;" (assignment_expression "sVar3 = sVar3 + 1" identifier = (binary_expression "sVar3 + 1" identifier + number_literal)) ;) (expression_statement "__haystacklen = param_5;" (assignment_expression "__haystacklen = param_5" identifier = identifier) ;) (expression_statement "pvVar4 = param_4;" (assignment_expression "pvVar4 = param_4" identifier = identifier) ;) (goto_statement "goto LAB_000c846f;" goto statement_identifier ;) })) (expression_statement "iVar5 = *param_6;" (assignment_expression "iVar5 = *param_6" identifier = (pointer_expression "*param_6" * identifier)) ;) (while_statement "while( true ) {\n    piVar6 = param_6 + 10;\n    if (piVar6 < param_2 + iVar2 * 10) {\n      iVar1 = param_6[10];\n      while( true ) {\n        if (iVar5 == iVar1) {\n          return piVar6;\n        }\n        piVar6 = piVar6 + 10;\n        if (param_2 + iVar2 * 10 <= piVar6) break;\n        iVar1 = *piVar6;\n      }\n    }\n    if (iVar5 == 0) break;\n    sVar3 = strlen(param_3);\n    sVar3 = sVar3 + 1;\n    __haystacklen = param_5 - (iVar5 + sVar3);\n    pvVar4 = (void *)((int)param_4 + iVar5 + sVar3);\nLAB_000c846f:\n    pvVar4 = memmem(pvVar4,__haystacklen,param_3,sVar3);\n    if (pvVar4 == (void *)0x0) {\n      return (int *)0x0;\n    }\n    iVar5 = (int)pvVar4 - (int)param_4;\n    param_6 = param_2;\n    if (iVar5 == 0) {\n      return param_2;\n    }\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    piVar6 = param_6 + 10;\n    if (piVar6 < param_2 + iVar2 * 10) {\n      iVar1 = param_6[10];\n      while( true ) {\n        if (iVar5 == iVar1) {\n          return piVar6;\n        }\n        piVar6 = piVar6 + 10;\n        if (param_2 + iVar2 * 10 <= piVar6) break;\n        iVar1 = *piVar6;\n      }\n    }\n    if (iVar5 == 0) break;\n    sVar3 = strlen(param_3);\n    sVar3 = sVar3 + 1;\n    __haystacklen = param_5 - (iVar5 + sVar3);\n    pvVar4 = (void *)((int)param_4 + iVar5 + sVar3);\nLAB_000c846f:\n    pvVar4 = memmem(pvVar4,__haystacklen,param_3,sVar3);\n    if (pvVar4 == (void *)0x0) {\n      return (int *)0x0;\n    }\n    iVar5 = (int)pvVar4 - (int)param_4;\n    param_6 = param_2;\n    if (iVar5 == 0) {\n      return param_2;\n    }\n  }" { (expression_statement "piVar6 = param_6 + 10;" (assignment_expression "piVar6 = param_6 + 10" identifier = (binary_expression "param_6 + 10" identifier + number_literal)) ;) (if_statement "if (piVar6 < param_2 + iVar2 * 10) {\n      iVar1 = param_6[10];\n      while( true ) {\n        if (iVar5 == iVar1) {\n          return piVar6;\n        }\n        piVar6 = piVar6 + 10;\n        if (param_2 + iVar2 * 10 <= piVar6) break;\n        iVar1 = *piVar6;\n      }\n    }" if (parenthesized_expression "(piVar6 < param_2 + iVar2 * 10)" ( (binary_expression "piVar6 < param_2 + iVar2 * 10" identifier < (binary_expression "param_2 + iVar2 * 10" identifier + (binary_expression "iVar2 * 10" identifier * number_literal))) )) (compound_statement "{\n      iVar1 = param_6[10];\n      while( true ) {\n        if (iVar5 == iVar1) {\n          return piVar6;\n        }\n        piVar6 = piVar6 + 10;\n        if (param_2 + iVar2 * 10 <= piVar6) break;\n        iVar1 = *piVar6;\n      }\n    }" { (expression_statement "iVar1 = param_6[10];" (assignment_expression "iVar1 = param_6[10]" identifier = (subscript_expression "param_6[10]" identifier [ number_literal ])) ;) (while_statement "while( true ) {\n        if (iVar5 == iVar1) {\n          return piVar6;\n        }\n        piVar6 = piVar6 + 10;\n        if (param_2 + iVar2 * 10 <= piVar6) break;\n        iVar1 = *piVar6;\n      }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n        if (iVar5 == iVar1) {\n          return piVar6;\n        }\n        piVar6 = piVar6 + 10;\n        if (param_2 + iVar2 * 10 <= piVar6) break;\n        iVar1 = *piVar6;\n      }" { (if_statement "if (iVar5 == iVar1) {\n          return piVar6;\n        }" if (parenthesized_expression "(iVar5 == iVar1)" ( (binary_expression "iVar5 == iVar1" identifier == identifier) )) (compound_statement "{\n          return piVar6;\n        }" { (return_statement "return piVar6;" return identifier ;) })) (expression_statement "piVar6 = piVar6 + 10;" (assignment_expression "piVar6 = piVar6 + 10" identifier = (binary_expression "piVar6 + 10" identifier + number_literal)) ;) (if_statement "if (param_2 + iVar2 * 10 <= piVar6) break;" if (parenthesized_expression "(param_2 + iVar2 * 10 <= piVar6)" ( (binary_expression "param_2 + iVar2 * 10 <= piVar6" (binary_expression "param_2 + iVar2 * 10" identifier + (binary_expression "iVar2 * 10" identifier * number_literal)) <= identifier) )) (break_statement "break;" break ;)) (expression_statement "iVar1 = *piVar6;" (assignment_expression "iVar1 = *piVar6" identifier = (pointer_expression "*piVar6" * identifier)) ;) })) })) (if_statement "if (iVar5 == 0) break;" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "sVar3 = strlen(param_3);" (assignment_expression "sVar3 = strlen(param_3)" identifier = (call_expression "strlen(param_3)" identifier (argument_list "(param_3)" ( identifier )))) ;) (expression_statement "sVar3 = sVar3 + 1;" (assignment_expression "sVar3 = sVar3 + 1" identifier = (binary_expression "sVar3 + 1" identifier + number_literal)) ;) (expression_statement "__haystacklen = param_5 - (iVar5 + sVar3);" (assignment_expression "__haystacklen = param_5 - (iVar5 + sVar3)" identifier = (binary_expression "param_5 - (iVar5 + sVar3)" identifier - (parenthesized_expression "(iVar5 + sVar3)" ( (binary_expression "iVar5 + sVar3" identifier + identifier) )))) ;) (expression_statement "pvVar4 = (void *)((int)param_4 + iVar5 + sVar3);" (assignment_expression "pvVar4 = (void *)((int)param_4 + iVar5 + sVar3)" identifier = (cast_expression "(void *)((int)param_4 + iVar5 + sVar3)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_4 + iVar5 + sVar3)" ( (binary_expression "(int)param_4 + iVar5 + sVar3" (binary_expression "(int)param_4 + iVar5" (cast_expression "(int)param_4" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) + identifier) )))) ;) (labeled_statement "LAB_000c846f:\n    pvVar4 = memmem(pvVar4,__haystacklen,param_3,sVar3);" statement_identifier : (expression_statement "pvVar4 = memmem(pvVar4,__haystacklen,param_3,sVar3);" (assignment_expression "pvVar4 = memmem(pvVar4,__haystacklen,param_3,sVar3)" identifier = (call_expression "memmem(pvVar4,__haystacklen,param_3,sVar3)" identifier (argument_list "(pvVar4,__haystacklen,param_3,sVar3)" ( identifier , identifier , identifier , identifier )))) ;)) (if_statement "if (pvVar4 == (void *)0x0) {\n      return (int *)0x0;\n    }" if (parenthesized_expression "(pvVar4 == (void *)0x0)" ( (binary_expression "pvVar4 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return (int *)0x0;\n    }" { (return_statement "return (int *)0x0;" return (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "iVar5 = (int)pvVar4 - (int)param_4;" (assignment_expression "iVar5 = (int)pvVar4 - (int)param_4" identifier = (binary_expression "(int)pvVar4 - (int)param_4" (cast_expression "(int)pvVar4" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)param_4" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (expression_statement "param_6 = param_2;" (assignment_expression "param_6 = param_2" identifier = identifier) ;) (if_statement "if (iVar5 == 0) {\n      return param_2;\n    }" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (compound_statement "{\n      return param_2;\n    }" { (return_statement "return param_2;" return identifier ;) })) })) (return_statement "return (int *)0x0;" return (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) )))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < (binary_expression IDENT + (binary_expression IDENT * LIT))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT + (binary_expression IDENT * LIT)) <= IDENT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) })) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - (parenthesized_expression ( (binary_expression IDENT + IDENT) )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + IDENT) + IDENT) )))) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , IDENT )))) ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (return_statement return (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return IDENT ;) })) })) (return_statement return (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) ;) })))
(function_definition "int * FUN_000c8400(int param_1,int *param_2,char *param_3,void *param_4,size_t param_5,int *param_6)\n\n{\n  int iVar1;\n  int iVar2;\n  size_t sVar3;\n  void *pvVar4;\n  int iVar5;\n  size_t __haystacklen;\n  int *piVar6;\n  \n  iVar2 = *(int *)(param_1 + 0x28);\n  if (param_6 == (int *)0x0) {\n    sVar3 = strlen(param_3);\n    sVar3 = sVar3 + 1;\n    __haystacklen = param_5;\n    pvVar4 = param_4;\n    goto LAB_000c846f;\n  }\n  iVar5 = *param_6;\n  while( true ) {\n    piVar6 = param_6 + 10;\n    if (piVar6 < param_2 + iVar2 * 10) {\n      iVar1 = param_6[10];\n      while( true ) {\n        if (iVar5 == iVar1) {\n          return piVar6;\n        }\n        piVar6 = piVar6 + 10;\n        if (param_2 + iVar2 * 10 <= piVar6) break;\n        iVar1 = *piVar6;\n      }\n    }\n    if (iVar5 == 0) break;\n    sVar3 = strlen(param_3);\n    sVar3 = sVar3 + 1;\n    __haystacklen = param_5 - (iVar5 + sVar3);\n    pvVar4 = (void *)((int)param_4 + iVar5 + sVar3);\nLAB_000c846f:\n    pvVar4 = memmem(pvVar4,__haystacklen,param_3,sVar3);\n    if (pvVar4 == (void *)0x0) {\n      return (int *)0x0;\n    }\n    iVar5 = (int)pvVar4 - (int)param_4;\n    param_6 = param_2;\n    if (iVar5 == 0) {\n      return param_2;\n    }\n  }\n  return (int *)0x0;\n}" (primitive_type "int") (pointer_declarator "* FUN_000c8400(int param_1,int *param_2,char *param_3,void *param_4,size_t param_5,int *param_6)" (* "*") (function_declarator "FUN_000c8400(int param_1,int *param_2,char *param_3,void *param_4,size_t param_5,int *param_6)" (identifier "FUN_000c8400") (parameter_list "(int param_1,int *param_2,char *param_3,void *param_4,size_t param_5,int *param_6)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int *param_2" (primitive_type "int") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "char *param_3" (primitive_type "char") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) (, ",") (parameter_declaration "void *param_4" (primitive_type "void") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) (, ",") (parameter_declaration "size_t param_5" (primitive_type "size_t") (identifier "param_5")) (, ",") (parameter_declaration "int *param_6" (primitive_type "int") (pointer_declarator "*param_6" (* "*") (identifier "param_6"))) () ")")))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  size_t sVar3;\n  void *pvVar4;\n  int iVar5;\n  size_t __haystacklen;\n  int *piVar6;\n  \n  iVar2 = *(int *)(param_1 + 0x28);\n  if (param_6 == (int *)0x0) {\n    sVar3 = strlen(param_3);\n    sVar3 = sVar3 + 1;\n    __haystacklen = param_5;\n    pvVar4 = param_4;\n    goto LAB_000c846f;\n  }\n  iVar5 = *param_6;\n  while( true ) {\n    piVar6 = param_6 + 10;\n    if (piVar6 < param_2 + iVar2 * 10) {\n      iVar1 = param_6[10];\n      while( true ) {\n        if (iVar5 == iVar1) {\n          return piVar6;\n        }\n        piVar6 = piVar6 + 10;\n        if (param_2 + iVar2 * 10 <= piVar6) break;\n        iVar1 = *piVar6;\n      }\n    }\n    if (iVar5 == 0) break;\n    sVar3 = strlen(param_3);\n    sVar3 = sVar3 + 1;\n    __haystacklen = param_5 - (iVar5 + sVar3);\n    pvVar4 = (void *)((int)param_4 + iVar5 + sVar3);\nLAB_000c846f:\n    pvVar4 = memmem(pvVar4,__haystacklen,param_3,sVar3);\n    if (pvVar4 == (void *)0x0) {\n      return (int *)0x0;\n    }\n    iVar5 = (int)pvVar4 - (int)param_4;\n    param_6 = param_2;\n    if (iVar5 == 0) {\n      return param_2;\n    }\n  }\n  return (int *)0x0;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "size_t sVar3;" (primitive_type "size_t") (identifier "sVar3") (; ";")) (declaration "void *pvVar4;" (primitive_type "void") (pointer_declarator "*pvVar4" (* "*") (identifier "pvVar4")) (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "size_t __haystacklen;" (primitive_type "size_t") (identifier "__haystacklen") (; ";")) (declaration "int *piVar6;" (primitive_type "int") (pointer_declarator "*piVar6" (* "*") (identifier "piVar6")) (; ";")) (expression_statement "iVar2 = *(int *)(param_1 + 0x28);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x28)" (identifier "iVar2") (= "=") (pointer_expression "*(int *)(param_1 + 0x28)" (* "*") (cast_expression "(int *)(param_1 + 0x28)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x28)" (( "(") (binary_expression "param_1 + 0x28" (identifier "param_1") (+ "+") (number_literal "0x28")) () ")"))))) (; ";")) (if_statement "if (param_6 == (int *)0x0) {\n    sVar3 = strlen(param_3);\n    sVar3 = sVar3 + 1;\n    __haystacklen = param_5;\n    pvVar4 = param_4;\n    goto LAB_000c846f;\n  }" (if "if") (parenthesized_expression "(param_6 == (int *)0x0)" (( "(") (binary_expression "param_6 == (int *)0x0" (identifier "param_6") (== "==") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    sVar3 = strlen(param_3);\n    sVar3 = sVar3 + 1;\n    __haystacklen = param_5;\n    pvVar4 = param_4;\n    goto LAB_000c846f;\n  }" ({ "{") (expression_statement "sVar3 = strlen(param_3);" (assignment_expression "sVar3 = strlen(param_3)" (identifier "sVar3") (= "=") (call_expression "strlen(param_3)" (identifier "strlen") (argument_list "(param_3)" (( "(") (identifier "param_3") () ")")))) (; ";")) (expression_statement "sVar3 = sVar3 + 1;" (assignment_expression "sVar3 = sVar3 + 1" (identifier "sVar3") (= "=") (binary_expression "sVar3 + 1" (identifier "sVar3") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "__haystacklen = param_5;" (assignment_expression "__haystacklen = param_5" (identifier "__haystacklen") (= "=") (identifier "param_5")) (; ";")) (expression_statement "pvVar4 = param_4;" (assignment_expression "pvVar4 = param_4" (identifier "pvVar4") (= "=") (identifier "param_4")) (; ";")) (goto_statement "goto LAB_000c846f;" (goto "goto") (statement_identifier "LAB_000c846f") (; ";")) (} "}"))) (expression_statement "iVar5 = *param_6;" (assignment_expression "iVar5 = *param_6" (identifier "iVar5") (= "=") (pointer_expression "*param_6" (* "*") (identifier "param_6"))) (; ";")) (while_statement "while( true ) {\n    piVar6 = param_6 + 10;\n    if (piVar6 < param_2 + iVar2 * 10) {\n      iVar1 = param_6[10];\n      while( true ) {\n        if (iVar5 == iVar1) {\n          return piVar6;\n        }\n        piVar6 = piVar6 + 10;\n        if (param_2 + iVar2 * 10 <= piVar6) break;\n        iVar1 = *piVar6;\n      }\n    }\n    if (iVar5 == 0) break;\n    sVar3 = strlen(param_3);\n    sVar3 = sVar3 + 1;\n    __haystacklen = param_5 - (iVar5 + sVar3);\n    pvVar4 = (void *)((int)param_4 + iVar5 + sVar3);\nLAB_000c846f:\n    pvVar4 = memmem(pvVar4,__haystacklen,param_3,sVar3);\n    if (pvVar4 == (void *)0x0) {\n      return (int *)0x0;\n    }\n    iVar5 = (int)pvVar4 - (int)param_4;\n    param_6 = param_2;\n    if (iVar5 == 0) {\n      return param_2;\n    }\n  }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n    piVar6 = param_6 + 10;\n    if (piVar6 < param_2 + iVar2 * 10) {\n      iVar1 = param_6[10];\n      while( true ) {\n        if (iVar5 == iVar1) {\n          return piVar6;\n        }\n        piVar6 = piVar6 + 10;\n        if (param_2 + iVar2 * 10 <= piVar6) break;\n        iVar1 = *piVar6;\n      }\n    }\n    if (iVar5 == 0) break;\n    sVar3 = strlen(param_3);\n    sVar3 = sVar3 + 1;\n    __haystacklen = param_5 - (iVar5 + sVar3);\n    pvVar4 = (void *)((int)param_4 + iVar5 + sVar3);\nLAB_000c846f:\n    pvVar4 = memmem(pvVar4,__haystacklen,param_3,sVar3);\n    if (pvVar4 == (void *)0x0) {\n      return (int *)0x0;\n    }\n    iVar5 = (int)pvVar4 - (int)param_4;\n    param_6 = param_2;\n    if (iVar5 == 0) {\n      return param_2;\n    }\n  }" ({ "{") (expression_statement "piVar6 = param_6 + 10;" (assignment_expression "piVar6 = param_6 + 10" (identifier "piVar6") (= "=") (binary_expression "param_6 + 10" (identifier "param_6") (+ "+") (number_literal "10"))) (; ";")) (if_statement "if (piVar6 < param_2 + iVar2 * 10) {\n      iVar1 = param_6[10];\n      while( true ) {\n        if (iVar5 == iVar1) {\n          return piVar6;\n        }\n        piVar6 = piVar6 + 10;\n        if (param_2 + iVar2 * 10 <= piVar6) break;\n        iVar1 = *piVar6;\n      }\n    }" (if "if") (parenthesized_expression "(piVar6 < param_2 + iVar2 * 10)" (( "(") (binary_expression "piVar6 < param_2 + iVar2 * 10" (identifier "piVar6") (< "<") (binary_expression "param_2 + iVar2 * 10" (identifier "param_2") (+ "+") (binary_expression "iVar2 * 10" (identifier "iVar2") (* "*") (number_literal "10")))) () ")")) (compound_statement "{\n      iVar1 = param_6[10];\n      while( true ) {\n        if (iVar5 == iVar1) {\n          return piVar6;\n        }\n        piVar6 = piVar6 + 10;\n        if (param_2 + iVar2 * 10 <= piVar6) break;\n        iVar1 = *piVar6;\n      }\n    }" ({ "{") (expression_statement "iVar1 = param_6[10];" (assignment_expression "iVar1 = param_6[10]" (identifier "iVar1") (= "=") (subscript_expression "param_6[10]" (identifier "param_6") ([ "[") (number_literal "10") (] "]"))) (; ";")) (while_statement "while( true ) {\n        if (iVar5 == iVar1) {\n          return piVar6;\n        }\n        piVar6 = piVar6 + 10;\n        if (param_2 + iVar2 * 10 <= piVar6) break;\n        iVar1 = *piVar6;\n      }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n        if (iVar5 == iVar1) {\n          return piVar6;\n        }\n        piVar6 = piVar6 + 10;\n        if (param_2 + iVar2 * 10 <= piVar6) break;\n        iVar1 = *piVar6;\n      }" ({ "{") (if_statement "if (iVar5 == iVar1) {\n          return piVar6;\n        }" (if "if") (parenthesized_expression "(iVar5 == iVar1)" (( "(") (binary_expression "iVar5 == iVar1" (identifier "iVar5") (== "==") (identifier "iVar1")) () ")")) (compound_statement "{\n          return piVar6;\n        }" ({ "{") (return_statement "return piVar6;" (return "return") (identifier "piVar6") (; ";")) (} "}"))) (expression_statement "piVar6 = piVar6 + 10;" (assignment_expression "piVar6 = piVar6 + 10" (identifier "piVar6") (= "=") (binary_expression "piVar6 + 10" (identifier "piVar6") (+ "+") (number_literal "10"))) (; ";")) (if_statement "if (param_2 + iVar2 * 10 <= piVar6) break;" (if "if") (parenthesized_expression "(param_2 + iVar2 * 10 <= piVar6)" (( "(") (binary_expression "param_2 + iVar2 * 10 <= piVar6" (binary_expression "param_2 + iVar2 * 10" (identifier "param_2") (+ "+") (binary_expression "iVar2 * 10" (identifier "iVar2") (* "*") (number_literal "10"))) (<= "<=") (identifier "piVar6")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "iVar1 = *piVar6;" (assignment_expression "iVar1 = *piVar6" (identifier "iVar1") (= "=") (pointer_expression "*piVar6" (* "*") (identifier "piVar6"))) (; ";")) (} "}"))) (} "}"))) (if_statement "if (iVar5 == 0) break;" (if "if") (parenthesized_expression "(iVar5 == 0)" (( "(") (binary_expression "iVar5 == 0" (identifier "iVar5") (== "==") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "sVar3 = strlen(param_3);" (assignment_expression "sVar3 = strlen(param_3)" (identifier "sVar3") (= "=") (call_expression "strlen(param_3)" (identifier "strlen") (argument_list "(param_3)" (( "(") (identifier "param_3") () ")")))) (; ";")) (expression_statement "sVar3 = sVar3 + 1;" (assignment_expression "sVar3 = sVar3 + 1" (identifier "sVar3") (= "=") (binary_expression "sVar3 + 1" (identifier "sVar3") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "__haystacklen = param_5 - (iVar5 + sVar3);" (assignment_expression "__haystacklen = param_5 - (iVar5 + sVar3)" (identifier "__haystacklen") (= "=") (binary_expression "param_5 - (iVar5 + sVar3)" (identifier "param_5") (- "-") (parenthesized_expression "(iVar5 + sVar3)" (( "(") (binary_expression "iVar5 + sVar3" (identifier "iVar5") (+ "+") (identifier "sVar3")) () ")")))) (; ";")) (expression_statement "pvVar4 = (void *)((int)param_4 + iVar5 + sVar3);" (assignment_expression "pvVar4 = (void *)((int)param_4 + iVar5 + sVar3)" (identifier "pvVar4") (= "=") (cast_expression "(void *)((int)param_4 + iVar5 + sVar3)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)param_4 + iVar5 + sVar3)" (( "(") (binary_expression "(int)param_4 + iVar5 + sVar3" (binary_expression "(int)param_4 + iVar5" (cast_expression "(int)param_4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_4")) (+ "+") (identifier "iVar5")) (+ "+") (identifier "sVar3")) () ")")))) (; ";")) (labeled_statement "LAB_000c846f:\n    pvVar4 = memmem(pvVar4,__haystacklen,param_3,sVar3);" (statement_identifier "LAB_000c846f") (: ":") (expression_statement "pvVar4 = memmem(pvVar4,__haystacklen,param_3,sVar3);" (assignment_expression "pvVar4 = memmem(pvVar4,__haystacklen,param_3,sVar3)" (identifier "pvVar4") (= "=") (call_expression "memmem(pvVar4,__haystacklen,param_3,sVar3)" (identifier "memmem") (argument_list "(pvVar4,__haystacklen,param_3,sVar3)" (( "(") (identifier "pvVar4") (, ",") (identifier "__haystacklen") (, ",") (identifier "param_3") (, ",") (identifier "sVar3") () ")")))) (; ";"))) (if_statement "if (pvVar4 == (void *)0x0) {\n      return (int *)0x0;\n    }" (if "if") (parenthesized_expression "(pvVar4 == (void *)0x0)" (( "(") (binary_expression "pvVar4 == (void *)0x0" (identifier "pvVar4") (== "==") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      return (int *)0x0;\n    }" ({ "{") (return_statement "return (int *)0x0;" (return "return") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (; ";")) (} "}"))) (expression_statement "iVar5 = (int)pvVar4 - (int)param_4;" (assignment_expression "iVar5 = (int)pvVar4 - (int)param_4" (identifier "iVar5") (= "=") (binary_expression "(int)pvVar4 - (int)param_4" (cast_expression "(int)pvVar4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pvVar4")) (- "-") (cast_expression "(int)param_4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_4")))) (; ";")) (expression_statement "param_6 = param_2;" (assignment_expression "param_6 = param_2" (identifier "param_6") (= "=") (identifier "param_2")) (; ";")) (if_statement "if (iVar5 == 0) {\n      return param_2;\n    }" (if "if") (parenthesized_expression "(iVar5 == 0)" (( "(") (binary_expression "iVar5 == 0" (identifier "iVar5") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      return param_2;\n    }" ({ "{") (return_statement "return param_2;" (return "return") (identifier "param_2") (; ";")) (} "}"))) (} "}"))) (return_statement "return (int *)0x0;" (return "return") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* DWARF original name: find_shdr<32, false>
   DWARF original prototype: uchar * find_shdr<32,_false>(Object * this, uchar * pshdrs, char *
   name, char * names, section_size_type names_size, uchar * hdr) */

type_2 * __thiscall
gold::Object::find_shdr<32,_false>
          (Object *this,type_2 *var_5,char *name,char *var_10,section_size_type var_9,type_2 *var_1
          )

{
  int var_8;
  type_1 var_6;
  size_t var_3;
  void *var_12;
  int var_7;
  size_t __haystacklen;
  int *var_4;
  char *__haystack;
  
  var_6 = this->shnum_;
  if (var_1 == (type_2 *)0x0) {
    var_3 = var_2(name);
    var_3 = var_3 + 1;
    __haystacklen = var_9;
    __haystack = var_10;
    goto LAB_000c846f;
  }
  var_7 = *(int *)var_1;
  while( true ) {
    var_4 = (int *)(var_1 + 0x28);
    if (var_4 < var_5 + var_6 * 0x28) {
      var_8 = *(int *)(var_1 + 0x28);
      while( true ) {
        if (var_7 == var_8) {
          return (type_2 *)var_4;
        }
        var_4 = var_4 + 10;
        if (var_5 + var_6 * 0x28 <= var_4) break;
        var_8 = *var_4;
      }
    }
    if (var_7 == 0) break;
    var_3 = var_2(name);
    var_3 = var_3 + 1;
    __haystacklen = var_9 - (var_7 + var_3);
    __haystack = var_10 + var_7 + var_3;
LAB_000c846f:
    var_12 = var_11(__haystack,__haystacklen,name,var_3);
    if (var_12 == (void *)0x0) {
      return (type_2 *)0x0;
    }
    var_7 = (int)var_12 - (int)var_10;
    var_1 = var_5;
    if (var_7 == 0) {
      return var_5;
    }
  }
  return (type_2 *)0x0;
}


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

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

int * MASKED(int param_1,int *param_2,char *param_3,void *param_4,size_t param_5,int *param_6)

{
  int iVar1;
  int iVar2;
  size_t sVar3;
  void *pvVar4;
  int iVar5;
  size_t __haystacklen;
  int *piVar6;
  
  iVar2 = *(int *)(param_1 + 0x28);
  if (param_6 == (int *)0x0) {
    sVar3 = strlen(param_3);
    sVar3 = sVar3 + 1;
    __haystacklen = param_5;
    pvVar4 = param_4;
    goto LAB_000c846f;
  }
  iVar5 = *param_6;
  while( true ) {
    piVar6 = param_6 + 10;
    if (piVar6 < param_2 + iVar2 * 10) {
      iVar1 = param_6[10];
      while( true ) {
        if (iVar5 == iVar1) {
          return piVar6;
        }
        piVar6 = piVar6 + 10;
        if (param_2 + iVar2 * 10 <= piVar6) break;
        iVar1 = *piVar6;
      }
    }
    if (iVar5 == 0) break;
    sVar3 = strlen(param_3);
    sVar3 = sVar3 + 1;
    __haystacklen = param_5 - (iVar5 + sVar3);
    pvVar4 = (void *)((int)param_4 + iVar5 + sVar3);
LAB_000c846f:
    pvVar4 = memmem(pvVar4,__haystacklen,param_3,sVar3);
    if (pvVar4 == (void *)0x0) {
      return (int *)0x0;
    }
    iVar5 = (int)pvVar4 - (int)param_4;
    param_6 = param_2;
    if (iVar5 == 0) {
      return param_2;
    }
  }
  return (int *)0x0;
}

