
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

int term_data_untrusted(Terminal *term,char *data,int len)

{
  wchar_t wVar1;
  byte *pbVar2;
  byte *data_00;
  int len_00;
  
  if (0 < len) {
    pbVar2 = (byte *)(data + len);
    do {
      while (*data == 10) {
        data_00 = (byte *)0x8d48b;
        len_00 = 2;
LAB_0004e770:
        bufchain_add(&term->inbuf,data_00,len_00);
        if (term->in_term_out != 0) goto LAB_0004e750;
        term->in_term_out = 1;
        term->seen_disp_event = 1;
        if (term->window_update_pending == 0) {
          term->window_update_pending = 1;
          wVar1 = schedule_timer(0x14,term_timer,term);
          term->next_update = wVar1;
        }
        term->cblinker = 1;
        term->cblink_pending = 0;
        if ((term->blink_cur != 0) && (term->has_focus != 0)) {
          wVar1 = schedule_timer(0x1c2,term_timer,term);
          term->cblink_pending = 1;
          term->next_cblink = wVar1;
        }
        if (term->selstate != ADDRTYPE_IPV6) {
          term_out(term);
        }
        term->in_term_out = 0;
        data = (char *)((byte *)data + 1);
        if ((byte *)data == pbVar2) {
          return 0;
        }
      }
      if ((*data & 0x60U) != 0) {
        len_00 = 1;
        data_00 = (byte *)data;
        goto LAB_0004e770;
      }
LAB_0004e750:
      data = (char *)((byte *)data + 1);
    } while ((byte *)data != pbVar2);
  }
  return 0;
}



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

undefined4 FUN_0004e710(int param_1,byte *param_2,int param_3)

{
  byte *pbVar1;
  byte *pbVar2;
  undefined4 uVar3;
  
  if (0 < param_3) {
    pbVar1 = param_2 + param_3;
    do {
      while (*param_2 == 10) {
        pbVar2 = (byte *)0x8d48b;
        uVar3 = 2;
LAB_0004e770:
        FUN_000310f0(param_1 + 0x60,pbVar2,uVar3);
        if (*(int *)(param_1 + 0x1098) != 0) goto LAB_0004e750;
        *(undefined4 *)(param_1 + 0x1098) = 1;
        *(undefined4 *)(param_1 + 0x154) = 1;
        if (*(int *)(param_1 + 0x109c) == 0) {
          *(undefined4 *)(param_1 + 0x109c) = 1;
          uVar3 = FUN_0004f3e0(0x14,FUN_00046070,param_1);
          *(undefined4 *)(param_1 + 0x10a0) = uVar3;
        }
        *(undefined4 *)(param_1 + 0xbc) = 1;
        *(undefined4 *)(param_1 + 0x10a8) = 0;
        if ((*(int *)(param_1 + 0x1100) != 0) && (*(int *)(param_1 + 0x134) != 0)) {
          uVar3 = FUN_0004f3e0(0x1c2,FUN_00046070,param_1);
          *(undefined4 *)(param_1 + 0x10a8) = 1;
          *(undefined4 *)(param_1 + 0x10b0) = uVar3;
        }
        if (*(int *)(param_1 + 0xe48) != 2) {
          FUN_00047d40();
        }
        *(undefined4 *)(param_1 + 0x1098) = 0;
        param_2 = param_2 + 1;
        if (param_2 == pbVar1) {
          return 0;
        }
      }
      if ((*param_2 & 0x60) != 0) {
        uVar3 = 1;
        pbVar2 = param_2;
        goto LAB_0004e770;
      }
LAB_0004e750:
      param_2 = param_2 + 1;
    } while (param_2 != pbVar1);
  }
  return 0;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x0001b410
ADD EBX,0x7708b
SUB ESP,0x1c
MOV ESI,dword ptr [ESP + 0x38]
MOV EBP,dword ptr [ESP + 0x30]
TEST ESI,ESI
JLE 0x0004e7f5
LEA EAX,[EBP + 0x60]
MOV EDI,dword ptr [ESP + 0x34]
MOV dword ptr [ESP + 0x8],EAX
LEA EAX,[EBX + 0xfff808cc]
ADD ESI,EDI
MOV dword ptr [ESP + 0xc],EAX
JMP 0x0004e75b
ADD EDI,0x1
CMP EDI,ESI
JZ 0x0004e7f5
MOVZX EAX,byte ptr [EDI]
CMP AL,0xa
JZ 0x0004e800
TEST AL,0x60
JZ 0x0004e750
SUB ESP,0x4
PUSH 0x1
PUSH EDI
PUSH dword ptr [ESP + 0x14]
CALL 0x000310f0
MOV EAX,dword ptr [EBP + 0x1098]
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x0004e750
MOV dword ptr [EBP + 0x1098],0x1
MOV ECX,dword ptr [EBP + 0x109c]
MOV dword ptr [EBP + 0x154],0x1
TEST ECX,ECX
JZ 0x0004e840
MOV dword ptr [EBP + 0xbc],0x1
MOV EDX,dword ptr [EBP + 0x1100]
MOV dword ptr [EBP + 0x10a8],0x0
TEST EDX,EDX
JZ 0x0004e7d0
MOV EAX,dword ptr [EBP + 0x134]
TEST EAX,EAX
JNZ 0x0004e818
CMP dword ptr [EBP + 0xe48],0x2
JZ 0x0004e7e0
MOV EAX,EBP
CALL 0x00047d40
MOV dword ptr [EBP + 0x1098],0x0
ADD EDI,0x1
CMP EDI,ESI
JNZ 0x0004e75b
ADD ESP,0x1c
XOR EAX,EAX
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x4
LEA EAX,[EBX + 0xfffc7ce7]
PUSH 0x2
PUSH EAX
JMP 0x0004e770
SUB ESP,0x4
PUSH EBP
PUSH dword ptr [ESP + 0x14]
PUSH 0x1c2
CALL 0x0004f3e0
ADD ESP,0x10
MOV dword ptr [EBP + 0x10a8],0x1
MOV dword ptr [EBP + 0x10b0],EAX
JMP 0x0004e7d0
MOV dword ptr [EBP + 0x109c],0x1
SUB ESP,0x4
PUSH EBP
PUSH dword ptr [ESP + 0x14]
PUSH 0x14
CALL 0x0004f3e0
ADD ESP,0x10
MOV dword ptr [EBP + 0x10a0],EAX
JMP 0x0004e7a8
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 FUN_0004e710(int param_1,byte *param_2,int param_3)\n\n{\n  byte *pbVar1;\n  byte *pbVar2;\n  undefined4 uVar3;\n  \n  if (0 < param_3) {\n    pbVar1 = param_2 + param_3;\n    do {\n      while (*param_2 == 10) {\n        pbVar2 = (byte *)0x8d48b;\n        uVar3 = 2;\nLAB_0004e770:\n        FUN_000310f0(param_1 + 0x60,pbVar2,uVar3);\n        if (*(int *)(param_1 + 0x1098) != 0) goto LAB_0004e750;\n        *(undefined4 *)(param_1 + 0x1098) = 1;\n        *(undefined4 *)(param_1 + 0x154) = 1;\n        if (*(int *)(param_1 + 0x109c) == 0) {\n          *(undefined4 *)(param_1 + 0x109c) = 1;\n          uVar3 = FUN_0004f3e0(0x14,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a0) = uVar3;\n        }\n        *(undefined4 *)(param_1 + 0xbc) = 1;\n        *(undefined4 *)(param_1 + 0x10a8) = 0;\n        if ((*(int *)(param_1 + 0x1100) != 0) && (*(int *)(param_1 + 0x134) != 0)) {\n          uVar3 = FUN_0004f3e0(0x1c2,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a8) = 1;\n          *(undefined4 *)(param_1 + 0x10b0) = uVar3;\n        }\n        if (*(int *)(param_1 + 0xe48) != 2) {\n          FUN_00047d40();\n        }\n        *(undefined4 *)(param_1 + 0x1098) = 0;\n        param_2 = param_2 + 1;\n        if (param_2 == pbVar1) {\n          return 0;\n        }\n      }\n      if ((*param_2 & 0x60) != 0) {\n        uVar3 = 1;\n        pbVar2 = param_2;\n        goto LAB_0004e770;\n      }\nLAB_0004e750:\n      param_2 = param_2 + 1;\n    } while (param_2 != pbVar1);\n  }\n  return 0;\n}\n\n" comment (function_definition "undefined4 FUN_0004e710(int param_1,byte *param_2,int param_3)\n\n{\n  byte *pbVar1;\n  byte *pbVar2;\n  undefined4 uVar3;\n  \n  if (0 < param_3) {\n    pbVar1 = param_2 + param_3;\n    do {\n      while (*param_2 == 10) {\n        pbVar2 = (byte *)0x8d48b;\n        uVar3 = 2;\nLAB_0004e770:\n        FUN_000310f0(param_1 + 0x60,pbVar2,uVar3);\n        if (*(int *)(param_1 + 0x1098) != 0) goto LAB_0004e750;\n        *(undefined4 *)(param_1 + 0x1098) = 1;\n        *(undefined4 *)(param_1 + 0x154) = 1;\n        if (*(int *)(param_1 + 0x109c) == 0) {\n          *(undefined4 *)(param_1 + 0x109c) = 1;\n          uVar3 = FUN_0004f3e0(0x14,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a0) = uVar3;\n        }\n        *(undefined4 *)(param_1 + 0xbc) = 1;\n        *(undefined4 *)(param_1 + 0x10a8) = 0;\n        if ((*(int *)(param_1 + 0x1100) != 0) && (*(int *)(param_1 + 0x134) != 0)) {\n          uVar3 = FUN_0004f3e0(0x1c2,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a8) = 1;\n          *(undefined4 *)(param_1 + 0x10b0) = uVar3;\n        }\n        if (*(int *)(param_1 + 0xe48) != 2) {\n          FUN_00047d40();\n        }\n        *(undefined4 *)(param_1 + 0x1098) = 0;\n        param_2 = param_2 + 1;\n        if (param_2 == pbVar1) {\n          return 0;\n        }\n      }\n      if ((*param_2 & 0x60) != 0) {\n        uVar3 = 1;\n        pbVar2 = param_2;\n        goto LAB_0004e770;\n      }\nLAB_0004e750:\n      param_2 = param_2 + 1;\n    } while (param_2 != pbVar1);\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_0004e710(int param_1,byte *param_2,int param_3)" identifier (parameter_list "(int param_1,byte *param_2,int param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "byte *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  byte *pbVar1;\n  byte *pbVar2;\n  undefined4 uVar3;\n  \n  if (0 < param_3) {\n    pbVar1 = param_2 + param_3;\n    do {\n      while (*param_2 == 10) {\n        pbVar2 = (byte *)0x8d48b;\n        uVar3 = 2;\nLAB_0004e770:\n        FUN_000310f0(param_1 + 0x60,pbVar2,uVar3);\n        if (*(int *)(param_1 + 0x1098) != 0) goto LAB_0004e750;\n        *(undefined4 *)(param_1 + 0x1098) = 1;\n        *(undefined4 *)(param_1 + 0x154) = 1;\n        if (*(int *)(param_1 + 0x109c) == 0) {\n          *(undefined4 *)(param_1 + 0x109c) = 1;\n          uVar3 = FUN_0004f3e0(0x14,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a0) = uVar3;\n        }\n        *(undefined4 *)(param_1 + 0xbc) = 1;\n        *(undefined4 *)(param_1 + 0x10a8) = 0;\n        if ((*(int *)(param_1 + 0x1100) != 0) && (*(int *)(param_1 + 0x134) != 0)) {\n          uVar3 = FUN_0004f3e0(0x1c2,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a8) = 1;\n          *(undefined4 *)(param_1 + 0x10b0) = uVar3;\n        }\n        if (*(int *)(param_1 + 0xe48) != 2) {\n          FUN_00047d40();\n        }\n        *(undefined4 *)(param_1 + 0x1098) = 0;\n        param_2 = param_2 + 1;\n        if (param_2 == pbVar1) {\n          return 0;\n        }\n      }\n      if ((*param_2 & 0x60) != 0) {\n        uVar3 = 1;\n        pbVar2 = param_2;\n        goto LAB_0004e770;\n      }\nLAB_0004e750:\n      param_2 = param_2 + 1;\n    } while (param_2 != pbVar1);\n  }\n  return 0;\n}" { (declaration "byte *pbVar1;" type_identifier (pointer_declarator "*pbVar1" * identifier) ;) (declaration "byte *pbVar2;" type_identifier (pointer_declarator "*pbVar2" * identifier) ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (if_statement "if (0 < param_3) {\n    pbVar1 = param_2 + param_3;\n    do {\n      while (*param_2 == 10) {\n        pbVar2 = (byte *)0x8d48b;\n        uVar3 = 2;\nLAB_0004e770:\n        FUN_000310f0(param_1 + 0x60,pbVar2,uVar3);\n        if (*(int *)(param_1 + 0x1098) != 0) goto LAB_0004e750;\n        *(undefined4 *)(param_1 + 0x1098) = 1;\n        *(undefined4 *)(param_1 + 0x154) = 1;\n        if (*(int *)(param_1 + 0x109c) == 0) {\n          *(undefined4 *)(param_1 + 0x109c) = 1;\n          uVar3 = FUN_0004f3e0(0x14,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a0) = uVar3;\n        }\n        *(undefined4 *)(param_1 + 0xbc) = 1;\n        *(undefined4 *)(param_1 + 0x10a8) = 0;\n        if ((*(int *)(param_1 + 0x1100) != 0) && (*(int *)(param_1 + 0x134) != 0)) {\n          uVar3 = FUN_0004f3e0(0x1c2,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a8) = 1;\n          *(undefined4 *)(param_1 + 0x10b0) = uVar3;\n        }\n        if (*(int *)(param_1 + 0xe48) != 2) {\n          FUN_00047d40();\n        }\n        *(undefined4 *)(param_1 + 0x1098) = 0;\n        param_2 = param_2 + 1;\n        if (param_2 == pbVar1) {\n          return 0;\n        }\n      }\n      if ((*param_2 & 0x60) != 0) {\n        uVar3 = 1;\n        pbVar2 = param_2;\n        goto LAB_0004e770;\n      }\nLAB_0004e750:\n      param_2 = param_2 + 1;\n    } while (param_2 != pbVar1);\n  }" if (parenthesized_expression "(0 < param_3)" ( (binary_expression "0 < param_3" number_literal < identifier) )) (compound_statement "{\n    pbVar1 = param_2 + param_3;\n    do {\n      while (*param_2 == 10) {\n        pbVar2 = (byte *)0x8d48b;\n        uVar3 = 2;\nLAB_0004e770:\n        FUN_000310f0(param_1 + 0x60,pbVar2,uVar3);\n        if (*(int *)(param_1 + 0x1098) != 0) goto LAB_0004e750;\n        *(undefined4 *)(param_1 + 0x1098) = 1;\n        *(undefined4 *)(param_1 + 0x154) = 1;\n        if (*(int *)(param_1 + 0x109c) == 0) {\n          *(undefined4 *)(param_1 + 0x109c) = 1;\n          uVar3 = FUN_0004f3e0(0x14,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a0) = uVar3;\n        }\n        *(undefined4 *)(param_1 + 0xbc) = 1;\n        *(undefined4 *)(param_1 + 0x10a8) = 0;\n        if ((*(int *)(param_1 + 0x1100) != 0) && (*(int *)(param_1 + 0x134) != 0)) {\n          uVar3 = FUN_0004f3e0(0x1c2,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a8) = 1;\n          *(undefined4 *)(param_1 + 0x10b0) = uVar3;\n        }\n        if (*(int *)(param_1 + 0xe48) != 2) {\n          FUN_00047d40();\n        }\n        *(undefined4 *)(param_1 + 0x1098) = 0;\n        param_2 = param_2 + 1;\n        if (param_2 == pbVar1) {\n          return 0;\n        }\n      }\n      if ((*param_2 & 0x60) != 0) {\n        uVar3 = 1;\n        pbVar2 = param_2;\n        goto LAB_0004e770;\n      }\nLAB_0004e750:\n      param_2 = param_2 + 1;\n    } while (param_2 != pbVar1);\n  }" { (expression_statement "pbVar1 = param_2 + param_3;" (assignment_expression "pbVar1 = param_2 + param_3" identifier = (binary_expression "param_2 + param_3" identifier + identifier)) ;) (do_statement "do {\n      while (*param_2 == 10) {\n        pbVar2 = (byte *)0x8d48b;\n        uVar3 = 2;\nLAB_0004e770:\n        FUN_000310f0(param_1 + 0x60,pbVar2,uVar3);\n        if (*(int *)(param_1 + 0x1098) != 0) goto LAB_0004e750;\n        *(undefined4 *)(param_1 + 0x1098) = 1;\n        *(undefined4 *)(param_1 + 0x154) = 1;\n        if (*(int *)(param_1 + 0x109c) == 0) {\n          *(undefined4 *)(param_1 + 0x109c) = 1;\n          uVar3 = FUN_0004f3e0(0x14,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a0) = uVar3;\n        }\n        *(undefined4 *)(param_1 + 0xbc) = 1;\n        *(undefined4 *)(param_1 + 0x10a8) = 0;\n        if ((*(int *)(param_1 + 0x1100) != 0) && (*(int *)(param_1 + 0x134) != 0)) {\n          uVar3 = FUN_0004f3e0(0x1c2,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a8) = 1;\n          *(undefined4 *)(param_1 + 0x10b0) = uVar3;\n        }\n        if (*(int *)(param_1 + 0xe48) != 2) {\n          FUN_00047d40();\n        }\n        *(undefined4 *)(param_1 + 0x1098) = 0;\n        param_2 = param_2 + 1;\n        if (param_2 == pbVar1) {\n          return 0;\n        }\n      }\n      if ((*param_2 & 0x60) != 0) {\n        uVar3 = 1;\n        pbVar2 = param_2;\n        goto LAB_0004e770;\n      }\nLAB_0004e750:\n      param_2 = param_2 + 1;\n    } while (param_2 != pbVar1);" do (compound_statement "{\n      while (*param_2 == 10) {\n        pbVar2 = (byte *)0x8d48b;\n        uVar3 = 2;\nLAB_0004e770:\n        FUN_000310f0(param_1 + 0x60,pbVar2,uVar3);\n        if (*(int *)(param_1 + 0x1098) != 0) goto LAB_0004e750;\n        *(undefined4 *)(param_1 + 0x1098) = 1;\n        *(undefined4 *)(param_1 + 0x154) = 1;\n        if (*(int *)(param_1 + 0x109c) == 0) {\n          *(undefined4 *)(param_1 + 0x109c) = 1;\n          uVar3 = FUN_0004f3e0(0x14,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a0) = uVar3;\n        }\n        *(undefined4 *)(param_1 + 0xbc) = 1;\n        *(undefined4 *)(param_1 + 0x10a8) = 0;\n        if ((*(int *)(param_1 + 0x1100) != 0) && (*(int *)(param_1 + 0x134) != 0)) {\n          uVar3 = FUN_0004f3e0(0x1c2,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a8) = 1;\n          *(undefined4 *)(param_1 + 0x10b0) = uVar3;\n        }\n        if (*(int *)(param_1 + 0xe48) != 2) {\n          FUN_00047d40();\n        }\n        *(undefined4 *)(param_1 + 0x1098) = 0;\n        param_2 = param_2 + 1;\n        if (param_2 == pbVar1) {\n          return 0;\n        }\n      }\n      if ((*param_2 & 0x60) != 0) {\n        uVar3 = 1;\n        pbVar2 = param_2;\n        goto LAB_0004e770;\n      }\nLAB_0004e750:\n      param_2 = param_2 + 1;\n    }" { (while_statement "while (*param_2 == 10) {\n        pbVar2 = (byte *)0x8d48b;\n        uVar3 = 2;\nLAB_0004e770:\n        FUN_000310f0(param_1 + 0x60,pbVar2,uVar3);\n        if (*(int *)(param_1 + 0x1098) != 0) goto LAB_0004e750;\n        *(undefined4 *)(param_1 + 0x1098) = 1;\n        *(undefined4 *)(param_1 + 0x154) = 1;\n        if (*(int *)(param_1 + 0x109c) == 0) {\n          *(undefined4 *)(param_1 + 0x109c) = 1;\n          uVar3 = FUN_0004f3e0(0x14,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a0) = uVar3;\n        }\n        *(undefined4 *)(param_1 + 0xbc) = 1;\n        *(undefined4 *)(param_1 + 0x10a8) = 0;\n        if ((*(int *)(param_1 + 0x1100) != 0) && (*(int *)(param_1 + 0x134) != 0)) {\n          uVar3 = FUN_0004f3e0(0x1c2,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a8) = 1;\n          *(undefined4 *)(param_1 + 0x10b0) = uVar3;\n        }\n        if (*(int *)(param_1 + 0xe48) != 2) {\n          FUN_00047d40();\n        }\n        *(undefined4 *)(param_1 + 0x1098) = 0;\n        param_2 = param_2 + 1;\n        if (param_2 == pbVar1) {\n          return 0;\n        }\n      }" while (parenthesized_expression "(*param_2 == 10)" ( (binary_expression "*param_2 == 10" (pointer_expression "*param_2" * identifier) == number_literal) )) (compound_statement "{\n        pbVar2 = (byte *)0x8d48b;\n        uVar3 = 2;\nLAB_0004e770:\n        FUN_000310f0(param_1 + 0x60,pbVar2,uVar3);\n        if (*(int *)(param_1 + 0x1098) != 0) goto LAB_0004e750;\n        *(undefined4 *)(param_1 + 0x1098) = 1;\n        *(undefined4 *)(param_1 + 0x154) = 1;\n        if (*(int *)(param_1 + 0x109c) == 0) {\n          *(undefined4 *)(param_1 + 0x109c) = 1;\n          uVar3 = FUN_0004f3e0(0x14,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a0) = uVar3;\n        }\n        *(undefined4 *)(param_1 + 0xbc) = 1;\n        *(undefined4 *)(param_1 + 0x10a8) = 0;\n        if ((*(int *)(param_1 + 0x1100) != 0) && (*(int *)(param_1 + 0x134) != 0)) {\n          uVar3 = FUN_0004f3e0(0x1c2,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a8) = 1;\n          *(undefined4 *)(param_1 + 0x10b0) = uVar3;\n        }\n        if (*(int *)(param_1 + 0xe48) != 2) {\n          FUN_00047d40();\n        }\n        *(undefined4 *)(param_1 + 0x1098) = 0;\n        param_2 = param_2 + 1;\n        if (param_2 == pbVar1) {\n          return 0;\n        }\n      }" { (expression_statement "pbVar2 = (byte *)0x8d48b;" (assignment_expression "pbVar2 = (byte *)0x8d48b" identifier = (cast_expression "(byte *)0x8d48b" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "uVar3 = 2;" (assignment_expression "uVar3 = 2" identifier = number_literal) ;) (labeled_statement "LAB_0004e770:\n        FUN_000310f0(param_1 + 0x60,pbVar2,uVar3);" statement_identifier : (expression_statement "FUN_000310f0(param_1 + 0x60,pbVar2,uVar3);" (call_expression "FUN_000310f0(param_1 + 0x60,pbVar2,uVar3)" identifier (argument_list "(param_1 + 0x60,pbVar2,uVar3)" ( (binary_expression "param_1 + 0x60" identifier + number_literal) , identifier , identifier ))) ;)) (if_statement "if (*(int *)(param_1 + 0x1098) != 0) goto LAB_0004e750;" if (parenthesized_expression "(*(int *)(param_1 + 0x1098) != 0)" ( (binary_expression "*(int *)(param_1 + 0x1098) != 0" (pointer_expression "*(int *)(param_1 + 0x1098)" * (cast_expression "(int *)(param_1 + 0x1098)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1098)" ( (binary_expression "param_1 + 0x1098" identifier + number_literal) )))) != number_literal) )) (goto_statement "goto LAB_0004e750;" goto statement_identifier ;)) (expression_statement "*(undefined4 *)(param_1 + 0x1098) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0x1098) = 1" (pointer_expression "*(undefined4 *)(param_1 + 0x1098)" * (cast_expression "(undefined4 *)(param_1 + 0x1098)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1098)" ( (binary_expression "param_1 + 0x1098" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(param_1 + 0x154) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0x154) = 1" (pointer_expression "*(undefined4 *)(param_1 + 0x154)" * (cast_expression "(undefined4 *)(param_1 + 0x154)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x154)" ( (binary_expression "param_1 + 0x154" identifier + number_literal) )))) = number_literal) ;) (if_statement "if (*(int *)(param_1 + 0x109c) == 0) {\n          *(undefined4 *)(param_1 + 0x109c) = 1;\n          uVar3 = FUN_0004f3e0(0x14,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a0) = uVar3;\n        }" if (parenthesized_expression "(*(int *)(param_1 + 0x109c) == 0)" ( (binary_expression "*(int *)(param_1 + 0x109c) == 0" (pointer_expression "*(int *)(param_1 + 0x109c)" * (cast_expression "(int *)(param_1 + 0x109c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x109c)" ( (binary_expression "param_1 + 0x109c" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n          *(undefined4 *)(param_1 + 0x109c) = 1;\n          uVar3 = FUN_0004f3e0(0x14,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a0) = uVar3;\n        }" { (expression_statement "*(undefined4 *)(param_1 + 0x109c) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0x109c) = 1" (pointer_expression "*(undefined4 *)(param_1 + 0x109c)" * (cast_expression "(undefined4 *)(param_1 + 0x109c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x109c)" ( (binary_expression "param_1 + 0x109c" identifier + number_literal) )))) = number_literal) ;) (expression_statement "uVar3 = FUN_0004f3e0(0x14,FUN_00046070,param_1);" (assignment_expression "uVar3 = FUN_0004f3e0(0x14,FUN_00046070,param_1)" identifier = (call_expression "FUN_0004f3e0(0x14,FUN_00046070,param_1)" identifier (argument_list "(0x14,FUN_00046070,param_1)" ( number_literal , identifier , identifier )))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x10a0) = uVar3;" (assignment_expression "*(undefined4 *)(param_1 + 0x10a0) = uVar3" (pointer_expression "*(undefined4 *)(param_1 + 0x10a0)" * (cast_expression "(undefined4 *)(param_1 + 0x10a0)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10a0)" ( (binary_expression "param_1 + 0x10a0" identifier + number_literal) )))) = identifier) ;) })) (expression_statement "*(undefined4 *)(param_1 + 0xbc) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0xbc) = 1" (pointer_expression "*(undefined4 *)(param_1 + 0xbc)" * (cast_expression "(undefined4 *)(param_1 + 0xbc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xbc)" ( (binary_expression "param_1 + 0xbc" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(param_1 + 0x10a8) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x10a8) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x10a8)" * (cast_expression "(undefined4 *)(param_1 + 0x10a8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10a8)" ( (binary_expression "param_1 + 0x10a8" identifier + number_literal) )))) = number_literal) ;) (if_statement "if ((*(int *)(param_1 + 0x1100) != 0) && (*(int *)(param_1 + 0x134) != 0)) {\n          uVar3 = FUN_0004f3e0(0x1c2,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a8) = 1;\n          *(undefined4 *)(param_1 + 0x10b0) = uVar3;\n        }" if (parenthesized_expression "((*(int *)(param_1 + 0x1100) != 0) && (*(int *)(param_1 + 0x134) != 0))" ( (binary_expression "(*(int *)(param_1 + 0x1100) != 0) && (*(int *)(param_1 + 0x134) != 0)" (parenthesized_expression "(*(int *)(param_1 + 0x1100) != 0)" ( (binary_expression "*(int *)(param_1 + 0x1100) != 0" (pointer_expression "*(int *)(param_1 + 0x1100)" * (cast_expression "(int *)(param_1 + 0x1100)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1100)" ( (binary_expression "param_1 + 0x1100" identifier + number_literal) )))) != number_literal) )) && (parenthesized_expression "(*(int *)(param_1 + 0x134) != 0)" ( (binary_expression "*(int *)(param_1 + 0x134) != 0" (pointer_expression "*(int *)(param_1 + 0x134)" * (cast_expression "(int *)(param_1 + 0x134)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x134)" ( (binary_expression "param_1 + 0x134" identifier + number_literal) )))) != number_literal) ))) )) (compound_statement "{\n          uVar3 = FUN_0004f3e0(0x1c2,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a8) = 1;\n          *(undefined4 *)(param_1 + 0x10b0) = uVar3;\n        }" { (expression_statement "uVar3 = FUN_0004f3e0(0x1c2,FUN_00046070,param_1);" (assignment_expression "uVar3 = FUN_0004f3e0(0x1c2,FUN_00046070,param_1)" identifier = (call_expression "FUN_0004f3e0(0x1c2,FUN_00046070,param_1)" identifier (argument_list "(0x1c2,FUN_00046070,param_1)" ( number_literal , identifier , identifier )))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x10a8) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0x10a8) = 1" (pointer_expression "*(undefined4 *)(param_1 + 0x10a8)" * (cast_expression "(undefined4 *)(param_1 + 0x10a8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10a8)" ( (binary_expression "param_1 + 0x10a8" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(param_1 + 0x10b0) = uVar3;" (assignment_expression "*(undefined4 *)(param_1 + 0x10b0) = uVar3" (pointer_expression "*(undefined4 *)(param_1 + 0x10b0)" * (cast_expression "(undefined4 *)(param_1 + 0x10b0)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10b0)" ( (binary_expression "param_1 + 0x10b0" identifier + number_literal) )))) = identifier) ;) })) (if_statement "if (*(int *)(param_1 + 0xe48) != 2) {\n          FUN_00047d40();\n        }" if (parenthesized_expression "(*(int *)(param_1 + 0xe48) != 2)" ( (binary_expression "*(int *)(param_1 + 0xe48) != 2" (pointer_expression "*(int *)(param_1 + 0xe48)" * (cast_expression "(int *)(param_1 + 0xe48)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xe48)" ( (binary_expression "param_1 + 0xe48" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n          FUN_00047d40();\n        }" { (expression_statement "FUN_00047d40();" (call_expression "FUN_00047d40()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "*(undefined4 *)(param_1 + 0x1098) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x1098) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x1098)" * (cast_expression "(undefined4 *)(param_1 + 0x1098)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1098)" ( (binary_expression "param_1 + 0x1098" identifier + number_literal) )))) = number_literal) ;) (expression_statement "param_2 = param_2 + 1;" (assignment_expression "param_2 = param_2 + 1" identifier = (binary_expression "param_2 + 1" identifier + number_literal)) ;) (if_statement "if (param_2 == pbVar1) {\n          return 0;\n        }" if (parenthesized_expression "(param_2 == pbVar1)" ( (binary_expression "param_2 == pbVar1" identifier == identifier) )) (compound_statement "{\n          return 0;\n        }" { (return_statement "return 0;" return number_literal ;) })) })) (if_statement "if ((*param_2 & 0x60) != 0) {\n        uVar3 = 1;\n        pbVar2 = param_2;\n        goto LAB_0004e770;\n      }" if (parenthesized_expression "((*param_2 & 0x60) != 0)" ( (binary_expression "(*param_2 & 0x60) != 0" (parenthesized_expression "(*param_2 & 0x60)" ( (binary_expression "*param_2 & 0x60" (pointer_expression "*param_2" * identifier) & number_literal) )) != number_literal) )) (compound_statement "{\n        uVar3 = 1;\n        pbVar2 = param_2;\n        goto LAB_0004e770;\n      }" { (expression_statement "uVar3 = 1;" (assignment_expression "uVar3 = 1" identifier = number_literal) ;) (expression_statement "pbVar2 = param_2;" (assignment_expression "pbVar2 = param_2" identifier = identifier) ;) (goto_statement "goto LAB_0004e770;" goto statement_identifier ;) })) (labeled_statement "LAB_0004e750:\n      param_2 = param_2 + 1;" statement_identifier : (expression_statement "param_2 = param_2 + 1;" (assignment_expression "param_2 = param_2 + 1" identifier = (binary_expression "param_2 + 1" identifier + number_literal)) ;)) }) while (parenthesized_expression "(param_2 != pbVar1)" ( (binary_expression "param_2 != pbVar1" identifier != identifier) )) ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nint term_data_untrusted(Terminal *term,char *data,int len)\n\n{\n  wchar_t wVar1;\n  byte *pbVar2;\n  byte *data_00;\n  int len_00;\n  \n  if (0 < len) {\n    pbVar2 = (byte *)(data + len);\n    do {\n      while (*data == 10) {\n        data_00 = (byte *)0x8d48b;\n        len_00 = 2;\nLAB_0004e770:\n        bufchain_add(&term->inbuf,data_00,len_00);\n        if (term->in_term_out != 0) goto LAB_0004e750;\n        term->in_term_out = 1;\n        term->seen_disp_event = 1;\n        if (term->window_update_pending == 0) {\n          term->window_update_pending = 1;\n          wVar1 = schedule_timer(0x14,term_timer,term);\n          term->next_update = wVar1;\n        }\n        term->cblinker = 1;\n        term->cblink_pending = 0;\n        if ((term->blink_cur != 0) && (term->has_focus != 0)) {\n          wVar1 = schedule_timer(0x1c2,term_timer,term);\n          term->cblink_pending = 1;\n          term->next_cblink = wVar1;\n        }\n        if (term->selstate != ADDRTYPE_IPV6) {\n          term_out(term);\n        }\n        term->in_term_out = 0;\n        data = (char *)((byte *)data + 1);\n        if ((byte *)data == pbVar2) {\n          return 0;\n        }\n      }\n      if ((*data & 0x60U) != 0) {\n        len_00 = 1;\n        data_00 = (byte *)data;\n        goto LAB_0004e770;\n      }\nLAB_0004e750:\n      data = (char *)((byte *)data + 1);\n    } while ((byte *)data != pbVar2);\n  }\n  return 0;\n}\n\n" comment comment comment (function_definition "int term_data_untrusted(Terminal *term,char *data,int len)\n\n{\n  wchar_t wVar1;\n  byte *pbVar2;\n  byte *data_00;\n  int len_00;\n  \n  if (0 < len) {\n    pbVar2 = (byte *)(data + len);\n    do {\n      while (*data == 10) {\n        data_00 = (byte *)0x8d48b;\n        len_00 = 2;\nLAB_0004e770:\n        bufchain_add(&term->inbuf,data_00,len_00);\n        if (term->in_term_out != 0) goto LAB_0004e750;\n        term->in_term_out = 1;\n        term->seen_disp_event = 1;\n        if (term->window_update_pending == 0) {\n          term->window_update_pending = 1;\n          wVar1 = schedule_timer(0x14,term_timer,term);\n          term->next_update = wVar1;\n        }\n        term->cblinker = 1;\n        term->cblink_pending = 0;\n        if ((term->blink_cur != 0) && (term->has_focus != 0)) {\n          wVar1 = schedule_timer(0x1c2,term_timer,term);\n          term->cblink_pending = 1;\n          term->next_cblink = wVar1;\n        }\n        if (term->selstate != ADDRTYPE_IPV6) {\n          term_out(term);\n        }\n        term->in_term_out = 0;\n        data = (char *)((byte *)data + 1);\n        if ((byte *)data == pbVar2) {\n          return 0;\n        }\n      }\n      if ((*data & 0x60U) != 0) {\n        len_00 = 1;\n        data_00 = (byte *)data;\n        goto LAB_0004e770;\n      }\nLAB_0004e750:\n      data = (char *)((byte *)data + 1);\n    } while ((byte *)data != pbVar2);\n  }\n  return 0;\n}" primitive_type (function_declarator "term_data_untrusted(Terminal *term,char *data,int len)" identifier (parameter_list "(Terminal *term,char *data,int len)" ( (parameter_declaration "Terminal *term" type_identifier (pointer_declarator "*term" * identifier)) , (parameter_declaration "char *data" primitive_type (pointer_declarator "*data" * identifier)) , (parameter_declaration "int len" primitive_type identifier) ))) (compound_statement "{\n  wchar_t wVar1;\n  byte *pbVar2;\n  byte *data_00;\n  int len_00;\n  \n  if (0 < len) {\n    pbVar2 = (byte *)(data + len);\n    do {\n      while (*data == 10) {\n        data_00 = (byte *)0x8d48b;\n        len_00 = 2;\nLAB_0004e770:\n        bufchain_add(&term->inbuf,data_00,len_00);\n        if (term->in_term_out != 0) goto LAB_0004e750;\n        term->in_term_out = 1;\n        term->seen_disp_event = 1;\n        if (term->window_update_pending == 0) {\n          term->window_update_pending = 1;\n          wVar1 = schedule_timer(0x14,term_timer,term);\n          term->next_update = wVar1;\n        }\n        term->cblinker = 1;\n        term->cblink_pending = 0;\n        if ((term->blink_cur != 0) && (term->has_focus != 0)) {\n          wVar1 = schedule_timer(0x1c2,term_timer,term);\n          term->cblink_pending = 1;\n          term->next_cblink = wVar1;\n        }\n        if (term->selstate != ADDRTYPE_IPV6) {\n          term_out(term);\n        }\n        term->in_term_out = 0;\n        data = (char *)((byte *)data + 1);\n        if ((byte *)data == pbVar2) {\n          return 0;\n        }\n      }\n      if ((*data & 0x60U) != 0) {\n        len_00 = 1;\n        data_00 = (byte *)data;\n        goto LAB_0004e770;\n      }\nLAB_0004e750:\n      data = (char *)((byte *)data + 1);\n    } while ((byte *)data != pbVar2);\n  }\n  return 0;\n}" { (declaration "wchar_t wVar1;" type_identifier identifier ;) (declaration "byte *pbVar2;" type_identifier (pointer_declarator "*pbVar2" * identifier) ;) (declaration "byte *data_00;" type_identifier (pointer_declarator "*data_00" * identifier) ;) (declaration "int len_00;" primitive_type identifier ;) (if_statement "if (0 < len) {\n    pbVar2 = (byte *)(data + len);\n    do {\n      while (*data == 10) {\n        data_00 = (byte *)0x8d48b;\n        len_00 = 2;\nLAB_0004e770:\n        bufchain_add(&term->inbuf,data_00,len_00);\n        if (term->in_term_out != 0) goto LAB_0004e750;\n        term->in_term_out = 1;\n        term->seen_disp_event = 1;\n        if (term->window_update_pending == 0) {\n          term->window_update_pending = 1;\n          wVar1 = schedule_timer(0x14,term_timer,term);\n          term->next_update = wVar1;\n        }\n        term->cblinker = 1;\n        term->cblink_pending = 0;\n        if ((term->blink_cur != 0) && (term->has_focus != 0)) {\n          wVar1 = schedule_timer(0x1c2,term_timer,term);\n          term->cblink_pending = 1;\n          term->next_cblink = wVar1;\n        }\n        if (term->selstate != ADDRTYPE_IPV6) {\n          term_out(term);\n        }\n        term->in_term_out = 0;\n        data = (char *)((byte *)data + 1);\n        if ((byte *)data == pbVar2) {\n          return 0;\n        }\n      }\n      if ((*data & 0x60U) != 0) {\n        len_00 = 1;\n        data_00 = (byte *)data;\n        goto LAB_0004e770;\n      }\nLAB_0004e750:\n      data = (char *)((byte *)data + 1);\n    } while ((byte *)data != pbVar2);\n  }" if (parenthesized_expression "(0 < len)" ( (binary_expression "0 < len" number_literal < identifier) )) (compound_statement "{\n    pbVar2 = (byte *)(data + len);\n    do {\n      while (*data == 10) {\n        data_00 = (byte *)0x8d48b;\n        len_00 = 2;\nLAB_0004e770:\n        bufchain_add(&term->inbuf,data_00,len_00);\n        if (term->in_term_out != 0) goto LAB_0004e750;\n        term->in_term_out = 1;\n        term->seen_disp_event = 1;\n        if (term->window_update_pending == 0) {\n          term->window_update_pending = 1;\n          wVar1 = schedule_timer(0x14,term_timer,term);\n          term->next_update = wVar1;\n        }\n        term->cblinker = 1;\n        term->cblink_pending = 0;\n        if ((term->blink_cur != 0) && (term->has_focus != 0)) {\n          wVar1 = schedule_timer(0x1c2,term_timer,term);\n          term->cblink_pending = 1;\n          term->next_cblink = wVar1;\n        }\n        if (term->selstate != ADDRTYPE_IPV6) {\n          term_out(term);\n        }\n        term->in_term_out = 0;\n        data = (char *)((byte *)data + 1);\n        if ((byte *)data == pbVar2) {\n          return 0;\n        }\n      }\n      if ((*data & 0x60U) != 0) {\n        len_00 = 1;\n        data_00 = (byte *)data;\n        goto LAB_0004e770;\n      }\nLAB_0004e750:\n      data = (char *)((byte *)data + 1);\n    } while ((byte *)data != pbVar2);\n  }" { (expression_statement "pbVar2 = (byte *)(data + len);" (assignment_expression "pbVar2 = (byte *)(data + len)" identifier = (cast_expression "(byte *)(data + len)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(data + len)" ( (binary_expression "data + len" identifier + identifier) )))) ;) (do_statement "do {\n      while (*data == 10) {\n        data_00 = (byte *)0x8d48b;\n        len_00 = 2;\nLAB_0004e770:\n        bufchain_add(&term->inbuf,data_00,len_00);\n        if (term->in_term_out != 0) goto LAB_0004e750;\n        term->in_term_out = 1;\n        term->seen_disp_event = 1;\n        if (term->window_update_pending == 0) {\n          term->window_update_pending = 1;\n          wVar1 = schedule_timer(0x14,term_timer,term);\n          term->next_update = wVar1;\n        }\n        term->cblinker = 1;\n        term->cblink_pending = 0;\n        if ((term->blink_cur != 0) && (term->has_focus != 0)) {\n          wVar1 = schedule_timer(0x1c2,term_timer,term);\n          term->cblink_pending = 1;\n          term->next_cblink = wVar1;\n        }\n        if (term->selstate != ADDRTYPE_IPV6) {\n          term_out(term);\n        }\n        term->in_term_out = 0;\n        data = (char *)((byte *)data + 1);\n        if ((byte *)data == pbVar2) {\n          return 0;\n        }\n      }\n      if ((*data & 0x60U) != 0) {\n        len_00 = 1;\n        data_00 = (byte *)data;\n        goto LAB_0004e770;\n      }\nLAB_0004e750:\n      data = (char *)((byte *)data + 1);\n    } while ((byte *)data != pbVar2);" do (compound_statement "{\n      while (*data == 10) {\n        data_00 = (byte *)0x8d48b;\n        len_00 = 2;\nLAB_0004e770:\n        bufchain_add(&term->inbuf,data_00,len_00);\n        if (term->in_term_out != 0) goto LAB_0004e750;\n        term->in_term_out = 1;\n        term->seen_disp_event = 1;\n        if (term->window_update_pending == 0) {\n          term->window_update_pending = 1;\n          wVar1 = schedule_timer(0x14,term_timer,term);\n          term->next_update = wVar1;\n        }\n        term->cblinker = 1;\n        term->cblink_pending = 0;\n        if ((term->blink_cur != 0) && (term->has_focus != 0)) {\n          wVar1 = schedule_timer(0x1c2,term_timer,term);\n          term->cblink_pending = 1;\n          term->next_cblink = wVar1;\n        }\n        if (term->selstate != ADDRTYPE_IPV6) {\n          term_out(term);\n        }\n        term->in_term_out = 0;\n        data = (char *)((byte *)data + 1);\n        if ((byte *)data == pbVar2) {\n          return 0;\n        }\n      }\n      if ((*data & 0x60U) != 0) {\n        len_00 = 1;\n        data_00 = (byte *)data;\n        goto LAB_0004e770;\n      }\nLAB_0004e750:\n      data = (char *)((byte *)data + 1);\n    }" { (while_statement "while (*data == 10) {\n        data_00 = (byte *)0x8d48b;\n        len_00 = 2;\nLAB_0004e770:\n        bufchain_add(&term->inbuf,data_00,len_00);\n        if (term->in_term_out != 0) goto LAB_0004e750;\n        term->in_term_out = 1;\n        term->seen_disp_event = 1;\n        if (term->window_update_pending == 0) {\n          term->window_update_pending = 1;\n          wVar1 = schedule_timer(0x14,term_timer,term);\n          term->next_update = wVar1;\n        }\n        term->cblinker = 1;\n        term->cblink_pending = 0;\n        if ((term->blink_cur != 0) && (term->has_focus != 0)) {\n          wVar1 = schedule_timer(0x1c2,term_timer,term);\n          term->cblink_pending = 1;\n          term->next_cblink = wVar1;\n        }\n        if (term->selstate != ADDRTYPE_IPV6) {\n          term_out(term);\n        }\n        term->in_term_out = 0;\n        data = (char *)((byte *)data + 1);\n        if ((byte *)data == pbVar2) {\n          return 0;\n        }\n      }" while (parenthesized_expression "(*data == 10)" ( (binary_expression "*data == 10" (pointer_expression "*data" * identifier) == number_literal) )) (compound_statement "{\n        data_00 = (byte *)0x8d48b;\n        len_00 = 2;\nLAB_0004e770:\n        bufchain_add(&term->inbuf,data_00,len_00);\n        if (term->in_term_out != 0) goto LAB_0004e750;\n        term->in_term_out = 1;\n        term->seen_disp_event = 1;\n        if (term->window_update_pending == 0) {\n          term->window_update_pending = 1;\n          wVar1 = schedule_timer(0x14,term_timer,term);\n          term->next_update = wVar1;\n        }\n        term->cblinker = 1;\n        term->cblink_pending = 0;\n        if ((term->blink_cur != 0) && (term->has_focus != 0)) {\n          wVar1 = schedule_timer(0x1c2,term_timer,term);\n          term->cblink_pending = 1;\n          term->next_cblink = wVar1;\n        }\n        if (term->selstate != ADDRTYPE_IPV6) {\n          term_out(term);\n        }\n        term->in_term_out = 0;\n        data = (char *)((byte *)data + 1);\n        if ((byte *)data == pbVar2) {\n          return 0;\n        }\n      }" { (expression_statement "data_00 = (byte *)0x8d48b;" (assignment_expression "data_00 = (byte *)0x8d48b" identifier = (cast_expression "(byte *)0x8d48b" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "len_00 = 2;" (assignment_expression "len_00 = 2" identifier = number_literal) ;) (labeled_statement "LAB_0004e770:\n        bufchain_add(&term->inbuf,data_00,len_00);" statement_identifier : (expression_statement "bufchain_add(&term->inbuf,data_00,len_00);" (call_expression "bufchain_add(&term->inbuf,data_00,len_00)" identifier (argument_list "(&term->inbuf,data_00,len_00)" ( (pointer_expression "&term->inbuf" & (field_expression "term->inbuf" identifier -> field_identifier)) , identifier , identifier ))) ;)) (if_statement "if (term->in_term_out != 0) goto LAB_0004e750;" if (parenthesized_expression "(term->in_term_out != 0)" ( (binary_expression "term->in_term_out != 0" (field_expression "term->in_term_out" identifier -> field_identifier) != number_literal) )) (goto_statement "goto LAB_0004e750;" goto statement_identifier ;)) (expression_statement "term->in_term_out = 1;" (assignment_expression "term->in_term_out = 1" (field_expression "term->in_term_out" identifier -> field_identifier) = number_literal) ;) (expression_statement "term->seen_disp_event = 1;" (assignment_expression "term->seen_disp_event = 1" (field_expression "term->seen_disp_event" identifier -> field_identifier) = number_literal) ;) (if_statement "if (term->window_update_pending == 0) {\n          term->window_update_pending = 1;\n          wVar1 = schedule_timer(0x14,term_timer,term);\n          term->next_update = wVar1;\n        }" if (parenthesized_expression "(term->window_update_pending == 0)" ( (binary_expression "term->window_update_pending == 0" (field_expression "term->window_update_pending" identifier -> field_identifier) == number_literal) )) (compound_statement "{\n          term->window_update_pending = 1;\n          wVar1 = schedule_timer(0x14,term_timer,term);\n          term->next_update = wVar1;\n        }" { (expression_statement "term->window_update_pending = 1;" (assignment_expression "term->window_update_pending = 1" (field_expression "term->window_update_pending" identifier -> field_identifier) = number_literal) ;) (expression_statement "wVar1 = schedule_timer(0x14,term_timer,term);" (assignment_expression "wVar1 = schedule_timer(0x14,term_timer,term)" identifier = (call_expression "schedule_timer(0x14,term_timer,term)" identifier (argument_list "(0x14,term_timer,term)" ( number_literal , identifier , identifier )))) ;) (expression_statement "term->next_update = wVar1;" (assignment_expression "term->next_update = wVar1" (field_expression "term->next_update" identifier -> field_identifier) = identifier) ;) })) (expression_statement "term->cblinker = 1;" (assignment_expression "term->cblinker = 1" (field_expression "term->cblinker" identifier -> field_identifier) = number_literal) ;) (expression_statement "term->cblink_pending = 0;" (assignment_expression "term->cblink_pending = 0" (field_expression "term->cblink_pending" identifier -> field_identifier) = number_literal) ;) (if_statement "if ((term->blink_cur != 0) && (term->has_focus != 0)) {\n          wVar1 = schedule_timer(0x1c2,term_timer,term);\n          term->cblink_pending = 1;\n          term->next_cblink = wVar1;\n        }" if (parenthesized_expression "((term->blink_cur != 0) && (term->has_focus != 0))" ( (binary_expression "(term->blink_cur != 0) && (term->has_focus != 0)" (parenthesized_expression "(term->blink_cur != 0)" ( (binary_expression "term->blink_cur != 0" (field_expression "term->blink_cur" identifier -> field_identifier) != number_literal) )) && (parenthesized_expression "(term->has_focus != 0)" ( (binary_expression "term->has_focus != 0" (field_expression "term->has_focus" identifier -> field_identifier) != number_literal) ))) )) (compound_statement "{\n          wVar1 = schedule_timer(0x1c2,term_timer,term);\n          term->cblink_pending = 1;\n          term->next_cblink = wVar1;\n        }" { (expression_statement "wVar1 = schedule_timer(0x1c2,term_timer,term);" (assignment_expression "wVar1 = schedule_timer(0x1c2,term_timer,term)" identifier = (call_expression "schedule_timer(0x1c2,term_timer,term)" identifier (argument_list "(0x1c2,term_timer,term)" ( number_literal , identifier , identifier )))) ;) (expression_statement "term->cblink_pending = 1;" (assignment_expression "term->cblink_pending = 1" (field_expression "term->cblink_pending" identifier -> field_identifier) = number_literal) ;) (expression_statement "term->next_cblink = wVar1;" (assignment_expression "term->next_cblink = wVar1" (field_expression "term->next_cblink" identifier -> field_identifier) = identifier) ;) })) (if_statement "if (term->selstate != ADDRTYPE_IPV6) {\n          term_out(term);\n        }" if (parenthesized_expression "(term->selstate != ADDRTYPE_IPV6)" ( (binary_expression "term->selstate != ADDRTYPE_IPV6" (field_expression "term->selstate" identifier -> field_identifier) != identifier) )) (compound_statement "{\n          term_out(term);\n        }" { (expression_statement "term_out(term);" (call_expression "term_out(term)" identifier (argument_list "(term)" ( identifier ))) ;) })) (expression_statement "term->in_term_out = 0;" (assignment_expression "term->in_term_out = 0" (field_expression "term->in_term_out" identifier -> field_identifier) = number_literal) ;) (expression_statement "data = (char *)((byte *)data + 1);" (assignment_expression "data = (char *)((byte *)data + 1)" identifier = (cast_expression "(char *)((byte *)data + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((byte *)data + 1)" ( (binary_expression "(byte *)data + 1" (cast_expression "(byte *)data" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) + number_literal) )))) ;) (if_statement "if ((byte *)data == pbVar2) {\n          return 0;\n        }" if (parenthesized_expression "((byte *)data == pbVar2)" ( (binary_expression "(byte *)data == pbVar2" (cast_expression "(byte *)data" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) == identifier) )) (compound_statement "{\n          return 0;\n        }" { (return_statement "return 0;" return number_literal ;) })) })) (if_statement "if ((*data & 0x60U) != 0) {\n        len_00 = 1;\n        data_00 = (byte *)data;\n        goto LAB_0004e770;\n      }" if (parenthesized_expression "((*data & 0x60U) != 0)" ( (binary_expression "(*data & 0x60U) != 0" (parenthesized_expression "(*data & 0x60U)" ( (binary_expression "*data & 0x60U" (pointer_expression "*data" * identifier) & number_literal) )) != number_literal) )) (compound_statement "{\n        len_00 = 1;\n        data_00 = (byte *)data;\n        goto LAB_0004e770;\n      }" { (expression_statement "len_00 = 1;" (assignment_expression "len_00 = 1" identifier = number_literal) ;) (expression_statement "data_00 = (byte *)data;" (assignment_expression "data_00 = (byte *)data" identifier = (cast_expression "(byte *)data" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (goto_statement "goto LAB_0004e770;" goto statement_identifier ;) })) (labeled_statement "LAB_0004e750:\n      data = (char *)((byte *)data + 1);" statement_identifier : (expression_statement "data = (char *)((byte *)data + 1);" (assignment_expression "data = (char *)((byte *)data + 1)" identifier = (cast_expression "(char *)((byte *)data + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((byte *)data + 1)" ( (binary_expression "(byte *)data + 1" (cast_expression "(byte *)data" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) + number_literal) )))) ;)) }) while (parenthesized_expression "((byte *)data != pbVar2)" ( (binary_expression "(byte *)data != pbVar2" (cast_expression "(byte *)data" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) != identifier) )) ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "undefined4 FUN_0004e710(int param_1,byte *param_2,int param_3)\n\n{\n  byte *pbVar1;\n  byte *pbVar2;\n  undefined4 uVar3;\n  \n  if (0 < param_3) {\n    pbVar1 = param_2 + param_3;\n    do {\n      while (*param_2 == 10) {\n        pbVar2 = (byte *)0x8d48b;\n        uVar3 = 2;\nLAB_0004e770:\n        FUN_000310f0(param_1 + 0x60,pbVar2,uVar3);\n        if (*(int *)(param_1 + 0x1098) != 0) goto LAB_0004e750;\n        *(undefined4 *)(param_1 + 0x1098) = 1;\n        *(undefined4 *)(param_1 + 0x154) = 1;\n        if (*(int *)(param_1 + 0x109c) == 0) {\n          *(undefined4 *)(param_1 + 0x109c) = 1;\n          uVar3 = FUN_0004f3e0(0x14,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a0) = uVar3;\n        }\n        *(undefined4 *)(param_1 + 0xbc) = 1;\n        *(undefined4 *)(param_1 + 0x10a8) = 0;\n        if ((*(int *)(param_1 + 0x1100) != 0) && (*(int *)(param_1 + 0x134) != 0)) {\n          uVar3 = FUN_0004f3e0(0x1c2,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a8) = 1;\n          *(undefined4 *)(param_1 + 0x10b0) = uVar3;\n        }\n        if (*(int *)(param_1 + 0xe48) != 2) {\n          FUN_00047d40();\n        }\n        *(undefined4 *)(param_1 + 0x1098) = 0;\n        param_2 = param_2 + 1;\n        if (param_2 == pbVar1) {\n          return 0;\n        }\n      }\n      if ((*param_2 & 0x60) != 0) {\n        uVar3 = 1;\n        pbVar2 = param_2;\n        goto LAB_0004e770;\n      }\nLAB_0004e750:\n      param_2 = param_2 + 1;\n    } while (param_2 != pbVar1);\n  }\n  return 0;\n}\n\n" (function_definition "undefined4 FUN_0004e710(int param_1,byte *param_2,int param_3)\n\n{\n  byte *pbVar1;\n  byte *pbVar2;\n  undefined4 uVar3;\n  \n  if (0 < param_3) {\n    pbVar1 = param_2 + param_3;\n    do {\n      while (*param_2 == 10) {\n        pbVar2 = (byte *)0x8d48b;\n        uVar3 = 2;\nLAB_0004e770:\n        FUN_000310f0(param_1 + 0x60,pbVar2,uVar3);\n        if (*(int *)(param_1 + 0x1098) != 0) goto LAB_0004e750;\n        *(undefined4 *)(param_1 + 0x1098) = 1;\n        *(undefined4 *)(param_1 + 0x154) = 1;\n        if (*(int *)(param_1 + 0x109c) == 0) {\n          *(undefined4 *)(param_1 + 0x109c) = 1;\n          uVar3 = FUN_0004f3e0(0x14,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a0) = uVar3;\n        }\n        *(undefined4 *)(param_1 + 0xbc) = 1;\n        *(undefined4 *)(param_1 + 0x10a8) = 0;\n        if ((*(int *)(param_1 + 0x1100) != 0) && (*(int *)(param_1 + 0x134) != 0)) {\n          uVar3 = FUN_0004f3e0(0x1c2,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a8) = 1;\n          *(undefined4 *)(param_1 + 0x10b0) = uVar3;\n        }\n        if (*(int *)(param_1 + 0xe48) != 2) {\n          FUN_00047d40();\n        }\n        *(undefined4 *)(param_1 + 0x1098) = 0;\n        param_2 = param_2 + 1;\n        if (param_2 == pbVar1) {\n          return 0;\n        }\n      }\n      if ((*param_2 & 0x60) != 0) {\n        uVar3 = 1;\n        pbVar2 = param_2;\n        goto LAB_0004e770;\n      }\nLAB_0004e750:\n      param_2 = param_2 + 1;\n    } while (param_2 != pbVar1);\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_0004e710(int param_1,byte *param_2,int param_3)" identifier (parameter_list "(int param_1,byte *param_2,int param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "byte *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  byte *pbVar1;\n  byte *pbVar2;\n  undefined4 uVar3;\n  \n  if (0 < param_3) {\n    pbVar1 = param_2 + param_3;\n    do {\n      while (*param_2 == 10) {\n        pbVar2 = (byte *)0x8d48b;\n        uVar3 = 2;\nLAB_0004e770:\n        FUN_000310f0(param_1 + 0x60,pbVar2,uVar3);\n        if (*(int *)(param_1 + 0x1098) != 0) goto LAB_0004e750;\n        *(undefined4 *)(param_1 + 0x1098) = 1;\n        *(undefined4 *)(param_1 + 0x154) = 1;\n        if (*(int *)(param_1 + 0x109c) == 0) {\n          *(undefined4 *)(param_1 + 0x109c) = 1;\n          uVar3 = FUN_0004f3e0(0x14,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a0) = uVar3;\n        }\n        *(undefined4 *)(param_1 + 0xbc) = 1;\n        *(undefined4 *)(param_1 + 0x10a8) = 0;\n        if ((*(int *)(param_1 + 0x1100) != 0) && (*(int *)(param_1 + 0x134) != 0)) {\n          uVar3 = FUN_0004f3e0(0x1c2,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a8) = 1;\n          *(undefined4 *)(param_1 + 0x10b0) = uVar3;\n        }\n        if (*(int *)(param_1 + 0xe48) != 2) {\n          FUN_00047d40();\n        }\n        *(undefined4 *)(param_1 + 0x1098) = 0;\n        param_2 = param_2 + 1;\n        if (param_2 == pbVar1) {\n          return 0;\n        }\n      }\n      if ((*param_2 & 0x60) != 0) {\n        uVar3 = 1;\n        pbVar2 = param_2;\n        goto LAB_0004e770;\n      }\nLAB_0004e750:\n      param_2 = param_2 + 1;\n    } while (param_2 != pbVar1);\n  }\n  return 0;\n}" { (declaration "byte *pbVar1;" type_identifier (pointer_declarator "*pbVar1" * identifier) ;) (declaration "byte *pbVar2;" type_identifier (pointer_declarator "*pbVar2" * identifier) ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (if_statement "if (0 < param_3) {\n    pbVar1 = param_2 + param_3;\n    do {\n      while (*param_2 == 10) {\n        pbVar2 = (byte *)0x8d48b;\n        uVar3 = 2;\nLAB_0004e770:\n        FUN_000310f0(param_1 + 0x60,pbVar2,uVar3);\n        if (*(int *)(param_1 + 0x1098) != 0) goto LAB_0004e750;\n        *(undefined4 *)(param_1 + 0x1098) = 1;\n        *(undefined4 *)(param_1 + 0x154) = 1;\n        if (*(int *)(param_1 + 0x109c) == 0) {\n          *(undefined4 *)(param_1 + 0x109c) = 1;\n          uVar3 = FUN_0004f3e0(0x14,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a0) = uVar3;\n        }\n        *(undefined4 *)(param_1 + 0xbc) = 1;\n        *(undefined4 *)(param_1 + 0x10a8) = 0;\n        if ((*(int *)(param_1 + 0x1100) != 0) && (*(int *)(param_1 + 0x134) != 0)) {\n          uVar3 = FUN_0004f3e0(0x1c2,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a8) = 1;\n          *(undefined4 *)(param_1 + 0x10b0) = uVar3;\n        }\n        if (*(int *)(param_1 + 0xe48) != 2) {\n          FUN_00047d40();\n        }\n        *(undefined4 *)(param_1 + 0x1098) = 0;\n        param_2 = param_2 + 1;\n        if (param_2 == pbVar1) {\n          return 0;\n        }\n      }\n      if ((*param_2 & 0x60) != 0) {\n        uVar3 = 1;\n        pbVar2 = param_2;\n        goto LAB_0004e770;\n      }\nLAB_0004e750:\n      param_2 = param_2 + 1;\n    } while (param_2 != pbVar1);\n  }" if (parenthesized_expression "(0 < param_3)" ( (binary_expression "0 < param_3" number_literal < identifier) )) (compound_statement "{\n    pbVar1 = param_2 + param_3;\n    do {\n      while (*param_2 == 10) {\n        pbVar2 = (byte *)0x8d48b;\n        uVar3 = 2;\nLAB_0004e770:\n        FUN_000310f0(param_1 + 0x60,pbVar2,uVar3);\n        if (*(int *)(param_1 + 0x1098) != 0) goto LAB_0004e750;\n        *(undefined4 *)(param_1 + 0x1098) = 1;\n        *(undefined4 *)(param_1 + 0x154) = 1;\n        if (*(int *)(param_1 + 0x109c) == 0) {\n          *(undefined4 *)(param_1 + 0x109c) = 1;\n          uVar3 = FUN_0004f3e0(0x14,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a0) = uVar3;\n        }\n        *(undefined4 *)(param_1 + 0xbc) = 1;\n        *(undefined4 *)(param_1 + 0x10a8) = 0;\n        if ((*(int *)(param_1 + 0x1100) != 0) && (*(int *)(param_1 + 0x134) != 0)) {\n          uVar3 = FUN_0004f3e0(0x1c2,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a8) = 1;\n          *(undefined4 *)(param_1 + 0x10b0) = uVar3;\n        }\n        if (*(int *)(param_1 + 0xe48) != 2) {\n          FUN_00047d40();\n        }\n        *(undefined4 *)(param_1 + 0x1098) = 0;\n        param_2 = param_2 + 1;\n        if (param_2 == pbVar1) {\n          return 0;\n        }\n      }\n      if ((*param_2 & 0x60) != 0) {\n        uVar3 = 1;\n        pbVar2 = param_2;\n        goto LAB_0004e770;\n      }\nLAB_0004e750:\n      param_2 = param_2 + 1;\n    } while (param_2 != pbVar1);\n  }" { (expression_statement "pbVar1 = param_2 + param_3;" (assignment_expression "pbVar1 = param_2 + param_3" identifier = (binary_expression "param_2 + param_3" identifier + identifier)) ;) (do_statement "do {\n      while (*param_2 == 10) {\n        pbVar2 = (byte *)0x8d48b;\n        uVar3 = 2;\nLAB_0004e770:\n        FUN_000310f0(param_1 + 0x60,pbVar2,uVar3);\n        if (*(int *)(param_1 + 0x1098) != 0) goto LAB_0004e750;\n        *(undefined4 *)(param_1 + 0x1098) = 1;\n        *(undefined4 *)(param_1 + 0x154) = 1;\n        if (*(int *)(param_1 + 0x109c) == 0) {\n          *(undefined4 *)(param_1 + 0x109c) = 1;\n          uVar3 = FUN_0004f3e0(0x14,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a0) = uVar3;\n        }\n        *(undefined4 *)(param_1 + 0xbc) = 1;\n        *(undefined4 *)(param_1 + 0x10a8) = 0;\n        if ((*(int *)(param_1 + 0x1100) != 0) && (*(int *)(param_1 + 0x134) != 0)) {\n          uVar3 = FUN_0004f3e0(0x1c2,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a8) = 1;\n          *(undefined4 *)(param_1 + 0x10b0) = uVar3;\n        }\n        if (*(int *)(param_1 + 0xe48) != 2) {\n          FUN_00047d40();\n        }\n        *(undefined4 *)(param_1 + 0x1098) = 0;\n        param_2 = param_2 + 1;\n        if (param_2 == pbVar1) {\n          return 0;\n        }\n      }\n      if ((*param_2 & 0x60) != 0) {\n        uVar3 = 1;\n        pbVar2 = param_2;\n        goto LAB_0004e770;\n      }\nLAB_0004e750:\n      param_2 = param_2 + 1;\n    } while (param_2 != pbVar1);" do (compound_statement "{\n      while (*param_2 == 10) {\n        pbVar2 = (byte *)0x8d48b;\n        uVar3 = 2;\nLAB_0004e770:\n        FUN_000310f0(param_1 + 0x60,pbVar2,uVar3);\n        if (*(int *)(param_1 + 0x1098) != 0) goto LAB_0004e750;\n        *(undefined4 *)(param_1 + 0x1098) = 1;\n        *(undefined4 *)(param_1 + 0x154) = 1;\n        if (*(int *)(param_1 + 0x109c) == 0) {\n          *(undefined4 *)(param_1 + 0x109c) = 1;\n          uVar3 = FUN_0004f3e0(0x14,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a0) = uVar3;\n        }\n        *(undefined4 *)(param_1 + 0xbc) = 1;\n        *(undefined4 *)(param_1 + 0x10a8) = 0;\n        if ((*(int *)(param_1 + 0x1100) != 0) && (*(int *)(param_1 + 0x134) != 0)) {\n          uVar3 = FUN_0004f3e0(0x1c2,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a8) = 1;\n          *(undefined4 *)(param_1 + 0x10b0) = uVar3;\n        }\n        if (*(int *)(param_1 + 0xe48) != 2) {\n          FUN_00047d40();\n        }\n        *(undefined4 *)(param_1 + 0x1098) = 0;\n        param_2 = param_2 + 1;\n        if (param_2 == pbVar1) {\n          return 0;\n        }\n      }\n      if ((*param_2 & 0x60) != 0) {\n        uVar3 = 1;\n        pbVar2 = param_2;\n        goto LAB_0004e770;\n      }\nLAB_0004e750:\n      param_2 = param_2 + 1;\n    }" { (while_statement "while (*param_2 == 10) {\n        pbVar2 = (byte *)0x8d48b;\n        uVar3 = 2;\nLAB_0004e770:\n        FUN_000310f0(param_1 + 0x60,pbVar2,uVar3);\n        if (*(int *)(param_1 + 0x1098) != 0) goto LAB_0004e750;\n        *(undefined4 *)(param_1 + 0x1098) = 1;\n        *(undefined4 *)(param_1 + 0x154) = 1;\n        if (*(int *)(param_1 + 0x109c) == 0) {\n          *(undefined4 *)(param_1 + 0x109c) = 1;\n          uVar3 = FUN_0004f3e0(0x14,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a0) = uVar3;\n        }\n        *(undefined4 *)(param_1 + 0xbc) = 1;\n        *(undefined4 *)(param_1 + 0x10a8) = 0;\n        if ((*(int *)(param_1 + 0x1100) != 0) && (*(int *)(param_1 + 0x134) != 0)) {\n          uVar3 = FUN_0004f3e0(0x1c2,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a8) = 1;\n          *(undefined4 *)(param_1 + 0x10b0) = uVar3;\n        }\n        if (*(int *)(param_1 + 0xe48) != 2) {\n          FUN_00047d40();\n        }\n        *(undefined4 *)(param_1 + 0x1098) = 0;\n        param_2 = param_2 + 1;\n        if (param_2 == pbVar1) {\n          return 0;\n        }\n      }" while (parenthesized_expression "(*param_2 == 10)" ( (binary_expression "*param_2 == 10" (pointer_expression "*param_2" * identifier) == number_literal) )) (compound_statement "{\n        pbVar2 = (byte *)0x8d48b;\n        uVar3 = 2;\nLAB_0004e770:\n        FUN_000310f0(param_1 + 0x60,pbVar2,uVar3);\n        if (*(int *)(param_1 + 0x1098) != 0) goto LAB_0004e750;\n        *(undefined4 *)(param_1 + 0x1098) = 1;\n        *(undefined4 *)(param_1 + 0x154) = 1;\n        if (*(int *)(param_1 + 0x109c) == 0) {\n          *(undefined4 *)(param_1 + 0x109c) = 1;\n          uVar3 = FUN_0004f3e0(0x14,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a0) = uVar3;\n        }\n        *(undefined4 *)(param_1 + 0xbc) = 1;\n        *(undefined4 *)(param_1 + 0x10a8) = 0;\n        if ((*(int *)(param_1 + 0x1100) != 0) && (*(int *)(param_1 + 0x134) != 0)) {\n          uVar3 = FUN_0004f3e0(0x1c2,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a8) = 1;\n          *(undefined4 *)(param_1 + 0x10b0) = uVar3;\n        }\n        if (*(int *)(param_1 + 0xe48) != 2) {\n          FUN_00047d40();\n        }\n        *(undefined4 *)(param_1 + 0x1098) = 0;\n        param_2 = param_2 + 1;\n        if (param_2 == pbVar1) {\n          return 0;\n        }\n      }" { (expression_statement "pbVar2 = (byte *)0x8d48b;" (assignment_expression "pbVar2 = (byte *)0x8d48b" identifier = (cast_expression "(byte *)0x8d48b" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "uVar3 = 2;" (assignment_expression "uVar3 = 2" identifier = number_literal) ;) (labeled_statement "LAB_0004e770:\n        FUN_000310f0(param_1 + 0x60,pbVar2,uVar3);" statement_identifier : (expression_statement "FUN_000310f0(param_1 + 0x60,pbVar2,uVar3);" (call_expression "FUN_000310f0(param_1 + 0x60,pbVar2,uVar3)" identifier (argument_list "(param_1 + 0x60,pbVar2,uVar3)" ( (binary_expression "param_1 + 0x60" identifier + number_literal) , identifier , identifier ))) ;)) (if_statement "if (*(int *)(param_1 + 0x1098) != 0) goto LAB_0004e750;" if (parenthesized_expression "(*(int *)(param_1 + 0x1098) != 0)" ( (binary_expression "*(int *)(param_1 + 0x1098) != 0" (pointer_expression "*(int *)(param_1 + 0x1098)" * (cast_expression "(int *)(param_1 + 0x1098)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1098)" ( (binary_expression "param_1 + 0x1098" identifier + number_literal) )))) != number_literal) )) (goto_statement "goto LAB_0004e750;" goto statement_identifier ;)) (expression_statement "*(undefined4 *)(param_1 + 0x1098) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0x1098) = 1" (pointer_expression "*(undefined4 *)(param_1 + 0x1098)" * (cast_expression "(undefined4 *)(param_1 + 0x1098)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1098)" ( (binary_expression "param_1 + 0x1098" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(param_1 + 0x154) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0x154) = 1" (pointer_expression "*(undefined4 *)(param_1 + 0x154)" * (cast_expression "(undefined4 *)(param_1 + 0x154)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x154)" ( (binary_expression "param_1 + 0x154" identifier + number_literal) )))) = number_literal) ;) (if_statement "if (*(int *)(param_1 + 0x109c) == 0) {\n          *(undefined4 *)(param_1 + 0x109c) = 1;\n          uVar3 = FUN_0004f3e0(0x14,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a0) = uVar3;\n        }" if (parenthesized_expression "(*(int *)(param_1 + 0x109c) == 0)" ( (binary_expression "*(int *)(param_1 + 0x109c) == 0" (pointer_expression "*(int *)(param_1 + 0x109c)" * (cast_expression "(int *)(param_1 + 0x109c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x109c)" ( (binary_expression "param_1 + 0x109c" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n          *(undefined4 *)(param_1 + 0x109c) = 1;\n          uVar3 = FUN_0004f3e0(0x14,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a0) = uVar3;\n        }" { (expression_statement "*(undefined4 *)(param_1 + 0x109c) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0x109c) = 1" (pointer_expression "*(undefined4 *)(param_1 + 0x109c)" * (cast_expression "(undefined4 *)(param_1 + 0x109c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x109c)" ( (binary_expression "param_1 + 0x109c" identifier + number_literal) )))) = number_literal) ;) (expression_statement "uVar3 = FUN_0004f3e0(0x14,FUN_00046070,param_1);" (assignment_expression "uVar3 = FUN_0004f3e0(0x14,FUN_00046070,param_1)" identifier = (call_expression "FUN_0004f3e0(0x14,FUN_00046070,param_1)" identifier (argument_list "(0x14,FUN_00046070,param_1)" ( number_literal , identifier , identifier )))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x10a0) = uVar3;" (assignment_expression "*(undefined4 *)(param_1 + 0x10a0) = uVar3" (pointer_expression "*(undefined4 *)(param_1 + 0x10a0)" * (cast_expression "(undefined4 *)(param_1 + 0x10a0)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10a0)" ( (binary_expression "param_1 + 0x10a0" identifier + number_literal) )))) = identifier) ;) })) (expression_statement "*(undefined4 *)(param_1 + 0xbc) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0xbc) = 1" (pointer_expression "*(undefined4 *)(param_1 + 0xbc)" * (cast_expression "(undefined4 *)(param_1 + 0xbc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xbc)" ( (binary_expression "param_1 + 0xbc" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(param_1 + 0x10a8) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x10a8) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x10a8)" * (cast_expression "(undefined4 *)(param_1 + 0x10a8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10a8)" ( (binary_expression "param_1 + 0x10a8" identifier + number_literal) )))) = number_literal) ;) (if_statement "if ((*(int *)(param_1 + 0x1100) != 0) && (*(int *)(param_1 + 0x134) != 0)) {\n          uVar3 = FUN_0004f3e0(0x1c2,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a8) = 1;\n          *(undefined4 *)(param_1 + 0x10b0) = uVar3;\n        }" if (parenthesized_expression "((*(int *)(param_1 + 0x1100) != 0) && (*(int *)(param_1 + 0x134) != 0))" ( (binary_expression "(*(int *)(param_1 + 0x1100) != 0) && (*(int *)(param_1 + 0x134) != 0)" (parenthesized_expression "(*(int *)(param_1 + 0x1100) != 0)" ( (binary_expression "*(int *)(param_1 + 0x1100) != 0" (pointer_expression "*(int *)(param_1 + 0x1100)" * (cast_expression "(int *)(param_1 + 0x1100)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1100)" ( (binary_expression "param_1 + 0x1100" identifier + number_literal) )))) != number_literal) )) && (parenthesized_expression "(*(int *)(param_1 + 0x134) != 0)" ( (binary_expression "*(int *)(param_1 + 0x134) != 0" (pointer_expression "*(int *)(param_1 + 0x134)" * (cast_expression "(int *)(param_1 + 0x134)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x134)" ( (binary_expression "param_1 + 0x134" identifier + number_literal) )))) != number_literal) ))) )) (compound_statement "{\n          uVar3 = FUN_0004f3e0(0x1c2,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a8) = 1;\n          *(undefined4 *)(param_1 + 0x10b0) = uVar3;\n        }" { (expression_statement "uVar3 = FUN_0004f3e0(0x1c2,FUN_00046070,param_1);" (assignment_expression "uVar3 = FUN_0004f3e0(0x1c2,FUN_00046070,param_1)" identifier = (call_expression "FUN_0004f3e0(0x1c2,FUN_00046070,param_1)" identifier (argument_list "(0x1c2,FUN_00046070,param_1)" ( number_literal , identifier , identifier )))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x10a8) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0x10a8) = 1" (pointer_expression "*(undefined4 *)(param_1 + 0x10a8)" * (cast_expression "(undefined4 *)(param_1 + 0x10a8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10a8)" ( (binary_expression "param_1 + 0x10a8" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(param_1 + 0x10b0) = uVar3;" (assignment_expression "*(undefined4 *)(param_1 + 0x10b0) = uVar3" (pointer_expression "*(undefined4 *)(param_1 + 0x10b0)" * (cast_expression "(undefined4 *)(param_1 + 0x10b0)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10b0)" ( (binary_expression "param_1 + 0x10b0" identifier + number_literal) )))) = identifier) ;) })) (if_statement "if (*(int *)(param_1 + 0xe48) != 2) {\n          FUN_00047d40();\n        }" if (parenthesized_expression "(*(int *)(param_1 + 0xe48) != 2)" ( (binary_expression "*(int *)(param_1 + 0xe48) != 2" (pointer_expression "*(int *)(param_1 + 0xe48)" * (cast_expression "(int *)(param_1 + 0xe48)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xe48)" ( (binary_expression "param_1 + 0xe48" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n          FUN_00047d40();\n        }" { (expression_statement "FUN_00047d40();" (call_expression "FUN_00047d40()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "*(undefined4 *)(param_1 + 0x1098) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x1098) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x1098)" * (cast_expression "(undefined4 *)(param_1 + 0x1098)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1098)" ( (binary_expression "param_1 + 0x1098" identifier + number_literal) )))) = number_literal) ;) (expression_statement "param_2 = param_2 + 1;" (assignment_expression "param_2 = param_2 + 1" identifier = (binary_expression "param_2 + 1" identifier + number_literal)) ;) (if_statement "if (param_2 == pbVar1) {\n          return 0;\n        }" if (parenthesized_expression "(param_2 == pbVar1)" ( (binary_expression "param_2 == pbVar1" identifier == identifier) )) (compound_statement "{\n          return 0;\n        }" { (return_statement "return 0;" return number_literal ;) })) })) (if_statement "if ((*param_2 & 0x60) != 0) {\n        uVar3 = 1;\n        pbVar2 = param_2;\n        goto LAB_0004e770;\n      }" if (parenthesized_expression "((*param_2 & 0x60) != 0)" ( (binary_expression "(*param_2 & 0x60) != 0" (parenthesized_expression "(*param_2 & 0x60)" ( (binary_expression "*param_2 & 0x60" (pointer_expression "*param_2" * identifier) & number_literal) )) != number_literal) )) (compound_statement "{\n        uVar3 = 1;\n        pbVar2 = param_2;\n        goto LAB_0004e770;\n      }" { (expression_statement "uVar3 = 1;" (assignment_expression "uVar3 = 1" identifier = number_literal) ;) (expression_statement "pbVar2 = param_2;" (assignment_expression "pbVar2 = param_2" identifier = identifier) ;) (goto_statement "goto LAB_0004e770;" goto statement_identifier ;) })) (labeled_statement "LAB_0004e750:\n      param_2 = param_2 + 1;" statement_identifier : (expression_statement "param_2 = param_2 + 1;" (assignment_expression "param_2 = param_2 + 1" identifier = (binary_expression "param_2 + 1" identifier + number_literal)) ;)) }) while (parenthesized_expression "(param_2 != pbVar1)" ( (binary_expression "param_2 != pbVar1" identifier != identifier) )) ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (do_statement do (compound_statement { (while_statement while (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , IDENT , IDENT ))) ;)) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , IDENT , IDENT )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) )) && (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , IDENT , IDENT )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (compound_statement { (return_statement return LIT ;) })) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) & LIT) )) != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (goto_statement goto statement_identifier ;) })) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;)) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) })) (return_statement return LIT ;) })))
(function_definition "undefined4 FUN_0004e710(int param_1,byte *param_2,int param_3)\n\n{\n  byte *pbVar1;\n  byte *pbVar2;\n  undefined4 uVar3;\n  \n  if (0 < param_3) {\n    pbVar1 = param_2 + param_3;\n    do {\n      while (*param_2 == 10) {\n        pbVar2 = (byte *)0x8d48b;\n        uVar3 = 2;\nLAB_0004e770:\n        FUN_000310f0(param_1 + 0x60,pbVar2,uVar3);\n        if (*(int *)(param_1 + 0x1098) != 0) goto LAB_0004e750;\n        *(undefined4 *)(param_1 + 0x1098) = 1;\n        *(undefined4 *)(param_1 + 0x154) = 1;\n        if (*(int *)(param_1 + 0x109c) == 0) {\n          *(undefined4 *)(param_1 + 0x109c) = 1;\n          uVar3 = FUN_0004f3e0(0x14,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a0) = uVar3;\n        }\n        *(undefined4 *)(param_1 + 0xbc) = 1;\n        *(undefined4 *)(param_1 + 0x10a8) = 0;\n        if ((*(int *)(param_1 + 0x1100) != 0) && (*(int *)(param_1 + 0x134) != 0)) {\n          uVar3 = FUN_0004f3e0(0x1c2,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a8) = 1;\n          *(undefined4 *)(param_1 + 0x10b0) = uVar3;\n        }\n        if (*(int *)(param_1 + 0xe48) != 2) {\n          FUN_00047d40();\n        }\n        *(undefined4 *)(param_1 + 0x1098) = 0;\n        param_2 = param_2 + 1;\n        if (param_2 == pbVar1) {\n          return 0;\n        }\n      }\n      if ((*param_2 & 0x60) != 0) {\n        uVar3 = 1;\n        pbVar2 = param_2;\n        goto LAB_0004e770;\n      }\nLAB_0004e750:\n      param_2 = param_2 + 1;\n    } while (param_2 != pbVar1);\n  }\n  return 0;\n}" (type_identifier "undefined4") (function_declarator "FUN_0004e710(int param_1,byte *param_2,int param_3)" (identifier "FUN_0004e710") (parameter_list "(int param_1,byte *param_2,int param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "byte *param_2" (type_identifier "byte") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")"))) (compound_statement "{\n  byte *pbVar1;\n  byte *pbVar2;\n  undefined4 uVar3;\n  \n  if (0 < param_3) {\n    pbVar1 = param_2 + param_3;\n    do {\n      while (*param_2 == 10) {\n        pbVar2 = (byte *)0x8d48b;\n        uVar3 = 2;\nLAB_0004e770:\n        FUN_000310f0(param_1 + 0x60,pbVar2,uVar3);\n        if (*(int *)(param_1 + 0x1098) != 0) goto LAB_0004e750;\n        *(undefined4 *)(param_1 + 0x1098) = 1;\n        *(undefined4 *)(param_1 + 0x154) = 1;\n        if (*(int *)(param_1 + 0x109c) == 0) {\n          *(undefined4 *)(param_1 + 0x109c) = 1;\n          uVar3 = FUN_0004f3e0(0x14,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a0) = uVar3;\n        }\n        *(undefined4 *)(param_1 + 0xbc) = 1;\n        *(undefined4 *)(param_1 + 0x10a8) = 0;\n        if ((*(int *)(param_1 + 0x1100) != 0) && (*(int *)(param_1 + 0x134) != 0)) {\n          uVar3 = FUN_0004f3e0(0x1c2,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a8) = 1;\n          *(undefined4 *)(param_1 + 0x10b0) = uVar3;\n        }\n        if (*(int *)(param_1 + 0xe48) != 2) {\n          FUN_00047d40();\n        }\n        *(undefined4 *)(param_1 + 0x1098) = 0;\n        param_2 = param_2 + 1;\n        if (param_2 == pbVar1) {\n          return 0;\n        }\n      }\n      if ((*param_2 & 0x60) != 0) {\n        uVar3 = 1;\n        pbVar2 = param_2;\n        goto LAB_0004e770;\n      }\nLAB_0004e750:\n      param_2 = param_2 + 1;\n    } while (param_2 != pbVar1);\n  }\n  return 0;\n}" ({ "{") (declaration "byte *pbVar1;" (type_identifier "byte") (pointer_declarator "*pbVar1" (* "*") (identifier "pbVar1")) (; ";")) (declaration "byte *pbVar2;" (type_identifier "byte") (pointer_declarator "*pbVar2" (* "*") (identifier "pbVar2")) (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (if_statement "if (0 < param_3) {\n    pbVar1 = param_2 + param_3;\n    do {\n      while (*param_2 == 10) {\n        pbVar2 = (byte *)0x8d48b;\n        uVar3 = 2;\nLAB_0004e770:\n        FUN_000310f0(param_1 + 0x60,pbVar2,uVar3);\n        if (*(int *)(param_1 + 0x1098) != 0) goto LAB_0004e750;\n        *(undefined4 *)(param_1 + 0x1098) = 1;\n        *(undefined4 *)(param_1 + 0x154) = 1;\n        if (*(int *)(param_1 + 0x109c) == 0) {\n          *(undefined4 *)(param_1 + 0x109c) = 1;\n          uVar3 = FUN_0004f3e0(0x14,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a0) = uVar3;\n        }\n        *(undefined4 *)(param_1 + 0xbc) = 1;\n        *(undefined4 *)(param_1 + 0x10a8) = 0;\n        if ((*(int *)(param_1 + 0x1100) != 0) && (*(int *)(param_1 + 0x134) != 0)) {\n          uVar3 = FUN_0004f3e0(0x1c2,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a8) = 1;\n          *(undefined4 *)(param_1 + 0x10b0) = uVar3;\n        }\n        if (*(int *)(param_1 + 0xe48) != 2) {\n          FUN_00047d40();\n        }\n        *(undefined4 *)(param_1 + 0x1098) = 0;\n        param_2 = param_2 + 1;\n        if (param_2 == pbVar1) {\n          return 0;\n        }\n      }\n      if ((*param_2 & 0x60) != 0) {\n        uVar3 = 1;\n        pbVar2 = param_2;\n        goto LAB_0004e770;\n      }\nLAB_0004e750:\n      param_2 = param_2 + 1;\n    } while (param_2 != pbVar1);\n  }" (if "if") (parenthesized_expression "(0 < param_3)" (( "(") (binary_expression "0 < param_3" (number_literal "0") (< "<") (identifier "param_3")) () ")")) (compound_statement "{\n    pbVar1 = param_2 + param_3;\n    do {\n      while (*param_2 == 10) {\n        pbVar2 = (byte *)0x8d48b;\n        uVar3 = 2;\nLAB_0004e770:\n        FUN_000310f0(param_1 + 0x60,pbVar2,uVar3);\n        if (*(int *)(param_1 + 0x1098) != 0) goto LAB_0004e750;\n        *(undefined4 *)(param_1 + 0x1098) = 1;\n        *(undefined4 *)(param_1 + 0x154) = 1;\n        if (*(int *)(param_1 + 0x109c) == 0) {\n          *(undefined4 *)(param_1 + 0x109c) = 1;\n          uVar3 = FUN_0004f3e0(0x14,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a0) = uVar3;\n        }\n        *(undefined4 *)(param_1 + 0xbc) = 1;\n        *(undefined4 *)(param_1 + 0x10a8) = 0;\n        if ((*(int *)(param_1 + 0x1100) != 0) && (*(int *)(param_1 + 0x134) != 0)) {\n          uVar3 = FUN_0004f3e0(0x1c2,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a8) = 1;\n          *(undefined4 *)(param_1 + 0x10b0) = uVar3;\n        }\n        if (*(int *)(param_1 + 0xe48) != 2) {\n          FUN_00047d40();\n        }\n        *(undefined4 *)(param_1 + 0x1098) = 0;\n        param_2 = param_2 + 1;\n        if (param_2 == pbVar1) {\n          return 0;\n        }\n      }\n      if ((*param_2 & 0x60) != 0) {\n        uVar3 = 1;\n        pbVar2 = param_2;\n        goto LAB_0004e770;\n      }\nLAB_0004e750:\n      param_2 = param_2 + 1;\n    } while (param_2 != pbVar1);\n  }" ({ "{") (expression_statement "pbVar1 = param_2 + param_3;" (assignment_expression "pbVar1 = param_2 + param_3" (identifier "pbVar1") (= "=") (binary_expression "param_2 + param_3" (identifier "param_2") (+ "+") (identifier "param_3"))) (; ";")) (do_statement "do {\n      while (*param_2 == 10) {\n        pbVar2 = (byte *)0x8d48b;\n        uVar3 = 2;\nLAB_0004e770:\n        FUN_000310f0(param_1 + 0x60,pbVar2,uVar3);\n        if (*(int *)(param_1 + 0x1098) != 0) goto LAB_0004e750;\n        *(undefined4 *)(param_1 + 0x1098) = 1;\n        *(undefined4 *)(param_1 + 0x154) = 1;\n        if (*(int *)(param_1 + 0x109c) == 0) {\n          *(undefined4 *)(param_1 + 0x109c) = 1;\n          uVar3 = FUN_0004f3e0(0x14,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a0) = uVar3;\n        }\n        *(undefined4 *)(param_1 + 0xbc) = 1;\n        *(undefined4 *)(param_1 + 0x10a8) = 0;\n        if ((*(int *)(param_1 + 0x1100) != 0) && (*(int *)(param_1 + 0x134) != 0)) {\n          uVar3 = FUN_0004f3e0(0x1c2,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a8) = 1;\n          *(undefined4 *)(param_1 + 0x10b0) = uVar3;\n        }\n        if (*(int *)(param_1 + 0xe48) != 2) {\n          FUN_00047d40();\n        }\n        *(undefined4 *)(param_1 + 0x1098) = 0;\n        param_2 = param_2 + 1;\n        if (param_2 == pbVar1) {\n          return 0;\n        }\n      }\n      if ((*param_2 & 0x60) != 0) {\n        uVar3 = 1;\n        pbVar2 = param_2;\n        goto LAB_0004e770;\n      }\nLAB_0004e750:\n      param_2 = param_2 + 1;\n    } while (param_2 != pbVar1);" (do "do") (compound_statement "{\n      while (*param_2 == 10) {\n        pbVar2 = (byte *)0x8d48b;\n        uVar3 = 2;\nLAB_0004e770:\n        FUN_000310f0(param_1 + 0x60,pbVar2,uVar3);\n        if (*(int *)(param_1 + 0x1098) != 0) goto LAB_0004e750;\n        *(undefined4 *)(param_1 + 0x1098) = 1;\n        *(undefined4 *)(param_1 + 0x154) = 1;\n        if (*(int *)(param_1 + 0x109c) == 0) {\n          *(undefined4 *)(param_1 + 0x109c) = 1;\n          uVar3 = FUN_0004f3e0(0x14,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a0) = uVar3;\n        }\n        *(undefined4 *)(param_1 + 0xbc) = 1;\n        *(undefined4 *)(param_1 + 0x10a8) = 0;\n        if ((*(int *)(param_1 + 0x1100) != 0) && (*(int *)(param_1 + 0x134) != 0)) {\n          uVar3 = FUN_0004f3e0(0x1c2,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a8) = 1;\n          *(undefined4 *)(param_1 + 0x10b0) = uVar3;\n        }\n        if (*(int *)(param_1 + 0xe48) != 2) {\n          FUN_00047d40();\n        }\n        *(undefined4 *)(param_1 + 0x1098) = 0;\n        param_2 = param_2 + 1;\n        if (param_2 == pbVar1) {\n          return 0;\n        }\n      }\n      if ((*param_2 & 0x60) != 0) {\n        uVar3 = 1;\n        pbVar2 = param_2;\n        goto LAB_0004e770;\n      }\nLAB_0004e750:\n      param_2 = param_2 + 1;\n    }" ({ "{") (while_statement "while (*param_2 == 10) {\n        pbVar2 = (byte *)0x8d48b;\n        uVar3 = 2;\nLAB_0004e770:\n        FUN_000310f0(param_1 + 0x60,pbVar2,uVar3);\n        if (*(int *)(param_1 + 0x1098) != 0) goto LAB_0004e750;\n        *(undefined4 *)(param_1 + 0x1098) = 1;\n        *(undefined4 *)(param_1 + 0x154) = 1;\n        if (*(int *)(param_1 + 0x109c) == 0) {\n          *(undefined4 *)(param_1 + 0x109c) = 1;\n          uVar3 = FUN_0004f3e0(0x14,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a0) = uVar3;\n        }\n        *(undefined4 *)(param_1 + 0xbc) = 1;\n        *(undefined4 *)(param_1 + 0x10a8) = 0;\n        if ((*(int *)(param_1 + 0x1100) != 0) && (*(int *)(param_1 + 0x134) != 0)) {\n          uVar3 = FUN_0004f3e0(0x1c2,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a8) = 1;\n          *(undefined4 *)(param_1 + 0x10b0) = uVar3;\n        }\n        if (*(int *)(param_1 + 0xe48) != 2) {\n          FUN_00047d40();\n        }\n        *(undefined4 *)(param_1 + 0x1098) = 0;\n        param_2 = param_2 + 1;\n        if (param_2 == pbVar1) {\n          return 0;\n        }\n      }" (while "while") (parenthesized_expression "(*param_2 == 10)" (( "(") (binary_expression "*param_2 == 10" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (== "==") (number_literal "10")) () ")")) (compound_statement "{\n        pbVar2 = (byte *)0x8d48b;\n        uVar3 = 2;\nLAB_0004e770:\n        FUN_000310f0(param_1 + 0x60,pbVar2,uVar3);\n        if (*(int *)(param_1 + 0x1098) != 0) goto LAB_0004e750;\n        *(undefined4 *)(param_1 + 0x1098) = 1;\n        *(undefined4 *)(param_1 + 0x154) = 1;\n        if (*(int *)(param_1 + 0x109c) == 0) {\n          *(undefined4 *)(param_1 + 0x109c) = 1;\n          uVar3 = FUN_0004f3e0(0x14,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a0) = uVar3;\n        }\n        *(undefined4 *)(param_1 + 0xbc) = 1;\n        *(undefined4 *)(param_1 + 0x10a8) = 0;\n        if ((*(int *)(param_1 + 0x1100) != 0) && (*(int *)(param_1 + 0x134) != 0)) {\n          uVar3 = FUN_0004f3e0(0x1c2,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a8) = 1;\n          *(undefined4 *)(param_1 + 0x10b0) = uVar3;\n        }\n        if (*(int *)(param_1 + 0xe48) != 2) {\n          FUN_00047d40();\n        }\n        *(undefined4 *)(param_1 + 0x1098) = 0;\n        param_2 = param_2 + 1;\n        if (param_2 == pbVar1) {\n          return 0;\n        }\n      }" ({ "{") (expression_statement "pbVar2 = (byte *)0x8d48b;" (assignment_expression "pbVar2 = (byte *)0x8d48b" (identifier "pbVar2") (= "=") (cast_expression "(byte *)0x8d48b" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x8d48b"))) (; ";")) (expression_statement "uVar3 = 2;" (assignment_expression "uVar3 = 2" (identifier "uVar3") (= "=") (number_literal "2")) (; ";")) (labeled_statement "LAB_0004e770:\n        FUN_000310f0(param_1 + 0x60,pbVar2,uVar3);" (statement_identifier "LAB_0004e770") (: ":") (expression_statement "FUN_000310f0(param_1 + 0x60,pbVar2,uVar3);" (call_expression "FUN_000310f0(param_1 + 0x60,pbVar2,uVar3)" (identifier "FUN_000310f0") (argument_list "(param_1 + 0x60,pbVar2,uVar3)" (( "(") (binary_expression "param_1 + 0x60" (identifier "param_1") (+ "+") (number_literal "0x60")) (, ",") (identifier "pbVar2") (, ",") (identifier "uVar3") () ")"))) (; ";"))) (if_statement "if (*(int *)(param_1 + 0x1098) != 0) goto LAB_0004e750;" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0x1098) != 0)" (( "(") (binary_expression "*(int *)(param_1 + 0x1098) != 0" (pointer_expression "*(int *)(param_1 + 0x1098)" (* "*") (cast_expression "(int *)(param_1 + 0x1098)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1098)" (( "(") (binary_expression "param_1 + 0x1098" (identifier "param_1") (+ "+") (number_literal "0x1098")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (goto_statement "goto LAB_0004e750;" (goto "goto") (statement_identifier "LAB_0004e750") (; ";"))) (expression_statement "*(undefined4 *)(param_1 + 0x1098) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0x1098) = 1" (pointer_expression "*(undefined4 *)(param_1 + 0x1098)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x1098)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1098)" (( "(") (binary_expression "param_1 + 0x1098" (identifier "param_1") (+ "+") (number_literal "0x1098")) () ")")))) (= "=") (number_literal "1")) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x154) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0x154) = 1" (pointer_expression "*(undefined4 *)(param_1 + 0x154)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x154)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x154)" (( "(") (binary_expression "param_1 + 0x154" (identifier "param_1") (+ "+") (number_literal "0x154")) () ")")))) (= "=") (number_literal "1")) (; ";")) (if_statement "if (*(int *)(param_1 + 0x109c) == 0) {\n          *(undefined4 *)(param_1 + 0x109c) = 1;\n          uVar3 = FUN_0004f3e0(0x14,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a0) = uVar3;\n        }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0x109c) == 0)" (( "(") (binary_expression "*(int *)(param_1 + 0x109c) == 0" (pointer_expression "*(int *)(param_1 + 0x109c)" (* "*") (cast_expression "(int *)(param_1 + 0x109c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x109c)" (( "(") (binary_expression "param_1 + 0x109c" (identifier "param_1") (+ "+") (number_literal "0x109c")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n          *(undefined4 *)(param_1 + 0x109c) = 1;\n          uVar3 = FUN_0004f3e0(0x14,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a0) = uVar3;\n        }" ({ "{") (expression_statement "*(undefined4 *)(param_1 + 0x109c) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0x109c) = 1" (pointer_expression "*(undefined4 *)(param_1 + 0x109c)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x109c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x109c)" (( "(") (binary_expression "param_1 + 0x109c" (identifier "param_1") (+ "+") (number_literal "0x109c")) () ")")))) (= "=") (number_literal "1")) (; ";")) (expression_statement "uVar3 = FUN_0004f3e0(0x14,FUN_00046070,param_1);" (assignment_expression "uVar3 = FUN_0004f3e0(0x14,FUN_00046070,param_1)" (identifier "uVar3") (= "=") (call_expression "FUN_0004f3e0(0x14,FUN_00046070,param_1)" (identifier "FUN_0004f3e0") (argument_list "(0x14,FUN_00046070,param_1)" (( "(") (number_literal "0x14") (, ",") (identifier "FUN_00046070") (, ",") (identifier "param_1") () ")")))) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x10a0) = uVar3;" (assignment_expression "*(undefined4 *)(param_1 + 0x10a0) = uVar3" (pointer_expression "*(undefined4 *)(param_1 + 0x10a0)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x10a0)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10a0)" (( "(") (binary_expression "param_1 + 0x10a0" (identifier "param_1") (+ "+") (number_literal "0x10a0")) () ")")))) (= "=") (identifier "uVar3")) (; ";")) (} "}"))) (expression_statement "*(undefined4 *)(param_1 + 0xbc) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0xbc) = 1" (pointer_expression "*(undefined4 *)(param_1 + 0xbc)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0xbc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xbc)" (( "(") (binary_expression "param_1 + 0xbc" (identifier "param_1") (+ "+") (number_literal "0xbc")) () ")")))) (= "=") (number_literal "1")) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x10a8) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x10a8) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x10a8)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x10a8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10a8)" (( "(") (binary_expression "param_1 + 0x10a8" (identifier "param_1") (+ "+") (number_literal "0x10a8")) () ")")))) (= "=") (number_literal "0")) (; ";")) (if_statement "if ((*(int *)(param_1 + 0x1100) != 0) && (*(int *)(param_1 + 0x134) != 0)) {\n          uVar3 = FUN_0004f3e0(0x1c2,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a8) = 1;\n          *(undefined4 *)(param_1 + 0x10b0) = uVar3;\n        }" (if "if") (parenthesized_expression "((*(int *)(param_1 + 0x1100) != 0) && (*(int *)(param_1 + 0x134) != 0))" (( "(") (binary_expression "(*(int *)(param_1 + 0x1100) != 0) && (*(int *)(param_1 + 0x134) != 0)" (parenthesized_expression "(*(int *)(param_1 + 0x1100) != 0)" (( "(") (binary_expression "*(int *)(param_1 + 0x1100) != 0" (pointer_expression "*(int *)(param_1 + 0x1100)" (* "*") (cast_expression "(int *)(param_1 + 0x1100)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1100)" (( "(") (binary_expression "param_1 + 0x1100" (identifier "param_1") (+ "+") (number_literal "0x1100")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(*(int *)(param_1 + 0x134) != 0)" (( "(") (binary_expression "*(int *)(param_1 + 0x134) != 0" (pointer_expression "*(int *)(param_1 + 0x134)" (* "*") (cast_expression "(int *)(param_1 + 0x134)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x134)" (( "(") (binary_expression "param_1 + 0x134" (identifier "param_1") (+ "+") (number_literal "0x134")) () ")")))) (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n          uVar3 = FUN_0004f3e0(0x1c2,FUN_00046070,param_1);\n          *(undefined4 *)(param_1 + 0x10a8) = 1;\n          *(undefined4 *)(param_1 + 0x10b0) = uVar3;\n        }" ({ "{") (expression_statement "uVar3 = FUN_0004f3e0(0x1c2,FUN_00046070,param_1);" (assignment_expression "uVar3 = FUN_0004f3e0(0x1c2,FUN_00046070,param_1)" (identifier "uVar3") (= "=") (call_expression "FUN_0004f3e0(0x1c2,FUN_00046070,param_1)" (identifier "FUN_0004f3e0") (argument_list "(0x1c2,FUN_00046070,param_1)" (( "(") (number_literal "0x1c2") (, ",") (identifier "FUN_00046070") (, ",") (identifier "param_1") () ")")))) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x10a8) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0x10a8) = 1" (pointer_expression "*(undefined4 *)(param_1 + 0x10a8)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x10a8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10a8)" (( "(") (binary_expression "param_1 + 0x10a8" (identifier "param_1") (+ "+") (number_literal "0x10a8")) () ")")))) (= "=") (number_literal "1")) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x10b0) = uVar3;" (assignment_expression "*(undefined4 *)(param_1 + 0x10b0) = uVar3" (pointer_expression "*(undefined4 *)(param_1 + 0x10b0)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x10b0)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10b0)" (( "(") (binary_expression "param_1 + 0x10b0" (identifier "param_1") (+ "+") (number_literal "0x10b0")) () ")")))) (= "=") (identifier "uVar3")) (; ";")) (} "}"))) (if_statement "if (*(int *)(param_1 + 0xe48) != 2) {\n          FUN_00047d40();\n        }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0xe48) != 2)" (( "(") (binary_expression "*(int *)(param_1 + 0xe48) != 2" (pointer_expression "*(int *)(param_1 + 0xe48)" (* "*") (cast_expression "(int *)(param_1 + 0xe48)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xe48)" (( "(") (binary_expression "param_1 + 0xe48" (identifier "param_1") (+ "+") (number_literal "0xe48")) () ")")))) (!= "!=") (number_literal "2")) () ")")) (compound_statement "{\n          FUN_00047d40();\n        }" ({ "{") (expression_statement "FUN_00047d40();" (call_expression "FUN_00047d40()" (identifier "FUN_00047d40") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "*(undefined4 *)(param_1 + 0x1098) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x1098) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x1098)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x1098)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1098)" (( "(") (binary_expression "param_1 + 0x1098" (identifier "param_1") (+ "+") (number_literal "0x1098")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "param_2 = param_2 + 1;" (assignment_expression "param_2 = param_2 + 1" (identifier "param_2") (= "=") (binary_expression "param_2 + 1" (identifier "param_2") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (param_2 == pbVar1) {\n          return 0;\n        }" (if "if") (parenthesized_expression "(param_2 == pbVar1)" (( "(") (binary_expression "param_2 == pbVar1" (identifier "param_2") (== "==") (identifier "pbVar1")) () ")")) (compound_statement "{\n          return 0;\n        }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (} "}"))) (if_statement "if ((*param_2 & 0x60) != 0) {\n        uVar3 = 1;\n        pbVar2 = param_2;\n        goto LAB_0004e770;\n      }" (if "if") (parenthesized_expression "((*param_2 & 0x60) != 0)" (( "(") (binary_expression "(*param_2 & 0x60) != 0" (parenthesized_expression "(*param_2 & 0x60)" (( "(") (binary_expression "*param_2 & 0x60" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (& "&") (number_literal "0x60")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        uVar3 = 1;\n        pbVar2 = param_2;\n        goto LAB_0004e770;\n      }" ({ "{") (expression_statement "uVar3 = 1;" (assignment_expression "uVar3 = 1" (identifier "uVar3") (= "=") (number_literal "1")) (; ";")) (expression_statement "pbVar2 = param_2;" (assignment_expression "pbVar2 = param_2" (identifier "pbVar2") (= "=") (identifier "param_2")) (; ";")) (goto_statement "goto LAB_0004e770;" (goto "goto") (statement_identifier "LAB_0004e770") (; ";")) (} "}"))) (labeled_statement "LAB_0004e750:\n      param_2 = param_2 + 1;" (statement_identifier "LAB_0004e750") (: ":") (expression_statement "param_2 = param_2 + 1;" (assignment_expression "param_2 = param_2 + 1" (identifier "param_2") (= "=") (binary_expression "param_2 + 1" (identifier "param_2") (+ "+") (number_literal "1"))) (; ";"))) (} "}")) (while "while") (parenthesized_expression "(param_2 != pbVar1)" (( "(") (binary_expression "param_2 != pbVar1" (identifier "param_2") (!= "!=") (identifier "pbVar1")) () ")")) (; ";")) (} "}"))) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

int function_1(type_1 *term,char *var_2,int var_1)

{
  type_2 wVar1;
  type_3 *var_7;
  type_3 *data_00;
  int len_00;
  
  if (0 < var_1) {
    var_7 = (type_3 *)(var_2 + var_1);
    do {
      while (*var_2 == 10) {
        data_00 = (type_3 *)0x8d48b;
        len_00 = 2;
LAB_0004e770:
        var_3(&term->inbuf,data_00,len_00);
        if (term->in_term_out != 0) goto LAB_0004e750;
        term->in_term_out = 1;
        term->seen_disp_event = 1;
        if (term->window_update_pending == 0) {
          term->window_update_pending = 1;
          wVar1 = var_4(0x14,term_timer,term);
          term->next_update = wVar1;
        }
        term->cblinker = 1;
        term->cblink_pending = 0;
        if ((term->blink_cur != 0) && (term->has_focus != 0)) {
          wVar1 = var_4(0x1c2,term_timer,term);
          term->cblink_pending = 1;
          term->next_cblink = wVar1;
        }
        if (term->selstate != var_5) {
          var_6(term);
        }
        term->in_term_out = 0;
        var_2 = (char *)((type_3 *)var_2 + 1);
        if ((type_3 *)var_2 == var_7) {
          return 0;
        }
      }
      if ((*var_2 & 0x60U) != 0) {
        len_00 = 1;
        data_00 = (type_3 *)var_2;
        goto LAB_0004e770;
      }
LAB_0004e750:
      var_2 = (char *)((type_3 *)var_2 + 1);
    } while ((type_3 *)var_2 != var_7);
  }
  return 0;
}


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

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

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

{
  byte *pbVar1;
  byte *pbVar2;
  undefined4 uVar3;
  
  if (0 < param_3) {
    pbVar1 = param_2 + param_3;
    do {
      while (*param_2 == 10) {
        pbVar2 = (byte *)0x8d48b;
        uVar3 = 2;
LAB_0004e770:
        FUN_000310f0(param_1 + 0x60,pbVar2,uVar3);
        if (*(int *)(param_1 + 0x1098) != 0) goto LAB_0004e750;
        *(undefined4 *)(param_1 + 0x1098) = 1;
        *(undefined4 *)(param_1 + 0x154) = 1;
        if (*(int *)(param_1 + 0x109c) == 0) {
          *(undefined4 *)(param_1 + 0x109c) = 1;
          uVar3 = FUN_0004f3e0(0x14,FUN_00046070,param_1);
          *(undefined4 *)(param_1 + 0x10a0) = uVar3;
        }
        *(undefined4 *)(param_1 + 0xbc) = 1;
        *(undefined4 *)(param_1 + 0x10a8) = 0;
        if ((*(int *)(param_1 + 0x1100) != 0) && (*(int *)(param_1 + 0x134) != 0)) {
          uVar3 = FUN_0004f3e0(0x1c2,FUN_00046070,param_1);
          *(undefined4 *)(param_1 + 0x10a8) = 1;
          *(undefined4 *)(param_1 + 0x10b0) = uVar3;
        }
        if (*(int *)(param_1 + 0xe48) != 2) {
          FUN_00047d40();
        }
        *(undefined4 *)(param_1 + 0x1098) = 0;
        param_2 = param_2 + 1;
        if (param_2 == pbVar1) {
          return 0;
        }
      }
      if ((*param_2 & 0x60) != 0) {
        uVar3 = 1;
        pbVar2 = param_2;
        goto LAB_0004e770;
      }
LAB_0004e750:
      param_2 = param_2 + 1;
    } while (param_2 != pbVar1);
  }
  return 0;
}

