
/* WARNING: Unknown calling convention */

int telnet_send(void *handle,char *buf,int len)

{
  char cVar1;
  int iVar2;
  int *piVar3;
  code *pcVar4;
  char *pcVar5;
  char *pcVar6;
  int unaff_EDI;
  
  __x86_get_pc_thunk_di();
  piVar3 = *(int **)((int)handle + 4);
  if (piVar3 == (int *)0x0) {
    return 0;
  }
  pcVar6 = buf + len;
  if (pcVar6 <= buf) {
LAB_00070c78:
    return *(int *)((int)handle + 0x50);
  }
  cVar1 = *buf;
  pcVar5 = buf;
LAB_00070bc3:
  while ((cVar1 != -1 && ((*(int *)((int)handle + 0x3c) == 1 || (cVar1 != '\r'))))) {
    buf = buf + 1;
    if (pcVar6 <= buf) {
      iVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)buf - (int)pcVar5);
      *(int *)((int)handle + 0x50) = iVar2;
      return iVar2;
    }
    cVar1 = *buf;
  }
  iVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)buf - (int)pcVar5);
  *(int *)((int)handle + 0x50) = iVar2;
  if (pcVar6 <= buf) {
    return iVar2;
  }
  do {
    cVar1 = *buf;
    if (cVar1 == -1) {
      piVar3 = *(int **)((int)handle + 4);
      pcVar4 = *(code **)(*piVar3 + 8);
      iVar2 = unaff_EDI + 0x58ba3;
    }
    else {
      if ((*(int *)((int)handle + 0x3c) == 1) || (cVar1 != '\r')) break;
      piVar3 = *(int **)((int)handle + 4);
      pcVar4 = *(code **)(*piVar3 + 8);
      iVar2 = unaff_EDI + 0x58ba1;
    }
    buf = buf + 1;
    iVar2 = (*pcVar4)(piVar3,iVar2,2);
    *(int *)((int)handle + 0x50) = iVar2;
    if (pcVar6 == buf) {
      return iVar2;
    }
  } while( true );
  if (pcVar6 <= buf) goto LAB_00070c78;
  piVar3 = *(int **)((int)handle + 4);
  pcVar5 = buf;
  goto LAB_00070bc3;
}



undefined4 FUN_00070b70(int param_1,char *param_2,int param_3)

{
  char cVar1;
  undefined4 uVar2;
  int *piVar3;
  code *pcVar4;
  char *pcVar5;
  int iVar6;
  char *pcVar7;
  int unaff_EDI;
  
  FUN_0004e9eb();
  piVar3 = *(int **)(param_1 + 4);
  if (piVar3 == (int *)0x0) {
    return 0;
  }
  pcVar7 = param_2 + param_3;
  if (pcVar7 <= param_2) {
LAB_00070c78:
    return *(undefined4 *)(param_1 + 0x50);
  }
  cVar1 = *param_2;
  pcVar5 = param_2;
LAB_00070bc3:
  while ((cVar1 != -1 && ((*(int *)(param_1 + 0x3c) == 1 || (cVar1 != '\r'))))) {
    param_2 = param_2 + 1;
    if (pcVar7 <= param_2) {
      uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5);
      *(undefined4 *)(param_1 + 0x50) = uVar2;
      return uVar2;
    }
    cVar1 = *param_2;
  }
  uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5);
  *(undefined4 *)(param_1 + 0x50) = uVar2;
  if (pcVar7 <= param_2) {
    return uVar2;
  }
  do {
    cVar1 = *param_2;
    if (cVar1 == -1) {
      piVar3 = *(int **)(param_1 + 4);
      pcVar4 = *(code **)(*piVar3 + 8);
      iVar6 = unaff_EDI + 0x58ba3;
    }
    else {
      if ((*(int *)(param_1 + 0x3c) == 1) || (cVar1 != '\r')) break;
      piVar3 = *(int **)(param_1 + 4);
      pcVar4 = *(code **)(*piVar3 + 8);
      iVar6 = unaff_EDI + 0x58ba1;
    }
    param_2 = param_2 + 1;
    uVar2 = (*pcVar4)(piVar3,iVar6,2);
    *(undefined4 *)(param_1 + 0x50) = uVar2;
    if (pcVar7 == param_2) {
      return uVar2;
    }
  } while( true );
  if (pcVar7 <= param_2) goto LAB_00070c78;
  piVar3 = *(int **)(param_1 + 4);
  pcVar5 = param_2;
  goto LAB_00070bc3;
}


PUSH EBP
PUSH EDI
CALL 0x0004e9eb
ADD EDI,0x9fbd9
PUSH ESI
PUSH EBX
SUB ESP,0x1c
MOV EBP,dword ptr [ESP + 0x30]
MOV EDX,dword ptr [ESP + 0x34]
MOV dword ptr [ESP + 0xc],EDI
MOV ECX,dword ptr [EBP + 0x4]
TEST ECX,ECX
JZ 0x00070c6e
MOV ESI,dword ptr [ESP + 0x38]
ADD ESI,EDX
CMP EDX,ESI
JNC 0x00070c78
LEA EDI,[EDI + 0xfffb8fca]
MOVZX EAX,byte ptr [EDX]
MOV dword ptr [ESP + 0x8],EDI
LEA ESI,[ESI]
MOV EBX,EDX
JMP 0x00070bc3
MOVZX EAX,byte ptr [EBX]
CMP AL,0xff
JZ 0x00070bf8
CMP dword ptr [EBP + 0x3c],0x1
JZ 0x00070bd1
CMP AL,0xd
JZ 0x00070bf8
ADD EBX,0x1
CMP ESI,EBX
JA 0x00070bc0
MOV EAX,dword ptr [ECX]
SUB ESP,0x4
SUB EBX,EDX
PUSH EBX
PUSH EDX
PUSH ECX
CALL dword ptr [EAX + 0x8]
MOV dword ptr [EBP + 0x50],EAX
ADD ESP,0x10
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EDI,EBX
SUB ESP,0x4
MOV EAX,dword ptr [ECX]
SUB EDI,EDX
PUSH EDI
PUSH EDX
PUSH ECX
CALL dword ptr [EAX + 0x8]
MOV dword ptr [EBP + 0x50],EAX
ADD ESP,0x10
CMP ESI,EBX
JBE 0x00070beb
MOV EAX,dword ptr [ESP + 0xc]
LEA EDI,[EAX + 0xfffb8fc8]
JMP 0x00070c4a
CMP dword ptr [EBP + 0x3c],0x1
JZ 0x00070c60
CMP AL,0xd
JNZ 0x00070c60
MOV EAX,dword ptr [EBP + 0x4]
MOV EDX,dword ptr [EAX]
MOV ECX,dword ptr [EDX + 0x8]
MOV EDX,EDI
SUB ESP,0x4
ADD EBX,0x1
PUSH 0x2
PUSH EDX
PUSH EAX
CALL ECX
MOV dword ptr [EBP + 0x50],EAX
ADD ESP,0x10
CMP ESI,EBX
JZ 0x00070beb
MOVZX EAX,byte ptr [EBX]
CMP AL,0xff
JNZ 0x00070c20
MOV EAX,dword ptr [EBP + 0x4]
MOV EDX,dword ptr [EAX]
MOV ECX,dword ptr [EDX + 0x8]
MOV EDX,dword ptr [ESP + 0x8]
JMP 0x00070c34
CMP ESI,EBX
JBE 0x00070c78
MOV ECX,dword ptr [EBP + 0x4]
MOV EDX,EBX
JMP 0x00070bb8
ADD ESP,0x1c
XOR EAX,EAX
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EAX,dword ptr [EBP + 0x50]
JMP 0x00070beb
(translation_unit "undefined4 FUN_00070b70(int param_1,char *param_2,int param_3)\n\n{\n  char cVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  code *pcVar4;\n  char *pcVar5;\n  int iVar6;\n  char *pcVar7;\n  int unaff_EDI;\n  \n  FUN_0004e9eb();\n  piVar3 = *(int **)(param_1 + 4);\n  if (piVar3 == (int *)0x0) {\n    return 0;\n  }\n  pcVar7 = param_2 + param_3;\n  if (pcVar7 <= param_2) {\nLAB_00070c78:\n    return *(undefined4 *)(param_1 + 0x50);\n  }\n  cVar1 = *param_2;\n  pcVar5 = param_2;\nLAB_00070bc3:\n  while ((cVar1 != -1 && ((*(int *)(param_1 + 0x3c) == 1 || (cVar1 != '\r'))))) {\n    param_2 = param_2 + 1;\n    if (pcVar7 <= param_2) {\n      uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5);\n      *(undefined4 *)(param_1 + 0x50) = uVar2;\n      return uVar2;\n    }\n    cVar1 = *param_2;\n  }\n  uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5);\n  *(undefined4 *)(param_1 + 0x50) = uVar2;\n  if (pcVar7 <= param_2) {\n    return uVar2;\n  }\n  do {\n    cVar1 = *param_2;\n    if (cVar1 == -1) {\n      piVar3 = *(int **)(param_1 + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar6 = unaff_EDI + 0x58ba3;\n    }\n    else {\n      if ((*(int *)(param_1 + 0x3c) == 1) || (cVar1 != '\r')) break;\n      piVar3 = *(int **)(param_1 + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar6 = unaff_EDI + 0x58ba1;\n    }\n    param_2 = param_2 + 1;\n    uVar2 = (*pcVar4)(piVar3,iVar6,2);\n    *(undefined4 *)(param_1 + 0x50) = uVar2;\n    if (pcVar7 == param_2) {\n      return uVar2;\n    }\n  } while( true );\n  if (pcVar7 <= param_2) goto LAB_00070c78;\n  piVar3 = *(int **)(param_1 + 4);\n  pcVar5 = param_2;\n  goto LAB_00070bc3;\n}\n\n" (function_definition "undefined4 FUN_00070b70(int param_1,char *param_2,int param_3)\n\n{\n  char cVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  code *pcVar4;\n  char *pcVar5;\n  int iVar6;\n  char *pcVar7;\n  int unaff_EDI;\n  \n  FUN_0004e9eb();\n  piVar3 = *(int **)(param_1 + 4);\n  if (piVar3 == (int *)0x0) {\n    return 0;\n  }\n  pcVar7 = param_2 + param_3;\n  if (pcVar7 <= param_2) {\nLAB_00070c78:\n    return *(undefined4 *)(param_1 + 0x50);\n  }\n  cVar1 = *param_2;\n  pcVar5 = param_2;\nLAB_00070bc3:\n  while ((cVar1 != -1 && ((*(int *)(param_1 + 0x3c) == 1 || (cVar1 != '\r'))))) {\n    param_2 = param_2 + 1;\n    if (pcVar7 <= param_2) {\n      uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5);\n      *(undefined4 *)(param_1 + 0x50) = uVar2;\n      return uVar2;\n    }\n    cVar1 = *param_2;\n  }\n  uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5);\n  *(undefined4 *)(param_1 + 0x50) = uVar2;\n  if (pcVar7 <= param_2) {\n    return uVar2;\n  }\n  do {\n    cVar1 = *param_2;\n    if (cVar1 == -1) {\n      piVar3 = *(int **)(param_1 + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar6 = unaff_EDI + 0x58ba3;\n    }\n    else {\n      if ((*(int *)(param_1 + 0x3c) == 1) || (cVar1 != '\r')) break;\n      piVar3 = *(int **)(param_1 + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar6 = unaff_EDI + 0x58ba1;\n    }\n    param_2 = param_2 + 1;\n    uVar2 = (*pcVar4)(piVar3,iVar6,2);\n    *(undefined4 *)(param_1 + 0x50) = uVar2;\n    if (pcVar7 == param_2) {\n      return uVar2;\n    }\n  } while( true );\n  if (pcVar7 <= param_2) goto LAB_00070c78;\n  piVar3 = *(int **)(param_1 + 4);\n  pcVar5 = param_2;\n  goto LAB_00070bc3;\n}" type_identifier (function_declarator "FUN_00070b70(int param_1,char *param_2,int param_3)" identifier (parameter_list "(int param_1,char *param_2,int param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  char cVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  code *pcVar4;\n  char *pcVar5;\n  int iVar6;\n  char *pcVar7;\n  int unaff_EDI;\n  \n  FUN_0004e9eb();\n  piVar3 = *(int **)(param_1 + 4);\n  if (piVar3 == (int *)0x0) {\n    return 0;\n  }\n  pcVar7 = param_2 + param_3;\n  if (pcVar7 <= param_2) {\nLAB_00070c78:\n    return *(undefined4 *)(param_1 + 0x50);\n  }\n  cVar1 = *param_2;\n  pcVar5 = param_2;\nLAB_00070bc3:\n  while ((cVar1 != -1 && ((*(int *)(param_1 + 0x3c) == 1 || (cVar1 != '\r'))))) {\n    param_2 = param_2 + 1;\n    if (pcVar7 <= param_2) {\n      uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5);\n      *(undefined4 *)(param_1 + 0x50) = uVar2;\n      return uVar2;\n    }\n    cVar1 = *param_2;\n  }\n  uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5);\n  *(undefined4 *)(param_1 + 0x50) = uVar2;\n  if (pcVar7 <= param_2) {\n    return uVar2;\n  }\n  do {\n    cVar1 = *param_2;\n    if (cVar1 == -1) {\n      piVar3 = *(int **)(param_1 + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar6 = unaff_EDI + 0x58ba3;\n    }\n    else {\n      if ((*(int *)(param_1 + 0x3c) == 1) || (cVar1 != '\r')) break;\n      piVar3 = *(int **)(param_1 + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar6 = unaff_EDI + 0x58ba1;\n    }\n    param_2 = param_2 + 1;\n    uVar2 = (*pcVar4)(piVar3,iVar6,2);\n    *(undefined4 *)(param_1 + 0x50) = uVar2;\n    if (pcVar7 == param_2) {\n      return uVar2;\n    }\n  } while( true );\n  if (pcVar7 <= param_2) goto LAB_00070c78;\n  piVar3 = *(int **)(param_1 + 4);\n  pcVar5 = param_2;\n  goto LAB_00070bc3;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "code *pcVar4;" type_identifier (pointer_declarator "*pcVar4" * identifier) ;) (declaration "char *pcVar5;" primitive_type (pointer_declarator "*pcVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "char *pcVar7;" primitive_type (pointer_declarator "*pcVar7" * identifier) ;) (declaration "int unaff_EDI;" primitive_type identifier ;) (expression_statement "FUN_0004e9eb();" (call_expression "FUN_0004e9eb()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar3 = *(int **)(param_1 + 4);" (assignment_expression "piVar3 = *(int **)(param_1 + 4)" identifier = (pointer_expression "*(int **)(param_1 + 4)" * (cast_expression "(int **)(param_1 + 4)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) ))))) ;) (if_statement "if (piVar3 == (int *)0x0) {\n    return 0;\n  }" if (parenthesized_expression "(piVar3 == (int *)0x0)" ( (binary_expression "piVar3 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "pcVar7 = param_2 + param_3;" (assignment_expression "pcVar7 = param_2 + param_3" identifier = (binary_expression "param_2 + param_3" identifier + identifier)) ;) (if_statement "if (pcVar7 <= param_2) {\nLAB_00070c78:\n    return *(undefined4 *)(param_1 + 0x50);\n  }" if (parenthesized_expression "(pcVar7 <= param_2)" ( (binary_expression "pcVar7 <= param_2" identifier <= identifier) )) (compound_statement "{\nLAB_00070c78:\n    return *(undefined4 *)(param_1 + 0x50);\n  }" { (labeled_statement "LAB_00070c78:\n    return *(undefined4 *)(param_1 + 0x50);" statement_identifier : (return_statement "return *(undefined4 *)(param_1 + 0x50);" return (pointer_expression "*(undefined4 *)(param_1 + 0x50)" * (cast_expression "(undefined4 *)(param_1 + 0x50)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x50)" ( (binary_expression "param_1 + 0x50" identifier + number_literal) )))) ;)) })) (expression_statement "cVar1 = *param_2;" (assignment_expression "cVar1 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (expression_statement "pcVar5 = param_2;" (assignment_expression "pcVar5 = param_2" identifier = identifier) ;) (labeled_statement "LAB_00070bc3:\n  while ((cVar1 != -1 && ((*(int *)(param_1 + 0x3c) == 1 || (cVar1 != '\r'))))) {\n    param_2 = param_2 + 1;\n    if (pcVar7 <= param_2) {\n      uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5);\n      *(undefined4 *)(param_1 + 0x50) = uVar2;\n      return uVar2;\n    }\n    cVar1 = *param_2;\n  }" statement_identifier : (while_statement "while ((cVar1 != -1 && ((*(int *)(param_1 + 0x3c) == 1 || (cVar1 != '\r'))))) {\n    param_2 = param_2 + 1;\n    if (pcVar7 <= param_2) {\n      uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5);\n      *(undefined4 *)(param_1 + 0x50) = uVar2;\n      return uVar2;\n    }\n    cVar1 = *param_2;\n  }" while (parenthesized_expression "((cVar1 != -1 && ((*(int *)(param_1 + 0x3c) == 1 || (cVar1 != '\r')))))" ( (parenthesized_expression "(cVar1 != -1 && ((*(int *)(param_1 + 0x3c) == 1 || (cVar1 != '\r'))))" ( (binary_expression "cVar1 != -1 && ((*(int *)(param_1 + 0x3c) == 1 || (cVar1 != '\r')))" (binary_expression "cVar1 != -1" identifier != number_literal) && (parenthesized_expression "((*(int *)(param_1 + 0x3c) == 1 || (cVar1 != '\r')))" ( (parenthesized_expression "(*(int *)(param_1 + 0x3c) == 1 || (cVar1 != '\r'))" ( (binary_expression "*(int *)(param_1 + 0x3c) == 1 || (cVar1 != '\r')" (binary_expression "*(int *)(param_1 + 0x3c) == 1" (pointer_expression "*(int *)(param_1 + 0x3c)" * (cast_expression "(int *)(param_1 + 0x3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) )))) == number_literal) || (parenthesized_expression "(cVar1 != '\r')" ( (binary_expression "cVar1 != '\r'" identifier != (char_literal "'\r'" ' escape_sequence ')) ))) )) ))) )) )) (compound_statement "{\n    param_2 = param_2 + 1;\n    if (pcVar7 <= param_2) {\n      uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5);\n      *(undefined4 *)(param_1 + 0x50) = uVar2;\n      return uVar2;\n    }\n    cVar1 = *param_2;\n  }" { (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 (pcVar7 <= param_2) {\n      uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5);\n      *(undefined4 *)(param_1 + 0x50) = uVar2;\n      return uVar2;\n    }" if (parenthesized_expression "(pcVar7 <= param_2)" ( (binary_expression "pcVar7 <= param_2" identifier <= identifier) )) (compound_statement "{\n      uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5);\n      *(undefined4 *)(param_1 + 0x50) = uVar2;\n      return uVar2;\n    }" { (expression_statement "uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5);" (assignment_expression "uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5)" identifier = (call_expression "(**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5)" (parenthesized_expression "(**(code **)(*piVar3 + 8))" ( (pointer_expression "**(code **)(*piVar3 + 8)" * (pointer_expression "*(code **)(*piVar3 + 8)" * (cast_expression "(code **)(*piVar3 + 8)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar3 + 8)" ( (binary_expression "*piVar3 + 8" (pointer_expression "*piVar3" * identifier) + number_literal) ))))) )) (argument_list "(piVar3,pcVar5,(int)param_2 - (int)pcVar5)" ( identifier , identifier , (binary_expression "(int)param_2 - (int)pcVar5" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pcVar5" ( (type_descriptor "int" primitive_type) ) identifier)) )))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x50) = uVar2;" (assignment_expression "*(undefined4 *)(param_1 + 0x50) = uVar2" (pointer_expression "*(undefined4 *)(param_1 + 0x50)" * (cast_expression "(undefined4 *)(param_1 + 0x50)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x50)" ( (binary_expression "param_1 + 0x50" identifier + number_literal) )))) = identifier) ;) (return_statement "return uVar2;" return identifier ;) })) (expression_statement "cVar1 = *param_2;" (assignment_expression "cVar1 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) }))) (expression_statement "uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5);" (assignment_expression "uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5)" identifier = (call_expression "(**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5)" (parenthesized_expression "(**(code **)(*piVar3 + 8))" ( (pointer_expression "**(code **)(*piVar3 + 8)" * (pointer_expression "*(code **)(*piVar3 + 8)" * (cast_expression "(code **)(*piVar3 + 8)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar3 + 8)" ( (binary_expression "*piVar3 + 8" (pointer_expression "*piVar3" * identifier) + number_literal) ))))) )) (argument_list "(piVar3,pcVar5,(int)param_2 - (int)pcVar5)" ( identifier , identifier , (binary_expression "(int)param_2 - (int)pcVar5" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pcVar5" ( (type_descriptor "int" primitive_type) ) identifier)) )))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x50) = uVar2;" (assignment_expression "*(undefined4 *)(param_1 + 0x50) = uVar2" (pointer_expression "*(undefined4 *)(param_1 + 0x50)" * (cast_expression "(undefined4 *)(param_1 + 0x50)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x50)" ( (binary_expression "param_1 + 0x50" identifier + number_literal) )))) = identifier) ;) (if_statement "if (pcVar7 <= param_2) {\n    return uVar2;\n  }" if (parenthesized_expression "(pcVar7 <= param_2)" ( (binary_expression "pcVar7 <= param_2" identifier <= identifier) )) (compound_statement "{\n    return uVar2;\n  }" { (return_statement "return uVar2;" return identifier ;) })) (do_statement "do {\n    cVar1 = *param_2;\n    if (cVar1 == -1) {\n      piVar3 = *(int **)(param_1 + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar6 = unaff_EDI + 0x58ba3;\n    }\n    else {\n      if ((*(int *)(param_1 + 0x3c) == 1) || (cVar1 != '\r')) break;\n      piVar3 = *(int **)(param_1 + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar6 = unaff_EDI + 0x58ba1;\n    }\n    param_2 = param_2 + 1;\n    uVar2 = (*pcVar4)(piVar3,iVar6,2);\n    *(undefined4 *)(param_1 + 0x50) = uVar2;\n    if (pcVar7 == param_2) {\n      return uVar2;\n    }\n  } while( true );" do (compound_statement "{\n    cVar1 = *param_2;\n    if (cVar1 == -1) {\n      piVar3 = *(int **)(param_1 + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar6 = unaff_EDI + 0x58ba3;\n    }\n    else {\n      if ((*(int *)(param_1 + 0x3c) == 1) || (cVar1 != '\r')) break;\n      piVar3 = *(int **)(param_1 + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar6 = unaff_EDI + 0x58ba1;\n    }\n    param_2 = param_2 + 1;\n    uVar2 = (*pcVar4)(piVar3,iVar6,2);\n    *(undefined4 *)(param_1 + 0x50) = uVar2;\n    if (pcVar7 == param_2) {\n      return uVar2;\n    }\n  }" { (expression_statement "cVar1 = *param_2;" (assignment_expression "cVar1 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (if_statement "if (cVar1 == -1) {\n      piVar3 = *(int **)(param_1 + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar6 = unaff_EDI + 0x58ba3;\n    }\n    else {\n      if ((*(int *)(param_1 + 0x3c) == 1) || (cVar1 != '\r')) break;\n      piVar3 = *(int **)(param_1 + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar6 = unaff_EDI + 0x58ba1;\n    }" if (parenthesized_expression "(cVar1 == -1)" ( (binary_expression "cVar1 == -1" identifier == number_literal) )) (compound_statement "{\n      piVar3 = *(int **)(param_1 + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar6 = unaff_EDI + 0x58ba3;\n    }" { (expression_statement "piVar3 = *(int **)(param_1 + 4);" (assignment_expression "piVar3 = *(int **)(param_1 + 4)" identifier = (pointer_expression "*(int **)(param_1 + 4)" * (cast_expression "(int **)(param_1 + 4)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) ))))) ;) (expression_statement "pcVar4 = *(code **)(*piVar3 + 8);" (assignment_expression "pcVar4 = *(code **)(*piVar3 + 8)" identifier = (pointer_expression "*(code **)(*piVar3 + 8)" * (cast_expression "(code **)(*piVar3 + 8)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar3 + 8)" ( (binary_expression "*piVar3 + 8" (pointer_expression "*piVar3" * identifier) + number_literal) ))))) ;) (expression_statement "iVar6 = unaff_EDI + 0x58ba3;" (assignment_expression "iVar6 = unaff_EDI + 0x58ba3" identifier = (binary_expression "unaff_EDI + 0x58ba3" identifier + number_literal)) ;) }) (else_clause "else {\n      if ((*(int *)(param_1 + 0x3c) == 1) || (cVar1 != '\r')) break;\n      piVar3 = *(int **)(param_1 + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar6 = unaff_EDI + 0x58ba1;\n    }" else (compound_statement "{\n      if ((*(int *)(param_1 + 0x3c) == 1) || (cVar1 != '\r')) break;\n      piVar3 = *(int **)(param_1 + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar6 = unaff_EDI + 0x58ba1;\n    }" { (if_statement "if ((*(int *)(param_1 + 0x3c) == 1) || (cVar1 != '\r')) break;" if (parenthesized_expression "((*(int *)(param_1 + 0x3c) == 1) || (cVar1 != '\r'))" ( (binary_expression "(*(int *)(param_1 + 0x3c) == 1) || (cVar1 != '\r')" (parenthesized_expression "(*(int *)(param_1 + 0x3c) == 1)" ( (binary_expression "*(int *)(param_1 + 0x3c) == 1" (pointer_expression "*(int *)(param_1 + 0x3c)" * (cast_expression "(int *)(param_1 + 0x3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) )))) == number_literal) )) || (parenthesized_expression "(cVar1 != '\r')" ( (binary_expression "cVar1 != '\r'" identifier != (char_literal "'\r'" ' escape_sequence ')) ))) )) (break_statement "break;" break ;)) (expression_statement "piVar3 = *(int **)(param_1 + 4);" (assignment_expression "piVar3 = *(int **)(param_1 + 4)" identifier = (pointer_expression "*(int **)(param_1 + 4)" * (cast_expression "(int **)(param_1 + 4)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) ))))) ;) (expression_statement "pcVar4 = *(code **)(*piVar3 + 8);" (assignment_expression "pcVar4 = *(code **)(*piVar3 + 8)" identifier = (pointer_expression "*(code **)(*piVar3 + 8)" * (cast_expression "(code **)(*piVar3 + 8)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar3 + 8)" ( (binary_expression "*piVar3 + 8" (pointer_expression "*piVar3" * identifier) + number_literal) ))))) ;) (expression_statement "iVar6 = unaff_EDI + 0x58ba1;" (assignment_expression "iVar6 = unaff_EDI + 0x58ba1" identifier = (binary_expression "unaff_EDI + 0x58ba1" identifier + 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)) ;) (expression_statement "uVar2 = (*pcVar4)(piVar3,iVar6,2);" (assignment_expression "uVar2 = (*pcVar4)(piVar3,iVar6,2)" identifier = (call_expression "(*pcVar4)(piVar3,iVar6,2)" (parenthesized_expression "(*pcVar4)" ( (pointer_expression "*pcVar4" * identifier) )) (argument_list "(piVar3,iVar6,2)" ( identifier , identifier , number_literal )))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x50) = uVar2;" (assignment_expression "*(undefined4 *)(param_1 + 0x50) = uVar2" (pointer_expression "*(undefined4 *)(param_1 + 0x50)" * (cast_expression "(undefined4 *)(param_1 + 0x50)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x50)" ( (binary_expression "param_1 + 0x50" identifier + number_literal) )))) = identifier) ;) (if_statement "if (pcVar7 == param_2) {\n      return uVar2;\n    }" if (parenthesized_expression "(pcVar7 == param_2)" ( (binary_expression "pcVar7 == param_2" identifier == identifier) )) (compound_statement "{\n      return uVar2;\n    }" { (return_statement "return uVar2;" return identifier ;) })) }) while (parenthesized_expression "( true )" ( true )) ;) (if_statement "if (pcVar7 <= param_2) goto LAB_00070c78;" if (parenthesized_expression "(pcVar7 <= param_2)" ( (binary_expression "pcVar7 <= param_2" identifier <= identifier) )) (goto_statement "goto LAB_00070c78;" goto statement_identifier ;)) (expression_statement "piVar3 = *(int **)(param_1 + 4);" (assignment_expression "piVar3 = *(int **)(param_1 + 4)" identifier = (pointer_expression "*(int **)(param_1 + 4)" * (cast_expression "(int **)(param_1 + 4)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) ))))) ;) (expression_statement "pcVar5 = param_2;" (assignment_expression "pcVar5 = param_2" identifier = identifier) ;) (goto_statement "goto LAB_00070bc3;" goto statement_identifier ;) })))
(translation_unit "/* WARNING: Unknown calling convention */\n\nint telnet_send(void *handle,char *buf,int len)\n\n{\n  char cVar1;\n  int iVar2;\n  int *piVar3;\n  code *pcVar4;\n  char *pcVar5;\n  char *pcVar6;\n  int unaff_EDI;\n  \n  __x86_get_pc_thunk_di();\n  piVar3 = *(int **)((int)handle + 4);\n  if (piVar3 == (int *)0x0) {\n    return 0;\n  }\n  pcVar6 = buf + len;\n  if (pcVar6 <= buf) {\nLAB_00070c78:\n    return *(int *)((int)handle + 0x50);\n  }\n  cVar1 = *buf;\n  pcVar5 = buf;\nLAB_00070bc3:\n  while ((cVar1 != -1 && ((*(int *)((int)handle + 0x3c) == 1 || (cVar1 != '\r'))))) {\n    buf = buf + 1;\n    if (pcVar6 <= buf) {\n      iVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)buf - (int)pcVar5);\n      *(int *)((int)handle + 0x50) = iVar2;\n      return iVar2;\n    }\n    cVar1 = *buf;\n  }\n  iVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)buf - (int)pcVar5);\n  *(int *)((int)handle + 0x50) = iVar2;\n  if (pcVar6 <= buf) {\n    return iVar2;\n  }\n  do {\n    cVar1 = *buf;\n    if (cVar1 == -1) {\n      piVar3 = *(int **)((int)handle + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar2 = unaff_EDI + 0x58ba3;\n    }\n    else {\n      if ((*(int *)((int)handle + 0x3c) == 1) || (cVar1 != '\r')) break;\n      piVar3 = *(int **)((int)handle + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar2 = unaff_EDI + 0x58ba1;\n    }\n    buf = buf + 1;\n    iVar2 = (*pcVar4)(piVar3,iVar2,2);\n    *(int *)((int)handle + 0x50) = iVar2;\n    if (pcVar6 == buf) {\n      return iVar2;\n    }\n  } while( true );\n  if (pcVar6 <= buf) goto LAB_00070c78;\n  piVar3 = *(int **)((int)handle + 4);\n  pcVar5 = buf;\n  goto LAB_00070bc3;\n}\n\n" comment (function_definition "int telnet_send(void *handle,char *buf,int len)\n\n{\n  char cVar1;\n  int iVar2;\n  int *piVar3;\n  code *pcVar4;\n  char *pcVar5;\n  char *pcVar6;\n  int unaff_EDI;\n  \n  __x86_get_pc_thunk_di();\n  piVar3 = *(int **)((int)handle + 4);\n  if (piVar3 == (int *)0x0) {\n    return 0;\n  }\n  pcVar6 = buf + len;\n  if (pcVar6 <= buf) {\nLAB_00070c78:\n    return *(int *)((int)handle + 0x50);\n  }\n  cVar1 = *buf;\n  pcVar5 = buf;\nLAB_00070bc3:\n  while ((cVar1 != -1 && ((*(int *)((int)handle + 0x3c) == 1 || (cVar1 != '\r'))))) {\n    buf = buf + 1;\n    if (pcVar6 <= buf) {\n      iVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)buf - (int)pcVar5);\n      *(int *)((int)handle + 0x50) = iVar2;\n      return iVar2;\n    }\n    cVar1 = *buf;\n  }\n  iVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)buf - (int)pcVar5);\n  *(int *)((int)handle + 0x50) = iVar2;\n  if (pcVar6 <= buf) {\n    return iVar2;\n  }\n  do {\n    cVar1 = *buf;\n    if (cVar1 == -1) {\n      piVar3 = *(int **)((int)handle + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar2 = unaff_EDI + 0x58ba3;\n    }\n    else {\n      if ((*(int *)((int)handle + 0x3c) == 1) || (cVar1 != '\r')) break;\n      piVar3 = *(int **)((int)handle + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar2 = unaff_EDI + 0x58ba1;\n    }\n    buf = buf + 1;\n    iVar2 = (*pcVar4)(piVar3,iVar2,2);\n    *(int *)((int)handle + 0x50) = iVar2;\n    if (pcVar6 == buf) {\n      return iVar2;\n    }\n  } while( true );\n  if (pcVar6 <= buf) goto LAB_00070c78;\n  piVar3 = *(int **)((int)handle + 4);\n  pcVar5 = buf;\n  goto LAB_00070bc3;\n}" primitive_type (function_declarator "telnet_send(void *handle,char *buf,int len)" identifier (parameter_list "(void *handle,char *buf,int len)" ( (parameter_declaration "void *handle" primitive_type (pointer_declarator "*handle" * identifier)) , (parameter_declaration "char *buf" primitive_type (pointer_declarator "*buf" * identifier)) , (parameter_declaration "int len" primitive_type identifier) ))) (compound_statement "{\n  char cVar1;\n  int iVar2;\n  int *piVar3;\n  code *pcVar4;\n  char *pcVar5;\n  char *pcVar6;\n  int unaff_EDI;\n  \n  __x86_get_pc_thunk_di();\n  piVar3 = *(int **)((int)handle + 4);\n  if (piVar3 == (int *)0x0) {\n    return 0;\n  }\n  pcVar6 = buf + len;\n  if (pcVar6 <= buf) {\nLAB_00070c78:\n    return *(int *)((int)handle + 0x50);\n  }\n  cVar1 = *buf;\n  pcVar5 = buf;\nLAB_00070bc3:\n  while ((cVar1 != -1 && ((*(int *)((int)handle + 0x3c) == 1 || (cVar1 != '\r'))))) {\n    buf = buf + 1;\n    if (pcVar6 <= buf) {\n      iVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)buf - (int)pcVar5);\n      *(int *)((int)handle + 0x50) = iVar2;\n      return iVar2;\n    }\n    cVar1 = *buf;\n  }\n  iVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)buf - (int)pcVar5);\n  *(int *)((int)handle + 0x50) = iVar2;\n  if (pcVar6 <= buf) {\n    return iVar2;\n  }\n  do {\n    cVar1 = *buf;\n    if (cVar1 == -1) {\n      piVar3 = *(int **)((int)handle + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar2 = unaff_EDI + 0x58ba3;\n    }\n    else {\n      if ((*(int *)((int)handle + 0x3c) == 1) || (cVar1 != '\r')) break;\n      piVar3 = *(int **)((int)handle + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar2 = unaff_EDI + 0x58ba1;\n    }\n    buf = buf + 1;\n    iVar2 = (*pcVar4)(piVar3,iVar2,2);\n    *(int *)((int)handle + 0x50) = iVar2;\n    if (pcVar6 == buf) {\n      return iVar2;\n    }\n  } while( true );\n  if (pcVar6 <= buf) goto LAB_00070c78;\n  piVar3 = *(int **)((int)handle + 4);\n  pcVar5 = buf;\n  goto LAB_00070bc3;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "code *pcVar4;" type_identifier (pointer_declarator "*pcVar4" * identifier) ;) (declaration "char *pcVar5;" primitive_type (pointer_declarator "*pcVar5" * identifier) ;) (declaration "char *pcVar6;" primitive_type (pointer_declarator "*pcVar6" * identifier) ;) (declaration "int unaff_EDI;" primitive_type identifier ;) (expression_statement "__x86_get_pc_thunk_di();" (call_expression "__x86_get_pc_thunk_di()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar3 = *(int **)((int)handle + 4);" (assignment_expression "piVar3 = *(int **)((int)handle + 4)" identifier = (pointer_expression "*(int **)((int)handle + 4)" * (cast_expression "(int **)((int)handle + 4)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)handle + 4)" ( (binary_expression "(int)handle + 4" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))))) ;) (if_statement "if (piVar3 == (int *)0x0) {\n    return 0;\n  }" if (parenthesized_expression "(piVar3 == (int *)0x0)" ( (binary_expression "piVar3 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "pcVar6 = buf + len;" (assignment_expression "pcVar6 = buf + len" identifier = (binary_expression "buf + len" identifier + identifier)) ;) (if_statement "if (pcVar6 <= buf) {\nLAB_00070c78:\n    return *(int *)((int)handle + 0x50);\n  }" if (parenthesized_expression "(pcVar6 <= buf)" ( (binary_expression "pcVar6 <= buf" identifier <= identifier) )) (compound_statement "{\nLAB_00070c78:\n    return *(int *)((int)handle + 0x50);\n  }" { (labeled_statement "LAB_00070c78:\n    return *(int *)((int)handle + 0x50);" statement_identifier : (return_statement "return *(int *)((int)handle + 0x50);" return (pointer_expression "*(int *)((int)handle + 0x50)" * (cast_expression "(int *)((int)handle + 0x50)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)handle + 0x50)" ( (binary_expression "(int)handle + 0x50" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;)) })) (expression_statement "cVar1 = *buf;" (assignment_expression "cVar1 = *buf" identifier = (pointer_expression "*buf" * identifier)) ;) (expression_statement "pcVar5 = buf;" (assignment_expression "pcVar5 = buf" identifier = identifier) ;) (labeled_statement "LAB_00070bc3:\n  while ((cVar1 != -1 && ((*(int *)((int)handle + 0x3c) == 1 || (cVar1 != '\r'))))) {\n    buf = buf + 1;\n    if (pcVar6 <= buf) {\n      iVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)buf - (int)pcVar5);\n      *(int *)((int)handle + 0x50) = iVar2;\n      return iVar2;\n    }\n    cVar1 = *buf;\n  }" statement_identifier : (while_statement "while ((cVar1 != -1 && ((*(int *)((int)handle + 0x3c) == 1 || (cVar1 != '\r'))))) {\n    buf = buf + 1;\n    if (pcVar6 <= buf) {\n      iVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)buf - (int)pcVar5);\n      *(int *)((int)handle + 0x50) = iVar2;\n      return iVar2;\n    }\n    cVar1 = *buf;\n  }" while (parenthesized_expression "((cVar1 != -1 && ((*(int *)((int)handle + 0x3c) == 1 || (cVar1 != '\r')))))" ( (parenthesized_expression "(cVar1 != -1 && ((*(int *)((int)handle + 0x3c) == 1 || (cVar1 != '\r'))))" ( (binary_expression "cVar1 != -1 && ((*(int *)((int)handle + 0x3c) == 1 || (cVar1 != '\r')))" (binary_expression "cVar1 != -1" identifier != number_literal) && (parenthesized_expression "((*(int *)((int)handle + 0x3c) == 1 || (cVar1 != '\r')))" ( (parenthesized_expression "(*(int *)((int)handle + 0x3c) == 1 || (cVar1 != '\r'))" ( (binary_expression "*(int *)((int)handle + 0x3c) == 1 || (cVar1 != '\r')" (binary_expression "*(int *)((int)handle + 0x3c) == 1" (pointer_expression "*(int *)((int)handle + 0x3c)" * (cast_expression "(int *)((int)handle + 0x3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)handle + 0x3c)" ( (binary_expression "(int)handle + 0x3c" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) == number_literal) || (parenthesized_expression "(cVar1 != '\r')" ( (binary_expression "cVar1 != '\r'" identifier != (char_literal "'\r'" ' escape_sequence ')) ))) )) ))) )) )) (compound_statement "{\n    buf = buf + 1;\n    if (pcVar6 <= buf) {\n      iVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)buf - (int)pcVar5);\n      *(int *)((int)handle + 0x50) = iVar2;\n      return iVar2;\n    }\n    cVar1 = *buf;\n  }" { (expression_statement "buf = buf + 1;" (assignment_expression "buf = buf + 1" identifier = (binary_expression "buf + 1" identifier + number_literal)) ;) (if_statement "if (pcVar6 <= buf) {\n      iVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)buf - (int)pcVar5);\n      *(int *)((int)handle + 0x50) = iVar2;\n      return iVar2;\n    }" if (parenthesized_expression "(pcVar6 <= buf)" ( (binary_expression "pcVar6 <= buf" identifier <= identifier) )) (compound_statement "{\n      iVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)buf - (int)pcVar5);\n      *(int *)((int)handle + 0x50) = iVar2;\n      return iVar2;\n    }" { (expression_statement "iVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)buf - (int)pcVar5);" (assignment_expression "iVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)buf - (int)pcVar5)" identifier = (call_expression "(**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)buf - (int)pcVar5)" (parenthesized_expression "(**(code **)(*piVar3 + 8))" ( (pointer_expression "**(code **)(*piVar3 + 8)" * (pointer_expression "*(code **)(*piVar3 + 8)" * (cast_expression "(code **)(*piVar3 + 8)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar3 + 8)" ( (binary_expression "*piVar3 + 8" (pointer_expression "*piVar3" * identifier) + number_literal) ))))) )) (argument_list "(piVar3,pcVar5,(int)buf - (int)pcVar5)" ( identifier , identifier , (binary_expression "(int)buf - (int)pcVar5" (cast_expression "(int)buf" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pcVar5" ( (type_descriptor "int" primitive_type) ) identifier)) )))) ;) (expression_statement "*(int *)((int)handle + 0x50) = iVar2;" (assignment_expression "*(int *)((int)handle + 0x50) = iVar2" (pointer_expression "*(int *)((int)handle + 0x50)" * (cast_expression "(int *)((int)handle + 0x50)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)handle + 0x50)" ( (binary_expression "(int)handle + 0x50" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = identifier) ;) (return_statement "return iVar2;" return identifier ;) })) (expression_statement "cVar1 = *buf;" (assignment_expression "cVar1 = *buf" identifier = (pointer_expression "*buf" * identifier)) ;) }))) (expression_statement "iVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)buf - (int)pcVar5);" (assignment_expression "iVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)buf - (int)pcVar5)" identifier = (call_expression "(**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)buf - (int)pcVar5)" (parenthesized_expression "(**(code **)(*piVar3 + 8))" ( (pointer_expression "**(code **)(*piVar3 + 8)" * (pointer_expression "*(code **)(*piVar3 + 8)" * (cast_expression "(code **)(*piVar3 + 8)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar3 + 8)" ( (binary_expression "*piVar3 + 8" (pointer_expression "*piVar3" * identifier) + number_literal) ))))) )) (argument_list "(piVar3,pcVar5,(int)buf - (int)pcVar5)" ( identifier , identifier , (binary_expression "(int)buf - (int)pcVar5" (cast_expression "(int)buf" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pcVar5" ( (type_descriptor "int" primitive_type) ) identifier)) )))) ;) (expression_statement "*(int *)((int)handle + 0x50) = iVar2;" (assignment_expression "*(int *)((int)handle + 0x50) = iVar2" (pointer_expression "*(int *)((int)handle + 0x50)" * (cast_expression "(int *)((int)handle + 0x50)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)handle + 0x50)" ( (binary_expression "(int)handle + 0x50" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = identifier) ;) (if_statement "if (pcVar6 <= buf) {\n    return iVar2;\n  }" if (parenthesized_expression "(pcVar6 <= buf)" ( (binary_expression "pcVar6 <= buf" identifier <= identifier) )) (compound_statement "{\n    return iVar2;\n  }" { (return_statement "return iVar2;" return identifier ;) })) (do_statement "do {\n    cVar1 = *buf;\n    if (cVar1 == -1) {\n      piVar3 = *(int **)((int)handle + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar2 = unaff_EDI + 0x58ba3;\n    }\n    else {\n      if ((*(int *)((int)handle + 0x3c) == 1) || (cVar1 != '\r')) break;\n      piVar3 = *(int **)((int)handle + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar2 = unaff_EDI + 0x58ba1;\n    }\n    buf = buf + 1;\n    iVar2 = (*pcVar4)(piVar3,iVar2,2);\n    *(int *)((int)handle + 0x50) = iVar2;\n    if (pcVar6 == buf) {\n      return iVar2;\n    }\n  } while( true );" do (compound_statement "{\n    cVar1 = *buf;\n    if (cVar1 == -1) {\n      piVar3 = *(int **)((int)handle + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar2 = unaff_EDI + 0x58ba3;\n    }\n    else {\n      if ((*(int *)((int)handle + 0x3c) == 1) || (cVar1 != '\r')) break;\n      piVar3 = *(int **)((int)handle + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar2 = unaff_EDI + 0x58ba1;\n    }\n    buf = buf + 1;\n    iVar2 = (*pcVar4)(piVar3,iVar2,2);\n    *(int *)((int)handle + 0x50) = iVar2;\n    if (pcVar6 == buf) {\n      return iVar2;\n    }\n  }" { (expression_statement "cVar1 = *buf;" (assignment_expression "cVar1 = *buf" identifier = (pointer_expression "*buf" * identifier)) ;) (if_statement "if (cVar1 == -1) {\n      piVar3 = *(int **)((int)handle + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar2 = unaff_EDI + 0x58ba3;\n    }\n    else {\n      if ((*(int *)((int)handle + 0x3c) == 1) || (cVar1 != '\r')) break;\n      piVar3 = *(int **)((int)handle + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar2 = unaff_EDI + 0x58ba1;\n    }" if (parenthesized_expression "(cVar1 == -1)" ( (binary_expression "cVar1 == -1" identifier == number_literal) )) (compound_statement "{\n      piVar3 = *(int **)((int)handle + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar2 = unaff_EDI + 0x58ba3;\n    }" { (expression_statement "piVar3 = *(int **)((int)handle + 4);" (assignment_expression "piVar3 = *(int **)((int)handle + 4)" identifier = (pointer_expression "*(int **)((int)handle + 4)" * (cast_expression "(int **)((int)handle + 4)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)handle + 4)" ( (binary_expression "(int)handle + 4" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))))) ;) (expression_statement "pcVar4 = *(code **)(*piVar3 + 8);" (assignment_expression "pcVar4 = *(code **)(*piVar3 + 8)" identifier = (pointer_expression "*(code **)(*piVar3 + 8)" * (cast_expression "(code **)(*piVar3 + 8)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar3 + 8)" ( (binary_expression "*piVar3 + 8" (pointer_expression "*piVar3" * identifier) + number_literal) ))))) ;) (expression_statement "iVar2 = unaff_EDI + 0x58ba3;" (assignment_expression "iVar2 = unaff_EDI + 0x58ba3" identifier = (binary_expression "unaff_EDI + 0x58ba3" identifier + number_literal)) ;) }) (else_clause "else {\n      if ((*(int *)((int)handle + 0x3c) == 1) || (cVar1 != '\r')) break;\n      piVar3 = *(int **)((int)handle + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar2 = unaff_EDI + 0x58ba1;\n    }" else (compound_statement "{\n      if ((*(int *)((int)handle + 0x3c) == 1) || (cVar1 != '\r')) break;\n      piVar3 = *(int **)((int)handle + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar2 = unaff_EDI + 0x58ba1;\n    }" { (if_statement "if ((*(int *)((int)handle + 0x3c) == 1) || (cVar1 != '\r')) break;" if (parenthesized_expression "((*(int *)((int)handle + 0x3c) == 1) || (cVar1 != '\r'))" ( (binary_expression "(*(int *)((int)handle + 0x3c) == 1) || (cVar1 != '\r')" (parenthesized_expression "(*(int *)((int)handle + 0x3c) == 1)" ( (binary_expression "*(int *)((int)handle + 0x3c) == 1" (pointer_expression "*(int *)((int)handle + 0x3c)" * (cast_expression "(int *)((int)handle + 0x3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)handle + 0x3c)" ( (binary_expression "(int)handle + 0x3c" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) == number_literal) )) || (parenthesized_expression "(cVar1 != '\r')" ( (binary_expression "cVar1 != '\r'" identifier != (char_literal "'\r'" ' escape_sequence ')) ))) )) (break_statement "break;" break ;)) (expression_statement "piVar3 = *(int **)((int)handle + 4);" (assignment_expression "piVar3 = *(int **)((int)handle + 4)" identifier = (pointer_expression "*(int **)((int)handle + 4)" * (cast_expression "(int **)((int)handle + 4)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)handle + 4)" ( (binary_expression "(int)handle + 4" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))))) ;) (expression_statement "pcVar4 = *(code **)(*piVar3 + 8);" (assignment_expression "pcVar4 = *(code **)(*piVar3 + 8)" identifier = (pointer_expression "*(code **)(*piVar3 + 8)" * (cast_expression "(code **)(*piVar3 + 8)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar3 + 8)" ( (binary_expression "*piVar3 + 8" (pointer_expression "*piVar3" * identifier) + number_literal) ))))) ;) (expression_statement "iVar2 = unaff_EDI + 0x58ba1;" (assignment_expression "iVar2 = unaff_EDI + 0x58ba1" identifier = (binary_expression "unaff_EDI + 0x58ba1" identifier + number_literal)) ;) }))) (expression_statement "buf = buf + 1;" (assignment_expression "buf = buf + 1" identifier = (binary_expression "buf + 1" identifier + number_literal)) ;) (expression_statement "iVar2 = (*pcVar4)(piVar3,iVar2,2);" (assignment_expression "iVar2 = (*pcVar4)(piVar3,iVar2,2)" identifier = (call_expression "(*pcVar4)(piVar3,iVar2,2)" (parenthesized_expression "(*pcVar4)" ( (pointer_expression "*pcVar4" * identifier) )) (argument_list "(piVar3,iVar2,2)" ( identifier , identifier , number_literal )))) ;) (expression_statement "*(int *)((int)handle + 0x50) = iVar2;" (assignment_expression "*(int *)((int)handle + 0x50) = iVar2" (pointer_expression "*(int *)((int)handle + 0x50)" * (cast_expression "(int *)((int)handle + 0x50)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)handle + 0x50)" ( (binary_expression "(int)handle + 0x50" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) = identifier) ;) (if_statement "if (pcVar6 == buf) {\n      return iVar2;\n    }" if (parenthesized_expression "(pcVar6 == buf)" ( (binary_expression "pcVar6 == buf" identifier == identifier) )) (compound_statement "{\n      return iVar2;\n    }" { (return_statement "return iVar2;" return identifier ;) })) }) while (parenthesized_expression "( true )" ( true )) ;) (if_statement "if (pcVar6 <= buf) goto LAB_00070c78;" if (parenthesized_expression "(pcVar6 <= buf)" ( (binary_expression "pcVar6 <= buf" identifier <= identifier) )) (goto_statement "goto LAB_00070c78;" goto statement_identifier ;)) (expression_statement "piVar3 = *(int **)((int)handle + 4);" (assignment_expression "piVar3 = *(int **)((int)handle + 4)" identifier = (pointer_expression "*(int **)((int)handle + 4)" * (cast_expression "(int **)((int)handle + 4)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)handle + 4)" ( (binary_expression "(int)handle + 4" (cast_expression "(int)handle" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))))) ;) (expression_statement "pcVar5 = buf;" (assignment_expression "pcVar5 = buf" identifier = identifier) ;) (goto_statement "goto LAB_00070bc3;" goto statement_identifier ;) })))
(translation_unit "undefined4 FUN_00070b70(int param_1,char *param_2,int param_3)\n\n{\n  char cVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  code *pcVar4;\n  char *pcVar5;\n  int iVar6;\n  char *pcVar7;\n  int unaff_EDI;\n  \n  FUN_0004e9eb();\n  piVar3 = *(int **)(param_1 + 4);\n  if (piVar3 == (int *)0x0) {\n    return 0;\n  }\n  pcVar7 = param_2 + param_3;\n  if (pcVar7 <= param_2) {\nLAB_00070c78:\n    return *(undefined4 *)(param_1 + 0x50);\n  }\n  cVar1 = *param_2;\n  pcVar5 = param_2;\nLAB_00070bc3:\n  while ((cVar1 != -1 && ((*(int *)(param_1 + 0x3c) == 1 || (cVar1 != '\r'))))) {\n    param_2 = param_2 + 1;\n    if (pcVar7 <= param_2) {\n      uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5);\n      *(undefined4 *)(param_1 + 0x50) = uVar2;\n      return uVar2;\n    }\n    cVar1 = *param_2;\n  }\n  uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5);\n  *(undefined4 *)(param_1 + 0x50) = uVar2;\n  if (pcVar7 <= param_2) {\n    return uVar2;\n  }\n  do {\n    cVar1 = *param_2;\n    if (cVar1 == -1) {\n      piVar3 = *(int **)(param_1 + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar6 = unaff_EDI + 0x58ba3;\n    }\n    else {\n      if ((*(int *)(param_1 + 0x3c) == 1) || (cVar1 != '\r')) break;\n      piVar3 = *(int **)(param_1 + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar6 = unaff_EDI + 0x58ba1;\n    }\n    param_2 = param_2 + 1;\n    uVar2 = (*pcVar4)(piVar3,iVar6,2);\n    *(undefined4 *)(param_1 + 0x50) = uVar2;\n    if (pcVar7 == param_2) {\n      return uVar2;\n    }\n  } while( true );\n  if (pcVar7 <= param_2) goto LAB_00070c78;\n  piVar3 = *(int **)(param_1 + 4);\n  pcVar5 = param_2;\n  goto LAB_00070bc3;\n}\n\n" (function_definition "undefined4 FUN_00070b70(int param_1,char *param_2,int param_3)\n\n{\n  char cVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  code *pcVar4;\n  char *pcVar5;\n  int iVar6;\n  char *pcVar7;\n  int unaff_EDI;\n  \n  FUN_0004e9eb();\n  piVar3 = *(int **)(param_1 + 4);\n  if (piVar3 == (int *)0x0) {\n    return 0;\n  }\n  pcVar7 = param_2 + param_3;\n  if (pcVar7 <= param_2) {\nLAB_00070c78:\n    return *(undefined4 *)(param_1 + 0x50);\n  }\n  cVar1 = *param_2;\n  pcVar5 = param_2;\nLAB_00070bc3:\n  while ((cVar1 != -1 && ((*(int *)(param_1 + 0x3c) == 1 || (cVar1 != '\r'))))) {\n    param_2 = param_2 + 1;\n    if (pcVar7 <= param_2) {\n      uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5);\n      *(undefined4 *)(param_1 + 0x50) = uVar2;\n      return uVar2;\n    }\n    cVar1 = *param_2;\n  }\n  uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5);\n  *(undefined4 *)(param_1 + 0x50) = uVar2;\n  if (pcVar7 <= param_2) {\n    return uVar2;\n  }\n  do {\n    cVar1 = *param_2;\n    if (cVar1 == -1) {\n      piVar3 = *(int **)(param_1 + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar6 = unaff_EDI + 0x58ba3;\n    }\n    else {\n      if ((*(int *)(param_1 + 0x3c) == 1) || (cVar1 != '\r')) break;\n      piVar3 = *(int **)(param_1 + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar6 = unaff_EDI + 0x58ba1;\n    }\n    param_2 = param_2 + 1;\n    uVar2 = (*pcVar4)(piVar3,iVar6,2);\n    *(undefined4 *)(param_1 + 0x50) = uVar2;\n    if (pcVar7 == param_2) {\n      return uVar2;\n    }\n  } while( true );\n  if (pcVar7 <= param_2) goto LAB_00070c78;\n  piVar3 = *(int **)(param_1 + 4);\n  pcVar5 = param_2;\n  goto LAB_00070bc3;\n}" type_identifier (function_declarator "FUN_00070b70(int param_1,char *param_2,int param_3)" identifier (parameter_list "(int param_1,char *param_2,int param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  char cVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  code *pcVar4;\n  char *pcVar5;\n  int iVar6;\n  char *pcVar7;\n  int unaff_EDI;\n  \n  FUN_0004e9eb();\n  piVar3 = *(int **)(param_1 + 4);\n  if (piVar3 == (int *)0x0) {\n    return 0;\n  }\n  pcVar7 = param_2 + param_3;\n  if (pcVar7 <= param_2) {\nLAB_00070c78:\n    return *(undefined4 *)(param_1 + 0x50);\n  }\n  cVar1 = *param_2;\n  pcVar5 = param_2;\nLAB_00070bc3:\n  while ((cVar1 != -1 && ((*(int *)(param_1 + 0x3c) == 1 || (cVar1 != '\r'))))) {\n    param_2 = param_2 + 1;\n    if (pcVar7 <= param_2) {\n      uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5);\n      *(undefined4 *)(param_1 + 0x50) = uVar2;\n      return uVar2;\n    }\n    cVar1 = *param_2;\n  }\n  uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5);\n  *(undefined4 *)(param_1 + 0x50) = uVar2;\n  if (pcVar7 <= param_2) {\n    return uVar2;\n  }\n  do {\n    cVar1 = *param_2;\n    if (cVar1 == -1) {\n      piVar3 = *(int **)(param_1 + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar6 = unaff_EDI + 0x58ba3;\n    }\n    else {\n      if ((*(int *)(param_1 + 0x3c) == 1) || (cVar1 != '\r')) break;\n      piVar3 = *(int **)(param_1 + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar6 = unaff_EDI + 0x58ba1;\n    }\n    param_2 = param_2 + 1;\n    uVar2 = (*pcVar4)(piVar3,iVar6,2);\n    *(undefined4 *)(param_1 + 0x50) = uVar2;\n    if (pcVar7 == param_2) {\n      return uVar2;\n    }\n  } while( true );\n  if (pcVar7 <= param_2) goto LAB_00070c78;\n  piVar3 = *(int **)(param_1 + 4);\n  pcVar5 = param_2;\n  goto LAB_00070bc3;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "code *pcVar4;" type_identifier (pointer_declarator "*pcVar4" * identifier) ;) (declaration "char *pcVar5;" primitive_type (pointer_declarator "*pcVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "char *pcVar7;" primitive_type (pointer_declarator "*pcVar7" * identifier) ;) (declaration "int unaff_EDI;" primitive_type identifier ;) (expression_statement "FUN_0004e9eb();" (call_expression "FUN_0004e9eb()" identifier (argument_list "()" ( ))) ;) (expression_statement "piVar3 = *(int **)(param_1 + 4);" (assignment_expression "piVar3 = *(int **)(param_1 + 4)" identifier = (pointer_expression "*(int **)(param_1 + 4)" * (cast_expression "(int **)(param_1 + 4)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) ))))) ;) (if_statement "if (piVar3 == (int *)0x0) {\n    return 0;\n  }" if (parenthesized_expression "(piVar3 == (int *)0x0)" ( (binary_expression "piVar3 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "pcVar7 = param_2 + param_3;" (assignment_expression "pcVar7 = param_2 + param_3" identifier = (binary_expression "param_2 + param_3" identifier + identifier)) ;) (if_statement "if (pcVar7 <= param_2) {\nLAB_00070c78:\n    return *(undefined4 *)(param_1 + 0x50);\n  }" if (parenthesized_expression "(pcVar7 <= param_2)" ( (binary_expression "pcVar7 <= param_2" identifier <= identifier) )) (compound_statement "{\nLAB_00070c78:\n    return *(undefined4 *)(param_1 + 0x50);\n  }" { (labeled_statement "LAB_00070c78:\n    return *(undefined4 *)(param_1 + 0x50);" statement_identifier : (return_statement "return *(undefined4 *)(param_1 + 0x50);" return (pointer_expression "*(undefined4 *)(param_1 + 0x50)" * (cast_expression "(undefined4 *)(param_1 + 0x50)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x50)" ( (binary_expression "param_1 + 0x50" identifier + number_literal) )))) ;)) })) (expression_statement "cVar1 = *param_2;" (assignment_expression "cVar1 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (expression_statement "pcVar5 = param_2;" (assignment_expression "pcVar5 = param_2" identifier = identifier) ;) (labeled_statement "LAB_00070bc3:\n  while ((cVar1 != -1 && ((*(int *)(param_1 + 0x3c) == 1 || (cVar1 != '\r'))))) {\n    param_2 = param_2 + 1;\n    if (pcVar7 <= param_2) {\n      uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5);\n      *(undefined4 *)(param_1 + 0x50) = uVar2;\n      return uVar2;\n    }\n    cVar1 = *param_2;\n  }" statement_identifier : (while_statement "while ((cVar1 != -1 && ((*(int *)(param_1 + 0x3c) == 1 || (cVar1 != '\r'))))) {\n    param_2 = param_2 + 1;\n    if (pcVar7 <= param_2) {\n      uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5);\n      *(undefined4 *)(param_1 + 0x50) = uVar2;\n      return uVar2;\n    }\n    cVar1 = *param_2;\n  }" while (parenthesized_expression "((cVar1 != -1 && ((*(int *)(param_1 + 0x3c) == 1 || (cVar1 != '\r')))))" ( (parenthesized_expression "(cVar1 != -1 && ((*(int *)(param_1 + 0x3c) == 1 || (cVar1 != '\r'))))" ( (binary_expression "cVar1 != -1 && ((*(int *)(param_1 + 0x3c) == 1 || (cVar1 != '\r')))" (binary_expression "cVar1 != -1" identifier != number_literal) && (parenthesized_expression "((*(int *)(param_1 + 0x3c) == 1 || (cVar1 != '\r')))" ( (parenthesized_expression "(*(int *)(param_1 + 0x3c) == 1 || (cVar1 != '\r'))" ( (binary_expression "*(int *)(param_1 + 0x3c) == 1 || (cVar1 != '\r')" (binary_expression "*(int *)(param_1 + 0x3c) == 1" (pointer_expression "*(int *)(param_1 + 0x3c)" * (cast_expression "(int *)(param_1 + 0x3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) )))) == number_literal) || (parenthesized_expression "(cVar1 != '\r')" ( (binary_expression "cVar1 != '\r'" identifier != (char_literal "'\r'" ' escape_sequence ')) ))) )) ))) )) )) (compound_statement "{\n    param_2 = param_2 + 1;\n    if (pcVar7 <= param_2) {\n      uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5);\n      *(undefined4 *)(param_1 + 0x50) = uVar2;\n      return uVar2;\n    }\n    cVar1 = *param_2;\n  }" { (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 (pcVar7 <= param_2) {\n      uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5);\n      *(undefined4 *)(param_1 + 0x50) = uVar2;\n      return uVar2;\n    }" if (parenthesized_expression "(pcVar7 <= param_2)" ( (binary_expression "pcVar7 <= param_2" identifier <= identifier) )) (compound_statement "{\n      uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5);\n      *(undefined4 *)(param_1 + 0x50) = uVar2;\n      return uVar2;\n    }" { (expression_statement "uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5);" (assignment_expression "uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5)" identifier = (call_expression "(**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5)" (parenthesized_expression "(**(code **)(*piVar3 + 8))" ( (pointer_expression "**(code **)(*piVar3 + 8)" * (pointer_expression "*(code **)(*piVar3 + 8)" * (cast_expression "(code **)(*piVar3 + 8)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar3 + 8)" ( (binary_expression "*piVar3 + 8" (pointer_expression "*piVar3" * identifier) + number_literal) ))))) )) (argument_list "(piVar3,pcVar5,(int)param_2 - (int)pcVar5)" ( identifier , identifier , (binary_expression "(int)param_2 - (int)pcVar5" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pcVar5" ( (type_descriptor "int" primitive_type) ) identifier)) )))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x50) = uVar2;" (assignment_expression "*(undefined4 *)(param_1 + 0x50) = uVar2" (pointer_expression "*(undefined4 *)(param_1 + 0x50)" * (cast_expression "(undefined4 *)(param_1 + 0x50)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x50)" ( (binary_expression "param_1 + 0x50" identifier + number_literal) )))) = identifier) ;) (return_statement "return uVar2;" return identifier ;) })) (expression_statement "cVar1 = *param_2;" (assignment_expression "cVar1 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) }))) (expression_statement "uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5);" (assignment_expression "uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5)" identifier = (call_expression "(**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5)" (parenthesized_expression "(**(code **)(*piVar3 + 8))" ( (pointer_expression "**(code **)(*piVar3 + 8)" * (pointer_expression "*(code **)(*piVar3 + 8)" * (cast_expression "(code **)(*piVar3 + 8)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar3 + 8)" ( (binary_expression "*piVar3 + 8" (pointer_expression "*piVar3" * identifier) + number_literal) ))))) )) (argument_list "(piVar3,pcVar5,(int)param_2 - (int)pcVar5)" ( identifier , identifier , (binary_expression "(int)param_2 - (int)pcVar5" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)pcVar5" ( (type_descriptor "int" primitive_type) ) identifier)) )))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x50) = uVar2;" (assignment_expression "*(undefined4 *)(param_1 + 0x50) = uVar2" (pointer_expression "*(undefined4 *)(param_1 + 0x50)" * (cast_expression "(undefined4 *)(param_1 + 0x50)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x50)" ( (binary_expression "param_1 + 0x50" identifier + number_literal) )))) = identifier) ;) (if_statement "if (pcVar7 <= param_2) {\n    return uVar2;\n  }" if (parenthesized_expression "(pcVar7 <= param_2)" ( (binary_expression "pcVar7 <= param_2" identifier <= identifier) )) (compound_statement "{\n    return uVar2;\n  }" { (return_statement "return uVar2;" return identifier ;) })) (do_statement "do {\n    cVar1 = *param_2;\n    if (cVar1 == -1) {\n      piVar3 = *(int **)(param_1 + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar6 = unaff_EDI + 0x58ba3;\n    }\n    else {\n      if ((*(int *)(param_1 + 0x3c) == 1) || (cVar1 != '\r')) break;\n      piVar3 = *(int **)(param_1 + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar6 = unaff_EDI + 0x58ba1;\n    }\n    param_2 = param_2 + 1;\n    uVar2 = (*pcVar4)(piVar3,iVar6,2);\n    *(undefined4 *)(param_1 + 0x50) = uVar2;\n    if (pcVar7 == param_2) {\n      return uVar2;\n    }\n  } while( true );" do (compound_statement "{\n    cVar1 = *param_2;\n    if (cVar1 == -1) {\n      piVar3 = *(int **)(param_1 + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar6 = unaff_EDI + 0x58ba3;\n    }\n    else {\n      if ((*(int *)(param_1 + 0x3c) == 1) || (cVar1 != '\r')) break;\n      piVar3 = *(int **)(param_1 + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar6 = unaff_EDI + 0x58ba1;\n    }\n    param_2 = param_2 + 1;\n    uVar2 = (*pcVar4)(piVar3,iVar6,2);\n    *(undefined4 *)(param_1 + 0x50) = uVar2;\n    if (pcVar7 == param_2) {\n      return uVar2;\n    }\n  }" { (expression_statement "cVar1 = *param_2;" (assignment_expression "cVar1 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (if_statement "if (cVar1 == -1) {\n      piVar3 = *(int **)(param_1 + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar6 = unaff_EDI + 0x58ba3;\n    }\n    else {\n      if ((*(int *)(param_1 + 0x3c) == 1) || (cVar1 != '\r')) break;\n      piVar3 = *(int **)(param_1 + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar6 = unaff_EDI + 0x58ba1;\n    }" if (parenthesized_expression "(cVar1 == -1)" ( (binary_expression "cVar1 == -1" identifier == number_literal) )) (compound_statement "{\n      piVar3 = *(int **)(param_1 + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar6 = unaff_EDI + 0x58ba3;\n    }" { (expression_statement "piVar3 = *(int **)(param_1 + 4);" (assignment_expression "piVar3 = *(int **)(param_1 + 4)" identifier = (pointer_expression "*(int **)(param_1 + 4)" * (cast_expression "(int **)(param_1 + 4)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) ))))) ;) (expression_statement "pcVar4 = *(code **)(*piVar3 + 8);" (assignment_expression "pcVar4 = *(code **)(*piVar3 + 8)" identifier = (pointer_expression "*(code **)(*piVar3 + 8)" * (cast_expression "(code **)(*piVar3 + 8)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar3 + 8)" ( (binary_expression "*piVar3 + 8" (pointer_expression "*piVar3" * identifier) + number_literal) ))))) ;) (expression_statement "iVar6 = unaff_EDI + 0x58ba3;" (assignment_expression "iVar6 = unaff_EDI + 0x58ba3" identifier = (binary_expression "unaff_EDI + 0x58ba3" identifier + number_literal)) ;) }) (else_clause "else {\n      if ((*(int *)(param_1 + 0x3c) == 1) || (cVar1 != '\r')) break;\n      piVar3 = *(int **)(param_1 + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar6 = unaff_EDI + 0x58ba1;\n    }" else (compound_statement "{\n      if ((*(int *)(param_1 + 0x3c) == 1) || (cVar1 != '\r')) break;\n      piVar3 = *(int **)(param_1 + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar6 = unaff_EDI + 0x58ba1;\n    }" { (if_statement "if ((*(int *)(param_1 + 0x3c) == 1) || (cVar1 != '\r')) break;" if (parenthesized_expression "((*(int *)(param_1 + 0x3c) == 1) || (cVar1 != '\r'))" ( (binary_expression "(*(int *)(param_1 + 0x3c) == 1) || (cVar1 != '\r')" (parenthesized_expression "(*(int *)(param_1 + 0x3c) == 1)" ( (binary_expression "*(int *)(param_1 + 0x3c) == 1" (pointer_expression "*(int *)(param_1 + 0x3c)" * (cast_expression "(int *)(param_1 + 0x3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) )))) == number_literal) )) || (parenthesized_expression "(cVar1 != '\r')" ( (binary_expression "cVar1 != '\r'" identifier != (char_literal "'\r'" ' escape_sequence ')) ))) )) (break_statement "break;" break ;)) (expression_statement "piVar3 = *(int **)(param_1 + 4);" (assignment_expression "piVar3 = *(int **)(param_1 + 4)" identifier = (pointer_expression "*(int **)(param_1 + 4)" * (cast_expression "(int **)(param_1 + 4)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) ))))) ;) (expression_statement "pcVar4 = *(code **)(*piVar3 + 8);" (assignment_expression "pcVar4 = *(code **)(*piVar3 + 8)" identifier = (pointer_expression "*(code **)(*piVar3 + 8)" * (cast_expression "(code **)(*piVar3 + 8)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar3 + 8)" ( (binary_expression "*piVar3 + 8" (pointer_expression "*piVar3" * identifier) + number_literal) ))))) ;) (expression_statement "iVar6 = unaff_EDI + 0x58ba1;" (assignment_expression "iVar6 = unaff_EDI + 0x58ba1" identifier = (binary_expression "unaff_EDI + 0x58ba1" identifier + 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)) ;) (expression_statement "uVar2 = (*pcVar4)(piVar3,iVar6,2);" (assignment_expression "uVar2 = (*pcVar4)(piVar3,iVar6,2)" identifier = (call_expression "(*pcVar4)(piVar3,iVar6,2)" (parenthesized_expression "(*pcVar4)" ( (pointer_expression "*pcVar4" * identifier) )) (argument_list "(piVar3,iVar6,2)" ( identifier , identifier , number_literal )))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x50) = uVar2;" (assignment_expression "*(undefined4 *)(param_1 + 0x50) = uVar2" (pointer_expression "*(undefined4 *)(param_1 + 0x50)" * (cast_expression "(undefined4 *)(param_1 + 0x50)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x50)" ( (binary_expression "param_1 + 0x50" identifier + number_literal) )))) = identifier) ;) (if_statement "if (pcVar7 == param_2) {\n      return uVar2;\n    }" if (parenthesized_expression "(pcVar7 == param_2)" ( (binary_expression "pcVar7 == param_2" identifier == identifier) )) (compound_statement "{\n      return uVar2;\n    }" { (return_statement "return uVar2;" return identifier ;) })) }) while (parenthesized_expression "( true )" ( true )) ;) (if_statement "if (pcVar7 <= param_2) goto LAB_00070c78;" if (parenthesized_expression "(pcVar7 <= param_2)" ( (binary_expression "pcVar7 <= param_2" identifier <= identifier) )) (goto_statement "goto LAB_00070c78;" goto statement_identifier ;)) (expression_statement "piVar3 = *(int **)(param_1 + 4);" (assignment_expression "piVar3 = *(int **)(param_1 + 4)" identifier = (pointer_expression "*(int **)(param_1 + 4)" * (cast_expression "(int **)(param_1 + 4)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) ))))) ;) (expression_statement "pcVar5 = param_2;" (assignment_expression "pcVar5 = param_2" identifier = identifier) ;) (goto_statement "goto LAB_00070bc3;" goto statement_identifier ;) })))
(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 IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (labeled_statement statement_identifier : (return_statement return (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;)) })) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (labeled_statement statement_identifier : (while_statement while (parenthesized_expression ( (parenthesized_expression ( (binary_expression (binary_expression IDENT != LIT) && (parenthesized_expression ( (parenthesized_expression ( (binary_expression (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) || (parenthesized_expression ( (binary_expression IDENT != (char_literal ' escape_sequence ')) ))) )) ))) )) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) ))))) )) (argument_list ( IDENT , IDENT , (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) IDENT)) )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) }))) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) ))))) )) (argument_list ( IDENT , IDENT , (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) IDENT)) )))) ;) (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 IDENT <= IDENT) )) (compound_statement { (return_statement return IDENT ;) })) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) (else_clause else (compound_statement { (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 IDENT != (char_literal ' escape_sequence ')) ))) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }))) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( IDENT , IDENT , 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 IDENT == IDENT) )) (compound_statement { (return_statement return IDENT ;) })) }) while (parenthesized_expression ( BOOL )) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (goto_statement goto statement_identifier ;) })))
(function_definition "undefined4 FUN_00070b70(int param_1,char *param_2,int param_3)\n\n{\n  char cVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  code *pcVar4;\n  char *pcVar5;\n  int iVar6;\n  char *pcVar7;\n  int unaff_EDI;\n  \n  FUN_0004e9eb();\n  piVar3 = *(int **)(param_1 + 4);\n  if (piVar3 == (int *)0x0) {\n    return 0;\n  }\n  pcVar7 = param_2 + param_3;\n  if (pcVar7 <= param_2) {\nLAB_00070c78:\n    return *(undefined4 *)(param_1 + 0x50);\n  }\n  cVar1 = *param_2;\n  pcVar5 = param_2;\nLAB_00070bc3:\n  while ((cVar1 != -1 && ((*(int *)(param_1 + 0x3c) == 1 || (cVar1 != '\r'))))) {\n    param_2 = param_2 + 1;\n    if (pcVar7 <= param_2) {\n      uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5);\n      *(undefined4 *)(param_1 + 0x50) = uVar2;\n      return uVar2;\n    }\n    cVar1 = *param_2;\n  }\n  uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5);\n  *(undefined4 *)(param_1 + 0x50) = uVar2;\n  if (pcVar7 <= param_2) {\n    return uVar2;\n  }\n  do {\n    cVar1 = *param_2;\n    if (cVar1 == -1) {\n      piVar3 = *(int **)(param_1 + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar6 = unaff_EDI + 0x58ba3;\n    }\n    else {\n      if ((*(int *)(param_1 + 0x3c) == 1) || (cVar1 != '\r')) break;\n      piVar3 = *(int **)(param_1 + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar6 = unaff_EDI + 0x58ba1;\n    }\n    param_2 = param_2 + 1;\n    uVar2 = (*pcVar4)(piVar3,iVar6,2);\n    *(undefined4 *)(param_1 + 0x50) = uVar2;\n    if (pcVar7 == param_2) {\n      return uVar2;\n    }\n  } while( true );\n  if (pcVar7 <= param_2) goto LAB_00070c78;\n  piVar3 = *(int **)(param_1 + 4);\n  pcVar5 = param_2;\n  goto LAB_00070bc3;\n}" (type_identifier "undefined4") (function_declarator "FUN_00070b70(int param_1,char *param_2,int param_3)" (identifier "FUN_00070b70") (parameter_list "(int param_1,char *param_2,int param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "char *param_2" (primitive_type "char") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")"))) (compound_statement "{\n  char cVar1;\n  undefined4 uVar2;\n  int *piVar3;\n  code *pcVar4;\n  char *pcVar5;\n  int iVar6;\n  char *pcVar7;\n  int unaff_EDI;\n  \n  FUN_0004e9eb();\n  piVar3 = *(int **)(param_1 + 4);\n  if (piVar3 == (int *)0x0) {\n    return 0;\n  }\n  pcVar7 = param_2 + param_3;\n  if (pcVar7 <= param_2) {\nLAB_00070c78:\n    return *(undefined4 *)(param_1 + 0x50);\n  }\n  cVar1 = *param_2;\n  pcVar5 = param_2;\nLAB_00070bc3:\n  while ((cVar1 != -1 && ((*(int *)(param_1 + 0x3c) == 1 || (cVar1 != '\r'))))) {\n    param_2 = param_2 + 1;\n    if (pcVar7 <= param_2) {\n      uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5);\n      *(undefined4 *)(param_1 + 0x50) = uVar2;\n      return uVar2;\n    }\n    cVar1 = *param_2;\n  }\n  uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5);\n  *(undefined4 *)(param_1 + 0x50) = uVar2;\n  if (pcVar7 <= param_2) {\n    return uVar2;\n  }\n  do {\n    cVar1 = *param_2;\n    if (cVar1 == -1) {\n      piVar3 = *(int **)(param_1 + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar6 = unaff_EDI + 0x58ba3;\n    }\n    else {\n      if ((*(int *)(param_1 + 0x3c) == 1) || (cVar1 != '\r')) break;\n      piVar3 = *(int **)(param_1 + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar6 = unaff_EDI + 0x58ba1;\n    }\n    param_2 = param_2 + 1;\n    uVar2 = (*pcVar4)(piVar3,iVar6,2);\n    *(undefined4 *)(param_1 + 0x50) = uVar2;\n    if (pcVar7 == param_2) {\n      return uVar2;\n    }\n  } while( true );\n  if (pcVar7 <= param_2) goto LAB_00070c78;\n  piVar3 = *(int **)(param_1 + 4);\n  pcVar5 = param_2;\n  goto LAB_00070bc3;\n}" ({ "{") (declaration "char cVar1;" (primitive_type "char") (identifier "cVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "int *piVar3;" (primitive_type "int") (pointer_declarator "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (declaration "code *pcVar4;" (type_identifier "code") (pointer_declarator "*pcVar4" (* "*") (identifier "pcVar4")) (; ";")) (declaration "char *pcVar5;" (primitive_type "char") (pointer_declarator "*pcVar5" (* "*") (identifier "pcVar5")) (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (declaration "char *pcVar7;" (primitive_type "char") (pointer_declarator "*pcVar7" (* "*") (identifier "pcVar7")) (; ";")) (declaration "int unaff_EDI;" (primitive_type "int") (identifier "unaff_EDI") (; ";")) (expression_statement "FUN_0004e9eb();" (call_expression "FUN_0004e9eb()" (identifier "FUN_0004e9eb") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "piVar3 = *(int **)(param_1 + 4);" (assignment_expression "piVar3 = *(int **)(param_1 + 4)" (identifier "piVar3") (= "=") (pointer_expression "*(int **)(param_1 + 4)" (* "*") (cast_expression "(int **)(param_1 + 4)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")"))))) (; ";")) (if_statement "if (piVar3 == (int *)0x0) {\n    return 0;\n  }" (if "if") (parenthesized_expression "(piVar3 == (int *)0x0)" (( "(") (binary_expression "piVar3 == (int *)0x0" (identifier "piVar3") (== "==") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    return 0;\n  }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "pcVar7 = param_2 + param_3;" (assignment_expression "pcVar7 = param_2 + param_3" (identifier "pcVar7") (= "=") (binary_expression "param_2 + param_3" (identifier "param_2") (+ "+") (identifier "param_3"))) (; ";")) (if_statement "if (pcVar7 <= param_2) {\nLAB_00070c78:\n    return *(undefined4 *)(param_1 + 0x50);\n  }" (if "if") (parenthesized_expression "(pcVar7 <= param_2)" (( "(") (binary_expression "pcVar7 <= param_2" (identifier "pcVar7") (<= "<=") (identifier "param_2")) () ")")) (compound_statement "{\nLAB_00070c78:\n    return *(undefined4 *)(param_1 + 0x50);\n  }" ({ "{") (labeled_statement "LAB_00070c78:\n    return *(undefined4 *)(param_1 + 0x50);" (statement_identifier "LAB_00070c78") (: ":") (return_statement "return *(undefined4 *)(param_1 + 0x50);" (return "return") (pointer_expression "*(undefined4 *)(param_1 + 0x50)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x50)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x50)" (( "(") (binary_expression "param_1 + 0x50" (identifier "param_1") (+ "+") (number_literal "0x50")) () ")")))) (; ";"))) (} "}"))) (expression_statement "cVar1 = *param_2;" (assignment_expression "cVar1 = *param_2" (identifier "cVar1") (= "=") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (; ";")) (expression_statement "pcVar5 = param_2;" (assignment_expression "pcVar5 = param_2" (identifier "pcVar5") (= "=") (identifier "param_2")) (; ";")) (labeled_statement "LAB_00070bc3:\n  while ((cVar1 != -1 && ((*(int *)(param_1 + 0x3c) == 1 || (cVar1 != '\r'))))) {\n    param_2 = param_2 + 1;\n    if (pcVar7 <= param_2) {\n      uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5);\n      *(undefined4 *)(param_1 + 0x50) = uVar2;\n      return uVar2;\n    }\n    cVar1 = *param_2;\n  }" (statement_identifier "LAB_00070bc3") (: ":") (while_statement "while ((cVar1 != -1 && ((*(int *)(param_1 + 0x3c) == 1 || (cVar1 != '\r'))))) {\n    param_2 = param_2 + 1;\n    if (pcVar7 <= param_2) {\n      uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5);\n      *(undefined4 *)(param_1 + 0x50) = uVar2;\n      return uVar2;\n    }\n    cVar1 = *param_2;\n  }" (while "while") (parenthesized_expression "((cVar1 != -1 && ((*(int *)(param_1 + 0x3c) == 1 || (cVar1 != '\r')))))" (( "(") (parenthesized_expression "(cVar1 != -1 && ((*(int *)(param_1 + 0x3c) == 1 || (cVar1 != '\r'))))" (( "(") (binary_expression "cVar1 != -1 && ((*(int *)(param_1 + 0x3c) == 1 || (cVar1 != '\r')))" (binary_expression "cVar1 != -1" (identifier "cVar1") (!= "!=") (number_literal "-1")) (&& "&&") (parenthesized_expression "((*(int *)(param_1 + 0x3c) == 1 || (cVar1 != '\r')))" (( "(") (parenthesized_expression "(*(int *)(param_1 + 0x3c) == 1 || (cVar1 != '\r'))" (( "(") (binary_expression "*(int *)(param_1 + 0x3c) == 1 || (cVar1 != '\r')" (binary_expression "*(int *)(param_1 + 0x3c) == 1" (pointer_expression "*(int *)(param_1 + 0x3c)" (* "*") (cast_expression "(int *)(param_1 + 0x3c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x3c)" (( "(") (binary_expression "param_1 + 0x3c" (identifier "param_1") (+ "+") (number_literal "0x3c")) () ")")))) (== "==") (number_literal "1")) (|| "||") (parenthesized_expression "(cVar1 != '\r')" (( "(") (binary_expression "cVar1 != '\r'" (identifier "cVar1") (!= "!=") (char_literal "'\r'" (' "'") (escape_sequence "\r") (' "'"))) () ")"))) () ")")) () ")"))) () ")")) () ")")) (compound_statement "{\n    param_2 = param_2 + 1;\n    if (pcVar7 <= param_2) {\n      uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5);\n      *(undefined4 *)(param_1 + 0x50) = uVar2;\n      return uVar2;\n    }\n    cVar1 = *param_2;\n  }" ({ "{") (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 (pcVar7 <= param_2) {\n      uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5);\n      *(undefined4 *)(param_1 + 0x50) = uVar2;\n      return uVar2;\n    }" (if "if") (parenthesized_expression "(pcVar7 <= param_2)" (( "(") (binary_expression "pcVar7 <= param_2" (identifier "pcVar7") (<= "<=") (identifier "param_2")) () ")")) (compound_statement "{\n      uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5);\n      *(undefined4 *)(param_1 + 0x50) = uVar2;\n      return uVar2;\n    }" ({ "{") (expression_statement "uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5);" (assignment_expression "uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5)" (identifier "uVar2") (= "=") (call_expression "(**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5)" (parenthesized_expression "(**(code **)(*piVar3 + 8))" (( "(") (pointer_expression "**(code **)(*piVar3 + 8)" (* "*") (pointer_expression "*(code **)(*piVar3 + 8)" (* "*") (cast_expression "(code **)(*piVar3 + 8)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*piVar3 + 8)" (( "(") (binary_expression "*piVar3 + 8" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (+ "+") (number_literal "8")) () ")"))))) () ")")) (argument_list "(piVar3,pcVar5,(int)param_2 - (int)pcVar5)" (( "(") (identifier "piVar3") (, ",") (identifier "pcVar5") (, ",") (binary_expression "(int)param_2 - (int)pcVar5" (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2")) (- "-") (cast_expression "(int)pcVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pcVar5"))) () ")")))) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x50) = uVar2;" (assignment_expression "*(undefined4 *)(param_1 + 0x50) = uVar2" (pointer_expression "*(undefined4 *)(param_1 + 0x50)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x50)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x50)" (( "(") (binary_expression "param_1 + 0x50" (identifier "param_1") (+ "+") (number_literal "0x50")) () ")")))) (= "=") (identifier "uVar2")) (; ";")) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}"))) (expression_statement "cVar1 = *param_2;" (assignment_expression "cVar1 = *param_2" (identifier "cVar1") (= "=") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (; ";")) (} "}")))) (expression_statement "uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5);" (assignment_expression "uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5)" (identifier "uVar2") (= "=") (call_expression "(**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5)" (parenthesized_expression "(**(code **)(*piVar3 + 8))" (( "(") (pointer_expression "**(code **)(*piVar3 + 8)" (* "*") (pointer_expression "*(code **)(*piVar3 + 8)" (* "*") (cast_expression "(code **)(*piVar3 + 8)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*piVar3 + 8)" (( "(") (binary_expression "*piVar3 + 8" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (+ "+") (number_literal "8")) () ")"))))) () ")")) (argument_list "(piVar3,pcVar5,(int)param_2 - (int)pcVar5)" (( "(") (identifier "piVar3") (, ",") (identifier "pcVar5") (, ",") (binary_expression "(int)param_2 - (int)pcVar5" (cast_expression "(int)param_2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_2")) (- "-") (cast_expression "(int)pcVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pcVar5"))) () ")")))) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x50) = uVar2;" (assignment_expression "*(undefined4 *)(param_1 + 0x50) = uVar2" (pointer_expression "*(undefined4 *)(param_1 + 0x50)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x50)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x50)" (( "(") (binary_expression "param_1 + 0x50" (identifier "param_1") (+ "+") (number_literal "0x50")) () ")")))) (= "=") (identifier "uVar2")) (; ";")) (if_statement "if (pcVar7 <= param_2) {\n    return uVar2;\n  }" (if "if") (parenthesized_expression "(pcVar7 <= param_2)" (( "(") (binary_expression "pcVar7 <= param_2" (identifier "pcVar7") (<= "<=") (identifier "param_2")) () ")")) (compound_statement "{\n    return uVar2;\n  }" ({ "{") (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}"))) (do_statement "do {\n    cVar1 = *param_2;\n    if (cVar1 == -1) {\n      piVar3 = *(int **)(param_1 + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar6 = unaff_EDI + 0x58ba3;\n    }\n    else {\n      if ((*(int *)(param_1 + 0x3c) == 1) || (cVar1 != '\r')) break;\n      piVar3 = *(int **)(param_1 + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar6 = unaff_EDI + 0x58ba1;\n    }\n    param_2 = param_2 + 1;\n    uVar2 = (*pcVar4)(piVar3,iVar6,2);\n    *(undefined4 *)(param_1 + 0x50) = uVar2;\n    if (pcVar7 == param_2) {\n      return uVar2;\n    }\n  } while( true );" (do "do") (compound_statement "{\n    cVar1 = *param_2;\n    if (cVar1 == -1) {\n      piVar3 = *(int **)(param_1 + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar6 = unaff_EDI + 0x58ba3;\n    }\n    else {\n      if ((*(int *)(param_1 + 0x3c) == 1) || (cVar1 != '\r')) break;\n      piVar3 = *(int **)(param_1 + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar6 = unaff_EDI + 0x58ba1;\n    }\n    param_2 = param_2 + 1;\n    uVar2 = (*pcVar4)(piVar3,iVar6,2);\n    *(undefined4 *)(param_1 + 0x50) = uVar2;\n    if (pcVar7 == param_2) {\n      return uVar2;\n    }\n  }" ({ "{") (expression_statement "cVar1 = *param_2;" (assignment_expression "cVar1 = *param_2" (identifier "cVar1") (= "=") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (; ";")) (if_statement "if (cVar1 == -1) {\n      piVar3 = *(int **)(param_1 + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar6 = unaff_EDI + 0x58ba3;\n    }\n    else {\n      if ((*(int *)(param_1 + 0x3c) == 1) || (cVar1 != '\r')) break;\n      piVar3 = *(int **)(param_1 + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar6 = unaff_EDI + 0x58ba1;\n    }" (if "if") (parenthesized_expression "(cVar1 == -1)" (( "(") (binary_expression "cVar1 == -1" (identifier "cVar1") (== "==") (number_literal "-1")) () ")")) (compound_statement "{\n      piVar3 = *(int **)(param_1 + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar6 = unaff_EDI + 0x58ba3;\n    }" ({ "{") (expression_statement "piVar3 = *(int **)(param_1 + 4);" (assignment_expression "piVar3 = *(int **)(param_1 + 4)" (identifier "piVar3") (= "=") (pointer_expression "*(int **)(param_1 + 4)" (* "*") (cast_expression "(int **)(param_1 + 4)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")"))))) (; ";")) (expression_statement "pcVar4 = *(code **)(*piVar3 + 8);" (assignment_expression "pcVar4 = *(code **)(*piVar3 + 8)" (identifier "pcVar4") (= "=") (pointer_expression "*(code **)(*piVar3 + 8)" (* "*") (cast_expression "(code **)(*piVar3 + 8)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*piVar3 + 8)" (( "(") (binary_expression "*piVar3 + 8" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (+ "+") (number_literal "8")) () ")"))))) (; ";")) (expression_statement "iVar6 = unaff_EDI + 0x58ba3;" (assignment_expression "iVar6 = unaff_EDI + 0x58ba3" (identifier "iVar6") (= "=") (binary_expression "unaff_EDI + 0x58ba3" (identifier "unaff_EDI") (+ "+") (number_literal "0x58ba3"))) (; ";")) (} "}")) (else_clause "else {\n      if ((*(int *)(param_1 + 0x3c) == 1) || (cVar1 != '\r')) break;\n      piVar3 = *(int **)(param_1 + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar6 = unaff_EDI + 0x58ba1;\n    }" (else "else") (compound_statement "{\n      if ((*(int *)(param_1 + 0x3c) == 1) || (cVar1 != '\r')) break;\n      piVar3 = *(int **)(param_1 + 4);\n      pcVar4 = *(code **)(*piVar3 + 8);\n      iVar6 = unaff_EDI + 0x58ba1;\n    }" ({ "{") (if_statement "if ((*(int *)(param_1 + 0x3c) == 1) || (cVar1 != '\r')) break;" (if "if") (parenthesized_expression "((*(int *)(param_1 + 0x3c) == 1) || (cVar1 != '\r'))" (( "(") (binary_expression "(*(int *)(param_1 + 0x3c) == 1) || (cVar1 != '\r')" (parenthesized_expression "(*(int *)(param_1 + 0x3c) == 1)" (( "(") (binary_expression "*(int *)(param_1 + 0x3c) == 1" (pointer_expression "*(int *)(param_1 + 0x3c)" (* "*") (cast_expression "(int *)(param_1 + 0x3c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x3c)" (( "(") (binary_expression "param_1 + 0x3c" (identifier "param_1") (+ "+") (number_literal "0x3c")) () ")")))) (== "==") (number_literal "1")) () ")")) (|| "||") (parenthesized_expression "(cVar1 != '\r')" (( "(") (binary_expression "cVar1 != '\r'" (identifier "cVar1") (!= "!=") (char_literal "'\r'" (' "'") (escape_sequence "\r") (' "'"))) () ")"))) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "piVar3 = *(int **)(param_1 + 4);" (assignment_expression "piVar3 = *(int **)(param_1 + 4)" (identifier "piVar3") (= "=") (pointer_expression "*(int **)(param_1 + 4)" (* "*") (cast_expression "(int **)(param_1 + 4)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")"))))) (; ";")) (expression_statement "pcVar4 = *(code **)(*piVar3 + 8);" (assignment_expression "pcVar4 = *(code **)(*piVar3 + 8)" (identifier "pcVar4") (= "=") (pointer_expression "*(code **)(*piVar3 + 8)" (* "*") (cast_expression "(code **)(*piVar3 + 8)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*piVar3 + 8)" (( "(") (binary_expression "*piVar3 + 8" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (+ "+") (number_literal "8")) () ")"))))) (; ";")) (expression_statement "iVar6 = unaff_EDI + 0x58ba1;" (assignment_expression "iVar6 = unaff_EDI + 0x58ba1" (identifier "iVar6") (= "=") (binary_expression "unaff_EDI + 0x58ba1" (identifier "unaff_EDI") (+ "+") (number_literal "0x58ba1"))) (; ";")) (} "}")))) (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"))) (; ";")) (expression_statement "uVar2 = (*pcVar4)(piVar3,iVar6,2);" (assignment_expression "uVar2 = (*pcVar4)(piVar3,iVar6,2)" (identifier "uVar2") (= "=") (call_expression "(*pcVar4)(piVar3,iVar6,2)" (parenthesized_expression "(*pcVar4)" (( "(") (pointer_expression "*pcVar4" (* "*") (identifier "pcVar4")) () ")")) (argument_list "(piVar3,iVar6,2)" (( "(") (identifier "piVar3") (, ",") (identifier "iVar6") (, ",") (number_literal "2") () ")")))) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x50) = uVar2;" (assignment_expression "*(undefined4 *)(param_1 + 0x50) = uVar2" (pointer_expression "*(undefined4 *)(param_1 + 0x50)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x50)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x50)" (( "(") (binary_expression "param_1 + 0x50" (identifier "param_1") (+ "+") (number_literal "0x50")) () ")")))) (= "=") (identifier "uVar2")) (; ";")) (if_statement "if (pcVar7 == param_2) {\n      return uVar2;\n    }" (if "if") (parenthesized_expression "(pcVar7 == param_2)" (( "(") (binary_expression "pcVar7 == param_2" (identifier "pcVar7") (== "==") (identifier "param_2")) () ")")) (compound_statement "{\n      return uVar2;\n    }" ({ "{") (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}"))) (} "}")) (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (; ";")) (if_statement "if (pcVar7 <= param_2) goto LAB_00070c78;" (if "if") (parenthesized_expression "(pcVar7 <= param_2)" (( "(") (binary_expression "pcVar7 <= param_2" (identifier "pcVar7") (<= "<=") (identifier "param_2")) () ")")) (goto_statement "goto LAB_00070c78;" (goto "goto") (statement_identifier "LAB_00070c78") (; ";"))) (expression_statement "piVar3 = *(int **)(param_1 + 4);" (assignment_expression "piVar3 = *(int **)(param_1 + 4)" (identifier "piVar3") (= "=") (pointer_expression "*(int **)(param_1 + 4)" (* "*") (cast_expression "(int **)(param_1 + 4)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")"))))) (; ";")) (expression_statement "pcVar5 = param_2;" (assignment_expression "pcVar5 = param_2" (identifier "pcVar5") (= "=") (identifier "param_2")) (; ";")) (goto_statement "goto LAB_00070bc3;" (goto "goto") (statement_identifier "LAB_00070bc3") (; ";")) (} "}")))

/* WARNING: Unknown calling convention */

int function_1(void *handle,char *var_3,int var_4)

{
  char var_6;
  int iVar2;
  int *var_2;
  type_1 *pcVar4;
  char *pcVar5;
  char *var_5;
  int var_7;
  
  var_1();
  var_2 = *(int **)((int)handle + 4);
  if (var_2 == (int *)0x0) {
    return 0;
  }
  var_5 = var_3 + var_4;
  if (var_5 <= var_3) {
LAB_00070c78:
    return *(int *)((int)handle + 0x50);
  }
  var_6 = *var_3;
  pcVar5 = var_3;
LAB_00070bc3:
  while ((var_6 != -1 && ((*(int *)((int)handle + 0x3c) == 1 || (var_6 != '\r'))))) {
    var_3 = var_3 + 1;
    if (var_5 <= var_3) {
      iVar2 = (**(type_1 **)(*var_2 + 8))(var_2,pcVar5,(int)var_3 - (int)pcVar5);
      *(int *)((int)handle + 0x50) = iVar2;
      return iVar2;
    }
    var_6 = *var_3;
  }
  iVar2 = (**(type_1 **)(*var_2 + 8))(var_2,pcVar5,(int)var_3 - (int)pcVar5);
  *(int *)((int)handle + 0x50) = iVar2;
  if (var_5 <= var_3) {
    return iVar2;
  }
  do {
    var_6 = *var_3;
    if (var_6 == -1) {
      var_2 = *(int **)((int)handle + 4);
      pcVar4 = *(type_1 **)(*var_2 + 8);
      iVar2 = var_7 + 0x58ba3;
    }
    else {
      if ((*(int *)((int)handle + 0x3c) == 1) || (var_6 != '\r')) break;
      var_2 = *(int **)((int)handle + 4);
      pcVar4 = *(type_1 **)(*var_2 + 8);
      iVar2 = var_7 + 0x58ba1;
    }
    var_3 = var_3 + 1;
    iVar2 = (*pcVar4)(var_2,iVar2,2);
    *(int *)((int)handle + 0x50) = iVar2;
    if (var_5 == var_3) {
      return iVar2;
    }
  } while( true );
  if (var_5 <= var_3) goto LAB_00070c78;
  var_2 = *(int **)((int)handle + 4);
  pcVar5 = var_3;
  goto LAB_00070bc3;
}


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

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

{
  char cVar1;
  undefined4 uVar2;
  int *piVar3;
  code *pcVar4;
  char *pcVar5;
  int iVar6;
  char *pcVar7;
  int unaff_EDI;
  
  FUN_0004e9eb();
  piVar3 = *(int **)(param_1 + 4);
  if (piVar3 == (int *)0x0) {
    return 0;
  }
  pcVar7 = param_2 + param_3;
  if (pcVar7 <= param_2) {
LAB_00070c78:
    return *(undefined4 *)(param_1 + 0x50);
  }
  cVar1 = *param_2;
  pcVar5 = param_2;
LAB_00070bc3:
  while ((cVar1 != -1 && ((*(int *)(param_1 + 0x3c) == 1 || (cVar1 != '\r'))))) {
    param_2 = param_2 + 1;
    if (pcVar7 <= param_2) {
      uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5);
      *(undefined4 *)(param_1 + 0x50) = uVar2;
      return uVar2;
    }
    cVar1 = *param_2;
  }
  uVar2 = (**(code **)(*piVar3 + 8))(piVar3,pcVar5,(int)param_2 - (int)pcVar5);
  *(undefined4 *)(param_1 + 0x50) = uVar2;
  if (pcVar7 <= param_2) {
    return uVar2;
  }
  do {
    cVar1 = *param_2;
    if (cVar1 == -1) {
      piVar3 = *(int **)(param_1 + 4);
      pcVar4 = *(code **)(*piVar3 + 8);
      iVar6 = unaff_EDI + 0x58ba3;
    }
    else {
      if ((*(int *)(param_1 + 0x3c) == 1) || (cVar1 != '\r')) break;
      piVar3 = *(int **)(param_1 + 4);
      pcVar4 = *(code **)(*piVar3 + 8);
      iVar6 = unaff_EDI + 0x58ba1;
    }
    param_2 = param_2 + 1;
    uVar2 = (*pcVar4)(piVar3,iVar6,2);
    *(undefined4 *)(param_1 + 0x50) = uVar2;
    if (pcVar7 == param_2) {
      return uVar2;
    }
  } while( true );
  if (pcVar7 <= param_2) goto LAB_00070c78;
  piVar3 = *(int **)(param_1 + 4);
  pcVar5 = param_2;
  goto LAB_00070bc3;
}

