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

int get_one_char(void)

{
}



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

uint FUN_0009d6cc(void)

{
  byte *pbVar1;
  int iVar2;
  int iVar3;
  uint uVar4;
  
  iVar3 = DAT_000d1700;
  if (*(char *)(DAT_000d1700 + 0x5e) == '\0') {
    pbVar1 = *(byte **)(DAT_000d1700 + 100);
    if (pbVar1 == (byte *)0x0) {
      uVar4 = FUN_0009d65f();
      return uVar4;
    }
    *(byte **)(DAT_000d1700 + 100) = pbVar1 + 1;
    uVar4 = (uint)*pbVar1;
    if (uVar4 == 0) {
      free(*(void **)(iVar3 + 0x68));
      *(undefined4 *)(iVar3 + 100) = 0;
      *(undefined4 *)(iVar3 + 0x68) = 0;
      uVar4 = FUN_0009d65f();
      return uVar4;
    }
  }
  else {
    uVar4 = FUN_0009d65f();
    iVar2 = *(int *)(iVar3 + 0x60);
    if (0x7e < iVar2) {
      FUN_0009c4e0("last_modifying_cmd overrun");
      return uVar4;
    }
    *(int *)(iVar3 + 0x60) = iVar2 + 1;
    *(char *)(iVar3 + 0x32c + iVar2) = (char)uVar4;
  }
  return uVar4;
}


PUSH ESI
PUSH EBX
SUB ESP,0x14
CALL 0x00017640
ADD EBX,0x3334a
MOV ESI,dword ptr [EBX + 0xce0]
CMP byte ptr [ESI + 0x5e],0x0
JNZ 0x0009d6f9
MOV EAX,dword ptr [ESI + 0x64]
TEST EAX,EAX
JNZ 0x0009d739
ADD ESP,0x14
POP EBX
POP ESI
JMP 0x0009d65f
CALL 0x0009d65f
MOV EDX,dword ptr [ESI + 0x60]
CMP EDX,0x7e
JG 0x0009d719
LEA ECX,[EDX + 0x1]
MOV dword ptr [ESI + 0x60],ECX
MOV byte ptr [ESI + EDX*0x1 + 0x32c],AL
ADD ESP,0x14
POP EBX
POP ESI
RET
MOV dword ptr [ESP + 0xc],EAX
SUB ESP,0xc
LEA EDX,[EBX + 0xffffc5ea]
PUSH EDX
CALL 0x0009c4e0
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0xc]
ADD ESP,0x14
POP EBX
POP ESI
RET
LEA EDX,[EAX + 0x1]
MOV dword ptr [ESI + 0x64],EDX
MOVZX EAX,byte ptr [EAX]
TEST EAX,EAX
JNZ 0x0009d713
SUB ESP,0xc
PUSH dword ptr [ESI + 0x68]
CALL 0x000175a0
MOV dword ptr [ESI + 0x64],0x0
MOV dword ptr [ESI + 0x68],0x0
ADD ESP,0x24
POP EBX
POP ESI
JMP 0x0009d65f
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nuint FUN_0009d6cc(void)\n\n{\n  byte *pbVar1;\n  int iVar2;\n  int iVar3;\n  uint uVar4;\n  \n  iVar3 = DAT_000d1700;\n  if (*(char *)(DAT_000d1700 + 0x5e) == '\0') {\n    pbVar1 = *(byte **)(DAT_000d1700 + 100);\n    if (pbVar1 == (byte *)0x0) {\n      uVar4 = FUN_0009d65f();\n      return uVar4;\n    }\n    *(byte **)(DAT_000d1700 + 100) = pbVar1 + 1;\n    uVar4 = (uint)*pbVar1;\n    if (uVar4 == 0) {\n      free(*(void **)(iVar3 + 0x68));\n      *(undefined4 *)(iVar3 + 100) = 0;\n      *(undefined4 *)(iVar3 + 0x68) = 0;\n      uVar4 = FUN_0009d65f();\n      return uVar4;\n    }\n  }\n  else {\n    uVar4 = FUN_0009d65f();\n    iVar2 = *(int *)(iVar3 + 0x60);\n    if (0x7e < iVar2) {\n      FUN_0009c4e0("last_modifying_cmd overrun");\n      return uVar4;\n    }\n    *(int *)(iVar3 + 0x60) = iVar2 + 1;\n    *(char *)(iVar3 + 0x32c + iVar2) = (char)uVar4;\n  }\n  return uVar4;\n}\n\n" comment (function_definition "uint FUN_0009d6cc(void)\n\n{\n  byte *pbVar1;\n  int iVar2;\n  int iVar3;\n  uint uVar4;\n  \n  iVar3 = DAT_000d1700;\n  if (*(char *)(DAT_000d1700 + 0x5e) == '\0') {\n    pbVar1 = *(byte **)(DAT_000d1700 + 100);\n    if (pbVar1 == (byte *)0x0) {\n      uVar4 = FUN_0009d65f();\n      return uVar4;\n    }\n    *(byte **)(DAT_000d1700 + 100) = pbVar1 + 1;\n    uVar4 = (uint)*pbVar1;\n    if (uVar4 == 0) {\n      free(*(void **)(iVar3 + 0x68));\n      *(undefined4 *)(iVar3 + 100) = 0;\n      *(undefined4 *)(iVar3 + 0x68) = 0;\n      uVar4 = FUN_0009d65f();\n      return uVar4;\n    }\n  }\n  else {\n    uVar4 = FUN_0009d65f();\n    iVar2 = *(int *)(iVar3 + 0x60);\n    if (0x7e < iVar2) {\n      FUN_0009c4e0("last_modifying_cmd overrun");\n      return uVar4;\n    }\n    *(int *)(iVar3 + 0x60) = iVar2 + 1;\n    *(char *)(iVar3 + 0x32c + iVar2) = (char)uVar4;\n  }\n  return uVar4;\n}" type_identifier (function_declarator "FUN_0009d6cc(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  byte *pbVar1;\n  int iVar2;\n  int iVar3;\n  uint uVar4;\n  \n  iVar3 = DAT_000d1700;\n  if (*(char *)(DAT_000d1700 + 0x5e) == '\0') {\n    pbVar1 = *(byte **)(DAT_000d1700 + 100);\n    if (pbVar1 == (byte *)0x0) {\n      uVar4 = FUN_0009d65f();\n      return uVar4;\n    }\n    *(byte **)(DAT_000d1700 + 100) = pbVar1 + 1;\n    uVar4 = (uint)*pbVar1;\n    if (uVar4 == 0) {\n      free(*(void **)(iVar3 + 0x68));\n      *(undefined4 *)(iVar3 + 100) = 0;\n      *(undefined4 *)(iVar3 + 0x68) = 0;\n      uVar4 = FUN_0009d65f();\n      return uVar4;\n    }\n  }\n  else {\n    uVar4 = FUN_0009d65f();\n    iVar2 = *(int *)(iVar3 + 0x60);\n    if (0x7e < iVar2) {\n      FUN_0009c4e0("last_modifying_cmd overrun");\n      return uVar4;\n    }\n    *(int *)(iVar3 + 0x60) = iVar2 + 1;\n    *(char *)(iVar3 + 0x32c + iVar2) = (char)uVar4;\n  }\n  return uVar4;\n}" { (declaration "byte *pbVar1;" type_identifier (pointer_declarator "*pbVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (expression_statement "iVar3 = DAT_000d1700;" (assignment_expression "iVar3 = DAT_000d1700" identifier = identifier) ;) (if_statement "if (*(char *)(DAT_000d1700 + 0x5e) == '\0') {\n    pbVar1 = *(byte **)(DAT_000d1700 + 100);\n    if (pbVar1 == (byte *)0x0) {\n      uVar4 = FUN_0009d65f();\n      return uVar4;\n    }\n    *(byte **)(DAT_000d1700 + 100) = pbVar1 + 1;\n    uVar4 = (uint)*pbVar1;\n    if (uVar4 == 0) {\n      free(*(void **)(iVar3 + 0x68));\n      *(undefined4 *)(iVar3 + 100) = 0;\n      *(undefined4 *)(iVar3 + 0x68) = 0;\n      uVar4 = FUN_0009d65f();\n      return uVar4;\n    }\n  }\n  else {\n    uVar4 = FUN_0009d65f();\n    iVar2 = *(int *)(iVar3 + 0x60);\n    if (0x7e < iVar2) {\n      FUN_0009c4e0("last_modifying_cmd overrun");\n      return uVar4;\n    }\n    *(int *)(iVar3 + 0x60) = iVar2 + 1;\n    *(char *)(iVar3 + 0x32c + iVar2) = (char)uVar4;\n  }" if (parenthesized_expression "(*(char *)(DAT_000d1700 + 0x5e) == '\0')" ( (binary_expression "*(char *)(DAT_000d1700 + 0x5e) == '\0'" (pointer_expression "*(char *)(DAT_000d1700 + 0x5e)" * (cast_expression "(char *)(DAT_000d1700 + 0x5e)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(DAT_000d1700 + 0x5e)" ( (binary_expression "DAT_000d1700 + 0x5e" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    pbVar1 = *(byte **)(DAT_000d1700 + 100);\n    if (pbVar1 == (byte *)0x0) {\n      uVar4 = FUN_0009d65f();\n      return uVar4;\n    }\n    *(byte **)(DAT_000d1700 + 100) = pbVar1 + 1;\n    uVar4 = (uint)*pbVar1;\n    if (uVar4 == 0) {\n      free(*(void **)(iVar3 + 0x68));\n      *(undefined4 *)(iVar3 + 100) = 0;\n      *(undefined4 *)(iVar3 + 0x68) = 0;\n      uVar4 = FUN_0009d65f();\n      return uVar4;\n    }\n  }" { (expression_statement "pbVar1 = *(byte **)(DAT_000d1700 + 100);" (assignment_expression "pbVar1 = *(byte **)(DAT_000d1700 + 100)" identifier = (pointer_expression "*(byte **)(DAT_000d1700 + 100)" * (cast_expression "(byte **)(DAT_000d1700 + 100)" ( (type_descriptor "byte **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(DAT_000d1700 + 100)" ( (binary_expression "DAT_000d1700 + 100" identifier + number_literal) ))))) ;) (if_statement "if (pbVar1 == (byte *)0x0) {\n      uVar4 = FUN_0009d65f();\n      return uVar4;\n    }" if (parenthesized_expression "(pbVar1 == (byte *)0x0)" ( (binary_expression "pbVar1 == (byte *)0x0" identifier == (cast_expression "(byte *)0x0" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      uVar4 = FUN_0009d65f();\n      return uVar4;\n    }" { (expression_statement "uVar4 = FUN_0009d65f();" (assignment_expression "uVar4 = FUN_0009d65f()" identifier = (call_expression "FUN_0009d65f()" identifier (argument_list "()" ( )))) ;) (return_statement "return uVar4;" return identifier ;) })) (expression_statement "*(byte **)(DAT_000d1700 + 100) = pbVar1 + 1;" (assignment_expression "*(byte **)(DAT_000d1700 + 100) = pbVar1 + 1" (pointer_expression "*(byte **)(DAT_000d1700 + 100)" * (cast_expression "(byte **)(DAT_000d1700 + 100)" ( (type_descriptor "byte **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(DAT_000d1700 + 100)" ( (binary_expression "DAT_000d1700 + 100" identifier + number_literal) )))) = (binary_expression "pbVar1 + 1" identifier + number_literal)) ;) (expression_statement "uVar4 = (uint)*pbVar1;" (assignment_expression "uVar4 = (uint)*pbVar1" identifier = (binary_expression "(uint)*pbVar1" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (if_statement "if (uVar4 == 0) {\n      free(*(void **)(iVar3 + 0x68));\n      *(undefined4 *)(iVar3 + 100) = 0;\n      *(undefined4 *)(iVar3 + 0x68) = 0;\n      uVar4 = FUN_0009d65f();\n      return uVar4;\n    }" if (parenthesized_expression "(uVar4 == 0)" ( (binary_expression "uVar4 == 0" identifier == number_literal) )) (compound_statement "{\n      free(*(void **)(iVar3 + 0x68));\n      *(undefined4 *)(iVar3 + 100) = 0;\n      *(undefined4 *)(iVar3 + 0x68) = 0;\n      uVar4 = FUN_0009d65f();\n      return uVar4;\n    }" { (expression_statement "free(*(void **)(iVar3 + 0x68));" (call_expression "free(*(void **)(iVar3 + 0x68))" identifier (argument_list "(*(void **)(iVar3 + 0x68))" ( (pointer_expression "*(void **)(iVar3 + 0x68)" * (cast_expression "(void **)(iVar3 + 0x68)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar3 + 0x68)" ( (binary_expression "iVar3 + 0x68" identifier + number_literal) )))) ))) ;) (expression_statement "*(undefined4 *)(iVar3 + 100) = 0;" (assignment_expression "*(undefined4 *)(iVar3 + 100) = 0" (pointer_expression "*(undefined4 *)(iVar3 + 100)" * (cast_expression "(undefined4 *)(iVar3 + 100)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 100)" ( (binary_expression "iVar3 + 100" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(iVar3 + 0x68) = 0;" (assignment_expression "*(undefined4 *)(iVar3 + 0x68) = 0" (pointer_expression "*(undefined4 *)(iVar3 + 0x68)" * (cast_expression "(undefined4 *)(iVar3 + 0x68)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x68)" ( (binary_expression "iVar3 + 0x68" identifier + number_literal) )))) = number_literal) ;) (expression_statement "uVar4 = FUN_0009d65f();" (assignment_expression "uVar4 = FUN_0009d65f()" identifier = (call_expression "FUN_0009d65f()" identifier (argument_list "()" ( )))) ;) (return_statement "return uVar4;" return identifier ;) })) }) (else_clause "else {\n    uVar4 = FUN_0009d65f();\n    iVar2 = *(int *)(iVar3 + 0x60);\n    if (0x7e < iVar2) {\n      FUN_0009c4e0("last_modifying_cmd overrun");\n      return uVar4;\n    }\n    *(int *)(iVar3 + 0x60) = iVar2 + 1;\n    *(char *)(iVar3 + 0x32c + iVar2) = (char)uVar4;\n  }" else (compound_statement "{\n    uVar4 = FUN_0009d65f();\n    iVar2 = *(int *)(iVar3 + 0x60);\n    if (0x7e < iVar2) {\n      FUN_0009c4e0("last_modifying_cmd overrun");\n      return uVar4;\n    }\n    *(int *)(iVar3 + 0x60) = iVar2 + 1;\n    *(char *)(iVar3 + 0x32c + iVar2) = (char)uVar4;\n  }" { (expression_statement "uVar4 = FUN_0009d65f();" (assignment_expression "uVar4 = FUN_0009d65f()" identifier = (call_expression "FUN_0009d65f()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar2 = *(int *)(iVar3 + 0x60);" (assignment_expression "iVar2 = *(int *)(iVar3 + 0x60)" identifier = (pointer_expression "*(int *)(iVar3 + 0x60)" * (cast_expression "(int *)(iVar3 + 0x60)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x60)" ( (binary_expression "iVar3 + 0x60" identifier + number_literal) ))))) ;) (if_statement "if (0x7e < iVar2) {\n      FUN_0009c4e0("last_modifying_cmd overrun");\n      return uVar4;\n    }" if (parenthesized_expression "(0x7e < iVar2)" ( (binary_expression "0x7e < iVar2" number_literal < identifier) )) (compound_statement "{\n      FUN_0009c4e0("last_modifying_cmd overrun");\n      return uVar4;\n    }" { (expression_statement "FUN_0009c4e0("last_modifying_cmd overrun");" (call_expression "FUN_0009c4e0("last_modifying_cmd overrun")" identifier (argument_list "("last_modifying_cmd overrun")" ( (string_literal ""last_modifying_cmd overrun"" " string_content ") ))) ;) (return_statement "return uVar4;" return identifier ;) })) (expression_statement "*(int *)(iVar3 + 0x60) = iVar2 + 1;" (assignment_expression "*(int *)(iVar3 + 0x60) = iVar2 + 1" (pointer_expression "*(int *)(iVar3 + 0x60)" * (cast_expression "(int *)(iVar3 + 0x60)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x60)" ( (binary_expression "iVar3 + 0x60" identifier + number_literal) )))) = (binary_expression "iVar2 + 1" identifier + number_literal)) ;) (expression_statement "*(char *)(iVar3 + 0x32c + iVar2) = (char)uVar4;" (assignment_expression "*(char *)(iVar3 + 0x32c + iVar2) = (char)uVar4" (pointer_expression "*(char *)(iVar3 + 0x32c + iVar2)" * (cast_expression "(char *)(iVar3 + 0x32c + iVar2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x32c + iVar2)" ( (binary_expression "iVar3 + 0x32c + iVar2" (binary_expression "iVar3 + 0x32c" identifier + number_literal) + identifier) )))) = (cast_expression "(char)uVar4" ( (type_descriptor "char" primitive_type) ) identifier)) ;) }))) (return_statement "return uVar4;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nint get_one_char(void)\n\n{\n}\n\n" comment comment (function_definition "int get_one_char(void)\n\n{\n}" primitive_type (function_declarator "get_one_char(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n}" { })))
(translation_unit "uint FUN_0009d6cc(void)\n\n{\n  byte *pbVar1;\n  int iVar2;\n  int iVar3;\n  uint uVar4;\n  \n  iVar3 = DAT_000d1700;\n  if (*(char *)(DAT_000d1700 + 0x5e) == '\0') {\n    pbVar1 = *(byte **)(DAT_000d1700 + 100);\n    if (pbVar1 == (byte *)0x0) {\n      uVar4 = FUN_0009d65f();\n      return uVar4;\n    }\n    *(byte **)(DAT_000d1700 + 100) = pbVar1 + 1;\n    uVar4 = (uint)*pbVar1;\n    if (uVar4 == 0) {\n      free(*(void **)(iVar3 + 0x68));\n      *(undefined4 *)(iVar3 + 100) = 0;\n      *(undefined4 *)(iVar3 + 0x68) = 0;\n      uVar4 = FUN_0009d65f();\n      return uVar4;\n    }\n  }\n  else {\n    uVar4 = FUN_0009d65f();\n    iVar2 = *(int *)(iVar3 + 0x60);\n    if (0x7e < iVar2) {\n      FUN_0009c4e0("last_modifying_cmd overrun");\n      return uVar4;\n    }\n    *(int *)(iVar3 + 0x60) = iVar2 + 1;\n    *(char *)(iVar3 + 0x32c + iVar2) = (char)uVar4;\n  }\n  return uVar4;\n}\n\n" (function_definition "uint FUN_0009d6cc(void)\n\n{\n  byte *pbVar1;\n  int iVar2;\n  int iVar3;\n  uint uVar4;\n  \n  iVar3 = DAT_000d1700;\n  if (*(char *)(DAT_000d1700 + 0x5e) == '\0') {\n    pbVar1 = *(byte **)(DAT_000d1700 + 100);\n    if (pbVar1 == (byte *)0x0) {\n      uVar4 = FUN_0009d65f();\n      return uVar4;\n    }\n    *(byte **)(DAT_000d1700 + 100) = pbVar1 + 1;\n    uVar4 = (uint)*pbVar1;\n    if (uVar4 == 0) {\n      free(*(void **)(iVar3 + 0x68));\n      *(undefined4 *)(iVar3 + 100) = 0;\n      *(undefined4 *)(iVar3 + 0x68) = 0;\n      uVar4 = FUN_0009d65f();\n      return uVar4;\n    }\n  }\n  else {\n    uVar4 = FUN_0009d65f();\n    iVar2 = *(int *)(iVar3 + 0x60);\n    if (0x7e < iVar2) {\n      FUN_0009c4e0("last_modifying_cmd overrun");\n      return uVar4;\n    }\n    *(int *)(iVar3 + 0x60) = iVar2 + 1;\n    *(char *)(iVar3 + 0x32c + iVar2) = (char)uVar4;\n  }\n  return uVar4;\n}" type_identifier (function_declarator "FUN_0009d6cc(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  byte *pbVar1;\n  int iVar2;\n  int iVar3;\n  uint uVar4;\n  \n  iVar3 = DAT_000d1700;\n  if (*(char *)(DAT_000d1700 + 0x5e) == '\0') {\n    pbVar1 = *(byte **)(DAT_000d1700 + 100);\n    if (pbVar1 == (byte *)0x0) {\n      uVar4 = FUN_0009d65f();\n      return uVar4;\n    }\n    *(byte **)(DAT_000d1700 + 100) = pbVar1 + 1;\n    uVar4 = (uint)*pbVar1;\n    if (uVar4 == 0) {\n      free(*(void **)(iVar3 + 0x68));\n      *(undefined4 *)(iVar3 + 100) = 0;\n      *(undefined4 *)(iVar3 + 0x68) = 0;\n      uVar4 = FUN_0009d65f();\n      return uVar4;\n    }\n  }\n  else {\n    uVar4 = FUN_0009d65f();\n    iVar2 = *(int *)(iVar3 + 0x60);\n    if (0x7e < iVar2) {\n      FUN_0009c4e0("last_modifying_cmd overrun");\n      return uVar4;\n    }\n    *(int *)(iVar3 + 0x60) = iVar2 + 1;\n    *(char *)(iVar3 + 0x32c + iVar2) = (char)uVar4;\n  }\n  return uVar4;\n}" { (declaration "byte *pbVar1;" type_identifier (pointer_declarator "*pbVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (expression_statement "iVar3 = DAT_000d1700;" (assignment_expression "iVar3 = DAT_000d1700" identifier = identifier) ;) (if_statement "if (*(char *)(DAT_000d1700 + 0x5e) == '\0') {\n    pbVar1 = *(byte **)(DAT_000d1700 + 100);\n    if (pbVar1 == (byte *)0x0) {\n      uVar4 = FUN_0009d65f();\n      return uVar4;\n    }\n    *(byte **)(DAT_000d1700 + 100) = pbVar1 + 1;\n    uVar4 = (uint)*pbVar1;\n    if (uVar4 == 0) {\n      free(*(void **)(iVar3 + 0x68));\n      *(undefined4 *)(iVar3 + 100) = 0;\n      *(undefined4 *)(iVar3 + 0x68) = 0;\n      uVar4 = FUN_0009d65f();\n      return uVar4;\n    }\n  }\n  else {\n    uVar4 = FUN_0009d65f();\n    iVar2 = *(int *)(iVar3 + 0x60);\n    if (0x7e < iVar2) {\n      FUN_0009c4e0("last_modifying_cmd overrun");\n      return uVar4;\n    }\n    *(int *)(iVar3 + 0x60) = iVar2 + 1;\n    *(char *)(iVar3 + 0x32c + iVar2) = (char)uVar4;\n  }" if (parenthesized_expression "(*(char *)(DAT_000d1700 + 0x5e) == '\0')" ( (binary_expression "*(char *)(DAT_000d1700 + 0x5e) == '\0'" (pointer_expression "*(char *)(DAT_000d1700 + 0x5e)" * (cast_expression "(char *)(DAT_000d1700 + 0x5e)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(DAT_000d1700 + 0x5e)" ( (binary_expression "DAT_000d1700 + 0x5e" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    pbVar1 = *(byte **)(DAT_000d1700 + 100);\n    if (pbVar1 == (byte *)0x0) {\n      uVar4 = FUN_0009d65f();\n      return uVar4;\n    }\n    *(byte **)(DAT_000d1700 + 100) = pbVar1 + 1;\n    uVar4 = (uint)*pbVar1;\n    if (uVar4 == 0) {\n      free(*(void **)(iVar3 + 0x68));\n      *(undefined4 *)(iVar3 + 100) = 0;\n      *(undefined4 *)(iVar3 + 0x68) = 0;\n      uVar4 = FUN_0009d65f();\n      return uVar4;\n    }\n  }" { (expression_statement "pbVar1 = *(byte **)(DAT_000d1700 + 100);" (assignment_expression "pbVar1 = *(byte **)(DAT_000d1700 + 100)" identifier = (pointer_expression "*(byte **)(DAT_000d1700 + 100)" * (cast_expression "(byte **)(DAT_000d1700 + 100)" ( (type_descriptor "byte **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(DAT_000d1700 + 100)" ( (binary_expression "DAT_000d1700 + 100" identifier + number_literal) ))))) ;) (if_statement "if (pbVar1 == (byte *)0x0) {\n      uVar4 = FUN_0009d65f();\n      return uVar4;\n    }" if (parenthesized_expression "(pbVar1 == (byte *)0x0)" ( (binary_expression "pbVar1 == (byte *)0x0" identifier == (cast_expression "(byte *)0x0" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      uVar4 = FUN_0009d65f();\n      return uVar4;\n    }" { (expression_statement "uVar4 = FUN_0009d65f();" (assignment_expression "uVar4 = FUN_0009d65f()" identifier = (call_expression "FUN_0009d65f()" identifier (argument_list "()" ( )))) ;) (return_statement "return uVar4;" return identifier ;) })) (expression_statement "*(byte **)(DAT_000d1700 + 100) = pbVar1 + 1;" (assignment_expression "*(byte **)(DAT_000d1700 + 100) = pbVar1 + 1" (pointer_expression "*(byte **)(DAT_000d1700 + 100)" * (cast_expression "(byte **)(DAT_000d1700 + 100)" ( (type_descriptor "byte **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(DAT_000d1700 + 100)" ( (binary_expression "DAT_000d1700 + 100" identifier + number_literal) )))) = (binary_expression "pbVar1 + 1" identifier + number_literal)) ;) (expression_statement "uVar4 = (uint)*pbVar1;" (assignment_expression "uVar4 = (uint)*pbVar1" identifier = (binary_expression "(uint)*pbVar1" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (if_statement "if (uVar4 == 0) {\n      free(*(void **)(iVar3 + 0x68));\n      *(undefined4 *)(iVar3 + 100) = 0;\n      *(undefined4 *)(iVar3 + 0x68) = 0;\n      uVar4 = FUN_0009d65f();\n      return uVar4;\n    }" if (parenthesized_expression "(uVar4 == 0)" ( (binary_expression "uVar4 == 0" identifier == number_literal) )) (compound_statement "{\n      free(*(void **)(iVar3 + 0x68));\n      *(undefined4 *)(iVar3 + 100) = 0;\n      *(undefined4 *)(iVar3 + 0x68) = 0;\n      uVar4 = FUN_0009d65f();\n      return uVar4;\n    }" { (expression_statement "free(*(void **)(iVar3 + 0x68));" (call_expression "free(*(void **)(iVar3 + 0x68))" identifier (argument_list "(*(void **)(iVar3 + 0x68))" ( (pointer_expression "*(void **)(iVar3 + 0x68)" * (cast_expression "(void **)(iVar3 + 0x68)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar3 + 0x68)" ( (binary_expression "iVar3 + 0x68" identifier + number_literal) )))) ))) ;) (expression_statement "*(undefined4 *)(iVar3 + 100) = 0;" (assignment_expression "*(undefined4 *)(iVar3 + 100) = 0" (pointer_expression "*(undefined4 *)(iVar3 + 100)" * (cast_expression "(undefined4 *)(iVar3 + 100)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 100)" ( (binary_expression "iVar3 + 100" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(iVar3 + 0x68) = 0;" (assignment_expression "*(undefined4 *)(iVar3 + 0x68) = 0" (pointer_expression "*(undefined4 *)(iVar3 + 0x68)" * (cast_expression "(undefined4 *)(iVar3 + 0x68)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x68)" ( (binary_expression "iVar3 + 0x68" identifier + number_literal) )))) = number_literal) ;) (expression_statement "uVar4 = FUN_0009d65f();" (assignment_expression "uVar4 = FUN_0009d65f()" identifier = (call_expression "FUN_0009d65f()" identifier (argument_list "()" ( )))) ;) (return_statement "return uVar4;" return identifier ;) })) }) (else_clause "else {\n    uVar4 = FUN_0009d65f();\n    iVar2 = *(int *)(iVar3 + 0x60);\n    if (0x7e < iVar2) {\n      FUN_0009c4e0("last_modifying_cmd overrun");\n      return uVar4;\n    }\n    *(int *)(iVar3 + 0x60) = iVar2 + 1;\n    *(char *)(iVar3 + 0x32c + iVar2) = (char)uVar4;\n  }" else (compound_statement "{\n    uVar4 = FUN_0009d65f();\n    iVar2 = *(int *)(iVar3 + 0x60);\n    if (0x7e < iVar2) {\n      FUN_0009c4e0("last_modifying_cmd overrun");\n      return uVar4;\n    }\n    *(int *)(iVar3 + 0x60) = iVar2 + 1;\n    *(char *)(iVar3 + 0x32c + iVar2) = (char)uVar4;\n  }" { (expression_statement "uVar4 = FUN_0009d65f();" (assignment_expression "uVar4 = FUN_0009d65f()" identifier = (call_expression "FUN_0009d65f()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar2 = *(int *)(iVar3 + 0x60);" (assignment_expression "iVar2 = *(int *)(iVar3 + 0x60)" identifier = (pointer_expression "*(int *)(iVar3 + 0x60)" * (cast_expression "(int *)(iVar3 + 0x60)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x60)" ( (binary_expression "iVar3 + 0x60" identifier + number_literal) ))))) ;) (if_statement "if (0x7e < iVar2) {\n      FUN_0009c4e0("last_modifying_cmd overrun");\n      return uVar4;\n    }" if (parenthesized_expression "(0x7e < iVar2)" ( (binary_expression "0x7e < iVar2" number_literal < identifier) )) (compound_statement "{\n      FUN_0009c4e0("last_modifying_cmd overrun");\n      return uVar4;\n    }" { (expression_statement "FUN_0009c4e0("last_modifying_cmd overrun");" (call_expression "FUN_0009c4e0("last_modifying_cmd overrun")" identifier (argument_list "("last_modifying_cmd overrun")" ( (string_literal ""last_modifying_cmd overrun"" " string_content ") ))) ;) (return_statement "return uVar4;" return identifier ;) })) (expression_statement "*(int *)(iVar3 + 0x60) = iVar2 + 1;" (assignment_expression "*(int *)(iVar3 + 0x60) = iVar2 + 1" (pointer_expression "*(int *)(iVar3 + 0x60)" * (cast_expression "(int *)(iVar3 + 0x60)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x60)" ( (binary_expression "iVar3 + 0x60" identifier + number_literal) )))) = (binary_expression "iVar2 + 1" identifier + number_literal)) ;) (expression_statement "*(char *)(iVar3 + 0x32c + iVar2) = (char)uVar4;" (assignment_expression "*(char *)(iVar3 + 0x32c + iVar2) = (char)uVar4" (pointer_expression "*(char *)(iVar3 + 0x32c + iVar2)" * (cast_expression "(char *)(iVar3 + 0x32c + iVar2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar3 + 0x32c + iVar2)" ( (binary_expression "iVar3 + 0x32c + iVar2" (binary_expression "iVar3 + 0x32c" identifier + number_literal) + identifier) )))) = (cast_expression "(char)uVar4" ( (type_descriptor "char" primitive_type) ) identifier)) ;) }))) (return_statement "return uVar4;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == (char_literal ' escape_sequence ')) )) (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) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (return_statement return IDENT ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( IDENT )) * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (return_statement return IDENT ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") ))) ;) (return_statement return IDENT ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + IDENT) )))) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) }))) (return_statement return IDENT ;) })))
(function_definition "uint FUN_0009d6cc(void)\n\n{\n  byte *pbVar1;\n  int iVar2;\n  int iVar3;\n  uint uVar4;\n  \n  iVar3 = DAT_000d1700;\n  if (*(char *)(DAT_000d1700 + 0x5e) == '\0') {\n    pbVar1 = *(byte **)(DAT_000d1700 + 100);\n    if (pbVar1 == (byte *)0x0) {\n      uVar4 = FUN_0009d65f();\n      return uVar4;\n    }\n    *(byte **)(DAT_000d1700 + 100) = pbVar1 + 1;\n    uVar4 = (uint)*pbVar1;\n    if (uVar4 == 0) {\n      free(*(void **)(iVar3 + 0x68));\n      *(undefined4 *)(iVar3 + 100) = 0;\n      *(undefined4 *)(iVar3 + 0x68) = 0;\n      uVar4 = FUN_0009d65f();\n      return uVar4;\n    }\n  }\n  else {\n    uVar4 = FUN_0009d65f();\n    iVar2 = *(int *)(iVar3 + 0x60);\n    if (0x7e < iVar2) {\n      FUN_0009c4e0("last_modifying_cmd overrun");\n      return uVar4;\n    }\n    *(int *)(iVar3 + 0x60) = iVar2 + 1;\n    *(char *)(iVar3 + 0x32c + iVar2) = (char)uVar4;\n  }\n  return uVar4;\n}" (type_identifier "uint") (function_declarator "FUN_0009d6cc(void)" (identifier "FUN_0009d6cc") (parameter_list "(void)" (( "(") (parameter_declaration "void" (primitive_type "void")) () ")"))) (compound_statement "{\n  byte *pbVar1;\n  int iVar2;\n  int iVar3;\n  uint uVar4;\n  \n  iVar3 = DAT_000d1700;\n  if (*(char *)(DAT_000d1700 + 0x5e) == '\0') {\n    pbVar1 = *(byte **)(DAT_000d1700 + 100);\n    if (pbVar1 == (byte *)0x0) {\n      uVar4 = FUN_0009d65f();\n      return uVar4;\n    }\n    *(byte **)(DAT_000d1700 + 100) = pbVar1 + 1;\n    uVar4 = (uint)*pbVar1;\n    if (uVar4 == 0) {\n      free(*(void **)(iVar3 + 0x68));\n      *(undefined4 *)(iVar3 + 100) = 0;\n      *(undefined4 *)(iVar3 + 0x68) = 0;\n      uVar4 = FUN_0009d65f();\n      return uVar4;\n    }\n  }\n  else {\n    uVar4 = FUN_0009d65f();\n    iVar2 = *(int *)(iVar3 + 0x60);\n    if (0x7e < iVar2) {\n      FUN_0009c4e0("last_modifying_cmd overrun");\n      return uVar4;\n    }\n    *(int *)(iVar3 + 0x60) = iVar2 + 1;\n    *(char *)(iVar3 + 0x32c + iVar2) = (char)uVar4;\n  }\n  return uVar4;\n}" ({ "{") (declaration "byte *pbVar1;" (type_identifier "byte") (pointer_declarator "*pbVar1" (* "*") (identifier "pbVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "uint uVar4;" (type_identifier "uint") (identifier "uVar4") (; ";")) (expression_statement "iVar3 = DAT_000d1700;" (assignment_expression "iVar3 = DAT_000d1700" (identifier "iVar3") (= "=") (identifier "DAT_000d1700")) (; ";")) (if_statement "if (*(char *)(DAT_000d1700 + 0x5e) == '\0') {\n    pbVar1 = *(byte **)(DAT_000d1700 + 100);\n    if (pbVar1 == (byte *)0x0) {\n      uVar4 = FUN_0009d65f();\n      return uVar4;\n    }\n    *(byte **)(DAT_000d1700 + 100) = pbVar1 + 1;\n    uVar4 = (uint)*pbVar1;\n    if (uVar4 == 0) {\n      free(*(void **)(iVar3 + 0x68));\n      *(undefined4 *)(iVar3 + 100) = 0;\n      *(undefined4 *)(iVar3 + 0x68) = 0;\n      uVar4 = FUN_0009d65f();\n      return uVar4;\n    }\n  }\n  else {\n    uVar4 = FUN_0009d65f();\n    iVar2 = *(int *)(iVar3 + 0x60);\n    if (0x7e < iVar2) {\n      FUN_0009c4e0("last_modifying_cmd overrun");\n      return uVar4;\n    }\n    *(int *)(iVar3 + 0x60) = iVar2 + 1;\n    *(char *)(iVar3 + 0x32c + iVar2) = (char)uVar4;\n  }" (if "if") (parenthesized_expression "(*(char *)(DAT_000d1700 + 0x5e) == '\0')" (( "(") (binary_expression "*(char *)(DAT_000d1700 + 0x5e) == '\0'" (pointer_expression "*(char *)(DAT_000d1700 + 0x5e)" (* "*") (cast_expression "(char *)(DAT_000d1700 + 0x5e)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(DAT_000d1700 + 0x5e)" (( "(") (binary_expression "DAT_000d1700 + 0x5e" (identifier "DAT_000d1700") (+ "+") (number_literal "0x5e")) () ")")))) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    pbVar1 = *(byte **)(DAT_000d1700 + 100);\n    if (pbVar1 == (byte *)0x0) {\n      uVar4 = FUN_0009d65f();\n      return uVar4;\n    }\n    *(byte **)(DAT_000d1700 + 100) = pbVar1 + 1;\n    uVar4 = (uint)*pbVar1;\n    if (uVar4 == 0) {\n      free(*(void **)(iVar3 + 0x68));\n      *(undefined4 *)(iVar3 + 100) = 0;\n      *(undefined4 *)(iVar3 + 0x68) = 0;\n      uVar4 = FUN_0009d65f();\n      return uVar4;\n    }\n  }" ({ "{") (expression_statement "pbVar1 = *(byte **)(DAT_000d1700 + 100);" (assignment_expression "pbVar1 = *(byte **)(DAT_000d1700 + 100)" (identifier "pbVar1") (= "=") (pointer_expression "*(byte **)(DAT_000d1700 + 100)" (* "*") (cast_expression "(byte **)(DAT_000d1700 + 100)" (( "(") (type_descriptor "byte **" (type_identifier "byte") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(DAT_000d1700 + 100)" (( "(") (binary_expression "DAT_000d1700 + 100" (identifier "DAT_000d1700") (+ "+") (number_literal "100")) () ")"))))) (; ";")) (if_statement "if (pbVar1 == (byte *)0x0) {\n      uVar4 = FUN_0009d65f();\n      return uVar4;\n    }" (if "if") (parenthesized_expression "(pbVar1 == (byte *)0x0)" (( "(") (binary_expression "pbVar1 == (byte *)0x0" (identifier "pbVar1") (== "==") (cast_expression "(byte *)0x0" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      uVar4 = FUN_0009d65f();\n      return uVar4;\n    }" ({ "{") (expression_statement "uVar4 = FUN_0009d65f();" (assignment_expression "uVar4 = FUN_0009d65f()" (identifier "uVar4") (= "=") (call_expression "FUN_0009d65f()" (identifier "FUN_0009d65f") (argument_list "()" (( "(") () ")")))) (; ";")) (return_statement "return uVar4;" (return "return") (identifier "uVar4") (; ";")) (} "}"))) (expression_statement "*(byte **)(DAT_000d1700 + 100) = pbVar1 + 1;" (assignment_expression "*(byte **)(DAT_000d1700 + 100) = pbVar1 + 1" (pointer_expression "*(byte **)(DAT_000d1700 + 100)" (* "*") (cast_expression "(byte **)(DAT_000d1700 + 100)" (( "(") (type_descriptor "byte **" (type_identifier "byte") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(DAT_000d1700 + 100)" (( "(") (binary_expression "DAT_000d1700 + 100" (identifier "DAT_000d1700") (+ "+") (number_literal "100")) () ")")))) (= "=") (binary_expression "pbVar1 + 1" (identifier "pbVar1") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "uVar4 = (uint)*pbVar1;" (assignment_expression "uVar4 = (uint)*pbVar1" (identifier "uVar4") (= "=") (binary_expression "(uint)*pbVar1" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (identifier "pbVar1"))) (; ";")) (if_statement "if (uVar4 == 0) {\n      free(*(void **)(iVar3 + 0x68));\n      *(undefined4 *)(iVar3 + 100) = 0;\n      *(undefined4 *)(iVar3 + 0x68) = 0;\n      uVar4 = FUN_0009d65f();\n      return uVar4;\n    }" (if "if") (parenthesized_expression "(uVar4 == 0)" (( "(") (binary_expression "uVar4 == 0" (identifier "uVar4") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      free(*(void **)(iVar3 + 0x68));\n      *(undefined4 *)(iVar3 + 100) = 0;\n      *(undefined4 *)(iVar3 + 0x68) = 0;\n      uVar4 = FUN_0009d65f();\n      return uVar4;\n    }" ({ "{") (expression_statement "free(*(void **)(iVar3 + 0x68));" (call_expression "free(*(void **)(iVar3 + 0x68))" (identifier "free") (argument_list "(*(void **)(iVar3 + 0x68))" (( "(") (pointer_expression "*(void **)(iVar3 + 0x68)" (* "*") (cast_expression "(void **)(iVar3 + 0x68)" (( "(") (type_descriptor "void **" (primitive_type "void") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(iVar3 + 0x68)" (( "(") (binary_expression "iVar3 + 0x68" (identifier "iVar3") (+ "+") (number_literal "0x68")) () ")")))) () ")"))) (; ";")) (expression_statement "*(undefined4 *)(iVar3 + 100) = 0;" (assignment_expression "*(undefined4 *)(iVar3 + 100) = 0" (pointer_expression "*(undefined4 *)(iVar3 + 100)" (* "*") (cast_expression "(undefined4 *)(iVar3 + 100)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 100)" (( "(") (binary_expression "iVar3 + 100" (identifier "iVar3") (+ "+") (number_literal "100")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined4 *)(iVar3 + 0x68) = 0;" (assignment_expression "*(undefined4 *)(iVar3 + 0x68) = 0" (pointer_expression "*(undefined4 *)(iVar3 + 0x68)" (* "*") (cast_expression "(undefined4 *)(iVar3 + 0x68)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0x68)" (( "(") (binary_expression "iVar3 + 0x68" (identifier "iVar3") (+ "+") (number_literal "0x68")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar4 = FUN_0009d65f();" (assignment_expression "uVar4 = FUN_0009d65f()" (identifier "uVar4") (= "=") (call_expression "FUN_0009d65f()" (identifier "FUN_0009d65f") (argument_list "()" (( "(") () ")")))) (; ";")) (return_statement "return uVar4;" (return "return") (identifier "uVar4") (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    uVar4 = FUN_0009d65f();\n    iVar2 = *(int *)(iVar3 + 0x60);\n    if (0x7e < iVar2) {\n      FUN_0009c4e0("last_modifying_cmd overrun");\n      return uVar4;\n    }\n    *(int *)(iVar3 + 0x60) = iVar2 + 1;\n    *(char *)(iVar3 + 0x32c + iVar2) = (char)uVar4;\n  }" (else "else") (compound_statement "{\n    uVar4 = FUN_0009d65f();\n    iVar2 = *(int *)(iVar3 + 0x60);\n    if (0x7e < iVar2) {\n      FUN_0009c4e0("last_modifying_cmd overrun");\n      return uVar4;\n    }\n    *(int *)(iVar3 + 0x60) = iVar2 + 1;\n    *(char *)(iVar3 + 0x32c + iVar2) = (char)uVar4;\n  }" ({ "{") (expression_statement "uVar4 = FUN_0009d65f();" (assignment_expression "uVar4 = FUN_0009d65f()" (identifier "uVar4") (= "=") (call_expression "FUN_0009d65f()" (identifier "FUN_0009d65f") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "iVar2 = *(int *)(iVar3 + 0x60);" (assignment_expression "iVar2 = *(int *)(iVar3 + 0x60)" (identifier "iVar2") (= "=") (pointer_expression "*(int *)(iVar3 + 0x60)" (* "*") (cast_expression "(int *)(iVar3 + 0x60)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0x60)" (( "(") (binary_expression "iVar3 + 0x60" (identifier "iVar3") (+ "+") (number_literal "0x60")) () ")"))))) (; ";")) (if_statement "if (0x7e < iVar2) {\n      FUN_0009c4e0("last_modifying_cmd overrun");\n      return uVar4;\n    }" (if "if") (parenthesized_expression "(0x7e < iVar2)" (( "(") (binary_expression "0x7e < iVar2" (number_literal "0x7e") (< "<") (identifier "iVar2")) () ")")) (compound_statement "{\n      FUN_0009c4e0("last_modifying_cmd overrun");\n      return uVar4;\n    }" ({ "{") (expression_statement "FUN_0009c4e0("last_modifying_cmd overrun");" (call_expression "FUN_0009c4e0("last_modifying_cmd overrun")" (identifier "FUN_0009c4e0") (argument_list "("last_modifying_cmd overrun")" (( "(") (string_literal ""last_modifying_cmd overrun"" (" """) (string_content "last_modifying_cmd overrun") (" """)) () ")"))) (; ";")) (return_statement "return uVar4;" (return "return") (identifier "uVar4") (; ";")) (} "}"))) (expression_statement "*(int *)(iVar3 + 0x60) = iVar2 + 1;" (assignment_expression "*(int *)(iVar3 + 0x60) = iVar2 + 1" (pointer_expression "*(int *)(iVar3 + 0x60)" (* "*") (cast_expression "(int *)(iVar3 + 0x60)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0x60)" (( "(") (binary_expression "iVar3 + 0x60" (identifier "iVar3") (+ "+") (number_literal "0x60")) () ")")))) (= "=") (binary_expression "iVar2 + 1" (identifier "iVar2") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "*(char *)(iVar3 + 0x32c + iVar2) = (char)uVar4;" (assignment_expression "*(char *)(iVar3 + 0x32c + iVar2) = (char)uVar4" (pointer_expression "*(char *)(iVar3 + 0x32c + iVar2)" (* "*") (cast_expression "(char *)(iVar3 + 0x32c + iVar2)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar3 + 0x32c + iVar2)" (( "(") (binary_expression "iVar3 + 0x32c + iVar2" (binary_expression "iVar3 + 0x32c" (identifier "iVar3") (+ "+") (number_literal "0x32c")) (+ "+") (identifier "iVar2")) () ")")))) (= "=") (cast_expression "(char)uVar4" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "uVar4"))) (; ";")) (} "}")))) (return_statement "return uVar4;" (return "return") (identifier "uVar4") (; ";")) (} "}")))

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

int function_1(void)

{
}


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

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

uint MASKED(void)

{
  byte *pbVar1;
  int iVar2;
  int iVar3;
  uint uVar4;
  
  iVar3 = DAT_000d1700;
  if (*(char *)(DAT_000d1700 + 0x5e) == '\0') {
    pbVar1 = *(byte **)(DAT_000d1700 + 100);
    if (pbVar1 == (byte *)0x0) {
      uVar4 = FUN_0009d65f();
      return uVar4;
    }
    *(byte **)(DAT_000d1700 + 100) = pbVar1 + 1;
    uVar4 = (uint)*pbVar1;
    if (uVar4 == 0) {
      free(*(void **)(iVar3 + 0x68));
      *(undefined4 *)(iVar3 + 100) = 0;
      *(undefined4 *)(iVar3 + 0x68) = 0;
      uVar4 = FUN_0009d65f();
      return uVar4;
    }
  }
  else {
    uVar4 = FUN_0009d65f();
    iVar2 = *(int *)(iVar3 + 0x60);
    if (0x7e < iVar2) {
      FUN_0009c4e0("last_modifying_cmd overrun");
      return uVar4;
    }
    *(int *)(iVar3 + 0x60) = iVar2 + 1;
    *(char *)(iVar3 + 0x32c + iVar2) = (char)uVar4;
  }
  return uVar4;
}

