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

int filesearch_init(_Bool forwards)

{
  char *__s;
  size_t sVar1;
  char *pcVar2;
  size_t sVar3;
  char *pcVar4;
  undefined4 uVar5;
  int iVar6;
  undefined *puVar7;
  
  puVar7 = PTR_COLS_0007af78;
  if (*last_search == '\0') {
    pcVar2 = mallocstrcpy((char *)0x0,"");
  }
  else {
    __s = display_string(last_search,0,*(int *)PTR_COLS_0007af78 / 3,false);
    sVar1 = strlen(__s);
    pcVar2 = (char *)nmalloc(sVar1 + 7);
    sVar3 = strlenpt(last_search);
    pcVar4 = "...";
    if (sVar3 <= (uint)(*(int *)puVar7 / 3)) {
      pcVar4 = "";
    }
    __sprintf_chk(pcVar2,1,0xffffffff," [%s%s]",__s,pcVar4);
    free(__s);
  }
  puVar7 = &DAT_0005ec5b;
  if (!forwards) {
    puVar7 = (undefined *)dcgettext(0," [Backwards]",5);
  }
  uVar5 = dcgettext(0,"Search",5);
  iVar6 = do_prompt(false,false,0x800,(char *)0x0,(filestruct **)PTR_search_history_0007aea8,
                    browser_refresh,"%s%s%s",uVar5,puVar7,pcVar2);
  free(pcVar2);
  if (iVar6 == -2) {
    if (*last_search != '\0') {
      return 0;
    }
  }
  else if (-1 < iVar6) {
    return iVar6;
  }
  pcVar2 = (char *)dcgettext(0,"Cancelled",5);
  statusbar(pcVar2);
  return iVar6;
}



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

int FUN_00016170(char param_1)

{
  char *__s;
  size_t sVar1;
  void *__ptr;
  uint uVar2;
  char *pcVar3;
  undefined4 uVar4;
  int iVar5;
  undefined *puVar6;
  
  puVar6 = PTR_COLS_0007af78;
  if (*DAT_0007b678 == '\0') {
    __ptr = (void *)FUN_0003dbd0(0,&DAT_0005ec5b);
  }
  else {
    __s = (char *)FUN_0003fe90(DAT_0007b678,0,*(int *)PTR_COLS_0007af78 / 3,0);
    sVar1 = strlen(__s);
    __ptr = (void *)FUN_0003da70(sVar1 + 7);
    uVar2 = FUN_0003e0c0(DAT_0007b678);
    pcVar3 = "...";
    if (uVar2 <= (uint)(*(int *)puVar6 / 3)) {
      pcVar3 = "";
    }
    __sprintf_chk(__ptr,1,0xffffffff," [%s%s]",__s,pcVar3);
    free(__s);
  }
  puVar6 = &DAT_0005ec5b;
  if (param_1 == '\0') {
    puVar6 = (undefined *)dcgettext(0," [Backwards]",5);
  }
  uVar4 = dcgettext(0,"Search",5);
  iVar5 = FUN_0002f940(0,0,0x800,0,PTR_DAT_0007aea8,FUN_00015800,"%s%s%s",uVar4,puVar6,__ptr);
  free(__ptr);
  if (iVar5 == -2) {
    if (*DAT_0007b678 != '\0') {
      return 0;
    }
  }
  else if (-1 < iVar5) {
    return iVar5;
  }
  uVar4 = dcgettext(0,"Cancelled",5);
  FUN_00041580(uVar4);
  return iVar5;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00015680
ADD EBX,0x64a57
SUB ESP,0x1c
MOV EAX,dword ptr [ESP + 0x30]
MOV dword ptr [ESP + 0x4],EAX
LEA EDI,[EBX + 0xaa8]
MOV ESI,dword ptr [EDI]
CMP byte ptr [ESI],0x0
JZ 0x00016298
MOV ECX,dword ptr [EBX + 0x3a8]
PUSH 0x0
MOV EAX,0x55555556
MOV EBP,dword ptr [ECX]
MOV dword ptr [ESP + 0x10],ECX
IMUL EBP
SAR EBP,0x1f
SUB EDX,EBP
PUSH EDX
PUSH 0x0
PUSH ESI
CALL 0x0003fe90
MOV dword ptr [ESP],EAX
MOV EBP,EAX
CALL 0x00013630
ADD EAX,0x7
MOV dword ptr [ESP],EAX
CALL 0x0003da70
MOV ESI,EAX
POP EAX
PUSH dword ptr [EDI]
CALL 0x0003e0c0
MOV ECX,dword ptr [ESP + 0x1c]
MOV dword ptr [ESP + 0x18],EAX
MOV EAX,0x55555556
MOV ECX,dword ptr [ECX]
IMUL ECX
SAR ECX,0x1f
POP EAX
LEA EAX,[EBX + 0xfffe5c30]
SUB EDX,ECX
POP ECX
CMP dword ptr [ESP + 0x10],EDX
LEA EDX,[EBX + 0xfffe408b]
CMOVBE EAX,EDX
PUSH EAX
LEA EAX,[EBX + 0xfffe045b]
PUSH EBP
PUSH EAX
PUSH -0x1
PUSH 0x1
PUSH ESI
CALL 0x00013b30
ADD ESP,0x14
PUSH EBP
LEA EBP,[EBX + 0xfffe408b]
CALL 0x00013200
ADD ESP,0x10
CMP byte ptr [ESP + 0x4],0x0
JZ 0x000162bf
SUB ESP,0x4
LEA EAX,[EBX + 0xfffe0470]
PUSH 0x5
PUSH EAX
PUSH 0x0
CALL 0x000132e0
POP EDX
POP ECX
PUSH ESI
PUSH EBP
PUSH EAX
LEA EAX,[EBX + 0xfffe0900]
PUSH EAX
LEA EAX,[EBX + 0xfff9ac30]
PUSH EAX
PUSH dword ptr [EBX + 0x2d8]
PUSH 0x0
PUSH 0x800
PUSH 0x0
PUSH 0x0
CALL 0x0002f940
ADD ESP,0x24
PUSH ESI
MOV EBP,EAX
CALL 0x00013200
ADD ESP,0x10
CMP EBP,-0x2
JZ 0x000162e0
TEST EBP,EBP
JS 0x000162e7
ADD ESP,0x1c
MOV EAX,EBP
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x8
LEA EAX,[EBX + 0xfffe408b]
LEA EBP,[EBX + 0xfffe408b]
PUSH EAX
PUSH 0x0
CALL 0x0003dbd0
ADD ESP,0x10
CMP byte ptr [ESP + 0x4],0x0
MOV ESI,EAX
JNZ 0x00016238
SUB ESP,0x4
LEA EAX,[EBX + 0xfffe0463]
PUSH 0x5
PUSH EAX
PUSH 0x0
CALL 0x000132e0
ADD ESP,0x10
MOV EBP,EAX
JMP 0x00016238
MOV EAX,dword ptr [EDI]
CMP byte ptr [EAX],0x0
JNZ 0x00016310
SUB ESP,0x4
LEA EAX,[EBX + 0xfffe0477]
PUSH 0x5
PUSH EAX
PUSH 0x0
CALL 0x000132e0
MOV dword ptr [ESP],EAX
CALL 0x00041580
ADD ESP,0x10
MOV EAX,EBP
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
ADD ESP,0x1c
XOR EBP,EBP
POP EBX
MOV EAX,EBP
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_00016170(char param_1)\n\n{\n  char *__s;\n  size_t sVar1;\n  void *__ptr;\n  uint uVar2;\n  char *pcVar3;\n  undefined4 uVar4;\n  int iVar5;\n  undefined *puVar6;\n  \n  puVar6 = PTR_COLS_0007af78;\n  if (*DAT_0007b678 == '\0') {\n    __ptr = (void *)FUN_0003dbd0(0,&DAT_0005ec5b);\n  }\n  else {\n    __s = (char *)FUN_0003fe90(DAT_0007b678,0,*(int *)PTR_COLS_0007af78 / 3,0);\n    sVar1 = strlen(__s);\n    __ptr = (void *)FUN_0003da70(sVar1 + 7);\n    uVar2 = FUN_0003e0c0(DAT_0007b678);\n    pcVar3 = "...";\n    if (uVar2 <= (uint)(*(int *)puVar6 / 3)) {\n      pcVar3 = "";\n    }\n    __sprintf_chk(__ptr,1,0xffffffff," [%s%s]",__s,pcVar3);\n    free(__s);\n  }\n  puVar6 = &DAT_0005ec5b;\n  if (param_1 == '\0') {\n    puVar6 = (undefined *)dcgettext(0," [Backwards]",5);\n  }\n  uVar4 = dcgettext(0,"Search",5);\n  iVar5 = FUN_0002f940(0,0,0x800,0,PTR_DAT_0007aea8,FUN_00015800,"%s%s%s",uVar4,puVar6,__ptr);\n  free(__ptr);\n  if (iVar5 == -2) {\n    if (*DAT_0007b678 != '\0') {\n      return 0;\n    }\n  }\n  else if (-1 < iVar5) {\n    return iVar5;\n  }\n  uVar4 = dcgettext(0,"Cancelled",5);\n  FUN_00041580(uVar4);\n  return iVar5;\n}\n\n" comment (function_definition "int FUN_00016170(char param_1)\n\n{\n  char *__s;\n  size_t sVar1;\n  void *__ptr;\n  uint uVar2;\n  char *pcVar3;\n  undefined4 uVar4;\n  int iVar5;\n  undefined *puVar6;\n  \n  puVar6 = PTR_COLS_0007af78;\n  if (*DAT_0007b678 == '\0') {\n    __ptr = (void *)FUN_0003dbd0(0,&DAT_0005ec5b);\n  }\n  else {\n    __s = (char *)FUN_0003fe90(DAT_0007b678,0,*(int *)PTR_COLS_0007af78 / 3,0);\n    sVar1 = strlen(__s);\n    __ptr = (void *)FUN_0003da70(sVar1 + 7);\n    uVar2 = FUN_0003e0c0(DAT_0007b678);\n    pcVar3 = "...";\n    if (uVar2 <= (uint)(*(int *)puVar6 / 3)) {\n      pcVar3 = "";\n    }\n    __sprintf_chk(__ptr,1,0xffffffff," [%s%s]",__s,pcVar3);\n    free(__s);\n  }\n  puVar6 = &DAT_0005ec5b;\n  if (param_1 == '\0') {\n    puVar6 = (undefined *)dcgettext(0," [Backwards]",5);\n  }\n  uVar4 = dcgettext(0,"Search",5);\n  iVar5 = FUN_0002f940(0,0,0x800,0,PTR_DAT_0007aea8,FUN_00015800,"%s%s%s",uVar4,puVar6,__ptr);\n  free(__ptr);\n  if (iVar5 == -2) {\n    if (*DAT_0007b678 != '\0') {\n      return 0;\n    }\n  }\n  else if (-1 < iVar5) {\n    return iVar5;\n  }\n  uVar4 = dcgettext(0,"Cancelled",5);\n  FUN_00041580(uVar4);\n  return iVar5;\n}" primitive_type (function_declarator "FUN_00016170(char param_1)" identifier (parameter_list "(char param_1)" ( (parameter_declaration "char param_1" primitive_type identifier) ))) (compound_statement "{\n  char *__s;\n  size_t sVar1;\n  void *__ptr;\n  uint uVar2;\n  char *pcVar3;\n  undefined4 uVar4;\n  int iVar5;\n  undefined *puVar6;\n  \n  puVar6 = PTR_COLS_0007af78;\n  if (*DAT_0007b678 == '\0') {\n    __ptr = (void *)FUN_0003dbd0(0,&DAT_0005ec5b);\n  }\n  else {\n    __s = (char *)FUN_0003fe90(DAT_0007b678,0,*(int *)PTR_COLS_0007af78 / 3,0);\n    sVar1 = strlen(__s);\n    __ptr = (void *)FUN_0003da70(sVar1 + 7);\n    uVar2 = FUN_0003e0c0(DAT_0007b678);\n    pcVar3 = "...";\n    if (uVar2 <= (uint)(*(int *)puVar6 / 3)) {\n      pcVar3 = "";\n    }\n    __sprintf_chk(__ptr,1,0xffffffff," [%s%s]",__s,pcVar3);\n    free(__s);\n  }\n  puVar6 = &DAT_0005ec5b;\n  if (param_1 == '\0') {\n    puVar6 = (undefined *)dcgettext(0," [Backwards]",5);\n  }\n  uVar4 = dcgettext(0,"Search",5);\n  iVar5 = FUN_0002f940(0,0,0x800,0,PTR_DAT_0007aea8,FUN_00015800,"%s%s%s",uVar4,puVar6,__ptr);\n  free(__ptr);\n  if (iVar5 == -2) {\n    if (*DAT_0007b678 != '\0') {\n      return 0;\n    }\n  }\n  else if (-1 < iVar5) {\n    return iVar5;\n  }\n  uVar4 = dcgettext(0,"Cancelled",5);\n  FUN_00041580(uVar4);\n  return iVar5;\n}" { (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "void *__ptr;" primitive_type (pointer_declarator "*__ptr" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "undefined *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (expression_statement "puVar6 = PTR_COLS_0007af78;" (assignment_expression "puVar6 = PTR_COLS_0007af78" identifier = identifier) ;) (if_statement "if (*DAT_0007b678 == '\0') {\n    __ptr = (void *)FUN_0003dbd0(0,&DAT_0005ec5b);\n  }\n  else {\n    __s = (char *)FUN_0003fe90(DAT_0007b678,0,*(int *)PTR_COLS_0007af78 / 3,0);\n    sVar1 = strlen(__s);\n    __ptr = (void *)FUN_0003da70(sVar1 + 7);\n    uVar2 = FUN_0003e0c0(DAT_0007b678);\n    pcVar3 = "...";\n    if (uVar2 <= (uint)(*(int *)puVar6 / 3)) {\n      pcVar3 = "";\n    }\n    __sprintf_chk(__ptr,1,0xffffffff," [%s%s]",__s,pcVar3);\n    free(__s);\n  }" if (parenthesized_expression "(*DAT_0007b678 == '\0')" ( (binary_expression "*DAT_0007b678 == '\0'" (pointer_expression "*DAT_0007b678" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    __ptr = (void *)FUN_0003dbd0(0,&DAT_0005ec5b);\n  }" { (expression_statement "__ptr = (void *)FUN_0003dbd0(0,&DAT_0005ec5b);" (assignment_expression "__ptr = (void *)FUN_0003dbd0(0,&DAT_0005ec5b)" identifier = (cast_expression "(void *)FUN_0003dbd0(0,&DAT_0005ec5b)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0003dbd0(0,&DAT_0005ec5b)" identifier (argument_list "(0,&DAT_0005ec5b)" ( number_literal , (pointer_expression "&DAT_0005ec5b" & identifier) ))))) ;) }) (else_clause "else {\n    __s = (char *)FUN_0003fe90(DAT_0007b678,0,*(int *)PTR_COLS_0007af78 / 3,0);\n    sVar1 = strlen(__s);\n    __ptr = (void *)FUN_0003da70(sVar1 + 7);\n    uVar2 = FUN_0003e0c0(DAT_0007b678);\n    pcVar3 = "...";\n    if (uVar2 <= (uint)(*(int *)puVar6 / 3)) {\n      pcVar3 = "";\n    }\n    __sprintf_chk(__ptr,1,0xffffffff," [%s%s]",__s,pcVar3);\n    free(__s);\n  }" else (compound_statement "{\n    __s = (char *)FUN_0003fe90(DAT_0007b678,0,*(int *)PTR_COLS_0007af78 / 3,0);\n    sVar1 = strlen(__s);\n    __ptr = (void *)FUN_0003da70(sVar1 + 7);\n    uVar2 = FUN_0003e0c0(DAT_0007b678);\n    pcVar3 = "...";\n    if (uVar2 <= (uint)(*(int *)puVar6 / 3)) {\n      pcVar3 = "";\n    }\n    __sprintf_chk(__ptr,1,0xffffffff," [%s%s]",__s,pcVar3);\n    free(__s);\n  }" { (expression_statement "__s = (char *)FUN_0003fe90(DAT_0007b678,0,*(int *)PTR_COLS_0007af78 / 3,0);" (assignment_expression "__s = (char *)FUN_0003fe90(DAT_0007b678,0,*(int *)PTR_COLS_0007af78 / 3,0)" identifier = (cast_expression "(char *)FUN_0003fe90(DAT_0007b678,0,*(int *)PTR_COLS_0007af78 / 3,0)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0003fe90(DAT_0007b678,0,*(int *)PTR_COLS_0007af78 / 3,0)" identifier (argument_list "(DAT_0007b678,0,*(int *)PTR_COLS_0007af78 / 3,0)" ( identifier , number_literal , (binary_expression "*(int *)PTR_COLS_0007af78 / 3" (pointer_expression "*(int *)PTR_COLS_0007af78" * (cast_expression "(int *)PTR_COLS_0007af78" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) / number_literal) , number_literal ))))) ;) (expression_statement "sVar1 = strlen(__s);" (assignment_expression "sVar1 = strlen(__s)" identifier = (call_expression "strlen(__s)" identifier (argument_list "(__s)" ( identifier )))) ;) (expression_statement "__ptr = (void *)FUN_0003da70(sVar1 + 7);" (assignment_expression "__ptr = (void *)FUN_0003da70(sVar1 + 7)" identifier = (cast_expression "(void *)FUN_0003da70(sVar1 + 7)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0003da70(sVar1 + 7)" identifier (argument_list "(sVar1 + 7)" ( (binary_expression "sVar1 + 7" identifier + number_literal) ))))) ;) (expression_statement "uVar2 = FUN_0003e0c0(DAT_0007b678);" (assignment_expression "uVar2 = FUN_0003e0c0(DAT_0007b678)" identifier = (call_expression "FUN_0003e0c0(DAT_0007b678)" identifier (argument_list "(DAT_0007b678)" ( identifier )))) ;) (expression_statement "pcVar3 = "...";" (assignment_expression "pcVar3 = "..."" identifier = (string_literal ""..."" " string_content ")) ;) (if_statement "if (uVar2 <= (uint)(*(int *)puVar6 / 3)) {\n      pcVar3 = "";\n    }" if (parenthesized_expression "(uVar2 <= (uint)(*(int *)puVar6 / 3))" ( (binary_expression "uVar2 <= (uint)(*(int *)puVar6 / 3)" identifier <= (call_expression "(uint)(*(int *)puVar6 / 3)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*(int *)puVar6 / 3)" ( (binary_expression "*(int *)puVar6 / 3" (pointer_expression "*(int *)puVar6" * (cast_expression "(int *)puVar6" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) / number_literal) )))) )) (compound_statement "{\n      pcVar3 = "";\n    }" { (expression_statement "pcVar3 = "";" (assignment_expression "pcVar3 = """ identifier = (string_literal """" " ")) ;) })) (expression_statement "__sprintf_chk(__ptr,1,0xffffffff," [%s%s]",__s,pcVar3);" (call_expression "__sprintf_chk(__ptr,1,0xffffffff," [%s%s]",__s,pcVar3)" identifier (argument_list "(__ptr,1,0xffffffff," [%s%s]",__s,pcVar3)" ( identifier , number_literal , number_literal , (string_literal "" [%s%s]"" " string_content ") , identifier , identifier ))) ;) (expression_statement "free(__s);" (call_expression "free(__s)" identifier (argument_list "(__s)" ( identifier ))) ;) }))) (expression_statement "puVar6 = &DAT_0005ec5b;" (assignment_expression "puVar6 = &DAT_0005ec5b" identifier = (pointer_expression "&DAT_0005ec5b" & identifier)) ;) (if_statement "if (param_1 == '\0') {\n    puVar6 = (undefined *)dcgettext(0," [Backwards]",5);\n  }" if (parenthesized_expression "(param_1 == '\0')" ( (binary_expression "param_1 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    puVar6 = (undefined *)dcgettext(0," [Backwards]",5);\n  }" { (expression_statement "puVar6 = (undefined *)dcgettext(0," [Backwards]",5);" (assignment_expression "puVar6 = (undefined *)dcgettext(0," [Backwards]",5)" identifier = (cast_expression "(undefined *)dcgettext(0," [Backwards]",5)" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "dcgettext(0," [Backwards]",5)" identifier (argument_list "(0," [Backwards]",5)" ( number_literal , (string_literal "" [Backwards]"" " string_content ") , number_literal ))))) ;) })) (expression_statement "uVar4 = dcgettext(0,"Search",5);" (assignment_expression "uVar4 = dcgettext(0,"Search",5)" identifier = (call_expression "dcgettext(0,"Search",5)" identifier (argument_list "(0,"Search",5)" ( number_literal , (string_literal ""Search"" " string_content ") , number_literal )))) ;) (expression_statement "iVar5 = FUN_0002f940(0,0,0x800,0,PTR_DAT_0007aea8,FUN_00015800,"%s%s%s",uVar4,puVar6,__ptr);" (assignment_expression "iVar5 = FUN_0002f940(0,0,0x800,0,PTR_DAT_0007aea8,FUN_00015800,"%s%s%s",uVar4,puVar6,__ptr)" identifier = (call_expression "FUN_0002f940(0,0,0x800,0,PTR_DAT_0007aea8,FUN_00015800,"%s%s%s",uVar4,puVar6,__ptr)" identifier (argument_list "(0,0,0x800,0,PTR_DAT_0007aea8,FUN_00015800,"%s%s%s",uVar4,puVar6,__ptr)" ( number_literal , number_literal , number_literal , number_literal , identifier , identifier , (string_literal ""%s%s%s"" " string_content ") , identifier , identifier , identifier )))) ;) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) (if_statement "if (iVar5 == -2) {\n    if (*DAT_0007b678 != '\0') {\n      return 0;\n    }\n  }\n  else if (-1 < iVar5) {\n    return iVar5;\n  }" if (parenthesized_expression "(iVar5 == -2)" ( (binary_expression "iVar5 == -2" identifier == number_literal) )) (compound_statement "{\n    if (*DAT_0007b678 != '\0') {\n      return 0;\n    }\n  }" { (if_statement "if (*DAT_0007b678 != '\0') {\n      return 0;\n    }" if (parenthesized_expression "(*DAT_0007b678 != '\0')" ( (binary_expression "*DAT_0007b678 != '\0'" (pointer_expression "*DAT_0007b678" * identifier) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) }) (else_clause "else if (-1 < iVar5) {\n    return iVar5;\n  }" else (if_statement "if (-1 < iVar5) {\n    return iVar5;\n  }" if (parenthesized_expression "(-1 < iVar5)" ( (binary_expression "-1 < iVar5" number_literal < identifier) )) (compound_statement "{\n    return iVar5;\n  }" { (return_statement "return iVar5;" return identifier ;) })))) (expression_statement "uVar4 = dcgettext(0,"Cancelled",5);" (assignment_expression "uVar4 = dcgettext(0,"Cancelled",5)" identifier = (call_expression "dcgettext(0,"Cancelled",5)" identifier (argument_list "(0,"Cancelled",5)" ( number_literal , (string_literal ""Cancelled"" " string_content ") , number_literal )))) ;) (expression_statement "FUN_00041580(uVar4);" (call_expression "FUN_00041580(uVar4)" identifier (argument_list "(uVar4)" ( identifier ))) ;) (return_statement "return iVar5;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nint filesearch_init(_Bool forwards)\n\n{\n  char *__s;\n  size_t sVar1;\n  char *pcVar2;\n  size_t sVar3;\n  char *pcVar4;\n  undefined4 uVar5;\n  int iVar6;\n  undefined *puVar7;\n  \n  puVar7 = PTR_COLS_0007af78;\n  if (*last_search == '\0') {\n    pcVar2 = mallocstrcpy((char *)0x0,"");\n  }\n  else {\n    __s = display_string(last_search,0,*(int *)PTR_COLS_0007af78 / 3,false);\n    sVar1 = strlen(__s);\n    pcVar2 = (char *)nmalloc(sVar1 + 7);\n    sVar3 = strlenpt(last_search);\n    pcVar4 = "...";\n    if (sVar3 <= (uint)(*(int *)puVar7 / 3)) {\n      pcVar4 = "";\n    }\n    __sprintf_chk(pcVar2,1,0xffffffff," [%s%s]",__s,pcVar4);\n    free(__s);\n  }\n  puVar7 = &DAT_0005ec5b;\n  if (!forwards) {\n    puVar7 = (undefined *)dcgettext(0," [Backwards]",5);\n  }\n  uVar5 = dcgettext(0,"Search",5);\n  iVar6 = do_prompt(false,false,0x800,(char *)0x0,(filestruct **)PTR_search_history_0007aea8,\n                    browser_refresh,"%s%s%s",uVar5,puVar7,pcVar2);\n  free(pcVar2);\n  if (iVar6 == -2) {\n    if (*last_search != '\0') {\n      return 0;\n    }\n  }\n  else if (-1 < iVar6) {\n    return iVar6;\n  }\n  pcVar2 = (char *)dcgettext(0,"Cancelled",5);\n  statusbar(pcVar2);\n  return iVar6;\n}\n\n" comment comment (function_definition "int filesearch_init(_Bool forwards)\n\n{\n  char *__s;\n  size_t sVar1;\n  char *pcVar2;\n  size_t sVar3;\n  char *pcVar4;\n  undefined4 uVar5;\n  int iVar6;\n  undefined *puVar7;\n  \n  puVar7 = PTR_COLS_0007af78;\n  if (*last_search == '\0') {\n    pcVar2 = mallocstrcpy((char *)0x0,"");\n  }\n  else {\n    __s = display_string(last_search,0,*(int *)PTR_COLS_0007af78 / 3,false);\n    sVar1 = strlen(__s);\n    pcVar2 = (char *)nmalloc(sVar1 + 7);\n    sVar3 = strlenpt(last_search);\n    pcVar4 = "...";\n    if (sVar3 <= (uint)(*(int *)puVar7 / 3)) {\n      pcVar4 = "";\n    }\n    __sprintf_chk(pcVar2,1,0xffffffff," [%s%s]",__s,pcVar4);\n    free(__s);\n  }\n  puVar7 = &DAT_0005ec5b;\n  if (!forwards) {\n    puVar7 = (undefined *)dcgettext(0," [Backwards]",5);\n  }\n  uVar5 = dcgettext(0,"Search",5);\n  iVar6 = do_prompt(false,false,0x800,(char *)0x0,(filestruct **)PTR_search_history_0007aea8,\n                    browser_refresh,"%s%s%s",uVar5,puVar7,pcVar2);\n  free(pcVar2);\n  if (iVar6 == -2) {\n    if (*last_search != '\0') {\n      return 0;\n    }\n  }\n  else if (-1 < iVar6) {\n    return iVar6;\n  }\n  pcVar2 = (char *)dcgettext(0,"Cancelled",5);\n  statusbar(pcVar2);\n  return iVar6;\n}" primitive_type (function_declarator "filesearch_init(_Bool forwards)" identifier (parameter_list "(_Bool forwards)" ( (parameter_declaration "_Bool forwards" type_identifier identifier) ))) (compound_statement "{\n  char *__s;\n  size_t sVar1;\n  char *pcVar2;\n  size_t sVar3;\n  char *pcVar4;\n  undefined4 uVar5;\n  int iVar6;\n  undefined *puVar7;\n  \n  puVar7 = PTR_COLS_0007af78;\n  if (*last_search == '\0') {\n    pcVar2 = mallocstrcpy((char *)0x0,"");\n  }\n  else {\n    __s = display_string(last_search,0,*(int *)PTR_COLS_0007af78 / 3,false);\n    sVar1 = strlen(__s);\n    pcVar2 = (char *)nmalloc(sVar1 + 7);\n    sVar3 = strlenpt(last_search);\n    pcVar4 = "...";\n    if (sVar3 <= (uint)(*(int *)puVar7 / 3)) {\n      pcVar4 = "";\n    }\n    __sprintf_chk(pcVar2,1,0xffffffff," [%s%s]",__s,pcVar4);\n    free(__s);\n  }\n  puVar7 = &DAT_0005ec5b;\n  if (!forwards) {\n    puVar7 = (undefined *)dcgettext(0," [Backwards]",5);\n  }\n  uVar5 = dcgettext(0,"Search",5);\n  iVar6 = do_prompt(false,false,0x800,(char *)0x0,(filestruct **)PTR_search_history_0007aea8,\n                    browser_refresh,"%s%s%s",uVar5,puVar7,pcVar2);\n  free(pcVar2);\n  if (iVar6 == -2) {\n    if (*last_search != '\0') {\n      return 0;\n    }\n  }\n  else if (-1 < iVar6) {\n    return iVar6;\n  }\n  pcVar2 = (char *)dcgettext(0,"Cancelled",5);\n  statusbar(pcVar2);\n  return iVar6;\n}" { (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "size_t sVar3;" primitive_type identifier ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "undefined *puVar7;" type_identifier (pointer_declarator "*puVar7" * identifier) ;) (expression_statement "puVar7 = PTR_COLS_0007af78;" (assignment_expression "puVar7 = PTR_COLS_0007af78" identifier = identifier) ;) (if_statement "if (*last_search == '\0') {\n    pcVar2 = mallocstrcpy((char *)0x0,"");\n  }\n  else {\n    __s = display_string(last_search,0,*(int *)PTR_COLS_0007af78 / 3,false);\n    sVar1 = strlen(__s);\n    pcVar2 = (char *)nmalloc(sVar1 + 7);\n    sVar3 = strlenpt(last_search);\n    pcVar4 = "...";\n    if (sVar3 <= (uint)(*(int *)puVar7 / 3)) {\n      pcVar4 = "";\n    }\n    __sprintf_chk(pcVar2,1,0xffffffff," [%s%s]",__s,pcVar4);\n    free(__s);\n  }" if (parenthesized_expression "(*last_search == '\0')" ( (binary_expression "*last_search == '\0'" (pointer_expression "*last_search" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    pcVar2 = mallocstrcpy((char *)0x0,"");\n  }" { (expression_statement "pcVar2 = mallocstrcpy((char *)0x0,"");" (assignment_expression "pcVar2 = mallocstrcpy((char *)0x0,"")" identifier = (call_expression "mallocstrcpy((char *)0x0,"")" identifier (argument_list "((char *)0x0,"")" ( (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) , (string_literal """" " ") )))) ;) }) (else_clause "else {\n    __s = display_string(last_search,0,*(int *)PTR_COLS_0007af78 / 3,false);\n    sVar1 = strlen(__s);\n    pcVar2 = (char *)nmalloc(sVar1 + 7);\n    sVar3 = strlenpt(last_search);\n    pcVar4 = "...";\n    if (sVar3 <= (uint)(*(int *)puVar7 / 3)) {\n      pcVar4 = "";\n    }\n    __sprintf_chk(pcVar2,1,0xffffffff," [%s%s]",__s,pcVar4);\n    free(__s);\n  }" else (compound_statement "{\n    __s = display_string(last_search,0,*(int *)PTR_COLS_0007af78 / 3,false);\n    sVar1 = strlen(__s);\n    pcVar2 = (char *)nmalloc(sVar1 + 7);\n    sVar3 = strlenpt(last_search);\n    pcVar4 = "...";\n    if (sVar3 <= (uint)(*(int *)puVar7 / 3)) {\n      pcVar4 = "";\n    }\n    __sprintf_chk(pcVar2,1,0xffffffff," [%s%s]",__s,pcVar4);\n    free(__s);\n  }" { (expression_statement "__s = display_string(last_search,0,*(int *)PTR_COLS_0007af78 / 3,false);" (assignment_expression "__s = display_string(last_search,0,*(int *)PTR_COLS_0007af78 / 3,false)" identifier = (call_expression "display_string(last_search,0,*(int *)PTR_COLS_0007af78 / 3,false)" identifier (argument_list "(last_search,0,*(int *)PTR_COLS_0007af78 / 3,false)" ( identifier , number_literal , (binary_expression "*(int *)PTR_COLS_0007af78 / 3" (pointer_expression "*(int *)PTR_COLS_0007af78" * (cast_expression "(int *)PTR_COLS_0007af78" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) / number_literal) , false )))) ;) (expression_statement "sVar1 = strlen(__s);" (assignment_expression "sVar1 = strlen(__s)" identifier = (call_expression "strlen(__s)" identifier (argument_list "(__s)" ( identifier )))) ;) (expression_statement "pcVar2 = (char *)nmalloc(sVar1 + 7);" (assignment_expression "pcVar2 = (char *)nmalloc(sVar1 + 7)" identifier = (cast_expression "(char *)nmalloc(sVar1 + 7)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "nmalloc(sVar1 + 7)" identifier (argument_list "(sVar1 + 7)" ( (binary_expression "sVar1 + 7" identifier + number_literal) ))))) ;) (expression_statement "sVar3 = strlenpt(last_search);" (assignment_expression "sVar3 = strlenpt(last_search)" identifier = (call_expression "strlenpt(last_search)" identifier (argument_list "(last_search)" ( identifier )))) ;) (expression_statement "pcVar4 = "...";" (assignment_expression "pcVar4 = "..."" identifier = (string_literal ""..."" " string_content ")) ;) (if_statement "if (sVar3 <= (uint)(*(int *)puVar7 / 3)) {\n      pcVar4 = "";\n    }" if (parenthesized_expression "(sVar3 <= (uint)(*(int *)puVar7 / 3))" ( (binary_expression "sVar3 <= (uint)(*(int *)puVar7 / 3)" identifier <= (call_expression "(uint)(*(int *)puVar7 / 3)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*(int *)puVar7 / 3)" ( (binary_expression "*(int *)puVar7 / 3" (pointer_expression "*(int *)puVar7" * (cast_expression "(int *)puVar7" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) / number_literal) )))) )) (compound_statement "{\n      pcVar4 = "";\n    }" { (expression_statement "pcVar4 = "";" (assignment_expression "pcVar4 = """ identifier = (string_literal """" " ")) ;) })) (expression_statement "__sprintf_chk(pcVar2,1,0xffffffff," [%s%s]",__s,pcVar4);" (call_expression "__sprintf_chk(pcVar2,1,0xffffffff," [%s%s]",__s,pcVar4)" identifier (argument_list "(pcVar2,1,0xffffffff," [%s%s]",__s,pcVar4)" ( identifier , number_literal , number_literal , (string_literal "" [%s%s]"" " string_content ") , identifier , identifier ))) ;) (expression_statement "free(__s);" (call_expression "free(__s)" identifier (argument_list "(__s)" ( identifier ))) ;) }))) (expression_statement "puVar7 = &DAT_0005ec5b;" (assignment_expression "puVar7 = &DAT_0005ec5b" identifier = (pointer_expression "&DAT_0005ec5b" & identifier)) ;) (if_statement "if (!forwards) {\n    puVar7 = (undefined *)dcgettext(0," [Backwards]",5);\n  }" if (parenthesized_expression "(!forwards)" ( (unary_expression "!forwards" ! identifier) )) (compound_statement "{\n    puVar7 = (undefined *)dcgettext(0," [Backwards]",5);\n  }" { (expression_statement "puVar7 = (undefined *)dcgettext(0," [Backwards]",5);" (assignment_expression "puVar7 = (undefined *)dcgettext(0," [Backwards]",5)" identifier = (cast_expression "(undefined *)dcgettext(0," [Backwards]",5)" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "dcgettext(0," [Backwards]",5)" identifier (argument_list "(0," [Backwards]",5)" ( number_literal , (string_literal "" [Backwards]"" " string_content ") , number_literal ))))) ;) })) (expression_statement "uVar5 = dcgettext(0,"Search",5);" (assignment_expression "uVar5 = dcgettext(0,"Search",5)" identifier = (call_expression "dcgettext(0,"Search",5)" identifier (argument_list "(0,"Search",5)" ( number_literal , (string_literal ""Search"" " string_content ") , number_literal )))) ;) (expression_statement "iVar6 = do_prompt(false,false,0x800,(char *)0x0,(filestruct **)PTR_search_history_0007aea8,\n                    browser_refresh,"%s%s%s",uVar5,puVar7,pcVar2);" (assignment_expression "iVar6 = do_prompt(false,false,0x800,(char *)0x0,(filestruct **)PTR_search_history_0007aea8,\n                    browser_refresh,"%s%s%s",uVar5,puVar7,pcVar2)" identifier = (call_expression "do_prompt(false,false,0x800,(char *)0x0,(filestruct **)PTR_search_history_0007aea8,\n                    browser_refresh,"%s%s%s",uVar5,puVar7,pcVar2)" identifier (argument_list "(false,false,0x800,(char *)0x0,(filestruct **)PTR_search_history_0007aea8,\n                    browser_refresh,"%s%s%s",uVar5,puVar7,pcVar2)" ( false , false , number_literal , (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) , (cast_expression "(filestruct **)PTR_search_history_0007aea8" ( (type_descriptor "filestruct **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier) , identifier , (string_literal ""%s%s%s"" " string_content ") , identifier , identifier , identifier )))) ;) (expression_statement "free(pcVar2);" (call_expression "free(pcVar2)" identifier (argument_list "(pcVar2)" ( identifier ))) ;) (if_statement "if (iVar6 == -2) {\n    if (*last_search != '\0') {\n      return 0;\n    }\n  }\n  else if (-1 < iVar6) {\n    return iVar6;\n  }" if (parenthesized_expression "(iVar6 == -2)" ( (binary_expression "iVar6 == -2" identifier == number_literal) )) (compound_statement "{\n    if (*last_search != '\0') {\n      return 0;\n    }\n  }" { (if_statement "if (*last_search != '\0') {\n      return 0;\n    }" if (parenthesized_expression "(*last_search != '\0')" ( (binary_expression "*last_search != '\0'" (pointer_expression "*last_search" * identifier) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) }) (else_clause "else if (-1 < iVar6) {\n    return iVar6;\n  }" else (if_statement "if (-1 < iVar6) {\n    return iVar6;\n  }" if (parenthesized_expression "(-1 < iVar6)" ( (binary_expression "-1 < iVar6" number_literal < identifier) )) (compound_statement "{\n    return iVar6;\n  }" { (return_statement "return iVar6;" return identifier ;) })))) (expression_statement "pcVar2 = (char *)dcgettext(0,"Cancelled",5);" (assignment_expression "pcVar2 = (char *)dcgettext(0,"Cancelled",5)" identifier = (cast_expression "(char *)dcgettext(0,"Cancelled",5)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "dcgettext(0,"Cancelled",5)" identifier (argument_list "(0,"Cancelled",5)" ( number_literal , (string_literal ""Cancelled"" " string_content ") , number_literal ))))) ;) (expression_statement "statusbar(pcVar2);" (call_expression "statusbar(pcVar2)" identifier (argument_list "(pcVar2)" ( identifier ))) ;) (return_statement "return iVar6;" return identifier ;) })))
(translation_unit "int FUN_00016170(char param_1)\n\n{\n  char *__s;\n  size_t sVar1;\n  void *__ptr;\n  uint uVar2;\n  char *pcVar3;\n  undefined4 uVar4;\n  int iVar5;\n  undefined *puVar6;\n  \n  puVar6 = PTR_COLS_0007af78;\n  if (*DAT_0007b678 == '\0') {\n    __ptr = (void *)FUN_0003dbd0(0,&DAT_0005ec5b);\n  }\n  else {\n    __s = (char *)FUN_0003fe90(DAT_0007b678,0,*(int *)PTR_COLS_0007af78 / 3,0);\n    sVar1 = strlen(__s);\n    __ptr = (void *)FUN_0003da70(sVar1 + 7);\n    uVar2 = FUN_0003e0c0(DAT_0007b678);\n    pcVar3 = "...";\n    if (uVar2 <= (uint)(*(int *)puVar6 / 3)) {\n      pcVar3 = "";\n    }\n    __sprintf_chk(__ptr,1,0xffffffff," [%s%s]",__s,pcVar3);\n    free(__s);\n  }\n  puVar6 = &DAT_0005ec5b;\n  if (param_1 == '\0') {\n    puVar6 = (undefined *)dcgettext(0," [Backwards]",5);\n  }\n  uVar4 = dcgettext(0,"Search",5);\n  iVar5 = FUN_0002f940(0,0,0x800,0,PTR_DAT_0007aea8,FUN_00015800,"%s%s%s",uVar4,puVar6,__ptr);\n  free(__ptr);\n  if (iVar5 == -2) {\n    if (*DAT_0007b678 != '\0') {\n      return 0;\n    }\n  }\n  else if (-1 < iVar5) {\n    return iVar5;\n  }\n  uVar4 = dcgettext(0,"Cancelled",5);\n  FUN_00041580(uVar4);\n  return iVar5;\n}\n\n" (function_definition "int FUN_00016170(char param_1)\n\n{\n  char *__s;\n  size_t sVar1;\n  void *__ptr;\n  uint uVar2;\n  char *pcVar3;\n  undefined4 uVar4;\n  int iVar5;\n  undefined *puVar6;\n  \n  puVar6 = PTR_COLS_0007af78;\n  if (*DAT_0007b678 == '\0') {\n    __ptr = (void *)FUN_0003dbd0(0,&DAT_0005ec5b);\n  }\n  else {\n    __s = (char *)FUN_0003fe90(DAT_0007b678,0,*(int *)PTR_COLS_0007af78 / 3,0);\n    sVar1 = strlen(__s);\n    __ptr = (void *)FUN_0003da70(sVar1 + 7);\n    uVar2 = FUN_0003e0c0(DAT_0007b678);\n    pcVar3 = "...";\n    if (uVar2 <= (uint)(*(int *)puVar6 / 3)) {\n      pcVar3 = "";\n    }\n    __sprintf_chk(__ptr,1,0xffffffff," [%s%s]",__s,pcVar3);\n    free(__s);\n  }\n  puVar6 = &DAT_0005ec5b;\n  if (param_1 == '\0') {\n    puVar6 = (undefined *)dcgettext(0," [Backwards]",5);\n  }\n  uVar4 = dcgettext(0,"Search",5);\n  iVar5 = FUN_0002f940(0,0,0x800,0,PTR_DAT_0007aea8,FUN_00015800,"%s%s%s",uVar4,puVar6,__ptr);\n  free(__ptr);\n  if (iVar5 == -2) {\n    if (*DAT_0007b678 != '\0') {\n      return 0;\n    }\n  }\n  else if (-1 < iVar5) {\n    return iVar5;\n  }\n  uVar4 = dcgettext(0,"Cancelled",5);\n  FUN_00041580(uVar4);\n  return iVar5;\n}" primitive_type (function_declarator "FUN_00016170(char param_1)" identifier (parameter_list "(char param_1)" ( (parameter_declaration "char param_1" primitive_type identifier) ))) (compound_statement "{\n  char *__s;\n  size_t sVar1;\n  void *__ptr;\n  uint uVar2;\n  char *pcVar3;\n  undefined4 uVar4;\n  int iVar5;\n  undefined *puVar6;\n  \n  puVar6 = PTR_COLS_0007af78;\n  if (*DAT_0007b678 == '\0') {\n    __ptr = (void *)FUN_0003dbd0(0,&DAT_0005ec5b);\n  }\n  else {\n    __s = (char *)FUN_0003fe90(DAT_0007b678,0,*(int *)PTR_COLS_0007af78 / 3,0);\n    sVar1 = strlen(__s);\n    __ptr = (void *)FUN_0003da70(sVar1 + 7);\n    uVar2 = FUN_0003e0c0(DAT_0007b678);\n    pcVar3 = "...";\n    if (uVar2 <= (uint)(*(int *)puVar6 / 3)) {\n      pcVar3 = "";\n    }\n    __sprintf_chk(__ptr,1,0xffffffff," [%s%s]",__s,pcVar3);\n    free(__s);\n  }\n  puVar6 = &DAT_0005ec5b;\n  if (param_1 == '\0') {\n    puVar6 = (undefined *)dcgettext(0," [Backwards]",5);\n  }\n  uVar4 = dcgettext(0,"Search",5);\n  iVar5 = FUN_0002f940(0,0,0x800,0,PTR_DAT_0007aea8,FUN_00015800,"%s%s%s",uVar4,puVar6,__ptr);\n  free(__ptr);\n  if (iVar5 == -2) {\n    if (*DAT_0007b678 != '\0') {\n      return 0;\n    }\n  }\n  else if (-1 < iVar5) {\n    return iVar5;\n  }\n  uVar4 = dcgettext(0,"Cancelled",5);\n  FUN_00041580(uVar4);\n  return iVar5;\n}" { (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "void *__ptr;" primitive_type (pointer_declarator "*__ptr" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "undefined *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (expression_statement "puVar6 = PTR_COLS_0007af78;" (assignment_expression "puVar6 = PTR_COLS_0007af78" identifier = identifier) ;) (if_statement "if (*DAT_0007b678 == '\0') {\n    __ptr = (void *)FUN_0003dbd0(0,&DAT_0005ec5b);\n  }\n  else {\n    __s = (char *)FUN_0003fe90(DAT_0007b678,0,*(int *)PTR_COLS_0007af78 / 3,0);\n    sVar1 = strlen(__s);\n    __ptr = (void *)FUN_0003da70(sVar1 + 7);\n    uVar2 = FUN_0003e0c0(DAT_0007b678);\n    pcVar3 = "...";\n    if (uVar2 <= (uint)(*(int *)puVar6 / 3)) {\n      pcVar3 = "";\n    }\n    __sprintf_chk(__ptr,1,0xffffffff," [%s%s]",__s,pcVar3);\n    free(__s);\n  }" if (parenthesized_expression "(*DAT_0007b678 == '\0')" ( (binary_expression "*DAT_0007b678 == '\0'" (pointer_expression "*DAT_0007b678" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    __ptr = (void *)FUN_0003dbd0(0,&DAT_0005ec5b);\n  }" { (expression_statement "__ptr = (void *)FUN_0003dbd0(0,&DAT_0005ec5b);" (assignment_expression "__ptr = (void *)FUN_0003dbd0(0,&DAT_0005ec5b)" identifier = (cast_expression "(void *)FUN_0003dbd0(0,&DAT_0005ec5b)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0003dbd0(0,&DAT_0005ec5b)" identifier (argument_list "(0,&DAT_0005ec5b)" ( number_literal , (pointer_expression "&DAT_0005ec5b" & identifier) ))))) ;) }) (else_clause "else {\n    __s = (char *)FUN_0003fe90(DAT_0007b678,0,*(int *)PTR_COLS_0007af78 / 3,0);\n    sVar1 = strlen(__s);\n    __ptr = (void *)FUN_0003da70(sVar1 + 7);\n    uVar2 = FUN_0003e0c0(DAT_0007b678);\n    pcVar3 = "...";\n    if (uVar2 <= (uint)(*(int *)puVar6 / 3)) {\n      pcVar3 = "";\n    }\n    __sprintf_chk(__ptr,1,0xffffffff," [%s%s]",__s,pcVar3);\n    free(__s);\n  }" else (compound_statement "{\n    __s = (char *)FUN_0003fe90(DAT_0007b678,0,*(int *)PTR_COLS_0007af78 / 3,0);\n    sVar1 = strlen(__s);\n    __ptr = (void *)FUN_0003da70(sVar1 + 7);\n    uVar2 = FUN_0003e0c0(DAT_0007b678);\n    pcVar3 = "...";\n    if (uVar2 <= (uint)(*(int *)puVar6 / 3)) {\n      pcVar3 = "";\n    }\n    __sprintf_chk(__ptr,1,0xffffffff," [%s%s]",__s,pcVar3);\n    free(__s);\n  }" { (expression_statement "__s = (char *)FUN_0003fe90(DAT_0007b678,0,*(int *)PTR_COLS_0007af78 / 3,0);" (assignment_expression "__s = (char *)FUN_0003fe90(DAT_0007b678,0,*(int *)PTR_COLS_0007af78 / 3,0)" identifier = (cast_expression "(char *)FUN_0003fe90(DAT_0007b678,0,*(int *)PTR_COLS_0007af78 / 3,0)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0003fe90(DAT_0007b678,0,*(int *)PTR_COLS_0007af78 / 3,0)" identifier (argument_list "(DAT_0007b678,0,*(int *)PTR_COLS_0007af78 / 3,0)" ( identifier , number_literal , (binary_expression "*(int *)PTR_COLS_0007af78 / 3" (pointer_expression "*(int *)PTR_COLS_0007af78" * (cast_expression "(int *)PTR_COLS_0007af78" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) / number_literal) , number_literal ))))) ;) (expression_statement "sVar1 = strlen(__s);" (assignment_expression "sVar1 = strlen(__s)" identifier = (call_expression "strlen(__s)" identifier (argument_list "(__s)" ( identifier )))) ;) (expression_statement "__ptr = (void *)FUN_0003da70(sVar1 + 7);" (assignment_expression "__ptr = (void *)FUN_0003da70(sVar1 + 7)" identifier = (cast_expression "(void *)FUN_0003da70(sVar1 + 7)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0003da70(sVar1 + 7)" identifier (argument_list "(sVar1 + 7)" ( (binary_expression "sVar1 + 7" identifier + number_literal) ))))) ;) (expression_statement "uVar2 = FUN_0003e0c0(DAT_0007b678);" (assignment_expression "uVar2 = FUN_0003e0c0(DAT_0007b678)" identifier = (call_expression "FUN_0003e0c0(DAT_0007b678)" identifier (argument_list "(DAT_0007b678)" ( identifier )))) ;) (expression_statement "pcVar3 = "...";" (assignment_expression "pcVar3 = "..."" identifier = (string_literal ""..."" " string_content ")) ;) (if_statement "if (uVar2 <= (uint)(*(int *)puVar6 / 3)) {\n      pcVar3 = "";\n    }" if (parenthesized_expression "(uVar2 <= (uint)(*(int *)puVar6 / 3))" ( (binary_expression "uVar2 <= (uint)(*(int *)puVar6 / 3)" identifier <= (call_expression "(uint)(*(int *)puVar6 / 3)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*(int *)puVar6 / 3)" ( (binary_expression "*(int *)puVar6 / 3" (pointer_expression "*(int *)puVar6" * (cast_expression "(int *)puVar6" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) / number_literal) )))) )) (compound_statement "{\n      pcVar3 = "";\n    }" { (expression_statement "pcVar3 = "";" (assignment_expression "pcVar3 = """ identifier = (string_literal """" " ")) ;) })) (expression_statement "__sprintf_chk(__ptr,1,0xffffffff," [%s%s]",__s,pcVar3);" (call_expression "__sprintf_chk(__ptr,1,0xffffffff," [%s%s]",__s,pcVar3)" identifier (argument_list "(__ptr,1,0xffffffff," [%s%s]",__s,pcVar3)" ( identifier , number_literal , number_literal , (string_literal "" [%s%s]"" " string_content ") , identifier , identifier ))) ;) (expression_statement "free(__s);" (call_expression "free(__s)" identifier (argument_list "(__s)" ( identifier ))) ;) }))) (expression_statement "puVar6 = &DAT_0005ec5b;" (assignment_expression "puVar6 = &DAT_0005ec5b" identifier = (pointer_expression "&DAT_0005ec5b" & identifier)) ;) (if_statement "if (param_1 == '\0') {\n    puVar6 = (undefined *)dcgettext(0," [Backwards]",5);\n  }" if (parenthesized_expression "(param_1 == '\0')" ( (binary_expression "param_1 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    puVar6 = (undefined *)dcgettext(0," [Backwards]",5);\n  }" { (expression_statement "puVar6 = (undefined *)dcgettext(0," [Backwards]",5);" (assignment_expression "puVar6 = (undefined *)dcgettext(0," [Backwards]",5)" identifier = (cast_expression "(undefined *)dcgettext(0," [Backwards]",5)" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "dcgettext(0," [Backwards]",5)" identifier (argument_list "(0," [Backwards]",5)" ( number_literal , (string_literal "" [Backwards]"" " string_content ") , number_literal ))))) ;) })) (expression_statement "uVar4 = dcgettext(0,"Search",5);" (assignment_expression "uVar4 = dcgettext(0,"Search",5)" identifier = (call_expression "dcgettext(0,"Search",5)" identifier (argument_list "(0,"Search",5)" ( number_literal , (string_literal ""Search"" " string_content ") , number_literal )))) ;) (expression_statement "iVar5 = FUN_0002f940(0,0,0x800,0,PTR_DAT_0007aea8,FUN_00015800,"%s%s%s",uVar4,puVar6,__ptr);" (assignment_expression "iVar5 = FUN_0002f940(0,0,0x800,0,PTR_DAT_0007aea8,FUN_00015800,"%s%s%s",uVar4,puVar6,__ptr)" identifier = (call_expression "FUN_0002f940(0,0,0x800,0,PTR_DAT_0007aea8,FUN_00015800,"%s%s%s",uVar4,puVar6,__ptr)" identifier (argument_list "(0,0,0x800,0,PTR_DAT_0007aea8,FUN_00015800,"%s%s%s",uVar4,puVar6,__ptr)" ( number_literal , number_literal , number_literal , number_literal , identifier , identifier , (string_literal ""%s%s%s"" " string_content ") , identifier , identifier , identifier )))) ;) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) (if_statement "if (iVar5 == -2) {\n    if (*DAT_0007b678 != '\0') {\n      return 0;\n    }\n  }\n  else if (-1 < iVar5) {\n    return iVar5;\n  }" if (parenthesized_expression "(iVar5 == -2)" ( (binary_expression "iVar5 == -2" identifier == number_literal) )) (compound_statement "{\n    if (*DAT_0007b678 != '\0') {\n      return 0;\n    }\n  }" { (if_statement "if (*DAT_0007b678 != '\0') {\n      return 0;\n    }" if (parenthesized_expression "(*DAT_0007b678 != '\0')" ( (binary_expression "*DAT_0007b678 != '\0'" (pointer_expression "*DAT_0007b678" * identifier) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) }) (else_clause "else if (-1 < iVar5) {\n    return iVar5;\n  }" else (if_statement "if (-1 < iVar5) {\n    return iVar5;\n  }" if (parenthesized_expression "(-1 < iVar5)" ( (binary_expression "-1 < iVar5" number_literal < identifier) )) (compound_statement "{\n    return iVar5;\n  }" { (return_statement "return iVar5;" return identifier ;) })))) (expression_statement "uVar4 = dcgettext(0,"Cancelled",5);" (assignment_expression "uVar4 = dcgettext(0,"Cancelled",5)" identifier = (call_expression "dcgettext(0,"Cancelled",5)" identifier (argument_list "(0,"Cancelled",5)" ( number_literal , (string_literal ""Cancelled"" " string_content ") , number_literal )))) ;) (expression_statement "FUN_00041580(uVar4);" (call_expression "FUN_00041580(uVar4)" identifier (argument_list "(uVar4)" ( identifier ))) ;) (return_statement "return iVar5;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * 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 = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT , (pointer_expression & IDENT) ))))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , LIT , (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) / LIT) , LIT ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (string_literal " string_content ")) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) / LIT) )))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (string_literal " ")) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , LIT , (string_literal " string_content ") , IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) }))) (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT , (string_literal " string_content ") , LIT ))))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , (string_literal " string_content ") , LIT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , LIT , LIT , LIT , IDENT , IDENT , (string_literal " string_content ") , IDENT , IDENT , IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) != (char_literal ' escape_sequence ')) )) (compound_statement { (return_statement return LIT ;) })) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (return_statement return IDENT ;) })))) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , (string_literal " string_content ") , LIT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return IDENT ;) })))
(function_definition "int FUN_00016170(char param_1)\n\n{\n  char *__s;\n  size_t sVar1;\n  void *__ptr;\n  uint uVar2;\n  char *pcVar3;\n  undefined4 uVar4;\n  int iVar5;\n  undefined *puVar6;\n  \n  puVar6 = PTR_COLS_0007af78;\n  if (*DAT_0007b678 == '\0') {\n    __ptr = (void *)FUN_0003dbd0(0,&DAT_0005ec5b);\n  }\n  else {\n    __s = (char *)FUN_0003fe90(DAT_0007b678,0,*(int *)PTR_COLS_0007af78 / 3,0);\n    sVar1 = strlen(__s);\n    __ptr = (void *)FUN_0003da70(sVar1 + 7);\n    uVar2 = FUN_0003e0c0(DAT_0007b678);\n    pcVar3 = "...";\n    if (uVar2 <= (uint)(*(int *)puVar6 / 3)) {\n      pcVar3 = "";\n    }\n    __sprintf_chk(__ptr,1,0xffffffff," [%s%s]",__s,pcVar3);\n    free(__s);\n  }\n  puVar6 = &DAT_0005ec5b;\n  if (param_1 == '\0') {\n    puVar6 = (undefined *)dcgettext(0," [Backwards]",5);\n  }\n  uVar4 = dcgettext(0,"Search",5);\n  iVar5 = FUN_0002f940(0,0,0x800,0,PTR_DAT_0007aea8,FUN_00015800,"%s%s%s",uVar4,puVar6,__ptr);\n  free(__ptr);\n  if (iVar5 == -2) {\n    if (*DAT_0007b678 != '\0') {\n      return 0;\n    }\n  }\n  else if (-1 < iVar5) {\n    return iVar5;\n  }\n  uVar4 = dcgettext(0,"Cancelled",5);\n  FUN_00041580(uVar4);\n  return iVar5;\n}" (primitive_type "int") (function_declarator "FUN_00016170(char param_1)" (identifier "FUN_00016170") (parameter_list "(char param_1)" (( "(") (parameter_declaration "char param_1" (primitive_type "char") (identifier "param_1")) () ")"))) (compound_statement "{\n  char *__s;\n  size_t sVar1;\n  void *__ptr;\n  uint uVar2;\n  char *pcVar3;\n  undefined4 uVar4;\n  int iVar5;\n  undefined *puVar6;\n  \n  puVar6 = PTR_COLS_0007af78;\n  if (*DAT_0007b678 == '\0') {\n    __ptr = (void *)FUN_0003dbd0(0,&DAT_0005ec5b);\n  }\n  else {\n    __s = (char *)FUN_0003fe90(DAT_0007b678,0,*(int *)PTR_COLS_0007af78 / 3,0);\n    sVar1 = strlen(__s);\n    __ptr = (void *)FUN_0003da70(sVar1 + 7);\n    uVar2 = FUN_0003e0c0(DAT_0007b678);\n    pcVar3 = "...";\n    if (uVar2 <= (uint)(*(int *)puVar6 / 3)) {\n      pcVar3 = "";\n    }\n    __sprintf_chk(__ptr,1,0xffffffff," [%s%s]",__s,pcVar3);\n    free(__s);\n  }\n  puVar6 = &DAT_0005ec5b;\n  if (param_1 == '\0') {\n    puVar6 = (undefined *)dcgettext(0," [Backwards]",5);\n  }\n  uVar4 = dcgettext(0,"Search",5);\n  iVar5 = FUN_0002f940(0,0,0x800,0,PTR_DAT_0007aea8,FUN_00015800,"%s%s%s",uVar4,puVar6,__ptr);\n  free(__ptr);\n  if (iVar5 == -2) {\n    if (*DAT_0007b678 != '\0') {\n      return 0;\n    }\n  }\n  else if (-1 < iVar5) {\n    return iVar5;\n  }\n  uVar4 = dcgettext(0,"Cancelled",5);\n  FUN_00041580(uVar4);\n  return iVar5;\n}" ({ "{") (declaration "char *__s;" (primitive_type "char") (pointer_declarator "*__s" (* "*") (identifier "__s")) (; ";")) (declaration "size_t sVar1;" (primitive_type "size_t") (identifier "sVar1") (; ";")) (declaration "void *__ptr;" (primitive_type "void") (pointer_declarator "*__ptr" (* "*") (identifier "__ptr")) (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "char *pcVar3;" (primitive_type "char") (pointer_declarator "*pcVar3" (* "*") (identifier "pcVar3")) (; ";")) (declaration "undefined4 uVar4;" (type_identifier "undefined4") (identifier "uVar4") (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "undefined *puVar6;" (type_identifier "undefined") (pointer_declarator "*puVar6" (* "*") (identifier "puVar6")) (; ";")) (expression_statement "puVar6 = PTR_COLS_0007af78;" (assignment_expression "puVar6 = PTR_COLS_0007af78" (identifier "puVar6") (= "=") (identifier "PTR_COLS_0007af78")) (; ";")) (if_statement "if (*DAT_0007b678 == '\0') {\n    __ptr = (void *)FUN_0003dbd0(0,&DAT_0005ec5b);\n  }\n  else {\n    __s = (char *)FUN_0003fe90(DAT_0007b678,0,*(int *)PTR_COLS_0007af78 / 3,0);\n    sVar1 = strlen(__s);\n    __ptr = (void *)FUN_0003da70(sVar1 + 7);\n    uVar2 = FUN_0003e0c0(DAT_0007b678);\n    pcVar3 = "...";\n    if (uVar2 <= (uint)(*(int *)puVar6 / 3)) {\n      pcVar3 = "";\n    }\n    __sprintf_chk(__ptr,1,0xffffffff," [%s%s]",__s,pcVar3);\n    free(__s);\n  }" (if "if") (parenthesized_expression "(*DAT_0007b678 == '\0')" (( "(") (binary_expression "*DAT_0007b678 == '\0'" (pointer_expression "*DAT_0007b678" (* "*") (identifier "DAT_0007b678")) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    __ptr = (void *)FUN_0003dbd0(0,&DAT_0005ec5b);\n  }" ({ "{") (expression_statement "__ptr = (void *)FUN_0003dbd0(0,&DAT_0005ec5b);" (assignment_expression "__ptr = (void *)FUN_0003dbd0(0,&DAT_0005ec5b)" (identifier "__ptr") (= "=") (cast_expression "(void *)FUN_0003dbd0(0,&DAT_0005ec5b)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0003dbd0(0,&DAT_0005ec5b)" (identifier "FUN_0003dbd0") (argument_list "(0,&DAT_0005ec5b)" (( "(") (number_literal "0") (, ",") (pointer_expression "&DAT_0005ec5b" (& "&") (identifier "DAT_0005ec5b")) () ")"))))) (; ";")) (} "}")) (else_clause "else {\n    __s = (char *)FUN_0003fe90(DAT_0007b678,0,*(int *)PTR_COLS_0007af78 / 3,0);\n    sVar1 = strlen(__s);\n    __ptr = (void *)FUN_0003da70(sVar1 + 7);\n    uVar2 = FUN_0003e0c0(DAT_0007b678);\n    pcVar3 = "...";\n    if (uVar2 <= (uint)(*(int *)puVar6 / 3)) {\n      pcVar3 = "";\n    }\n    __sprintf_chk(__ptr,1,0xffffffff," [%s%s]",__s,pcVar3);\n    free(__s);\n  }" (else "else") (compound_statement "{\n    __s = (char *)FUN_0003fe90(DAT_0007b678,0,*(int *)PTR_COLS_0007af78 / 3,0);\n    sVar1 = strlen(__s);\n    __ptr = (void *)FUN_0003da70(sVar1 + 7);\n    uVar2 = FUN_0003e0c0(DAT_0007b678);\n    pcVar3 = "...";\n    if (uVar2 <= (uint)(*(int *)puVar6 / 3)) {\n      pcVar3 = "";\n    }\n    __sprintf_chk(__ptr,1,0xffffffff," [%s%s]",__s,pcVar3);\n    free(__s);\n  }" ({ "{") (expression_statement "__s = (char *)FUN_0003fe90(DAT_0007b678,0,*(int *)PTR_COLS_0007af78 / 3,0);" (assignment_expression "__s = (char *)FUN_0003fe90(DAT_0007b678,0,*(int *)PTR_COLS_0007af78 / 3,0)" (identifier "__s") (= "=") (cast_expression "(char *)FUN_0003fe90(DAT_0007b678,0,*(int *)PTR_COLS_0007af78 / 3,0)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0003fe90(DAT_0007b678,0,*(int *)PTR_COLS_0007af78 / 3,0)" (identifier "FUN_0003fe90") (argument_list "(DAT_0007b678,0,*(int *)PTR_COLS_0007af78 / 3,0)" (( "(") (identifier "DAT_0007b678") (, ",") (number_literal "0") (, ",") (binary_expression "*(int *)PTR_COLS_0007af78 / 3" (pointer_expression "*(int *)PTR_COLS_0007af78" (* "*") (cast_expression "(int *)PTR_COLS_0007af78" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_COLS_0007af78"))) (/ "/") (number_literal "3")) (, ",") (number_literal "0") () ")"))))) (; ";")) (expression_statement "sVar1 = strlen(__s);" (assignment_expression "sVar1 = strlen(__s)" (identifier "sVar1") (= "=") (call_expression "strlen(__s)" (identifier "strlen") (argument_list "(__s)" (( "(") (identifier "__s") () ")")))) (; ";")) (expression_statement "__ptr = (void *)FUN_0003da70(sVar1 + 7);" (assignment_expression "__ptr = (void *)FUN_0003da70(sVar1 + 7)" (identifier "__ptr") (= "=") (cast_expression "(void *)FUN_0003da70(sVar1 + 7)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0003da70(sVar1 + 7)" (identifier "FUN_0003da70") (argument_list "(sVar1 + 7)" (( "(") (binary_expression "sVar1 + 7" (identifier "sVar1") (+ "+") (number_literal "7")) () ")"))))) (; ";")) (expression_statement "uVar2 = FUN_0003e0c0(DAT_0007b678);" (assignment_expression "uVar2 = FUN_0003e0c0(DAT_0007b678)" (identifier "uVar2") (= "=") (call_expression "FUN_0003e0c0(DAT_0007b678)" (identifier "FUN_0003e0c0") (argument_list "(DAT_0007b678)" (( "(") (identifier "DAT_0007b678") () ")")))) (; ";")) (expression_statement "pcVar3 = "...";" (assignment_expression "pcVar3 = "..."" (identifier "pcVar3") (= "=") (string_literal ""..."" (" """) (string_content "...") (" """))) (; ";")) (if_statement "if (uVar2 <= (uint)(*(int *)puVar6 / 3)) {\n      pcVar3 = "";\n    }" (if "if") (parenthesized_expression "(uVar2 <= (uint)(*(int *)puVar6 / 3))" (( "(") (binary_expression "uVar2 <= (uint)(*(int *)puVar6 / 3)" (identifier "uVar2") (<= "<=") (call_expression "(uint)(*(int *)puVar6 / 3)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(*(int *)puVar6 / 3)" (( "(") (binary_expression "*(int *)puVar6 / 3" (pointer_expression "*(int *)puVar6" (* "*") (cast_expression "(int *)puVar6" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar6"))) (/ "/") (number_literal "3")) () ")")))) () ")")) (compound_statement "{\n      pcVar3 = "";\n    }" ({ "{") (expression_statement "pcVar3 = "";" (assignment_expression "pcVar3 = """ (identifier "pcVar3") (= "=") (string_literal """" (" """) (" """))) (; ";")) (} "}"))) (expression_statement "__sprintf_chk(__ptr,1,0xffffffff," [%s%s]",__s,pcVar3);" (call_expression "__sprintf_chk(__ptr,1,0xffffffff," [%s%s]",__s,pcVar3)" (identifier "__sprintf_chk") (argument_list "(__ptr,1,0xffffffff," [%s%s]",__s,pcVar3)" (( "(") (identifier "__ptr") (, ",") (number_literal "1") (, ",") (number_literal "0xffffffff") (, ",") (string_literal "" [%s%s]"" (" """) (string_content " [%s%s]") (" """)) (, ",") (identifier "__s") (, ",") (identifier "pcVar3") () ")"))) (; ";")) (expression_statement "free(__s);" (call_expression "free(__s)" (identifier "free") (argument_list "(__s)" (( "(") (identifier "__s") () ")"))) (; ";")) (} "}")))) (expression_statement "puVar6 = &DAT_0005ec5b;" (assignment_expression "puVar6 = &DAT_0005ec5b" (identifier "puVar6") (= "=") (pointer_expression "&DAT_0005ec5b" (& "&") (identifier "DAT_0005ec5b"))) (; ";")) (if_statement "if (param_1 == '\0') {\n    puVar6 = (undefined *)dcgettext(0," [Backwards]",5);\n  }" (if "if") (parenthesized_expression "(param_1 == '\0')" (( "(") (binary_expression "param_1 == '\0'" (identifier "param_1") (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    puVar6 = (undefined *)dcgettext(0," [Backwards]",5);\n  }" ({ "{") (expression_statement "puVar6 = (undefined *)dcgettext(0," [Backwards]",5);" (assignment_expression "puVar6 = (undefined *)dcgettext(0," [Backwards]",5)" (identifier "puVar6") (= "=") (cast_expression "(undefined *)dcgettext(0," [Backwards]",5)" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "dcgettext(0," [Backwards]",5)" (identifier "dcgettext") (argument_list "(0," [Backwards]",5)" (( "(") (number_literal "0") (, ",") (string_literal "" [Backwards]"" (" """) (string_content " [Backwards]") (" """)) (, ",") (number_literal "5") () ")"))))) (; ";")) (} "}"))) (expression_statement "uVar4 = dcgettext(0,"Search",5);" (assignment_expression "uVar4 = dcgettext(0,"Search",5)" (identifier "uVar4") (= "=") (call_expression "dcgettext(0,"Search",5)" (identifier "dcgettext") (argument_list "(0,"Search",5)" (( "(") (number_literal "0") (, ",") (string_literal ""Search"" (" """) (string_content "Search") (" """)) (, ",") (number_literal "5") () ")")))) (; ";")) (expression_statement "iVar5 = FUN_0002f940(0,0,0x800,0,PTR_DAT_0007aea8,FUN_00015800,"%s%s%s",uVar4,puVar6,__ptr);" (assignment_expression "iVar5 = FUN_0002f940(0,0,0x800,0,PTR_DAT_0007aea8,FUN_00015800,"%s%s%s",uVar4,puVar6,__ptr)" (identifier "iVar5") (= "=") (call_expression "FUN_0002f940(0,0,0x800,0,PTR_DAT_0007aea8,FUN_00015800,"%s%s%s",uVar4,puVar6,__ptr)" (identifier "FUN_0002f940") (argument_list "(0,0,0x800,0,PTR_DAT_0007aea8,FUN_00015800,"%s%s%s",uVar4,puVar6,__ptr)" (( "(") (number_literal "0") (, ",") (number_literal "0") (, ",") (number_literal "0x800") (, ",") (number_literal "0") (, ",") (identifier "PTR_DAT_0007aea8") (, ",") (identifier "FUN_00015800") (, ",") (string_literal ""%s%s%s"" (" """) (string_content "%s%s%s") (" """)) (, ",") (identifier "uVar4") (, ",") (identifier "puVar6") (, ",") (identifier "__ptr") () ")")))) (; ";")) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" (identifier "free") (argument_list "(__ptr)" (( "(") (identifier "__ptr") () ")"))) (; ";")) (if_statement "if (iVar5 == -2) {\n    if (*DAT_0007b678 != '\0') {\n      return 0;\n    }\n  }\n  else if (-1 < iVar5) {\n    return iVar5;\n  }" (if "if") (parenthesized_expression "(iVar5 == -2)" (( "(") (binary_expression "iVar5 == -2" (identifier "iVar5") (== "==") (number_literal "-2")) () ")")) (compound_statement "{\n    if (*DAT_0007b678 != '\0') {\n      return 0;\n    }\n  }" ({ "{") (if_statement "if (*DAT_0007b678 != '\0') {\n      return 0;\n    }" (if "if") (parenthesized_expression "(*DAT_0007b678 != '\0')" (( "(") (binary_expression "*DAT_0007b678 != '\0'" (pointer_expression "*DAT_0007b678" (* "*") (identifier "DAT_0007b678")) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n      return 0;\n    }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (} "}")) (else_clause "else if (-1 < iVar5) {\n    return iVar5;\n  }" (else "else") (if_statement "if (-1 < iVar5) {\n    return iVar5;\n  }" (if "if") (parenthesized_expression "(-1 < iVar5)" (( "(") (binary_expression "-1 < iVar5" (number_literal "-1") (< "<") (identifier "iVar5")) () ")")) (compound_statement "{\n    return iVar5;\n  }" ({ "{") (return_statement "return iVar5;" (return "return") (identifier "iVar5") (; ";")) (} "}"))))) (expression_statement "uVar4 = dcgettext(0,"Cancelled",5);" (assignment_expression "uVar4 = dcgettext(0,"Cancelled",5)" (identifier "uVar4") (= "=") (call_expression "dcgettext(0,"Cancelled",5)" (identifier "dcgettext") (argument_list "(0,"Cancelled",5)" (( "(") (number_literal "0") (, ",") (string_literal ""Cancelled"" (" """) (string_content "Cancelled") (" """)) (, ",") (number_literal "5") () ")")))) (; ";")) (expression_statement "FUN_00041580(uVar4);" (call_expression "FUN_00041580(uVar4)" (identifier "FUN_00041580") (argument_list "(uVar4)" (( "(") (identifier "uVar4") () ")"))) (; ";")) (return_statement "return iVar5;" (return "return") (identifier "iVar5") (; ";")) (} "}")))

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

int function_1(type_1 forwards)

{
  char *__s;
  size_t var_5;
  char *pcVar2;
  size_t var_7;
  char *pcVar4;
  type_2 uVar5;
  int var_12;
  type_3 *puVar7;
  
  puVar7 = PTR_COLS_0007af78;
  if (*last_search == '\0') {
    pcVar2 = var_1((char *)0x0,"");
  }
  else {
    __s = var_2(last_search,0,*(int *)PTR_COLS_0007af78 / 3,false);
    var_5 = var_3(__s);
    pcVar2 = (char *)var_4(var_5 + 7);
    var_7 = var_6(last_search);
    pcVar4 = "...";
    if (var_7 <= (uint)(*(int *)puVar7 / 3)) {
      pcVar4 = "";
    }
    var_8(pcVar2,1,0xffffffff," [%s%s]",__s,pcVar4);
    var_9(__s);
  }
  puVar7 = &DAT_0005ec5b;
  if (!forwards) {
    puVar7 = (type_3 *)var_10(0," [Backwards]",5);
  }
  uVar5 = var_10(0,"Search",5);
  var_12 = var_11(false,false,0x800,(char *)0x0,(type_4 **)PTR_search_history_0007aea8,
                    browser_refresh,"%s%s%s",uVar5,puVar7,pcVar2);
  var_9(pcVar2);
  if (var_12 == -2) {
    if (*last_search != '\0') {
      return 0;
    }
  }
  else if (-1 < var_12) {
    return var_12;
  }
  pcVar2 = (char *)var_10(0,"Cancelled",5);
  var_13(pcVar2);
  return var_12;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (char_literal (escape_sequence)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (number_literal) (pointer_expression argument: (identifier)))))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier))) right: (number_literal)) (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (string_literal (string_content)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier))) right: (number_literal)))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (string_literal))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (number_literal) (string_literal (string_content)) (identifier) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier))))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (escape_sequence)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (number_literal) (string_literal (string_content)) (number_literal)))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal) (string_literal (string_content)) (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal) (number_literal) (number_literal) (number_literal) (identifier) (identifier) (string_literal (string_content)) (identifier) (identifier) (identifier))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (char_literal (escape_sequence)))) consequence: (compound_statement (return_statement (number_literal))))) alternative: (else_clause (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (return_statement (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal) (string_literal (string_content)) (number_literal))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (return_statement (identifier)))))

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

int MASKED(char param_1)

{
  char *__s;
  size_t sVar1;
  void *__ptr;
  uint uVar2;
  char *pcVar3;
  undefined4 uVar4;
  int iVar5;
  undefined *puVar6;
  
  puVar6 = PTR_COLS_0007af78;
  if (*DAT_0007b678 == '\0') {
    __ptr = (void *)FUN_0003dbd0(0,&DAT_0005ec5b);
  }
  else {
    __s = (char *)FUN_0003fe90(DAT_0007b678,0,*(int *)PTR_COLS_0007af78 / 3,0);
    sVar1 = strlen(__s);
    __ptr = (void *)FUN_0003da70(sVar1 + 7);
    uVar2 = FUN_0003e0c0(DAT_0007b678);
    pcVar3 = "...";
    if (uVar2 <= (uint)(*(int *)puVar6 / 3)) {
      pcVar3 = "";
    }
    __sprintf_chk(__ptr,1,0xffffffff," [%s%s]",__s,pcVar3);
    free(__s);
  }
  puVar6 = &DAT_0005ec5b;
  if (param_1 == '\0') {
    puVar6 = (undefined *)dcgettext(0," [Backwards]",5);
  }
  uVar4 = dcgettext(0,"Search",5);
  iVar5 = FUN_0002f940(0,0,0x800,0,PTR_DAT_0007aea8,FUN_00015800,"%s%s%s",uVar4,puVar6,__ptr);
  free(__ptr);
  if (iVar5 == -2) {
    if (*DAT_0007b678 != '\0') {
      return 0;
    }
  }
  else if (-1 < iVar5) {
    return iVar5;
  }
  uVar4 = dcgettext(0,"Cancelled",5);
  FUN_00041580(uVar4);
  return iVar5;
}

