func: int CVE_2012_2669_PATCHED_main(void) int fd , len , sock_opt ; struct cn_msg * message ; struct nlmsghdr * incoming_msg ; struct cn_msg * incoming_cn_msg ; struct hv_kvp_msg * hv_msg ; char * key_name ; fd = socket ( AF_NETLINK , SOCK_DGRAM , NETLINK_CONNECTOR ); addr . nl_family = AF_NETLINK; addr . nl_pad = 0; addr . nl_pid = 0; addr . nl_groups = CN_KVP_IDX; message = ( struct cn_msg * ) kvp_send_buffer; message -> id . idx = CN_KVP_IDX; message -> id . val = CN_KVP_VAL; hv_msg = ( struct hv_kvp_msg * ) message -> data; hv_msg -> kvp_hdr . operation = KVP_OP_REGISTER; message -> ack = 0; message -> len = sizeof ( struct hv_kvp_msg ); len = netlink_send ( fd , message ); while ( 1 )  struct sockaddr * addr_p = ( struct sockaddr * ) & addr ; len = recvfrom ( fd , kvp_recv_buffer , sizeof ( kvp_recv_buffer ) , 0 , addr_p , & addr_l ); if ( len < 0 || addr . nl_pid )  incoming_msg = ( struct nlmsghdr * ) kvp_recv_buffer; incoming_cn_msg = ( struct cn_msg * ) NLMSG_DATA ( incoming_msg ); hv_msg = ( struct hv_kvp_msg * ) incoming_cn_msg -> data; switch ( hv_msg -> kvp_hdr . operation )  if ( kvp_key_add_or_modify ( hv_msg -> kvp_hdr . pool , hv_msg -> body . kvp_set . data . key , hv_msg -> body . kvp_set . data . key_size , hv_msg -> body . kvp_set . data . value , hv_msg -> body . kvp_set . data . value_size ) )  strcpy ( hv_msg -> body . kvp_set . data . key , "" ); if ( kvp_get_value ( hv_msg -> kvp_hdr . pool , hv_msg -> body . kvp_set . data . key , hv_msg -> body . kvp_set . data . key_size , hv_msg -> body . kvp_set . data . value , hv_msg -> body . kvp_set . data . value_size ) )  strcpy ( hv_msg -> body . kvp_set . data . key , "" ); if ( kvp_key_delete ( hv_msg -> kvp_hdr . pool , hv_msg -> body . kvp_delete . key , hv_msg -> body . kvp_delete . key_size ) )  strcpy ( hv_msg -> body . kvp_delete . key , "" ); if ( hv_msg -> kvp_hdr . operation != KVP_OP_ENUMERATE )  if ( hv_msg -> kvp_hdr . pool != KVP_POOL_AUTO )  hv_msg = ( struct hv_kvp_msg * ) incoming_cn_msg -> data; key_name = ( char * ) hv_msg -> body . kvp_enum_data . data . key; switch ( hv_msg -> body . kvp_enum_data . index )  strcpy ( key_name , "IntegrationServicesVersion" ); strcpy ( key_name , "NetworkAddressIPv4" ); strcpy ( key_name , "NetworkAddressIPv6" ); strcpy ( key_name , "OSBuildNumber" ); strcpy ( key_name , "OSName" ); strcpy ( key_name , "OSMajorVersion" ); strcpy ( key_name , "OSMinorVersion" ); strcpy ( key_name , "OSVersion" ); strcpy ( key_name , "ProcessorArchitecture" ); strcpy ( key_name , "" ); incoming_cn_msg -> id . idx = CN_KVP_IDX; incoming_cn_msg -> id . val = CN_KVP_VAL; incoming_cn_msg -> ack = 0; incoming_cn_msg -> len = sizeof ( struct hv_kvp_msg ); 