
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

_Bool socket_ip_address(int sock,ip_address *ip,int endpoint)

{
  int iVar1;
  char *pcVar2;
  int iVar3;
  undefined1 uVar4;
  sockaddr_storage *psVar5;
  int in_GS_OFFSET;
  socklen_t addrlen;
  sockaddr_storage storage;
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  addrlen = 0x80;
  psVar5 = &storage;
  for (iVar3 = 0x20; iVar3 != 0; iVar3 = iVar3 + -1) {
    psVar5->ss_family = 0;
    psVar5->__ss_padding[0] = '\0';
    psVar5->__ss_padding[1] = '\0';
    psVar5 = (sockaddr_storage *)(psVar5->__ss_padding + 2);
  }
  if (endpoint == 0) {
    iVar3 = getsockname(sock,(sockaddr *)&storage,&addrlen);
  }
  else {
    if (endpoint != 1) {
                    /* WARNING: Subroutine does not return */
      abort();
    }
    iVar3 = getpeername(sock,(sockaddr *)&storage,&addrlen);
  }
  if (iVar3 < 0) {
    uVar4 = 0;
  }
  else {
    (ip->data).d4.s_addr = 0;
    *(undefined4 *)((int)&ip->data + 4) = 0;
    *(undefined4 *)((int)&ip->data + 8) = 0;
    *(undefined4 *)((int)&ip->data + 0xc) = 0;
    ip->ipv6_scope = 0;
    ip->family = (uint)storage.ss_family;
    if (storage.ss_family == 2) {
      (ip->data).d4.s_addr = storage.__ss_padding._2_4_;
    }
    else {
      if (storage.ss_family != 10) {
                    /* WARNING: Subroutine does not return */
        abort();
      }
      (ip->data).d4.s_addr = storage.__ss_padding._6_4_;
      *(undefined4 *)((int)&ip->data + 4) = storage.__ss_padding._10_4_;
      *(undefined4 *)((int)&ip->data + 8) = storage.__ss_padding._14_4_;
      *(undefined4 *)((int)&ip->data + 0xc) = storage.__ss_padding._18_4_;
      ip->ipv6_scope = storage.__ss_padding._22_4_;
    }
    uVar4 = opt.debug;
    if (opt.debug == false) {
      uVar4 = 1;
    }
    else {
      pcVar2 = print_address(ip);
      debug_logprintf("conaddr is: %s\n",pcVar2);
    }
  }
  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail_local();
  }
  return (_Bool)uVar4;
}



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

char FUN_00019280(int param_1,uint *param_2,int param_3)

{
  undefined4 uVar1;
  int iVar2;
  char cVar3;
  sockaddr *psVar4;
  int in_GS_OFFSET;
  socklen_t local_a4;
  sockaddr local_a0;
  uint local_90;
  uint local_8c;
  uint local_88;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x1928e;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  local_a4 = 0x80;
  psVar4 = &local_a0;
  for (iVar2 = 0x20; iVar2 != 0; iVar2 = iVar2 + -1) {
    psVar4->sa_family = 0;
    psVar4->sa_data[0] = '\0';
    psVar4->sa_data[1] = '\0';
    psVar4 = (sockaddr *)(psVar4->sa_data + 2);
  }
  if (param_3 == 0) {
    iVar2 = getsockname(param_1,&local_a0,&local_a4);
  }
  else {
    if (param_3 != 1) {
                    /* WARNING: Subroutine does not return */
      abort();
    }
    iVar2 = getpeername(param_1,&local_a0,&local_a4);
  }
  if (iVar2 < 0) {
    cVar3 = '\0';
  }
  else {
    param_2[1] = 0;
    param_2[2] = 0;
    param_2[3] = 0;
    param_2[4] = 0;
    param_2[5] = 0;
    *param_2 = (uint)local_a0.sa_family;
    if (local_a0.sa_family == 2) {
      param_2[1] = local_a0.sa_data._2_4_;
    }
    else {
      if (local_a0.sa_family != 10) {
                    /* WARNING: Subroutine does not return */
        abort();
      }
      param_2[1] = local_a0.sa_data._6_4_;
      param_2[2] = local_a0.sa_data._10_4_;
      param_2[3] = local_90;
      param_2[4] = local_8c;
      param_2[5] = local_88;
    }
    cVar3 = DAT_000a8b9b;
    if (DAT_000a8b9b == '\0') {
      cVar3 = '\x01';
    }
    else {
      uVar1 = FUN_0002a200(param_2);
      FUN_0003b070("conaddr is: %s\n",uVar1);
    }
  }
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_0006da50();
  }
  return cVar3;
}


PUSH EBP
MOV ECX,0x20
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00019070
ADD EBX,0x87942
SUB ESP,0xac
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x9c],EAX
XOR EAX,EAX
LEA EDX,[ESP + 0x1c]
MOV EBP,dword ptr [ESP + 0xc8]
MOV ESI,dword ptr [ESP + 0xc4]
MOV EDI,EDX
MOV dword ptr [ESP + 0x18],0x80
STOSD.REP ES:EDI
TEST EBP,EBP
JZ 0x000193d8
CMP EBP,0x1
JNZ 0x00016f90
SUB ESP,0x4
LEA EAX,[ESP + 0x1c]
PUSH EAX
PUSH EDX
PUSH dword ptr [ESP + 0xcc]
CALL 0x00016e70
ADD ESP,0x10
TEST EAX,EAX
JS 0x000193d0
MOVZX EDX,word ptr [ESP + 0x1c]
MOV dword ptr [ESI + 0x4],0x0
MOV dword ptr [ESI + 0x8],0x0
MOV dword ptr [ESI + 0xc],0x0
MOV dword ptr [ESI + 0x10],0x0
MOV dword ptr [ESI + 0x14],0x0
MOV dword ptr [ESI],EDX
CMP DX,0x2
JZ 0x00019390
CMP DX,0xa
JNZ 0x000193fa
MOV EAX,dword ptr [ESP + 0x24]
MOV dword ptr [ESI + 0x4],EAX
MOV EAX,dword ptr [ESP + 0x28]
MOV dword ptr [ESI + 0x8],EAX
MOV EAX,dword ptr [ESP + 0x2c]
MOV dword ptr [ESI + 0xc],EAX
MOV EAX,dword ptr [ESP + 0x30]
MOV dword ptr [ESI + 0x10],EAX
MOV EAX,dword ptr [ESP + 0x34]
MOV dword ptr [ESI + 0x14],EAX
LEA EAX,[EBX + 0x7e70]
MOVZX EDX,byte ptr [EAX + 0x15b]
TEST DL,DL
JNZ 0x000193a8
MOV EDX,0x1
MOV ECX,dword ptr [ESP + 0x9c]
XOR ECX,dword ptr GS:[0x14]
MOV EAX,EDX
JNZ 0x000193f5
ADD ESP,0xac
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EAX,dword ptr [ESP + 0x20]
MOV dword ptr [ESI + 0x4],EAX
LEA EAX,[EBX + 0x7e70]
MOVZX EDX,byte ptr [EAX + 0x15b]
TEST DL,DL
JZ 0x00019366
MOV byte ptr [ESP + 0xf],DL
SUB ESP,0xc
PUSH ESI
CALL 0x0002a200
POP EDX
POP ECX
PUSH EAX
LEA EAX,[EBX + 0xfffcd438]
PUSH EAX
CALL 0x0003b070
ADD ESP,0x10
MOVZX EDX,byte ptr [ESP + 0xf]
JMP 0x0001936b
XOR EDX,EDX
JMP 0x0001936b
SUB ESP,0x4
LEA EAX,[ESP + 0x1c]
PUSH EAX
PUSH EDX
PUSH dword ptr [ESP + 0xcc]
CALL 0x00016160
ADD ESP,0x10
JMP 0x000192f0
CALL 0x0006da50
CALL 0x00016060
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nchar FUN_00019280(int param_1,uint *param_2,int param_3)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  char cVar3;\n  sockaddr *psVar4;\n  int in_GS_OFFSET;\n  socklen_t local_a4;\n  sockaddr local_a0;\n  uint local_90;\n  uint local_8c;\n  uint local_88;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1928e;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_a4 = 0x80;\n  psVar4 = &local_a0;\n  for (iVar2 = 0x20; iVar2 != 0; iVar2 = iVar2 + -1) {\n    psVar4->sa_family = 0;\n    psVar4->sa_data[0] = '\0';\n    psVar4->sa_data[1] = '\0';\n    psVar4 = (sockaddr *)(psVar4->sa_data + 2);\n  }\n  if (param_3 == 0) {\n    iVar2 = getsockname(param_1,&local_a0,&local_a4);\n  }\n  else {\n    if (param_3 != 1) {\n                    /* WARNING: Subroutine does not return */\n      abort();\n    }\n    iVar2 = getpeername(param_1,&local_a0,&local_a4);\n  }\n  if (iVar2 < 0) {\n    cVar3 = '\0';\n  }\n  else {\n    param_2[1] = 0;\n    param_2[2] = 0;\n    param_2[3] = 0;\n    param_2[4] = 0;\n    param_2[5] = 0;\n    *param_2 = (uint)local_a0.sa_family;\n    if (local_a0.sa_family == 2) {\n      param_2[1] = local_a0.sa_data._2_4_;\n    }\n    else {\n      if (local_a0.sa_family != 10) {\n                    /* WARNING: Subroutine does not return */\n        abort();\n      }\n      param_2[1] = local_a0.sa_data._6_4_;\n      param_2[2] = local_a0.sa_data._10_4_;\n      param_2[3] = local_90;\n      param_2[4] = local_8c;\n      param_2[5] = local_88;\n    }\n    cVar3 = DAT_000a8b9b;\n    if (DAT_000a8b9b == '\0') {\n      cVar3 = '\x01';\n    }\n    else {\n      uVar1 = FUN_0002a200(param_2);\n      FUN_0003b070("conaddr is: %s\n",uVar1);\n    }\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0006da50();\n  }\n  return cVar3;\n}\n\n" comment (function_definition "char FUN_00019280(int param_1,uint *param_2,int param_3)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  char cVar3;\n  sockaddr *psVar4;\n  int in_GS_OFFSET;\n  socklen_t local_a4;\n  sockaddr local_a0;\n  uint local_90;\n  uint local_8c;\n  uint local_88;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1928e;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_a4 = 0x80;\n  psVar4 = &local_a0;\n  for (iVar2 = 0x20; iVar2 != 0; iVar2 = iVar2 + -1) {\n    psVar4->sa_family = 0;\n    psVar4->sa_data[0] = '\0';\n    psVar4->sa_data[1] = '\0';\n    psVar4 = (sockaddr *)(psVar4->sa_data + 2);\n  }\n  if (param_3 == 0) {\n    iVar2 = getsockname(param_1,&local_a0,&local_a4);\n  }\n  else {\n    if (param_3 != 1) {\n                    /* WARNING: Subroutine does not return */\n      abort();\n    }\n    iVar2 = getpeername(param_1,&local_a0,&local_a4);\n  }\n  if (iVar2 < 0) {\n    cVar3 = '\0';\n  }\n  else {\n    param_2[1] = 0;\n    param_2[2] = 0;\n    param_2[3] = 0;\n    param_2[4] = 0;\n    param_2[5] = 0;\n    *param_2 = (uint)local_a0.sa_family;\n    if (local_a0.sa_family == 2) {\n      param_2[1] = local_a0.sa_data._2_4_;\n    }\n    else {\n      if (local_a0.sa_family != 10) {\n                    /* WARNING: Subroutine does not return */\n        abort();\n      }\n      param_2[1] = local_a0.sa_data._6_4_;\n      param_2[2] = local_a0.sa_data._10_4_;\n      param_2[3] = local_90;\n      param_2[4] = local_8c;\n      param_2[5] = local_88;\n    }\n    cVar3 = DAT_000a8b9b;\n    if (DAT_000a8b9b == '\0') {\n      cVar3 = '\x01';\n    }\n    else {\n      uVar1 = FUN_0002a200(param_2);\n      FUN_0003b070("conaddr is: %s\n",uVar1);\n    }\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0006da50();\n  }\n  return cVar3;\n}" primitive_type (function_declarator "FUN_00019280(int param_1,uint *param_2,int param_3)" identifier (parameter_list "(int param_1,uint *param_2,int param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  char cVar3;\n  sockaddr *psVar4;\n  int in_GS_OFFSET;\n  socklen_t local_a4;\n  sockaddr local_a0;\n  uint local_90;\n  uint local_8c;\n  uint local_88;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1928e;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_a4 = 0x80;\n  psVar4 = &local_a0;\n  for (iVar2 = 0x20; iVar2 != 0; iVar2 = iVar2 + -1) {\n    psVar4->sa_family = 0;\n    psVar4->sa_data[0] = '\0';\n    psVar4->sa_data[1] = '\0';\n    psVar4 = (sockaddr *)(psVar4->sa_data + 2);\n  }\n  if (param_3 == 0) {\n    iVar2 = getsockname(param_1,&local_a0,&local_a4);\n  }\n  else {\n    if (param_3 != 1) {\n                    /* WARNING: Subroutine does not return */\n      abort();\n    }\n    iVar2 = getpeername(param_1,&local_a0,&local_a4);\n  }\n  if (iVar2 < 0) {\n    cVar3 = '\0';\n  }\n  else {\n    param_2[1] = 0;\n    param_2[2] = 0;\n    param_2[3] = 0;\n    param_2[4] = 0;\n    param_2[5] = 0;\n    *param_2 = (uint)local_a0.sa_family;\n    if (local_a0.sa_family == 2) {\n      param_2[1] = local_a0.sa_data._2_4_;\n    }\n    else {\n      if (local_a0.sa_family != 10) {\n                    /* WARNING: Subroutine does not return */\n        abort();\n      }\n      param_2[1] = local_a0.sa_data._6_4_;\n      param_2[2] = local_a0.sa_data._10_4_;\n      param_2[3] = local_90;\n      param_2[4] = local_8c;\n      param_2[5] = local_88;\n    }\n    cVar3 = DAT_000a8b9b;\n    if (DAT_000a8b9b == '\0') {\n      cVar3 = '\x01';\n    }\n    else {\n      uVar1 = FUN_0002a200(param_2);\n      FUN_0003b070("conaddr is: %s\n",uVar1);\n    }\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0006da50();\n  }\n  return cVar3;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "char cVar3;" primitive_type identifier ;) (declaration "sockaddr *psVar4;" type_identifier (pointer_declarator "*psVar4" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "socklen_t local_a4;" type_identifier identifier ;) (declaration "sockaddr local_a0;" type_identifier identifier ;) (declaration "uint local_90;" type_identifier identifier ;) (declaration "uint local_8c;" type_identifier identifier ;) (declaration "uint local_88;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x1928e;" (assignment_expression "uStack_14 = 0x1928e" 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_a4 = 0x80;" (assignment_expression "local_a4 = 0x80" identifier = number_literal) ;) (expression_statement "psVar4 = &local_a0;" (assignment_expression "psVar4 = &local_a0" identifier = (pointer_expression "&local_a0" & identifier)) ;) (for_statement "for (iVar2 = 0x20; iVar2 != 0; iVar2 = iVar2 + -1) {\n    psVar4->sa_family = 0;\n    psVar4->sa_data[0] = '\0';\n    psVar4->sa_data[1] = '\0';\n    psVar4 = (sockaddr *)(psVar4->sa_data + 2);\n  }" for ( (assignment_expression "iVar2 = 0x20" 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    psVar4->sa_family = 0;\n    psVar4->sa_data[0] = '\0';\n    psVar4->sa_data[1] = '\0';\n    psVar4 = (sockaddr *)(psVar4->sa_data + 2);\n  }" { (expression_statement "psVar4->sa_family = 0;" (assignment_expression "psVar4->sa_family = 0" (field_expression "psVar4->sa_family" identifier -> field_identifier) = number_literal) ;) (expression_statement "psVar4->sa_data[0] = '\0';" (assignment_expression "psVar4->sa_data[0] = '\0'" (subscript_expression "psVar4->sa_data[0]" (field_expression "psVar4->sa_data" identifier -> field_identifier) [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "psVar4->sa_data[1] = '\0';" (assignment_expression "psVar4->sa_data[1] = '\0'" (subscript_expression "psVar4->sa_data[1]" (field_expression "psVar4->sa_data" identifier -> field_identifier) [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "psVar4 = (sockaddr *)(psVar4->sa_data + 2);" (assignment_expression "psVar4 = (sockaddr *)(psVar4->sa_data + 2)" identifier = (cast_expression "(sockaddr *)(psVar4->sa_data + 2)" ( (type_descriptor "sockaddr *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(psVar4->sa_data + 2)" ( (binary_expression "psVar4->sa_data + 2" (field_expression "psVar4->sa_data" identifier -> field_identifier) + number_literal) )))) ;) })) (if_statement "if (param_3 == 0) {\n    iVar2 = getsockname(param_1,&local_a0,&local_a4);\n  }\n  else {\n    if (param_3 != 1) {\n                    /* WARNING: Subroutine does not return */\n      abort();\n    }\n    iVar2 = getpeername(param_1,&local_a0,&local_a4);\n  }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar2 = getsockname(param_1,&local_a0,&local_a4);\n  }" { (expression_statement "iVar2 = getsockname(param_1,&local_a0,&local_a4);" (assignment_expression "iVar2 = getsockname(param_1,&local_a0,&local_a4)" identifier = (call_expression "getsockname(param_1,&local_a0,&local_a4)" identifier (argument_list "(param_1,&local_a0,&local_a4)" ( identifier , (pointer_expression "&local_a0" & identifier) , (pointer_expression "&local_a4" & identifier) )))) ;) }) (else_clause "else {\n    if (param_3 != 1) {\n                    /* WARNING: Subroutine does not return */\n      abort();\n    }\n    iVar2 = getpeername(param_1,&local_a0,&local_a4);\n  }" else (compound_statement "{\n    if (param_3 != 1) {\n                    /* WARNING: Subroutine does not return */\n      abort();\n    }\n    iVar2 = getpeername(param_1,&local_a0,&local_a4);\n  }" { (if_statement "if (param_3 != 1) {\n                    /* WARNING: Subroutine does not return */\n      abort();\n    }" if (parenthesized_expression "(param_3 != 1)" ( (binary_expression "param_3 != 1" identifier != number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n      abort();\n    }" { comment (expression_statement "abort();" (call_expression "abort()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "iVar2 = getpeername(param_1,&local_a0,&local_a4);" (assignment_expression "iVar2 = getpeername(param_1,&local_a0,&local_a4)" identifier = (call_expression "getpeername(param_1,&local_a0,&local_a4)" identifier (argument_list "(param_1,&local_a0,&local_a4)" ( identifier , (pointer_expression "&local_a0" & identifier) , (pointer_expression "&local_a4" & identifier) )))) ;) }))) (if_statement "if (iVar2 < 0) {\n    cVar3 = '\0';\n  }\n  else {\n    param_2[1] = 0;\n    param_2[2] = 0;\n    param_2[3] = 0;\n    param_2[4] = 0;\n    param_2[5] = 0;\n    *param_2 = (uint)local_a0.sa_family;\n    if (local_a0.sa_family == 2) {\n      param_2[1] = local_a0.sa_data._2_4_;\n    }\n    else {\n      if (local_a0.sa_family != 10) {\n                    /* WARNING: Subroutine does not return */\n        abort();\n      }\n      param_2[1] = local_a0.sa_data._6_4_;\n      param_2[2] = local_a0.sa_data._10_4_;\n      param_2[3] = local_90;\n      param_2[4] = local_8c;\n      param_2[5] = local_88;\n    }\n    cVar3 = DAT_000a8b9b;\n    if (DAT_000a8b9b == '\0') {\n      cVar3 = '\x01';\n    }\n    else {\n      uVar1 = FUN_0002a200(param_2);\n      FUN_0003b070("conaddr is: %s\n",uVar1);\n    }\n  }" if (parenthesized_expression "(iVar2 < 0)" ( (binary_expression "iVar2 < 0" identifier < number_literal) )) (compound_statement "{\n    cVar3 = '\0';\n  }" { (expression_statement "cVar3 = '\0';" (assignment_expression "cVar3 = '\0'" identifier = (char_literal "'\0'" ' escape_sequence ')) ;) }) (else_clause "else {\n    param_2[1] = 0;\n    param_2[2] = 0;\n    param_2[3] = 0;\n    param_2[4] = 0;\n    param_2[5] = 0;\n    *param_2 = (uint)local_a0.sa_family;\n    if (local_a0.sa_family == 2) {\n      param_2[1] = local_a0.sa_data._2_4_;\n    }\n    else {\n      if (local_a0.sa_family != 10) {\n                    /* WARNING: Subroutine does not return */\n        abort();\n      }\n      param_2[1] = local_a0.sa_data._6_4_;\n      param_2[2] = local_a0.sa_data._10_4_;\n      param_2[3] = local_90;\n      param_2[4] = local_8c;\n      param_2[5] = local_88;\n    }\n    cVar3 = DAT_000a8b9b;\n    if (DAT_000a8b9b == '\0') {\n      cVar3 = '\x01';\n    }\n    else {\n      uVar1 = FUN_0002a200(param_2);\n      FUN_0003b070("conaddr is: %s\n",uVar1);\n    }\n  }" else (compound_statement "{\n    param_2[1] = 0;\n    param_2[2] = 0;\n    param_2[3] = 0;\n    param_2[4] = 0;\n    param_2[5] = 0;\n    *param_2 = (uint)local_a0.sa_family;\n    if (local_a0.sa_family == 2) {\n      param_2[1] = local_a0.sa_data._2_4_;\n    }\n    else {\n      if (local_a0.sa_family != 10) {\n                    /* WARNING: Subroutine does not return */\n        abort();\n      }\n      param_2[1] = local_a0.sa_data._6_4_;\n      param_2[2] = local_a0.sa_data._10_4_;\n      param_2[3] = local_90;\n      param_2[4] = local_8c;\n      param_2[5] = local_88;\n    }\n    cVar3 = DAT_000a8b9b;\n    if (DAT_000a8b9b == '\0') {\n      cVar3 = '\x01';\n    }\n    else {\n      uVar1 = FUN_0002a200(param_2);\n      FUN_0003b070("conaddr is: %s\n",uVar1);\n    }\n  }" { (expression_statement "param_2[1] = 0;" (assignment_expression "param_2[1] = 0" (subscript_expression "param_2[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "param_2[2] = 0;" (assignment_expression "param_2[2] = 0" (subscript_expression "param_2[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "param_2[3] = 0;" (assignment_expression "param_2[3] = 0" (subscript_expression "param_2[3]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "param_2[4] = 0;" (assignment_expression "param_2[4] = 0" (subscript_expression "param_2[4]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "param_2[5] = 0;" (assignment_expression "param_2[5] = 0" (subscript_expression "param_2[5]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*param_2 = (uint)local_a0.sa_family;" (assignment_expression "*param_2 = (uint)local_a0.sa_family" (pointer_expression "*param_2" * identifier) = (cast_expression "(uint)local_a0.sa_family" ( (type_descriptor "uint" type_identifier) ) (field_expression "local_a0.sa_family" identifier . field_identifier))) ;) (if_statement "if (local_a0.sa_family == 2) {\n      param_2[1] = local_a0.sa_data._2_4_;\n    }\n    else {\n      if (local_a0.sa_family != 10) {\n                    /* WARNING: Subroutine does not return */\n        abort();\n      }\n      param_2[1] = local_a0.sa_data._6_4_;\n      param_2[2] = local_a0.sa_data._10_4_;\n      param_2[3] = local_90;\n      param_2[4] = local_8c;\n      param_2[5] = local_88;\n    }" if (parenthesized_expression "(local_a0.sa_family == 2)" ( (binary_expression "local_a0.sa_family == 2" (field_expression "local_a0.sa_family" identifier . field_identifier) == number_literal) )) (compound_statement "{\n      param_2[1] = local_a0.sa_data._2_4_;\n    }" { (expression_statement "param_2[1] = local_a0.sa_data._2_4_;" (assignment_expression "param_2[1] = local_a0.sa_data._2_4_" (subscript_expression "param_2[1]" identifier [ number_literal ]) = (field_expression "local_a0.sa_data._2_4_" (field_expression "local_a0.sa_data" identifier . field_identifier) . field_identifier)) ;) }) (else_clause "else {\n      if (local_a0.sa_family != 10) {\n                    /* WARNING: Subroutine does not return */\n        abort();\n      }\n      param_2[1] = local_a0.sa_data._6_4_;\n      param_2[2] = local_a0.sa_data._10_4_;\n      param_2[3] = local_90;\n      param_2[4] = local_8c;\n      param_2[5] = local_88;\n    }" else (compound_statement "{\n      if (local_a0.sa_family != 10) {\n                    /* WARNING: Subroutine does not return */\n        abort();\n      }\n      param_2[1] = local_a0.sa_data._6_4_;\n      param_2[2] = local_a0.sa_data._10_4_;\n      param_2[3] = local_90;\n      param_2[4] = local_8c;\n      param_2[5] = local_88;\n    }" { (if_statement "if (local_a0.sa_family != 10) {\n                    /* WARNING: Subroutine does not return */\n        abort();\n      }" if (parenthesized_expression "(local_a0.sa_family != 10)" ( (binary_expression "local_a0.sa_family != 10" (field_expression "local_a0.sa_family" identifier . field_identifier) != number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n        abort();\n      }" { comment (expression_statement "abort();" (call_expression "abort()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "param_2[1] = local_a0.sa_data._6_4_;" (assignment_expression "param_2[1] = local_a0.sa_data._6_4_" (subscript_expression "param_2[1]" identifier [ number_literal ]) = (field_expression "local_a0.sa_data._6_4_" (field_expression "local_a0.sa_data" identifier . field_identifier) . field_identifier)) ;) (expression_statement "param_2[2] = local_a0.sa_data._10_4_;" (assignment_expression "param_2[2] = local_a0.sa_data._10_4_" (subscript_expression "param_2[2]" identifier [ number_literal ]) = (field_expression "local_a0.sa_data._10_4_" (field_expression "local_a0.sa_data" identifier . field_identifier) . field_identifier)) ;) (expression_statement "param_2[3] = local_90;" (assignment_expression "param_2[3] = local_90" (subscript_expression "param_2[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_2[4] = local_8c;" (assignment_expression "param_2[4] = local_8c" (subscript_expression "param_2[4]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_2[5] = local_88;" (assignment_expression "param_2[5] = local_88" (subscript_expression "param_2[5]" identifier [ number_literal ]) = identifier) ;) }))) (expression_statement "cVar3 = DAT_000a8b9b;" (assignment_expression "cVar3 = DAT_000a8b9b" identifier = identifier) ;) (if_statement "if (DAT_000a8b9b == '\0') {\n      cVar3 = '\x01';\n    }\n    else {\n      uVar1 = FUN_0002a200(param_2);\n      FUN_0003b070("conaddr is: %s\n",uVar1);\n    }" if (parenthesized_expression "(DAT_000a8b9b == '\0')" ( (binary_expression "DAT_000a8b9b == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      cVar3 = '\x01';\n    }" { (expression_statement "cVar3 = '\x01';" (assignment_expression "cVar3 = '\x01'" identifier = (char_literal "'\x01'" ' escape_sequence ')) ;) }) (else_clause "else {\n      uVar1 = FUN_0002a200(param_2);\n      FUN_0003b070("conaddr is: %s\n",uVar1);\n    }" else (compound_statement "{\n      uVar1 = FUN_0002a200(param_2);\n      FUN_0003b070("conaddr is: %s\n",uVar1);\n    }" { (expression_statement "uVar1 = FUN_0002a200(param_2);" (assignment_expression "uVar1 = FUN_0002a200(param_2)" identifier = (call_expression "FUN_0002a200(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (expression_statement "FUN_0003b070("conaddr is: %s\n",uVar1);" (call_expression "FUN_0003b070("conaddr is: %s\n",uVar1)" identifier (argument_list "("conaddr is: %s\n",uVar1)" ( (string_literal ""conaddr is: %s\n"" " string_content escape_sequence ") , identifier ))) ;) }))) }))) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0006da50();\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                    /* WARNING: Subroutine does not return */\n    FUN_0006da50();\n  }" { comment (expression_statement "FUN_0006da50();" (call_expression "FUN_0006da50()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return cVar3;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\n_Bool socket_ip_address(int sock,ip_address *ip,int endpoint)\n\n{\n  int iVar1;\n  char *pcVar2;\n  int iVar3;\n  undefined1 uVar4;\n  sockaddr_storage *psVar5;\n  int in_GS_OFFSET;\n  socklen_t addrlen;\n  sockaddr_storage storage;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  addrlen = 0x80;\n  psVar5 = &storage;\n  for (iVar3 = 0x20; iVar3 != 0; iVar3 = iVar3 + -1) {\n    psVar5->ss_family = 0;\n    psVar5->__ss_padding[0] = '\0';\n    psVar5->__ss_padding[1] = '\0';\n    psVar5 = (sockaddr_storage *)(psVar5->__ss_padding + 2);\n  }\n  if (endpoint == 0) {\n    iVar3 = getsockname(sock,(sockaddr *)&storage,&addrlen);\n  }\n  else {\n    if (endpoint != 1) {\n                    /* WARNING: Subroutine does not return */\n      abort();\n    }\n    iVar3 = getpeername(sock,(sockaddr *)&storage,&addrlen);\n  }\n  if (iVar3 < 0) {\n    uVar4 = 0;\n  }\n  else {\n    (ip->data).d4.s_addr = 0;\n    *(undefined4 *)((int)&ip->data + 4) = 0;\n    *(undefined4 *)((int)&ip->data + 8) = 0;\n    *(undefined4 *)((int)&ip->data + 0xc) = 0;\n    ip->ipv6_scope = 0;\n    ip->family = (uint)storage.ss_family;\n    if (storage.ss_family == 2) {\n      (ip->data).d4.s_addr = storage.__ss_padding._2_4_;\n    }\n    else {\n      if (storage.ss_family != 10) {\n                    /* WARNING: Subroutine does not return */\n        abort();\n      }\n      (ip->data).d4.s_addr = storage.__ss_padding._6_4_;\n      *(undefined4 *)((int)&ip->data + 4) = storage.__ss_padding._10_4_;\n      *(undefined4 *)((int)&ip->data + 8) = storage.__ss_padding._14_4_;\n      *(undefined4 *)((int)&ip->data + 0xc) = storage.__ss_padding._18_4_;\n      ip->ipv6_scope = storage.__ss_padding._22_4_;\n    }\n    uVar4 = opt.debug;\n    if (opt.debug == false) {\n      uVar4 = 1;\n    }\n    else {\n      pcVar2 = print_address(ip);\n      debug_logprintf("conaddr is: %s\n",pcVar2);\n    }\n  }\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return (_Bool)uVar4;\n}\n\n" comment comment comment (function_definition "_Bool socket_ip_address(int sock,ip_address *ip,int endpoint)\n\n{\n  int iVar1;\n  char *pcVar2;\n  int iVar3;\n  undefined1 uVar4;\n  sockaddr_storage *psVar5;\n  int in_GS_OFFSET;\n  socklen_t addrlen;\n  sockaddr_storage storage;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  addrlen = 0x80;\n  psVar5 = &storage;\n  for (iVar3 = 0x20; iVar3 != 0; iVar3 = iVar3 + -1) {\n    psVar5->ss_family = 0;\n    psVar5->__ss_padding[0] = '\0';\n    psVar5->__ss_padding[1] = '\0';\n    psVar5 = (sockaddr_storage *)(psVar5->__ss_padding + 2);\n  }\n  if (endpoint == 0) {\n    iVar3 = getsockname(sock,(sockaddr *)&storage,&addrlen);\n  }\n  else {\n    if (endpoint != 1) {\n                    /* WARNING: Subroutine does not return */\n      abort();\n    }\n    iVar3 = getpeername(sock,(sockaddr *)&storage,&addrlen);\n  }\n  if (iVar3 < 0) {\n    uVar4 = 0;\n  }\n  else {\n    (ip->data).d4.s_addr = 0;\n    *(undefined4 *)((int)&ip->data + 4) = 0;\n    *(undefined4 *)((int)&ip->data + 8) = 0;\n    *(undefined4 *)((int)&ip->data + 0xc) = 0;\n    ip->ipv6_scope = 0;\n    ip->family = (uint)storage.ss_family;\n    if (storage.ss_family == 2) {\n      (ip->data).d4.s_addr = storage.__ss_padding._2_4_;\n    }\n    else {\n      if (storage.ss_family != 10) {\n                    /* WARNING: Subroutine does not return */\n        abort();\n      }\n      (ip->data).d4.s_addr = storage.__ss_padding._6_4_;\n      *(undefined4 *)((int)&ip->data + 4) = storage.__ss_padding._10_4_;\n      *(undefined4 *)((int)&ip->data + 8) = storage.__ss_padding._14_4_;\n      *(undefined4 *)((int)&ip->data + 0xc) = storage.__ss_padding._18_4_;\n      ip->ipv6_scope = storage.__ss_padding._22_4_;\n    }\n    uVar4 = opt.debug;\n    if (opt.debug == false) {\n      uVar4 = 1;\n    }\n    else {\n      pcVar2 = print_address(ip);\n      debug_logprintf("conaddr is: %s\n",pcVar2);\n    }\n  }\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return (_Bool)uVar4;\n}" type_identifier (function_declarator "socket_ip_address(int sock,ip_address *ip,int endpoint)" identifier (parameter_list "(int sock,ip_address *ip,int endpoint)" ( (parameter_declaration "int sock" primitive_type identifier) , (parameter_declaration "ip_address *ip" type_identifier (pointer_declarator "*ip" * identifier)) , (parameter_declaration "int endpoint" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  char *pcVar2;\n  int iVar3;\n  undefined1 uVar4;\n  sockaddr_storage *psVar5;\n  int in_GS_OFFSET;\n  socklen_t addrlen;\n  sockaddr_storage storage;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  addrlen = 0x80;\n  psVar5 = &storage;\n  for (iVar3 = 0x20; iVar3 != 0; iVar3 = iVar3 + -1) {\n    psVar5->ss_family = 0;\n    psVar5->__ss_padding[0] = '\0';\n    psVar5->__ss_padding[1] = '\0';\n    psVar5 = (sockaddr_storage *)(psVar5->__ss_padding + 2);\n  }\n  if (endpoint == 0) {\n    iVar3 = getsockname(sock,(sockaddr *)&storage,&addrlen);\n  }\n  else {\n    if (endpoint != 1) {\n                    /* WARNING: Subroutine does not return */\n      abort();\n    }\n    iVar3 = getpeername(sock,(sockaddr *)&storage,&addrlen);\n  }\n  if (iVar3 < 0) {\n    uVar4 = 0;\n  }\n  else {\n    (ip->data).d4.s_addr = 0;\n    *(undefined4 *)((int)&ip->data + 4) = 0;\n    *(undefined4 *)((int)&ip->data + 8) = 0;\n    *(undefined4 *)((int)&ip->data + 0xc) = 0;\n    ip->ipv6_scope = 0;\n    ip->family = (uint)storage.ss_family;\n    if (storage.ss_family == 2) {\n      (ip->data).d4.s_addr = storage.__ss_padding._2_4_;\n    }\n    else {\n      if (storage.ss_family != 10) {\n                    /* WARNING: Subroutine does not return */\n        abort();\n      }\n      (ip->data).d4.s_addr = storage.__ss_padding._6_4_;\n      *(undefined4 *)((int)&ip->data + 4) = storage.__ss_padding._10_4_;\n      *(undefined4 *)((int)&ip->data + 8) = storage.__ss_padding._14_4_;\n      *(undefined4 *)((int)&ip->data + 0xc) = storage.__ss_padding._18_4_;\n      ip->ipv6_scope = storage.__ss_padding._22_4_;\n    }\n    uVar4 = opt.debug;\n    if (opt.debug == false) {\n      uVar4 = 1;\n    }\n    else {\n      pcVar2 = print_address(ip);\n      debug_logprintf("conaddr is: %s\n",pcVar2);\n    }\n  }\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return (_Bool)uVar4;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined1 uVar4;" type_identifier identifier ;) (declaration "sockaddr_storage *psVar5;" type_identifier (pointer_declarator "*psVar5" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "socklen_t addrlen;" type_identifier identifier ;) (declaration "sockaddr_storage storage;" type_identifier identifier ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(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 "addrlen = 0x80;" (assignment_expression "addrlen = 0x80" identifier = number_literal) ;) (expression_statement "psVar5 = &storage;" (assignment_expression "psVar5 = &storage" identifier = (pointer_expression "&storage" & identifier)) ;) (for_statement "for (iVar3 = 0x20; iVar3 != 0; iVar3 = iVar3 + -1) {\n    psVar5->ss_family = 0;\n    psVar5->__ss_padding[0] = '\0';\n    psVar5->__ss_padding[1] = '\0';\n    psVar5 = (sockaddr_storage *)(psVar5->__ss_padding + 2);\n  }" for ( (assignment_expression "iVar3 = 0x20" identifier = number_literal) ; (binary_expression "iVar3 != 0" identifier != number_literal) ; (assignment_expression "iVar3 = iVar3 + -1" identifier = (binary_expression "iVar3 + -1" identifier + number_literal)) ) (compound_statement "{\n    psVar5->ss_family = 0;\n    psVar5->__ss_padding[0] = '\0';\n    psVar5->__ss_padding[1] = '\0';\n    psVar5 = (sockaddr_storage *)(psVar5->__ss_padding + 2);\n  }" { (expression_statement "psVar5->ss_family = 0;" (assignment_expression "psVar5->ss_family = 0" (field_expression "psVar5->ss_family" identifier -> field_identifier) = number_literal) ;) (expression_statement "psVar5->__ss_padding[0] = '\0';" (assignment_expression "psVar5->__ss_padding[0] = '\0'" (subscript_expression "psVar5->__ss_padding[0]" (field_expression "psVar5->__ss_padding" identifier -> field_identifier) [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "psVar5->__ss_padding[1] = '\0';" (assignment_expression "psVar5->__ss_padding[1] = '\0'" (subscript_expression "psVar5->__ss_padding[1]" (field_expression "psVar5->__ss_padding" identifier -> field_identifier) [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "psVar5 = (sockaddr_storage *)(psVar5->__ss_padding + 2);" (assignment_expression "psVar5 = (sockaddr_storage *)(psVar5->__ss_padding + 2)" identifier = (cast_expression "(sockaddr_storage *)(psVar5->__ss_padding + 2)" ( (type_descriptor "sockaddr_storage *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(psVar5->__ss_padding + 2)" ( (binary_expression "psVar5->__ss_padding + 2" (field_expression "psVar5->__ss_padding" identifier -> field_identifier) + number_literal) )))) ;) })) (if_statement "if (endpoint == 0) {\n    iVar3 = getsockname(sock,(sockaddr *)&storage,&addrlen);\n  }\n  else {\n    if (endpoint != 1) {\n                    /* WARNING: Subroutine does not return */\n      abort();\n    }\n    iVar3 = getpeername(sock,(sockaddr *)&storage,&addrlen);\n  }" if (parenthesized_expression "(endpoint == 0)" ( (binary_expression "endpoint == 0" identifier == number_literal) )) (compound_statement "{\n    iVar3 = getsockname(sock,(sockaddr *)&storage,&addrlen);\n  }" { (expression_statement "iVar3 = getsockname(sock,(sockaddr *)&storage,&addrlen);" (assignment_expression "iVar3 = getsockname(sock,(sockaddr *)&storage,&addrlen)" identifier = (call_expression "getsockname(sock,(sockaddr *)&storage,&addrlen)" identifier (argument_list "(sock,(sockaddr *)&storage,&addrlen)" ( identifier , (cast_expression "(sockaddr *)&storage" ( (type_descriptor "sockaddr *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&storage" & identifier)) , (pointer_expression "&addrlen" & identifier) )))) ;) }) (else_clause "else {\n    if (endpoint != 1) {\n                    /* WARNING: Subroutine does not return */\n      abort();\n    }\n    iVar3 = getpeername(sock,(sockaddr *)&storage,&addrlen);\n  }" else (compound_statement "{\n    if (endpoint != 1) {\n                    /* WARNING: Subroutine does not return */\n      abort();\n    }\n    iVar3 = getpeername(sock,(sockaddr *)&storage,&addrlen);\n  }" { (if_statement "if (endpoint != 1) {\n                    /* WARNING: Subroutine does not return */\n      abort();\n    }" if (parenthesized_expression "(endpoint != 1)" ( (binary_expression "endpoint != 1" identifier != number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n      abort();\n    }" { comment (expression_statement "abort();" (call_expression "abort()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "iVar3 = getpeername(sock,(sockaddr *)&storage,&addrlen);" (assignment_expression "iVar3 = getpeername(sock,(sockaddr *)&storage,&addrlen)" identifier = (call_expression "getpeername(sock,(sockaddr *)&storage,&addrlen)" identifier (argument_list "(sock,(sockaddr *)&storage,&addrlen)" ( identifier , (cast_expression "(sockaddr *)&storage" ( (type_descriptor "sockaddr *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&storage" & identifier)) , (pointer_expression "&addrlen" & identifier) )))) ;) }))) (if_statement "if (iVar3 < 0) {\n    uVar4 = 0;\n  }\n  else {\n    (ip->data).d4.s_addr = 0;\n    *(undefined4 *)((int)&ip->data + 4) = 0;\n    *(undefined4 *)((int)&ip->data + 8) = 0;\n    *(undefined4 *)((int)&ip->data + 0xc) = 0;\n    ip->ipv6_scope = 0;\n    ip->family = (uint)storage.ss_family;\n    if (storage.ss_family == 2) {\n      (ip->data).d4.s_addr = storage.__ss_padding._2_4_;\n    }\n    else {\n      if (storage.ss_family != 10) {\n                    /* WARNING: Subroutine does not return */\n        abort();\n      }\n      (ip->data).d4.s_addr = storage.__ss_padding._6_4_;\n      *(undefined4 *)((int)&ip->data + 4) = storage.__ss_padding._10_4_;\n      *(undefined4 *)((int)&ip->data + 8) = storage.__ss_padding._14_4_;\n      *(undefined4 *)((int)&ip->data + 0xc) = storage.__ss_padding._18_4_;\n      ip->ipv6_scope = storage.__ss_padding._22_4_;\n    }\n    uVar4 = opt.debug;\n    if (opt.debug == false) {\n      uVar4 = 1;\n    }\n    else {\n      pcVar2 = print_address(ip);\n      debug_logprintf("conaddr is: %s\n",pcVar2);\n    }\n  }" if (parenthesized_expression "(iVar3 < 0)" ( (binary_expression "iVar3 < 0" identifier < number_literal) )) (compound_statement "{\n    uVar4 = 0;\n  }" { (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    (ip->data).d4.s_addr = 0;\n    *(undefined4 *)((int)&ip->data + 4) = 0;\n    *(undefined4 *)((int)&ip->data + 8) = 0;\n    *(undefined4 *)((int)&ip->data + 0xc) = 0;\n    ip->ipv6_scope = 0;\n    ip->family = (uint)storage.ss_family;\n    if (storage.ss_family == 2) {\n      (ip->data).d4.s_addr = storage.__ss_padding._2_4_;\n    }\n    else {\n      if (storage.ss_family != 10) {\n                    /* WARNING: Subroutine does not return */\n        abort();\n      }\n      (ip->data).d4.s_addr = storage.__ss_padding._6_4_;\n      *(undefined4 *)((int)&ip->data + 4) = storage.__ss_padding._10_4_;\n      *(undefined4 *)((int)&ip->data + 8) = storage.__ss_padding._14_4_;\n      *(undefined4 *)((int)&ip->data + 0xc) = storage.__ss_padding._18_4_;\n      ip->ipv6_scope = storage.__ss_padding._22_4_;\n    }\n    uVar4 = opt.debug;\n    if (opt.debug == false) {\n      uVar4 = 1;\n    }\n    else {\n      pcVar2 = print_address(ip);\n      debug_logprintf("conaddr is: %s\n",pcVar2);\n    }\n  }" else (compound_statement "{\n    (ip->data).d4.s_addr = 0;\n    *(undefined4 *)((int)&ip->data + 4) = 0;\n    *(undefined4 *)((int)&ip->data + 8) = 0;\n    *(undefined4 *)((int)&ip->data + 0xc) = 0;\n    ip->ipv6_scope = 0;\n    ip->family = (uint)storage.ss_family;\n    if (storage.ss_family == 2) {\n      (ip->data).d4.s_addr = storage.__ss_padding._2_4_;\n    }\n    else {\n      if (storage.ss_family != 10) {\n                    /* WARNING: Subroutine does not return */\n        abort();\n      }\n      (ip->data).d4.s_addr = storage.__ss_padding._6_4_;\n      *(undefined4 *)((int)&ip->data + 4) = storage.__ss_padding._10_4_;\n      *(undefined4 *)((int)&ip->data + 8) = storage.__ss_padding._14_4_;\n      *(undefined4 *)((int)&ip->data + 0xc) = storage.__ss_padding._18_4_;\n      ip->ipv6_scope = storage.__ss_padding._22_4_;\n    }\n    uVar4 = opt.debug;\n    if (opt.debug == false) {\n      uVar4 = 1;\n    }\n    else {\n      pcVar2 = print_address(ip);\n      debug_logprintf("conaddr is: %s\n",pcVar2);\n    }\n  }" { (expression_statement "(ip->data).d4.s_addr = 0;" (assignment_expression "(ip->data).d4.s_addr = 0" (field_expression "(ip->data).d4.s_addr" (field_expression "(ip->data).d4" (parenthesized_expression "(ip->data)" ( (field_expression "ip->data" identifier -> field_identifier) )) . field_identifier) . field_identifier) = number_literal) ;) (expression_statement "*(undefined4 *)((int)&ip->data + 4) = 0;" (assignment_expression "*(undefined4 *)((int)&ip->data + 4) = 0" (pointer_expression "*(undefined4 *)((int)&ip->data + 4)" * (cast_expression "(undefined4 *)((int)&ip->data + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)&ip->data + 4)" ( (binary_expression "(int)&ip->data + 4" (cast_expression "(int)&ip->data" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&ip->data" & (field_expression "ip->data" identifier -> field_identifier))) + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)((int)&ip->data + 8) = 0;" (assignment_expression "*(undefined4 *)((int)&ip->data + 8) = 0" (pointer_expression "*(undefined4 *)((int)&ip->data + 8)" * (cast_expression "(undefined4 *)((int)&ip->data + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)&ip->data + 8)" ( (binary_expression "(int)&ip->data + 8" (cast_expression "(int)&ip->data" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&ip->data" & (field_expression "ip->data" identifier -> field_identifier))) + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)((int)&ip->data + 0xc) = 0;" (assignment_expression "*(undefined4 *)((int)&ip->data + 0xc) = 0" (pointer_expression "*(undefined4 *)((int)&ip->data + 0xc)" * (cast_expression "(undefined4 *)((int)&ip->data + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)&ip->data + 0xc)" ( (binary_expression "(int)&ip->data + 0xc" (cast_expression "(int)&ip->data" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&ip->data" & (field_expression "ip->data" identifier -> field_identifier))) + number_literal) )))) = number_literal) ;) (expression_statement "ip->ipv6_scope = 0;" (assignment_expression "ip->ipv6_scope = 0" (field_expression "ip->ipv6_scope" identifier -> field_identifier) = number_literal) ;) (expression_statement "ip->family = (uint)storage.ss_family;" (assignment_expression "ip->family = (uint)storage.ss_family" (field_expression "ip->family" identifier -> field_identifier) = (cast_expression "(uint)storage.ss_family" ( (type_descriptor "uint" type_identifier) ) (field_expression "storage.ss_family" identifier . field_identifier))) ;) (if_statement "if (storage.ss_family == 2) {\n      (ip->data).d4.s_addr = storage.__ss_padding._2_4_;\n    }\n    else {\n      if (storage.ss_family != 10) {\n                    /* WARNING: Subroutine does not return */\n        abort();\n      }\n      (ip->data).d4.s_addr = storage.__ss_padding._6_4_;\n      *(undefined4 *)((int)&ip->data + 4) = storage.__ss_padding._10_4_;\n      *(undefined4 *)((int)&ip->data + 8) = storage.__ss_padding._14_4_;\n      *(undefined4 *)((int)&ip->data + 0xc) = storage.__ss_padding._18_4_;\n      ip->ipv6_scope = storage.__ss_padding._22_4_;\n    }" if (parenthesized_expression "(storage.ss_family == 2)" ( (binary_expression "storage.ss_family == 2" (field_expression "storage.ss_family" identifier . field_identifier) == number_literal) )) (compound_statement "{\n      (ip->data).d4.s_addr = storage.__ss_padding._2_4_;\n    }" { (expression_statement "(ip->data).d4.s_addr = storage.__ss_padding._2_4_;" (assignment_expression "(ip->data).d4.s_addr = storage.__ss_padding._2_4_" (field_expression "(ip->data).d4.s_addr" (field_expression "(ip->data).d4" (parenthesized_expression "(ip->data)" ( (field_expression "ip->data" identifier -> field_identifier) )) . field_identifier) . field_identifier) = (field_expression "storage.__ss_padding._2_4_" (field_expression "storage.__ss_padding" identifier . field_identifier) . field_identifier)) ;) }) (else_clause "else {\n      if (storage.ss_family != 10) {\n                    /* WARNING: Subroutine does not return */\n        abort();\n      }\n      (ip->data).d4.s_addr = storage.__ss_padding._6_4_;\n      *(undefined4 *)((int)&ip->data + 4) = storage.__ss_padding._10_4_;\n      *(undefined4 *)((int)&ip->data + 8) = storage.__ss_padding._14_4_;\n      *(undefined4 *)((int)&ip->data + 0xc) = storage.__ss_padding._18_4_;\n      ip->ipv6_scope = storage.__ss_padding._22_4_;\n    }" else (compound_statement "{\n      if (storage.ss_family != 10) {\n                    /* WARNING: Subroutine does not return */\n        abort();\n      }\n      (ip->data).d4.s_addr = storage.__ss_padding._6_4_;\n      *(undefined4 *)((int)&ip->data + 4) = storage.__ss_padding._10_4_;\n      *(undefined4 *)((int)&ip->data + 8) = storage.__ss_padding._14_4_;\n      *(undefined4 *)((int)&ip->data + 0xc) = storage.__ss_padding._18_4_;\n      ip->ipv6_scope = storage.__ss_padding._22_4_;\n    }" { (if_statement "if (storage.ss_family != 10) {\n                    /* WARNING: Subroutine does not return */\n        abort();\n      }" if (parenthesized_expression "(storage.ss_family != 10)" ( (binary_expression "storage.ss_family != 10" (field_expression "storage.ss_family" identifier . field_identifier) != number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n        abort();\n      }" { comment (expression_statement "abort();" (call_expression "abort()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "(ip->data).d4.s_addr = storage.__ss_padding._6_4_;" (assignment_expression "(ip->data).d4.s_addr = storage.__ss_padding._6_4_" (field_expression "(ip->data).d4.s_addr" (field_expression "(ip->data).d4" (parenthesized_expression "(ip->data)" ( (field_expression "ip->data" identifier -> field_identifier) )) . field_identifier) . field_identifier) = (field_expression "storage.__ss_padding._6_4_" (field_expression "storage.__ss_padding" identifier . field_identifier) . field_identifier)) ;) (expression_statement "*(undefined4 *)((int)&ip->data + 4) = storage.__ss_padding._10_4_;" (assignment_expression "*(undefined4 *)((int)&ip->data + 4) = storage.__ss_padding._10_4_" (pointer_expression "*(undefined4 *)((int)&ip->data + 4)" * (cast_expression "(undefined4 *)((int)&ip->data + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)&ip->data + 4)" ( (binary_expression "(int)&ip->data + 4" (cast_expression "(int)&ip->data" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&ip->data" & (field_expression "ip->data" identifier -> field_identifier))) + number_literal) )))) = (field_expression "storage.__ss_padding._10_4_" (field_expression "storage.__ss_padding" identifier . field_identifier) . field_identifier)) ;) (expression_statement "*(undefined4 *)((int)&ip->data + 8) = storage.__ss_padding._14_4_;" (assignment_expression "*(undefined4 *)((int)&ip->data + 8) = storage.__ss_padding._14_4_" (pointer_expression "*(undefined4 *)((int)&ip->data + 8)" * (cast_expression "(undefined4 *)((int)&ip->data + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)&ip->data + 8)" ( (binary_expression "(int)&ip->data + 8" (cast_expression "(int)&ip->data" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&ip->data" & (field_expression "ip->data" identifier -> field_identifier))) + number_literal) )))) = (field_expression "storage.__ss_padding._14_4_" (field_expression "storage.__ss_padding" identifier . field_identifier) . field_identifier)) ;) (expression_statement "*(undefined4 *)((int)&ip->data + 0xc) = storage.__ss_padding._18_4_;" (assignment_expression "*(undefined4 *)((int)&ip->data + 0xc) = storage.__ss_padding._18_4_" (pointer_expression "*(undefined4 *)((int)&ip->data + 0xc)" * (cast_expression "(undefined4 *)((int)&ip->data + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)&ip->data + 0xc)" ( (binary_expression "(int)&ip->data + 0xc" (cast_expression "(int)&ip->data" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&ip->data" & (field_expression "ip->data" identifier -> field_identifier))) + number_literal) )))) = (field_expression "storage.__ss_padding._18_4_" (field_expression "storage.__ss_padding" identifier . field_identifier) . field_identifier)) ;) (expression_statement "ip->ipv6_scope = storage.__ss_padding._22_4_;" (assignment_expression "ip->ipv6_scope = storage.__ss_padding._22_4_" (field_expression "ip->ipv6_scope" identifier -> field_identifier) = (field_expression "storage.__ss_padding._22_4_" (field_expression "storage.__ss_padding" identifier . field_identifier) . field_identifier)) ;) }))) (expression_statement "uVar4 = opt.debug;" (assignment_expression "uVar4 = opt.debug" identifier = (field_expression "opt.debug" identifier . field_identifier)) ;) (if_statement "if (opt.debug == false) {\n      uVar4 = 1;\n    }\n    else {\n      pcVar2 = print_address(ip);\n      debug_logprintf("conaddr is: %s\n",pcVar2);\n    }" if (parenthesized_expression "(opt.debug == false)" ( (binary_expression "opt.debug == false" (field_expression "opt.debug" identifier . field_identifier) == false) )) (compound_statement "{\n      uVar4 = 1;\n    }" { (expression_statement "uVar4 = 1;" (assignment_expression "uVar4 = 1" identifier = number_literal) ;) }) (else_clause "else {\n      pcVar2 = print_address(ip);\n      debug_logprintf("conaddr is: %s\n",pcVar2);\n    }" else (compound_statement "{\n      pcVar2 = print_address(ip);\n      debug_logprintf("conaddr is: %s\n",pcVar2);\n    }" { (expression_statement "pcVar2 = print_address(ip);" (assignment_expression "pcVar2 = print_address(ip)" identifier = (call_expression "print_address(ip)" identifier (argument_list "(ip)" ( identifier )))) ;) (expression_statement "debug_logprintf("conaddr is: %s\n",pcVar2);" (call_expression "debug_logprintf("conaddr is: %s\n",pcVar2)" identifier (argument_list "("conaddr is: %s\n",pcVar2)" ( (string_literal ""conaddr is: %s\n"" " string_content escape_sequence ") , identifier ))) ;) }))) }))) (if_statement "if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" if (parenthesized_expression "(iVar1 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 != *(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                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" { comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return (_Bool)uVar4;" return (cast_expression "(_Bool)uVar4" ( (type_descriptor "_Bool" type_identifier) ) identifier) ;) })))
(translation_unit "char FUN_00019280(int param_1,uint *param_2,int param_3)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  char cVar3;\n  sockaddr *psVar4;\n  int in_GS_OFFSET;\n  socklen_t local_a4;\n  sockaddr local_a0;\n  uint local_90;\n  uint local_8c;\n  uint local_88;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1928e;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_a4 = 0x80;\n  psVar4 = &local_a0;\n  for (iVar2 = 0x20; iVar2 != 0; iVar2 = iVar2 + -1) {\n    psVar4->sa_family = 0;\n    psVar4->sa_data[0] = '\0';\n    psVar4->sa_data[1] = '\0';\n    psVar4 = (sockaddr *)(psVar4->sa_data + 2);\n  }\n  if (param_3 == 0) {\n    iVar2 = getsockname(param_1,&local_a0,&local_a4);\n  }\n  else {\n    if (param_3 != 1) {\n                    \n      abort();\n    }\n    iVar2 = getpeername(param_1,&local_a0,&local_a4);\n  }\n  if (iVar2 < 0) {\n    cVar3 = '\0';\n  }\n  else {\n    param_2[1] = 0;\n    param_2[2] = 0;\n    param_2[3] = 0;\n    param_2[4] = 0;\n    param_2[5] = 0;\n    *param_2 = (uint)local_a0.sa_family;\n    if (local_a0.sa_family == 2) {\n      param_2[1] = local_a0.sa_data._2_4_;\n    }\n    else {\n      if (local_a0.sa_family != 10) {\n                    \n        abort();\n      }\n      param_2[1] = local_a0.sa_data._6_4_;\n      param_2[2] = local_a0.sa_data._10_4_;\n      param_2[3] = local_90;\n      param_2[4] = local_8c;\n      param_2[5] = local_88;\n    }\n    cVar3 = DAT_000a8b9b;\n    if (DAT_000a8b9b == '\0') {\n      cVar3 = '\x01';\n    }\n    else {\n      uVar1 = FUN_0002a200(param_2);\n      FUN_0003b070("conaddr is: %s\n",uVar1);\n    }\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0006da50();\n  }\n  return cVar3;\n}\n\n" (function_definition "char FUN_00019280(int param_1,uint *param_2,int param_3)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  char cVar3;\n  sockaddr *psVar4;\n  int in_GS_OFFSET;\n  socklen_t local_a4;\n  sockaddr local_a0;\n  uint local_90;\n  uint local_8c;\n  uint local_88;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1928e;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_a4 = 0x80;\n  psVar4 = &local_a0;\n  for (iVar2 = 0x20; iVar2 != 0; iVar2 = iVar2 + -1) {\n    psVar4->sa_family = 0;\n    psVar4->sa_data[0] = '\0';\n    psVar4->sa_data[1] = '\0';\n    psVar4 = (sockaddr *)(psVar4->sa_data + 2);\n  }\n  if (param_3 == 0) {\n    iVar2 = getsockname(param_1,&local_a0,&local_a4);\n  }\n  else {\n    if (param_3 != 1) {\n                    \n      abort();\n    }\n    iVar2 = getpeername(param_1,&local_a0,&local_a4);\n  }\n  if (iVar2 < 0) {\n    cVar3 = '\0';\n  }\n  else {\n    param_2[1] = 0;\n    param_2[2] = 0;\n    param_2[3] = 0;\n    param_2[4] = 0;\n    param_2[5] = 0;\n    *param_2 = (uint)local_a0.sa_family;\n    if (local_a0.sa_family == 2) {\n      param_2[1] = local_a0.sa_data._2_4_;\n    }\n    else {\n      if (local_a0.sa_family != 10) {\n                    \n        abort();\n      }\n      param_2[1] = local_a0.sa_data._6_4_;\n      param_2[2] = local_a0.sa_data._10_4_;\n      param_2[3] = local_90;\n      param_2[4] = local_8c;\n      param_2[5] = local_88;\n    }\n    cVar3 = DAT_000a8b9b;\n    if (DAT_000a8b9b == '\0') {\n      cVar3 = '\x01';\n    }\n    else {\n      uVar1 = FUN_0002a200(param_2);\n      FUN_0003b070("conaddr is: %s\n",uVar1);\n    }\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0006da50();\n  }\n  return cVar3;\n}" primitive_type (function_declarator "FUN_00019280(int param_1,uint *param_2,int param_3)" identifier (parameter_list "(int param_1,uint *param_2,int param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  char cVar3;\n  sockaddr *psVar4;\n  int in_GS_OFFSET;\n  socklen_t local_a4;\n  sockaddr local_a0;\n  uint local_90;\n  uint local_8c;\n  uint local_88;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1928e;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_a4 = 0x80;\n  psVar4 = &local_a0;\n  for (iVar2 = 0x20; iVar2 != 0; iVar2 = iVar2 + -1) {\n    psVar4->sa_family = 0;\n    psVar4->sa_data[0] = '\0';\n    psVar4->sa_data[1] = '\0';\n    psVar4 = (sockaddr *)(psVar4->sa_data + 2);\n  }\n  if (param_3 == 0) {\n    iVar2 = getsockname(param_1,&local_a0,&local_a4);\n  }\n  else {\n    if (param_3 != 1) {\n                    \n      abort();\n    }\n    iVar2 = getpeername(param_1,&local_a0,&local_a4);\n  }\n  if (iVar2 < 0) {\n    cVar3 = '\0';\n  }\n  else {\n    param_2[1] = 0;\n    param_2[2] = 0;\n    param_2[3] = 0;\n    param_2[4] = 0;\n    param_2[5] = 0;\n    *param_2 = (uint)local_a0.sa_family;\n    if (local_a0.sa_family == 2) {\n      param_2[1] = local_a0.sa_data._2_4_;\n    }\n    else {\n      if (local_a0.sa_family != 10) {\n                    \n        abort();\n      }\n      param_2[1] = local_a0.sa_data._6_4_;\n      param_2[2] = local_a0.sa_data._10_4_;\n      param_2[3] = local_90;\n      param_2[4] = local_8c;\n      param_2[5] = local_88;\n    }\n    cVar3 = DAT_000a8b9b;\n    if (DAT_000a8b9b == '\0') {\n      cVar3 = '\x01';\n    }\n    else {\n      uVar1 = FUN_0002a200(param_2);\n      FUN_0003b070("conaddr is: %s\n",uVar1);\n    }\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0006da50();\n  }\n  return cVar3;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "char cVar3;" primitive_type identifier ;) (declaration "sockaddr *psVar4;" type_identifier (pointer_declarator "*psVar4" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "socklen_t local_a4;" type_identifier identifier ;) (declaration "sockaddr local_a0;" type_identifier identifier ;) (declaration "uint local_90;" type_identifier identifier ;) (declaration "uint local_8c;" type_identifier identifier ;) (declaration "uint local_88;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x1928e;" (assignment_expression "uStack_14 = 0x1928e" 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_a4 = 0x80;" (assignment_expression "local_a4 = 0x80" identifier = number_literal) ;) (expression_statement "psVar4 = &local_a0;" (assignment_expression "psVar4 = &local_a0" identifier = (pointer_expression "&local_a0" & identifier)) ;) (for_statement "for (iVar2 = 0x20; iVar2 != 0; iVar2 = iVar2 + -1) {\n    psVar4->sa_family = 0;\n    psVar4->sa_data[0] = '\0';\n    psVar4->sa_data[1] = '\0';\n    psVar4 = (sockaddr *)(psVar4->sa_data + 2);\n  }" for ( (assignment_expression "iVar2 = 0x20" 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    psVar4->sa_family = 0;\n    psVar4->sa_data[0] = '\0';\n    psVar4->sa_data[1] = '\0';\n    psVar4 = (sockaddr *)(psVar4->sa_data + 2);\n  }" { (expression_statement "psVar4->sa_family = 0;" (assignment_expression "psVar4->sa_family = 0" (field_expression "psVar4->sa_family" identifier -> field_identifier) = number_literal) ;) (expression_statement "psVar4->sa_data[0] = '\0';" (assignment_expression "psVar4->sa_data[0] = '\0'" (subscript_expression "psVar4->sa_data[0]" (field_expression "psVar4->sa_data" identifier -> field_identifier) [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "psVar4->sa_data[1] = '\0';" (assignment_expression "psVar4->sa_data[1] = '\0'" (subscript_expression "psVar4->sa_data[1]" (field_expression "psVar4->sa_data" identifier -> field_identifier) [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "psVar4 = (sockaddr *)(psVar4->sa_data + 2);" (assignment_expression "psVar4 = (sockaddr *)(psVar4->sa_data + 2)" identifier = (cast_expression "(sockaddr *)(psVar4->sa_data + 2)" ( (type_descriptor "sockaddr *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(psVar4->sa_data + 2)" ( (binary_expression "psVar4->sa_data + 2" (field_expression "psVar4->sa_data" identifier -> field_identifier) + number_literal) )))) ;) })) (if_statement "if (param_3 == 0) {\n    iVar2 = getsockname(param_1,&local_a0,&local_a4);\n  }\n  else {\n    if (param_3 != 1) {\n                    \n      abort();\n    }\n    iVar2 = getpeername(param_1,&local_a0,&local_a4);\n  }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar2 = getsockname(param_1,&local_a0,&local_a4);\n  }" { (expression_statement "iVar2 = getsockname(param_1,&local_a0,&local_a4);" (assignment_expression "iVar2 = getsockname(param_1,&local_a0,&local_a4)" identifier = (call_expression "getsockname(param_1,&local_a0,&local_a4)" identifier (argument_list "(param_1,&local_a0,&local_a4)" ( identifier , (pointer_expression "&local_a0" & identifier) , (pointer_expression "&local_a4" & identifier) )))) ;) }) (else_clause "else {\n    if (param_3 != 1) {\n                    \n      abort();\n    }\n    iVar2 = getpeername(param_1,&local_a0,&local_a4);\n  }" else (compound_statement "{\n    if (param_3 != 1) {\n                    \n      abort();\n    }\n    iVar2 = getpeername(param_1,&local_a0,&local_a4);\n  }" { (if_statement "if (param_3 != 1) {\n                    \n      abort();\n    }" if (parenthesized_expression "(param_3 != 1)" ( (binary_expression "param_3 != 1" identifier != number_literal) )) (compound_statement "{\n                    \n      abort();\n    }" { (expression_statement "abort();" (call_expression "abort()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "iVar2 = getpeername(param_1,&local_a0,&local_a4);" (assignment_expression "iVar2 = getpeername(param_1,&local_a0,&local_a4)" identifier = (call_expression "getpeername(param_1,&local_a0,&local_a4)" identifier (argument_list "(param_1,&local_a0,&local_a4)" ( identifier , (pointer_expression "&local_a0" & identifier) , (pointer_expression "&local_a4" & identifier) )))) ;) }))) (if_statement "if (iVar2 < 0) {\n    cVar3 = '\0';\n  }\n  else {\n    param_2[1] = 0;\n    param_2[2] = 0;\n    param_2[3] = 0;\n    param_2[4] = 0;\n    param_2[5] = 0;\n    *param_2 = (uint)local_a0.sa_family;\n    if (local_a0.sa_family == 2) {\n      param_2[1] = local_a0.sa_data._2_4_;\n    }\n    else {\n      if (local_a0.sa_family != 10) {\n                    \n        abort();\n      }\n      param_2[1] = local_a0.sa_data._6_4_;\n      param_2[2] = local_a0.sa_data._10_4_;\n      param_2[3] = local_90;\n      param_2[4] = local_8c;\n      param_2[5] = local_88;\n    }\n    cVar3 = DAT_000a8b9b;\n    if (DAT_000a8b9b == '\0') {\n      cVar3 = '\x01';\n    }\n    else {\n      uVar1 = FUN_0002a200(param_2);\n      FUN_0003b070("conaddr is: %s\n",uVar1);\n    }\n  }" if (parenthesized_expression "(iVar2 < 0)" ( (binary_expression "iVar2 < 0" identifier < number_literal) )) (compound_statement "{\n    cVar3 = '\0';\n  }" { (expression_statement "cVar3 = '\0';" (assignment_expression "cVar3 = '\0'" identifier = (char_literal "'\0'" ' escape_sequence ')) ;) }) (else_clause "else {\n    param_2[1] = 0;\n    param_2[2] = 0;\n    param_2[3] = 0;\n    param_2[4] = 0;\n    param_2[5] = 0;\n    *param_2 = (uint)local_a0.sa_family;\n    if (local_a0.sa_family == 2) {\n      param_2[1] = local_a0.sa_data._2_4_;\n    }\n    else {\n      if (local_a0.sa_family != 10) {\n                    \n        abort();\n      }\n      param_2[1] = local_a0.sa_data._6_4_;\n      param_2[2] = local_a0.sa_data._10_4_;\n      param_2[3] = local_90;\n      param_2[4] = local_8c;\n      param_2[5] = local_88;\n    }\n    cVar3 = DAT_000a8b9b;\n    if (DAT_000a8b9b == '\0') {\n      cVar3 = '\x01';\n    }\n    else {\n      uVar1 = FUN_0002a200(param_2);\n      FUN_0003b070("conaddr is: %s\n",uVar1);\n    }\n  }" else (compound_statement "{\n    param_2[1] = 0;\n    param_2[2] = 0;\n    param_2[3] = 0;\n    param_2[4] = 0;\n    param_2[5] = 0;\n    *param_2 = (uint)local_a0.sa_family;\n    if (local_a0.sa_family == 2) {\n      param_2[1] = local_a0.sa_data._2_4_;\n    }\n    else {\n      if (local_a0.sa_family != 10) {\n                    \n        abort();\n      }\n      param_2[1] = local_a0.sa_data._6_4_;\n      param_2[2] = local_a0.sa_data._10_4_;\n      param_2[3] = local_90;\n      param_2[4] = local_8c;\n      param_2[5] = local_88;\n    }\n    cVar3 = DAT_000a8b9b;\n    if (DAT_000a8b9b == '\0') {\n      cVar3 = '\x01';\n    }\n    else {\n      uVar1 = FUN_0002a200(param_2);\n      FUN_0003b070("conaddr is: %s\n",uVar1);\n    }\n  }" { (expression_statement "param_2[1] = 0;" (assignment_expression "param_2[1] = 0" (subscript_expression "param_2[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "param_2[2] = 0;" (assignment_expression "param_2[2] = 0" (subscript_expression "param_2[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "param_2[3] = 0;" (assignment_expression "param_2[3] = 0" (subscript_expression "param_2[3]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "param_2[4] = 0;" (assignment_expression "param_2[4] = 0" (subscript_expression "param_2[4]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "param_2[5] = 0;" (assignment_expression "param_2[5] = 0" (subscript_expression "param_2[5]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*param_2 = (uint)local_a0.sa_family;" (assignment_expression "*param_2 = (uint)local_a0.sa_family" (pointer_expression "*param_2" * identifier) = (cast_expression "(uint)local_a0.sa_family" ( (type_descriptor "uint" type_identifier) ) (field_expression "local_a0.sa_family" identifier . field_identifier))) ;) (if_statement "if (local_a0.sa_family == 2) {\n      param_2[1] = local_a0.sa_data._2_4_;\n    }\n    else {\n      if (local_a0.sa_family != 10) {\n                    \n        abort();\n      }\n      param_2[1] = local_a0.sa_data._6_4_;\n      param_2[2] = local_a0.sa_data._10_4_;\n      param_2[3] = local_90;\n      param_2[4] = local_8c;\n      param_2[5] = local_88;\n    }" if (parenthesized_expression "(local_a0.sa_family == 2)" ( (binary_expression "local_a0.sa_family == 2" (field_expression "local_a0.sa_family" identifier . field_identifier) == number_literal) )) (compound_statement "{\n      param_2[1] = local_a0.sa_data._2_4_;\n    }" { (expression_statement "param_2[1] = local_a0.sa_data._2_4_;" (assignment_expression "param_2[1] = local_a0.sa_data._2_4_" (subscript_expression "param_2[1]" identifier [ number_literal ]) = (field_expression "local_a0.sa_data._2_4_" (field_expression "local_a0.sa_data" identifier . field_identifier) . field_identifier)) ;) }) (else_clause "else {\n      if (local_a0.sa_family != 10) {\n                    \n        abort();\n      }\n      param_2[1] = local_a0.sa_data._6_4_;\n      param_2[2] = local_a0.sa_data._10_4_;\n      param_2[3] = local_90;\n      param_2[4] = local_8c;\n      param_2[5] = local_88;\n    }" else (compound_statement "{\n      if (local_a0.sa_family != 10) {\n                    \n        abort();\n      }\n      param_2[1] = local_a0.sa_data._6_4_;\n      param_2[2] = local_a0.sa_data._10_4_;\n      param_2[3] = local_90;\n      param_2[4] = local_8c;\n      param_2[5] = local_88;\n    }" { (if_statement "if (local_a0.sa_family != 10) {\n                    \n        abort();\n      }" if (parenthesized_expression "(local_a0.sa_family != 10)" ( (binary_expression "local_a0.sa_family != 10" (field_expression "local_a0.sa_family" identifier . field_identifier) != number_literal) )) (compound_statement "{\n                    \n        abort();\n      }" { (expression_statement "abort();" (call_expression "abort()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "param_2[1] = local_a0.sa_data._6_4_;" (assignment_expression "param_2[1] = local_a0.sa_data._6_4_" (subscript_expression "param_2[1]" identifier [ number_literal ]) = (field_expression "local_a0.sa_data._6_4_" (field_expression "local_a0.sa_data" identifier . field_identifier) . field_identifier)) ;) (expression_statement "param_2[2] = local_a0.sa_data._10_4_;" (assignment_expression "param_2[2] = local_a0.sa_data._10_4_" (subscript_expression "param_2[2]" identifier [ number_literal ]) = (field_expression "local_a0.sa_data._10_4_" (field_expression "local_a0.sa_data" identifier . field_identifier) . field_identifier)) ;) (expression_statement "param_2[3] = local_90;" (assignment_expression "param_2[3] = local_90" (subscript_expression "param_2[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_2[4] = local_8c;" (assignment_expression "param_2[4] = local_8c" (subscript_expression "param_2[4]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_2[5] = local_88;" (assignment_expression "param_2[5] = local_88" (subscript_expression "param_2[5]" identifier [ number_literal ]) = identifier) ;) }))) (expression_statement "cVar3 = DAT_000a8b9b;" (assignment_expression "cVar3 = DAT_000a8b9b" identifier = identifier) ;) (if_statement "if (DAT_000a8b9b == '\0') {\n      cVar3 = '\x01';\n    }\n    else {\n      uVar1 = FUN_0002a200(param_2);\n      FUN_0003b070("conaddr is: %s\n",uVar1);\n    }" if (parenthesized_expression "(DAT_000a8b9b == '\0')" ( (binary_expression "DAT_000a8b9b == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      cVar3 = '\x01';\n    }" { (expression_statement "cVar3 = '\x01';" (assignment_expression "cVar3 = '\x01'" identifier = (char_literal "'\x01'" ' escape_sequence ')) ;) }) (else_clause "else {\n      uVar1 = FUN_0002a200(param_2);\n      FUN_0003b070("conaddr is: %s\n",uVar1);\n    }" else (compound_statement "{\n      uVar1 = FUN_0002a200(param_2);\n      FUN_0003b070("conaddr is: %s\n",uVar1);\n    }" { (expression_statement "uVar1 = FUN_0002a200(param_2);" (assignment_expression "uVar1 = FUN_0002a200(param_2)" identifier = (call_expression "FUN_0002a200(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (expression_statement "FUN_0003b070("conaddr is: %s\n",uVar1);" (call_expression "FUN_0003b070("conaddr is: %s\n",uVar1)" identifier (argument_list "("conaddr is: %s\n",uVar1)" ( (string_literal ""conaddr is: %s\n"" " string_content escape_sequence ") , identifier ))) ;) }))) }))) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0006da50();\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                    \n    FUN_0006da50();\n  }" { (expression_statement "FUN_0006da50();" (call_expression "FUN_0006da50()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return cVar3;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE 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 = 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 (subscript_expression (field_expression IDENT -> field_identifier) [ LIT ]) = (char_literal ' escape_sequence ')) ;) (expression_statement (assignment_expression (subscript_expression (field_expression IDENT -> field_identifier) [ LIT ]) = (char_literal ' escape_sequence ')) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (field_expression IDENT -> field_identifier) + LIT) )))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (pointer_expression & IDENT) , (pointer_expression & IDENT) )))) ;) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (pointer_expression & IDENT) , (pointer_expression & IDENT) )))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (char_literal ' escape_sequence ')) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (cast_expression ( (type_descriptor TYPE) ) (field_expression IDENT . field_identifier))) ;) (if_statement if (parenthesized_expression ( (binary_expression (field_expression IDENT . field_identifier) == LIT) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (field_expression (field_expression IDENT . field_identifier) . field_identifier)) ;) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (field_expression IDENT . field_identifier) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (field_expression (field_expression IDENT . field_identifier) . field_identifier)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (field_expression (field_expression IDENT . field_identifier) . field_identifier)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) }))) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = (char_literal ' escape_sequence ')) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence ") , IDENT ))) ;) }))) }))) (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 { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (return_statement return IDENT ;) })))
(function_definition "char FUN_00019280(int param_1,uint *param_2,int param_3)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  char cVar3;\n  sockaddr *psVar4;\n  int in_GS_OFFSET;\n  socklen_t local_a4;\n  sockaddr local_a0;\n  uint local_90;\n  uint local_8c;\n  uint local_88;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1928e;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_a4 = 0x80;\n  psVar4 = &local_a0;\n  for (iVar2 = 0x20; iVar2 != 0; iVar2 = iVar2 + -1) {\n    psVar4->sa_family = 0;\n    psVar4->sa_data[0] = '\0';\n    psVar4->sa_data[1] = '\0';\n    psVar4 = (sockaddr *)(psVar4->sa_data + 2);\n  }\n  if (param_3 == 0) {\n    iVar2 = getsockname(param_1,&local_a0,&local_a4);\n  }\n  else {\n    if (param_3 != 1) {\n                    \n      abort();\n    }\n    iVar2 = getpeername(param_1,&local_a0,&local_a4);\n  }\n  if (iVar2 < 0) {\n    cVar3 = '\0';\n  }\n  else {\n    param_2[1] = 0;\n    param_2[2] = 0;\n    param_2[3] = 0;\n    param_2[4] = 0;\n    param_2[5] = 0;\n    *param_2 = (uint)local_a0.sa_family;\n    if (local_a0.sa_family == 2) {\n      param_2[1] = local_a0.sa_data._2_4_;\n    }\n    else {\n      if (local_a0.sa_family != 10) {\n                    \n        abort();\n      }\n      param_2[1] = local_a0.sa_data._6_4_;\n      param_2[2] = local_a0.sa_data._10_4_;\n      param_2[3] = local_90;\n      param_2[4] = local_8c;\n      param_2[5] = local_88;\n    }\n    cVar3 = DAT_000a8b9b;\n    if (DAT_000a8b9b == '\0') {\n      cVar3 = '\x01';\n    }\n    else {\n      uVar1 = FUN_0002a200(param_2);\n      FUN_0003b070("conaddr is: %s\n",uVar1);\n    }\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0006da50();\n  }\n  return cVar3;\n}" (primitive_type "char") (function_declarator "FUN_00019280(int param_1,uint *param_2,int param_3)" (identifier "FUN_00019280") (parameter_list "(int param_1,uint *param_2,int param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "uint *param_2" (type_identifier "uint") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")"))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  char cVar3;\n  sockaddr *psVar4;\n  int in_GS_OFFSET;\n  socklen_t local_a4;\n  sockaddr local_a0;\n  uint local_90;\n  uint local_8c;\n  uint local_88;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1928e;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_a4 = 0x80;\n  psVar4 = &local_a0;\n  for (iVar2 = 0x20; iVar2 != 0; iVar2 = iVar2 + -1) {\n    psVar4->sa_family = 0;\n    psVar4->sa_data[0] = '\0';\n    psVar4->sa_data[1] = '\0';\n    psVar4 = (sockaddr *)(psVar4->sa_data + 2);\n  }\n  if (param_3 == 0) {\n    iVar2 = getsockname(param_1,&local_a0,&local_a4);\n  }\n  else {\n    if (param_3 != 1) {\n                    \n      abort();\n    }\n    iVar2 = getpeername(param_1,&local_a0,&local_a4);\n  }\n  if (iVar2 < 0) {\n    cVar3 = '\0';\n  }\n  else {\n    param_2[1] = 0;\n    param_2[2] = 0;\n    param_2[3] = 0;\n    param_2[4] = 0;\n    param_2[5] = 0;\n    *param_2 = (uint)local_a0.sa_family;\n    if (local_a0.sa_family == 2) {\n      param_2[1] = local_a0.sa_data._2_4_;\n    }\n    else {\n      if (local_a0.sa_family != 10) {\n                    \n        abort();\n      }\n      param_2[1] = local_a0.sa_data._6_4_;\n      param_2[2] = local_a0.sa_data._10_4_;\n      param_2[3] = local_90;\n      param_2[4] = local_8c;\n      param_2[5] = local_88;\n    }\n    cVar3 = DAT_000a8b9b;\n    if (DAT_000a8b9b == '\0') {\n      cVar3 = '\x01';\n    }\n    else {\n      uVar1 = FUN_0002a200(param_2);\n      FUN_0003b070("conaddr is: %s\n",uVar1);\n    }\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0006da50();\n  }\n  return cVar3;\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "char cVar3;" (primitive_type "char") (identifier "cVar3") (; ";")) (declaration "sockaddr *psVar4;" (type_identifier "sockaddr") (pointer_declarator "*psVar4" (* "*") (identifier "psVar4")) (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "socklen_t local_a4;" (type_identifier "socklen_t") (identifier "local_a4") (; ";")) (declaration "sockaddr local_a0;" (type_identifier "sockaddr") (identifier "local_a0") (; ";")) (declaration "uint local_90;" (type_identifier "uint") (identifier "local_90") (; ";")) (declaration "uint local_8c;" (type_identifier "uint") (identifier "local_8c") (; ";")) (declaration "uint local_88;" (type_identifier "uint") (identifier "local_88") (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x1928e;" (assignment_expression "uStack_14 = 0x1928e" (identifier "uStack_14") (= "=") (number_literal "0x1928e")) (; ";")) (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_a4 = 0x80;" (assignment_expression "local_a4 = 0x80" (identifier "local_a4") (= "=") (number_literal "0x80")) (; ";")) (expression_statement "psVar4 = &local_a0;" (assignment_expression "psVar4 = &local_a0" (identifier "psVar4") (= "=") (pointer_expression "&local_a0" (& "&") (identifier "local_a0"))) (; ";")) (for_statement "for (iVar2 = 0x20; iVar2 != 0; iVar2 = iVar2 + -1) {\n    psVar4->sa_family = 0;\n    psVar4->sa_data[0] = '\0';\n    psVar4->sa_data[1] = '\0';\n    psVar4 = (sockaddr *)(psVar4->sa_data + 2);\n  }" (for "for") (( "(") (assignment_expression "iVar2 = 0x20" (identifier "iVar2") (= "=") (number_literal "0x20")) (; ";") (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    psVar4->sa_family = 0;\n    psVar4->sa_data[0] = '\0';\n    psVar4->sa_data[1] = '\0';\n    psVar4 = (sockaddr *)(psVar4->sa_data + 2);\n  }" ({ "{") (expression_statement "psVar4->sa_family = 0;" (assignment_expression "psVar4->sa_family = 0" (field_expression "psVar4->sa_family" (identifier "psVar4") (-> "->") (field_identifier "sa_family")) (= "=") (number_literal "0")) (; ";")) (expression_statement "psVar4->sa_data[0] = '\0';" (assignment_expression "psVar4->sa_data[0] = '\0'" (subscript_expression "psVar4->sa_data[0]" (field_expression "psVar4->sa_data" (identifier "psVar4") (-> "->") (field_identifier "sa_data")) ([ "[") (number_literal "0") (] "]")) (= "=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) (; ";")) (expression_statement "psVar4->sa_data[1] = '\0';" (assignment_expression "psVar4->sa_data[1] = '\0'" (subscript_expression "psVar4->sa_data[1]" (field_expression "psVar4->sa_data" (identifier "psVar4") (-> "->") (field_identifier "sa_data")) ([ "[") (number_literal "1") (] "]")) (= "=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) (; ";")) (expression_statement "psVar4 = (sockaddr *)(psVar4->sa_data + 2);" (assignment_expression "psVar4 = (sockaddr *)(psVar4->sa_data + 2)" (identifier "psVar4") (= "=") (cast_expression "(sockaddr *)(psVar4->sa_data + 2)" (( "(") (type_descriptor "sockaddr *" (type_identifier "sockaddr") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(psVar4->sa_data + 2)" (( "(") (binary_expression "psVar4->sa_data + 2" (field_expression "psVar4->sa_data" (identifier "psVar4") (-> "->") (field_identifier "sa_data")) (+ "+") (number_literal "2")) () ")")))) (; ";")) (} "}"))) (if_statement "if (param_3 == 0) {\n    iVar2 = getsockname(param_1,&local_a0,&local_a4);\n  }\n  else {\n    if (param_3 != 1) {\n                    \n      abort();\n    }\n    iVar2 = getpeername(param_1,&local_a0,&local_a4);\n  }" (if "if") (parenthesized_expression "(param_3 == 0)" (( "(") (binary_expression "param_3 == 0" (identifier "param_3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    iVar2 = getsockname(param_1,&local_a0,&local_a4);\n  }" ({ "{") (expression_statement "iVar2 = getsockname(param_1,&local_a0,&local_a4);" (assignment_expression "iVar2 = getsockname(param_1,&local_a0,&local_a4)" (identifier "iVar2") (= "=") (call_expression "getsockname(param_1,&local_a0,&local_a4)" (identifier "getsockname") (argument_list "(param_1,&local_a0,&local_a4)" (( "(") (identifier "param_1") (, ",") (pointer_expression "&local_a0" (& "&") (identifier "local_a0")) (, ",") (pointer_expression "&local_a4" (& "&") (identifier "local_a4")) () ")")))) (; ";")) (} "}")) (else_clause "else {\n    if (param_3 != 1) {\n                    \n      abort();\n    }\n    iVar2 = getpeername(param_1,&local_a0,&local_a4);\n  }" (else "else") (compound_statement "{\n    if (param_3 != 1) {\n                    \n      abort();\n    }\n    iVar2 = getpeername(param_1,&local_a0,&local_a4);\n  }" ({ "{") (if_statement "if (param_3 != 1) {\n                    \n      abort();\n    }" (if "if") (parenthesized_expression "(param_3 != 1)" (( "(") (binary_expression "param_3 != 1" (identifier "param_3") (!= "!=") (number_literal "1")) () ")")) (compound_statement "{\n                    \n      abort();\n    }" ({ "{") (expression_statement "abort();" (call_expression "abort()" (identifier "abort") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "iVar2 = getpeername(param_1,&local_a0,&local_a4);" (assignment_expression "iVar2 = getpeername(param_1,&local_a0,&local_a4)" (identifier "iVar2") (= "=") (call_expression "getpeername(param_1,&local_a0,&local_a4)" (identifier "getpeername") (argument_list "(param_1,&local_a0,&local_a4)" (( "(") (identifier "param_1") (, ",") (pointer_expression "&local_a0" (& "&") (identifier "local_a0")) (, ",") (pointer_expression "&local_a4" (& "&") (identifier "local_a4")) () ")")))) (; ";")) (} "}")))) (if_statement "if (iVar2 < 0) {\n    cVar3 = '\0';\n  }\n  else {\n    param_2[1] = 0;\n    param_2[2] = 0;\n    param_2[3] = 0;\n    param_2[4] = 0;\n    param_2[5] = 0;\n    *param_2 = (uint)local_a0.sa_family;\n    if (local_a0.sa_family == 2) {\n      param_2[1] = local_a0.sa_data._2_4_;\n    }\n    else {\n      if (local_a0.sa_family != 10) {\n                    \n        abort();\n      }\n      param_2[1] = local_a0.sa_data._6_4_;\n      param_2[2] = local_a0.sa_data._10_4_;\n      param_2[3] = local_90;\n      param_2[4] = local_8c;\n      param_2[5] = local_88;\n    }\n    cVar3 = DAT_000a8b9b;\n    if (DAT_000a8b9b == '\0') {\n      cVar3 = '\x01';\n    }\n    else {\n      uVar1 = FUN_0002a200(param_2);\n      FUN_0003b070("conaddr is: %s\n",uVar1);\n    }\n  }" (if "if") (parenthesized_expression "(iVar2 < 0)" (( "(") (binary_expression "iVar2 < 0" (identifier "iVar2") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n    cVar3 = '\0';\n  }" ({ "{") (expression_statement "cVar3 = '\0';" (assignment_expression "cVar3 = '\0'" (identifier "cVar3") (= "=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) (; ";")) (} "}")) (else_clause "else {\n    param_2[1] = 0;\n    param_2[2] = 0;\n    param_2[3] = 0;\n    param_2[4] = 0;\n    param_2[5] = 0;\n    *param_2 = (uint)local_a0.sa_family;\n    if (local_a0.sa_family == 2) {\n      param_2[1] = local_a0.sa_data._2_4_;\n    }\n    else {\n      if (local_a0.sa_family != 10) {\n                    \n        abort();\n      }\n      param_2[1] = local_a0.sa_data._6_4_;\n      param_2[2] = local_a0.sa_data._10_4_;\n      param_2[3] = local_90;\n      param_2[4] = local_8c;\n      param_2[5] = local_88;\n    }\n    cVar3 = DAT_000a8b9b;\n    if (DAT_000a8b9b == '\0') {\n      cVar3 = '\x01';\n    }\n    else {\n      uVar1 = FUN_0002a200(param_2);\n      FUN_0003b070("conaddr is: %s\n",uVar1);\n    }\n  }" (else "else") (compound_statement "{\n    param_2[1] = 0;\n    param_2[2] = 0;\n    param_2[3] = 0;\n    param_2[4] = 0;\n    param_2[5] = 0;\n    *param_2 = (uint)local_a0.sa_family;\n    if (local_a0.sa_family == 2) {\n      param_2[1] = local_a0.sa_data._2_4_;\n    }\n    else {\n      if (local_a0.sa_family != 10) {\n                    \n        abort();\n      }\n      param_2[1] = local_a0.sa_data._6_4_;\n      param_2[2] = local_a0.sa_data._10_4_;\n      param_2[3] = local_90;\n      param_2[4] = local_8c;\n      param_2[5] = local_88;\n    }\n    cVar3 = DAT_000a8b9b;\n    if (DAT_000a8b9b == '\0') {\n      cVar3 = '\x01';\n    }\n    else {\n      uVar1 = FUN_0002a200(param_2);\n      FUN_0003b070("conaddr is: %s\n",uVar1);\n    }\n  }" ({ "{") (expression_statement "param_2[1] = 0;" (assignment_expression "param_2[1] = 0" (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "param_2[2] = 0;" (assignment_expression "param_2[2] = 0" (subscript_expression "param_2[2]" (identifier "param_2") ([ "[") (number_literal "2") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "param_2[3] = 0;" (assignment_expression "param_2[3] = 0" (subscript_expression "param_2[3]" (identifier "param_2") ([ "[") (number_literal "3") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "param_2[4] = 0;" (assignment_expression "param_2[4] = 0" (subscript_expression "param_2[4]" (identifier "param_2") ([ "[") (number_literal "4") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "param_2[5] = 0;" (assignment_expression "param_2[5] = 0" (subscript_expression "param_2[5]" (identifier "param_2") ([ "[") (number_literal "5") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "*param_2 = (uint)local_a0.sa_family;" (assignment_expression "*param_2 = (uint)local_a0.sa_family" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (cast_expression "(uint)local_a0.sa_family" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (field_expression "local_a0.sa_family" (identifier "local_a0") (. ".") (field_identifier "sa_family")))) (; ";")) (if_statement "if (local_a0.sa_family == 2) {\n      param_2[1] = local_a0.sa_data._2_4_;\n    }\n    else {\n      if (local_a0.sa_family != 10) {\n                    \n        abort();\n      }\n      param_2[1] = local_a0.sa_data._6_4_;\n      param_2[2] = local_a0.sa_data._10_4_;\n      param_2[3] = local_90;\n      param_2[4] = local_8c;\n      param_2[5] = local_88;\n    }" (if "if") (parenthesized_expression "(local_a0.sa_family == 2)" (( "(") (binary_expression "local_a0.sa_family == 2" (field_expression "local_a0.sa_family" (identifier "local_a0") (. ".") (field_identifier "sa_family")) (== "==") (number_literal "2")) () ")")) (compound_statement "{\n      param_2[1] = local_a0.sa_data._2_4_;\n    }" ({ "{") (expression_statement "param_2[1] = local_a0.sa_data._2_4_;" (assignment_expression "param_2[1] = local_a0.sa_data._2_4_" (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]")) (= "=") (field_expression "local_a0.sa_data._2_4_" (field_expression "local_a0.sa_data" (identifier "local_a0") (. ".") (field_identifier "sa_data")) (. ".") (field_identifier "_2_4_"))) (; ";")) (} "}")) (else_clause "else {\n      if (local_a0.sa_family != 10) {\n                    \n        abort();\n      }\n      param_2[1] = local_a0.sa_data._6_4_;\n      param_2[2] = local_a0.sa_data._10_4_;\n      param_2[3] = local_90;\n      param_2[4] = local_8c;\n      param_2[5] = local_88;\n    }" (else "else") (compound_statement "{\n      if (local_a0.sa_family != 10) {\n                    \n        abort();\n      }\n      param_2[1] = local_a0.sa_data._6_4_;\n      param_2[2] = local_a0.sa_data._10_4_;\n      param_2[3] = local_90;\n      param_2[4] = local_8c;\n      param_2[5] = local_88;\n    }" ({ "{") (if_statement "if (local_a0.sa_family != 10) {\n                    \n        abort();\n      }" (if "if") (parenthesized_expression "(local_a0.sa_family != 10)" (( "(") (binary_expression "local_a0.sa_family != 10" (field_expression "local_a0.sa_family" (identifier "local_a0") (. ".") (field_identifier "sa_family")) (!= "!=") (number_literal "10")) () ")")) (compound_statement "{\n                    \n        abort();\n      }" ({ "{") (expression_statement "abort();" (call_expression "abort()" (identifier "abort") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "param_2[1] = local_a0.sa_data._6_4_;" (assignment_expression "param_2[1] = local_a0.sa_data._6_4_" (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]")) (= "=") (field_expression "local_a0.sa_data._6_4_" (field_expression "local_a0.sa_data" (identifier "local_a0") (. ".") (field_identifier "sa_data")) (. ".") (field_identifier "_6_4_"))) (; ";")) (expression_statement "param_2[2] = local_a0.sa_data._10_4_;" (assignment_expression "param_2[2] = local_a0.sa_data._10_4_" (subscript_expression "param_2[2]" (identifier "param_2") ([ "[") (number_literal "2") (] "]")) (= "=") (field_expression "local_a0.sa_data._10_4_" (field_expression "local_a0.sa_data" (identifier "local_a0") (. ".") (field_identifier "sa_data")) (. ".") (field_identifier "_10_4_"))) (; ";")) (expression_statement "param_2[3] = local_90;" (assignment_expression "param_2[3] = local_90" (subscript_expression "param_2[3]" (identifier "param_2") ([ "[") (number_literal "3") (] "]")) (= "=") (identifier "local_90")) (; ";")) (expression_statement "param_2[4] = local_8c;" (assignment_expression "param_2[4] = local_8c" (subscript_expression "param_2[4]" (identifier "param_2") ([ "[") (number_literal "4") (] "]")) (= "=") (identifier "local_8c")) (; ";")) (expression_statement "param_2[5] = local_88;" (assignment_expression "param_2[5] = local_88" (subscript_expression "param_2[5]" (identifier "param_2") ([ "[") (number_literal "5") (] "]")) (= "=") (identifier "local_88")) (; ";")) (} "}")))) (expression_statement "cVar3 = DAT_000a8b9b;" (assignment_expression "cVar3 = DAT_000a8b9b" (identifier "cVar3") (= "=") (identifier "DAT_000a8b9b")) (; ";")) (if_statement "if (DAT_000a8b9b == '\0') {\n      cVar3 = '\x01';\n    }\n    else {\n      uVar1 = FUN_0002a200(param_2);\n      FUN_0003b070("conaddr is: %s\n",uVar1);\n    }" (if "if") (parenthesized_expression "(DAT_000a8b9b == '\0')" (( "(") (binary_expression "DAT_000a8b9b == '\0'" (identifier "DAT_000a8b9b") (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n      cVar3 = '\x01';\n    }" ({ "{") (expression_statement "cVar3 = '\x01';" (assignment_expression "cVar3 = '\x01'" (identifier "cVar3") (= "=") (char_literal "'\x01'" (' "'") (escape_sequence "\x01") (' "'"))) (; ";")) (} "}")) (else_clause "else {\n      uVar1 = FUN_0002a200(param_2);\n      FUN_0003b070("conaddr is: %s\n",uVar1);\n    }" (else "else") (compound_statement "{\n      uVar1 = FUN_0002a200(param_2);\n      FUN_0003b070("conaddr is: %s\n",uVar1);\n    }" ({ "{") (expression_statement "uVar1 = FUN_0002a200(param_2);" (assignment_expression "uVar1 = FUN_0002a200(param_2)" (identifier "uVar1") (= "=") (call_expression "FUN_0002a200(param_2)" (identifier "FUN_0002a200") (argument_list "(param_2)" (( "(") (identifier "param_2") () ")")))) (; ";")) (expression_statement "FUN_0003b070("conaddr is: %s\n",uVar1);" (call_expression "FUN_0003b070("conaddr is: %s\n",uVar1)" (identifier "FUN_0003b070") (argument_list "("conaddr is: %s\n",uVar1)" (( "(") (string_literal ""conaddr is: %s\n"" (" """) (string_content "conaddr is: %s") (escape_sequence "\n") (" """)) (, ",") (identifier "uVar1") () ")"))) (; ";")) (} "}")))) (} "}")))) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0006da50();\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                    \n    FUN_0006da50();\n  }" ({ "{") (expression_statement "FUN_0006da50();" (call_expression "FUN_0006da50()" (identifier "FUN_0006da50") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (return_statement "return cVar3;" (return "return") (identifier "cVar3") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

type_1 function_1(int sock,type_2 *ip,int var_3)

{
  int var_9;
  char *pcVar2;
  int var_2;
  type_3 uVar4;
  type_4 *psVar5;
  int var_1;
  type_5 addrlen;
  type_4 storage;
  
  var_9 = *(int *)(var_1 + 0x14);
  addrlen = 0x80;
  psVar5 = &storage;
  for (var_2 = 0x20; var_2 != 0; var_2 = var_2 + -1) {
    psVar5->ss_family = 0;
    psVar5->__ss_padding[0] = '\0';
    psVar5->__ss_padding[1] = '\0';
    psVar5 = (type_4 *)(psVar5->__ss_padding + 2);
  }
  if (var_3 == 0) {
    var_2 = var_4(sock,(type_6 *)&storage,&addrlen);
  }
  else {
    if (var_3 != 1) {
                    /* WARNING: Subroutine does not return */
      var_5();
    }
    var_2 = var_6(sock,(type_6 *)&storage,&addrlen);
  }
  if (var_2 < 0) {
    uVar4 = 0;
  }
  else {
    (ip->data).d4.s_addr = 0;
    *(type_7 *)((int)&ip->data + 4) = 0;
    *(type_7 *)((int)&ip->data + 8) = 0;
    *(type_7 *)((int)&ip->data + 0xc) = 0;
    ip->ipv6_scope = 0;
    ip->family = (type_8)storage.ss_family;
    if (storage.ss_family == 2) {
      (ip->data).d4.s_addr = storage.__ss_padding._2_4_;
    }
    else {
      if (storage.ss_family != 10) {
                    /* WARNING: Subroutine does not return */
        var_5();
      }
      (ip->data).d4.s_addr = storage.__ss_padding._6_4_;
      *(type_7 *)((int)&ip->data + 4) = storage.__ss_padding._10_4_;
      *(type_7 *)((int)&ip->data + 8) = storage.__ss_padding._14_4_;
      *(type_7 *)((int)&ip->data + 0xc) = storage.__ss_padding._18_4_;
      ip->ipv6_scope = storage.__ss_padding._22_4_;
    }
    uVar4 = opt.debug;
    if (opt.debug == false) {
      uVar4 = 1;
    }
    else {
      pcVar2 = var_7(ip);
      var_8("conaddr is: %s\n",pcVar2);
    }
  }
  if (var_9 != *(int *)(var_1 + 0x14)) {
                    /* WARNING: Subroutine does not return */
    var_10();
  }
  return (type_1)uVar4;
}


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

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

char MASKED(int param_1,uint *param_2,int param_3)

{
  undefined4 uVar1;
  int iVar2;
  char cVar3;
  sockaddr *psVar4;
  int in_GS_OFFSET;
  socklen_t local_a4;
  sockaddr local_a0;
  uint local_90;
  uint local_8c;
  uint local_88;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x1928e;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  local_a4 = 0x80;
  psVar4 = &local_a0;
  for (iVar2 = 0x20; iVar2 != 0; iVar2 = iVar2 + -1) {
    psVar4->sa_family = 0;
    psVar4->sa_data[0] = '\0';
    psVar4->sa_data[1] = '\0';
    psVar4 = (sockaddr *)(psVar4->sa_data + 2);
  }
  if (param_3 == 0) {
    iVar2 = getsockname(param_1,&local_a0,&local_a4);
  }
  else {
    if (param_3 != 1) {
                    /* WARNING: Subroutine does not return */
      abort();
    }
    iVar2 = getpeername(param_1,&local_a0,&local_a4);
  }
  if (iVar2 < 0) {
    cVar3 = '\0';
  }
  else {
    param_2[1] = 0;
    param_2[2] = 0;
    param_2[3] = 0;
    param_2[4] = 0;
    param_2[5] = 0;
    *param_2 = (uint)local_a0.sa_family;
    if (local_a0.sa_family == 2) {
      param_2[1] = local_a0.sa_data._2_4_;
    }
    else {
      if (local_a0.sa_family != 10) {
                    /* WARNING: Subroutine does not return */
        abort();
      }
      param_2[1] = local_a0.sa_data._6_4_;
      param_2[2] = local_a0.sa_data._10_4_;
      param_2[3] = local_90;
      param_2[4] = local_8c;
      param_2[5] = local_88;
    }
    cVar3 = DAT_000a8b9b;
    if (DAT_000a8b9b == '\0') {
      cVar3 = '\x01';
    }
    else {
      uVar1 = FUN_0002a200(param_2);
      FUN_0003b070("conaddr is: %s\n",uVar1);
    }
  }
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_0006da50();
  }
  return cVar3;
}

