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

int alloc_addbyter(int output,FILE *data)

{
  char *pcVar1;
  char *pcVar2;
  void *pvVar3;
  
  pvVar3 = (void *)data->_flags;
  if (pvVar3 == (void *)0x0) {
    pcVar2 = (char *)(*Curl_cmalloc)(0x20);
    data->_flags = (int)pcVar2;
    if (pcVar2 == (char *)0x0) {
LAB_000348be:
      data->_IO_read_base = (char *)0x1;
      return -1;
    }
    data->_IO_read_end = (char *)0x20;
    data->_IO_read_ptr = (char *)0x0;
  }
  else {
    pcVar1 = data->_IO_read_end;
    pcVar2 = data->_IO_read_ptr + (int)pvVar3;
    if (pcVar1 <= data->_IO_read_ptr + 1) {
      pcVar2 = (char *)((int)pcVar1 * 2);
      if ((pcVar2 <= pcVar1) ||
         (pvVar3 = (*Curl_crealloc)(pvVar3,(size_t)pcVar2), pvVar3 == (void *)0x0))
      goto LAB_000348be;
      data->_IO_read_end = pcVar2;
      data->_flags = (int)pvVar3;
      pcVar2 = data->_IO_read_ptr + (int)pvVar3;
    }
  }
  *pcVar2 = (char)output;
  data->_IO_read_ptr = data->_IO_read_ptr + 1;
  return output & 0xff;
}



uint FUN_00034830(byte param_1,int *param_2)

{
  uint uVar1;
  uint uVar2;
  byte *pbVar3;
  int iVar4;
  int unaff_EBP;
  
  FUN_0001e6b4();
  iVar4 = *param_2;
  if (iVar4 == 0) {
    pbVar3 = (byte *)(**(code **)(unaff_EBP + 0x7c83a))(0x20);
    *param_2 = (int)pbVar3;
    if (pbVar3 == (byte *)0x0) {
LAB_000348be:
      param_2[3] = 1;
      return 0xffffffff;
    }
    param_2[2] = 0x20;
    param_2[1] = 0;
  }
  else {
    uVar1 = param_2[2];
    pbVar3 = (byte *)(param_2[1] + iVar4);
    if (uVar1 <= param_2[1] + 1U) {
      uVar2 = uVar1 * 2;
      if ((uVar2 <= uVar1) || (iVar4 = (**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2), iVar4 == 0))
      goto LAB_000348be;
      param_2[2] = uVar2;
      *param_2 = iVar4;
      pbVar3 = (byte *)(iVar4 + param_2[1]);
    }
  }
  *pbVar3 = param_1;
  param_2[1] = param_2[1] + 1;
  return (uint)param_1;
}


PUSH EBP
CALL 0x0001e6b4
ADD EBP,0x7bfaa
PUSH EDI
PUSH ESI
PUSH EBX
SUB ESP,0xc
MOV EBX,dword ptr [ESP + 0x24]
MOV ESI,dword ptr [ESP + 0x20]
MOV EDX,dword ptr [EBX]
TEST EDX,EDX
JZ 0x00034898
MOV EAX,dword ptr [EBX + 0x4]
MOV ECX,dword ptr [EBX + 0x8]
LEA EDI,[EAX + 0x1]
ADD EAX,EDX
CMP EDI,ECX
JC 0x00034882
LEA EDI,[ECX + ECX*0x1]
CMP ECX,EDI
JNC 0x000348be
SUB ESP,0x8
LEA EAX,[EBP + 0x888]
PUSH EDI
PUSH EDX
CALL dword ptr [EAX]
ADD ESP,0x10
TEST EAX,EAX
JZ 0x000348be
MOV dword ptr [EBX + 0x8],EDI
MOV dword ptr [EBX],EAX
ADD EAX,dword ptr [EBX + 0x4]
MOV ECX,ESI
MOV byte ptr [EAX],CL
MOVZX EAX,CL
ADD dword ptr [EBX + 0x4],0x1
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0xc
LEA EAX,[EBP + 0x890]
PUSH 0x20
CALL dword ptr [EAX]
MOV dword ptr [EBX],EAX
ADD ESP,0x10
TEST EAX,EAX
JZ 0x000348be
MOV dword ptr [EBX + 0x8],0x20
MOV dword ptr [EBX + 0x4],0x0
JMP 0x00034882
MOV dword ptr [EBX + 0xc],0x1
MOV EAX,0xffffffff
JMP 0x0003488d
(translation_unit "uint FUN_00034830(byte param_1,int *param_2)\n\n{\n  uint uVar1;\n  uint uVar2;\n  byte *pbVar3;\n  int iVar4;\n  int unaff_EBP;\n  \n  FUN_0001e6b4();\n  iVar4 = *param_2;\n  if (iVar4 == 0) {\n    pbVar3 = (byte *)(**(code **)(unaff_EBP + 0x7c83a))(0x20);\n    *param_2 = (int)pbVar3;\n    if (pbVar3 == (byte *)0x0) {\nLAB_000348be:\n      param_2[3] = 1;\n      return 0xffffffff;\n    }\n    param_2[2] = 0x20;\n    param_2[1] = 0;\n  }\n  else {\n    uVar1 = param_2[2];\n    pbVar3 = (byte *)(param_2[1] + iVar4);\n    if (uVar1 <= param_2[1] + 1U) {\n      uVar2 = uVar1 * 2;\n      if ((uVar2 <= uVar1) || (iVar4 = (**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2), iVar4 == 0))\n      goto LAB_000348be;\n      param_2[2] = uVar2;\n      *param_2 = iVar4;\n      pbVar3 = (byte *)(iVar4 + param_2[1]);\n    }\n  }\n  *pbVar3 = param_1;\n  param_2[1] = param_2[1] + 1;\n  return (uint)param_1;\n}\n\n" (function_definition "uint FUN_00034830(byte param_1,int *param_2)\n\n{\n  uint uVar1;\n  uint uVar2;\n  byte *pbVar3;\n  int iVar4;\n  int unaff_EBP;\n  \n  FUN_0001e6b4();\n  iVar4 = *param_2;\n  if (iVar4 == 0) {\n    pbVar3 = (byte *)(**(code **)(unaff_EBP + 0x7c83a))(0x20);\n    *param_2 = (int)pbVar3;\n    if (pbVar3 == (byte *)0x0) {\nLAB_000348be:\n      param_2[3] = 1;\n      return 0xffffffff;\n    }\n    param_2[2] = 0x20;\n    param_2[1] = 0;\n  }\n  else {\n    uVar1 = param_2[2];\n    pbVar3 = (byte *)(param_2[1] + iVar4);\n    if (uVar1 <= param_2[1] + 1U) {\n      uVar2 = uVar1 * 2;\n      if ((uVar2 <= uVar1) || (iVar4 = (**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2), iVar4 == 0))\n      goto LAB_000348be;\n      param_2[2] = uVar2;\n      *param_2 = iVar4;\n      pbVar3 = (byte *)(iVar4 + param_2[1]);\n    }\n  }\n  *pbVar3 = param_1;\n  param_2[1] = param_2[1] + 1;\n  return (uint)param_1;\n}" type_identifier (function_declarator "FUN_00034830(byte param_1,int *param_2)" identifier (parameter_list "(byte param_1,int *param_2)" ( (parameter_declaration "byte param_1" type_identifier identifier) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  uint uVar2;\n  byte *pbVar3;\n  int iVar4;\n  int unaff_EBP;\n  \n  FUN_0001e6b4();\n  iVar4 = *param_2;\n  if (iVar4 == 0) {\n    pbVar3 = (byte *)(**(code **)(unaff_EBP + 0x7c83a))(0x20);\n    *param_2 = (int)pbVar3;\n    if (pbVar3 == (byte *)0x0) {\nLAB_000348be:\n      param_2[3] = 1;\n      return 0xffffffff;\n    }\n    param_2[2] = 0x20;\n    param_2[1] = 0;\n  }\n  else {\n    uVar1 = param_2[2];\n    pbVar3 = (byte *)(param_2[1] + iVar4);\n    if (uVar1 <= param_2[1] + 1U) {\n      uVar2 = uVar1 * 2;\n      if ((uVar2 <= uVar1) || (iVar4 = (**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2), iVar4 == 0))\n      goto LAB_000348be;\n      param_2[2] = uVar2;\n      *param_2 = iVar4;\n      pbVar3 = (byte *)(iVar4 + param_2[1]);\n    }\n  }\n  *pbVar3 = param_1;\n  param_2[1] = param_2[1] + 1;\n  return (uint)param_1;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "byte *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int unaff_EBP;" primitive_type identifier ;) (expression_statement "FUN_0001e6b4();" (call_expression "FUN_0001e6b4()" identifier (argument_list "()" ( ))) ;) (expression_statement "iVar4 = *param_2;" (assignment_expression "iVar4 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (if_statement "if (iVar4 == 0) {\n    pbVar3 = (byte *)(**(code **)(unaff_EBP + 0x7c83a))(0x20);\n    *param_2 = (int)pbVar3;\n    if (pbVar3 == (byte *)0x0) {\nLAB_000348be:\n      param_2[3] = 1;\n      return 0xffffffff;\n    }\n    param_2[2] = 0x20;\n    param_2[1] = 0;\n  }\n  else {\n    uVar1 = param_2[2];\n    pbVar3 = (byte *)(param_2[1] + iVar4);\n    if (uVar1 <= param_2[1] + 1U) {\n      uVar2 = uVar1 * 2;\n      if ((uVar2 <= uVar1) || (iVar4 = (**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2), iVar4 == 0))\n      goto LAB_000348be;\n      param_2[2] = uVar2;\n      *param_2 = iVar4;\n      pbVar3 = (byte *)(iVar4 + param_2[1]);\n    }\n  }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n    pbVar3 = (byte *)(**(code **)(unaff_EBP + 0x7c83a))(0x20);\n    *param_2 = (int)pbVar3;\n    if (pbVar3 == (byte *)0x0) {\nLAB_000348be:\n      param_2[3] = 1;\n      return 0xffffffff;\n    }\n    param_2[2] = 0x20;\n    param_2[1] = 0;\n  }" { (expression_statement "pbVar3 = (byte *)(**(code **)(unaff_EBP + 0x7c83a))(0x20);" (assignment_expression "pbVar3 = (byte *)(**(code **)(unaff_EBP + 0x7c83a))(0x20)" identifier = (cast_expression "(byte *)(**(code **)(unaff_EBP + 0x7c83a))(0x20)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(**(code **)(unaff_EBP + 0x7c83a))(0x20)" (parenthesized_expression "(**(code **)(unaff_EBP + 0x7c83a))" ( (pointer_expression "**(code **)(unaff_EBP + 0x7c83a)" * (pointer_expression "*(code **)(unaff_EBP + 0x7c83a)" * (cast_expression "(code **)(unaff_EBP + 0x7c83a)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(unaff_EBP + 0x7c83a)" ( (binary_expression "unaff_EBP + 0x7c83a" identifier + number_literal) ))))) )) (argument_list "(0x20)" ( number_literal ))))) ;) (expression_statement "*param_2 = (int)pbVar3;" (assignment_expression "*param_2 = (int)pbVar3" (pointer_expression "*param_2" * identifier) = (cast_expression "(int)pbVar3" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (if_statement "if (pbVar3 == (byte *)0x0) {\nLAB_000348be:\n      param_2[3] = 1;\n      return 0xffffffff;\n    }" if (parenthesized_expression "(pbVar3 == (byte *)0x0)" ( (binary_expression "pbVar3 == (byte *)0x0" identifier == (cast_expression "(byte *)0x0" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\nLAB_000348be:\n      param_2[3] = 1;\n      return 0xffffffff;\n    }" { (labeled_statement "LAB_000348be:\n      param_2[3] = 1;" statement_identifier : (expression_statement "param_2[3] = 1;" (assignment_expression "param_2[3] = 1" (subscript_expression "param_2[3]" identifier [ number_literal ]) = number_literal) ;)) (return_statement "return 0xffffffff;" return number_literal ;) })) (expression_statement "param_2[2] = 0x20;" (assignment_expression "param_2[2] = 0x20" (subscript_expression "param_2[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "param_2[1] = 0;" (assignment_expression "param_2[1] = 0" (subscript_expression "param_2[1]" identifier [ number_literal ]) = number_literal) ;) }) (else_clause "else {\n    uVar1 = param_2[2];\n    pbVar3 = (byte *)(param_2[1] + iVar4);\n    if (uVar1 <= param_2[1] + 1U) {\n      uVar2 = uVar1 * 2;\n      if ((uVar2 <= uVar1) || (iVar4 = (**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2), iVar4 == 0))\n      goto LAB_000348be;\n      param_2[2] = uVar2;\n      *param_2 = iVar4;\n      pbVar3 = (byte *)(iVar4 + param_2[1]);\n    }\n  }" else (compound_statement "{\n    uVar1 = param_2[2];\n    pbVar3 = (byte *)(param_2[1] + iVar4);\n    if (uVar1 <= param_2[1] + 1U) {\n      uVar2 = uVar1 * 2;\n      if ((uVar2 <= uVar1) || (iVar4 = (**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2), iVar4 == 0))\n      goto LAB_000348be;\n      param_2[2] = uVar2;\n      *param_2 = iVar4;\n      pbVar3 = (byte *)(iVar4 + param_2[1]);\n    }\n  }" { (expression_statement "uVar1 = param_2[2];" (assignment_expression "uVar1 = param_2[2]" identifier = (subscript_expression "param_2[2]" identifier [ number_literal ])) ;) (expression_statement "pbVar3 = (byte *)(param_2[1] + iVar4);" (assignment_expression "pbVar3 = (byte *)(param_2[1] + iVar4)" identifier = (cast_expression "(byte *)(param_2[1] + iVar4)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2[1] + iVar4)" ( (binary_expression "param_2[1] + iVar4" (subscript_expression "param_2[1]" identifier [ number_literal ]) + identifier) )))) ;) (if_statement "if (uVar1 <= param_2[1] + 1U) {\n      uVar2 = uVar1 * 2;\n      if ((uVar2 <= uVar1) || (iVar4 = (**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2), iVar4 == 0))\n      goto LAB_000348be;\n      param_2[2] = uVar2;\n      *param_2 = iVar4;\n      pbVar3 = (byte *)(iVar4 + param_2[1]);\n    }" if (parenthesized_expression "(uVar1 <= param_2[1] + 1U)" ( (binary_expression "uVar1 <= param_2[1] + 1U" identifier <= (binary_expression "param_2[1] + 1U" (subscript_expression "param_2[1]" identifier [ number_literal ]) + number_literal)) )) (compound_statement "{\n      uVar2 = uVar1 * 2;\n      if ((uVar2 <= uVar1) || (iVar4 = (**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2), iVar4 == 0))\n      goto LAB_000348be;\n      param_2[2] = uVar2;\n      *param_2 = iVar4;\n      pbVar3 = (byte *)(iVar4 + param_2[1]);\n    }" { (expression_statement "uVar2 = uVar1 * 2;" (assignment_expression "uVar2 = uVar1 * 2" identifier = (binary_expression "uVar1 * 2" identifier * number_literal)) ;) (if_statement "if ((uVar2 <= uVar1) || (iVar4 = (**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2), iVar4 == 0))\n      goto LAB_000348be;" if (parenthesized_expression "((uVar2 <= uVar1) || (iVar4 = (**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2), iVar4 == 0))" ( (binary_expression "(uVar2 <= uVar1) || (iVar4 = (**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2), iVar4 == 0)" (parenthesized_expression "(uVar2 <= uVar1)" ( (binary_expression "uVar2 <= uVar1" identifier <= identifier) )) || (parenthesized_expression "(iVar4 = (**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2), iVar4 == 0)" ( (comma_expression "iVar4 = (**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2), iVar4 == 0" (assignment_expression "iVar4 = (**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2)" identifier = (call_expression "(**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2)" (parenthesized_expression "(**(code **)(unaff_EBP + 0x7c832))" ( (pointer_expression "**(code **)(unaff_EBP + 0x7c832)" * (pointer_expression "*(code **)(unaff_EBP + 0x7c832)" * (cast_expression "(code **)(unaff_EBP + 0x7c832)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(unaff_EBP + 0x7c832)" ( (binary_expression "unaff_EBP + 0x7c832" identifier + number_literal) ))))) )) (argument_list "(iVar4,uVar2)" ( identifier , identifier )))) , (binary_expression "iVar4 == 0" identifier == number_literal)) ))) )) (goto_statement "goto LAB_000348be;" goto statement_identifier ;)) (expression_statement "param_2[2] = uVar2;" (assignment_expression "param_2[2] = uVar2" (subscript_expression "param_2[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*param_2 = iVar4;" (assignment_expression "*param_2 = iVar4" (pointer_expression "*param_2" * identifier) = identifier) ;) (expression_statement "pbVar3 = (byte *)(iVar4 + param_2[1]);" (assignment_expression "pbVar3 = (byte *)(iVar4 + param_2[1])" identifier = (cast_expression "(byte *)(iVar4 + param_2[1])" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + param_2[1])" ( (binary_expression "iVar4 + param_2[1]" identifier + (subscript_expression "param_2[1]" identifier [ number_literal ])) )))) ;) })) }))) (expression_statement "*pbVar3 = param_1;" (assignment_expression "*pbVar3 = param_1" (pointer_expression "*pbVar3" * identifier) = identifier) ;) (expression_statement "param_2[1] = param_2[1] + 1;" (assignment_expression "param_2[1] = param_2[1] + 1" (subscript_expression "param_2[1]" identifier [ number_literal ]) = (binary_expression "param_2[1] + 1" (subscript_expression "param_2[1]" identifier [ number_literal ]) + number_literal)) ;) (return_statement "return (uint)param_1;" return (cast_expression "(uint)param_1" ( (type_descriptor "uint" type_identifier) ) identifier) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bp replaced with injection: get_pc_thunk.bp */\n/* WARNING: Unknown calling convention */\n\nint alloc_addbyter(int output,FILE *data)\n\n{\n  char *pcVar1;\n  char *pcVar2;\n  void *pvVar3;\n  \n  pvVar3 = (void *)data->_flags;\n  if (pvVar3 == (void *)0x0) {\n    pcVar2 = (char *)(*Curl_cmalloc)(0x20);\n    data->_flags = (int)pcVar2;\n    if (pcVar2 == (char *)0x0) {\nLAB_000348be:\n      data->_IO_read_base = (char *)0x1;\n      return -1;\n    }\n    data->_IO_read_end = (char *)0x20;\n    data->_IO_read_ptr = (char *)0x0;\n  }\n  else {\n    pcVar1 = data->_IO_read_end;\n    pcVar2 = data->_IO_read_ptr + (int)pvVar3;\n    if (pcVar1 <= data->_IO_read_ptr + 1) {\n      pcVar2 = (char *)((int)pcVar1 * 2);\n      if ((pcVar2 <= pcVar1) ||\n         (pvVar3 = (*Curl_crealloc)(pvVar3,(size_t)pcVar2), pvVar3 == (void *)0x0))\n      goto LAB_000348be;\n      data->_IO_read_end = pcVar2;\n      data->_flags = (int)pvVar3;\n      pcVar2 = data->_IO_read_ptr + (int)pvVar3;\n    }\n  }\n  *pcVar2 = (char)output;\n  data->_IO_read_ptr = data->_IO_read_ptr + 1;\n  return output & 0xff;\n}\n\n" comment comment (function_definition "int alloc_addbyter(int output,FILE *data)\n\n{\n  char *pcVar1;\n  char *pcVar2;\n  void *pvVar3;\n  \n  pvVar3 = (void *)data->_flags;\n  if (pvVar3 == (void *)0x0) {\n    pcVar2 = (char *)(*Curl_cmalloc)(0x20);\n    data->_flags = (int)pcVar2;\n    if (pcVar2 == (char *)0x0) {\nLAB_000348be:\n      data->_IO_read_base = (char *)0x1;\n      return -1;\n    }\n    data->_IO_read_end = (char *)0x20;\n    data->_IO_read_ptr = (char *)0x0;\n  }\n  else {\n    pcVar1 = data->_IO_read_end;\n    pcVar2 = data->_IO_read_ptr + (int)pvVar3;\n    if (pcVar1 <= data->_IO_read_ptr + 1) {\n      pcVar2 = (char *)((int)pcVar1 * 2);\n      if ((pcVar2 <= pcVar1) ||\n         (pvVar3 = (*Curl_crealloc)(pvVar3,(size_t)pcVar2), pvVar3 == (void *)0x0))\n      goto LAB_000348be;\n      data->_IO_read_end = pcVar2;\n      data->_flags = (int)pvVar3;\n      pcVar2 = data->_IO_read_ptr + (int)pvVar3;\n    }\n  }\n  *pcVar2 = (char)output;\n  data->_IO_read_ptr = data->_IO_read_ptr + 1;\n  return output & 0xff;\n}" primitive_type (function_declarator "alloc_addbyter(int output,FILE *data)" identifier (parameter_list "(int output,FILE *data)" ( (parameter_declaration "int output" primitive_type identifier) , (parameter_declaration "FILE *data" type_identifier (pointer_declarator "*data" * identifier)) ))) (compound_statement "{\n  char *pcVar1;\n  char *pcVar2;\n  void *pvVar3;\n  \n  pvVar3 = (void *)data->_flags;\n  if (pvVar3 == (void *)0x0) {\n    pcVar2 = (char *)(*Curl_cmalloc)(0x20);\n    data->_flags = (int)pcVar2;\n    if (pcVar2 == (char *)0x0) {\nLAB_000348be:\n      data->_IO_read_base = (char *)0x1;\n      return -1;\n    }\n    data->_IO_read_end = (char *)0x20;\n    data->_IO_read_ptr = (char *)0x0;\n  }\n  else {\n    pcVar1 = data->_IO_read_end;\n    pcVar2 = data->_IO_read_ptr + (int)pvVar3;\n    if (pcVar1 <= data->_IO_read_ptr + 1) {\n      pcVar2 = (char *)((int)pcVar1 * 2);\n      if ((pcVar2 <= pcVar1) ||\n         (pvVar3 = (*Curl_crealloc)(pvVar3,(size_t)pcVar2), pvVar3 == (void *)0x0))\n      goto LAB_000348be;\n      data->_IO_read_end = pcVar2;\n      data->_flags = (int)pvVar3;\n      pcVar2 = data->_IO_read_ptr + (int)pvVar3;\n    }\n  }\n  *pcVar2 = (char)output;\n  data->_IO_read_ptr = data->_IO_read_ptr + 1;\n  return output & 0xff;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "void *pvVar3;" primitive_type (pointer_declarator "*pvVar3" * identifier) ;) (expression_statement "pvVar3 = (void *)data->_flags;" (assignment_expression "pvVar3 = (void *)data->_flags" identifier = (cast_expression "(void *)data->_flags" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (field_expression "data->_flags" identifier -> field_identifier))) ;) (if_statement "if (pvVar3 == (void *)0x0) {\n    pcVar2 = (char *)(*Curl_cmalloc)(0x20);\n    data->_flags = (int)pcVar2;\n    if (pcVar2 == (char *)0x0) {\nLAB_000348be:\n      data->_IO_read_base = (char *)0x1;\n      return -1;\n    }\n    data->_IO_read_end = (char *)0x20;\n    data->_IO_read_ptr = (char *)0x0;\n  }\n  else {\n    pcVar1 = data->_IO_read_end;\n    pcVar2 = data->_IO_read_ptr + (int)pvVar3;\n    if (pcVar1 <= data->_IO_read_ptr + 1) {\n      pcVar2 = (char *)((int)pcVar1 * 2);\n      if ((pcVar2 <= pcVar1) ||\n         (pvVar3 = (*Curl_crealloc)(pvVar3,(size_t)pcVar2), pvVar3 == (void *)0x0))\n      goto LAB_000348be;\n      data->_IO_read_end = pcVar2;\n      data->_flags = (int)pvVar3;\n      pcVar2 = data->_IO_read_ptr + (int)pvVar3;\n    }\n  }" if (parenthesized_expression "(pvVar3 == (void *)0x0)" ( (binary_expression "pvVar3 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pcVar2 = (char *)(*Curl_cmalloc)(0x20);\n    data->_flags = (int)pcVar2;\n    if (pcVar2 == (char *)0x0) {\nLAB_000348be:\n      data->_IO_read_base = (char *)0x1;\n      return -1;\n    }\n    data->_IO_read_end = (char *)0x20;\n    data->_IO_read_ptr = (char *)0x0;\n  }" { (expression_statement "pcVar2 = (char *)(*Curl_cmalloc)(0x20);" (assignment_expression "pcVar2 = (char *)(*Curl_cmalloc)(0x20)" identifier = (cast_expression "(char *)(*Curl_cmalloc)(0x20)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*Curl_cmalloc)(0x20)" (parenthesized_expression "(*Curl_cmalloc)" ( (pointer_expression "*Curl_cmalloc" * identifier) )) (argument_list "(0x20)" ( number_literal ))))) ;) (expression_statement "data->_flags = (int)pcVar2;" (assignment_expression "data->_flags = (int)pcVar2" (field_expression "data->_flags" identifier -> field_identifier) = (cast_expression "(int)pcVar2" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (if_statement "if (pcVar2 == (char *)0x0) {\nLAB_000348be:\n      data->_IO_read_base = (char *)0x1;\n      return -1;\n    }" if (parenthesized_expression "(pcVar2 == (char *)0x0)" ( (binary_expression "pcVar2 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\nLAB_000348be:\n      data->_IO_read_base = (char *)0x1;\n      return -1;\n    }" { (labeled_statement "LAB_000348be:\n      data->_IO_read_base = (char *)0x1;" statement_identifier : (expression_statement "data->_IO_read_base = (char *)0x1;" (assignment_expression "data->_IO_read_base = (char *)0x1" (field_expression "data->_IO_read_base" identifier -> field_identifier) = (cast_expression "(char *)0x1" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;)) (return_statement "return -1;" return number_literal ;) })) (expression_statement "data->_IO_read_end = (char *)0x20;" (assignment_expression "data->_IO_read_end = (char *)0x20" (field_expression "data->_IO_read_end" identifier -> field_identifier) = (cast_expression "(char *)0x20" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "data->_IO_read_ptr = (char *)0x0;" (assignment_expression "data->_IO_read_ptr = (char *)0x0" (field_expression "data->_IO_read_ptr" identifier -> field_identifier) = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }) (else_clause "else {\n    pcVar1 = data->_IO_read_end;\n    pcVar2 = data->_IO_read_ptr + (int)pvVar3;\n    if (pcVar1 <= data->_IO_read_ptr + 1) {\n      pcVar2 = (char *)((int)pcVar1 * 2);\n      if ((pcVar2 <= pcVar1) ||\n         (pvVar3 = (*Curl_crealloc)(pvVar3,(size_t)pcVar2), pvVar3 == (void *)0x0))\n      goto LAB_000348be;\n      data->_IO_read_end = pcVar2;\n      data->_flags = (int)pvVar3;\n      pcVar2 = data->_IO_read_ptr + (int)pvVar3;\n    }\n  }" else (compound_statement "{\n    pcVar1 = data->_IO_read_end;\n    pcVar2 = data->_IO_read_ptr + (int)pvVar3;\n    if (pcVar1 <= data->_IO_read_ptr + 1) {\n      pcVar2 = (char *)((int)pcVar1 * 2);\n      if ((pcVar2 <= pcVar1) ||\n         (pvVar3 = (*Curl_crealloc)(pvVar3,(size_t)pcVar2), pvVar3 == (void *)0x0))\n      goto LAB_000348be;\n      data->_IO_read_end = pcVar2;\n      data->_flags = (int)pvVar3;\n      pcVar2 = data->_IO_read_ptr + (int)pvVar3;\n    }\n  }" { (expression_statement "pcVar1 = data->_IO_read_end;" (assignment_expression "pcVar1 = data->_IO_read_end" identifier = (field_expression "data->_IO_read_end" identifier -> field_identifier)) ;) (expression_statement "pcVar2 = data->_IO_read_ptr + (int)pvVar3;" (assignment_expression "pcVar2 = data->_IO_read_ptr + (int)pvVar3" identifier = (binary_expression "data->_IO_read_ptr + (int)pvVar3" (field_expression "data->_IO_read_ptr" identifier -> field_identifier) + (cast_expression "(int)pvVar3" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (if_statement "if (pcVar1 <= data->_IO_read_ptr + 1) {\n      pcVar2 = (char *)((int)pcVar1 * 2);\n      if ((pcVar2 <= pcVar1) ||\n         (pvVar3 = (*Curl_crealloc)(pvVar3,(size_t)pcVar2), pvVar3 == (void *)0x0))\n      goto LAB_000348be;\n      data->_IO_read_end = pcVar2;\n      data->_flags = (int)pvVar3;\n      pcVar2 = data->_IO_read_ptr + (int)pvVar3;\n    }" if (parenthesized_expression "(pcVar1 <= data->_IO_read_ptr + 1)" ( (binary_expression "pcVar1 <= data->_IO_read_ptr + 1" identifier <= (binary_expression "data->_IO_read_ptr + 1" (field_expression "data->_IO_read_ptr" identifier -> field_identifier) + number_literal)) )) (compound_statement "{\n      pcVar2 = (char *)((int)pcVar1 * 2);\n      if ((pcVar2 <= pcVar1) ||\n         (pvVar3 = (*Curl_crealloc)(pvVar3,(size_t)pcVar2), pvVar3 == (void *)0x0))\n      goto LAB_000348be;\n      data->_IO_read_end = pcVar2;\n      data->_flags = (int)pvVar3;\n      pcVar2 = data->_IO_read_ptr + (int)pvVar3;\n    }" { (expression_statement "pcVar2 = (char *)((int)pcVar1 * 2);" (assignment_expression "pcVar2 = (char *)((int)pcVar1 * 2)" identifier = (cast_expression "(char *)((int)pcVar1 * 2)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pcVar1 * 2)" ( (binary_expression "(int)pcVar1 * 2" (cast_expression "(int)pcVar1" ( (type_descriptor "int" primitive_type) ) identifier) * number_literal) )))) ;) (if_statement "if ((pcVar2 <= pcVar1) ||\n         (pvVar3 = (*Curl_crealloc)(pvVar3,(size_t)pcVar2), pvVar3 == (void *)0x0))\n      goto LAB_000348be;" if (parenthesized_expression "((pcVar2 <= pcVar1) ||\n         (pvVar3 = (*Curl_crealloc)(pvVar3,(size_t)pcVar2), pvVar3 == (void *)0x0))" ( (binary_expression "(pcVar2 <= pcVar1) ||\n         (pvVar3 = (*Curl_crealloc)(pvVar3,(size_t)pcVar2), pvVar3 == (void *)0x0)" (parenthesized_expression "(pcVar2 <= pcVar1)" ( (binary_expression "pcVar2 <= pcVar1" identifier <= identifier) )) || (parenthesized_expression "(pvVar3 = (*Curl_crealloc)(pvVar3,(size_t)pcVar2), pvVar3 == (void *)0x0)" ( (comma_expression "pvVar3 = (*Curl_crealloc)(pvVar3,(size_t)pcVar2), pvVar3 == (void *)0x0" (assignment_expression "pvVar3 = (*Curl_crealloc)(pvVar3,(size_t)pcVar2)" identifier = (call_expression "(*Curl_crealloc)(pvVar3,(size_t)pcVar2)" (parenthesized_expression "(*Curl_crealloc)" ( (pointer_expression "*Curl_crealloc" * identifier) )) (argument_list "(pvVar3,(size_t)pcVar2)" ( identifier , (cast_expression "(size_t)pcVar2" ( (type_descriptor "size_t" primitive_type) ) identifier) )))) , (binary_expression "pvVar3 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal))) ))) )) (goto_statement "goto LAB_000348be;" goto statement_identifier ;)) (expression_statement "data->_IO_read_end = pcVar2;" (assignment_expression "data->_IO_read_end = pcVar2" (field_expression "data->_IO_read_end" identifier -> field_identifier) = identifier) ;) (expression_statement "data->_flags = (int)pvVar3;" (assignment_expression "data->_flags = (int)pvVar3" (field_expression "data->_flags" identifier -> field_identifier) = (cast_expression "(int)pvVar3" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "pcVar2 = data->_IO_read_ptr + (int)pvVar3;" (assignment_expression "pcVar2 = data->_IO_read_ptr + (int)pvVar3" identifier = (binary_expression "data->_IO_read_ptr + (int)pvVar3" (field_expression "data->_IO_read_ptr" identifier -> field_identifier) + (cast_expression "(int)pvVar3" ( (type_descriptor "int" primitive_type) ) identifier))) ;) })) }))) (expression_statement "*pcVar2 = (char)output;" (assignment_expression "*pcVar2 = (char)output" (pointer_expression "*pcVar2" * identifier) = (cast_expression "(char)output" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (expression_statement "data->_IO_read_ptr = data->_IO_read_ptr + 1;" (assignment_expression "data->_IO_read_ptr = data->_IO_read_ptr + 1" (field_expression "data->_IO_read_ptr" identifier -> field_identifier) = (binary_expression "data->_IO_read_ptr + 1" (field_expression "data->_IO_read_ptr" identifier -> field_identifier) + number_literal)) ;) (return_statement "return output & 0xff;" return (binary_expression "output & 0xff" identifier & number_literal) ;) })))
(translation_unit "uint FUN_00034830(byte param_1,int *param_2)\n\n{\n  uint uVar1;\n  uint uVar2;\n  byte *pbVar3;\n  int iVar4;\n  int unaff_EBP;\n  \n  FUN_0001e6b4();\n  iVar4 = *param_2;\n  if (iVar4 == 0) {\n    pbVar3 = (byte *)(**(code **)(unaff_EBP + 0x7c83a))(0x20);\n    *param_2 = (int)pbVar3;\n    if (pbVar3 == (byte *)0x0) {\nLAB_000348be:\n      param_2[3] = 1;\n      return 0xffffffff;\n    }\n    param_2[2] = 0x20;\n    param_2[1] = 0;\n  }\n  else {\n    uVar1 = param_2[2];\n    pbVar3 = (byte *)(param_2[1] + iVar4);\n    if (uVar1 <= param_2[1] + 1U) {\n      uVar2 = uVar1 * 2;\n      if ((uVar2 <= uVar1) || (iVar4 = (**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2), iVar4 == 0))\n      goto LAB_000348be;\n      param_2[2] = uVar2;\n      *param_2 = iVar4;\n      pbVar3 = (byte *)(iVar4 + param_2[1]);\n    }\n  }\n  *pbVar3 = param_1;\n  param_2[1] = param_2[1] + 1;\n  return (uint)param_1;\n}\n\n" (function_definition "uint FUN_00034830(byte param_1,int *param_2)\n\n{\n  uint uVar1;\n  uint uVar2;\n  byte *pbVar3;\n  int iVar4;\n  int unaff_EBP;\n  \n  FUN_0001e6b4();\n  iVar4 = *param_2;\n  if (iVar4 == 0) {\n    pbVar3 = (byte *)(**(code **)(unaff_EBP + 0x7c83a))(0x20);\n    *param_2 = (int)pbVar3;\n    if (pbVar3 == (byte *)0x0) {\nLAB_000348be:\n      param_2[3] = 1;\n      return 0xffffffff;\n    }\n    param_2[2] = 0x20;\n    param_2[1] = 0;\n  }\n  else {\n    uVar1 = param_2[2];\n    pbVar3 = (byte *)(param_2[1] + iVar4);\n    if (uVar1 <= param_2[1] + 1U) {\n      uVar2 = uVar1 * 2;\n      if ((uVar2 <= uVar1) || (iVar4 = (**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2), iVar4 == 0))\n      goto LAB_000348be;\n      param_2[2] = uVar2;\n      *param_2 = iVar4;\n      pbVar3 = (byte *)(iVar4 + param_2[1]);\n    }\n  }\n  *pbVar3 = param_1;\n  param_2[1] = param_2[1] + 1;\n  return (uint)param_1;\n}" type_identifier (function_declarator "FUN_00034830(byte param_1,int *param_2)" identifier (parameter_list "(byte param_1,int *param_2)" ( (parameter_declaration "byte param_1" type_identifier identifier) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  uint uVar2;\n  byte *pbVar3;\n  int iVar4;\n  int unaff_EBP;\n  \n  FUN_0001e6b4();\n  iVar4 = *param_2;\n  if (iVar4 == 0) {\n    pbVar3 = (byte *)(**(code **)(unaff_EBP + 0x7c83a))(0x20);\n    *param_2 = (int)pbVar3;\n    if (pbVar3 == (byte *)0x0) {\nLAB_000348be:\n      param_2[3] = 1;\n      return 0xffffffff;\n    }\n    param_2[2] = 0x20;\n    param_2[1] = 0;\n  }\n  else {\n    uVar1 = param_2[2];\n    pbVar3 = (byte *)(param_2[1] + iVar4);\n    if (uVar1 <= param_2[1] + 1U) {\n      uVar2 = uVar1 * 2;\n      if ((uVar2 <= uVar1) || (iVar4 = (**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2), iVar4 == 0))\n      goto LAB_000348be;\n      param_2[2] = uVar2;\n      *param_2 = iVar4;\n      pbVar3 = (byte *)(iVar4 + param_2[1]);\n    }\n  }\n  *pbVar3 = param_1;\n  param_2[1] = param_2[1] + 1;\n  return (uint)param_1;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "byte *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int unaff_EBP;" primitive_type identifier ;) (expression_statement "FUN_0001e6b4();" (call_expression "FUN_0001e6b4()" identifier (argument_list "()" ( ))) ;) (expression_statement "iVar4 = *param_2;" (assignment_expression "iVar4 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (if_statement "if (iVar4 == 0) {\n    pbVar3 = (byte *)(**(code **)(unaff_EBP + 0x7c83a))(0x20);\n    *param_2 = (int)pbVar3;\n    if (pbVar3 == (byte *)0x0) {\nLAB_000348be:\n      param_2[3] = 1;\n      return 0xffffffff;\n    }\n    param_2[2] = 0x20;\n    param_2[1] = 0;\n  }\n  else {\n    uVar1 = param_2[2];\n    pbVar3 = (byte *)(param_2[1] + iVar4);\n    if (uVar1 <= param_2[1] + 1U) {\n      uVar2 = uVar1 * 2;\n      if ((uVar2 <= uVar1) || (iVar4 = (**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2), iVar4 == 0))\n      goto LAB_000348be;\n      param_2[2] = uVar2;\n      *param_2 = iVar4;\n      pbVar3 = (byte *)(iVar4 + param_2[1]);\n    }\n  }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n    pbVar3 = (byte *)(**(code **)(unaff_EBP + 0x7c83a))(0x20);\n    *param_2 = (int)pbVar3;\n    if (pbVar3 == (byte *)0x0) {\nLAB_000348be:\n      param_2[3] = 1;\n      return 0xffffffff;\n    }\n    param_2[2] = 0x20;\n    param_2[1] = 0;\n  }" { (expression_statement "pbVar3 = (byte *)(**(code **)(unaff_EBP + 0x7c83a))(0x20);" (assignment_expression "pbVar3 = (byte *)(**(code **)(unaff_EBP + 0x7c83a))(0x20)" identifier = (cast_expression "(byte *)(**(code **)(unaff_EBP + 0x7c83a))(0x20)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(**(code **)(unaff_EBP + 0x7c83a))(0x20)" (parenthesized_expression "(**(code **)(unaff_EBP + 0x7c83a))" ( (pointer_expression "**(code **)(unaff_EBP + 0x7c83a)" * (pointer_expression "*(code **)(unaff_EBP + 0x7c83a)" * (cast_expression "(code **)(unaff_EBP + 0x7c83a)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(unaff_EBP + 0x7c83a)" ( (binary_expression "unaff_EBP + 0x7c83a" identifier + number_literal) ))))) )) (argument_list "(0x20)" ( number_literal ))))) ;) (expression_statement "*param_2 = (int)pbVar3;" (assignment_expression "*param_2 = (int)pbVar3" (pointer_expression "*param_2" * identifier) = (cast_expression "(int)pbVar3" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (if_statement "if (pbVar3 == (byte *)0x0) {\nLAB_000348be:\n      param_2[3] = 1;\n      return 0xffffffff;\n    }" if (parenthesized_expression "(pbVar3 == (byte *)0x0)" ( (binary_expression "pbVar3 == (byte *)0x0" identifier == (cast_expression "(byte *)0x0" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\nLAB_000348be:\n      param_2[3] = 1;\n      return 0xffffffff;\n    }" { (labeled_statement "LAB_000348be:\n      param_2[3] = 1;" statement_identifier : (expression_statement "param_2[3] = 1;" (assignment_expression "param_2[3] = 1" (subscript_expression "param_2[3]" identifier [ number_literal ]) = number_literal) ;)) (return_statement "return 0xffffffff;" return number_literal ;) })) (expression_statement "param_2[2] = 0x20;" (assignment_expression "param_2[2] = 0x20" (subscript_expression "param_2[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "param_2[1] = 0;" (assignment_expression "param_2[1] = 0" (subscript_expression "param_2[1]" identifier [ number_literal ]) = number_literal) ;) }) (else_clause "else {\n    uVar1 = param_2[2];\n    pbVar3 = (byte *)(param_2[1] + iVar4);\n    if (uVar1 <= param_2[1] + 1U) {\n      uVar2 = uVar1 * 2;\n      if ((uVar2 <= uVar1) || (iVar4 = (**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2), iVar4 == 0))\n      goto LAB_000348be;\n      param_2[2] = uVar2;\n      *param_2 = iVar4;\n      pbVar3 = (byte *)(iVar4 + param_2[1]);\n    }\n  }" else (compound_statement "{\n    uVar1 = param_2[2];\n    pbVar3 = (byte *)(param_2[1] + iVar4);\n    if (uVar1 <= param_2[1] + 1U) {\n      uVar2 = uVar1 * 2;\n      if ((uVar2 <= uVar1) || (iVar4 = (**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2), iVar4 == 0))\n      goto LAB_000348be;\n      param_2[2] = uVar2;\n      *param_2 = iVar4;\n      pbVar3 = (byte *)(iVar4 + param_2[1]);\n    }\n  }" { (expression_statement "uVar1 = param_2[2];" (assignment_expression "uVar1 = param_2[2]" identifier = (subscript_expression "param_2[2]" identifier [ number_literal ])) ;) (expression_statement "pbVar3 = (byte *)(param_2[1] + iVar4);" (assignment_expression "pbVar3 = (byte *)(param_2[1] + iVar4)" identifier = (cast_expression "(byte *)(param_2[1] + iVar4)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2[1] + iVar4)" ( (binary_expression "param_2[1] + iVar4" (subscript_expression "param_2[1]" identifier [ number_literal ]) + identifier) )))) ;) (if_statement "if (uVar1 <= param_2[1] + 1U) {\n      uVar2 = uVar1 * 2;\n      if ((uVar2 <= uVar1) || (iVar4 = (**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2), iVar4 == 0))\n      goto LAB_000348be;\n      param_2[2] = uVar2;\n      *param_2 = iVar4;\n      pbVar3 = (byte *)(iVar4 + param_2[1]);\n    }" if (parenthesized_expression "(uVar1 <= param_2[1] + 1U)" ( (binary_expression "uVar1 <= param_2[1] + 1U" identifier <= (binary_expression "param_2[1] + 1U" (subscript_expression "param_2[1]" identifier [ number_literal ]) + number_literal)) )) (compound_statement "{\n      uVar2 = uVar1 * 2;\n      if ((uVar2 <= uVar1) || (iVar4 = (**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2), iVar4 == 0))\n      goto LAB_000348be;\n      param_2[2] = uVar2;\n      *param_2 = iVar4;\n      pbVar3 = (byte *)(iVar4 + param_2[1]);\n    }" { (expression_statement "uVar2 = uVar1 * 2;" (assignment_expression "uVar2 = uVar1 * 2" identifier = (binary_expression "uVar1 * 2" identifier * number_literal)) ;) (if_statement "if ((uVar2 <= uVar1) || (iVar4 = (**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2), iVar4 == 0))\n      goto LAB_000348be;" if (parenthesized_expression "((uVar2 <= uVar1) || (iVar4 = (**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2), iVar4 == 0))" ( (binary_expression "(uVar2 <= uVar1) || (iVar4 = (**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2), iVar4 == 0)" (parenthesized_expression "(uVar2 <= uVar1)" ( (binary_expression "uVar2 <= uVar1" identifier <= identifier) )) || (parenthesized_expression "(iVar4 = (**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2), iVar4 == 0)" ( (comma_expression "iVar4 = (**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2), iVar4 == 0" (assignment_expression "iVar4 = (**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2)" identifier = (call_expression "(**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2)" (parenthesized_expression "(**(code **)(unaff_EBP + 0x7c832))" ( (pointer_expression "**(code **)(unaff_EBP + 0x7c832)" * (pointer_expression "*(code **)(unaff_EBP + 0x7c832)" * (cast_expression "(code **)(unaff_EBP + 0x7c832)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(unaff_EBP + 0x7c832)" ( (binary_expression "unaff_EBP + 0x7c832" identifier + number_literal) ))))) )) (argument_list "(iVar4,uVar2)" ( identifier , identifier )))) , (binary_expression "iVar4 == 0" identifier == number_literal)) ))) )) (goto_statement "goto LAB_000348be;" goto statement_identifier ;)) (expression_statement "param_2[2] = uVar2;" (assignment_expression "param_2[2] = uVar2" (subscript_expression "param_2[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*param_2 = iVar4;" (assignment_expression "*param_2 = iVar4" (pointer_expression "*param_2" * identifier) = identifier) ;) (expression_statement "pbVar3 = (byte *)(iVar4 + param_2[1]);" (assignment_expression "pbVar3 = (byte *)(iVar4 + param_2[1])" identifier = (cast_expression "(byte *)(iVar4 + param_2[1])" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + param_2[1])" ( (binary_expression "iVar4 + param_2[1]" identifier + (subscript_expression "param_2[1]" identifier [ number_literal ])) )))) ;) })) }))) (expression_statement "*pbVar3 = param_1;" (assignment_expression "*pbVar3 = param_1" (pointer_expression "*pbVar3" * identifier) = identifier) ;) (expression_statement "param_2[1] = param_2[1] + 1;" (assignment_expression "param_2[1] = param_2[1] + 1" (subscript_expression "param_2[1]" identifier [ number_literal ]) = (binary_expression "param_2[1] + 1" (subscript_expression "param_2[1]" identifier [ number_literal ]) + number_literal)) ;) (return_statement "return (uint)param_1;" return (cast_expression "(uint)param_1" ( (type_descriptor "uint" type_identifier) ) identifier) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (argument_list ( LIT ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;)) (return_statement return LIT ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= (binary_expression (subscript_expression IDENT [ LIT ]) + LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT * LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) || (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (argument_list ( IDENT , IDENT )))) , (binary_expression IDENT == LIT)) ))) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (subscript_expression IDENT [ LIT ])) )))) ;) })) }))) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression (subscript_expression IDENT [ LIT ]) + LIT)) ;) (return_statement return (cast_expression ( (type_descriptor TYPE) ) IDENT) ;) })))
(function_definition "uint FUN_00034830(byte param_1,int *param_2)\n\n{\n  uint uVar1;\n  uint uVar2;\n  byte *pbVar3;\n  int iVar4;\n  int unaff_EBP;\n  \n  FUN_0001e6b4();\n  iVar4 = *param_2;\n  if (iVar4 == 0) {\n    pbVar3 = (byte *)(**(code **)(unaff_EBP + 0x7c83a))(0x20);\n    *param_2 = (int)pbVar3;\n    if (pbVar3 == (byte *)0x0) {\nLAB_000348be:\n      param_2[3] = 1;\n      return 0xffffffff;\n    }\n    param_2[2] = 0x20;\n    param_2[1] = 0;\n  }\n  else {\n    uVar1 = param_2[2];\n    pbVar3 = (byte *)(param_2[1] + iVar4);\n    if (uVar1 <= param_2[1] + 1U) {\n      uVar2 = uVar1 * 2;\n      if ((uVar2 <= uVar1) || (iVar4 = (**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2), iVar4 == 0))\n      goto LAB_000348be;\n      param_2[2] = uVar2;\n      *param_2 = iVar4;\n      pbVar3 = (byte *)(iVar4 + param_2[1]);\n    }\n  }\n  *pbVar3 = param_1;\n  param_2[1] = param_2[1] + 1;\n  return (uint)param_1;\n}" (type_identifier "uint") (function_declarator "FUN_00034830(byte param_1,int *param_2)" (identifier "FUN_00034830") (parameter_list "(byte param_1,int *param_2)" (( "(") (parameter_declaration "byte param_1" (type_identifier "byte") (identifier "param_1")) (, ",") (parameter_declaration "int *param_2" (primitive_type "int") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  uint uVar1;\n  uint uVar2;\n  byte *pbVar3;\n  int iVar4;\n  int unaff_EBP;\n  \n  FUN_0001e6b4();\n  iVar4 = *param_2;\n  if (iVar4 == 0) {\n    pbVar3 = (byte *)(**(code **)(unaff_EBP + 0x7c83a))(0x20);\n    *param_2 = (int)pbVar3;\n    if (pbVar3 == (byte *)0x0) {\nLAB_000348be:\n      param_2[3] = 1;\n      return 0xffffffff;\n    }\n    param_2[2] = 0x20;\n    param_2[1] = 0;\n  }\n  else {\n    uVar1 = param_2[2];\n    pbVar3 = (byte *)(param_2[1] + iVar4);\n    if (uVar1 <= param_2[1] + 1U) {\n      uVar2 = uVar1 * 2;\n      if ((uVar2 <= uVar1) || (iVar4 = (**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2), iVar4 == 0))\n      goto LAB_000348be;\n      param_2[2] = uVar2;\n      *param_2 = iVar4;\n      pbVar3 = (byte *)(iVar4 + param_2[1]);\n    }\n  }\n  *pbVar3 = param_1;\n  param_2[1] = param_2[1] + 1;\n  return (uint)param_1;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "byte *pbVar3;" (type_identifier "byte") (pointer_declarator "*pbVar3" (* "*") (identifier "pbVar3")) (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "int unaff_EBP;" (primitive_type "int") (identifier "unaff_EBP") (; ";")) (expression_statement "FUN_0001e6b4();" (call_expression "FUN_0001e6b4()" (identifier "FUN_0001e6b4") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "iVar4 = *param_2;" (assignment_expression "iVar4 = *param_2" (identifier "iVar4") (= "=") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (; ";")) (if_statement "if (iVar4 == 0) {\n    pbVar3 = (byte *)(**(code **)(unaff_EBP + 0x7c83a))(0x20);\n    *param_2 = (int)pbVar3;\n    if (pbVar3 == (byte *)0x0) {\nLAB_000348be:\n      param_2[3] = 1;\n      return 0xffffffff;\n    }\n    param_2[2] = 0x20;\n    param_2[1] = 0;\n  }\n  else {\n    uVar1 = param_2[2];\n    pbVar3 = (byte *)(param_2[1] + iVar4);\n    if (uVar1 <= param_2[1] + 1U) {\n      uVar2 = uVar1 * 2;\n      if ((uVar2 <= uVar1) || (iVar4 = (**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2), iVar4 == 0))\n      goto LAB_000348be;\n      param_2[2] = uVar2;\n      *param_2 = iVar4;\n      pbVar3 = (byte *)(iVar4 + param_2[1]);\n    }\n  }" (if "if") (parenthesized_expression "(iVar4 == 0)" (( "(") (binary_expression "iVar4 == 0" (identifier "iVar4") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    pbVar3 = (byte *)(**(code **)(unaff_EBP + 0x7c83a))(0x20);\n    *param_2 = (int)pbVar3;\n    if (pbVar3 == (byte *)0x0) {\nLAB_000348be:\n      param_2[3] = 1;\n      return 0xffffffff;\n    }\n    param_2[2] = 0x20;\n    param_2[1] = 0;\n  }" ({ "{") (expression_statement "pbVar3 = (byte *)(**(code **)(unaff_EBP + 0x7c83a))(0x20);" (assignment_expression "pbVar3 = (byte *)(**(code **)(unaff_EBP + 0x7c83a))(0x20)" (identifier "pbVar3") (= "=") (cast_expression "(byte *)(**(code **)(unaff_EBP + 0x7c83a))(0x20)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(**(code **)(unaff_EBP + 0x7c83a))(0x20)" (parenthesized_expression "(**(code **)(unaff_EBP + 0x7c83a))" (( "(") (pointer_expression "**(code **)(unaff_EBP + 0x7c83a)" (* "*") (pointer_expression "*(code **)(unaff_EBP + 0x7c83a)" (* "*") (cast_expression "(code **)(unaff_EBP + 0x7c83a)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(unaff_EBP + 0x7c83a)" (( "(") (binary_expression "unaff_EBP + 0x7c83a" (identifier "unaff_EBP") (+ "+") (number_literal "0x7c83a")) () ")"))))) () ")")) (argument_list "(0x20)" (( "(") (number_literal "0x20") () ")"))))) (; ";")) (expression_statement "*param_2 = (int)pbVar3;" (assignment_expression "*param_2 = (int)pbVar3" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (cast_expression "(int)pbVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pbVar3"))) (; ";")) (if_statement "if (pbVar3 == (byte *)0x0) {\nLAB_000348be:\n      param_2[3] = 1;\n      return 0xffffffff;\n    }" (if "if") (parenthesized_expression "(pbVar3 == (byte *)0x0)" (( "(") (binary_expression "pbVar3 == (byte *)0x0" (identifier "pbVar3") (== "==") (cast_expression "(byte *)0x0" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\nLAB_000348be:\n      param_2[3] = 1;\n      return 0xffffffff;\n    }" ({ "{") (labeled_statement "LAB_000348be:\n      param_2[3] = 1;" (statement_identifier "LAB_000348be") (: ":") (expression_statement "param_2[3] = 1;" (assignment_expression "param_2[3] = 1" (subscript_expression "param_2[3]" (identifier "param_2") ([ "[") (number_literal "3") (] "]")) (= "=") (number_literal "1")) (; ";"))) (return_statement "return 0xffffffff;" (return "return") (number_literal "0xffffffff") (; ";")) (} "}"))) (expression_statement "param_2[2] = 0x20;" (assignment_expression "param_2[2] = 0x20" (subscript_expression "param_2[2]" (identifier "param_2") ([ "[") (number_literal "2") (] "]")) (= "=") (number_literal "0x20")) (; ";")) (expression_statement "param_2[1] = 0;" (assignment_expression "param_2[1] = 0" (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n    uVar1 = param_2[2];\n    pbVar3 = (byte *)(param_2[1] + iVar4);\n    if (uVar1 <= param_2[1] + 1U) {\n      uVar2 = uVar1 * 2;\n      if ((uVar2 <= uVar1) || (iVar4 = (**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2), iVar4 == 0))\n      goto LAB_000348be;\n      param_2[2] = uVar2;\n      *param_2 = iVar4;\n      pbVar3 = (byte *)(iVar4 + param_2[1]);\n    }\n  }" (else "else") (compound_statement "{\n    uVar1 = param_2[2];\n    pbVar3 = (byte *)(param_2[1] + iVar4);\n    if (uVar1 <= param_2[1] + 1U) {\n      uVar2 = uVar1 * 2;\n      if ((uVar2 <= uVar1) || (iVar4 = (**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2), iVar4 == 0))\n      goto LAB_000348be;\n      param_2[2] = uVar2;\n      *param_2 = iVar4;\n      pbVar3 = (byte *)(iVar4 + param_2[1]);\n    }\n  }" ({ "{") (expression_statement "uVar1 = param_2[2];" (assignment_expression "uVar1 = param_2[2]" (identifier "uVar1") (= "=") (subscript_expression "param_2[2]" (identifier "param_2") ([ "[") (number_literal "2") (] "]"))) (; ";")) (expression_statement "pbVar3 = (byte *)(param_2[1] + iVar4);" (assignment_expression "pbVar3 = (byte *)(param_2[1] + iVar4)" (identifier "pbVar3") (= "=") (cast_expression "(byte *)(param_2[1] + iVar4)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2[1] + iVar4)" (( "(") (binary_expression "param_2[1] + iVar4" (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]")) (+ "+") (identifier "iVar4")) () ")")))) (; ";")) (if_statement "if (uVar1 <= param_2[1] + 1U) {\n      uVar2 = uVar1 * 2;\n      if ((uVar2 <= uVar1) || (iVar4 = (**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2), iVar4 == 0))\n      goto LAB_000348be;\n      param_2[2] = uVar2;\n      *param_2 = iVar4;\n      pbVar3 = (byte *)(iVar4 + param_2[1]);\n    }" (if "if") (parenthesized_expression "(uVar1 <= param_2[1] + 1U)" (( "(") (binary_expression "uVar1 <= param_2[1] + 1U" (identifier "uVar1") (<= "<=") (binary_expression "param_2[1] + 1U" (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]")) (+ "+") (number_literal "1U"))) () ")")) (compound_statement "{\n      uVar2 = uVar1 * 2;\n      if ((uVar2 <= uVar1) || (iVar4 = (**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2), iVar4 == 0))\n      goto LAB_000348be;\n      param_2[2] = uVar2;\n      *param_2 = iVar4;\n      pbVar3 = (byte *)(iVar4 + param_2[1]);\n    }" ({ "{") (expression_statement "uVar2 = uVar1 * 2;" (assignment_expression "uVar2 = uVar1 * 2" (identifier "uVar2") (= "=") (binary_expression "uVar1 * 2" (identifier "uVar1") (* "*") (number_literal "2"))) (; ";")) (if_statement "if ((uVar2 <= uVar1) || (iVar4 = (**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2), iVar4 == 0))\n      goto LAB_000348be;" (if "if") (parenthesized_expression "((uVar2 <= uVar1) || (iVar4 = (**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2), iVar4 == 0))" (( "(") (binary_expression "(uVar2 <= uVar1) || (iVar4 = (**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2), iVar4 == 0)" (parenthesized_expression "(uVar2 <= uVar1)" (( "(") (binary_expression "uVar2 <= uVar1" (identifier "uVar2") (<= "<=") (identifier "uVar1")) () ")")) (|| "||") (parenthesized_expression "(iVar4 = (**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2), iVar4 == 0)" (( "(") (comma_expression "iVar4 = (**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2), iVar4 == 0" (assignment_expression "iVar4 = (**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2)" (identifier "iVar4") (= "=") (call_expression "(**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2)" (parenthesized_expression "(**(code **)(unaff_EBP + 0x7c832))" (( "(") (pointer_expression "**(code **)(unaff_EBP + 0x7c832)" (* "*") (pointer_expression "*(code **)(unaff_EBP + 0x7c832)" (* "*") (cast_expression "(code **)(unaff_EBP + 0x7c832)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(unaff_EBP + 0x7c832)" (( "(") (binary_expression "unaff_EBP + 0x7c832" (identifier "unaff_EBP") (+ "+") (number_literal "0x7c832")) () ")"))))) () ")")) (argument_list "(iVar4,uVar2)" (( "(") (identifier "iVar4") (, ",") (identifier "uVar2") () ")")))) (, ",") (binary_expression "iVar4 == 0" (identifier "iVar4") (== "==") (number_literal "0"))) () ")"))) () ")")) (goto_statement "goto LAB_000348be;" (goto "goto") (statement_identifier "LAB_000348be") (; ";"))) (expression_statement "param_2[2] = uVar2;" (assignment_expression "param_2[2] = uVar2" (subscript_expression "param_2[2]" (identifier "param_2") ([ "[") (number_literal "2") (] "]")) (= "=") (identifier "uVar2")) (; ";")) (expression_statement "*param_2 = iVar4;" (assignment_expression "*param_2 = iVar4" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (identifier "iVar4")) (; ";")) (expression_statement "pbVar3 = (byte *)(iVar4 + param_2[1]);" (assignment_expression "pbVar3 = (byte *)(iVar4 + param_2[1])" (identifier "pbVar3") (= "=") (cast_expression "(byte *)(iVar4 + param_2[1])" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + param_2[1])" (( "(") (binary_expression "iVar4 + param_2[1]" (identifier "iVar4") (+ "+") (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]"))) () ")")))) (; ";")) (} "}"))) (} "}")))) (expression_statement "*pbVar3 = param_1;" (assignment_expression "*pbVar3 = param_1" (pointer_expression "*pbVar3" (* "*") (identifier "pbVar3")) (= "=") (identifier "param_1")) (; ";")) (expression_statement "param_2[1] = param_2[1] + 1;" (assignment_expression "param_2[1] = param_2[1] + 1" (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]")) (= "=") (binary_expression "param_2[1] + 1" (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]")) (+ "+") (number_literal "1"))) (; ";")) (return_statement "return (uint)param_1;" (return "return") (cast_expression "(uint)param_1" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "param_1")) (; ";")) (} "}")))

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

int function_1(int var_4,type_1 *data)

{
  char *var_3;
  char *var_2;
  void *var_1;
  
  var_1 = (void *)data->_flags;
  if (var_1 == (void *)0x0) {
    var_2 = (char *)(*Curl_cmalloc)(0x20);
    data->_flags = (int)var_2;
    if (var_2 == (char *)0x0) {
LAB_000348be:
      data->_IO_read_base = (char *)0x1;
      return -1;
    }
    data->_IO_read_end = (char *)0x20;
    data->_IO_read_ptr = (char *)0x0;
  }
  else {
    var_3 = data->_IO_read_end;
    var_2 = data->_IO_read_ptr + (int)var_1;
    if (var_3 <= data->_IO_read_ptr + 1) {
      var_2 = (char *)((int)var_3 * 2);
      if ((var_2 <= var_3) ||
         (var_1 = (*Curl_crealloc)(var_1,(size_t)var_2), var_1 == (void *)0x0))
      goto LAB_000348be;
      data->_IO_read_end = var_2;
      data->_flags = (int)var_1;
      var_2 = data->_IO_read_ptr + (int)var_1;
    }
  }
  *var_2 = (char)var_4;
  data->_IO_read_ptr = data->_IO_read_ptr + 1;
  return var_4 & 0xff;
}


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

uint MASKED(byte param_1,int *param_2)

{
  uint uVar1;
  uint uVar2;
  byte *pbVar3;
  int iVar4;
  int unaff_EBP;
  
  FUN_0001e6b4();
  iVar4 = *param_2;
  if (iVar4 == 0) {
    pbVar3 = (byte *)(**(code **)(unaff_EBP + 0x7c83a))(0x20);
    *param_2 = (int)pbVar3;
    if (pbVar3 == (byte *)0x0) {
LAB_000348be:
      param_2[3] = 1;
      return 0xffffffff;
    }
    param_2[2] = 0x20;
    param_2[1] = 0;
  }
  else {
    uVar1 = param_2[2];
    pbVar3 = (byte *)(param_2[1] + iVar4);
    if (uVar1 <= param_2[1] + 1U) {
      uVar2 = uVar1 * 2;
      if ((uVar2 <= uVar1) || (iVar4 = (**(code **)(unaff_EBP + 0x7c832))(iVar4,uVar2), iVar4 == 0))
      goto LAB_000348be;
      param_2[2] = uVar2;
      *param_2 = iVar4;
      pbVar3 = (byte *)(iVar4 + param_2[1]);
    }
  }
  *pbVar3 = param_1;
  param_2[1] = param_2[1] + 1;
  return (uint)param_1;
}

