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

int INET6_resolve(char *name,sockaddr_in6 *sin6)

{
  addrinfo *ai;
  addrinfo req;
  
}



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

undefined4 __regparm3 FUN_000aa677(char *param_1,undefined4 *param_2)

{
  undefined4 uVar1;
  int iVar2;
  undefined4 extraout_EDX;
  sockaddr *psVar3;
  addrinfo *paVar4;
  int in_GS_OFFSET;
  byte bVar5;
  addrinfo *local_44;
  addrinfo local_40;
  int local_20;
  
  bVar5 = 0;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  local_44 = (addrinfo *)0x0;
  paVar4 = &local_40;
  for (iVar2 = 8; iVar2 != 0; iVar2 = iVar2 + -1) {
    paVar4->ai_flags = 0;
    paVar4 = (addrinfo *)&paVar4->ai_family;
  }
  local_40.ai_family = 10;
  iVar2 = getaddrinfo(param_1,(char *)0x0,&local_40,&local_44);
  if (iVar2 == 0) {
    psVar3 = local_44->ai_addr;
    for (iVar2 = 7; iVar2 != 0; iVar2 = iVar2 + -1) {
      *param_2 = *(undefined4 *)psVar3;
      psVar3 = (sockaddr *)((int)psVar3 + (uint)bVar5 * -8 + 4);
      param_2 = param_2 + (uint)bVar5 * -2 + 1;
    }
    freeaddrinfo(local_44);
    uVar1 = 0;
  }
  else {
    FUN_000191bd("getaddrinfo: %s: %d",param_1,iVar2,extraout_EDX);
    uVar1 = 0xffffffff;
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return uVar1;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00017e10();
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
SUB ESP,0x4c
CALL 0x00017640
ADD EBX,0x2639d
MOV ESI,EAX
MOV EBP,EDX
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x3c],EAX
XOR EAX,EAX
MOV dword ptr [ESP + 0x18],0x0
LEA EDX,[ESP + 0x1c]
MOV ECX,0x8
MOV EDI,EDX
STOSD.REP ES:EDI
MOV dword ptr [ESP + 0x20],0xa
LEA EAX,[ESP + 0x18]
PUSH EAX
PUSH EDX
PUSH 0x0
PUSH ESI
CALL 0x00017330
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x000aa709
MOV dword ptr [ESP + 0xc],EAX
MOV EDX,dword ptr [ESP + 0x18]
MOV ESI,dword ptr [EDX + 0x14]
MOV ECX,0x7
MOV EDI,EBP
MOVSD.REP ES:EDI,ESI
SUB ESP,0xc
PUSH EDX
CALL 0x000170a0
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0xc]
MOV ECX,dword ptr [ESP + 0x3c]
XOR ECX,dword ptr GS:[0x14]
JNZ 0x000aa704
ADD ESP,0x4c
POP EBX
POP ESI
POP EDI
POP EBP
RET
CALL 0x00017e10
PUSH EDX
PUSH EAX
PUSH ESI
LEA EAX,[EBX + 0xffffd0df]
PUSH EAX
CALL 0x000191bd
ADD ESP,0x10
MOV EAX,0xffffffff
JMP 0x000aa6ef
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 __regparm3 FUN_000aa677(char *param_1,undefined4 *param_2)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  undefined4 extraout_EDX;\n  sockaddr *psVar3;\n  addrinfo *paVar4;\n  int in_GS_OFFSET;\n  byte bVar5;\n  addrinfo *local_44;\n  addrinfo local_40;\n  int local_20;\n  \n  bVar5 = 0;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_44 = (addrinfo *)0x0;\n  paVar4 = &local_40;\n  for (iVar2 = 8; iVar2 != 0; iVar2 = iVar2 + -1) {\n    paVar4->ai_flags = 0;\n    paVar4 = (addrinfo *)&paVar4->ai_family;\n  }\n  local_40.ai_family = 10;\n  iVar2 = getaddrinfo(param_1,(char *)0x0,&local_40,&local_44);\n  if (iVar2 == 0) {\n    psVar3 = local_44->ai_addr;\n    for (iVar2 = 7; iVar2 != 0; iVar2 = iVar2 + -1) {\n      *param_2 = *(undefined4 *)psVar3;\n      psVar3 = (sockaddr *)((int)psVar3 + (uint)bVar5 * -8 + 4);\n      param_2 = param_2 + (uint)bVar5 * -2 + 1;\n    }\n    freeaddrinfo(local_44);\n    uVar1 = 0;\n  }\n  else {\n    FUN_000191bd("getaddrinfo: %s: %d",param_1,iVar2,extraout_EDX);\n    uVar1 = 0xffffffff;\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00017e10();\n}\n\n" comment (function_definition "undefined4 __regparm3 FUN_000aa677(char *param_1,undefined4 *param_2)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  undefined4 extraout_EDX;\n  sockaddr *psVar3;\n  addrinfo *paVar4;\n  int in_GS_OFFSET;\n  byte bVar5;\n  addrinfo *local_44;\n  addrinfo local_40;\n  int local_20;\n  \n  bVar5 = 0;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_44 = (addrinfo *)0x0;\n  paVar4 = &local_40;\n  for (iVar2 = 8; iVar2 != 0; iVar2 = iVar2 + -1) {\n    paVar4->ai_flags = 0;\n    paVar4 = (addrinfo *)&paVar4->ai_family;\n  }\n  local_40.ai_family = 10;\n  iVar2 = getaddrinfo(param_1,(char *)0x0,&local_40,&local_44);\n  if (iVar2 == 0) {\n    psVar3 = local_44->ai_addr;\n    for (iVar2 = 7; iVar2 != 0; iVar2 = iVar2 + -1) {\n      *param_2 = *(undefined4 *)psVar3;\n      psVar3 = (sockaddr *)((int)psVar3 + (uint)bVar5 * -8 + 4);\n      param_2 = param_2 + (uint)bVar5 * -2 + 1;\n    }\n    freeaddrinfo(local_44);\n    uVar1 = 0;\n  }\n  else {\n    FUN_000191bd("getaddrinfo: %s: %d",param_1,iVar2,extraout_EDX);\n    uVar1 = 0xffffffff;\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00017e10();\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_000aa677(char *param_1,undefined4 *param_2)" identifier (parameter_list "(char *param_1,undefined4 *param_2)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  undefined4 extraout_EDX;\n  sockaddr *psVar3;\n  addrinfo *paVar4;\n  int in_GS_OFFSET;\n  byte bVar5;\n  addrinfo *local_44;\n  addrinfo local_40;\n  int local_20;\n  \n  bVar5 = 0;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_44 = (addrinfo *)0x0;\n  paVar4 = &local_40;\n  for (iVar2 = 8; iVar2 != 0; iVar2 = iVar2 + -1) {\n    paVar4->ai_flags = 0;\n    paVar4 = (addrinfo *)&paVar4->ai_family;\n  }\n  local_40.ai_family = 10;\n  iVar2 = getaddrinfo(param_1,(char *)0x0,&local_40,&local_44);\n  if (iVar2 == 0) {\n    psVar3 = local_44->ai_addr;\n    for (iVar2 = 7; iVar2 != 0; iVar2 = iVar2 + -1) {\n      *param_2 = *(undefined4 *)psVar3;\n      psVar3 = (sockaddr *)((int)psVar3 + (uint)bVar5 * -8 + 4);\n      param_2 = param_2 + (uint)bVar5 * -2 + 1;\n    }\n    freeaddrinfo(local_44);\n    uVar1 = 0;\n  }\n  else {\n    FUN_000191bd("getaddrinfo: %s: %d",param_1,iVar2,extraout_EDX);\n    uVar1 = 0xffffffff;\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00017e10();\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 extraout_EDX;" type_identifier identifier ;) (declaration "sockaddr *psVar3;" type_identifier (pointer_declarator "*psVar3" * identifier) ;) (declaration "addrinfo *paVar4;" type_identifier (pointer_declarator "*paVar4" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "byte bVar5;" type_identifier identifier ;) (declaration "addrinfo *local_44;" type_identifier (pointer_declarator "*local_44" * identifier) ;) (declaration "addrinfo local_40;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (expression_statement "bVar5 = 0;" (assignment_expression "bVar5 = 0" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "local_44 = (addrinfo *)0x0;" (assignment_expression "local_44 = (addrinfo *)0x0" identifier = (cast_expression "(addrinfo *)0x0" ( (type_descriptor "addrinfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "paVar4 = &local_40;" (assignment_expression "paVar4 = &local_40" identifier = (pointer_expression "&local_40" & identifier)) ;) (for_statement "for (iVar2 = 8; iVar2 != 0; iVar2 = iVar2 + -1) {\n    paVar4->ai_flags = 0;\n    paVar4 = (addrinfo *)&paVar4->ai_family;\n  }" for ( (assignment_expression "iVar2 = 8" identifier = number_literal) ; (binary_expression "iVar2 != 0" identifier != number_literal) ; (assignment_expression "iVar2 = iVar2 + -1" identifier = (binary_expression "iVar2 + -1" identifier + number_literal)) ) (compound_statement "{\n    paVar4->ai_flags = 0;\n    paVar4 = (addrinfo *)&paVar4->ai_family;\n  }" { (expression_statement "paVar4->ai_flags = 0;" (assignment_expression "paVar4->ai_flags = 0" (field_expression "paVar4->ai_flags" identifier -> field_identifier) = number_literal) ;) (expression_statement "paVar4 = (addrinfo *)&paVar4->ai_family;" (assignment_expression "paVar4 = (addrinfo *)&paVar4->ai_family" identifier = (cast_expression "(addrinfo *)&paVar4->ai_family" ( (type_descriptor "addrinfo *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&paVar4->ai_family" & (field_expression "paVar4->ai_family" identifier -> field_identifier)))) ;) })) (expression_statement "local_40.ai_family = 10;" (assignment_expression "local_40.ai_family = 10" (field_expression "local_40.ai_family" identifier . field_identifier) = number_literal) ;) (expression_statement "iVar2 = getaddrinfo(param_1,(char *)0x0,&local_40,&local_44);" (assignment_expression "iVar2 = getaddrinfo(param_1,(char *)0x0,&local_40,&local_44)" identifier = (call_expression "getaddrinfo(param_1,(char *)0x0,&local_40,&local_44)" identifier (argument_list "(param_1,(char *)0x0,&local_40,&local_44)" ( identifier , (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) , (pointer_expression "&local_40" & identifier) , (pointer_expression "&local_44" & identifier) )))) ;) (if_statement "if (iVar2 == 0) {\n    psVar3 = local_44->ai_addr;\n    for (iVar2 = 7; iVar2 != 0; iVar2 = iVar2 + -1) {\n      *param_2 = *(undefined4 *)psVar3;\n      psVar3 = (sockaddr *)((int)psVar3 + (uint)bVar5 * -8 + 4);\n      param_2 = param_2 + (uint)bVar5 * -2 + 1;\n    }\n    freeaddrinfo(local_44);\n    uVar1 = 0;\n  }\n  else {\n    FUN_000191bd("getaddrinfo: %s: %d",param_1,iVar2,extraout_EDX);\n    uVar1 = 0xffffffff;\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    psVar3 = local_44->ai_addr;\n    for (iVar2 = 7; iVar2 != 0; iVar2 = iVar2 + -1) {\n      *param_2 = *(undefined4 *)psVar3;\n      psVar3 = (sockaddr *)((int)psVar3 + (uint)bVar5 * -8 + 4);\n      param_2 = param_2 + (uint)bVar5 * -2 + 1;\n    }\n    freeaddrinfo(local_44);\n    uVar1 = 0;\n  }" { (expression_statement "psVar3 = local_44->ai_addr;" (assignment_expression "psVar3 = local_44->ai_addr" identifier = (field_expression "local_44->ai_addr" identifier -> field_identifier)) ;) (for_statement "for (iVar2 = 7; iVar2 != 0; iVar2 = iVar2 + -1) {\n      *param_2 = *(undefined4 *)psVar3;\n      psVar3 = (sockaddr *)((int)psVar3 + (uint)bVar5 * -8 + 4);\n      param_2 = param_2 + (uint)bVar5 * -2 + 1;\n    }" for ( (assignment_expression "iVar2 = 7" identifier = number_literal) ; (binary_expression "iVar2 != 0" identifier != number_literal) ; (assignment_expression "iVar2 = iVar2 + -1" identifier = (binary_expression "iVar2 + -1" identifier + number_literal)) ) (compound_statement "{\n      *param_2 = *(undefined4 *)psVar3;\n      psVar3 = (sockaddr *)((int)psVar3 + (uint)bVar5 * -8 + 4);\n      param_2 = param_2 + (uint)bVar5 * -2 + 1;\n    }" { (expression_statement "*param_2 = *(undefined4 *)psVar3;" (assignment_expression "*param_2 = *(undefined4 *)psVar3" (pointer_expression "*param_2" * identifier) = (pointer_expression "*(undefined4 *)psVar3" * (cast_expression "(undefined4 *)psVar3" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "psVar3 = (sockaddr *)((int)psVar3 + (uint)bVar5 * -8 + 4);" (assignment_expression "psVar3 = (sockaddr *)((int)psVar3 + (uint)bVar5 * -8 + 4)" identifier = (cast_expression "(sockaddr *)((int)psVar3 + (uint)bVar5 * -8 + 4)" ( (type_descriptor "sockaddr *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)psVar3 + (uint)bVar5 * -8 + 4)" ( (binary_expression "(int)psVar3 + (uint)bVar5 * -8 + 4" (binary_expression "(int)psVar3 + (uint)bVar5 * -8" (cast_expression "(int)psVar3" ( (type_descriptor "int" primitive_type) ) identifier) + (binary_expression "(uint)bVar5 * -8" (cast_expression "(uint)bVar5" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal) )))) ;) (expression_statement "param_2 = param_2 + (uint)bVar5 * -2 + 1;" (assignment_expression "param_2 = param_2 + (uint)bVar5 * -2 + 1" identifier = (binary_expression "param_2 + (uint)bVar5 * -2 + 1" (binary_expression "param_2 + (uint)bVar5 * -2" identifier + (binary_expression "(uint)bVar5 * -2" (cast_expression "(uint)bVar5" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) })) (expression_statement "freeaddrinfo(local_44);" (call_expression "freeaddrinfo(local_44)" identifier (argument_list "(local_44)" ( identifier ))) ;) (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    FUN_000191bd("getaddrinfo: %s: %d",param_1,iVar2,extraout_EDX);\n    uVar1 = 0xffffffff;\n  }" else (compound_statement "{\n    FUN_000191bd("getaddrinfo: %s: %d",param_1,iVar2,extraout_EDX);\n    uVar1 = 0xffffffff;\n  }" { (expression_statement "FUN_000191bd("getaddrinfo: %s: %d",param_1,iVar2,extraout_EDX);" (call_expression "FUN_000191bd("getaddrinfo: %s: %d",param_1,iVar2,extraout_EDX)" identifier (argument_list "("getaddrinfo: %s: %d",param_1,iVar2,extraout_EDX)" ( (string_literal ""getaddrinfo: %s: %d"" " string_content ") , identifier , identifier , identifier ))) ;) (expression_statement "uVar1 = 0xffffffff;" (assignment_expression "uVar1 = 0xffffffff" identifier = number_literal) ;) }))) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar1;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return uVar1;\n  }" { (return_statement "return uVar1;" return identifier ;) })) comment (expression_statement "FUN_00017e10();" (call_expression "FUN_00017e10()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint INET6_resolve(char *name,sockaddr_in6 *sin6)\n\n{\n  addrinfo *ai;\n  addrinfo req;\n  \n}\n\n" comment (function_definition "int INET6_resolve(char *name,sockaddr_in6 *sin6)\n\n{\n  addrinfo *ai;\n  addrinfo req;\n  \n}" primitive_type (function_declarator "INET6_resolve(char *name,sockaddr_in6 *sin6)" identifier (parameter_list "(char *name,sockaddr_in6 *sin6)" ( (parameter_declaration "char *name" primitive_type (pointer_declarator "*name" * identifier)) , (parameter_declaration "sockaddr_in6 *sin6" type_identifier (pointer_declarator "*sin6" * identifier)) ))) (compound_statement "{\n  addrinfo *ai;\n  addrinfo req;\n  \n}" { (declaration "addrinfo *ai;" type_identifier (pointer_declarator "*ai" * identifier) ;) (declaration "addrinfo req;" type_identifier identifier ;) })))
(translation_unit "undefined4 __regparm3 FUN_000aa677(char *param_1,undefined4 *param_2)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  undefined4 extraout_EDX;\n  sockaddr *psVar3;\n  addrinfo *paVar4;\n  int in_GS_OFFSET;\n  byte bVar5;\n  addrinfo *local_44;\n  addrinfo local_40;\n  int local_20;\n  \n  bVar5 = 0;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_44 = (addrinfo *)0x0;\n  paVar4 = &local_40;\n  for (iVar2 = 8; iVar2 != 0; iVar2 = iVar2 + -1) {\n    paVar4->ai_flags = 0;\n    paVar4 = (addrinfo *)&paVar4->ai_family;\n  }\n  local_40.ai_family = 10;\n  iVar2 = getaddrinfo(param_1,(char *)0x0,&local_40,&local_44);\n  if (iVar2 == 0) {\n    psVar3 = local_44->ai_addr;\n    for (iVar2 = 7; iVar2 != 0; iVar2 = iVar2 + -1) {\n      *param_2 = *(undefined4 *)psVar3;\n      psVar3 = (sockaddr *)((int)psVar3 + (uint)bVar5 * -8 + 4);\n      param_2 = param_2 + (uint)bVar5 * -2 + 1;\n    }\n    freeaddrinfo(local_44);\n    uVar1 = 0;\n  }\n  else {\n    FUN_000191bd("getaddrinfo: %s: %d",param_1,iVar2,extraout_EDX);\n    uVar1 = 0xffffffff;\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar1;\n  }\n                    \n  FUN_00017e10();\n}\n\n" (function_definition "undefined4 __regparm3 FUN_000aa677(char *param_1,undefined4 *param_2)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  undefined4 extraout_EDX;\n  sockaddr *psVar3;\n  addrinfo *paVar4;\n  int in_GS_OFFSET;\n  byte bVar5;\n  addrinfo *local_44;\n  addrinfo local_40;\n  int local_20;\n  \n  bVar5 = 0;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_44 = (addrinfo *)0x0;\n  paVar4 = &local_40;\n  for (iVar2 = 8; iVar2 != 0; iVar2 = iVar2 + -1) {\n    paVar4->ai_flags = 0;\n    paVar4 = (addrinfo *)&paVar4->ai_family;\n  }\n  local_40.ai_family = 10;\n  iVar2 = getaddrinfo(param_1,(char *)0x0,&local_40,&local_44);\n  if (iVar2 == 0) {\n    psVar3 = local_44->ai_addr;\n    for (iVar2 = 7; iVar2 != 0; iVar2 = iVar2 + -1) {\n      *param_2 = *(undefined4 *)psVar3;\n      psVar3 = (sockaddr *)((int)psVar3 + (uint)bVar5 * -8 + 4);\n      param_2 = param_2 + (uint)bVar5 * -2 + 1;\n    }\n    freeaddrinfo(local_44);\n    uVar1 = 0;\n  }\n  else {\n    FUN_000191bd("getaddrinfo: %s: %d",param_1,iVar2,extraout_EDX);\n    uVar1 = 0xffffffff;\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar1;\n  }\n                    \n  FUN_00017e10();\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_000aa677(char *param_1,undefined4 *param_2)" identifier (parameter_list "(char *param_1,undefined4 *param_2)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  undefined4 extraout_EDX;\n  sockaddr *psVar3;\n  addrinfo *paVar4;\n  int in_GS_OFFSET;\n  byte bVar5;\n  addrinfo *local_44;\n  addrinfo local_40;\n  int local_20;\n  \n  bVar5 = 0;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_44 = (addrinfo *)0x0;\n  paVar4 = &local_40;\n  for (iVar2 = 8; iVar2 != 0; iVar2 = iVar2 + -1) {\n    paVar4->ai_flags = 0;\n    paVar4 = (addrinfo *)&paVar4->ai_family;\n  }\n  local_40.ai_family = 10;\n  iVar2 = getaddrinfo(param_1,(char *)0x0,&local_40,&local_44);\n  if (iVar2 == 0) {\n    psVar3 = local_44->ai_addr;\n    for (iVar2 = 7; iVar2 != 0; iVar2 = iVar2 + -1) {\n      *param_2 = *(undefined4 *)psVar3;\n      psVar3 = (sockaddr *)((int)psVar3 + (uint)bVar5 * -8 + 4);\n      param_2 = param_2 + (uint)bVar5 * -2 + 1;\n    }\n    freeaddrinfo(local_44);\n    uVar1 = 0;\n  }\n  else {\n    FUN_000191bd("getaddrinfo: %s: %d",param_1,iVar2,extraout_EDX);\n    uVar1 = 0xffffffff;\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar1;\n  }\n                    \n  FUN_00017e10();\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 extraout_EDX;" type_identifier identifier ;) (declaration "sockaddr *psVar3;" type_identifier (pointer_declarator "*psVar3" * identifier) ;) (declaration "addrinfo *paVar4;" type_identifier (pointer_declarator "*paVar4" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "byte bVar5;" type_identifier identifier ;) (declaration "addrinfo *local_44;" type_identifier (pointer_declarator "*local_44" * identifier) ;) (declaration "addrinfo local_40;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (expression_statement "bVar5 = 0;" (assignment_expression "bVar5 = 0" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "local_44 = (addrinfo *)0x0;" (assignment_expression "local_44 = (addrinfo *)0x0" identifier = (cast_expression "(addrinfo *)0x0" ( (type_descriptor "addrinfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "paVar4 = &local_40;" (assignment_expression "paVar4 = &local_40" identifier = (pointer_expression "&local_40" & identifier)) ;) (for_statement "for (iVar2 = 8; iVar2 != 0; iVar2 = iVar2 + -1) {\n    paVar4->ai_flags = 0;\n    paVar4 = (addrinfo *)&paVar4->ai_family;\n  }" for ( (assignment_expression "iVar2 = 8" identifier = number_literal) ; (binary_expression "iVar2 != 0" identifier != number_literal) ; (assignment_expression "iVar2 = iVar2 + -1" identifier = (binary_expression "iVar2 + -1" identifier + number_literal)) ) (compound_statement "{\n    paVar4->ai_flags = 0;\n    paVar4 = (addrinfo *)&paVar4->ai_family;\n  }" { (expression_statement "paVar4->ai_flags = 0;" (assignment_expression "paVar4->ai_flags = 0" (field_expression "paVar4->ai_flags" identifier -> field_identifier) = number_literal) ;) (expression_statement "paVar4 = (addrinfo *)&paVar4->ai_family;" (assignment_expression "paVar4 = (addrinfo *)&paVar4->ai_family" identifier = (cast_expression "(addrinfo *)&paVar4->ai_family" ( (type_descriptor "addrinfo *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&paVar4->ai_family" & (field_expression "paVar4->ai_family" identifier -> field_identifier)))) ;) })) (expression_statement "local_40.ai_family = 10;" (assignment_expression "local_40.ai_family = 10" (field_expression "local_40.ai_family" identifier . field_identifier) = number_literal) ;) (expression_statement "iVar2 = getaddrinfo(param_1,(char *)0x0,&local_40,&local_44);" (assignment_expression "iVar2 = getaddrinfo(param_1,(char *)0x0,&local_40,&local_44)" identifier = (call_expression "getaddrinfo(param_1,(char *)0x0,&local_40,&local_44)" identifier (argument_list "(param_1,(char *)0x0,&local_40,&local_44)" ( identifier , (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) , (pointer_expression "&local_40" & identifier) , (pointer_expression "&local_44" & identifier) )))) ;) (if_statement "if (iVar2 == 0) {\n    psVar3 = local_44->ai_addr;\n    for (iVar2 = 7; iVar2 != 0; iVar2 = iVar2 + -1) {\n      *param_2 = *(undefined4 *)psVar3;\n      psVar3 = (sockaddr *)((int)psVar3 + (uint)bVar5 * -8 + 4);\n      param_2 = param_2 + (uint)bVar5 * -2 + 1;\n    }\n    freeaddrinfo(local_44);\n    uVar1 = 0;\n  }\n  else {\n    FUN_000191bd("getaddrinfo: %s: %d",param_1,iVar2,extraout_EDX);\n    uVar1 = 0xffffffff;\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    psVar3 = local_44->ai_addr;\n    for (iVar2 = 7; iVar2 != 0; iVar2 = iVar2 + -1) {\n      *param_2 = *(undefined4 *)psVar3;\n      psVar3 = (sockaddr *)((int)psVar3 + (uint)bVar5 * -8 + 4);\n      param_2 = param_2 + (uint)bVar5 * -2 + 1;\n    }\n    freeaddrinfo(local_44);\n    uVar1 = 0;\n  }" { (expression_statement "psVar3 = local_44->ai_addr;" (assignment_expression "psVar3 = local_44->ai_addr" identifier = (field_expression "local_44->ai_addr" identifier -> field_identifier)) ;) (for_statement "for (iVar2 = 7; iVar2 != 0; iVar2 = iVar2 + -1) {\n      *param_2 = *(undefined4 *)psVar3;\n      psVar3 = (sockaddr *)((int)psVar3 + (uint)bVar5 * -8 + 4);\n      param_2 = param_2 + (uint)bVar5 * -2 + 1;\n    }" for ( (assignment_expression "iVar2 = 7" identifier = number_literal) ; (binary_expression "iVar2 != 0" identifier != number_literal) ; (assignment_expression "iVar2 = iVar2 + -1" identifier = (binary_expression "iVar2 + -1" identifier + number_literal)) ) (compound_statement "{\n      *param_2 = *(undefined4 *)psVar3;\n      psVar3 = (sockaddr *)((int)psVar3 + (uint)bVar5 * -8 + 4);\n      param_2 = param_2 + (uint)bVar5 * -2 + 1;\n    }" { (expression_statement "*param_2 = *(undefined4 *)psVar3;" (assignment_expression "*param_2 = *(undefined4 *)psVar3" (pointer_expression "*param_2" * identifier) = (pointer_expression "*(undefined4 *)psVar3" * (cast_expression "(undefined4 *)psVar3" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "psVar3 = (sockaddr *)((int)psVar3 + (uint)bVar5 * -8 + 4);" (assignment_expression "psVar3 = (sockaddr *)((int)psVar3 + (uint)bVar5 * -8 + 4)" identifier = (cast_expression "(sockaddr *)((int)psVar3 + (uint)bVar5 * -8 + 4)" ( (type_descriptor "sockaddr *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)psVar3 + (uint)bVar5 * -8 + 4)" ( (binary_expression "(int)psVar3 + (uint)bVar5 * -8 + 4" (binary_expression "(int)psVar3 + (uint)bVar5 * -8" (cast_expression "(int)psVar3" ( (type_descriptor "int" primitive_type) ) identifier) + (binary_expression "(uint)bVar5 * -8" (cast_expression "(uint)bVar5" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal) )))) ;) (expression_statement "param_2 = param_2 + (uint)bVar5 * -2 + 1;" (assignment_expression "param_2 = param_2 + (uint)bVar5 * -2 + 1" identifier = (binary_expression "param_2 + (uint)bVar5 * -2 + 1" (binary_expression "param_2 + (uint)bVar5 * -2" identifier + (binary_expression "(uint)bVar5 * -2" (cast_expression "(uint)bVar5" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) })) (expression_statement "freeaddrinfo(local_44);" (call_expression "freeaddrinfo(local_44)" identifier (argument_list "(local_44)" ( identifier ))) ;) (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    FUN_000191bd("getaddrinfo: %s: %d",param_1,iVar2,extraout_EDX);\n    uVar1 = 0xffffffff;\n  }" else (compound_statement "{\n    FUN_000191bd("getaddrinfo: %s: %d",param_1,iVar2,extraout_EDX);\n    uVar1 = 0xffffffff;\n  }" { (expression_statement "FUN_000191bd("getaddrinfo: %s: %d",param_1,iVar2,extraout_EDX);" (call_expression "FUN_000191bd("getaddrinfo: %s: %d",param_1,iVar2,extraout_EDX)" identifier (argument_list "("getaddrinfo: %s: %d",param_1,iVar2,extraout_EDX)" ( (string_literal ""getaddrinfo: %s: %d"" " string_content ") , identifier , identifier , identifier ))) ;) (expression_statement "uVar1 = 0xffffffff;" (assignment_expression "uVar1 = 0xffffffff" identifier = number_literal) ;) }))) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar1;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return uVar1;\n  }" { (return_statement "return uVar1;" return identifier ;) })) (expression_statement "FUN_00017e10();" (call_expression "FUN_00017e10()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) (for_statement for ( (assignment_expression IDENT = LIT) ; (binary_expression IDENT != LIT) ; (assignment_expression IDENT = (binary_expression IDENT + LIT)) ) (compound_statement { (expression_statement (assignment_expression (field_expression IDENT -> field_identifier) = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression & (field_expression IDENT -> field_identifier)))) ;) })) (expression_statement (assignment_expression (field_expression IDENT . field_identifier) = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) , (pointer_expression & IDENT) , (pointer_expression & IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (field_expression IDENT -> field_identifier)) ;) (for_statement for ( (assignment_expression IDENT = LIT) ; (binary_expression IDENT != LIT) ; (assignment_expression IDENT = (binary_expression IDENT + LIT)) ) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) * LIT)) + LIT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) * LIT)) + LIT)) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "undefined4 __regparm3 FUN_000aa677(char *param_1,undefined4 *param_2)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  undefined4 extraout_EDX;\n  sockaddr *psVar3;\n  addrinfo *paVar4;\n  int in_GS_OFFSET;\n  byte bVar5;\n  addrinfo *local_44;\n  addrinfo local_40;\n  int local_20;\n  \n  bVar5 = 0;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_44 = (addrinfo *)0x0;\n  paVar4 = &local_40;\n  for (iVar2 = 8; iVar2 != 0; iVar2 = iVar2 + -1) {\n    paVar4->ai_flags = 0;\n    paVar4 = (addrinfo *)&paVar4->ai_family;\n  }\n  local_40.ai_family = 10;\n  iVar2 = getaddrinfo(param_1,(char *)0x0,&local_40,&local_44);\n  if (iVar2 == 0) {\n    psVar3 = local_44->ai_addr;\n    for (iVar2 = 7; iVar2 != 0; iVar2 = iVar2 + -1) {\n      *param_2 = *(undefined4 *)psVar3;\n      psVar3 = (sockaddr *)((int)psVar3 + (uint)bVar5 * -8 + 4);\n      param_2 = param_2 + (uint)bVar5 * -2 + 1;\n    }\n    freeaddrinfo(local_44);\n    uVar1 = 0;\n  }\n  else {\n    FUN_000191bd("getaddrinfo: %s: %d",param_1,iVar2,extraout_EDX);\n    uVar1 = 0xffffffff;\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar1;\n  }\n                    \n  FUN_00017e10();\n}" (type_identifier "undefined4") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_000aa677(char *param_1,undefined4 *param_2)" (identifier "FUN_000aa677") (parameter_list "(char *param_1,undefined4 *param_2)" (( "(") (parameter_declaration "char *param_1" (primitive_type "char") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "undefined4 *param_2" (type_identifier "undefined4") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  undefined4 extraout_EDX;\n  sockaddr *psVar3;\n  addrinfo *paVar4;\n  int in_GS_OFFSET;\n  byte bVar5;\n  addrinfo *local_44;\n  addrinfo local_40;\n  int local_20;\n  \n  bVar5 = 0;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_44 = (addrinfo *)0x0;\n  paVar4 = &local_40;\n  for (iVar2 = 8; iVar2 != 0; iVar2 = iVar2 + -1) {\n    paVar4->ai_flags = 0;\n    paVar4 = (addrinfo *)&paVar4->ai_family;\n  }\n  local_40.ai_family = 10;\n  iVar2 = getaddrinfo(param_1,(char *)0x0,&local_40,&local_44);\n  if (iVar2 == 0) {\n    psVar3 = local_44->ai_addr;\n    for (iVar2 = 7; iVar2 != 0; iVar2 = iVar2 + -1) {\n      *param_2 = *(undefined4 *)psVar3;\n      psVar3 = (sockaddr *)((int)psVar3 + (uint)bVar5 * -8 + 4);\n      param_2 = param_2 + (uint)bVar5 * -2 + 1;\n    }\n    freeaddrinfo(local_44);\n    uVar1 = 0;\n  }\n  else {\n    FUN_000191bd("getaddrinfo: %s: %d",param_1,iVar2,extraout_EDX);\n    uVar1 = 0xffffffff;\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar1;\n  }\n                    \n  FUN_00017e10();\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "undefined4 extraout_EDX;" (type_identifier "undefined4") (identifier "extraout_EDX") (; ";")) (declaration "sockaddr *psVar3;" (type_identifier "sockaddr") (pointer_declarator "*psVar3" (* "*") (identifier "psVar3")) (; ";")) (declaration "addrinfo *paVar4;" (type_identifier "addrinfo") (pointer_declarator "*paVar4" (* "*") (identifier "paVar4")) (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "byte bVar5;" (type_identifier "byte") (identifier "bVar5") (; ";")) (declaration "addrinfo *local_44;" (type_identifier "addrinfo") (pointer_declarator "*local_44" (* "*") (identifier "local_44")) (; ";")) (declaration "addrinfo local_40;" (type_identifier "addrinfo") (identifier "local_40") (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (expression_statement "bVar5 = 0;" (assignment_expression "bVar5 = 0" (identifier "bVar5") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "local_44 = (addrinfo *)0x0;" (assignment_expression "local_44 = (addrinfo *)0x0" (identifier "local_44") (= "=") (cast_expression "(addrinfo *)0x0" (( "(") (type_descriptor "addrinfo *" (type_identifier "addrinfo") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (expression_statement "paVar4 = &local_40;" (assignment_expression "paVar4 = &local_40" (identifier "paVar4") (= "=") (pointer_expression "&local_40" (& "&") (identifier "local_40"))) (; ";")) (for_statement "for (iVar2 = 8; iVar2 != 0; iVar2 = iVar2 + -1) {\n    paVar4->ai_flags = 0;\n    paVar4 = (addrinfo *)&paVar4->ai_family;\n  }" (for "for") (( "(") (assignment_expression "iVar2 = 8" (identifier "iVar2") (= "=") (number_literal "8")) (; ";") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) (; ";") (assignment_expression "iVar2 = iVar2 + -1" (identifier "iVar2") (= "=") (binary_expression "iVar2 + -1" (identifier "iVar2") (+ "+") (number_literal "-1"))) () ")") (compound_statement "{\n    paVar4->ai_flags = 0;\n    paVar4 = (addrinfo *)&paVar4->ai_family;\n  }" ({ "{") (expression_statement "paVar4->ai_flags = 0;" (assignment_expression "paVar4->ai_flags = 0" (field_expression "paVar4->ai_flags" (identifier "paVar4") (-> "->") (field_identifier "ai_flags")) (= "=") (number_literal "0")) (; ";")) (expression_statement "paVar4 = (addrinfo *)&paVar4->ai_family;" (assignment_expression "paVar4 = (addrinfo *)&paVar4->ai_family" (identifier "paVar4") (= "=") (cast_expression "(addrinfo *)&paVar4->ai_family" (( "(") (type_descriptor "addrinfo *" (type_identifier "addrinfo") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "&paVar4->ai_family" (& "&") (field_expression "paVar4->ai_family" (identifier "paVar4") (-> "->") (field_identifier "ai_family"))))) (; ";")) (} "}"))) (expression_statement "local_40.ai_family = 10;" (assignment_expression "local_40.ai_family = 10" (field_expression "local_40.ai_family" (identifier "local_40") (. ".") (field_identifier "ai_family")) (= "=") (number_literal "10")) (; ";")) (expression_statement "iVar2 = getaddrinfo(param_1,(char *)0x0,&local_40,&local_44);" (assignment_expression "iVar2 = getaddrinfo(param_1,(char *)0x0,&local_40,&local_44)" (identifier "iVar2") (= "=") (call_expression "getaddrinfo(param_1,(char *)0x0,&local_40,&local_44)" (identifier "getaddrinfo") (argument_list "(param_1,(char *)0x0,&local_40,&local_44)" (( "(") (identifier "param_1") (, ",") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (, ",") (pointer_expression "&local_40" (& "&") (identifier "local_40")) (, ",") (pointer_expression "&local_44" (& "&") (identifier "local_44")) () ")")))) (; ";")) (if_statement "if (iVar2 == 0) {\n    psVar3 = local_44->ai_addr;\n    for (iVar2 = 7; iVar2 != 0; iVar2 = iVar2 + -1) {\n      *param_2 = *(undefined4 *)psVar3;\n      psVar3 = (sockaddr *)((int)psVar3 + (uint)bVar5 * -8 + 4);\n      param_2 = param_2 + (uint)bVar5 * -2 + 1;\n    }\n    freeaddrinfo(local_44);\n    uVar1 = 0;\n  }\n  else {\n    FUN_000191bd("getaddrinfo: %s: %d",param_1,iVar2,extraout_EDX);\n    uVar1 = 0xffffffff;\n  }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    psVar3 = local_44->ai_addr;\n    for (iVar2 = 7; iVar2 != 0; iVar2 = iVar2 + -1) {\n      *param_2 = *(undefined4 *)psVar3;\n      psVar3 = (sockaddr *)((int)psVar3 + (uint)bVar5 * -8 + 4);\n      param_2 = param_2 + (uint)bVar5 * -2 + 1;\n    }\n    freeaddrinfo(local_44);\n    uVar1 = 0;\n  }" ({ "{") (expression_statement "psVar3 = local_44->ai_addr;" (assignment_expression "psVar3 = local_44->ai_addr" (identifier "psVar3") (= "=") (field_expression "local_44->ai_addr" (identifier "local_44") (-> "->") (field_identifier "ai_addr"))) (; ";")) (for_statement "for (iVar2 = 7; iVar2 != 0; iVar2 = iVar2 + -1) {\n      *param_2 = *(undefined4 *)psVar3;\n      psVar3 = (sockaddr *)((int)psVar3 + (uint)bVar5 * -8 + 4);\n      param_2 = param_2 + (uint)bVar5 * -2 + 1;\n    }" (for "for") (( "(") (assignment_expression "iVar2 = 7" (identifier "iVar2") (= "=") (number_literal "7")) (; ";") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) (; ";") (assignment_expression "iVar2 = iVar2 + -1" (identifier "iVar2") (= "=") (binary_expression "iVar2 + -1" (identifier "iVar2") (+ "+") (number_literal "-1"))) () ")") (compound_statement "{\n      *param_2 = *(undefined4 *)psVar3;\n      psVar3 = (sockaddr *)((int)psVar3 + (uint)bVar5 * -8 + 4);\n      param_2 = param_2 + (uint)bVar5 * -2 + 1;\n    }" ({ "{") (expression_statement "*param_2 = *(undefined4 *)psVar3;" (assignment_expression "*param_2 = *(undefined4 *)psVar3" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (pointer_expression "*(undefined4 *)psVar3" (* "*") (cast_expression "(undefined4 *)psVar3" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "psVar3")))) (; ";")) (expression_statement "psVar3 = (sockaddr *)((int)psVar3 + (uint)bVar5 * -8 + 4);" (assignment_expression "psVar3 = (sockaddr *)((int)psVar3 + (uint)bVar5 * -8 + 4)" (identifier "psVar3") (= "=") (cast_expression "(sockaddr *)((int)psVar3 + (uint)bVar5 * -8 + 4)" (( "(") (type_descriptor "sockaddr *" (type_identifier "sockaddr") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)psVar3 + (uint)bVar5 * -8 + 4)" (( "(") (binary_expression "(int)psVar3 + (uint)bVar5 * -8 + 4" (binary_expression "(int)psVar3 + (uint)bVar5 * -8" (cast_expression "(int)psVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "psVar3")) (+ "+") (binary_expression "(uint)bVar5 * -8" (cast_expression "(uint)bVar5" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "bVar5")) (* "*") (number_literal "-8"))) (+ "+") (number_literal "4")) () ")")))) (; ";")) (expression_statement "param_2 = param_2 + (uint)bVar5 * -2 + 1;" (assignment_expression "param_2 = param_2 + (uint)bVar5 * -2 + 1" (identifier "param_2") (= "=") (binary_expression "param_2 + (uint)bVar5 * -2 + 1" (binary_expression "param_2 + (uint)bVar5 * -2" (identifier "param_2") (+ "+") (binary_expression "(uint)bVar5 * -2" (cast_expression "(uint)bVar5" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "bVar5")) (* "*") (number_literal "-2"))) (+ "+") (number_literal "1"))) (; ";")) (} "}"))) (expression_statement "freeaddrinfo(local_44);" (call_expression "freeaddrinfo(local_44)" (identifier "freeaddrinfo") (argument_list "(local_44)" (( "(") (identifier "local_44") () ")"))) (; ";")) (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" (identifier "uVar1") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n    FUN_000191bd("getaddrinfo: %s: %d",param_1,iVar2,extraout_EDX);\n    uVar1 = 0xffffffff;\n  }" (else "else") (compound_statement "{\n    FUN_000191bd("getaddrinfo: %s: %d",param_1,iVar2,extraout_EDX);\n    uVar1 = 0xffffffff;\n  }" ({ "{") (expression_statement "FUN_000191bd("getaddrinfo: %s: %d",param_1,iVar2,extraout_EDX);" (call_expression "FUN_000191bd("getaddrinfo: %s: %d",param_1,iVar2,extraout_EDX)" (identifier "FUN_000191bd") (argument_list "("getaddrinfo: %s: %d",param_1,iVar2,extraout_EDX)" (( "(") (string_literal ""getaddrinfo: %s: %d"" (" """) (string_content "getaddrinfo: %s: %d") (" """)) (, ",") (identifier "param_1") (, ",") (identifier "iVar2") (, ",") (identifier "extraout_EDX") () ")"))) (; ";")) (expression_statement "uVar1 = 0xffffffff;" (assignment_expression "uVar1 = 0xffffffff" (identifier "uVar1") (= "=") (number_literal "0xffffffff")) (; ";")) (} "}")))) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar1;\n  }" (if "if") (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return uVar1;\n  }" ({ "{") (return_statement "return uVar1;" (return "return") (identifier "uVar1") (; ";")) (} "}"))) (expression_statement "FUN_00017e10();" (call_expression "FUN_00017e10()" (identifier "FUN_00017e10") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

int function_1(char *name,type_1 *sin6)

{
  type_2 *ai;
  type_2 req;
  
}


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

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

undefined4 __regparm3 MASKED(char *param_1,undefined4 *param_2)

{
  undefined4 uVar1;
  int iVar2;
  undefined4 extraout_EDX;
  sockaddr *psVar3;
  addrinfo *paVar4;
  int in_GS_OFFSET;
  byte bVar5;
  addrinfo *local_44;
  addrinfo local_40;
  int local_20;
  
  bVar5 = 0;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  local_44 = (addrinfo *)0x0;
  paVar4 = &local_40;
  for (iVar2 = 8; iVar2 != 0; iVar2 = iVar2 + -1) {
    paVar4->ai_flags = 0;
    paVar4 = (addrinfo *)&paVar4->ai_family;
  }
  local_40.ai_family = 10;
  iVar2 = getaddrinfo(param_1,(char *)0x0,&local_40,&local_44);
  if (iVar2 == 0) {
    psVar3 = local_44->ai_addr;
    for (iVar2 = 7; iVar2 != 0; iVar2 = iVar2 + -1) {
      *param_2 = *(undefined4 *)psVar3;
      psVar3 = (sockaddr *)((int)psVar3 + (uint)bVar5 * -8 + 4);
      param_2 = param_2 + (uint)bVar5 * -2 + 1;
    }
    freeaddrinfo(local_44);
    uVar1 = 0;
  }
  else {
    FUN_000191bd("getaddrinfo: %s: %d",param_1,iVar2,extraout_EDX);
    uVar1 = 0xffffffff;
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return uVar1;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00017e10();
}

