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

int gmp_snprintf_format(gmp_snprintf_t *d,char *fmt,va_list orig_ap)

{
  size_t sVar1;
  undefined4 *puVar2;
  undefined4 *puVar3;
  undefined4 uVar4;
  int iVar5;
  int iVar6;
  int iVar7;
  
  sVar1 = d->size;
  iVar6 = 0x80;
  puVar2 = (undefined4 *)PTR___gmp_free_func_00098f80;
  puVar3 = (undefined4 *)PTR___gmp_allocate_func_00098d9c;
  if (1 < (int)sVar1) {
    iVar5 = sVar1 - 1;
    iVar6 = __vsnprintf_chk(d->buf,sVar1,1,0xffffffff,fmt,orig_ap);
    if (iVar6 == -1) {
      d->size = d->size - iVar5;
      d->buf = d->buf + iVar5;
      iVar6 = 0x80;
      puVar2 = (undefined4 *)PTR___gmp_free_func_00098f80;
      puVar3 = (undefined4 *)PTR___gmp_allocate_func_00098d9c;
      if (0x7f < iVar5) {
        iVar6 = iVar5;
      }
    }
    else {
      iVar7 = iVar5;
      if (iVar6 <= iVar5) {
        iVar7 = iVar6;
      }
      d->size = d->size - iVar7;
      d->buf = d->buf + iVar7;
      if (iVar6 != iVar5) {
        return iVar6;
      }
      iVar6 = 0x80;
      puVar2 = (undefined4 *)PTR___gmp_free_func_00098f80;
      puVar3 = (undefined4 *)PTR___gmp_allocate_func_00098d9c;
      if (0x7f < iVar5) {
        iVar6 = iVar5;
      }
    }
  }
  do {
    do {
      iVar6 = iVar6 * 2;
      uVar4 = (*(code *)*puVar3)(iVar6);
      iVar5 = __vsnprintf_chk(uVar4,iVar6,1,0xffffffff,fmt,orig_ap);
      (*(code *)*puVar2)(uVar4,iVar6);
    } while (iVar6 + -1 == iVar5);
  } while (iVar5 == -1);
  return iVar5;
}



int __regparm2
FUN_00077a20(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)

{
  undefined4 *puVar1;
  undefined4 *puVar2;
  undefined4 uVar3;
  int iVar4;
  int unaff_EBX;
  int iVar5;
  int iVar6;
  int *unaff_retaddr;
  
  iVar5 = 0x80;
  entry(param_2,0x77a2e);
  iVar4 = unaff_retaddr[1];
  if (1 < iVar4) {
    iVar6 = iVar4 + -1;
    iVar4 = __vsnprintf_chk(*unaff_retaddr,iVar4,1,0xffffffff,param_3,param_4);
    if (iVar4 == -1) {
      unaff_retaddr[1] = unaff_retaddr[1] - iVar6;
      *unaff_retaddr = *unaff_retaddr + iVar6;
      iVar5 = 0x80;
      if (0x7f < iVar6) {
        iVar5 = iVar6;
      }
    }
    else {
      iVar5 = iVar6;
      if (iVar4 <= iVar6) {
        iVar5 = iVar4;
      }
      unaff_retaddr[1] = unaff_retaddr[1] - iVar5;
      *unaff_retaddr = *unaff_retaddr + iVar5;
      if (iVar4 != iVar6) {
        return iVar4;
      }
      iVar5 = 0x80;
      if (0x7f < iVar6) {
        iVar5 = iVar6;
      }
    }
  }
  puVar1 = *(undefined4 **)(unaff_EBX + 0x2136e);
  puVar2 = *(undefined4 **)(unaff_EBX + 0x21552);
  do {
    do {
      iVar5 = iVar5 * 2;
      uVar3 = (*(code *)*puVar1)(iVar5);
      iVar4 = __vsnprintf_chk(uVar3,iVar5,1,0xffffffff,param_3,param_4);
      (*(code *)*puVar2)(uVar3,iVar5);
    } while (iVar5 + -1 == iVar4);
  } while (iVar4 == -1);
  return iVar4;
}


PUSH EBP
PUSH EDI
PUSH ESI
MOV ESI,0x80
PUSH EBX
CALL 0x0001c340
ADD EBX,0x215d2
SUB ESP,0x1c
MOV ECX,dword ptr [ESP + 0x30]
MOV EDI,dword ptr [ECX + 0x4]
CMP EDI,0x1
JG 0x00077ab0
MOV EAX,dword ptr [EBX + 0xfffffd9c]
MOV dword ptr [ESP + 0x8],EAX
MOV EAX,dword ptr [EBX + 0xffffff80]
MOV dword ptr [ESP + 0xc],EAX
LEA ESI,[ESI]
NOP
SUB ESP,0xc
ADD ESI,ESI
PUSH ESI
MOV EAX,dword ptr [ESP + 0x18]
CALL dword ptr [EAX]
MOV EDI,EAX
POP EAX
POP EDX
PUSH dword ptr [ESP + 0x40]
PUSH dword ptr [ESP + 0x40]
PUSH -0x1
PUSH 0x1
PUSH ESI
PUSH EDI
CALL 0x0001bbf0
ADD ESP,0x18
PUSH ESI
MOV EBP,EAX
PUSH EDI
MOV EAX,dword ptr [ESP + 0x1c]
CALL dword ptr [EAX]
LEA EAX,[ESI + -0x1]
ADD ESP,0x10
CMP EAX,EBP
JZ 0x00077a60
CMP EBP,-0x1
JZ 0x00077a60
ADD ESP,0x1c
MOV EAX,EBP
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x8
PUSH dword ptr [ESP + 0x40]
PUSH dword ptr [ESP + 0x40]
PUSH -0x1
PUSH 0x1
PUSH EDI
SUB EDI,0x1
PUSH dword ptr [ECX]
MOV dword ptr [ESP + 0x50],ECX
CALL 0x0001bbf0
ADD ESP,0x20
MOV ECX,dword ptr [ESP + 0x30]
CMP EAX,-0x1
MOV EBP,EAX
JZ 0x00077b00
CMP EAX,EDI
MOV EDX,EDI
CMOVLE EDX,EAX
SUB dword ptr [ECX + 0x4],EDX
ADD dword ptr [ECX],EDX
CMP EAX,EDI
JNZ 0x00077a9f
CMP EDI,0x80
MOV ESI,0x80
CMOVGE ESI,EDI
JMP 0x00077a43
SUB dword ptr [ECX + 0x4],EDI
MOV ESI,0x80
ADD dword ptr [ECX],EDI
CMP EDI,0x80
CMOVGE ESI,EDI
JMP 0x00077a43
(translation_unit "int __regparm2\nFUN_00077a20(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  undefined4 *puVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  int iVar4;\n  int unaff_EBX;\n  int iVar5;\n  int iVar6;\n  int *unaff_retaddr;\n  \n  iVar5 = 0x80;\n  entry(param_2,0x77a2e);\n  iVar4 = unaff_retaddr[1];\n  if (1 < iVar4) {\n    iVar6 = iVar4 + -1;\n    iVar4 = __vsnprintf_chk(*unaff_retaddr,iVar4,1,0xffffffff,param_3,param_4);\n    if (iVar4 == -1) {\n      unaff_retaddr[1] = unaff_retaddr[1] - iVar6;\n      *unaff_retaddr = *unaff_retaddr + iVar6;\n      iVar5 = 0x80;\n      if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }\n    }\n    else {\n      iVar5 = iVar6;\n      if (iVar4 <= iVar6) {\n        iVar5 = iVar4;\n      }\n      unaff_retaddr[1] = unaff_retaddr[1] - iVar5;\n      *unaff_retaddr = *unaff_retaddr + iVar5;\n      if (iVar4 != iVar6) {\n        return iVar4;\n      }\n      iVar5 = 0x80;\n      if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }\n    }\n  }\n  puVar1 = *(undefined4 **)(unaff_EBX + 0x2136e);\n  puVar2 = *(undefined4 **)(unaff_EBX + 0x21552);\n  do {\n    do {\n      iVar5 = iVar5 * 2;\n      uVar3 = (*(code *)*puVar1)(iVar5);\n      iVar4 = __vsnprintf_chk(uVar3,iVar5,1,0xffffffff,param_3,param_4);\n      (*(code *)*puVar2)(uVar3,iVar5);\n    } while (iVar5 + -1 == iVar4);\n  } while (iVar4 == -1);\n  return iVar4;\n}\n\n" (function_definition "int __regparm2\nFUN_00077a20(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  undefined4 *puVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  int iVar4;\n  int unaff_EBX;\n  int iVar5;\n  int iVar6;\n  int *unaff_retaddr;\n  \n  iVar5 = 0x80;\n  entry(param_2,0x77a2e);\n  iVar4 = unaff_retaddr[1];\n  if (1 < iVar4) {\n    iVar6 = iVar4 + -1;\n    iVar4 = __vsnprintf_chk(*unaff_retaddr,iVar4,1,0xffffffff,param_3,param_4);\n    if (iVar4 == -1) {\n      unaff_retaddr[1] = unaff_retaddr[1] - iVar6;\n      *unaff_retaddr = *unaff_retaddr + iVar6;\n      iVar5 = 0x80;\n      if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }\n    }\n    else {\n      iVar5 = iVar6;\n      if (iVar4 <= iVar6) {\n        iVar5 = iVar4;\n      }\n      unaff_retaddr[1] = unaff_retaddr[1] - iVar5;\n      *unaff_retaddr = *unaff_retaddr + iVar5;\n      if (iVar4 != iVar6) {\n        return iVar4;\n      }\n      iVar5 = 0x80;\n      if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }\n    }\n  }\n  puVar1 = *(undefined4 **)(unaff_EBX + 0x2136e);\n  puVar2 = *(undefined4 **)(unaff_EBX + 0x21552);\n  do {\n    do {\n      iVar5 = iVar5 * 2;\n      uVar3 = (*(code *)*puVar1)(iVar5);\n      iVar4 = __vsnprintf_chk(uVar3,iVar5,1,0xffffffff,param_3,param_4);\n      (*(code *)*puVar2)(uVar3,iVar5);\n    } while (iVar5 + -1 == iVar4);\n  } while (iVar4 == -1);\n  return iVar4;\n}" primitive_type (ERROR "__regparm2" identifier) (function_declarator "FUN_00077a20(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) ))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  int iVar4;\n  int unaff_EBX;\n  int iVar5;\n  int iVar6;\n  int *unaff_retaddr;\n  \n  iVar5 = 0x80;\n  entry(param_2,0x77a2e);\n  iVar4 = unaff_retaddr[1];\n  if (1 < iVar4) {\n    iVar6 = iVar4 + -1;\n    iVar4 = __vsnprintf_chk(*unaff_retaddr,iVar4,1,0xffffffff,param_3,param_4);\n    if (iVar4 == -1) {\n      unaff_retaddr[1] = unaff_retaddr[1] - iVar6;\n      *unaff_retaddr = *unaff_retaddr + iVar6;\n      iVar5 = 0x80;\n      if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }\n    }\n    else {\n      iVar5 = iVar6;\n      if (iVar4 <= iVar6) {\n        iVar5 = iVar4;\n      }\n      unaff_retaddr[1] = unaff_retaddr[1] - iVar5;\n      *unaff_retaddr = *unaff_retaddr + iVar5;\n      if (iVar4 != iVar6) {\n        return iVar4;\n      }\n      iVar5 = 0x80;\n      if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }\n    }\n  }\n  puVar1 = *(undefined4 **)(unaff_EBX + 0x2136e);\n  puVar2 = *(undefined4 **)(unaff_EBX + 0x21552);\n  do {\n    do {\n      iVar5 = iVar5 * 2;\n      uVar3 = (*(code *)*puVar1)(iVar5);\n      iVar4 = __vsnprintf_chk(uVar3,iVar5,1,0xffffffff,param_3,param_4);\n      (*(code *)*puVar2)(uVar3,iVar5);\n    } while (iVar5 + -1 == iVar4);\n  } while (iVar4 == -1);\n  return iVar4;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int unaff_EBX;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "int *unaff_retaddr;" primitive_type (pointer_declarator "*unaff_retaddr" * identifier) ;) (expression_statement "iVar5 = 0x80;" (assignment_expression "iVar5 = 0x80" identifier = number_literal) ;) (expression_statement "entry(param_2,0x77a2e);" (call_expression "entry(param_2,0x77a2e)" identifier (argument_list "(param_2,0x77a2e)" ( identifier , number_literal ))) ;) (expression_statement "iVar4 = unaff_retaddr[1];" (assignment_expression "iVar4 = unaff_retaddr[1]" identifier = (subscript_expression "unaff_retaddr[1]" identifier [ number_literal ])) ;) (if_statement "if (1 < iVar4) {\n    iVar6 = iVar4 + -1;\n    iVar4 = __vsnprintf_chk(*unaff_retaddr,iVar4,1,0xffffffff,param_3,param_4);\n    if (iVar4 == -1) {\n      unaff_retaddr[1] = unaff_retaddr[1] - iVar6;\n      *unaff_retaddr = *unaff_retaddr + iVar6;\n      iVar5 = 0x80;\n      if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }\n    }\n    else {\n      iVar5 = iVar6;\n      if (iVar4 <= iVar6) {\n        iVar5 = iVar4;\n      }\n      unaff_retaddr[1] = unaff_retaddr[1] - iVar5;\n      *unaff_retaddr = *unaff_retaddr + iVar5;\n      if (iVar4 != iVar6) {\n        return iVar4;\n      }\n      iVar5 = 0x80;\n      if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }\n    }\n  }" if (parenthesized_expression "(1 < iVar4)" ( (binary_expression "1 < iVar4" number_literal < identifier) )) (compound_statement "{\n    iVar6 = iVar4 + -1;\n    iVar4 = __vsnprintf_chk(*unaff_retaddr,iVar4,1,0xffffffff,param_3,param_4);\n    if (iVar4 == -1) {\n      unaff_retaddr[1] = unaff_retaddr[1] - iVar6;\n      *unaff_retaddr = *unaff_retaddr + iVar6;\n      iVar5 = 0x80;\n      if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }\n    }\n    else {\n      iVar5 = iVar6;\n      if (iVar4 <= iVar6) {\n        iVar5 = iVar4;\n      }\n      unaff_retaddr[1] = unaff_retaddr[1] - iVar5;\n      *unaff_retaddr = *unaff_retaddr + iVar5;\n      if (iVar4 != iVar6) {\n        return iVar4;\n      }\n      iVar5 = 0x80;\n      if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }\n    }\n  }" { (expression_statement "iVar6 = iVar4 + -1;" (assignment_expression "iVar6 = iVar4 + -1" identifier = (binary_expression "iVar4 + -1" identifier + number_literal)) ;) (expression_statement "iVar4 = __vsnprintf_chk(*unaff_retaddr,iVar4,1,0xffffffff,param_3,param_4);" (assignment_expression "iVar4 = __vsnprintf_chk(*unaff_retaddr,iVar4,1,0xffffffff,param_3,param_4)" identifier = (call_expression "__vsnprintf_chk(*unaff_retaddr,iVar4,1,0xffffffff,param_3,param_4)" identifier (argument_list "(*unaff_retaddr,iVar4,1,0xffffffff,param_3,param_4)" ( (pointer_expression "*unaff_retaddr" * identifier) , identifier , number_literal , number_literal , identifier , identifier )))) ;) (if_statement "if (iVar4 == -1) {\n      unaff_retaddr[1] = unaff_retaddr[1] - iVar6;\n      *unaff_retaddr = *unaff_retaddr + iVar6;\n      iVar5 = 0x80;\n      if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }\n    }\n    else {\n      iVar5 = iVar6;\n      if (iVar4 <= iVar6) {\n        iVar5 = iVar4;\n      }\n      unaff_retaddr[1] = unaff_retaddr[1] - iVar5;\n      *unaff_retaddr = *unaff_retaddr + iVar5;\n      if (iVar4 != iVar6) {\n        return iVar4;\n      }\n      iVar5 = 0x80;\n      if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }\n    }" if (parenthesized_expression "(iVar4 == -1)" ( (binary_expression "iVar4 == -1" identifier == number_literal) )) (compound_statement "{\n      unaff_retaddr[1] = unaff_retaddr[1] - iVar6;\n      *unaff_retaddr = *unaff_retaddr + iVar6;\n      iVar5 = 0x80;\n      if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }\n    }" { (expression_statement "unaff_retaddr[1] = unaff_retaddr[1] - iVar6;" (assignment_expression "unaff_retaddr[1] = unaff_retaddr[1] - iVar6" (subscript_expression "unaff_retaddr[1]" identifier [ number_literal ]) = (binary_expression "unaff_retaddr[1] - iVar6" (subscript_expression "unaff_retaddr[1]" identifier [ number_literal ]) - identifier)) ;) (expression_statement "*unaff_retaddr = *unaff_retaddr + iVar6;" (assignment_expression "*unaff_retaddr = *unaff_retaddr + iVar6" (pointer_expression "*unaff_retaddr" * identifier) = (binary_expression "*unaff_retaddr + iVar6" (pointer_expression "*unaff_retaddr" * identifier) + identifier)) ;) (expression_statement "iVar5 = 0x80;" (assignment_expression "iVar5 = 0x80" identifier = number_literal) ;) (if_statement "if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }" if (parenthesized_expression "(0x7f < iVar6)" ( (binary_expression "0x7f < iVar6" number_literal < identifier) )) (compound_statement "{\n        iVar5 = iVar6;\n      }" { (expression_statement "iVar5 = iVar6;" (assignment_expression "iVar5 = iVar6" identifier = identifier) ;) })) }) (else_clause "else {\n      iVar5 = iVar6;\n      if (iVar4 <= iVar6) {\n        iVar5 = iVar4;\n      }\n      unaff_retaddr[1] = unaff_retaddr[1] - iVar5;\n      *unaff_retaddr = *unaff_retaddr + iVar5;\n      if (iVar4 != iVar6) {\n        return iVar4;\n      }\n      iVar5 = 0x80;\n      if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }\n    }" else (compound_statement "{\n      iVar5 = iVar6;\n      if (iVar4 <= iVar6) {\n        iVar5 = iVar4;\n      }\n      unaff_retaddr[1] = unaff_retaddr[1] - iVar5;\n      *unaff_retaddr = *unaff_retaddr + iVar5;\n      if (iVar4 != iVar6) {\n        return iVar4;\n      }\n      iVar5 = 0x80;\n      if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }\n    }" { (expression_statement "iVar5 = iVar6;" (assignment_expression "iVar5 = iVar6" identifier = identifier) ;) (if_statement "if (iVar4 <= iVar6) {\n        iVar5 = iVar4;\n      }" if (parenthesized_expression "(iVar4 <= iVar6)" ( (binary_expression "iVar4 <= iVar6" identifier <= identifier) )) (compound_statement "{\n        iVar5 = iVar4;\n      }" { (expression_statement "iVar5 = iVar4;" (assignment_expression "iVar5 = iVar4" identifier = identifier) ;) })) (expression_statement "unaff_retaddr[1] = unaff_retaddr[1] - iVar5;" (assignment_expression "unaff_retaddr[1] = unaff_retaddr[1] - iVar5" (subscript_expression "unaff_retaddr[1]" identifier [ number_literal ]) = (binary_expression "unaff_retaddr[1] - iVar5" (subscript_expression "unaff_retaddr[1]" identifier [ number_literal ]) - identifier)) ;) (expression_statement "*unaff_retaddr = *unaff_retaddr + iVar5;" (assignment_expression "*unaff_retaddr = *unaff_retaddr + iVar5" (pointer_expression "*unaff_retaddr" * identifier) = (binary_expression "*unaff_retaddr + iVar5" (pointer_expression "*unaff_retaddr" * identifier) + identifier)) ;) (if_statement "if (iVar4 != iVar6) {\n        return iVar4;\n      }" if (parenthesized_expression "(iVar4 != iVar6)" ( (binary_expression "iVar4 != iVar6" identifier != identifier) )) (compound_statement "{\n        return iVar4;\n      }" { (return_statement "return iVar4;" return identifier ;) })) (expression_statement "iVar5 = 0x80;" (assignment_expression "iVar5 = 0x80" identifier = number_literal) ;) (if_statement "if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }" if (parenthesized_expression "(0x7f < iVar6)" ( (binary_expression "0x7f < iVar6" number_literal < identifier) )) (compound_statement "{\n        iVar5 = iVar6;\n      }" { (expression_statement "iVar5 = iVar6;" (assignment_expression "iVar5 = iVar6" identifier = identifier) ;) })) }))) })) (expression_statement "puVar1 = *(undefined4 **)(unaff_EBX + 0x2136e);" (assignment_expression "puVar1 = *(undefined4 **)(unaff_EBX + 0x2136e)" identifier = (pointer_expression "*(undefined4 **)(unaff_EBX + 0x2136e)" * (cast_expression "(undefined4 **)(unaff_EBX + 0x2136e)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(unaff_EBX + 0x2136e)" ( (binary_expression "unaff_EBX + 0x2136e" identifier + number_literal) ))))) ;) (expression_statement "puVar2 = *(undefined4 **)(unaff_EBX + 0x21552);" (assignment_expression "puVar2 = *(undefined4 **)(unaff_EBX + 0x21552)" identifier = (pointer_expression "*(undefined4 **)(unaff_EBX + 0x21552)" * (cast_expression "(undefined4 **)(unaff_EBX + 0x21552)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(unaff_EBX + 0x21552)" ( (binary_expression "unaff_EBX + 0x21552" identifier + number_literal) ))))) ;) (do_statement "do {\n    do {\n      iVar5 = iVar5 * 2;\n      uVar3 = (*(code *)*puVar1)(iVar5);\n      iVar4 = __vsnprintf_chk(uVar3,iVar5,1,0xffffffff,param_3,param_4);\n      (*(code *)*puVar2)(uVar3,iVar5);\n    } while (iVar5 + -1 == iVar4);\n  } while (iVar4 == -1);" do (compound_statement "{\n    do {\n      iVar5 = iVar5 * 2;\n      uVar3 = (*(code *)*puVar1)(iVar5);\n      iVar4 = __vsnprintf_chk(uVar3,iVar5,1,0xffffffff,param_3,param_4);\n      (*(code *)*puVar2)(uVar3,iVar5);\n    } while (iVar5 + -1 == iVar4);\n  }" { (do_statement "do {\n      iVar5 = iVar5 * 2;\n      uVar3 = (*(code *)*puVar1)(iVar5);\n      iVar4 = __vsnprintf_chk(uVar3,iVar5,1,0xffffffff,param_3,param_4);\n      (*(code *)*puVar2)(uVar3,iVar5);\n    } while (iVar5 + -1 == iVar4);" do (compound_statement "{\n      iVar5 = iVar5 * 2;\n      uVar3 = (*(code *)*puVar1)(iVar5);\n      iVar4 = __vsnprintf_chk(uVar3,iVar5,1,0xffffffff,param_3,param_4);\n      (*(code *)*puVar2)(uVar3,iVar5);\n    }" { (expression_statement "iVar5 = iVar5 * 2;" (assignment_expression "iVar5 = iVar5 * 2" identifier = (binary_expression "iVar5 * 2" identifier * number_literal)) ;) (expression_statement "uVar3 = (*(code *)*puVar1)(iVar5);" (assignment_expression "uVar3 = (*(code *)*puVar1)(iVar5)" identifier = (call_expression "(*(code *)*puVar1)(iVar5)" (parenthesized_expression "(*(code *)*puVar1)" ( (pointer_expression "*(code *)*puVar1" * (cast_expression "(code *)*puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar1" * identifier))) )) (argument_list "(iVar5)" ( identifier )))) ;) (expression_statement "iVar4 = __vsnprintf_chk(uVar3,iVar5,1,0xffffffff,param_3,param_4);" (assignment_expression "iVar4 = __vsnprintf_chk(uVar3,iVar5,1,0xffffffff,param_3,param_4)" identifier = (call_expression "__vsnprintf_chk(uVar3,iVar5,1,0xffffffff,param_3,param_4)" identifier (argument_list "(uVar3,iVar5,1,0xffffffff,param_3,param_4)" ( identifier , identifier , number_literal , number_literal , identifier , identifier )))) ;) (expression_statement "(*(code *)*puVar2)(uVar3,iVar5);" (call_expression "(*(code *)*puVar2)(uVar3,iVar5)" (parenthesized_expression "(*(code *)*puVar2)" ( (pointer_expression "*(code *)*puVar2" * (cast_expression "(code *)*puVar2" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar2" * identifier))) )) (argument_list "(uVar3,iVar5)" ( identifier , identifier ))) ;) }) while (parenthesized_expression "(iVar5 + -1 == iVar4)" ( (binary_expression "iVar5 + -1 == iVar4" (binary_expression "iVar5 + -1" identifier + number_literal) == identifier) )) ;) }) while (parenthesized_expression "(iVar4 == -1)" ( (binary_expression "iVar4 == -1" identifier == number_literal) )) ;) (return_statement "return iVar4;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint gmp_snprintf_format(gmp_snprintf_t *d,char *fmt,va_list orig_ap)\n\n{\n  size_t sVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  undefined4 uVar4;\n  int iVar5;\n  int iVar6;\n  int iVar7;\n  \n  sVar1 = d->size;\n  iVar6 = 0x80;\n  puVar2 = (undefined4 *)PTR___gmp_free_func_00098f80;\n  puVar3 = (undefined4 *)PTR___gmp_allocate_func_00098d9c;\n  if (1 < (int)sVar1) {\n    iVar5 = sVar1 - 1;\n    iVar6 = __vsnprintf_chk(d->buf,sVar1,1,0xffffffff,fmt,orig_ap);\n    if (iVar6 == -1) {\n      d->size = d->size - iVar5;\n      d->buf = d->buf + iVar5;\n      iVar6 = 0x80;\n      puVar2 = (undefined4 *)PTR___gmp_free_func_00098f80;\n      puVar3 = (undefined4 *)PTR___gmp_allocate_func_00098d9c;\n      if (0x7f < iVar5) {\n        iVar6 = iVar5;\n      }\n    }\n    else {\n      iVar7 = iVar5;\n      if (iVar6 <= iVar5) {\n        iVar7 = iVar6;\n      }\n      d->size = d->size - iVar7;\n      d->buf = d->buf + iVar7;\n      if (iVar6 != iVar5) {\n        return iVar6;\n      }\n      iVar6 = 0x80;\n      puVar2 = (undefined4 *)PTR___gmp_free_func_00098f80;\n      puVar3 = (undefined4 *)PTR___gmp_allocate_func_00098d9c;\n      if (0x7f < iVar5) {\n        iVar6 = iVar5;\n      }\n    }\n  }\n  do {\n    do {\n      iVar6 = iVar6 * 2;\n      uVar4 = (*(code *)*puVar3)(iVar6);\n      iVar5 = __vsnprintf_chk(uVar4,iVar6,1,0xffffffff,fmt,orig_ap);\n      (*(code *)*puVar2)(uVar4,iVar6);\n    } while (iVar6 + -1 == iVar5);\n  } while (iVar5 == -1);\n  return iVar5;\n}\n\n" comment (function_definition "int gmp_snprintf_format(gmp_snprintf_t *d,char *fmt,va_list orig_ap)\n\n{\n  size_t sVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  undefined4 uVar4;\n  int iVar5;\n  int iVar6;\n  int iVar7;\n  \n  sVar1 = d->size;\n  iVar6 = 0x80;\n  puVar2 = (undefined4 *)PTR___gmp_free_func_00098f80;\n  puVar3 = (undefined4 *)PTR___gmp_allocate_func_00098d9c;\n  if (1 < (int)sVar1) {\n    iVar5 = sVar1 - 1;\n    iVar6 = __vsnprintf_chk(d->buf,sVar1,1,0xffffffff,fmt,orig_ap);\n    if (iVar6 == -1) {\n      d->size = d->size - iVar5;\n      d->buf = d->buf + iVar5;\n      iVar6 = 0x80;\n      puVar2 = (undefined4 *)PTR___gmp_free_func_00098f80;\n      puVar3 = (undefined4 *)PTR___gmp_allocate_func_00098d9c;\n      if (0x7f < iVar5) {\n        iVar6 = iVar5;\n      }\n    }\n    else {\n      iVar7 = iVar5;\n      if (iVar6 <= iVar5) {\n        iVar7 = iVar6;\n      }\n      d->size = d->size - iVar7;\n      d->buf = d->buf + iVar7;\n      if (iVar6 != iVar5) {\n        return iVar6;\n      }\n      iVar6 = 0x80;\n      puVar2 = (undefined4 *)PTR___gmp_free_func_00098f80;\n      puVar3 = (undefined4 *)PTR___gmp_allocate_func_00098d9c;\n      if (0x7f < iVar5) {\n        iVar6 = iVar5;\n      }\n    }\n  }\n  do {\n    do {\n      iVar6 = iVar6 * 2;\n      uVar4 = (*(code *)*puVar3)(iVar6);\n      iVar5 = __vsnprintf_chk(uVar4,iVar6,1,0xffffffff,fmt,orig_ap);\n      (*(code *)*puVar2)(uVar4,iVar6);\n    } while (iVar6 + -1 == iVar5);\n  } while (iVar5 == -1);\n  return iVar5;\n}" primitive_type (function_declarator "gmp_snprintf_format(gmp_snprintf_t *d,char *fmt,va_list orig_ap)" identifier (parameter_list "(gmp_snprintf_t *d,char *fmt,va_list orig_ap)" ( (parameter_declaration "gmp_snprintf_t *d" type_identifier (pointer_declarator "*d" * identifier)) , (parameter_declaration "char *fmt" primitive_type (pointer_declarator "*fmt" * identifier)) , (parameter_declaration "va_list orig_ap" type_identifier identifier) ))) (compound_statement "{\n  size_t sVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  undefined4 uVar4;\n  int iVar5;\n  int iVar6;\n  int iVar7;\n  \n  sVar1 = d->size;\n  iVar6 = 0x80;\n  puVar2 = (undefined4 *)PTR___gmp_free_func_00098f80;\n  puVar3 = (undefined4 *)PTR___gmp_allocate_func_00098d9c;\n  if (1 < (int)sVar1) {\n    iVar5 = sVar1 - 1;\n    iVar6 = __vsnprintf_chk(d->buf,sVar1,1,0xffffffff,fmt,orig_ap);\n    if (iVar6 == -1) {\n      d->size = d->size - iVar5;\n      d->buf = d->buf + iVar5;\n      iVar6 = 0x80;\n      puVar2 = (undefined4 *)PTR___gmp_free_func_00098f80;\n      puVar3 = (undefined4 *)PTR___gmp_allocate_func_00098d9c;\n      if (0x7f < iVar5) {\n        iVar6 = iVar5;\n      }\n    }\n    else {\n      iVar7 = iVar5;\n      if (iVar6 <= iVar5) {\n        iVar7 = iVar6;\n      }\n      d->size = d->size - iVar7;\n      d->buf = d->buf + iVar7;\n      if (iVar6 != iVar5) {\n        return iVar6;\n      }\n      iVar6 = 0x80;\n      puVar2 = (undefined4 *)PTR___gmp_free_func_00098f80;\n      puVar3 = (undefined4 *)PTR___gmp_allocate_func_00098d9c;\n      if (0x7f < iVar5) {\n        iVar6 = iVar5;\n      }\n    }\n  }\n  do {\n    do {\n      iVar6 = iVar6 * 2;\n      uVar4 = (*(code *)*puVar3)(iVar6);\n      iVar5 = __vsnprintf_chk(uVar4,iVar6,1,0xffffffff,fmt,orig_ap);\n      (*(code *)*puVar2)(uVar4,iVar6);\n    } while (iVar6 + -1 == iVar5);\n  } while (iVar5 == -1);\n  return iVar5;\n}" { (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "int iVar7;" primitive_type identifier ;) (expression_statement "sVar1 = d->size;" (assignment_expression "sVar1 = d->size" identifier = (field_expression "d->size" identifier -> field_identifier)) ;) (expression_statement "iVar6 = 0x80;" (assignment_expression "iVar6 = 0x80" identifier = number_literal) ;) (expression_statement "puVar2 = (undefined4 *)PTR___gmp_free_func_00098f80;" (assignment_expression "puVar2 = (undefined4 *)PTR___gmp_free_func_00098f80" identifier = (cast_expression "(undefined4 *)PTR___gmp_free_func_00098f80" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "puVar3 = (undefined4 *)PTR___gmp_allocate_func_00098d9c;" (assignment_expression "puVar3 = (undefined4 *)PTR___gmp_allocate_func_00098d9c" identifier = (cast_expression "(undefined4 *)PTR___gmp_allocate_func_00098d9c" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (if_statement "if (1 < (int)sVar1) {\n    iVar5 = sVar1 - 1;\n    iVar6 = __vsnprintf_chk(d->buf,sVar1,1,0xffffffff,fmt,orig_ap);\n    if (iVar6 == -1) {\n      d->size = d->size - iVar5;\n      d->buf = d->buf + iVar5;\n      iVar6 = 0x80;\n      puVar2 = (undefined4 *)PTR___gmp_free_func_00098f80;\n      puVar3 = (undefined4 *)PTR___gmp_allocate_func_00098d9c;\n      if (0x7f < iVar5) {\n        iVar6 = iVar5;\n      }\n    }\n    else {\n      iVar7 = iVar5;\n      if (iVar6 <= iVar5) {\n        iVar7 = iVar6;\n      }\n      d->size = d->size - iVar7;\n      d->buf = d->buf + iVar7;\n      if (iVar6 != iVar5) {\n        return iVar6;\n      }\n      iVar6 = 0x80;\n      puVar2 = (undefined4 *)PTR___gmp_free_func_00098f80;\n      puVar3 = (undefined4 *)PTR___gmp_allocate_func_00098d9c;\n      if (0x7f < iVar5) {\n        iVar6 = iVar5;\n      }\n    }\n  }" if (parenthesized_expression "(1 < (int)sVar1)" ( (binary_expression "1 < (int)sVar1" number_literal < (cast_expression "(int)sVar1" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n    iVar5 = sVar1 - 1;\n    iVar6 = __vsnprintf_chk(d->buf,sVar1,1,0xffffffff,fmt,orig_ap);\n    if (iVar6 == -1) {\n      d->size = d->size - iVar5;\n      d->buf = d->buf + iVar5;\n      iVar6 = 0x80;\n      puVar2 = (undefined4 *)PTR___gmp_free_func_00098f80;\n      puVar3 = (undefined4 *)PTR___gmp_allocate_func_00098d9c;\n      if (0x7f < iVar5) {\n        iVar6 = iVar5;\n      }\n    }\n    else {\n      iVar7 = iVar5;\n      if (iVar6 <= iVar5) {\n        iVar7 = iVar6;\n      }\n      d->size = d->size - iVar7;\n      d->buf = d->buf + iVar7;\n      if (iVar6 != iVar5) {\n        return iVar6;\n      }\n      iVar6 = 0x80;\n      puVar2 = (undefined4 *)PTR___gmp_free_func_00098f80;\n      puVar3 = (undefined4 *)PTR___gmp_allocate_func_00098d9c;\n      if (0x7f < iVar5) {\n        iVar6 = iVar5;\n      }\n    }\n  }" { (expression_statement "iVar5 = sVar1 - 1;" (assignment_expression "iVar5 = sVar1 - 1" identifier = (binary_expression "sVar1 - 1" identifier - number_literal)) ;) (expression_statement "iVar6 = __vsnprintf_chk(d->buf,sVar1,1,0xffffffff,fmt,orig_ap);" (assignment_expression "iVar6 = __vsnprintf_chk(d->buf,sVar1,1,0xffffffff,fmt,orig_ap)" identifier = (call_expression "__vsnprintf_chk(d->buf,sVar1,1,0xffffffff,fmt,orig_ap)" identifier (argument_list "(d->buf,sVar1,1,0xffffffff,fmt,orig_ap)" ( (field_expression "d->buf" identifier -> field_identifier) , identifier , number_literal , number_literal , identifier , identifier )))) ;) (if_statement "if (iVar6 == -1) {\n      d->size = d->size - iVar5;\n      d->buf = d->buf + iVar5;\n      iVar6 = 0x80;\n      puVar2 = (undefined4 *)PTR___gmp_free_func_00098f80;\n      puVar3 = (undefined4 *)PTR___gmp_allocate_func_00098d9c;\n      if (0x7f < iVar5) {\n        iVar6 = iVar5;\n      }\n    }\n    else {\n      iVar7 = iVar5;\n      if (iVar6 <= iVar5) {\n        iVar7 = iVar6;\n      }\n      d->size = d->size - iVar7;\n      d->buf = d->buf + iVar7;\n      if (iVar6 != iVar5) {\n        return iVar6;\n      }\n      iVar6 = 0x80;\n      puVar2 = (undefined4 *)PTR___gmp_free_func_00098f80;\n      puVar3 = (undefined4 *)PTR___gmp_allocate_func_00098d9c;\n      if (0x7f < iVar5) {\n        iVar6 = iVar5;\n      }\n    }" if (parenthesized_expression "(iVar6 == -1)" ( (binary_expression "iVar6 == -1" identifier == number_literal) )) (compound_statement "{\n      d->size = d->size - iVar5;\n      d->buf = d->buf + iVar5;\n      iVar6 = 0x80;\n      puVar2 = (undefined4 *)PTR___gmp_free_func_00098f80;\n      puVar3 = (undefined4 *)PTR___gmp_allocate_func_00098d9c;\n      if (0x7f < iVar5) {\n        iVar6 = iVar5;\n      }\n    }" { (expression_statement "d->size = d->size - iVar5;" (assignment_expression "d->size = d->size - iVar5" (field_expression "d->size" identifier -> field_identifier) = (binary_expression "d->size - iVar5" (field_expression "d->size" identifier -> field_identifier) - identifier)) ;) (expression_statement "d->buf = d->buf + iVar5;" (assignment_expression "d->buf = d->buf + iVar5" (field_expression "d->buf" identifier -> field_identifier) = (binary_expression "d->buf + iVar5" (field_expression "d->buf" identifier -> field_identifier) + identifier)) ;) (expression_statement "iVar6 = 0x80;" (assignment_expression "iVar6 = 0x80" identifier = number_literal) ;) (expression_statement "puVar2 = (undefined4 *)PTR___gmp_free_func_00098f80;" (assignment_expression "puVar2 = (undefined4 *)PTR___gmp_free_func_00098f80" identifier = (cast_expression "(undefined4 *)PTR___gmp_free_func_00098f80" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "puVar3 = (undefined4 *)PTR___gmp_allocate_func_00098d9c;" (assignment_expression "puVar3 = (undefined4 *)PTR___gmp_allocate_func_00098d9c" identifier = (cast_expression "(undefined4 *)PTR___gmp_allocate_func_00098d9c" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (if_statement "if (0x7f < iVar5) {\n        iVar6 = iVar5;\n      }" if (parenthesized_expression "(0x7f < iVar5)" ( (binary_expression "0x7f < iVar5" number_literal < identifier) )) (compound_statement "{\n        iVar6 = iVar5;\n      }" { (expression_statement "iVar6 = iVar5;" (assignment_expression "iVar6 = iVar5" identifier = identifier) ;) })) }) (else_clause "else {\n      iVar7 = iVar5;\n      if (iVar6 <= iVar5) {\n        iVar7 = iVar6;\n      }\n      d->size = d->size - iVar7;\n      d->buf = d->buf + iVar7;\n      if (iVar6 != iVar5) {\n        return iVar6;\n      }\n      iVar6 = 0x80;\n      puVar2 = (undefined4 *)PTR___gmp_free_func_00098f80;\n      puVar3 = (undefined4 *)PTR___gmp_allocate_func_00098d9c;\n      if (0x7f < iVar5) {\n        iVar6 = iVar5;\n      }\n    }" else (compound_statement "{\n      iVar7 = iVar5;\n      if (iVar6 <= iVar5) {\n        iVar7 = iVar6;\n      }\n      d->size = d->size - iVar7;\n      d->buf = d->buf + iVar7;\n      if (iVar6 != iVar5) {\n        return iVar6;\n      }\n      iVar6 = 0x80;\n      puVar2 = (undefined4 *)PTR___gmp_free_func_00098f80;\n      puVar3 = (undefined4 *)PTR___gmp_allocate_func_00098d9c;\n      if (0x7f < iVar5) {\n        iVar6 = iVar5;\n      }\n    }" { (expression_statement "iVar7 = iVar5;" (assignment_expression "iVar7 = iVar5" identifier = identifier) ;) (if_statement "if (iVar6 <= iVar5) {\n        iVar7 = iVar6;\n      }" if (parenthesized_expression "(iVar6 <= iVar5)" ( (binary_expression "iVar6 <= iVar5" identifier <= identifier) )) (compound_statement "{\n        iVar7 = iVar6;\n      }" { (expression_statement "iVar7 = iVar6;" (assignment_expression "iVar7 = iVar6" identifier = identifier) ;) })) (expression_statement "d->size = d->size - iVar7;" (assignment_expression "d->size = d->size - iVar7" (field_expression "d->size" identifier -> field_identifier) = (binary_expression "d->size - iVar7" (field_expression "d->size" identifier -> field_identifier) - identifier)) ;) (expression_statement "d->buf = d->buf + iVar7;" (assignment_expression "d->buf = d->buf + iVar7" (field_expression "d->buf" identifier -> field_identifier) = (binary_expression "d->buf + iVar7" (field_expression "d->buf" identifier -> field_identifier) + identifier)) ;) (if_statement "if (iVar6 != iVar5) {\n        return iVar6;\n      }" if (parenthesized_expression "(iVar6 != iVar5)" ( (binary_expression "iVar6 != iVar5" identifier != identifier) )) (compound_statement "{\n        return iVar6;\n      }" { (return_statement "return iVar6;" return identifier ;) })) (expression_statement "iVar6 = 0x80;" (assignment_expression "iVar6 = 0x80" identifier = number_literal) ;) (expression_statement "puVar2 = (undefined4 *)PTR___gmp_free_func_00098f80;" (assignment_expression "puVar2 = (undefined4 *)PTR___gmp_free_func_00098f80" identifier = (cast_expression "(undefined4 *)PTR___gmp_free_func_00098f80" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "puVar3 = (undefined4 *)PTR___gmp_allocate_func_00098d9c;" (assignment_expression "puVar3 = (undefined4 *)PTR___gmp_allocate_func_00098d9c" identifier = (cast_expression "(undefined4 *)PTR___gmp_allocate_func_00098d9c" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (if_statement "if (0x7f < iVar5) {\n        iVar6 = iVar5;\n      }" if (parenthesized_expression "(0x7f < iVar5)" ( (binary_expression "0x7f < iVar5" number_literal < identifier) )) (compound_statement "{\n        iVar6 = iVar5;\n      }" { (expression_statement "iVar6 = iVar5;" (assignment_expression "iVar6 = iVar5" identifier = identifier) ;) })) }))) })) (do_statement "do {\n    do {\n      iVar6 = iVar6 * 2;\n      uVar4 = (*(code *)*puVar3)(iVar6);\n      iVar5 = __vsnprintf_chk(uVar4,iVar6,1,0xffffffff,fmt,orig_ap);\n      (*(code *)*puVar2)(uVar4,iVar6);\n    } while (iVar6 + -1 == iVar5);\n  } while (iVar5 == -1);" do (compound_statement "{\n    do {\n      iVar6 = iVar6 * 2;\n      uVar4 = (*(code *)*puVar3)(iVar6);\n      iVar5 = __vsnprintf_chk(uVar4,iVar6,1,0xffffffff,fmt,orig_ap);\n      (*(code *)*puVar2)(uVar4,iVar6);\n    } while (iVar6 + -1 == iVar5);\n  }" { (do_statement "do {\n      iVar6 = iVar6 * 2;\n      uVar4 = (*(code *)*puVar3)(iVar6);\n      iVar5 = __vsnprintf_chk(uVar4,iVar6,1,0xffffffff,fmt,orig_ap);\n      (*(code *)*puVar2)(uVar4,iVar6);\n    } while (iVar6 + -1 == iVar5);" do (compound_statement "{\n      iVar6 = iVar6 * 2;\n      uVar4 = (*(code *)*puVar3)(iVar6);\n      iVar5 = __vsnprintf_chk(uVar4,iVar6,1,0xffffffff,fmt,orig_ap);\n      (*(code *)*puVar2)(uVar4,iVar6);\n    }" { (expression_statement "iVar6 = iVar6 * 2;" (assignment_expression "iVar6 = iVar6 * 2" identifier = (binary_expression "iVar6 * 2" identifier * number_literal)) ;) (expression_statement "uVar4 = (*(code *)*puVar3)(iVar6);" (assignment_expression "uVar4 = (*(code *)*puVar3)(iVar6)" identifier = (call_expression "(*(code *)*puVar3)(iVar6)" (parenthesized_expression "(*(code *)*puVar3)" ( (pointer_expression "*(code *)*puVar3" * (cast_expression "(code *)*puVar3" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar3" * identifier))) )) (argument_list "(iVar6)" ( identifier )))) ;) (expression_statement "iVar5 = __vsnprintf_chk(uVar4,iVar6,1,0xffffffff,fmt,orig_ap);" (assignment_expression "iVar5 = __vsnprintf_chk(uVar4,iVar6,1,0xffffffff,fmt,orig_ap)" identifier = (call_expression "__vsnprintf_chk(uVar4,iVar6,1,0xffffffff,fmt,orig_ap)" identifier (argument_list "(uVar4,iVar6,1,0xffffffff,fmt,orig_ap)" ( identifier , identifier , number_literal , number_literal , identifier , identifier )))) ;) (expression_statement "(*(code *)*puVar2)(uVar4,iVar6);" (call_expression "(*(code *)*puVar2)(uVar4,iVar6)" (parenthesized_expression "(*(code *)*puVar2)" ( (pointer_expression "*(code *)*puVar2" * (cast_expression "(code *)*puVar2" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar2" * identifier))) )) (argument_list "(uVar4,iVar6)" ( identifier , identifier ))) ;) }) while (parenthesized_expression "(iVar6 + -1 == iVar5)" ( (binary_expression "iVar6 + -1 == iVar5" (binary_expression "iVar6 + -1" identifier + number_literal) == identifier) )) ;) }) while (parenthesized_expression "(iVar5 == -1)" ( (binary_expression "iVar5 == -1" identifier == number_literal) )) ;) (return_statement "return iVar5;" return identifier ;) })))
(translation_unit "int __regparm2\nFUN_00077a20(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  undefined4 *puVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  int iVar4;\n  int unaff_EBX;\n  int iVar5;\n  int iVar6;\n  int *unaff_retaddr;\n  \n  iVar5 = 0x80;\n  entry(param_2,0x77a2e);\n  iVar4 = unaff_retaddr[1];\n  if (1 < iVar4) {\n    iVar6 = iVar4 + -1;\n    iVar4 = __vsnprintf_chk(*unaff_retaddr,iVar4,1,0xffffffff,param_3,param_4);\n    if (iVar4 == -1) {\n      unaff_retaddr[1] = unaff_retaddr[1] - iVar6;\n      *unaff_retaddr = *unaff_retaddr + iVar6;\n      iVar5 = 0x80;\n      if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }\n    }\n    else {\n      iVar5 = iVar6;\n      if (iVar4 <= iVar6) {\n        iVar5 = iVar4;\n      }\n      unaff_retaddr[1] = unaff_retaddr[1] - iVar5;\n      *unaff_retaddr = *unaff_retaddr + iVar5;\n      if (iVar4 != iVar6) {\n        return iVar4;\n      }\n      iVar5 = 0x80;\n      if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }\n    }\n  }\n  puVar1 = *(undefined4 **)(unaff_EBX + 0x2136e);\n  puVar2 = *(undefined4 **)(unaff_EBX + 0x21552);\n  do {\n    do {\n      iVar5 = iVar5 * 2;\n      uVar3 = (*(code *)*puVar1)(iVar5);\n      iVar4 = __vsnprintf_chk(uVar3,iVar5,1,0xffffffff,param_3,param_4);\n      (*(code *)*puVar2)(uVar3,iVar5);\n    } while (iVar5 + -1 == iVar4);\n  } while (iVar4 == -1);\n  return iVar4;\n}\n\n" (function_definition "int __regparm2\nFUN_00077a20(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  undefined4 *puVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  int iVar4;\n  int unaff_EBX;\n  int iVar5;\n  int iVar6;\n  int *unaff_retaddr;\n  \n  iVar5 = 0x80;\n  entry(param_2,0x77a2e);\n  iVar4 = unaff_retaddr[1];\n  if (1 < iVar4) {\n    iVar6 = iVar4 + -1;\n    iVar4 = __vsnprintf_chk(*unaff_retaddr,iVar4,1,0xffffffff,param_3,param_4);\n    if (iVar4 == -1) {\n      unaff_retaddr[1] = unaff_retaddr[1] - iVar6;\n      *unaff_retaddr = *unaff_retaddr + iVar6;\n      iVar5 = 0x80;\n      if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }\n    }\n    else {\n      iVar5 = iVar6;\n      if (iVar4 <= iVar6) {\n        iVar5 = iVar4;\n      }\n      unaff_retaddr[1] = unaff_retaddr[1] - iVar5;\n      *unaff_retaddr = *unaff_retaddr + iVar5;\n      if (iVar4 != iVar6) {\n        return iVar4;\n      }\n      iVar5 = 0x80;\n      if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }\n    }\n  }\n  puVar1 = *(undefined4 **)(unaff_EBX + 0x2136e);\n  puVar2 = *(undefined4 **)(unaff_EBX + 0x21552);\n  do {\n    do {\n      iVar5 = iVar5 * 2;\n      uVar3 = (*(code *)*puVar1)(iVar5);\n      iVar4 = __vsnprintf_chk(uVar3,iVar5,1,0xffffffff,param_3,param_4);\n      (*(code *)*puVar2)(uVar3,iVar5);\n    } while (iVar5 + -1 == iVar4);\n  } while (iVar4 == -1);\n  return iVar4;\n}" primitive_type (ERROR "__regparm2" identifier) (function_declarator "FUN_00077a20(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) ))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  int iVar4;\n  int unaff_EBX;\n  int iVar5;\n  int iVar6;\n  int *unaff_retaddr;\n  \n  iVar5 = 0x80;\n  entry(param_2,0x77a2e);\n  iVar4 = unaff_retaddr[1];\n  if (1 < iVar4) {\n    iVar6 = iVar4 + -1;\n    iVar4 = __vsnprintf_chk(*unaff_retaddr,iVar4,1,0xffffffff,param_3,param_4);\n    if (iVar4 == -1) {\n      unaff_retaddr[1] = unaff_retaddr[1] - iVar6;\n      *unaff_retaddr = *unaff_retaddr + iVar6;\n      iVar5 = 0x80;\n      if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }\n    }\n    else {\n      iVar5 = iVar6;\n      if (iVar4 <= iVar6) {\n        iVar5 = iVar4;\n      }\n      unaff_retaddr[1] = unaff_retaddr[1] - iVar5;\n      *unaff_retaddr = *unaff_retaddr + iVar5;\n      if (iVar4 != iVar6) {\n        return iVar4;\n      }\n      iVar5 = 0x80;\n      if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }\n    }\n  }\n  puVar1 = *(undefined4 **)(unaff_EBX + 0x2136e);\n  puVar2 = *(undefined4 **)(unaff_EBX + 0x21552);\n  do {\n    do {\n      iVar5 = iVar5 * 2;\n      uVar3 = (*(code *)*puVar1)(iVar5);\n      iVar4 = __vsnprintf_chk(uVar3,iVar5,1,0xffffffff,param_3,param_4);\n      (*(code *)*puVar2)(uVar3,iVar5);\n    } while (iVar5 + -1 == iVar4);\n  } while (iVar4 == -1);\n  return iVar4;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int unaff_EBX;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "int *unaff_retaddr;" primitive_type (pointer_declarator "*unaff_retaddr" * identifier) ;) (expression_statement "iVar5 = 0x80;" (assignment_expression "iVar5 = 0x80" identifier = number_literal) ;) (expression_statement "entry(param_2,0x77a2e);" (call_expression "entry(param_2,0x77a2e)" identifier (argument_list "(param_2,0x77a2e)" ( identifier , number_literal ))) ;) (expression_statement "iVar4 = unaff_retaddr[1];" (assignment_expression "iVar4 = unaff_retaddr[1]" identifier = (subscript_expression "unaff_retaddr[1]" identifier [ number_literal ])) ;) (if_statement "if (1 < iVar4) {\n    iVar6 = iVar4 + -1;\n    iVar4 = __vsnprintf_chk(*unaff_retaddr,iVar4,1,0xffffffff,param_3,param_4);\n    if (iVar4 == -1) {\n      unaff_retaddr[1] = unaff_retaddr[1] - iVar6;\n      *unaff_retaddr = *unaff_retaddr + iVar6;\n      iVar5 = 0x80;\n      if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }\n    }\n    else {\n      iVar5 = iVar6;\n      if (iVar4 <= iVar6) {\n        iVar5 = iVar4;\n      }\n      unaff_retaddr[1] = unaff_retaddr[1] - iVar5;\n      *unaff_retaddr = *unaff_retaddr + iVar5;\n      if (iVar4 != iVar6) {\n        return iVar4;\n      }\n      iVar5 = 0x80;\n      if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }\n    }\n  }" if (parenthesized_expression "(1 < iVar4)" ( (binary_expression "1 < iVar4" number_literal < identifier) )) (compound_statement "{\n    iVar6 = iVar4 + -1;\n    iVar4 = __vsnprintf_chk(*unaff_retaddr,iVar4,1,0xffffffff,param_3,param_4);\n    if (iVar4 == -1) {\n      unaff_retaddr[1] = unaff_retaddr[1] - iVar6;\n      *unaff_retaddr = *unaff_retaddr + iVar6;\n      iVar5 = 0x80;\n      if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }\n    }\n    else {\n      iVar5 = iVar6;\n      if (iVar4 <= iVar6) {\n        iVar5 = iVar4;\n      }\n      unaff_retaddr[1] = unaff_retaddr[1] - iVar5;\n      *unaff_retaddr = *unaff_retaddr + iVar5;\n      if (iVar4 != iVar6) {\n        return iVar4;\n      }\n      iVar5 = 0x80;\n      if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }\n    }\n  }" { (expression_statement "iVar6 = iVar4 + -1;" (assignment_expression "iVar6 = iVar4 + -1" identifier = (binary_expression "iVar4 + -1" identifier + number_literal)) ;) (expression_statement "iVar4 = __vsnprintf_chk(*unaff_retaddr,iVar4,1,0xffffffff,param_3,param_4);" (assignment_expression "iVar4 = __vsnprintf_chk(*unaff_retaddr,iVar4,1,0xffffffff,param_3,param_4)" identifier = (call_expression "__vsnprintf_chk(*unaff_retaddr,iVar4,1,0xffffffff,param_3,param_4)" identifier (argument_list "(*unaff_retaddr,iVar4,1,0xffffffff,param_3,param_4)" ( (pointer_expression "*unaff_retaddr" * identifier) , identifier , number_literal , number_literal , identifier , identifier )))) ;) (if_statement "if (iVar4 == -1) {\n      unaff_retaddr[1] = unaff_retaddr[1] - iVar6;\n      *unaff_retaddr = *unaff_retaddr + iVar6;\n      iVar5 = 0x80;\n      if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }\n    }\n    else {\n      iVar5 = iVar6;\n      if (iVar4 <= iVar6) {\n        iVar5 = iVar4;\n      }\n      unaff_retaddr[1] = unaff_retaddr[1] - iVar5;\n      *unaff_retaddr = *unaff_retaddr + iVar5;\n      if (iVar4 != iVar6) {\n        return iVar4;\n      }\n      iVar5 = 0x80;\n      if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }\n    }" if (parenthesized_expression "(iVar4 == -1)" ( (binary_expression "iVar4 == -1" identifier == number_literal) )) (compound_statement "{\n      unaff_retaddr[1] = unaff_retaddr[1] - iVar6;\n      *unaff_retaddr = *unaff_retaddr + iVar6;\n      iVar5 = 0x80;\n      if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }\n    }" { (expression_statement "unaff_retaddr[1] = unaff_retaddr[1] - iVar6;" (assignment_expression "unaff_retaddr[1] = unaff_retaddr[1] - iVar6" (subscript_expression "unaff_retaddr[1]" identifier [ number_literal ]) = (binary_expression "unaff_retaddr[1] - iVar6" (subscript_expression "unaff_retaddr[1]" identifier [ number_literal ]) - identifier)) ;) (expression_statement "*unaff_retaddr = *unaff_retaddr + iVar6;" (assignment_expression "*unaff_retaddr = *unaff_retaddr + iVar6" (pointer_expression "*unaff_retaddr" * identifier) = (binary_expression "*unaff_retaddr + iVar6" (pointer_expression "*unaff_retaddr" * identifier) + identifier)) ;) (expression_statement "iVar5 = 0x80;" (assignment_expression "iVar5 = 0x80" identifier = number_literal) ;) (if_statement "if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }" if (parenthesized_expression "(0x7f < iVar6)" ( (binary_expression "0x7f < iVar6" number_literal < identifier) )) (compound_statement "{\n        iVar5 = iVar6;\n      }" { (expression_statement "iVar5 = iVar6;" (assignment_expression "iVar5 = iVar6" identifier = identifier) ;) })) }) (else_clause "else {\n      iVar5 = iVar6;\n      if (iVar4 <= iVar6) {\n        iVar5 = iVar4;\n      }\n      unaff_retaddr[1] = unaff_retaddr[1] - iVar5;\n      *unaff_retaddr = *unaff_retaddr + iVar5;\n      if (iVar4 != iVar6) {\n        return iVar4;\n      }\n      iVar5 = 0x80;\n      if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }\n    }" else (compound_statement "{\n      iVar5 = iVar6;\n      if (iVar4 <= iVar6) {\n        iVar5 = iVar4;\n      }\n      unaff_retaddr[1] = unaff_retaddr[1] - iVar5;\n      *unaff_retaddr = *unaff_retaddr + iVar5;\n      if (iVar4 != iVar6) {\n        return iVar4;\n      }\n      iVar5 = 0x80;\n      if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }\n    }" { (expression_statement "iVar5 = iVar6;" (assignment_expression "iVar5 = iVar6" identifier = identifier) ;) (if_statement "if (iVar4 <= iVar6) {\n        iVar5 = iVar4;\n      }" if (parenthesized_expression "(iVar4 <= iVar6)" ( (binary_expression "iVar4 <= iVar6" identifier <= identifier) )) (compound_statement "{\n        iVar5 = iVar4;\n      }" { (expression_statement "iVar5 = iVar4;" (assignment_expression "iVar5 = iVar4" identifier = identifier) ;) })) (expression_statement "unaff_retaddr[1] = unaff_retaddr[1] - iVar5;" (assignment_expression "unaff_retaddr[1] = unaff_retaddr[1] - iVar5" (subscript_expression "unaff_retaddr[1]" identifier [ number_literal ]) = (binary_expression "unaff_retaddr[1] - iVar5" (subscript_expression "unaff_retaddr[1]" identifier [ number_literal ]) - identifier)) ;) (expression_statement "*unaff_retaddr = *unaff_retaddr + iVar5;" (assignment_expression "*unaff_retaddr = *unaff_retaddr + iVar5" (pointer_expression "*unaff_retaddr" * identifier) = (binary_expression "*unaff_retaddr + iVar5" (pointer_expression "*unaff_retaddr" * identifier) + identifier)) ;) (if_statement "if (iVar4 != iVar6) {\n        return iVar4;\n      }" if (parenthesized_expression "(iVar4 != iVar6)" ( (binary_expression "iVar4 != iVar6" identifier != identifier) )) (compound_statement "{\n        return iVar4;\n      }" { (return_statement "return iVar4;" return identifier ;) })) (expression_statement "iVar5 = 0x80;" (assignment_expression "iVar5 = 0x80" identifier = number_literal) ;) (if_statement "if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }" if (parenthesized_expression "(0x7f < iVar6)" ( (binary_expression "0x7f < iVar6" number_literal < identifier) )) (compound_statement "{\n        iVar5 = iVar6;\n      }" { (expression_statement "iVar5 = iVar6;" (assignment_expression "iVar5 = iVar6" identifier = identifier) ;) })) }))) })) (expression_statement "puVar1 = *(undefined4 **)(unaff_EBX + 0x2136e);" (assignment_expression "puVar1 = *(undefined4 **)(unaff_EBX + 0x2136e)" identifier = (pointer_expression "*(undefined4 **)(unaff_EBX + 0x2136e)" * (cast_expression "(undefined4 **)(unaff_EBX + 0x2136e)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(unaff_EBX + 0x2136e)" ( (binary_expression "unaff_EBX + 0x2136e" identifier + number_literal) ))))) ;) (expression_statement "puVar2 = *(undefined4 **)(unaff_EBX + 0x21552);" (assignment_expression "puVar2 = *(undefined4 **)(unaff_EBX + 0x21552)" identifier = (pointer_expression "*(undefined4 **)(unaff_EBX + 0x21552)" * (cast_expression "(undefined4 **)(unaff_EBX + 0x21552)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(unaff_EBX + 0x21552)" ( (binary_expression "unaff_EBX + 0x21552" identifier + number_literal) ))))) ;) (do_statement "do {\n    do {\n      iVar5 = iVar5 * 2;\n      uVar3 = (*(code *)*puVar1)(iVar5);\n      iVar4 = __vsnprintf_chk(uVar3,iVar5,1,0xffffffff,param_3,param_4);\n      (*(code *)*puVar2)(uVar3,iVar5);\n    } while (iVar5 + -1 == iVar4);\n  } while (iVar4 == -1);" do (compound_statement "{\n    do {\n      iVar5 = iVar5 * 2;\n      uVar3 = (*(code *)*puVar1)(iVar5);\n      iVar4 = __vsnprintf_chk(uVar3,iVar5,1,0xffffffff,param_3,param_4);\n      (*(code *)*puVar2)(uVar3,iVar5);\n    } while (iVar5 + -1 == iVar4);\n  }" { (do_statement "do {\n      iVar5 = iVar5 * 2;\n      uVar3 = (*(code *)*puVar1)(iVar5);\n      iVar4 = __vsnprintf_chk(uVar3,iVar5,1,0xffffffff,param_3,param_4);\n      (*(code *)*puVar2)(uVar3,iVar5);\n    } while (iVar5 + -1 == iVar4);" do (compound_statement "{\n      iVar5 = iVar5 * 2;\n      uVar3 = (*(code *)*puVar1)(iVar5);\n      iVar4 = __vsnprintf_chk(uVar3,iVar5,1,0xffffffff,param_3,param_4);\n      (*(code *)*puVar2)(uVar3,iVar5);\n    }" { (expression_statement "iVar5 = iVar5 * 2;" (assignment_expression "iVar5 = iVar5 * 2" identifier = (binary_expression "iVar5 * 2" identifier * number_literal)) ;) (expression_statement "uVar3 = (*(code *)*puVar1)(iVar5);" (assignment_expression "uVar3 = (*(code *)*puVar1)(iVar5)" identifier = (call_expression "(*(code *)*puVar1)(iVar5)" (parenthesized_expression "(*(code *)*puVar1)" ( (pointer_expression "*(code *)*puVar1" * (cast_expression "(code *)*puVar1" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar1" * identifier))) )) (argument_list "(iVar5)" ( identifier )))) ;) (expression_statement "iVar4 = __vsnprintf_chk(uVar3,iVar5,1,0xffffffff,param_3,param_4);" (assignment_expression "iVar4 = __vsnprintf_chk(uVar3,iVar5,1,0xffffffff,param_3,param_4)" identifier = (call_expression "__vsnprintf_chk(uVar3,iVar5,1,0xffffffff,param_3,param_4)" identifier (argument_list "(uVar3,iVar5,1,0xffffffff,param_3,param_4)" ( identifier , identifier , number_literal , number_literal , identifier , identifier )))) ;) (expression_statement "(*(code *)*puVar2)(uVar3,iVar5);" (call_expression "(*(code *)*puVar2)(uVar3,iVar5)" (parenthesized_expression "(*(code *)*puVar2)" ( (pointer_expression "*(code *)*puVar2" * (cast_expression "(code *)*puVar2" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*puVar2" * identifier))) )) (argument_list "(uVar3,iVar5)" ( identifier , identifier ))) ;) }) while (parenthesized_expression "(iVar5 + -1 == iVar4)" ( (binary_expression "iVar5 + -1 == iVar4" (binary_expression "iVar5 + -1" identifier + number_literal) == identifier) )) ;) }) while (parenthesized_expression "(iVar4 == -1)" ( (binary_expression "iVar4 == -1" identifier == number_literal) )) ;) (return_statement "return iVar4;" return identifier ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT ))) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * IDENT) , IDENT , LIT , LIT , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression (subscript_expression IDENT [ LIT ]) - IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (pointer_expression * IDENT) + IDENT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression (subscript_expression IDENT [ LIT ]) - IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (pointer_expression * IDENT) + IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != IDENT) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) }))) })) (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 IDENT + LIT) ))))) ;) (do_statement do (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT * LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) )) (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , LIT , LIT , IDENT , IDENT )))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) )) (argument_list ( IDENT , IDENT ))) ;) }) while (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) == IDENT) )) ;) }) while (parenthesized_expression ( (binary_expression IDENT == LIT) )) ;) (return_statement return IDENT ;) })))
(function_definition "int __regparm2\nFUN_00077a20(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  undefined4 *puVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  int iVar4;\n  int unaff_EBX;\n  int iVar5;\n  int iVar6;\n  int *unaff_retaddr;\n  \n  iVar5 = 0x80;\n  entry(param_2,0x77a2e);\n  iVar4 = unaff_retaddr[1];\n  if (1 < iVar4) {\n    iVar6 = iVar4 + -1;\n    iVar4 = __vsnprintf_chk(*unaff_retaddr,iVar4,1,0xffffffff,param_3,param_4);\n    if (iVar4 == -1) {\n      unaff_retaddr[1] = unaff_retaddr[1] - iVar6;\n      *unaff_retaddr = *unaff_retaddr + iVar6;\n      iVar5 = 0x80;\n      if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }\n    }\n    else {\n      iVar5 = iVar6;\n      if (iVar4 <= iVar6) {\n        iVar5 = iVar4;\n      }\n      unaff_retaddr[1] = unaff_retaddr[1] - iVar5;\n      *unaff_retaddr = *unaff_retaddr + iVar5;\n      if (iVar4 != iVar6) {\n        return iVar4;\n      }\n      iVar5 = 0x80;\n      if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }\n    }\n  }\n  puVar1 = *(undefined4 **)(unaff_EBX + 0x2136e);\n  puVar2 = *(undefined4 **)(unaff_EBX + 0x21552);\n  do {\n    do {\n      iVar5 = iVar5 * 2;\n      uVar3 = (*(code *)*puVar1)(iVar5);\n      iVar4 = __vsnprintf_chk(uVar3,iVar5,1,0xffffffff,param_3,param_4);\n      (*(code *)*puVar2)(uVar3,iVar5);\n    } while (iVar5 + -1 == iVar4);\n  } while (iVar4 == -1);\n  return iVar4;\n}" (primitive_type "int") (ERROR "__regparm2" (identifier "__regparm2")) (function_declarator "FUN_00077a20(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)" (identifier "FUN_00077a20") (parameter_list "(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) (, ",") (parameter_declaration "undefined4 param_4" (type_identifier "undefined4") (identifier "param_4")) () ")"))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  int iVar4;\n  int unaff_EBX;\n  int iVar5;\n  int iVar6;\n  int *unaff_retaddr;\n  \n  iVar5 = 0x80;\n  entry(param_2,0x77a2e);\n  iVar4 = unaff_retaddr[1];\n  if (1 < iVar4) {\n    iVar6 = iVar4 + -1;\n    iVar4 = __vsnprintf_chk(*unaff_retaddr,iVar4,1,0xffffffff,param_3,param_4);\n    if (iVar4 == -1) {\n      unaff_retaddr[1] = unaff_retaddr[1] - iVar6;\n      *unaff_retaddr = *unaff_retaddr + iVar6;\n      iVar5 = 0x80;\n      if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }\n    }\n    else {\n      iVar5 = iVar6;\n      if (iVar4 <= iVar6) {\n        iVar5 = iVar4;\n      }\n      unaff_retaddr[1] = unaff_retaddr[1] - iVar5;\n      *unaff_retaddr = *unaff_retaddr + iVar5;\n      if (iVar4 != iVar6) {\n        return iVar4;\n      }\n      iVar5 = 0x80;\n      if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }\n    }\n  }\n  puVar1 = *(undefined4 **)(unaff_EBX + 0x2136e);\n  puVar2 = *(undefined4 **)(unaff_EBX + 0x21552);\n  do {\n    do {\n      iVar5 = iVar5 * 2;\n      uVar3 = (*(code *)*puVar1)(iVar5);\n      iVar4 = __vsnprintf_chk(uVar3,iVar5,1,0xffffffff,param_3,param_4);\n      (*(code *)*puVar2)(uVar3,iVar5);\n    } while (iVar5 + -1 == iVar4);\n  } while (iVar4 == -1);\n  return iVar4;\n}" ({ "{") (declaration "undefined4 *puVar1;" (type_identifier "undefined4") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "undefined4 *puVar2;" (type_identifier "undefined4") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "int unaff_EBX;" (primitive_type "int") (identifier "unaff_EBX") (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (declaration "int *unaff_retaddr;" (primitive_type "int") (pointer_declarator "*unaff_retaddr" (* "*") (identifier "unaff_retaddr")) (; ";")) (expression_statement "iVar5 = 0x80;" (assignment_expression "iVar5 = 0x80" (identifier "iVar5") (= "=") (number_literal "0x80")) (; ";")) (expression_statement "entry(param_2,0x77a2e);" (call_expression "entry(param_2,0x77a2e)" (identifier "entry") (argument_list "(param_2,0x77a2e)" (( "(") (identifier "param_2") (, ",") (number_literal "0x77a2e") () ")"))) (; ";")) (expression_statement "iVar4 = unaff_retaddr[1];" (assignment_expression "iVar4 = unaff_retaddr[1]" (identifier "iVar4") (= "=") (subscript_expression "unaff_retaddr[1]" (identifier "unaff_retaddr") ([ "[") (number_literal "1") (] "]"))) (; ";")) (if_statement "if (1 < iVar4) {\n    iVar6 = iVar4 + -1;\n    iVar4 = __vsnprintf_chk(*unaff_retaddr,iVar4,1,0xffffffff,param_3,param_4);\n    if (iVar4 == -1) {\n      unaff_retaddr[1] = unaff_retaddr[1] - iVar6;\n      *unaff_retaddr = *unaff_retaddr + iVar6;\n      iVar5 = 0x80;\n      if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }\n    }\n    else {\n      iVar5 = iVar6;\n      if (iVar4 <= iVar6) {\n        iVar5 = iVar4;\n      }\n      unaff_retaddr[1] = unaff_retaddr[1] - iVar5;\n      *unaff_retaddr = *unaff_retaddr + iVar5;\n      if (iVar4 != iVar6) {\n        return iVar4;\n      }\n      iVar5 = 0x80;\n      if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }\n    }\n  }" (if "if") (parenthesized_expression "(1 < iVar4)" (( "(") (binary_expression "1 < iVar4" (number_literal "1") (< "<") (identifier "iVar4")) () ")")) (compound_statement "{\n    iVar6 = iVar4 + -1;\n    iVar4 = __vsnprintf_chk(*unaff_retaddr,iVar4,1,0xffffffff,param_3,param_4);\n    if (iVar4 == -1) {\n      unaff_retaddr[1] = unaff_retaddr[1] - iVar6;\n      *unaff_retaddr = *unaff_retaddr + iVar6;\n      iVar5 = 0x80;\n      if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }\n    }\n    else {\n      iVar5 = iVar6;\n      if (iVar4 <= iVar6) {\n        iVar5 = iVar4;\n      }\n      unaff_retaddr[1] = unaff_retaddr[1] - iVar5;\n      *unaff_retaddr = *unaff_retaddr + iVar5;\n      if (iVar4 != iVar6) {\n        return iVar4;\n      }\n      iVar5 = 0x80;\n      if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }\n    }\n  }" ({ "{") (expression_statement "iVar6 = iVar4 + -1;" (assignment_expression "iVar6 = iVar4 + -1" (identifier "iVar6") (= "=") (binary_expression "iVar4 + -1" (identifier "iVar4") (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "iVar4 = __vsnprintf_chk(*unaff_retaddr,iVar4,1,0xffffffff,param_3,param_4);" (assignment_expression "iVar4 = __vsnprintf_chk(*unaff_retaddr,iVar4,1,0xffffffff,param_3,param_4)" (identifier "iVar4") (= "=") (call_expression "__vsnprintf_chk(*unaff_retaddr,iVar4,1,0xffffffff,param_3,param_4)" (identifier "__vsnprintf_chk") (argument_list "(*unaff_retaddr,iVar4,1,0xffffffff,param_3,param_4)" (( "(") (pointer_expression "*unaff_retaddr" (* "*") (identifier "unaff_retaddr")) (, ",") (identifier "iVar4") (, ",") (number_literal "1") (, ",") (number_literal "0xffffffff") (, ",") (identifier "param_3") (, ",") (identifier "param_4") () ")")))) (; ";")) (if_statement "if (iVar4 == -1) {\n      unaff_retaddr[1] = unaff_retaddr[1] - iVar6;\n      *unaff_retaddr = *unaff_retaddr + iVar6;\n      iVar5 = 0x80;\n      if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }\n    }\n    else {\n      iVar5 = iVar6;\n      if (iVar4 <= iVar6) {\n        iVar5 = iVar4;\n      }\n      unaff_retaddr[1] = unaff_retaddr[1] - iVar5;\n      *unaff_retaddr = *unaff_retaddr + iVar5;\n      if (iVar4 != iVar6) {\n        return iVar4;\n      }\n      iVar5 = 0x80;\n      if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }\n    }" (if "if") (parenthesized_expression "(iVar4 == -1)" (( "(") (binary_expression "iVar4 == -1" (identifier "iVar4") (== "==") (number_literal "-1")) () ")")) (compound_statement "{\n      unaff_retaddr[1] = unaff_retaddr[1] - iVar6;\n      *unaff_retaddr = *unaff_retaddr + iVar6;\n      iVar5 = 0x80;\n      if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }\n    }" ({ "{") (expression_statement "unaff_retaddr[1] = unaff_retaddr[1] - iVar6;" (assignment_expression "unaff_retaddr[1] = unaff_retaddr[1] - iVar6" (subscript_expression "unaff_retaddr[1]" (identifier "unaff_retaddr") ([ "[") (number_literal "1") (] "]")) (= "=") (binary_expression "unaff_retaddr[1] - iVar6" (subscript_expression "unaff_retaddr[1]" (identifier "unaff_retaddr") ([ "[") (number_literal "1") (] "]")) (- "-") (identifier "iVar6"))) (; ";")) (expression_statement "*unaff_retaddr = *unaff_retaddr + iVar6;" (assignment_expression "*unaff_retaddr = *unaff_retaddr + iVar6" (pointer_expression "*unaff_retaddr" (* "*") (identifier "unaff_retaddr")) (= "=") (binary_expression "*unaff_retaddr + iVar6" (pointer_expression "*unaff_retaddr" (* "*") (identifier "unaff_retaddr")) (+ "+") (identifier "iVar6"))) (; ";")) (expression_statement "iVar5 = 0x80;" (assignment_expression "iVar5 = 0x80" (identifier "iVar5") (= "=") (number_literal "0x80")) (; ";")) (if_statement "if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }" (if "if") (parenthesized_expression "(0x7f < iVar6)" (( "(") (binary_expression "0x7f < iVar6" (number_literal "0x7f") (< "<") (identifier "iVar6")) () ")")) (compound_statement "{\n        iVar5 = iVar6;\n      }" ({ "{") (expression_statement "iVar5 = iVar6;" (assignment_expression "iVar5 = iVar6" (identifier "iVar5") (= "=") (identifier "iVar6")) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n      iVar5 = iVar6;\n      if (iVar4 <= iVar6) {\n        iVar5 = iVar4;\n      }\n      unaff_retaddr[1] = unaff_retaddr[1] - iVar5;\n      *unaff_retaddr = *unaff_retaddr + iVar5;\n      if (iVar4 != iVar6) {\n        return iVar4;\n      }\n      iVar5 = 0x80;\n      if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }\n    }" (else "else") (compound_statement "{\n      iVar5 = iVar6;\n      if (iVar4 <= iVar6) {\n        iVar5 = iVar4;\n      }\n      unaff_retaddr[1] = unaff_retaddr[1] - iVar5;\n      *unaff_retaddr = *unaff_retaddr + iVar5;\n      if (iVar4 != iVar6) {\n        return iVar4;\n      }\n      iVar5 = 0x80;\n      if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }\n    }" ({ "{") (expression_statement "iVar5 = iVar6;" (assignment_expression "iVar5 = iVar6" (identifier "iVar5") (= "=") (identifier "iVar6")) (; ";")) (if_statement "if (iVar4 <= iVar6) {\n        iVar5 = iVar4;\n      }" (if "if") (parenthesized_expression "(iVar4 <= iVar6)" (( "(") (binary_expression "iVar4 <= iVar6" (identifier "iVar4") (<= "<=") (identifier "iVar6")) () ")")) (compound_statement "{\n        iVar5 = iVar4;\n      }" ({ "{") (expression_statement "iVar5 = iVar4;" (assignment_expression "iVar5 = iVar4" (identifier "iVar5") (= "=") (identifier "iVar4")) (; ";")) (} "}"))) (expression_statement "unaff_retaddr[1] = unaff_retaddr[1] - iVar5;" (assignment_expression "unaff_retaddr[1] = unaff_retaddr[1] - iVar5" (subscript_expression "unaff_retaddr[1]" (identifier "unaff_retaddr") ([ "[") (number_literal "1") (] "]")) (= "=") (binary_expression "unaff_retaddr[1] - iVar5" (subscript_expression "unaff_retaddr[1]" (identifier "unaff_retaddr") ([ "[") (number_literal "1") (] "]")) (- "-") (identifier "iVar5"))) (; ";")) (expression_statement "*unaff_retaddr = *unaff_retaddr + iVar5;" (assignment_expression "*unaff_retaddr = *unaff_retaddr + iVar5" (pointer_expression "*unaff_retaddr" (* "*") (identifier "unaff_retaddr")) (= "=") (binary_expression "*unaff_retaddr + iVar5" (pointer_expression "*unaff_retaddr" (* "*") (identifier "unaff_retaddr")) (+ "+") (identifier "iVar5"))) (; ";")) (if_statement "if (iVar4 != iVar6) {\n        return iVar4;\n      }" (if "if") (parenthesized_expression "(iVar4 != iVar6)" (( "(") (binary_expression "iVar4 != iVar6" (identifier "iVar4") (!= "!=") (identifier "iVar6")) () ")")) (compound_statement "{\n        return iVar4;\n      }" ({ "{") (return_statement "return iVar4;" (return "return") (identifier "iVar4") (; ";")) (} "}"))) (expression_statement "iVar5 = 0x80;" (assignment_expression "iVar5 = 0x80" (identifier "iVar5") (= "=") (number_literal "0x80")) (; ";")) (if_statement "if (0x7f < iVar6) {\n        iVar5 = iVar6;\n      }" (if "if") (parenthesized_expression "(0x7f < iVar6)" (( "(") (binary_expression "0x7f < iVar6" (number_literal "0x7f") (< "<") (identifier "iVar6")) () ")")) (compound_statement "{\n        iVar5 = iVar6;\n      }" ({ "{") (expression_statement "iVar5 = iVar6;" (assignment_expression "iVar5 = iVar6" (identifier "iVar5") (= "=") (identifier "iVar6")) (; ";")) (} "}"))) (} "}")))) (} "}"))) (expression_statement "puVar1 = *(undefined4 **)(unaff_EBX + 0x2136e);" (assignment_expression "puVar1 = *(undefined4 **)(unaff_EBX + 0x2136e)" (identifier "puVar1") (= "=") (pointer_expression "*(undefined4 **)(unaff_EBX + 0x2136e)" (* "*") (cast_expression "(undefined4 **)(unaff_EBX + 0x2136e)" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(unaff_EBX + 0x2136e)" (( "(") (binary_expression "unaff_EBX + 0x2136e" (identifier "unaff_EBX") (+ "+") (number_literal "0x2136e")) () ")"))))) (; ";")) (expression_statement "puVar2 = *(undefined4 **)(unaff_EBX + 0x21552);" (assignment_expression "puVar2 = *(undefined4 **)(unaff_EBX + 0x21552)" (identifier "puVar2") (= "=") (pointer_expression "*(undefined4 **)(unaff_EBX + 0x21552)" (* "*") (cast_expression "(undefined4 **)(unaff_EBX + 0x21552)" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(unaff_EBX + 0x21552)" (( "(") (binary_expression "unaff_EBX + 0x21552" (identifier "unaff_EBX") (+ "+") (number_literal "0x21552")) () ")"))))) (; ";")) (do_statement "do {\n    do {\n      iVar5 = iVar5 * 2;\n      uVar3 = (*(code *)*puVar1)(iVar5);\n      iVar4 = __vsnprintf_chk(uVar3,iVar5,1,0xffffffff,param_3,param_4);\n      (*(code *)*puVar2)(uVar3,iVar5);\n    } while (iVar5 + -1 == iVar4);\n  } while (iVar4 == -1);" (do "do") (compound_statement "{\n    do {\n      iVar5 = iVar5 * 2;\n      uVar3 = (*(code *)*puVar1)(iVar5);\n      iVar4 = __vsnprintf_chk(uVar3,iVar5,1,0xffffffff,param_3,param_4);\n      (*(code *)*puVar2)(uVar3,iVar5);\n    } while (iVar5 + -1 == iVar4);\n  }" ({ "{") (do_statement "do {\n      iVar5 = iVar5 * 2;\n      uVar3 = (*(code *)*puVar1)(iVar5);\n      iVar4 = __vsnprintf_chk(uVar3,iVar5,1,0xffffffff,param_3,param_4);\n      (*(code *)*puVar2)(uVar3,iVar5);\n    } while (iVar5 + -1 == iVar4);" (do "do") (compound_statement "{\n      iVar5 = iVar5 * 2;\n      uVar3 = (*(code *)*puVar1)(iVar5);\n      iVar4 = __vsnprintf_chk(uVar3,iVar5,1,0xffffffff,param_3,param_4);\n      (*(code *)*puVar2)(uVar3,iVar5);\n    }" ({ "{") (expression_statement "iVar5 = iVar5 * 2;" (assignment_expression "iVar5 = iVar5 * 2" (identifier "iVar5") (= "=") (binary_expression "iVar5 * 2" (identifier "iVar5") (* "*") (number_literal "2"))) (; ";")) (expression_statement "uVar3 = (*(code *)*puVar1)(iVar5);" (assignment_expression "uVar3 = (*(code *)*puVar1)(iVar5)" (identifier "uVar3") (= "=") (call_expression "(*(code *)*puVar1)(iVar5)" (parenthesized_expression "(*(code *)*puVar1)" (( "(") (pointer_expression "*(code *)*puVar1" (* "*") (cast_expression "(code *)*puVar1" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*puVar1" (* "*") (identifier "puVar1")))) () ")")) (argument_list "(iVar5)" (( "(") (identifier "iVar5") () ")")))) (; ";")) (expression_statement "iVar4 = __vsnprintf_chk(uVar3,iVar5,1,0xffffffff,param_3,param_4);" (assignment_expression "iVar4 = __vsnprintf_chk(uVar3,iVar5,1,0xffffffff,param_3,param_4)" (identifier "iVar4") (= "=") (call_expression "__vsnprintf_chk(uVar3,iVar5,1,0xffffffff,param_3,param_4)" (identifier "__vsnprintf_chk") (argument_list "(uVar3,iVar5,1,0xffffffff,param_3,param_4)" (( "(") (identifier "uVar3") (, ",") (identifier "iVar5") (, ",") (number_literal "1") (, ",") (number_literal "0xffffffff") (, ",") (identifier "param_3") (, ",") (identifier "param_4") () ")")))) (; ";")) (expression_statement "(*(code *)*puVar2)(uVar3,iVar5);" (call_expression "(*(code *)*puVar2)(uVar3,iVar5)" (parenthesized_expression "(*(code *)*puVar2)" (( "(") (pointer_expression "*(code *)*puVar2" (* "*") (cast_expression "(code *)*puVar2" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*puVar2" (* "*") (identifier "puVar2")))) () ")")) (argument_list "(uVar3,iVar5)" (( "(") (identifier "uVar3") (, ",") (identifier "iVar5") () ")"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar5 + -1 == iVar4)" (( "(") (binary_expression "iVar5 + -1 == iVar4" (binary_expression "iVar5 + -1" (identifier "iVar5") (+ "+") (number_literal "-1")) (== "==") (identifier "iVar4")) () ")")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar4 == -1)" (( "(") (binary_expression "iVar4 == -1" (identifier "iVar4") (== "==") (number_literal "-1")) () ")")) (; ";")) (return_statement "return iVar4;" (return "return") (identifier "iVar4") (; ";")) (} "}")))

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

int function_1(type_1 *d,char *fmt,type_2 orig_ap)

{
  size_t var_1;
  type_3 *puVar2;
  type_3 *puVar3;
  type_3 uVar4;
  int var_4;
  int var_3;
  int var_5;
  
  var_1 = d->size;
  var_3 = 0x80;
  puVar2 = (type_3 *)PTR___gmp_free_func_00098f80;
  puVar3 = (type_3 *)PTR___gmp_allocate_func_00098d9c;
  if (1 < (int)var_1) {
    var_4 = var_1 - 1;
    var_3 = var_2(d->buf,var_1,1,0xffffffff,fmt,orig_ap);
    if (var_3 == -1) {
      d->size = d->size - var_4;
      d->buf = d->buf + var_4;
      var_3 = 0x80;
      puVar2 = (type_3 *)PTR___gmp_free_func_00098f80;
      puVar3 = (type_3 *)PTR___gmp_allocate_func_00098d9c;
      if (0x7f < var_4) {
        var_3 = var_4;
      }
    }
    else {
      var_5 = var_4;
      if (var_3 <= var_4) {
        var_5 = var_3;
      }
      d->size = d->size - var_5;
      d->buf = d->buf + var_5;
      if (var_3 != var_4) {
        return var_3;
      }
      var_3 = 0x80;
      puVar2 = (type_3 *)PTR___gmp_free_func_00098f80;
      puVar3 = (type_3 *)PTR___gmp_allocate_func_00098d9c;
      if (0x7f < var_4) {
        var_3 = var_4;
      }
    }
  }
  do {
    do {
      var_3 = var_3 * 2;
      uVar4 = (*(type_4 *)*puVar3)(var_3);
      var_4 = var_2(uVar4,var_3,1,0xffffffff,fmt,orig_ap);
      (*(type_4 *)*puVar2)(uVar4,var_3);
    } while (var_3 + -1 == var_4);
  } while (var_4 == -1);
  return var_4;
}


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

int __regparm2
MASKED(undefined4 param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)

{
  undefined4 *puVar1;
  undefined4 *puVar2;
  undefined4 uVar3;
  int iVar4;
  int unaff_EBX;
  int iVar5;
  int iVar6;
  int *unaff_retaddr;
  
  iVar5 = 0x80;
  entry(param_2,0x77a2e);
  iVar4 = unaff_retaddr[1];
  if (1 < iVar4) {
    iVar6 = iVar4 + -1;
    iVar4 = __vsnprintf_chk(*unaff_retaddr,iVar4,1,0xffffffff,param_3,param_4);
    if (iVar4 == -1) {
      unaff_retaddr[1] = unaff_retaddr[1] - iVar6;
      *unaff_retaddr = *unaff_retaddr + iVar6;
      iVar5 = 0x80;
      if (0x7f < iVar6) {
        iVar5 = iVar6;
      }
    }
    else {
      iVar5 = iVar6;
      if (iVar4 <= iVar6) {
        iVar5 = iVar4;
      }
      unaff_retaddr[1] = unaff_retaddr[1] - iVar5;
      *unaff_retaddr = *unaff_retaddr + iVar5;
      if (iVar4 != iVar6) {
        return iVar4;
      }
      iVar5 = 0x80;
      if (0x7f < iVar6) {
        iVar5 = iVar6;
      }
    }
  }
  puVar1 = *(undefined4 **)(unaff_EBX + 0x2136e);
  puVar2 = *(undefined4 **)(unaff_EBX + 0x21552);
  do {
    do {
      iVar5 = iVar5 * 2;
      uVar3 = (*(code *)*puVar1)(iVar5);
      iVar4 = __vsnprintf_chk(uVar3,iVar5,1,0xffffffff,param_3,param_4);
      (*(code *)*puVar2)(uVar3,iVar5);
    } while (iVar5 + -1 == iVar4);
  } while (iVar4 == -1);
  return iVar4;
}

