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

char * quotearg_alloc_mem(char *arg,size_t argsize,size_t *size,quoting_options *o)

{
  int iVar1;
  int *piVar2;
  uint flags;
  size_t sVar3;
  char *buffer;
  
  if (o == (quoting_options *)0x0) {
    o = &default_quoting_options;
  }
  piVar2 = __errno_location();
  iVar1 = *piVar2;
  flags = (uint)(size == (size_t *)0x0) | o->flags;
  sVar3 = quotearg_buffer_restyled
                    ((char *)0x0,0,arg,argsize,o->style,flags,o->quote_these_too,o->left_quote,
                     o->right_quote);
  buffer = (char *)xmalloc(sVar3 + 1);
  quotearg_buffer_restyled
            (buffer,sVar3 + 1,arg,argsize,o->style,flags,o->quote_these_too,o->left_quote,
             o->right_quote);
  *piVar2 = iVar1;
  if (size != (size_t *)0x0) {
    *size = sVar3;
  }
  return buffer;
}



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

undefined4 FUN_00016080(undefined4 param_1,undefined4 param_2,int *param_3,undefined4 *param_4)

{
  int iVar1;
  int *piVar2;
  uint uVar3;
  int iVar4;
  undefined4 uVar5;
  
  if (param_4 == (undefined4 *)0x0) {
    param_4 = &DAT_0001e2c0;
  }
  piVar2 = __errno_location();
  iVar1 = *piVar2;
  uVar3 = (uint)(param_3 == (int *)0x0) | param_4[1];
  iVar4 = FUN_00014a20(param_2,*param_4,uVar3,param_4 + 2,param_4[10],param_4[0xb]);
  uVar5 = FUN_00016ea0(iVar4 + 1);
  FUN_00014a20(param_2,*param_4,uVar3,param_4 + 2,param_4[10],param_4[0xb]);
  *piVar2 = iVar1;
  if (param_3 != (int *)0x0) {
    *param_3 = iVar4;
  }
  return uVar5;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x000125d0
ADD EBX,0x7f77
SUB ESP,0x1c
MOV ESI,dword ptr [ESP + 0x3c]
TEST ESI,ESI
LEA EAX,[EBX + 0x2c0]
CMOVZ ESI,EAX
CALL 0x00011270
MOV EDX,dword ptr [ESP + 0x38]
MOV EBP,EAX
MOV EAX,dword ptr [EAX]
LEA EDI,[ESI + 0x8]
MOV dword ptr [ESP + 0x4],EAX
XOR EAX,EAX
TEST EDX,EDX
SETZ AL
SUB ESP,0x8
OR EAX,dword ptr [ESI + 0x4]
PUSH dword ptr [ESI + 0x2c]
PUSH dword ptr [ESI + 0x28]
XOR EDX,EDX
PUSH EDI
MOV dword ptr [ESP + 0x14],EAX
PUSH EAX
XOR EAX,EAX
PUSH dword ptr [ESI]
PUSH dword ptr [ESP + 0x50]
MOV ECX,dword ptr [ESP + 0x50]
CALL 0x00014a20
MOV dword ptr [ESP + 0x2c],EAX
LEA EDX,[EAX + 0x1]
ADD ESP,0x14
PUSH EDX
MOV dword ptr [ESP + 0x18],EDX
CALL 0x00016ea0
POP ECX
POP EDX
PUSH dword ptr [ESI + 0x2c]
PUSH dword ptr [ESI + 0x28]
MOV EBX,EAX
PUSH EDI
PUSH dword ptr [ESP + 0x14]
PUSH dword ptr [ESI]
PUSH dword ptr [ESP + 0x50]
MOV ECX,dword ptr [ESP + 0x50]
MOV EDX,dword ptr [ESP + 0x28]
CALL 0x00014a20
MOV EAX,dword ptr [ESP + 0x24]
ADD ESP,0x20
MOV ECX,dword ptr [ESP + 0x38]
MOV dword ptr [EBP],EAX
TEST ECX,ECX
JZ 0x00016133
MOV EAX,dword ptr [ESP + 0x38]
MOV ECX,dword ptr [ESP + 0xc]
MOV dword ptr [EAX],ECX
ADD ESP,0x1c
MOV EAX,EBX
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 FUN_00016080(undefined4 param_1,undefined4 param_2,int *param_3,undefined4 *param_4)\n\n{\n  int iVar1;\n  int *piVar2;\n  uint uVar3;\n  int iVar4;\n  undefined4 uVar5;\n  \n  if (param_4 == (undefined4 *)0x0) {\n    param_4 = &DAT_0001e2c0;\n  }\n  piVar2 = __errno_location();\n  iVar1 = *piVar2;\n  uVar3 = (uint)(param_3 == (int *)0x0) | param_4[1];\n  iVar4 = FUN_00014a20(param_2,*param_4,uVar3,param_4 + 2,param_4[10],param_4[0xb]);\n  uVar5 = FUN_00016ea0(iVar4 + 1);\n  FUN_00014a20(param_2,*param_4,uVar3,param_4 + 2,param_4[10],param_4[0xb]);\n  *piVar2 = iVar1;\n  if (param_3 != (int *)0x0) {\n    *param_3 = iVar4;\n  }\n  return uVar5;\n}\n\n" comment (function_definition "undefined4 FUN_00016080(undefined4 param_1,undefined4 param_2,int *param_3,undefined4 *param_4)\n\n{\n  int iVar1;\n  int *piVar2;\n  uint uVar3;\n  int iVar4;\n  undefined4 uVar5;\n  \n  if (param_4 == (undefined4 *)0x0) {\n    param_4 = &DAT_0001e2c0;\n  }\n  piVar2 = __errno_location();\n  iVar1 = *piVar2;\n  uVar3 = (uint)(param_3 == (int *)0x0) | param_4[1];\n  iVar4 = FUN_00014a20(param_2,*param_4,uVar3,param_4 + 2,param_4[10],param_4[0xb]);\n  uVar5 = FUN_00016ea0(iVar4 + 1);\n  FUN_00014a20(param_2,*param_4,uVar3,param_4 + 2,param_4[10],param_4[0xb]);\n  *piVar2 = iVar1;\n  if (param_3 != (int *)0x0) {\n    *param_3 = iVar4;\n  }\n  return uVar5;\n}" type_identifier (function_declarator "FUN_00016080(undefined4 param_1,undefined4 param_2,int *param_3,undefined4 *param_4)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,int *param_3,undefined4 *param_4)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "undefined4 *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  uint uVar3;\n  int iVar4;\n  undefined4 uVar5;\n  \n  if (param_4 == (undefined4 *)0x0) {\n    param_4 = &DAT_0001e2c0;\n  }\n  piVar2 = __errno_location();\n  iVar1 = *piVar2;\n  uVar3 = (uint)(param_3 == (int *)0x0) | param_4[1];\n  iVar4 = FUN_00014a20(param_2,*param_4,uVar3,param_4 + 2,param_4[10],param_4[0xb]);\n  uVar5 = FUN_00016ea0(iVar4 + 1);\n  FUN_00014a20(param_2,*param_4,uVar3,param_4 + 2,param_4[10],param_4[0xb]);\n  *piVar2 = iVar1;\n  if (param_3 != (int *)0x0) {\n    *param_3 = iVar4;\n  }\n  return uVar5;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (if_statement "if (param_4 == (undefined4 *)0x0) {\n    param_4 = &DAT_0001e2c0;\n  }" if (parenthesized_expression "(param_4 == (undefined4 *)0x0)" ( (binary_expression "param_4 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    param_4 = &DAT_0001e2c0;\n  }" { (expression_statement "param_4 = &DAT_0001e2c0;" (assignment_expression "param_4 = &DAT_0001e2c0" identifier = (pointer_expression "&DAT_0001e2c0" & identifier)) ;) })) (expression_statement "piVar2 = __errno_location();" (assignment_expression "piVar2 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar1 = *piVar2;" (assignment_expression "iVar1 = *piVar2" identifier = (pointer_expression "*piVar2" * identifier)) ;) (expression_statement "uVar3 = (uint)(param_3 == (int *)0x0) | param_4[1];" (assignment_expression "uVar3 = (uint)(param_3 == (int *)0x0) | param_4[1]" identifier = (binary_expression "(uint)(param_3 == (int *)0x0) | param_4[1]" (call_expression "(uint)(param_3 == (int *)0x0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_3 == (int *)0x0)" ( (binary_expression "param_3 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ))) | (subscript_expression "param_4[1]" identifier [ number_literal ]))) ;) (expression_statement "iVar4 = FUN_00014a20(param_2,*param_4,uVar3,param_4 + 2,param_4[10],param_4[0xb]);" (assignment_expression "iVar4 = FUN_00014a20(param_2,*param_4,uVar3,param_4 + 2,param_4[10],param_4[0xb])" identifier = (call_expression "FUN_00014a20(param_2,*param_4,uVar3,param_4 + 2,param_4[10],param_4[0xb])" identifier (argument_list "(param_2,*param_4,uVar3,param_4 + 2,param_4[10],param_4[0xb])" ( identifier , (pointer_expression "*param_4" * identifier) , identifier , (binary_expression "param_4 + 2" identifier + number_literal) , (subscript_expression "param_4[10]" identifier [ number_literal ]) , (subscript_expression "param_4[0xb]" identifier [ number_literal ]) )))) ;) (expression_statement "uVar5 = FUN_00016ea0(iVar4 + 1);" (assignment_expression "uVar5 = FUN_00016ea0(iVar4 + 1)" identifier = (call_expression "FUN_00016ea0(iVar4 + 1)" identifier (argument_list "(iVar4 + 1)" ( (binary_expression "iVar4 + 1" identifier + number_literal) )))) ;) (expression_statement "FUN_00014a20(param_2,*param_4,uVar3,param_4 + 2,param_4[10],param_4[0xb]);" (call_expression "FUN_00014a20(param_2,*param_4,uVar3,param_4 + 2,param_4[10],param_4[0xb])" identifier (argument_list "(param_2,*param_4,uVar3,param_4 + 2,param_4[10],param_4[0xb])" ( identifier , (pointer_expression "*param_4" * identifier) , identifier , (binary_expression "param_4 + 2" identifier + number_literal) , (subscript_expression "param_4[10]" identifier [ number_literal ]) , (subscript_expression "param_4[0xb]" identifier [ number_literal ]) ))) ;) (expression_statement "*piVar2 = iVar1;" (assignment_expression "*piVar2 = iVar1" (pointer_expression "*piVar2" * identifier) = identifier) ;) (if_statement "if (param_3 != (int *)0x0) {\n    *param_3 = iVar4;\n  }" if (parenthesized_expression "(param_3 != (int *)0x0)" ( (binary_expression "param_3 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    *param_3 = iVar4;\n  }" { (expression_statement "*param_3 = iVar4;" (assignment_expression "*param_3 = iVar4" (pointer_expression "*param_3" * identifier) = identifier) ;) })) (return_statement "return uVar5;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nchar * quotearg_alloc_mem(char *arg,size_t argsize,size_t *size,quoting_options *o)\n\n{\n  int iVar1;\n  int *piVar2;\n  uint flags;\n  size_t sVar3;\n  char *buffer;\n  \n  if (o == (quoting_options *)0x0) {\n    o = &default_quoting_options;\n  }\n  piVar2 = __errno_location();\n  iVar1 = *piVar2;\n  flags = (uint)(size == (size_t *)0x0) | o->flags;\n  sVar3 = quotearg_buffer_restyled\n                    ((char *)0x0,0,arg,argsize,o->style,flags,o->quote_these_too,o->left_quote,\n                     o->right_quote);\n  buffer = (char *)xmalloc(sVar3 + 1);\n  quotearg_buffer_restyled\n            (buffer,sVar3 + 1,arg,argsize,o->style,flags,o->quote_these_too,o->left_quote,\n             o->right_quote);\n  *piVar2 = iVar1;\n  if (size != (size_t *)0x0) {\n    *size = sVar3;\n  }\n  return buffer;\n}\n\n" comment comment (function_definition "char * quotearg_alloc_mem(char *arg,size_t argsize,size_t *size,quoting_options *o)\n\n{\n  int iVar1;\n  int *piVar2;\n  uint flags;\n  size_t sVar3;\n  char *buffer;\n  \n  if (o == (quoting_options *)0x0) {\n    o = &default_quoting_options;\n  }\n  piVar2 = __errno_location();\n  iVar1 = *piVar2;\n  flags = (uint)(size == (size_t *)0x0) | o->flags;\n  sVar3 = quotearg_buffer_restyled\n                    ((char *)0x0,0,arg,argsize,o->style,flags,o->quote_these_too,o->left_quote,\n                     o->right_quote);\n  buffer = (char *)xmalloc(sVar3 + 1);\n  quotearg_buffer_restyled\n            (buffer,sVar3 + 1,arg,argsize,o->style,flags,o->quote_these_too,o->left_quote,\n             o->right_quote);\n  *piVar2 = iVar1;\n  if (size != (size_t *)0x0) {\n    *size = sVar3;\n  }\n  return buffer;\n}" primitive_type (pointer_declarator "* quotearg_alloc_mem(char *arg,size_t argsize,size_t *size,quoting_options *o)" * (function_declarator "quotearg_alloc_mem(char *arg,size_t argsize,size_t *size,quoting_options *o)" identifier (parameter_list "(char *arg,size_t argsize,size_t *size,quoting_options *o)" ( (parameter_declaration "char *arg" primitive_type (pointer_declarator "*arg" * identifier)) , (parameter_declaration "size_t argsize" primitive_type identifier) , (parameter_declaration "size_t *size" primitive_type (pointer_declarator "*size" * identifier)) , (parameter_declaration "quoting_options *o" type_identifier (pointer_declarator "*o" * identifier)) )))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  uint flags;\n  size_t sVar3;\n  char *buffer;\n  \n  if (o == (quoting_options *)0x0) {\n    o = &default_quoting_options;\n  }\n  piVar2 = __errno_location();\n  iVar1 = *piVar2;\n  flags = (uint)(size == (size_t *)0x0) | o->flags;\n  sVar3 = quotearg_buffer_restyled\n                    ((char *)0x0,0,arg,argsize,o->style,flags,o->quote_these_too,o->left_quote,\n                     o->right_quote);\n  buffer = (char *)xmalloc(sVar3 + 1);\n  quotearg_buffer_restyled\n            (buffer,sVar3 + 1,arg,argsize,o->style,flags,o->quote_these_too,o->left_quote,\n             o->right_quote);\n  *piVar2 = iVar1;\n  if (size != (size_t *)0x0) {\n    *size = sVar3;\n  }\n  return buffer;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "uint flags;" type_identifier identifier ;) (declaration "size_t sVar3;" primitive_type identifier ;) (declaration "char *buffer;" primitive_type (pointer_declarator "*buffer" * identifier) ;) (if_statement "if (o == (quoting_options *)0x0) {\n    o = &default_quoting_options;\n  }" if (parenthesized_expression "(o == (quoting_options *)0x0)" ( (binary_expression "o == (quoting_options *)0x0" identifier == (cast_expression "(quoting_options *)0x0" ( (type_descriptor "quoting_options *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    o = &default_quoting_options;\n  }" { (expression_statement "o = &default_quoting_options;" (assignment_expression "o = &default_quoting_options" identifier = (pointer_expression "&default_quoting_options" & identifier)) ;) })) (expression_statement "piVar2 = __errno_location();" (assignment_expression "piVar2 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar1 = *piVar2;" (assignment_expression "iVar1 = *piVar2" identifier = (pointer_expression "*piVar2" * identifier)) ;) (expression_statement "flags = (uint)(size == (size_t *)0x0) | o->flags;" (assignment_expression "flags = (uint)(size == (size_t *)0x0) | o->flags" identifier = (binary_expression "(uint)(size == (size_t *)0x0) | o->flags" (call_expression "(uint)(size == (size_t *)0x0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(size == (size_t *)0x0)" ( (binary_expression "size == (size_t *)0x0" identifier == (cast_expression "(size_t *)0x0" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ))) | (field_expression "o->flags" identifier -> field_identifier))) ;) (expression_statement "sVar3 = quotearg_buffer_restyled\n                    ((char *)0x0,0,arg,argsize,o->style,flags,o->quote_these_too,o->left_quote,\n                     o->right_quote);" (assignment_expression "sVar3 = quotearg_buffer_restyled\n                    ((char *)0x0,0,arg,argsize,o->style,flags,o->quote_these_too,o->left_quote,\n                     o->right_quote)" identifier = (call_expression "quotearg_buffer_restyled\n                    ((char *)0x0,0,arg,argsize,o->style,flags,o->quote_these_too,o->left_quote,\n                     o->right_quote)" identifier (argument_list "((char *)0x0,0,arg,argsize,o->style,flags,o->quote_these_too,o->left_quote,\n                     o->right_quote)" ( (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) , number_literal , identifier , identifier , (field_expression "o->style" identifier -> field_identifier) , identifier , (field_expression "o->quote_these_too" identifier -> field_identifier) , (field_expression "o->left_quote" identifier -> field_identifier) , (field_expression "o->right_quote" identifier -> field_identifier) )))) ;) (expression_statement "buffer = (char *)xmalloc(sVar3 + 1);" (assignment_expression "buffer = (char *)xmalloc(sVar3 + 1)" identifier = (cast_expression "(char *)xmalloc(sVar3 + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(sVar3 + 1)" identifier (argument_list "(sVar3 + 1)" ( (binary_expression "sVar3 + 1" identifier + number_literal) ))))) ;) (expression_statement "quotearg_buffer_restyled\n            (buffer,sVar3 + 1,arg,argsize,o->style,flags,o->quote_these_too,o->left_quote,\n             o->right_quote);" (call_expression "quotearg_buffer_restyled\n            (buffer,sVar3 + 1,arg,argsize,o->style,flags,o->quote_these_too,o->left_quote,\n             o->right_quote)" identifier (argument_list "(buffer,sVar3 + 1,arg,argsize,o->style,flags,o->quote_these_too,o->left_quote,\n             o->right_quote)" ( identifier , (binary_expression "sVar3 + 1" identifier + number_literal) , identifier , identifier , (field_expression "o->style" identifier -> field_identifier) , identifier , (field_expression "o->quote_these_too" identifier -> field_identifier) , (field_expression "o->left_quote" identifier -> field_identifier) , (field_expression "o->right_quote" identifier -> field_identifier) ))) ;) (expression_statement "*piVar2 = iVar1;" (assignment_expression "*piVar2 = iVar1" (pointer_expression "*piVar2" * identifier) = identifier) ;) (if_statement "if (size != (size_t *)0x0) {\n    *size = sVar3;\n  }" if (parenthesized_expression "(size != (size_t *)0x0)" ( (binary_expression "size != (size_t *)0x0" identifier != (cast_expression "(size_t *)0x0" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    *size = sVar3;\n  }" { (expression_statement "*size = sVar3;" (assignment_expression "*size = sVar3" (pointer_expression "*size" * identifier) = identifier) ;) })) (return_statement "return buffer;" return identifier ;) })))
(translation_unit "undefined4 FUN_00016080(undefined4 param_1,undefined4 param_2,int *param_3,undefined4 *param_4)\n\n{\n  int iVar1;\n  int *piVar2;\n  uint uVar3;\n  int iVar4;\n  undefined4 uVar5;\n  \n  if (param_4 == (undefined4 *)0x0) {\n    param_4 = &DAT_0001e2c0;\n  }\n  piVar2 = __errno_location();\n  iVar1 = *piVar2;\n  uVar3 = (uint)(param_3 == (int *)0x0) | param_4[1];\n  iVar4 = FUN_00014a20(param_2,*param_4,uVar3,param_4 + 2,param_4[10],param_4[0xb]);\n  uVar5 = FUN_00016ea0(iVar4 + 1);\n  FUN_00014a20(param_2,*param_4,uVar3,param_4 + 2,param_4[10],param_4[0xb]);\n  *piVar2 = iVar1;\n  if (param_3 != (int *)0x0) {\n    *param_3 = iVar4;\n  }\n  return uVar5;\n}\n\n" (function_definition "undefined4 FUN_00016080(undefined4 param_1,undefined4 param_2,int *param_3,undefined4 *param_4)\n\n{\n  int iVar1;\n  int *piVar2;\n  uint uVar3;\n  int iVar4;\n  undefined4 uVar5;\n  \n  if (param_4 == (undefined4 *)0x0) {\n    param_4 = &DAT_0001e2c0;\n  }\n  piVar2 = __errno_location();\n  iVar1 = *piVar2;\n  uVar3 = (uint)(param_3 == (int *)0x0) | param_4[1];\n  iVar4 = FUN_00014a20(param_2,*param_4,uVar3,param_4 + 2,param_4[10],param_4[0xb]);\n  uVar5 = FUN_00016ea0(iVar4 + 1);\n  FUN_00014a20(param_2,*param_4,uVar3,param_4 + 2,param_4[10],param_4[0xb]);\n  *piVar2 = iVar1;\n  if (param_3 != (int *)0x0) {\n    *param_3 = iVar4;\n  }\n  return uVar5;\n}" type_identifier (function_declarator "FUN_00016080(undefined4 param_1,undefined4 param_2,int *param_3,undefined4 *param_4)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,int *param_3,undefined4 *param_4)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "undefined4 *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  uint uVar3;\n  int iVar4;\n  undefined4 uVar5;\n  \n  if (param_4 == (undefined4 *)0x0) {\n    param_4 = &DAT_0001e2c0;\n  }\n  piVar2 = __errno_location();\n  iVar1 = *piVar2;\n  uVar3 = (uint)(param_3 == (int *)0x0) | param_4[1];\n  iVar4 = FUN_00014a20(param_2,*param_4,uVar3,param_4 + 2,param_4[10],param_4[0xb]);\n  uVar5 = FUN_00016ea0(iVar4 + 1);\n  FUN_00014a20(param_2,*param_4,uVar3,param_4 + 2,param_4[10],param_4[0xb]);\n  *piVar2 = iVar1;\n  if (param_3 != (int *)0x0) {\n    *param_3 = iVar4;\n  }\n  return uVar5;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (if_statement "if (param_4 == (undefined4 *)0x0) {\n    param_4 = &DAT_0001e2c0;\n  }" if (parenthesized_expression "(param_4 == (undefined4 *)0x0)" ( (binary_expression "param_4 == (undefined4 *)0x0" identifier == (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    param_4 = &DAT_0001e2c0;\n  }" { (expression_statement "param_4 = &DAT_0001e2c0;" (assignment_expression "param_4 = &DAT_0001e2c0" identifier = (pointer_expression "&DAT_0001e2c0" & identifier)) ;) })) (expression_statement "piVar2 = __errno_location();" (assignment_expression "piVar2 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar1 = *piVar2;" (assignment_expression "iVar1 = *piVar2" identifier = (pointer_expression "*piVar2" * identifier)) ;) (expression_statement "uVar3 = (uint)(param_3 == (int *)0x0) | param_4[1];" (assignment_expression "uVar3 = (uint)(param_3 == (int *)0x0) | param_4[1]" identifier = (binary_expression "(uint)(param_3 == (int *)0x0) | param_4[1]" (call_expression "(uint)(param_3 == (int *)0x0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_3 == (int *)0x0)" ( (binary_expression "param_3 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ))) | (subscript_expression "param_4[1]" identifier [ number_literal ]))) ;) (expression_statement "iVar4 = FUN_00014a20(param_2,*param_4,uVar3,param_4 + 2,param_4[10],param_4[0xb]);" (assignment_expression "iVar4 = FUN_00014a20(param_2,*param_4,uVar3,param_4 + 2,param_4[10],param_4[0xb])" identifier = (call_expression "FUN_00014a20(param_2,*param_4,uVar3,param_4 + 2,param_4[10],param_4[0xb])" identifier (argument_list "(param_2,*param_4,uVar3,param_4 + 2,param_4[10],param_4[0xb])" ( identifier , (pointer_expression "*param_4" * identifier) , identifier , (binary_expression "param_4 + 2" identifier + number_literal) , (subscript_expression "param_4[10]" identifier [ number_literal ]) , (subscript_expression "param_4[0xb]" identifier [ number_literal ]) )))) ;) (expression_statement "uVar5 = FUN_00016ea0(iVar4 + 1);" (assignment_expression "uVar5 = FUN_00016ea0(iVar4 + 1)" identifier = (call_expression "FUN_00016ea0(iVar4 + 1)" identifier (argument_list "(iVar4 + 1)" ( (binary_expression "iVar4 + 1" identifier + number_literal) )))) ;) (expression_statement "FUN_00014a20(param_2,*param_4,uVar3,param_4 + 2,param_4[10],param_4[0xb]);" (call_expression "FUN_00014a20(param_2,*param_4,uVar3,param_4 + 2,param_4[10],param_4[0xb])" identifier (argument_list "(param_2,*param_4,uVar3,param_4 + 2,param_4[10],param_4[0xb])" ( identifier , (pointer_expression "*param_4" * identifier) , identifier , (binary_expression "param_4 + 2" identifier + number_literal) , (subscript_expression "param_4[10]" identifier [ number_literal ]) , (subscript_expression "param_4[0xb]" identifier [ number_literal ]) ))) ;) (expression_statement "*piVar2 = iVar1;" (assignment_expression "*piVar2 = iVar1" (pointer_expression "*piVar2" * identifier) = identifier) ;) (if_statement "if (param_3 != (int *)0x0) {\n    *param_3 = iVar4;\n  }" if (parenthesized_expression "(param_3 != (int *)0x0)" ( (binary_expression "param_3 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    *param_3 = iVar4;\n  }" { (expression_statement "*param_3 = iVar4;" (assignment_expression "*param_3 = iVar4" (pointer_expression "*param_3" * identifier) = identifier) ;) })) (return_statement "return uVar5;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ))) | (subscript_expression IDENT [ LIT ]))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (pointer_expression * IDENT) , IDENT , (binary_expression IDENT + LIT) , (subscript_expression IDENT [ LIT ]) , (subscript_expression IDENT [ LIT ]) )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (pointer_expression * IDENT) , IDENT , (binary_expression IDENT + LIT) , (subscript_expression IDENT [ LIT ]) , (subscript_expression IDENT [ LIT ]) ))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) })) (return_statement return IDENT ;) })))
(function_definition "undefined4 FUN_00016080(undefined4 param_1,undefined4 param_2,int *param_3,undefined4 *param_4)\n\n{\n  int iVar1;\n  int *piVar2;\n  uint uVar3;\n  int iVar4;\n  undefined4 uVar5;\n  \n  if (param_4 == (undefined4 *)0x0) {\n    param_4 = &DAT_0001e2c0;\n  }\n  piVar2 = __errno_location();\n  iVar1 = *piVar2;\n  uVar3 = (uint)(param_3 == (int *)0x0) | param_4[1];\n  iVar4 = FUN_00014a20(param_2,*param_4,uVar3,param_4 + 2,param_4[10],param_4[0xb]);\n  uVar5 = FUN_00016ea0(iVar4 + 1);\n  FUN_00014a20(param_2,*param_4,uVar3,param_4 + 2,param_4[10],param_4[0xb]);\n  *piVar2 = iVar1;\n  if (param_3 != (int *)0x0) {\n    *param_3 = iVar4;\n  }\n  return uVar5;\n}" (type_identifier "undefined4") (function_declarator "FUN_00016080(undefined4 param_1,undefined4 param_2,int *param_3,undefined4 *param_4)" (identifier "FUN_00016080") (parameter_list "(undefined4 param_1,undefined4 param_2,int *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 "int *param_3" (primitive_type "int") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) (, ",") (parameter_declaration "undefined4 *param_4" (type_identifier "undefined4") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) () ")"))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  uint uVar3;\n  int iVar4;\n  undefined4 uVar5;\n  \n  if (param_4 == (undefined4 *)0x0) {\n    param_4 = &DAT_0001e2c0;\n  }\n  piVar2 = __errno_location();\n  iVar1 = *piVar2;\n  uVar3 = (uint)(param_3 == (int *)0x0) | param_4[1];\n  iVar4 = FUN_00014a20(param_2,*param_4,uVar3,param_4 + 2,param_4[10],param_4[0xb]);\n  uVar5 = FUN_00016ea0(iVar4 + 1);\n  FUN_00014a20(param_2,*param_4,uVar3,param_4 + 2,param_4[10],param_4[0xb]);\n  *piVar2 = iVar1;\n  if (param_3 != (int *)0x0) {\n    *param_3 = iVar4;\n  }\n  return uVar5;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "undefined4 uVar5;" (type_identifier "undefined4") (identifier "uVar5") (; ";")) (if_statement "if (param_4 == (undefined4 *)0x0) {\n    param_4 = &DAT_0001e2c0;\n  }" (if "if") (parenthesized_expression "(param_4 == (undefined4 *)0x0)" (( "(") (binary_expression "param_4 == (undefined4 *)0x0" (identifier "param_4") (== "==") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    param_4 = &DAT_0001e2c0;\n  }" ({ "{") (expression_statement "param_4 = &DAT_0001e2c0;" (assignment_expression "param_4 = &DAT_0001e2c0" (identifier "param_4") (= "=") (pointer_expression "&DAT_0001e2c0" (& "&") (identifier "DAT_0001e2c0"))) (; ";")) (} "}"))) (expression_statement "piVar2 = __errno_location();" (assignment_expression "piVar2 = __errno_location()" (identifier "piVar2") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "iVar1 = *piVar2;" (assignment_expression "iVar1 = *piVar2" (identifier "iVar1") (= "=") (pointer_expression "*piVar2" (* "*") (identifier "piVar2"))) (; ";")) (expression_statement "uVar3 = (uint)(param_3 == (int *)0x0) | param_4[1];" (assignment_expression "uVar3 = (uint)(param_3 == (int *)0x0) | param_4[1]" (identifier "uVar3") (= "=") (binary_expression "(uint)(param_3 == (int *)0x0) | param_4[1]" (call_expression "(uint)(param_3 == (int *)0x0)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(param_3 == (int *)0x0)" (( "(") (binary_expression "param_3 == (int *)0x0" (identifier "param_3") (== "==") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")"))) (| "|") (subscript_expression "param_4[1]" (identifier "param_4") ([ "[") (number_literal "1") (] "]")))) (; ";")) (expression_statement "iVar4 = FUN_00014a20(param_2,*param_4,uVar3,param_4 + 2,param_4[10],param_4[0xb]);" (assignment_expression "iVar4 = FUN_00014a20(param_2,*param_4,uVar3,param_4 + 2,param_4[10],param_4[0xb])" (identifier "iVar4") (= "=") (call_expression "FUN_00014a20(param_2,*param_4,uVar3,param_4 + 2,param_4[10],param_4[0xb])" (identifier "FUN_00014a20") (argument_list "(param_2,*param_4,uVar3,param_4 + 2,param_4[10],param_4[0xb])" (( "(") (identifier "param_2") (, ",") (pointer_expression "*param_4" (* "*") (identifier "param_4")) (, ",") (identifier "uVar3") (, ",") (binary_expression "param_4 + 2" (identifier "param_4") (+ "+") (number_literal "2")) (, ",") (subscript_expression "param_4[10]" (identifier "param_4") ([ "[") (number_literal "10") (] "]")) (, ",") (subscript_expression "param_4[0xb]" (identifier "param_4") ([ "[") (number_literal "0xb") (] "]")) () ")")))) (; ";")) (expression_statement "uVar5 = FUN_00016ea0(iVar4 + 1);" (assignment_expression "uVar5 = FUN_00016ea0(iVar4 + 1)" (identifier "uVar5") (= "=") (call_expression "FUN_00016ea0(iVar4 + 1)" (identifier "FUN_00016ea0") (argument_list "(iVar4 + 1)" (( "(") (binary_expression "iVar4 + 1" (identifier "iVar4") (+ "+") (number_literal "1")) () ")")))) (; ";")) (expression_statement "FUN_00014a20(param_2,*param_4,uVar3,param_4 + 2,param_4[10],param_4[0xb]);" (call_expression "FUN_00014a20(param_2,*param_4,uVar3,param_4 + 2,param_4[10],param_4[0xb])" (identifier "FUN_00014a20") (argument_list "(param_2,*param_4,uVar3,param_4 + 2,param_4[10],param_4[0xb])" (( "(") (identifier "param_2") (, ",") (pointer_expression "*param_4" (* "*") (identifier "param_4")) (, ",") (identifier "uVar3") (, ",") (binary_expression "param_4 + 2" (identifier "param_4") (+ "+") (number_literal "2")) (, ",") (subscript_expression "param_4[10]" (identifier "param_4") ([ "[") (number_literal "10") (] "]")) (, ",") (subscript_expression "param_4[0xb]" (identifier "param_4") ([ "[") (number_literal "0xb") (] "]")) () ")"))) (; ";")) (expression_statement "*piVar2 = iVar1;" (assignment_expression "*piVar2 = iVar1" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (= "=") (identifier "iVar1")) (; ";")) (if_statement "if (param_3 != (int *)0x0) {\n    *param_3 = iVar4;\n  }" (if "if") (parenthesized_expression "(param_3 != (int *)0x0)" (( "(") (binary_expression "param_3 != (int *)0x0" (identifier "param_3") (!= "!=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    *param_3 = iVar4;\n  }" ({ "{") (expression_statement "*param_3 = iVar4;" (assignment_expression "*param_3 = iVar4" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (identifier "iVar4")) (; ";")) (} "}"))) (return_statement "return uVar5;" (return "return") (identifier "uVar5") (; ";")) (} "}")))

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

char * function_1(char *arg,size_t argsize,size_t *var_3,type_1 *var_1)

{
  int iVar1;
  int *piVar2;
  type_2 flags;
  size_t var_6;
  char *buffer;
  
  if (var_1 == (type_1 *)0x0) {
    var_1 = &default_quoting_options;
  }
  piVar2 = var_2();
  iVar1 = *piVar2;
  flags = (type_2)(var_3 == (size_t *)0x0) | var_1->flags;
  var_6 = var_4
                    ((char *)0x0,0,arg,argsize,var_1->style,flags,var_1->quote_these_too,var_1->left_quote,
                     var_1->right_quote);
  buffer = (char *)var_5(var_6 + 1);
  var_4
            (buffer,var_6 + 1,arg,argsize,var_1->style,flags,var_1->quote_these_too,var_1->left_quote,
             var_1->right_quote);
  *piVar2 = iVar1;
  if (var_3 != (size_t *)0x0) {
    *var_3 = var_6;
  }
  return buffer;
}


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

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

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

{
  int iVar1;
  int *piVar2;
  uint uVar3;
  int iVar4;
  undefined4 uVar5;
  
  if (param_4 == (undefined4 *)0x0) {
    param_4 = &DAT_0001e2c0;
  }
  piVar2 = __errno_location();
  iVar1 = *piVar2;
  uVar3 = (uint)(param_3 == (int *)0x0) | param_4[1];
  iVar4 = FUN_00014a20(param_2,*param_4,uVar3,param_4 + 2,param_4[10],param_4[0xb]);
  uVar5 = FUN_00016ea0(iVar4 + 1);
  FUN_00014a20(param_2,*param_4,uVar3,param_4 + 2,param_4[10],param_4[0xb]);
  *piVar2 = iVar1;
  if (param_3 != (int *)0x0) {
    *param_3 = iVar4;
  }
  return uVar5;
}

