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

void do_statusbar_output(int *the_input,size_t input_len,_Bool filtering)

{
  int *piVar1;
  int iVar2;
  int iVar3;
  _Bool _Var4;
  undefined1 *__ptr;
  undefined1 *puVar5;
  size_t __n;
  size_t sVar6;
  char *pcVar7;
  uint uVar8;
  int in_GS_OFFSET;
  char onechar [6];
  
  iVar2 = *(int *)(in_GS_OFFSET + 0x14);
  __ptr = (undefined1 *)nmalloc(input_len + 1);
  if (input_len != 0) {
    piVar1 = the_input + input_len;
    puVar5 = __ptr;
    do {
      iVar3 = *the_input;
      the_input = the_input + 1;
      *puVar5 = (char)iVar3;
      puVar5 = puVar5 + 1;
    } while (piVar1 != the_input);
    __ptr[input_len] = 0;
    uVar8 = 0;
    do {
      pcVar7 = __ptr + uVar8;
      if (*pcVar7 == '\0') {
        *pcVar7 = '\n';
      }
      __n = parse_mbchar(pcVar7,onechar,(size_t *)0x0);
      uVar8 = uVar8 + __n;
      if (filtering) {
        _Var4 = is_ascii_cntrl_char((int)*pcVar7);
        if (!_Var4) goto LAB_0002e71f;
      }
      else {
LAB_0002e71f:
        pcVar7 = answer;
        sVar6 = strlen(answer);
        pcVar7 = (char *)nrealloc(pcVar7,__n + 1 + sVar6);
        answer = pcVar7;
        sVar6 = strlen(pcVar7);
        memmove(pcVar7 + typing_x + __n,pcVar7 + typing_x,sVar6 + (1 - typing_x));
        strncpy(answer + typing_x,onechar,__n);
        typing_x = typing_x + __n;
      }
    } while (uVar8 < input_len);
  }
  free(__ptr);
  if (iVar2 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



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

void FUN_0002e650(undefined4 *param_1,uint param_2,char param_3)

{
  undefined4 *puVar1;
  undefined4 uVar2;
  char cVar3;
  undefined1 *__ptr;
  undefined1 *puVar4;
  size_t __n;
  size_t sVar5;
  char *pcVar6;
  uint uVar7;
  int in_GS_OFFSET;
  char local_26 [6];
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x2e659;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  __ptr = (undefined1 *)FUN_0003da70(param_2 + 1);
  if (param_2 != 0) {
    puVar1 = param_1 + param_2;
    puVar4 = __ptr;
    do {
      uVar2 = *param_1;
      param_1 = param_1 + 1;
      *puVar4 = (char)uVar2;
      puVar4 = puVar4 + 1;
    } while (puVar1 != param_1);
    __ptr[param_2] = 0;
    uVar7 = 0;
    do {
      pcVar6 = __ptr + uVar7;
      if (*pcVar6 == '\0') {
        *pcVar6 = '\n';
      }
      __n = FUN_00018090(pcVar6,local_26,0);
      uVar7 = uVar7 + __n;
      if (param_3 == '\0') {
LAB_0002e71f:
        pcVar6 = DAT_0007b61c;
        sVar5 = strlen(DAT_0007b61c);
        pcVar6 = (char *)FUN_0003dad0(pcVar6,__n + 1 + sVar5);
        DAT_0007b61c = pcVar6;
        sVar5 = strlen(pcVar6);
        memmove(pcVar6 + DAT_0007b414 + __n,pcVar6 + DAT_0007b414,sVar5 + (1 - DAT_0007b414));
        strncpy(DAT_0007b61c + DAT_0007b414,local_26,__n);
        DAT_0007b414 = DAT_0007b414 + __n;
      }
      else {
        cVar3 = FUN_00017ab0((int)*pcVar6);
        if (cVar3 == '\0') goto LAB_0002e71f;
      }
    } while (uVar7 < param_2);
  }
  free(__ptr);
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0005a8b0();
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00015680
ADD EBX,0x4c577
SUB ESP,0x38
MOVZX EAX,byte ptr [ESP + 0x54]
MOV ESI,dword ptr [ESP + 0x4c]
MOV byte ptr [ESP + 0x1b],AL
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x28],EAX
XOR EAX,EAX
MOV EAX,dword ptr [ESP + 0x50]
ADD EAX,0x1
PUSH EAX
CALL 0x0003da70
MOV dword ptr [ESP + 0x18],EAX
ADD ESP,0x10
MOV EDI,dword ptr [ESP + 0x44]
TEST EDI,EDI
JZ 0x0002e798
MOV EDI,dword ptr [ESP + 0x44]
MOV EAX,dword ptr [ESP + 0x8]
LEA EDX,[ESI + EDI*0x4]
LEA ESI,[ESI]
LEA ESI,[ESI]
MOV ECX,dword ptr [ESI]
ADD ESI,0x4
ADD EAX,0x1
MOV byte ptr [EAX + -0x1],CL
CMP EDX,ESI
JNZ 0x0002e6b0
MOV EAX,dword ptr [ESP + 0x8]
MOV EDI,dword ptr [ESP + 0x44]
MOV byte ptr [EAX + EDI*0x1],0x0
LEA EAX,[ESP + 0x16]
XOR EDI,EDI
MOV dword ptr [ESP + 0x4],EAX
LEA EAX,[EBX + 0xa4c]
MOV dword ptr [ESP],EAX
NOP
MOV EAX,dword ptr [ESP + 0x8]
LEA ESI,[EAX + EDI*0x1]
CMP byte ptr [ESI],0x0
JNZ 0x0002e6ef
MOV byte ptr [ESI],0xa
SUB ESP,0x4
PUSH 0x0
PUSH dword ptr [ESP + 0xc]
PUSH ESI
CALL 0x00018090
ADD ESP,0x10
ADD EDI,EAX
CMP byte ptr [ESP + 0xf],0x0
MOV EBP,EAX
JZ 0x0002e71f
MOVSX EAX,byte ptr [ESI]
SUB ESP,0xc
PUSH EAX
CALL 0x00017ab0
ADD ESP,0x10
TEST AL,AL
JNZ 0x0002e78e
MOV EAX,dword ptr [ESP]
SUB ESP,0xc
MOV ESI,dword ptr [EAX]
PUSH ESI
CALL 0x00013630
POP EDX
POP ECX
LEA EAX,[EBP + EAX*0x1 + 0x1]
PUSH EAX
PUSH ESI
CALL 0x0003dad0
MOV ESI,EAX
MOV EAX,dword ptr [ESP + 0x10]
MOV dword ptr [EAX],ESI
MOV dword ptr [ESP],ESI
CALL 0x00013630
MOV EDX,dword ptr [EBX + 0x844]
MOV ECX,0x1
ADD ESP,0xc
SUB ECX,EDX
ADD EAX,ECX
PUSH EAX
LEA EAX,[ESI + EDX*0x1]
ADD EDX,EBP
ADD ESI,EDX
PUSH EAX
PUSH ESI
CALL 0x000131e0
ADD ESP,0xc
MOV EAX,dword ptr [EBX + 0x844]
PUSH EBP
PUSH dword ptr [ESP + 0xc]
MOV ECX,dword ptr [ESP + 0xc]
ADD EAX,dword ptr [ECX]
PUSH EAX
CALL 0x00013750
ADD dword ptr [EBX + 0x844],EBP
ADD ESP,0x10
CMP dword ptr [ESP + 0x44],EDI
JA 0x0002e6e0
SUB ESP,0xc
PUSH dword ptr [ESP + 0x14]
CALL 0x00013200
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0x1c]
XOR EAX,dword ptr GS:[0x14]
JNZ 0x0002e7bc
ADD ESP,0x2c
POP EBX
POP ESI
POP EDI
POP EBP
RET
CALL 0x0005a8b0
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_0002e650(undefined4 *param_1,uint param_2,char param_3)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  char cVar3;\n  undefined1 *__ptr;\n  undefined1 *puVar4;\n  size_t __n;\n  size_t sVar5;\n  char *pcVar6;\n  uint uVar7;\n  int in_GS_OFFSET;\n  char local_26 [6];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x2e659;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __ptr = (undefined1 *)FUN_0003da70(param_2 + 1);\n  if (param_2 != 0) {\n    puVar1 = param_1 + param_2;\n    puVar4 = __ptr;\n    do {\n      uVar2 = *param_1;\n      param_1 = param_1 + 1;\n      *puVar4 = (char)uVar2;\n      puVar4 = puVar4 + 1;\n    } while (puVar1 != param_1);\n    __ptr[param_2] = 0;\n    uVar7 = 0;\n    do {\n      pcVar6 = __ptr + uVar7;\n      if (*pcVar6 == '\0') {\n        *pcVar6 = '\n';\n      }\n      __n = FUN_00018090(pcVar6,local_26,0);\n      uVar7 = uVar7 + __n;\n      if (param_3 == '\0') {\nLAB_0002e71f:\n        pcVar6 = DAT_0007b61c;\n        sVar5 = strlen(DAT_0007b61c);\n        pcVar6 = (char *)FUN_0003dad0(pcVar6,__n + 1 + sVar5);\n        DAT_0007b61c = pcVar6;\n        sVar5 = strlen(pcVar6);\n        memmove(pcVar6 + DAT_0007b414 + __n,pcVar6 + DAT_0007b414,sVar5 + (1 - DAT_0007b414));\n        strncpy(DAT_0007b61c + DAT_0007b414,local_26,__n);\n        DAT_0007b414 = DAT_0007b414 + __n;\n      }\n      else {\n        cVar3 = FUN_00017ab0((int)*pcVar6);\n        if (cVar3 == '\0') goto LAB_0002e71f;\n      }\n    } while (uVar7 < param_2);\n  }\n  free(__ptr);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0005a8b0();\n}\n\n" comment (function_definition "void FUN_0002e650(undefined4 *param_1,uint param_2,char param_3)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  char cVar3;\n  undefined1 *__ptr;\n  undefined1 *puVar4;\n  size_t __n;\n  size_t sVar5;\n  char *pcVar6;\n  uint uVar7;\n  int in_GS_OFFSET;\n  char local_26 [6];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x2e659;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __ptr = (undefined1 *)FUN_0003da70(param_2 + 1);\n  if (param_2 != 0) {\n    puVar1 = param_1 + param_2;\n    puVar4 = __ptr;\n    do {\n      uVar2 = *param_1;\n      param_1 = param_1 + 1;\n      *puVar4 = (char)uVar2;\n      puVar4 = puVar4 + 1;\n    } while (puVar1 != param_1);\n    __ptr[param_2] = 0;\n    uVar7 = 0;\n    do {\n      pcVar6 = __ptr + uVar7;\n      if (*pcVar6 == '\0') {\n        *pcVar6 = '\n';\n      }\n      __n = FUN_00018090(pcVar6,local_26,0);\n      uVar7 = uVar7 + __n;\n      if (param_3 == '\0') {\nLAB_0002e71f:\n        pcVar6 = DAT_0007b61c;\n        sVar5 = strlen(DAT_0007b61c);\n        pcVar6 = (char *)FUN_0003dad0(pcVar6,__n + 1 + sVar5);\n        DAT_0007b61c = pcVar6;\n        sVar5 = strlen(pcVar6);\n        memmove(pcVar6 + DAT_0007b414 + __n,pcVar6 + DAT_0007b414,sVar5 + (1 - DAT_0007b414));\n        strncpy(DAT_0007b61c + DAT_0007b414,local_26,__n);\n        DAT_0007b414 = DAT_0007b414 + __n;\n      }\n      else {\n        cVar3 = FUN_00017ab0((int)*pcVar6);\n        if (cVar3 == '\0') goto LAB_0002e71f;\n      }\n    } while (uVar7 < param_2);\n  }\n  free(__ptr);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0005a8b0();\n}" primitive_type (function_declarator "FUN_0002e650(undefined4 *param_1,uint param_2,char param_3)" identifier (parameter_list "(undefined4 *param_1,uint param_2,char param_3)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "char param_3" primitive_type identifier) ))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  char cVar3;\n  undefined1 *__ptr;\n  undefined1 *puVar4;\n  size_t __n;\n  size_t sVar5;\n  char *pcVar6;\n  uint uVar7;\n  int in_GS_OFFSET;\n  char local_26 [6];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x2e659;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __ptr = (undefined1 *)FUN_0003da70(param_2 + 1);\n  if (param_2 != 0) {\n    puVar1 = param_1 + param_2;\n    puVar4 = __ptr;\n    do {\n      uVar2 = *param_1;\n      param_1 = param_1 + 1;\n      *puVar4 = (char)uVar2;\n      puVar4 = puVar4 + 1;\n    } while (puVar1 != param_1);\n    __ptr[param_2] = 0;\n    uVar7 = 0;\n    do {\n      pcVar6 = __ptr + uVar7;\n      if (*pcVar6 == '\0') {\n        *pcVar6 = '\n';\n      }\n      __n = FUN_00018090(pcVar6,local_26,0);\n      uVar7 = uVar7 + __n;\n      if (param_3 == '\0') {\nLAB_0002e71f:\n        pcVar6 = DAT_0007b61c;\n        sVar5 = strlen(DAT_0007b61c);\n        pcVar6 = (char *)FUN_0003dad0(pcVar6,__n + 1 + sVar5);\n        DAT_0007b61c = pcVar6;\n        sVar5 = strlen(pcVar6);\n        memmove(pcVar6 + DAT_0007b414 + __n,pcVar6 + DAT_0007b414,sVar5 + (1 - DAT_0007b414));\n        strncpy(DAT_0007b61c + DAT_0007b414,local_26,__n);\n        DAT_0007b414 = DAT_0007b414 + __n;\n      }\n      else {\n        cVar3 = FUN_00017ab0((int)*pcVar6);\n        if (cVar3 == '\0') goto LAB_0002e71f;\n      }\n    } while (uVar7 < param_2);\n  }\n  free(__ptr);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0005a8b0();\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "char cVar3;" primitive_type identifier ;) (declaration "undefined1 *__ptr;" type_identifier (pointer_declarator "*__ptr" * identifier) ;) (declaration "undefined1 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "size_t sVar5;" primitive_type identifier ;) (declaration "char *pcVar6;" primitive_type (pointer_declarator "*pcVar6" * identifier) ;) (declaration "uint uVar7;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char local_26 [6];" primitive_type (array_declarator "local_26 [6]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x2e659;" (assignment_expression "uStack_14 = 0x2e659" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "__ptr = (undefined1 *)FUN_0003da70(param_2 + 1);" (assignment_expression "__ptr = (undefined1 *)FUN_0003da70(param_2 + 1)" identifier = (cast_expression "(undefined1 *)FUN_0003da70(param_2 + 1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0003da70(param_2 + 1)" identifier (argument_list "(param_2 + 1)" ( (binary_expression "param_2 + 1" identifier + number_literal) ))))) ;) (if_statement "if (param_2 != 0) {\n    puVar1 = param_1 + param_2;\n    puVar4 = __ptr;\n    do {\n      uVar2 = *param_1;\n      param_1 = param_1 + 1;\n      *puVar4 = (char)uVar2;\n      puVar4 = puVar4 + 1;\n    } while (puVar1 != param_1);\n    __ptr[param_2] = 0;\n    uVar7 = 0;\n    do {\n      pcVar6 = __ptr + uVar7;\n      if (*pcVar6 == '\0') {\n        *pcVar6 = '\n';\n      }\n      __n = FUN_00018090(pcVar6,local_26,0);\n      uVar7 = uVar7 + __n;\n      if (param_3 == '\0') {\nLAB_0002e71f:\n        pcVar6 = DAT_0007b61c;\n        sVar5 = strlen(DAT_0007b61c);\n        pcVar6 = (char *)FUN_0003dad0(pcVar6,__n + 1 + sVar5);\n        DAT_0007b61c = pcVar6;\n        sVar5 = strlen(pcVar6);\n        memmove(pcVar6 + DAT_0007b414 + __n,pcVar6 + DAT_0007b414,sVar5 + (1 - DAT_0007b414));\n        strncpy(DAT_0007b61c + DAT_0007b414,local_26,__n);\n        DAT_0007b414 = DAT_0007b414 + __n;\n      }\n      else {\n        cVar3 = FUN_00017ab0((int)*pcVar6);\n        if (cVar3 == '\0') goto LAB_0002e71f;\n      }\n    } while (uVar7 < param_2);\n  }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n    puVar1 = param_1 + param_2;\n    puVar4 = __ptr;\n    do {\n      uVar2 = *param_1;\n      param_1 = param_1 + 1;\n      *puVar4 = (char)uVar2;\n      puVar4 = puVar4 + 1;\n    } while (puVar1 != param_1);\n    __ptr[param_2] = 0;\n    uVar7 = 0;\n    do {\n      pcVar6 = __ptr + uVar7;\n      if (*pcVar6 == '\0') {\n        *pcVar6 = '\n';\n      }\n      __n = FUN_00018090(pcVar6,local_26,0);\n      uVar7 = uVar7 + __n;\n      if (param_3 == '\0') {\nLAB_0002e71f:\n        pcVar6 = DAT_0007b61c;\n        sVar5 = strlen(DAT_0007b61c);\n        pcVar6 = (char *)FUN_0003dad0(pcVar6,__n + 1 + sVar5);\n        DAT_0007b61c = pcVar6;\n        sVar5 = strlen(pcVar6);\n        memmove(pcVar6 + DAT_0007b414 + __n,pcVar6 + DAT_0007b414,sVar5 + (1 - DAT_0007b414));\n        strncpy(DAT_0007b61c + DAT_0007b414,local_26,__n);\n        DAT_0007b414 = DAT_0007b414 + __n;\n      }\n      else {\n        cVar3 = FUN_00017ab0((int)*pcVar6);\n        if (cVar3 == '\0') goto LAB_0002e71f;\n      }\n    } while (uVar7 < param_2);\n  }" { (expression_statement "puVar1 = param_1 + param_2;" (assignment_expression "puVar1 = param_1 + param_2" identifier = (binary_expression "param_1 + param_2" identifier + identifier)) ;) (expression_statement "puVar4 = __ptr;" (assignment_expression "puVar4 = __ptr" identifier = identifier) ;) (do_statement "do {\n      uVar2 = *param_1;\n      param_1 = param_1 + 1;\n      *puVar4 = (char)uVar2;\n      puVar4 = puVar4 + 1;\n    } while (puVar1 != param_1);" do (compound_statement "{\n      uVar2 = *param_1;\n      param_1 = param_1 + 1;\n      *puVar4 = (char)uVar2;\n      puVar4 = puVar4 + 1;\n    }" { (expression_statement "uVar2 = *param_1;" (assignment_expression "uVar2 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) (expression_statement "*puVar4 = (char)uVar2;" (assignment_expression "*puVar4 = (char)uVar2" (pointer_expression "*puVar4" * identifier) = (cast_expression "(char)uVar2" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (expression_statement "puVar4 = puVar4 + 1;" (assignment_expression "puVar4 = puVar4 + 1" identifier = (binary_expression "puVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(puVar1 != param_1)" ( (binary_expression "puVar1 != param_1" identifier != identifier) )) ;) (expression_statement "__ptr[param_2] = 0;" (assignment_expression "__ptr[param_2] = 0" (subscript_expression "__ptr[param_2]" identifier [ identifier ]) = number_literal) ;) (expression_statement "uVar7 = 0;" (assignment_expression "uVar7 = 0" identifier = number_literal) ;) (do_statement "do {\n      pcVar6 = __ptr + uVar7;\n      if (*pcVar6 == '\0') {\n        *pcVar6 = '\n';\n      }\n      __n = FUN_00018090(pcVar6,local_26,0);\n      uVar7 = uVar7 + __n;\n      if (param_3 == '\0') {\nLAB_0002e71f:\n        pcVar6 = DAT_0007b61c;\n        sVar5 = strlen(DAT_0007b61c);\n        pcVar6 = (char *)FUN_0003dad0(pcVar6,__n + 1 + sVar5);\n        DAT_0007b61c = pcVar6;\n        sVar5 = strlen(pcVar6);\n        memmove(pcVar6 + DAT_0007b414 + __n,pcVar6 + DAT_0007b414,sVar5 + (1 - DAT_0007b414));\n        strncpy(DAT_0007b61c + DAT_0007b414,local_26,__n);\n        DAT_0007b414 = DAT_0007b414 + __n;\n      }\n      else {\n        cVar3 = FUN_00017ab0((int)*pcVar6);\n        if (cVar3 == '\0') goto LAB_0002e71f;\n      }\n    } while (uVar7 < param_2);" do (compound_statement "{\n      pcVar6 = __ptr + uVar7;\n      if (*pcVar6 == '\0') {\n        *pcVar6 = '\n';\n      }\n      __n = FUN_00018090(pcVar6,local_26,0);\n      uVar7 = uVar7 + __n;\n      if (param_3 == '\0') {\nLAB_0002e71f:\n        pcVar6 = DAT_0007b61c;\n        sVar5 = strlen(DAT_0007b61c);\n        pcVar6 = (char *)FUN_0003dad0(pcVar6,__n + 1 + sVar5);\n        DAT_0007b61c = pcVar6;\n        sVar5 = strlen(pcVar6);\n        memmove(pcVar6 + DAT_0007b414 + __n,pcVar6 + DAT_0007b414,sVar5 + (1 - DAT_0007b414));\n        strncpy(DAT_0007b61c + DAT_0007b414,local_26,__n);\n        DAT_0007b414 = DAT_0007b414 + __n;\n      }\n      else {\n        cVar3 = FUN_00017ab0((int)*pcVar6);\n        if (cVar3 == '\0') goto LAB_0002e71f;\n      }\n    }" { (expression_statement "pcVar6 = __ptr + uVar7;" (assignment_expression "pcVar6 = __ptr + uVar7" identifier = (binary_expression "__ptr + uVar7" identifier + identifier)) ;) (if_statement "if (*pcVar6 == '\0') {\n        *pcVar6 = '\n';\n      }" if (parenthesized_expression "(*pcVar6 == '\0')" ( (binary_expression "*pcVar6 == '\0'" (pointer_expression "*pcVar6" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        *pcVar6 = '\n';\n      }" { (expression_statement "*pcVar6 = '\n';" (assignment_expression "*pcVar6 = '\n'" (pointer_expression "*pcVar6" * identifier) = (char_literal "'\n'" ' escape_sequence ')) ;) })) (expression_statement "__n = FUN_00018090(pcVar6,local_26,0);" (assignment_expression "__n = FUN_00018090(pcVar6,local_26,0)" identifier = (call_expression "FUN_00018090(pcVar6,local_26,0)" identifier (argument_list "(pcVar6,local_26,0)" ( identifier , identifier , number_literal )))) ;) (expression_statement "uVar7 = uVar7 + __n;" (assignment_expression "uVar7 = uVar7 + __n" identifier = (binary_expression "uVar7 + __n" identifier + identifier)) ;) (if_statement "if (param_3 == '\0') {\nLAB_0002e71f:\n        pcVar6 = DAT_0007b61c;\n        sVar5 = strlen(DAT_0007b61c);\n        pcVar6 = (char *)FUN_0003dad0(pcVar6,__n + 1 + sVar5);\n        DAT_0007b61c = pcVar6;\n        sVar5 = strlen(pcVar6);\n        memmove(pcVar6 + DAT_0007b414 + __n,pcVar6 + DAT_0007b414,sVar5 + (1 - DAT_0007b414));\n        strncpy(DAT_0007b61c + DAT_0007b414,local_26,__n);\n        DAT_0007b414 = DAT_0007b414 + __n;\n      }\n      else {\n        cVar3 = FUN_00017ab0((int)*pcVar6);\n        if (cVar3 == '\0') goto LAB_0002e71f;\n      }" if (parenthesized_expression "(param_3 == '\0')" ( (binary_expression "param_3 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\nLAB_0002e71f:\n        pcVar6 = DAT_0007b61c;\n        sVar5 = strlen(DAT_0007b61c);\n        pcVar6 = (char *)FUN_0003dad0(pcVar6,__n + 1 + sVar5);\n        DAT_0007b61c = pcVar6;\n        sVar5 = strlen(pcVar6);\n        memmove(pcVar6 + DAT_0007b414 + __n,pcVar6 + DAT_0007b414,sVar5 + (1 - DAT_0007b414));\n        strncpy(DAT_0007b61c + DAT_0007b414,local_26,__n);\n        DAT_0007b414 = DAT_0007b414 + __n;\n      }" { (labeled_statement "LAB_0002e71f:\n        pcVar6 = DAT_0007b61c;" statement_identifier : (expression_statement "pcVar6 = DAT_0007b61c;" (assignment_expression "pcVar6 = DAT_0007b61c" identifier = identifier) ;)) (expression_statement "sVar5 = strlen(DAT_0007b61c);" (assignment_expression "sVar5 = strlen(DAT_0007b61c)" identifier = (call_expression "strlen(DAT_0007b61c)" identifier (argument_list "(DAT_0007b61c)" ( identifier )))) ;) (expression_statement "pcVar6 = (char *)FUN_0003dad0(pcVar6,__n + 1 + sVar5);" (assignment_expression "pcVar6 = (char *)FUN_0003dad0(pcVar6,__n + 1 + sVar5)" identifier = (cast_expression "(char *)FUN_0003dad0(pcVar6,__n + 1 + sVar5)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0003dad0(pcVar6,__n + 1 + sVar5)" identifier (argument_list "(pcVar6,__n + 1 + sVar5)" ( identifier , (binary_expression "__n + 1 + sVar5" (binary_expression "__n + 1" identifier + number_literal) + identifier) ))))) ;) (expression_statement "DAT_0007b61c = pcVar6;" (assignment_expression "DAT_0007b61c = pcVar6" identifier = identifier) ;) (expression_statement "sVar5 = strlen(pcVar6);" (assignment_expression "sVar5 = strlen(pcVar6)" identifier = (call_expression "strlen(pcVar6)" identifier (argument_list "(pcVar6)" ( identifier )))) ;) (expression_statement "memmove(pcVar6 + DAT_0007b414 + __n,pcVar6 + DAT_0007b414,sVar5 + (1 - DAT_0007b414));" (call_expression "memmove(pcVar6 + DAT_0007b414 + __n,pcVar6 + DAT_0007b414,sVar5 + (1 - DAT_0007b414))" identifier (argument_list "(pcVar6 + DAT_0007b414 + __n,pcVar6 + DAT_0007b414,sVar5 + (1 - DAT_0007b414))" ( (binary_expression "pcVar6 + DAT_0007b414 + __n" (binary_expression "pcVar6 + DAT_0007b414" identifier + identifier) + identifier) , (binary_expression "pcVar6 + DAT_0007b414" identifier + identifier) , (binary_expression "sVar5 + (1 - DAT_0007b414)" identifier + (parenthesized_expression "(1 - DAT_0007b414)" ( (binary_expression "1 - DAT_0007b414" number_literal - identifier) ))) ))) ;) (expression_statement "strncpy(DAT_0007b61c + DAT_0007b414,local_26,__n);" (call_expression "strncpy(DAT_0007b61c + DAT_0007b414,local_26,__n)" identifier (argument_list "(DAT_0007b61c + DAT_0007b414,local_26,__n)" ( (binary_expression "DAT_0007b61c + DAT_0007b414" identifier + identifier) , identifier , identifier ))) ;) (expression_statement "DAT_0007b414 = DAT_0007b414 + __n;" (assignment_expression "DAT_0007b414 = DAT_0007b414 + __n" identifier = (binary_expression "DAT_0007b414 + __n" identifier + identifier)) ;) }) (else_clause "else {\n        cVar3 = FUN_00017ab0((int)*pcVar6);\n        if (cVar3 == '\0') goto LAB_0002e71f;\n      }" else (compound_statement "{\n        cVar3 = FUN_00017ab0((int)*pcVar6);\n        if (cVar3 == '\0') goto LAB_0002e71f;\n      }" { (expression_statement "cVar3 = FUN_00017ab0((int)*pcVar6);" (assignment_expression "cVar3 = FUN_00017ab0((int)*pcVar6)" identifier = (call_expression "FUN_00017ab0((int)*pcVar6)" identifier (argument_list "((int)*pcVar6)" ( (cast_expression "(int)*pcVar6" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*pcVar6" * identifier)) )))) ;) (if_statement "if (cVar3 == '\0') goto LAB_0002e71f;" if (parenthesized_expression "(cVar3 == '\0')" ( (binary_expression "cVar3 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (goto_statement "goto LAB_0002e71f;" goto statement_identifier ;)) }))) }) while (parenthesized_expression "(uVar7 < param_2)" ( (binary_expression "uVar7 < param_2" identifier < identifier) )) ;) })) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) comment (expression_statement "FUN_0005a8b0();" (call_expression "FUN_0005a8b0()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nvoid do_statusbar_output(int *the_input,size_t input_len,_Bool filtering)\n\n{\n  int *piVar1;\n  int iVar2;\n  int iVar3;\n  _Bool _Var4;\n  undefined1 *__ptr;\n  undefined1 *puVar5;\n  size_t __n;\n  size_t sVar6;\n  char *pcVar7;\n  uint uVar8;\n  int in_GS_OFFSET;\n  char onechar [6];\n  \n  iVar2 = *(int *)(in_GS_OFFSET + 0x14);\n  __ptr = (undefined1 *)nmalloc(input_len + 1);\n  if (input_len != 0) {\n    piVar1 = the_input + input_len;\n    puVar5 = __ptr;\n    do {\n      iVar3 = *the_input;\n      the_input = the_input + 1;\n      *puVar5 = (char)iVar3;\n      puVar5 = puVar5 + 1;\n    } while (piVar1 != the_input);\n    __ptr[input_len] = 0;\n    uVar8 = 0;\n    do {\n      pcVar7 = __ptr + uVar8;\n      if (*pcVar7 == '\0') {\n        *pcVar7 = '\n';\n      }\n      __n = parse_mbchar(pcVar7,onechar,(size_t *)0x0);\n      uVar8 = uVar8 + __n;\n      if (filtering) {\n        _Var4 = is_ascii_cntrl_char((int)*pcVar7);\n        if (!_Var4) goto LAB_0002e71f;\n      }\n      else {\nLAB_0002e71f:\n        pcVar7 = answer;\n        sVar6 = strlen(answer);\n        pcVar7 = (char *)nrealloc(pcVar7,__n + 1 + sVar6);\n        answer = pcVar7;\n        sVar6 = strlen(pcVar7);\n        memmove(pcVar7 + typing_x + __n,pcVar7 + typing_x,sVar6 + (1 - typing_x));\n        strncpy(answer + typing_x,onechar,__n);\n        typing_x = typing_x + __n;\n      }\n    } while (uVar8 < input_len);\n  }\n  free(__ptr);\n  if (iVar2 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment comment (function_definition "void do_statusbar_output(int *the_input,size_t input_len,_Bool filtering)\n\n{\n  int *piVar1;\n  int iVar2;\n  int iVar3;\n  _Bool _Var4;\n  undefined1 *__ptr;\n  undefined1 *puVar5;\n  size_t __n;\n  size_t sVar6;\n  char *pcVar7;\n  uint uVar8;\n  int in_GS_OFFSET;\n  char onechar [6];\n  \n  iVar2 = *(int *)(in_GS_OFFSET + 0x14);\n  __ptr = (undefined1 *)nmalloc(input_len + 1);\n  if (input_len != 0) {\n    piVar1 = the_input + input_len;\n    puVar5 = __ptr;\n    do {\n      iVar3 = *the_input;\n      the_input = the_input + 1;\n      *puVar5 = (char)iVar3;\n      puVar5 = puVar5 + 1;\n    } while (piVar1 != the_input);\n    __ptr[input_len] = 0;\n    uVar8 = 0;\n    do {\n      pcVar7 = __ptr + uVar8;\n      if (*pcVar7 == '\0') {\n        *pcVar7 = '\n';\n      }\n      __n = parse_mbchar(pcVar7,onechar,(size_t *)0x0);\n      uVar8 = uVar8 + __n;\n      if (filtering) {\n        _Var4 = is_ascii_cntrl_char((int)*pcVar7);\n        if (!_Var4) goto LAB_0002e71f;\n      }\n      else {\nLAB_0002e71f:\n        pcVar7 = answer;\n        sVar6 = strlen(answer);\n        pcVar7 = (char *)nrealloc(pcVar7,__n + 1 + sVar6);\n        answer = pcVar7;\n        sVar6 = strlen(pcVar7);\n        memmove(pcVar7 + typing_x + __n,pcVar7 + typing_x,sVar6 + (1 - typing_x));\n        strncpy(answer + typing_x,onechar,__n);\n        typing_x = typing_x + __n;\n      }\n    } while (uVar8 < input_len);\n  }\n  free(__ptr);\n  if (iVar2 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (function_declarator "do_statusbar_output(int *the_input,size_t input_len,_Bool filtering)" identifier (parameter_list "(int *the_input,size_t input_len,_Bool filtering)" ( (parameter_declaration "int *the_input" primitive_type (pointer_declarator "*the_input" * identifier)) , (parameter_declaration "size_t input_len" primitive_type identifier) , (parameter_declaration "_Bool filtering" type_identifier identifier) ))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  int iVar3;\n  _Bool _Var4;\n  undefined1 *__ptr;\n  undefined1 *puVar5;\n  size_t __n;\n  size_t sVar6;\n  char *pcVar7;\n  uint uVar8;\n  int in_GS_OFFSET;\n  char onechar [6];\n  \n  iVar2 = *(int *)(in_GS_OFFSET + 0x14);\n  __ptr = (undefined1 *)nmalloc(input_len + 1);\n  if (input_len != 0) {\n    piVar1 = the_input + input_len;\n    puVar5 = __ptr;\n    do {\n      iVar3 = *the_input;\n      the_input = the_input + 1;\n      *puVar5 = (char)iVar3;\n      puVar5 = puVar5 + 1;\n    } while (piVar1 != the_input);\n    __ptr[input_len] = 0;\n    uVar8 = 0;\n    do {\n      pcVar7 = __ptr + uVar8;\n      if (*pcVar7 == '\0') {\n        *pcVar7 = '\n';\n      }\n      __n = parse_mbchar(pcVar7,onechar,(size_t *)0x0);\n      uVar8 = uVar8 + __n;\n      if (filtering) {\n        _Var4 = is_ascii_cntrl_char((int)*pcVar7);\n        if (!_Var4) goto LAB_0002e71f;\n      }\n      else {\nLAB_0002e71f:\n        pcVar7 = answer;\n        sVar6 = strlen(answer);\n        pcVar7 = (char *)nrealloc(pcVar7,__n + 1 + sVar6);\n        answer = pcVar7;\n        sVar6 = strlen(pcVar7);\n        memmove(pcVar7 + typing_x + __n,pcVar7 + typing_x,sVar6 + (1 - typing_x));\n        strncpy(answer + typing_x,onechar,__n);\n        typing_x = typing_x + __n;\n      }\n    } while (uVar8 < input_len);\n  }\n  free(__ptr);\n  if (iVar2 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "_Bool _Var4;" type_identifier identifier ;) (declaration "undefined1 *__ptr;" type_identifier (pointer_declarator "*__ptr" * identifier) ;) (declaration "undefined1 *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "size_t sVar6;" primitive_type identifier ;) (declaration "char *pcVar7;" primitive_type (pointer_declarator "*pcVar7" * identifier) ;) (declaration "uint uVar8;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char onechar [6];" primitive_type (array_declarator "onechar [6]" identifier [ number_literal ]) ;) (expression_statement "iVar2 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar2 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "__ptr = (undefined1 *)nmalloc(input_len + 1);" (assignment_expression "__ptr = (undefined1 *)nmalloc(input_len + 1)" identifier = (cast_expression "(undefined1 *)nmalloc(input_len + 1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "nmalloc(input_len + 1)" identifier (argument_list "(input_len + 1)" ( (binary_expression "input_len + 1" identifier + number_literal) ))))) ;) (if_statement "if (input_len != 0) {\n    piVar1 = the_input + input_len;\n    puVar5 = __ptr;\n    do {\n      iVar3 = *the_input;\n      the_input = the_input + 1;\n      *puVar5 = (char)iVar3;\n      puVar5 = puVar5 + 1;\n    } while (piVar1 != the_input);\n    __ptr[input_len] = 0;\n    uVar8 = 0;\n    do {\n      pcVar7 = __ptr + uVar8;\n      if (*pcVar7 == '\0') {\n        *pcVar7 = '\n';\n      }\n      __n = parse_mbchar(pcVar7,onechar,(size_t *)0x0);\n      uVar8 = uVar8 + __n;\n      if (filtering) {\n        _Var4 = is_ascii_cntrl_char((int)*pcVar7);\n        if (!_Var4) goto LAB_0002e71f;\n      }\n      else {\nLAB_0002e71f:\n        pcVar7 = answer;\n        sVar6 = strlen(answer);\n        pcVar7 = (char *)nrealloc(pcVar7,__n + 1 + sVar6);\n        answer = pcVar7;\n        sVar6 = strlen(pcVar7);\n        memmove(pcVar7 + typing_x + __n,pcVar7 + typing_x,sVar6 + (1 - typing_x));\n        strncpy(answer + typing_x,onechar,__n);\n        typing_x = typing_x + __n;\n      }\n    } while (uVar8 < input_len);\n  }" if (parenthesized_expression "(input_len != 0)" ( (binary_expression "input_len != 0" identifier != number_literal) )) (compound_statement "{\n    piVar1 = the_input + input_len;\n    puVar5 = __ptr;\n    do {\n      iVar3 = *the_input;\n      the_input = the_input + 1;\n      *puVar5 = (char)iVar3;\n      puVar5 = puVar5 + 1;\n    } while (piVar1 != the_input);\n    __ptr[input_len] = 0;\n    uVar8 = 0;\n    do {\n      pcVar7 = __ptr + uVar8;\n      if (*pcVar7 == '\0') {\n        *pcVar7 = '\n';\n      }\n      __n = parse_mbchar(pcVar7,onechar,(size_t *)0x0);\n      uVar8 = uVar8 + __n;\n      if (filtering) {\n        _Var4 = is_ascii_cntrl_char((int)*pcVar7);\n        if (!_Var4) goto LAB_0002e71f;\n      }\n      else {\nLAB_0002e71f:\n        pcVar7 = answer;\n        sVar6 = strlen(answer);\n        pcVar7 = (char *)nrealloc(pcVar7,__n + 1 + sVar6);\n        answer = pcVar7;\n        sVar6 = strlen(pcVar7);\n        memmove(pcVar7 + typing_x + __n,pcVar7 + typing_x,sVar6 + (1 - typing_x));\n        strncpy(answer + typing_x,onechar,__n);\n        typing_x = typing_x + __n;\n      }\n    } while (uVar8 < input_len);\n  }" { (expression_statement "piVar1 = the_input + input_len;" (assignment_expression "piVar1 = the_input + input_len" identifier = (binary_expression "the_input + input_len" identifier + identifier)) ;) (expression_statement "puVar5 = __ptr;" (assignment_expression "puVar5 = __ptr" identifier = identifier) ;) (do_statement "do {\n      iVar3 = *the_input;\n      the_input = the_input + 1;\n      *puVar5 = (char)iVar3;\n      puVar5 = puVar5 + 1;\n    } while (piVar1 != the_input);" do (compound_statement "{\n      iVar3 = *the_input;\n      the_input = the_input + 1;\n      *puVar5 = (char)iVar3;\n      puVar5 = puVar5 + 1;\n    }" { (expression_statement "iVar3 = *the_input;" (assignment_expression "iVar3 = *the_input" identifier = (pointer_expression "*the_input" * identifier)) ;) (expression_statement "the_input = the_input + 1;" (assignment_expression "the_input = the_input + 1" identifier = (binary_expression "the_input + 1" identifier + number_literal)) ;) (expression_statement "*puVar5 = (char)iVar3;" (assignment_expression "*puVar5 = (char)iVar3" (pointer_expression "*puVar5" * identifier) = (cast_expression "(char)iVar3" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (expression_statement "puVar5 = puVar5 + 1;" (assignment_expression "puVar5 = puVar5 + 1" identifier = (binary_expression "puVar5 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(piVar1 != the_input)" ( (binary_expression "piVar1 != the_input" identifier != identifier) )) ;) (expression_statement "__ptr[input_len] = 0;" (assignment_expression "__ptr[input_len] = 0" (subscript_expression "__ptr[input_len]" identifier [ identifier ]) = number_literal) ;) (expression_statement "uVar8 = 0;" (assignment_expression "uVar8 = 0" identifier = number_literal) ;) (do_statement "do {\n      pcVar7 = __ptr + uVar8;\n      if (*pcVar7 == '\0') {\n        *pcVar7 = '\n';\n      }\n      __n = parse_mbchar(pcVar7,onechar,(size_t *)0x0);\n      uVar8 = uVar8 + __n;\n      if (filtering) {\n        _Var4 = is_ascii_cntrl_char((int)*pcVar7);\n        if (!_Var4) goto LAB_0002e71f;\n      }\n      else {\nLAB_0002e71f:\n        pcVar7 = answer;\n        sVar6 = strlen(answer);\n        pcVar7 = (char *)nrealloc(pcVar7,__n + 1 + sVar6);\n        answer = pcVar7;\n        sVar6 = strlen(pcVar7);\n        memmove(pcVar7 + typing_x + __n,pcVar7 + typing_x,sVar6 + (1 - typing_x));\n        strncpy(answer + typing_x,onechar,__n);\n        typing_x = typing_x + __n;\n      }\n    } while (uVar8 < input_len);" do (compound_statement "{\n      pcVar7 = __ptr + uVar8;\n      if (*pcVar7 == '\0') {\n        *pcVar7 = '\n';\n      }\n      __n = parse_mbchar(pcVar7,onechar,(size_t *)0x0);\n      uVar8 = uVar8 + __n;\n      if (filtering) {\n        _Var4 = is_ascii_cntrl_char((int)*pcVar7);\n        if (!_Var4) goto LAB_0002e71f;\n      }\n      else {\nLAB_0002e71f:\n        pcVar7 = answer;\n        sVar6 = strlen(answer);\n        pcVar7 = (char *)nrealloc(pcVar7,__n + 1 + sVar6);\n        answer = pcVar7;\n        sVar6 = strlen(pcVar7);\n        memmove(pcVar7 + typing_x + __n,pcVar7 + typing_x,sVar6 + (1 - typing_x));\n        strncpy(answer + typing_x,onechar,__n);\n        typing_x = typing_x + __n;\n      }\n    }" { (expression_statement "pcVar7 = __ptr + uVar8;" (assignment_expression "pcVar7 = __ptr + uVar8" identifier = (binary_expression "__ptr + uVar8" identifier + identifier)) ;) (if_statement "if (*pcVar7 == '\0') {\n        *pcVar7 = '\n';\n      }" if (parenthesized_expression "(*pcVar7 == '\0')" ( (binary_expression "*pcVar7 == '\0'" (pointer_expression "*pcVar7" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        *pcVar7 = '\n';\n      }" { (expression_statement "*pcVar7 = '\n';" (assignment_expression "*pcVar7 = '\n'" (pointer_expression "*pcVar7" * identifier) = (char_literal "'\n'" ' escape_sequence ')) ;) })) (expression_statement "__n = parse_mbchar(pcVar7,onechar,(size_t *)0x0);" (assignment_expression "__n = parse_mbchar(pcVar7,onechar,(size_t *)0x0)" identifier = (call_expression "parse_mbchar(pcVar7,onechar,(size_t *)0x0)" identifier (argument_list "(pcVar7,onechar,(size_t *)0x0)" ( identifier , identifier , (cast_expression "(size_t *)0x0" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) )))) ;) (expression_statement "uVar8 = uVar8 + __n;" (assignment_expression "uVar8 = uVar8 + __n" identifier = (binary_expression "uVar8 + __n" identifier + identifier)) ;) (if_statement "if (filtering) {\n        _Var4 = is_ascii_cntrl_char((int)*pcVar7);\n        if (!_Var4) goto LAB_0002e71f;\n      }\n      else {\nLAB_0002e71f:\n        pcVar7 = answer;\n        sVar6 = strlen(answer);\n        pcVar7 = (char *)nrealloc(pcVar7,__n + 1 + sVar6);\n        answer = pcVar7;\n        sVar6 = strlen(pcVar7);\n        memmove(pcVar7 + typing_x + __n,pcVar7 + typing_x,sVar6 + (1 - typing_x));\n        strncpy(answer + typing_x,onechar,__n);\n        typing_x = typing_x + __n;\n      }" if (parenthesized_expression "(filtering)" ( identifier )) (compound_statement "{\n        _Var4 = is_ascii_cntrl_char((int)*pcVar7);\n        if (!_Var4) goto LAB_0002e71f;\n      }" { (expression_statement "_Var4 = is_ascii_cntrl_char((int)*pcVar7);" (assignment_expression "_Var4 = is_ascii_cntrl_char((int)*pcVar7)" identifier = (call_expression "is_ascii_cntrl_char((int)*pcVar7)" identifier (argument_list "((int)*pcVar7)" ( (cast_expression "(int)*pcVar7" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*pcVar7" * identifier)) )))) ;) (if_statement "if (!_Var4) goto LAB_0002e71f;" if (parenthesized_expression "(!_Var4)" ( (unary_expression "!_Var4" ! identifier) )) (goto_statement "goto LAB_0002e71f;" goto statement_identifier ;)) }) (else_clause "else {\nLAB_0002e71f:\n        pcVar7 = answer;\n        sVar6 = strlen(answer);\n        pcVar7 = (char *)nrealloc(pcVar7,__n + 1 + sVar6);\n        answer = pcVar7;\n        sVar6 = strlen(pcVar7);\n        memmove(pcVar7 + typing_x + __n,pcVar7 + typing_x,sVar6 + (1 - typing_x));\n        strncpy(answer + typing_x,onechar,__n);\n        typing_x = typing_x + __n;\n      }" else (compound_statement "{\nLAB_0002e71f:\n        pcVar7 = answer;\n        sVar6 = strlen(answer);\n        pcVar7 = (char *)nrealloc(pcVar7,__n + 1 + sVar6);\n        answer = pcVar7;\n        sVar6 = strlen(pcVar7);\n        memmove(pcVar7 + typing_x + __n,pcVar7 + typing_x,sVar6 + (1 - typing_x));\n        strncpy(answer + typing_x,onechar,__n);\n        typing_x = typing_x + __n;\n      }" { (labeled_statement "LAB_0002e71f:\n        pcVar7 = answer;" statement_identifier : (expression_statement "pcVar7 = answer;" (assignment_expression "pcVar7 = answer" identifier = identifier) ;)) (expression_statement "sVar6 = strlen(answer);" (assignment_expression "sVar6 = strlen(answer)" identifier = (call_expression "strlen(answer)" identifier (argument_list "(answer)" ( identifier )))) ;) (expression_statement "pcVar7 = (char *)nrealloc(pcVar7,__n + 1 + sVar6);" (assignment_expression "pcVar7 = (char *)nrealloc(pcVar7,__n + 1 + sVar6)" identifier = (cast_expression "(char *)nrealloc(pcVar7,__n + 1 + sVar6)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "nrealloc(pcVar7,__n + 1 + sVar6)" identifier (argument_list "(pcVar7,__n + 1 + sVar6)" ( identifier , (binary_expression "__n + 1 + sVar6" (binary_expression "__n + 1" identifier + number_literal) + identifier) ))))) ;) (expression_statement "answer = pcVar7;" (assignment_expression "answer = pcVar7" identifier = identifier) ;) (expression_statement "sVar6 = strlen(pcVar7);" (assignment_expression "sVar6 = strlen(pcVar7)" identifier = (call_expression "strlen(pcVar7)" identifier (argument_list "(pcVar7)" ( identifier )))) ;) (expression_statement "memmove(pcVar7 + typing_x + __n,pcVar7 + typing_x,sVar6 + (1 - typing_x));" (call_expression "memmove(pcVar7 + typing_x + __n,pcVar7 + typing_x,sVar6 + (1 - typing_x))" identifier (argument_list "(pcVar7 + typing_x + __n,pcVar7 + typing_x,sVar6 + (1 - typing_x))" ( (binary_expression "pcVar7 + typing_x + __n" (binary_expression "pcVar7 + typing_x" identifier + identifier) + identifier) , (binary_expression "pcVar7 + typing_x" identifier + identifier) , (binary_expression "sVar6 + (1 - typing_x)" identifier + (parenthesized_expression "(1 - typing_x)" ( (binary_expression "1 - typing_x" number_literal - identifier) ))) ))) ;) (expression_statement "strncpy(answer + typing_x,onechar,__n);" (call_expression "strncpy(answer + typing_x,onechar,__n)" identifier (argument_list "(answer + typing_x,onechar,__n)" ( (binary_expression "answer + typing_x" identifier + identifier) , identifier , identifier ))) ;) (expression_statement "typing_x = typing_x + __n;" (assignment_expression "typing_x = typing_x + __n" identifier = (binary_expression "typing_x + __n" identifier + identifier)) ;) }))) }) while (parenthesized_expression "(uVar8 < input_len)" ( (binary_expression "uVar8 < input_len" identifier < identifier) )) ;) })) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) (if_statement "if (iVar2 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(iVar2 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar2 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "void FUN_0002e650(undefined4 *param_1,uint param_2,char param_3)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  char cVar3;\n  undefined1 *__ptr;\n  undefined1 *puVar4;\n  size_t __n;\n  size_t sVar5;\n  char *pcVar6;\n  uint uVar7;\n  int in_GS_OFFSET;\n  char local_26 [6];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x2e659;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __ptr = (undefined1 *)FUN_0003da70(param_2 + 1);\n  if (param_2 != 0) {\n    puVar1 = param_1 + param_2;\n    puVar4 = __ptr;\n    do {\n      uVar2 = *param_1;\n      param_1 = param_1 + 1;\n      *puVar4 = (char)uVar2;\n      puVar4 = puVar4 + 1;\n    } while (puVar1 != param_1);\n    __ptr[param_2] = 0;\n    uVar7 = 0;\n    do {\n      pcVar6 = __ptr + uVar7;\n      if (*pcVar6 == '\0') {\n        *pcVar6 = '\n';\n      }\n      __n = FUN_00018090(pcVar6,local_26,0);\n      uVar7 = uVar7 + __n;\n      if (param_3 == '\0') {\nLAB_0002e71f:\n        pcVar6 = DAT_0007b61c;\n        sVar5 = strlen(DAT_0007b61c);\n        pcVar6 = (char *)FUN_0003dad0(pcVar6,__n + 1 + sVar5);\n        DAT_0007b61c = pcVar6;\n        sVar5 = strlen(pcVar6);\n        memmove(pcVar6 + DAT_0007b414 + __n,pcVar6 + DAT_0007b414,sVar5 + (1 - DAT_0007b414));\n        strncpy(DAT_0007b61c + DAT_0007b414,local_26,__n);\n        DAT_0007b414 = DAT_0007b414 + __n;\n      }\n      else {\n        cVar3 = FUN_00017ab0((int)*pcVar6);\n        if (cVar3 == '\0') goto LAB_0002e71f;\n      }\n    } while (uVar7 < param_2);\n  }\n  free(__ptr);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0005a8b0();\n}\n\n" (function_definition "void FUN_0002e650(undefined4 *param_1,uint param_2,char param_3)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  char cVar3;\n  undefined1 *__ptr;\n  undefined1 *puVar4;\n  size_t __n;\n  size_t sVar5;\n  char *pcVar6;\n  uint uVar7;\n  int in_GS_OFFSET;\n  char local_26 [6];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x2e659;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __ptr = (undefined1 *)FUN_0003da70(param_2 + 1);\n  if (param_2 != 0) {\n    puVar1 = param_1 + param_2;\n    puVar4 = __ptr;\n    do {\n      uVar2 = *param_1;\n      param_1 = param_1 + 1;\n      *puVar4 = (char)uVar2;\n      puVar4 = puVar4 + 1;\n    } while (puVar1 != param_1);\n    __ptr[param_2] = 0;\n    uVar7 = 0;\n    do {\n      pcVar6 = __ptr + uVar7;\n      if (*pcVar6 == '\0') {\n        *pcVar6 = '\n';\n      }\n      __n = FUN_00018090(pcVar6,local_26,0);\n      uVar7 = uVar7 + __n;\n      if (param_3 == '\0') {\nLAB_0002e71f:\n        pcVar6 = DAT_0007b61c;\n        sVar5 = strlen(DAT_0007b61c);\n        pcVar6 = (char *)FUN_0003dad0(pcVar6,__n + 1 + sVar5);\n        DAT_0007b61c = pcVar6;\n        sVar5 = strlen(pcVar6);\n        memmove(pcVar6 + DAT_0007b414 + __n,pcVar6 + DAT_0007b414,sVar5 + (1 - DAT_0007b414));\n        strncpy(DAT_0007b61c + DAT_0007b414,local_26,__n);\n        DAT_0007b414 = DAT_0007b414 + __n;\n      }\n      else {\n        cVar3 = FUN_00017ab0((int)*pcVar6);\n        if (cVar3 == '\0') goto LAB_0002e71f;\n      }\n    } while (uVar7 < param_2);\n  }\n  free(__ptr);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0005a8b0();\n}" primitive_type (function_declarator "FUN_0002e650(undefined4 *param_1,uint param_2,char param_3)" identifier (parameter_list "(undefined4 *param_1,uint param_2,char param_3)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "char param_3" primitive_type identifier) ))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  char cVar3;\n  undefined1 *__ptr;\n  undefined1 *puVar4;\n  size_t __n;\n  size_t sVar5;\n  char *pcVar6;\n  uint uVar7;\n  int in_GS_OFFSET;\n  char local_26 [6];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x2e659;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __ptr = (undefined1 *)FUN_0003da70(param_2 + 1);\n  if (param_2 != 0) {\n    puVar1 = param_1 + param_2;\n    puVar4 = __ptr;\n    do {\n      uVar2 = *param_1;\n      param_1 = param_1 + 1;\n      *puVar4 = (char)uVar2;\n      puVar4 = puVar4 + 1;\n    } while (puVar1 != param_1);\n    __ptr[param_2] = 0;\n    uVar7 = 0;\n    do {\n      pcVar6 = __ptr + uVar7;\n      if (*pcVar6 == '\0') {\n        *pcVar6 = '\n';\n      }\n      __n = FUN_00018090(pcVar6,local_26,0);\n      uVar7 = uVar7 + __n;\n      if (param_3 == '\0') {\nLAB_0002e71f:\n        pcVar6 = DAT_0007b61c;\n        sVar5 = strlen(DAT_0007b61c);\n        pcVar6 = (char *)FUN_0003dad0(pcVar6,__n + 1 + sVar5);\n        DAT_0007b61c = pcVar6;\n        sVar5 = strlen(pcVar6);\n        memmove(pcVar6 + DAT_0007b414 + __n,pcVar6 + DAT_0007b414,sVar5 + (1 - DAT_0007b414));\n        strncpy(DAT_0007b61c + DAT_0007b414,local_26,__n);\n        DAT_0007b414 = DAT_0007b414 + __n;\n      }\n      else {\n        cVar3 = FUN_00017ab0((int)*pcVar6);\n        if (cVar3 == '\0') goto LAB_0002e71f;\n      }\n    } while (uVar7 < param_2);\n  }\n  free(__ptr);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0005a8b0();\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "char cVar3;" primitive_type identifier ;) (declaration "undefined1 *__ptr;" type_identifier (pointer_declarator "*__ptr" * identifier) ;) (declaration "undefined1 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "size_t sVar5;" primitive_type identifier ;) (declaration "char *pcVar6;" primitive_type (pointer_declarator "*pcVar6" * identifier) ;) (declaration "uint uVar7;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char local_26 [6];" primitive_type (array_declarator "local_26 [6]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x2e659;" (assignment_expression "uStack_14 = 0x2e659" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "__ptr = (undefined1 *)FUN_0003da70(param_2 + 1);" (assignment_expression "__ptr = (undefined1 *)FUN_0003da70(param_2 + 1)" identifier = (cast_expression "(undefined1 *)FUN_0003da70(param_2 + 1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0003da70(param_2 + 1)" identifier (argument_list "(param_2 + 1)" ( (binary_expression "param_2 + 1" identifier + number_literal) ))))) ;) (if_statement "if (param_2 != 0) {\n    puVar1 = param_1 + param_2;\n    puVar4 = __ptr;\n    do {\n      uVar2 = *param_1;\n      param_1 = param_1 + 1;\n      *puVar4 = (char)uVar2;\n      puVar4 = puVar4 + 1;\n    } while (puVar1 != param_1);\n    __ptr[param_2] = 0;\n    uVar7 = 0;\n    do {\n      pcVar6 = __ptr + uVar7;\n      if (*pcVar6 == '\0') {\n        *pcVar6 = '\n';\n      }\n      __n = FUN_00018090(pcVar6,local_26,0);\n      uVar7 = uVar7 + __n;\n      if (param_3 == '\0') {\nLAB_0002e71f:\n        pcVar6 = DAT_0007b61c;\n        sVar5 = strlen(DAT_0007b61c);\n        pcVar6 = (char *)FUN_0003dad0(pcVar6,__n + 1 + sVar5);\n        DAT_0007b61c = pcVar6;\n        sVar5 = strlen(pcVar6);\n        memmove(pcVar6 + DAT_0007b414 + __n,pcVar6 + DAT_0007b414,sVar5 + (1 - DAT_0007b414));\n        strncpy(DAT_0007b61c + DAT_0007b414,local_26,__n);\n        DAT_0007b414 = DAT_0007b414 + __n;\n      }\n      else {\n        cVar3 = FUN_00017ab0((int)*pcVar6);\n        if (cVar3 == '\0') goto LAB_0002e71f;\n      }\n    } while (uVar7 < param_2);\n  }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n    puVar1 = param_1 + param_2;\n    puVar4 = __ptr;\n    do {\n      uVar2 = *param_1;\n      param_1 = param_1 + 1;\n      *puVar4 = (char)uVar2;\n      puVar4 = puVar4 + 1;\n    } while (puVar1 != param_1);\n    __ptr[param_2] = 0;\n    uVar7 = 0;\n    do {\n      pcVar6 = __ptr + uVar7;\n      if (*pcVar6 == '\0') {\n        *pcVar6 = '\n';\n      }\n      __n = FUN_00018090(pcVar6,local_26,0);\n      uVar7 = uVar7 + __n;\n      if (param_3 == '\0') {\nLAB_0002e71f:\n        pcVar6 = DAT_0007b61c;\n        sVar5 = strlen(DAT_0007b61c);\n        pcVar6 = (char *)FUN_0003dad0(pcVar6,__n + 1 + sVar5);\n        DAT_0007b61c = pcVar6;\n        sVar5 = strlen(pcVar6);\n        memmove(pcVar6 + DAT_0007b414 + __n,pcVar6 + DAT_0007b414,sVar5 + (1 - DAT_0007b414));\n        strncpy(DAT_0007b61c + DAT_0007b414,local_26,__n);\n        DAT_0007b414 = DAT_0007b414 + __n;\n      }\n      else {\n        cVar3 = FUN_00017ab0((int)*pcVar6);\n        if (cVar3 == '\0') goto LAB_0002e71f;\n      }\n    } while (uVar7 < param_2);\n  }" { (expression_statement "puVar1 = param_1 + param_2;" (assignment_expression "puVar1 = param_1 + param_2" identifier = (binary_expression "param_1 + param_2" identifier + identifier)) ;) (expression_statement "puVar4 = __ptr;" (assignment_expression "puVar4 = __ptr" identifier = identifier) ;) (do_statement "do {\n      uVar2 = *param_1;\n      param_1 = param_1 + 1;\n      *puVar4 = (char)uVar2;\n      puVar4 = puVar4 + 1;\n    } while (puVar1 != param_1);" do (compound_statement "{\n      uVar2 = *param_1;\n      param_1 = param_1 + 1;\n      *puVar4 = (char)uVar2;\n      puVar4 = puVar4 + 1;\n    }" { (expression_statement "uVar2 = *param_1;" (assignment_expression "uVar2 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) (expression_statement "*puVar4 = (char)uVar2;" (assignment_expression "*puVar4 = (char)uVar2" (pointer_expression "*puVar4" * identifier) = (cast_expression "(char)uVar2" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (expression_statement "puVar4 = puVar4 + 1;" (assignment_expression "puVar4 = puVar4 + 1" identifier = (binary_expression "puVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(puVar1 != param_1)" ( (binary_expression "puVar1 != param_1" identifier != identifier) )) ;) (expression_statement "__ptr[param_2] = 0;" (assignment_expression "__ptr[param_2] = 0" (subscript_expression "__ptr[param_2]" identifier [ identifier ]) = number_literal) ;) (expression_statement "uVar7 = 0;" (assignment_expression "uVar7 = 0" identifier = number_literal) ;) (do_statement "do {\n      pcVar6 = __ptr + uVar7;\n      if (*pcVar6 == '\0') {\n        *pcVar6 = '\n';\n      }\n      __n = FUN_00018090(pcVar6,local_26,0);\n      uVar7 = uVar7 + __n;\n      if (param_3 == '\0') {\nLAB_0002e71f:\n        pcVar6 = DAT_0007b61c;\n        sVar5 = strlen(DAT_0007b61c);\n        pcVar6 = (char *)FUN_0003dad0(pcVar6,__n + 1 + sVar5);\n        DAT_0007b61c = pcVar6;\n        sVar5 = strlen(pcVar6);\n        memmove(pcVar6 + DAT_0007b414 + __n,pcVar6 + DAT_0007b414,sVar5 + (1 - DAT_0007b414));\n        strncpy(DAT_0007b61c + DAT_0007b414,local_26,__n);\n        DAT_0007b414 = DAT_0007b414 + __n;\n      }\n      else {\n        cVar3 = FUN_00017ab0((int)*pcVar6);\n        if (cVar3 == '\0') goto LAB_0002e71f;\n      }\n    } while (uVar7 < param_2);" do (compound_statement "{\n      pcVar6 = __ptr + uVar7;\n      if (*pcVar6 == '\0') {\n        *pcVar6 = '\n';\n      }\n      __n = FUN_00018090(pcVar6,local_26,0);\n      uVar7 = uVar7 + __n;\n      if (param_3 == '\0') {\nLAB_0002e71f:\n        pcVar6 = DAT_0007b61c;\n        sVar5 = strlen(DAT_0007b61c);\n        pcVar6 = (char *)FUN_0003dad0(pcVar6,__n + 1 + sVar5);\n        DAT_0007b61c = pcVar6;\n        sVar5 = strlen(pcVar6);\n        memmove(pcVar6 + DAT_0007b414 + __n,pcVar6 + DAT_0007b414,sVar5 + (1 - DAT_0007b414));\n        strncpy(DAT_0007b61c + DAT_0007b414,local_26,__n);\n        DAT_0007b414 = DAT_0007b414 + __n;\n      }\n      else {\n        cVar3 = FUN_00017ab0((int)*pcVar6);\n        if (cVar3 == '\0') goto LAB_0002e71f;\n      }\n    }" { (expression_statement "pcVar6 = __ptr + uVar7;" (assignment_expression "pcVar6 = __ptr + uVar7" identifier = (binary_expression "__ptr + uVar7" identifier + identifier)) ;) (if_statement "if (*pcVar6 == '\0') {\n        *pcVar6 = '\n';\n      }" if (parenthesized_expression "(*pcVar6 == '\0')" ( (binary_expression "*pcVar6 == '\0'" (pointer_expression "*pcVar6" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n        *pcVar6 = '\n';\n      }" { (expression_statement "*pcVar6 = '\n';" (assignment_expression "*pcVar6 = '\n'" (pointer_expression "*pcVar6" * identifier) = (char_literal "'\n'" ' escape_sequence ')) ;) })) (expression_statement "__n = FUN_00018090(pcVar6,local_26,0);" (assignment_expression "__n = FUN_00018090(pcVar6,local_26,0)" identifier = (call_expression "FUN_00018090(pcVar6,local_26,0)" identifier (argument_list "(pcVar6,local_26,0)" ( identifier , identifier , number_literal )))) ;) (expression_statement "uVar7 = uVar7 + __n;" (assignment_expression "uVar7 = uVar7 + __n" identifier = (binary_expression "uVar7 + __n" identifier + identifier)) ;) (if_statement "if (param_3 == '\0') {\nLAB_0002e71f:\n        pcVar6 = DAT_0007b61c;\n        sVar5 = strlen(DAT_0007b61c);\n        pcVar6 = (char *)FUN_0003dad0(pcVar6,__n + 1 + sVar5);\n        DAT_0007b61c = pcVar6;\n        sVar5 = strlen(pcVar6);\n        memmove(pcVar6 + DAT_0007b414 + __n,pcVar6 + DAT_0007b414,sVar5 + (1 - DAT_0007b414));\n        strncpy(DAT_0007b61c + DAT_0007b414,local_26,__n);\n        DAT_0007b414 = DAT_0007b414 + __n;\n      }\n      else {\n        cVar3 = FUN_00017ab0((int)*pcVar6);\n        if (cVar3 == '\0') goto LAB_0002e71f;\n      }" if (parenthesized_expression "(param_3 == '\0')" ( (binary_expression "param_3 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\nLAB_0002e71f:\n        pcVar6 = DAT_0007b61c;\n        sVar5 = strlen(DAT_0007b61c);\n        pcVar6 = (char *)FUN_0003dad0(pcVar6,__n + 1 + sVar5);\n        DAT_0007b61c = pcVar6;\n        sVar5 = strlen(pcVar6);\n        memmove(pcVar6 + DAT_0007b414 + __n,pcVar6 + DAT_0007b414,sVar5 + (1 - DAT_0007b414));\n        strncpy(DAT_0007b61c + DAT_0007b414,local_26,__n);\n        DAT_0007b414 = DAT_0007b414 + __n;\n      }" { (labeled_statement "LAB_0002e71f:\n        pcVar6 = DAT_0007b61c;" statement_identifier : (expression_statement "pcVar6 = DAT_0007b61c;" (assignment_expression "pcVar6 = DAT_0007b61c" identifier = identifier) ;)) (expression_statement "sVar5 = strlen(DAT_0007b61c);" (assignment_expression "sVar5 = strlen(DAT_0007b61c)" identifier = (call_expression "strlen(DAT_0007b61c)" identifier (argument_list "(DAT_0007b61c)" ( identifier )))) ;) (expression_statement "pcVar6 = (char *)FUN_0003dad0(pcVar6,__n + 1 + sVar5);" (assignment_expression "pcVar6 = (char *)FUN_0003dad0(pcVar6,__n + 1 + sVar5)" identifier = (cast_expression "(char *)FUN_0003dad0(pcVar6,__n + 1 + sVar5)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0003dad0(pcVar6,__n + 1 + sVar5)" identifier (argument_list "(pcVar6,__n + 1 + sVar5)" ( identifier , (binary_expression "__n + 1 + sVar5" (binary_expression "__n + 1" identifier + number_literal) + identifier) ))))) ;) (expression_statement "DAT_0007b61c = pcVar6;" (assignment_expression "DAT_0007b61c = pcVar6" identifier = identifier) ;) (expression_statement "sVar5 = strlen(pcVar6);" (assignment_expression "sVar5 = strlen(pcVar6)" identifier = (call_expression "strlen(pcVar6)" identifier (argument_list "(pcVar6)" ( identifier )))) ;) (expression_statement "memmove(pcVar6 + DAT_0007b414 + __n,pcVar6 + DAT_0007b414,sVar5 + (1 - DAT_0007b414));" (call_expression "memmove(pcVar6 + DAT_0007b414 + __n,pcVar6 + DAT_0007b414,sVar5 + (1 - DAT_0007b414))" identifier (argument_list "(pcVar6 + DAT_0007b414 + __n,pcVar6 + DAT_0007b414,sVar5 + (1 - DAT_0007b414))" ( (binary_expression "pcVar6 + DAT_0007b414 + __n" (binary_expression "pcVar6 + DAT_0007b414" identifier + identifier) + identifier) , (binary_expression "pcVar6 + DAT_0007b414" identifier + identifier) , (binary_expression "sVar5 + (1 - DAT_0007b414)" identifier + (parenthesized_expression "(1 - DAT_0007b414)" ( (binary_expression "1 - DAT_0007b414" number_literal - identifier) ))) ))) ;) (expression_statement "strncpy(DAT_0007b61c + DAT_0007b414,local_26,__n);" (call_expression "strncpy(DAT_0007b61c + DAT_0007b414,local_26,__n)" identifier (argument_list "(DAT_0007b61c + DAT_0007b414,local_26,__n)" ( (binary_expression "DAT_0007b61c + DAT_0007b414" identifier + identifier) , identifier , identifier ))) ;) (expression_statement "DAT_0007b414 = DAT_0007b414 + __n;" (assignment_expression "DAT_0007b414 = DAT_0007b414 + __n" identifier = (binary_expression "DAT_0007b414 + __n" identifier + identifier)) ;) }) (else_clause "else {\n        cVar3 = FUN_00017ab0((int)*pcVar6);\n        if (cVar3 == '\0') goto LAB_0002e71f;\n      }" else (compound_statement "{\n        cVar3 = FUN_00017ab0((int)*pcVar6);\n        if (cVar3 == '\0') goto LAB_0002e71f;\n      }" { (expression_statement "cVar3 = FUN_00017ab0((int)*pcVar6);" (assignment_expression "cVar3 = FUN_00017ab0((int)*pcVar6)" identifier = (call_expression "FUN_00017ab0((int)*pcVar6)" identifier (argument_list "((int)*pcVar6)" ( (cast_expression "(int)*pcVar6" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*pcVar6" * identifier)) )))) ;) (if_statement "if (cVar3 == '\0') goto LAB_0002e71f;" if (parenthesized_expression "(cVar3 == '\0')" ( (binary_expression "cVar3 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (goto_statement "goto LAB_0002e71f;" goto statement_identifier ;)) }))) }) while (parenthesized_expression "(uVar7 < param_2)" ( (binary_expression "uVar7 < param_2" identifier < identifier) )) ;) })) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "FUN_0005a8b0();" (call_expression "FUN_0005a8b0()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ IDENT ]) = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (char_literal ' escape_sequence ')) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , LIT )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (char_literal ' escape_sequence ')) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = IDENT) ;)) (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 ( IDENT , (binary_expression (binary_expression IDENT + LIT) + IDENT) ))))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( (binary_expression (binary_expression IDENT + IDENT) + IDENT) , (binary_expression IDENT + IDENT) , (binary_expression IDENT + (parenthesized_expression ( (binary_expression LIT - IDENT) ))) ))) ;) (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + IDENT) , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE) ) (pointer_expression * IDENT)) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (char_literal ' escape_sequence ')) )) (goto_statement goto statement_identifier ;)) }))) }) while (parenthesized_expression ( (binary_expression IDENT < IDENT) )) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "void FUN_0002e650(undefined4 *param_1,uint param_2,char param_3)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  char cVar3;\n  undefined1 *__ptr;\n  undefined1 *puVar4;\n  size_t __n;\n  size_t sVar5;\n  char *pcVar6;\n  uint uVar7;\n  int in_GS_OFFSET;\n  char local_26 [6];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x2e659;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __ptr = (undefined1 *)FUN_0003da70(param_2 + 1);\n  if (param_2 != 0) {\n    puVar1 = param_1 + param_2;\n    puVar4 = __ptr;\n    do {\n      uVar2 = *param_1;\n      param_1 = param_1 + 1;\n      *puVar4 = (char)uVar2;\n      puVar4 = puVar4 + 1;\n    } while (puVar1 != param_1);\n    __ptr[param_2] = 0;\n    uVar7 = 0;\n    do {\n      pcVar6 = __ptr + uVar7;\n      if (*pcVar6 == '\0') {\n        *pcVar6 = '\n';\n      }\n      __n = FUN_00018090(pcVar6,local_26,0);\n      uVar7 = uVar7 + __n;\n      if (param_3 == '\0') {\nLAB_0002e71f:\n        pcVar6 = DAT_0007b61c;\n        sVar5 = strlen(DAT_0007b61c);\n        pcVar6 = (char *)FUN_0003dad0(pcVar6,__n + 1 + sVar5);\n        DAT_0007b61c = pcVar6;\n        sVar5 = strlen(pcVar6);\n        memmove(pcVar6 + DAT_0007b414 + __n,pcVar6 + DAT_0007b414,sVar5 + (1 - DAT_0007b414));\n        strncpy(DAT_0007b61c + DAT_0007b414,local_26,__n);\n        DAT_0007b414 = DAT_0007b414 + __n;\n      }\n      else {\n        cVar3 = FUN_00017ab0((int)*pcVar6);\n        if (cVar3 == '\0') goto LAB_0002e71f;\n      }\n    } while (uVar7 < param_2);\n  }\n  free(__ptr);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0005a8b0();\n}" (primitive_type "void") (function_declarator "FUN_0002e650(undefined4 *param_1,uint param_2,char param_3)" (identifier "FUN_0002e650") (parameter_list "(undefined4 *param_1,uint param_2,char param_3)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) (, ",") (parameter_declaration "char param_3" (primitive_type "char") (identifier "param_3")) () ")"))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  char cVar3;\n  undefined1 *__ptr;\n  undefined1 *puVar4;\n  size_t __n;\n  size_t sVar5;\n  char *pcVar6;\n  uint uVar7;\n  int in_GS_OFFSET;\n  char local_26 [6];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x2e659;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __ptr = (undefined1 *)FUN_0003da70(param_2 + 1);\n  if (param_2 != 0) {\n    puVar1 = param_1 + param_2;\n    puVar4 = __ptr;\n    do {\n      uVar2 = *param_1;\n      param_1 = param_1 + 1;\n      *puVar4 = (char)uVar2;\n      puVar4 = puVar4 + 1;\n    } while (puVar1 != param_1);\n    __ptr[param_2] = 0;\n    uVar7 = 0;\n    do {\n      pcVar6 = __ptr + uVar7;\n      if (*pcVar6 == '\0') {\n        *pcVar6 = '\n';\n      }\n      __n = FUN_00018090(pcVar6,local_26,0);\n      uVar7 = uVar7 + __n;\n      if (param_3 == '\0') {\nLAB_0002e71f:\n        pcVar6 = DAT_0007b61c;\n        sVar5 = strlen(DAT_0007b61c);\n        pcVar6 = (char *)FUN_0003dad0(pcVar6,__n + 1 + sVar5);\n        DAT_0007b61c = pcVar6;\n        sVar5 = strlen(pcVar6);\n        memmove(pcVar6 + DAT_0007b414 + __n,pcVar6 + DAT_0007b414,sVar5 + (1 - DAT_0007b414));\n        strncpy(DAT_0007b61c + DAT_0007b414,local_26,__n);\n        DAT_0007b414 = DAT_0007b414 + __n;\n      }\n      else {\n        cVar3 = FUN_00017ab0((int)*pcVar6);\n        if (cVar3 == '\0') goto LAB_0002e71f;\n      }\n    } while (uVar7 < param_2);\n  }\n  free(__ptr);\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0005a8b0();\n}" ({ "{") (declaration "undefined4 *puVar1;" (type_identifier "undefined4") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "char cVar3;" (primitive_type "char") (identifier "cVar3") (; ";")) (declaration "undefined1 *__ptr;" (type_identifier "undefined1") (pointer_declarator "*__ptr" (* "*") (identifier "__ptr")) (; ";")) (declaration "undefined1 *puVar4;" (type_identifier "undefined1") (pointer_declarator "*puVar4" (* "*") (identifier "puVar4")) (; ";")) (declaration "size_t __n;" (primitive_type "size_t") (identifier "__n") (; ";")) (declaration "size_t sVar5;" (primitive_type "size_t") (identifier "sVar5") (; ";")) (declaration "char *pcVar6;" (primitive_type "char") (pointer_declarator "*pcVar6" (* "*") (identifier "pcVar6")) (; ";")) (declaration "uint uVar7;" (type_identifier "uint") (identifier "uVar7") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "char local_26 [6];" (primitive_type "char") (array_declarator "local_26 [6]" (identifier "local_26") ([ "[") (number_literal "6") (] "]")) (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x2e659;" (assignment_expression "uStack_14 = 0x2e659" (identifier "uStack_14") (= "=") (number_literal "0x2e659")) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "__ptr = (undefined1 *)FUN_0003da70(param_2 + 1);" (assignment_expression "__ptr = (undefined1 *)FUN_0003da70(param_2 + 1)" (identifier "__ptr") (= "=") (cast_expression "(undefined1 *)FUN_0003da70(param_2 + 1)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0003da70(param_2 + 1)" (identifier "FUN_0003da70") (argument_list "(param_2 + 1)" (( "(") (binary_expression "param_2 + 1" (identifier "param_2") (+ "+") (number_literal "1")) () ")"))))) (; ";")) (if_statement "if (param_2 != 0) {\n    puVar1 = param_1 + param_2;\n    puVar4 = __ptr;\n    do {\n      uVar2 = *param_1;\n      param_1 = param_1 + 1;\n      *puVar4 = (char)uVar2;\n      puVar4 = puVar4 + 1;\n    } while (puVar1 != param_1);\n    __ptr[param_2] = 0;\n    uVar7 = 0;\n    do {\n      pcVar6 = __ptr + uVar7;\n      if (*pcVar6 == '\0') {\n        *pcVar6 = '\n';\n      }\n      __n = FUN_00018090(pcVar6,local_26,0);\n      uVar7 = uVar7 + __n;\n      if (param_3 == '\0') {\nLAB_0002e71f:\n        pcVar6 = DAT_0007b61c;\n        sVar5 = strlen(DAT_0007b61c);\n        pcVar6 = (char *)FUN_0003dad0(pcVar6,__n + 1 + sVar5);\n        DAT_0007b61c = pcVar6;\n        sVar5 = strlen(pcVar6);\n        memmove(pcVar6 + DAT_0007b414 + __n,pcVar6 + DAT_0007b414,sVar5 + (1 - DAT_0007b414));\n        strncpy(DAT_0007b61c + DAT_0007b414,local_26,__n);\n        DAT_0007b414 = DAT_0007b414 + __n;\n      }\n      else {\n        cVar3 = FUN_00017ab0((int)*pcVar6);\n        if (cVar3 == '\0') goto LAB_0002e71f;\n      }\n    } while (uVar7 < param_2);\n  }" (if "if") (parenthesized_expression "(param_2 != 0)" (( "(") (binary_expression "param_2 != 0" (identifier "param_2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    puVar1 = param_1 + param_2;\n    puVar4 = __ptr;\n    do {\n      uVar2 = *param_1;\n      param_1 = param_1 + 1;\n      *puVar4 = (char)uVar2;\n      puVar4 = puVar4 + 1;\n    } while (puVar1 != param_1);\n    __ptr[param_2] = 0;\n    uVar7 = 0;\n    do {\n      pcVar6 = __ptr + uVar7;\n      if (*pcVar6 == '\0') {\n        *pcVar6 = '\n';\n      }\n      __n = FUN_00018090(pcVar6,local_26,0);\n      uVar7 = uVar7 + __n;\n      if (param_3 == '\0') {\nLAB_0002e71f:\n        pcVar6 = DAT_0007b61c;\n        sVar5 = strlen(DAT_0007b61c);\n        pcVar6 = (char *)FUN_0003dad0(pcVar6,__n + 1 + sVar5);\n        DAT_0007b61c = pcVar6;\n        sVar5 = strlen(pcVar6);\n        memmove(pcVar6 + DAT_0007b414 + __n,pcVar6 + DAT_0007b414,sVar5 + (1 - DAT_0007b414));\n        strncpy(DAT_0007b61c + DAT_0007b414,local_26,__n);\n        DAT_0007b414 = DAT_0007b414 + __n;\n      }\n      else {\n        cVar3 = FUN_00017ab0((int)*pcVar6);\n        if (cVar3 == '\0') goto LAB_0002e71f;\n      }\n    } while (uVar7 < param_2);\n  }" ({ "{") (expression_statement "puVar1 = param_1 + param_2;" (assignment_expression "puVar1 = param_1 + param_2" (identifier "puVar1") (= "=") (binary_expression "param_1 + param_2" (identifier "param_1") (+ "+") (identifier "param_2"))) (; ";")) (expression_statement "puVar4 = __ptr;" (assignment_expression "puVar4 = __ptr" (identifier "puVar4") (= "=") (identifier "__ptr")) (; ";")) (do_statement "do {\n      uVar2 = *param_1;\n      param_1 = param_1 + 1;\n      *puVar4 = (char)uVar2;\n      puVar4 = puVar4 + 1;\n    } while (puVar1 != param_1);" (do "do") (compound_statement "{\n      uVar2 = *param_1;\n      param_1 = param_1 + 1;\n      *puVar4 = (char)uVar2;\n      puVar4 = puVar4 + 1;\n    }" ({ "{") (expression_statement "uVar2 = *param_1;" (assignment_expression "uVar2 = *param_1" (identifier "uVar2") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" (identifier "param_1") (= "=") (binary_expression "param_1 + 1" (identifier "param_1") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "*puVar4 = (char)uVar2;" (assignment_expression "*puVar4 = (char)uVar2" (pointer_expression "*puVar4" (* "*") (identifier "puVar4")) (= "=") (cast_expression "(char)uVar2" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "uVar2"))) (; ";")) (expression_statement "puVar4 = puVar4 + 1;" (assignment_expression "puVar4 = puVar4 + 1" (identifier "puVar4") (= "=") (binary_expression "puVar4 + 1" (identifier "puVar4") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(puVar1 != param_1)" (( "(") (binary_expression "puVar1 != param_1" (identifier "puVar1") (!= "!=") (identifier "param_1")) () ")")) (; ";")) (expression_statement "__ptr[param_2] = 0;" (assignment_expression "__ptr[param_2] = 0" (subscript_expression "__ptr[param_2]" (identifier "__ptr") ([ "[") (identifier "param_2") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar7 = 0;" (assignment_expression "uVar7 = 0" (identifier "uVar7") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n      pcVar6 = __ptr + uVar7;\n      if (*pcVar6 == '\0') {\n        *pcVar6 = '\n';\n      }\n      __n = FUN_00018090(pcVar6,local_26,0);\n      uVar7 = uVar7 + __n;\n      if (param_3 == '\0') {\nLAB_0002e71f:\n        pcVar6 = DAT_0007b61c;\n        sVar5 = strlen(DAT_0007b61c);\n        pcVar6 = (char *)FUN_0003dad0(pcVar6,__n + 1 + sVar5);\n        DAT_0007b61c = pcVar6;\n        sVar5 = strlen(pcVar6);\n        memmove(pcVar6 + DAT_0007b414 + __n,pcVar6 + DAT_0007b414,sVar5 + (1 - DAT_0007b414));\n        strncpy(DAT_0007b61c + DAT_0007b414,local_26,__n);\n        DAT_0007b414 = DAT_0007b414 + __n;\n      }\n      else {\n        cVar3 = FUN_00017ab0((int)*pcVar6);\n        if (cVar3 == '\0') goto LAB_0002e71f;\n      }\n    } while (uVar7 < param_2);" (do "do") (compound_statement "{\n      pcVar6 = __ptr + uVar7;\n      if (*pcVar6 == '\0') {\n        *pcVar6 = '\n';\n      }\n      __n = FUN_00018090(pcVar6,local_26,0);\n      uVar7 = uVar7 + __n;\n      if (param_3 == '\0') {\nLAB_0002e71f:\n        pcVar6 = DAT_0007b61c;\n        sVar5 = strlen(DAT_0007b61c);\n        pcVar6 = (char *)FUN_0003dad0(pcVar6,__n + 1 + sVar5);\n        DAT_0007b61c = pcVar6;\n        sVar5 = strlen(pcVar6);\n        memmove(pcVar6 + DAT_0007b414 + __n,pcVar6 + DAT_0007b414,sVar5 + (1 - DAT_0007b414));\n        strncpy(DAT_0007b61c + DAT_0007b414,local_26,__n);\n        DAT_0007b414 = DAT_0007b414 + __n;\n      }\n      else {\n        cVar3 = FUN_00017ab0((int)*pcVar6);\n        if (cVar3 == '\0') goto LAB_0002e71f;\n      }\n    }" ({ "{") (expression_statement "pcVar6 = __ptr + uVar7;" (assignment_expression "pcVar6 = __ptr + uVar7" (identifier "pcVar6") (= "=") (binary_expression "__ptr + uVar7" (identifier "__ptr") (+ "+") (identifier "uVar7"))) (; ";")) (if_statement "if (*pcVar6 == '\0') {\n        *pcVar6 = '\n';\n      }" (if "if") (parenthesized_expression "(*pcVar6 == '\0')" (( "(") (binary_expression "*pcVar6 == '\0'" (pointer_expression "*pcVar6" (* "*") (identifier "pcVar6")) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n        *pcVar6 = '\n';\n      }" ({ "{") (expression_statement "*pcVar6 = '\n';" (assignment_expression "*pcVar6 = '\n'" (pointer_expression "*pcVar6" (* "*") (identifier "pcVar6")) (= "=") (char_literal "'\n'" (' "'") (escape_sequence "\n") (' "'"))) (; ";")) (} "}"))) (expression_statement "__n = FUN_00018090(pcVar6,local_26,0);" (assignment_expression "__n = FUN_00018090(pcVar6,local_26,0)" (identifier "__n") (= "=") (call_expression "FUN_00018090(pcVar6,local_26,0)" (identifier "FUN_00018090") (argument_list "(pcVar6,local_26,0)" (( "(") (identifier "pcVar6") (, ",") (identifier "local_26") (, ",") (number_literal "0") () ")")))) (; ";")) (expression_statement "uVar7 = uVar7 + __n;" (assignment_expression "uVar7 = uVar7 + __n" (identifier "uVar7") (= "=") (binary_expression "uVar7 + __n" (identifier "uVar7") (+ "+") (identifier "__n"))) (; ";")) (if_statement "if (param_3 == '\0') {\nLAB_0002e71f:\n        pcVar6 = DAT_0007b61c;\n        sVar5 = strlen(DAT_0007b61c);\n        pcVar6 = (char *)FUN_0003dad0(pcVar6,__n + 1 + sVar5);\n        DAT_0007b61c = pcVar6;\n        sVar5 = strlen(pcVar6);\n        memmove(pcVar6 + DAT_0007b414 + __n,pcVar6 + DAT_0007b414,sVar5 + (1 - DAT_0007b414));\n        strncpy(DAT_0007b61c + DAT_0007b414,local_26,__n);\n        DAT_0007b414 = DAT_0007b414 + __n;\n      }\n      else {\n        cVar3 = FUN_00017ab0((int)*pcVar6);\n        if (cVar3 == '\0') goto LAB_0002e71f;\n      }" (if "if") (parenthesized_expression "(param_3 == '\0')" (( "(") (binary_expression "param_3 == '\0'" (identifier "param_3") (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\nLAB_0002e71f:\n        pcVar6 = DAT_0007b61c;\n        sVar5 = strlen(DAT_0007b61c);\n        pcVar6 = (char *)FUN_0003dad0(pcVar6,__n + 1 + sVar5);\n        DAT_0007b61c = pcVar6;\n        sVar5 = strlen(pcVar6);\n        memmove(pcVar6 + DAT_0007b414 + __n,pcVar6 + DAT_0007b414,sVar5 + (1 - DAT_0007b414));\n        strncpy(DAT_0007b61c + DAT_0007b414,local_26,__n);\n        DAT_0007b414 = DAT_0007b414 + __n;\n      }" ({ "{") (labeled_statement "LAB_0002e71f:\n        pcVar6 = DAT_0007b61c;" (statement_identifier "LAB_0002e71f") (: ":") (expression_statement "pcVar6 = DAT_0007b61c;" (assignment_expression "pcVar6 = DAT_0007b61c" (identifier "pcVar6") (= "=") (identifier "DAT_0007b61c")) (; ";"))) (expression_statement "sVar5 = strlen(DAT_0007b61c);" (assignment_expression "sVar5 = strlen(DAT_0007b61c)" (identifier "sVar5") (= "=") (call_expression "strlen(DAT_0007b61c)" (identifier "strlen") (argument_list "(DAT_0007b61c)" (( "(") (identifier "DAT_0007b61c") () ")")))) (; ";")) (expression_statement "pcVar6 = (char *)FUN_0003dad0(pcVar6,__n + 1 + sVar5);" (assignment_expression "pcVar6 = (char *)FUN_0003dad0(pcVar6,__n + 1 + sVar5)" (identifier "pcVar6") (= "=") (cast_expression "(char *)FUN_0003dad0(pcVar6,__n + 1 + sVar5)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0003dad0(pcVar6,__n + 1 + sVar5)" (identifier "FUN_0003dad0") (argument_list "(pcVar6,__n + 1 + sVar5)" (( "(") (identifier "pcVar6") (, ",") (binary_expression "__n + 1 + sVar5" (binary_expression "__n + 1" (identifier "__n") (+ "+") (number_literal "1")) (+ "+") (identifier "sVar5")) () ")"))))) (; ";")) (expression_statement "DAT_0007b61c = pcVar6;" (assignment_expression "DAT_0007b61c = pcVar6" (identifier "DAT_0007b61c") (= "=") (identifier "pcVar6")) (; ";")) (expression_statement "sVar5 = strlen(pcVar6);" (assignment_expression "sVar5 = strlen(pcVar6)" (identifier "sVar5") (= "=") (call_expression "strlen(pcVar6)" (identifier "strlen") (argument_list "(pcVar6)" (( "(") (identifier "pcVar6") () ")")))) (; ";")) (expression_statement "memmove(pcVar6 + DAT_0007b414 + __n,pcVar6 + DAT_0007b414,sVar5 + (1 - DAT_0007b414));" (call_expression "memmove(pcVar6 + DAT_0007b414 + __n,pcVar6 + DAT_0007b414,sVar5 + (1 - DAT_0007b414))" (identifier "memmove") (argument_list "(pcVar6 + DAT_0007b414 + __n,pcVar6 + DAT_0007b414,sVar5 + (1 - DAT_0007b414))" (( "(") (binary_expression "pcVar6 + DAT_0007b414 + __n" (binary_expression "pcVar6 + DAT_0007b414" (identifier "pcVar6") (+ "+") (identifier "DAT_0007b414")) (+ "+") (identifier "__n")) (, ",") (binary_expression "pcVar6 + DAT_0007b414" (identifier "pcVar6") (+ "+") (identifier "DAT_0007b414")) (, ",") (binary_expression "sVar5 + (1 - DAT_0007b414)" (identifier "sVar5") (+ "+") (parenthesized_expression "(1 - DAT_0007b414)" (( "(") (binary_expression "1 - DAT_0007b414" (number_literal "1") (- "-") (identifier "DAT_0007b414")) () ")"))) () ")"))) (; ";")) (expression_statement "strncpy(DAT_0007b61c + DAT_0007b414,local_26,__n);" (call_expression "strncpy(DAT_0007b61c + DAT_0007b414,local_26,__n)" (identifier "strncpy") (argument_list "(DAT_0007b61c + DAT_0007b414,local_26,__n)" (( "(") (binary_expression "DAT_0007b61c + DAT_0007b414" (identifier "DAT_0007b61c") (+ "+") (identifier "DAT_0007b414")) (, ",") (identifier "local_26") (, ",") (identifier "__n") () ")"))) (; ";")) (expression_statement "DAT_0007b414 = DAT_0007b414 + __n;" (assignment_expression "DAT_0007b414 = DAT_0007b414 + __n" (identifier "DAT_0007b414") (= "=") (binary_expression "DAT_0007b414 + __n" (identifier "DAT_0007b414") (+ "+") (identifier "__n"))) (; ";")) (} "}")) (else_clause "else {\n        cVar3 = FUN_00017ab0((int)*pcVar6);\n        if (cVar3 == '\0') goto LAB_0002e71f;\n      }" (else "else") (compound_statement "{\n        cVar3 = FUN_00017ab0((int)*pcVar6);\n        if (cVar3 == '\0') goto LAB_0002e71f;\n      }" ({ "{") (expression_statement "cVar3 = FUN_00017ab0((int)*pcVar6);" (assignment_expression "cVar3 = FUN_00017ab0((int)*pcVar6)" (identifier "cVar3") (= "=") (call_expression "FUN_00017ab0((int)*pcVar6)" (identifier "FUN_00017ab0") (argument_list "((int)*pcVar6)" (( "(") (cast_expression "(int)*pcVar6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (pointer_expression "*pcVar6" (* "*") (identifier "pcVar6"))) () ")")))) (; ";")) (if_statement "if (cVar3 == '\0') goto LAB_0002e71f;" (if "if") (parenthesized_expression "(cVar3 == '\0')" (( "(") (binary_expression "cVar3 == '\0'" (identifier "cVar3") (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (goto_statement "goto LAB_0002e71f;" (goto "goto") (statement_identifier "LAB_0002e71f") (; ";"))) (} "}")))) (} "}")) (while "while") (parenthesized_expression "(uVar7 < param_2)" (( "(") (binary_expression "uVar7 < param_2" (identifier "uVar7") (< "<") (identifier "param_2")) () ")")) (; ";")) (} "}"))) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" (identifier "free") (argument_list "(__ptr)" (( "(") (identifier "__ptr") () ")"))) (; ";")) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" (if "if") (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_0005a8b0();" (call_expression "FUN_0005a8b0()" (identifier "FUN_0005a8b0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

void function_1(int *var_4,size_t var_3,type_1 filtering)

{
  int *var_6;
  int var_21;
  int iVar3;
  type_1 _Var4;
  type_2 *var_7;
  type_2 *var_5;
  size_t var_10;
  size_t var_14;
  char *var_16;
  type_3 var_8;
  int var_1;
  char onechar [6];
  
  var_21 = *(int *)(var_1 + 0x14);
  var_7 = (type_2 *)var_2(var_3 + 1);
  if (var_3 != 0) {
    var_6 = var_4 + var_3;
    var_5 = var_7;
    do {
      iVar3 = *var_4;
      var_4 = var_4 + 1;
      *var_5 = (char)iVar3;
      var_5 = var_5 + 1;
    } while (var_6 != var_4);
    var_7[var_3] = 0;
    var_8 = 0;
    do {
      var_16 = var_7 + var_8;
      if (*var_16 == '\0') {
        *var_16 = '\n';
      }
      var_10 = var_9(var_16,onechar,(size_t *)0x0);
      var_8 = var_8 + var_10;
      if (filtering) {
        _Var4 = var_11((int)*var_16);
        if (!_Var4) goto LAB_0002e71f;
      }
      else {
LAB_0002e71f:
        var_16 = var_19;
        var_14 = var_12(var_19);
        var_16 = (char *)var_13(var_16,var_10 + 1 + var_14);
        var_19 = var_16;
        var_14 = var_12(var_16);
        var_15(var_16 + var_17 + var_10,var_16 + var_17,var_14 + (1 - var_17));
        var_18(var_19 + var_17,onechar,var_10);
        var_17 = var_17 + var_10;
      }
    } while (var_8 < var_3);
  }
  var_20(var_7);
  if (var_21 == *(int *)(var_1 + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  var_22();
}


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

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

void MASKED(undefined4 *param_1,uint param_2,char param_3)

{
  undefined4 *puVar1;
  undefined4 uVar2;
  char cVar3;
  undefined1 *__ptr;
  undefined1 *puVar4;
  size_t __n;
  size_t sVar5;
  char *pcVar6;
  uint uVar7;
  int in_GS_OFFSET;
  char local_26 [6];
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x2e659;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  __ptr = (undefined1 *)FUN_0003da70(param_2 + 1);
  if (param_2 != 0) {
    puVar1 = param_1 + param_2;
    puVar4 = __ptr;
    do {
      uVar2 = *param_1;
      param_1 = param_1 + 1;
      *puVar4 = (char)uVar2;
      puVar4 = puVar4 + 1;
    } while (puVar1 != param_1);
    __ptr[param_2] = 0;
    uVar7 = 0;
    do {
      pcVar6 = __ptr + uVar7;
      if (*pcVar6 == '\0') {
        *pcVar6 = '\n';
      }
      __n = FUN_00018090(pcVar6,local_26,0);
      uVar7 = uVar7 + __n;
      if (param_3 == '\0') {
LAB_0002e71f:
        pcVar6 = DAT_0007b61c;
        sVar5 = strlen(DAT_0007b61c);
        pcVar6 = (char *)FUN_0003dad0(pcVar6,__n + 1 + sVar5);
        DAT_0007b61c = pcVar6;
        sVar5 = strlen(pcVar6);
        memmove(pcVar6 + DAT_0007b414 + __n,pcVar6 + DAT_0007b414,sVar5 + (1 - DAT_0007b414));
        strncpy(DAT_0007b61c + DAT_0007b414,local_26,__n);
        DAT_0007b414 = DAT_0007b414 + __n;
      }
      else {
        cVar3 = FUN_00017ab0((int)*pcVar6);
        if (cVar3 == '\0') goto LAB_0002e71f;
      }
    } while (uVar7 < param_2);
  }
  free(__ptr);
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0005a8b0();
}

