{"name": "vmxnet_tx_pkt_parse_headers", "code": "__int64 __fastcall vmxnet_tx_pkt_parse_headers ( __int64 @@a1@@ ) { int v2 ; __int64 v3 ; unsigned __int64 @@v4@@ ; __int64 * @@v5@@ ; __int64 * @@v6@@ ; unsigned __int64 @@v7@@ ; unsigned __int64 @@v8@@ ; @@v8@@ = __readfsqword ( Number ) ; if ( ! @@a1@@ ) _assert_fail ( String , String , Number , String ) ; @@v5@@ = ( __int64 * ) ( * ( _QWORD * ) ( @@a1@@ + Number ) + Number L ) ; @@v6@@ = ( __int64 * ) ( * ( _QWORD * ) ( @@a1@@ + Number ) + Number L ) ; @@v7@@ = iov_to_buf ( * ( _QWORD * ) ( @@a1@@ + Number ) , * ( unsigned int * ) ( @@a1@@ + Number ) , Number L , * @@v5@@ , Number L ) ; if ( @@v7@@ <= Number ) { @@v5@@ [ Number ] = Number L ; return Number L ; } @@v5@@ [ Number ] = ( unsigned int ) eth_get_l2_hdr_length ( * @@v5@@ ) ; v2 = ( unsigned __int16 ) eth_get_l3_proto ( * @@v5@@ , @@v5@@ [ Number ] ) ; if ( ( unsigned __int16 ) v2 == Number ) { * @@v6@@ = g_malloc ( Number L ) ; @@v7@@ = iov_to_buf ( * ( _QWORD * ) ( @@a1@@ + Number ) , * ( unsigned int * ) ( @@a1@@ + Number ) , @@v5@@ [ Number ] , * @@v6@@ , Number L ) ; if ( @@v7@@ <= Number ) { @@v6@@ [ Number ] = Number L ; return Number L ; } @@v6@@ [ Number ] = ( Number * * ( _BYTE * ) * @@v6@@ ) & Number ; * ( _BYTE * ) ( @@a1@@ + Number ) = * ( _BYTE * ) ( * @@v6@@ + Number ) ; @@v7@@ = iov_to_buf ( * ( _QWORD * ) ( @@a1@@ + Number ) , * ( unsigned int * ) ( @@a1@@ + Number ) , @@v5@@ [ Number ] + Number , * @@v6@@ + Number , @@v6@@ [ Number ] - Number ) ; if ( @@v7@@ < @@v6@@ [ Number ] - Number ) { @@v6@@ [ Number ] = Number L ; return Number L ; } } else if ( v2 == Number ) { if ( ( unsigned __int8 ) eth_parse_ipv6_hdr ( * ( _QWORD * ) ( @@a1@@ + Number ) , * ( unsigned int * ) ( @@a1@@ + Number ) , @@v5@@ [ Number ] , @@a1@@ + Number , & @@v4@@ ) != Number ) { @@v6@@ [ Number ] = Number L ; return Number L ; } v3 = g_malloc ( @@v4@@ ) ; * @@v6@@ = v3 ; @@v7@@ = iov_to_buf ( * ( _QWORD * ) ( @@a1@@ + Number ) , * ( unsigned int * ) ( @@a1@@ + Number ) , @@v5@@ [ Number ] , * @@v6@@ , @@v4@@ ) ; if ( @@v7@@ < @@v4@@ ) { @@v6@@ [ Number ] = Number L ; return Number L ; } @@v6@@ [ Number ] = @@v4@@ ; } else { @@v6@@ [ Number ] = Number L ; } vmxnet_tx_pkt_calculate_hdr_len ( @@a1@@ ) ; * ( _DWORD * ) ( @@a1@@ + Number ) = get_eth_packet_type ( ( _BYTE * ) * @@v5@@ ) ; return Number L ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "v7", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s16"}, {"n": "v6", "t": {"T": 3, "t": "__int64"}, "location": "s24"}, {"n": "v5", "t": {"T": 3, "t": "__int64"}, "location": "s32"}, {"n": "v4", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s40"}, {"n": "v8", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s8"}]}
{"name": "get_eth_packet_type", "code": "__int64 __fastcall get_eth_packet_type ( _BYTE * @@a1@@ ) { if ( is_broadcast_ether_addr ( @@a1@@ ) ) return Number L ; if ( ( unsigned int ) is_multicast_ether_addr ( @@a1@@ ) ) return Number L ; return Number L ; }", "source": [{"n": "a1", "t": {"T": 3, "t": "_BYTE"}, "location": "r56"}]} {"name": "eth_get_l2_hdr_length", "code": "__int64 __fastcall eth_get_l2_hdr_length ( __int64 @@a1@@ ) { int @@v1@@ ; @@v1@@ = ( unsigned __int16 ) be16_to_cpu ( * ( _WORD * ) ( @@a1@@ + Number ) ) ; if ( ( unsigned __int16 ) @@v1@@ == Number ) return Number L ; if ( @@v1@@ != Number ) return Number L ; if ( * ( _WORD * ) ( @@a1@@ + Number ) == Number ) return Number L ; return Number L ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "v1", "t": {"T": 1, "n": "int", "s": 4}, "location": "r8"}]} {"name": "eth_get_l3_proto", "code": "__int16 __fastcall eth_get_l3_proto ( __int64 @@a1@@ , __int64 @@a2@@ ) { return be16_to_cpup ( ( __int16 * ) ( @@a2@@ - Number + @@a1@@ ) ) ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r64"}]} {"name": "vmxnet_tx_pkt_calculate_hdr_len", "code": "__int64 __fastcall vmxnet_tx_pkt_calculate_hdr_len ( __int64 @@a1@@ ) { __int64 @@result@@ ; @@result@@ = @@a1@@ ; * ( _WORD * ) ( @@a1@@ + Number ) = * ( _QWORD * ) ( * ( _QWORD * ) ( @@a1@@ + Number ) + Number L ) + * ( _QWORD * ) ( * ( _QWORD * ) ( @@a1@@ + Number ) + Number L ) ; return @@result@@ ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "result", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r8"}]} {"name": "vmxnet_tx_pkt_parse", "code": "_BOOL8 __fastcall vmxnet_tx_pkt_parse ( __int64 @@a1@@ ) { return ( unsigned __int8 ) vmxnet_tx_pkt_parse_headers ( @@a1@@ ) && ( unsigned __int8 ) vmxnet_tx_pkt_rebuild_payload ( @@a1@@ ) ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}]}