{"name": "l2cap_psm", "code": "__int64 __fastcall l2cap_psm ( __int64 @@a1@@ , int @@a2@@ ) { __int64 @@i@@ ; for ( @@i@@ = * ( _QWORD * ) ( @@a1@@ + Number ) ; @@i@@ && @@a2@@ != * ( _DWORD * ) @@i@@ ; @@i@@ = * ( _QWORD * ) ( @@i@@ + Number ) ) ; return @@i@@ ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "int", "s": 4}, "location": "r64"}, {"n": "i", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s16"}]}
{"name": "l2cap_channel_open", "code": "__int64 __fastcall l2cap_channel_open ( __int64 @@a1@@ , int @@a2@@ , unsigned __int16 @@a3@@ ) { int v3 ; int v4 ; unsigned __int16 @@v7@@ ; _BYTE @@v8@@ [ Number ] ; __int64 @@v9@@ ; * ( _DWORD * ) & @@v8@@ [ Number ] = Number ; * ( _QWORD * ) @@v8@@ = ( unsigned int ) l2cap_cid_new ( @@a1@@ ) ; if ( ! * ( _DWORD * ) @@v8@@ ) { @@v7@@ = Number ; goto LABEL_12 ; } @@v9@@ = l2cap_psm ( * ( _QWORD * ) ( @@a1@@ + Number ) , @@a2@@ ) ; if ( @@v9@@ ) { * ( _QWORD * ) & @@v8@@ [ Number ] = g_malloc0 ( Number L ) ; * * ( _QWORD * * ) & @@v8@@ [ Number ] = l2cap_bframe_out ; * ( _QWORD * ) ( * ( _QWORD * ) & @@v8@@ [ Number ] + Number L ) = l2cap_bframe_submit ; * ( _QWORD * ) ( * ( _QWORD * ) & @@v8@@ [ Number ] + Number L ) = l2cap_bframe_in ; * ( _DWORD * ) ( * ( _QWORD * ) & @@v8@@ [ Number ] + Number L ) = Number ; v3 = Number ; if ( * ( int * ) ( @@v9@@ + Number ) >= Number ) v3 = * ( _DWORD * ) ( @@v9@@ + Number ) ; * ( _DWORD * ) ( * ( _QWORD * ) & @@v8@@ [ Number ] + Number L ) = v3 ; v4 = Number ; if ( * ( int * ) ( * ( _QWORD * ) & @@v8@@ [ Number ] + Number L ) >= Number ) v4 = * ( _DWORD * ) ( * ( _QWORD * ) & @@v8@@ [ Number ] + Number L ) ; * ( _DWORD * ) ( * ( _QWORD * ) & @@v8@@ [ Number ] + Number L ) = v4 ; * ( _WORD * ) ( * ( _QWORD * ) & @@v8@@ [ Number ] + Number L ) = @@a3@@ ; * ( _DWORD * ) ( * ( _QWORD * ) & @@v8@@ [ Number ] + Number L ) = Number ; * ( _QWORD * ) ( * ( _QWORD * ) & @@v8@@ [ Number ] + Number L ) = @@a1@@ ; if ( ! ( * ( unsigned int ( __fastcall * * ) ( _QWORD , _QWORD ) ) ( @@v9@@ + Number ) ) ( * ( _QWORD * ) ( @@a1@@ + Number ) , * ( _QWORD * ) & @@v8@@ [ Number ] ) ) { * ( _QWORD * ) ( @@a1@@ + Number * ( * ( int * ) @@v8@@ + Number L ) ) = * ( _QWORD * ) & @@v8@@ [ Number ] ; @@v7@@ = Number ; LABEL_12 : l2cap_connection_response ( @@a1@@ , * ( unsigned __int16 * ) @@v8@@ , @@a3@@ , @@v7@@ , Number ) ; return * ( _QWORD * ) & @@v8@@ [ Number ] ; } g_free ( * ( _QWORD * ) & @@v8@@ [ Number ] ) ; l2cap_connection_response ( @@a1@@ , * ( unsigned __int16 * ) @@v8@@ , @@a3@@ , Number , Number ) ; } else { l2cap_connection_response ( @@a1@@ , * ( unsigned __int16 * ) @@v8@@ , @@a3@@ , Number , Number ) ; } return * ( _QWORD * ) & @@v8@@ [ Number ] ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "unsigned __int16", "s": 2}, "location": "r16"}, {"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "int", "s": 4}, "location": "r64"}, {"n": "v9", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s16"}, {"n": "v8", "t": {"T": 2, "n": 12, "s": 1, "t": "_BYTE"}, "location": "s28"}, {"n": "v7", "t": {"T": 1, "n": "unsigned __int16", "s": 2}, "location": "s36"}]} {"name": "bt_l2cap_psm_register", "code": "unsigned __int64 __fastcall bt_l2cap_psm_register ( __int64 @@a1@@ , unsigned int @@a2@@ , int @@a3@@ , __int64 @@a4@@ ) { __int64 @@v4@@ ; unsigned __int64 @@v8@@ ; @@v8@@ = __readfsqword ( Number ) ; if ( l2cap_psm ( @@a1@@ , @@a2@@ ) ) { fprintf ( stderr , String , String , @@a2@@ , * ( const char * * ) ( @@a1@@ + Number ) ) ; exit ( Number ) ; } @@v4@@ = g_malloc0 ( Number L ) ; * ( _DWORD * ) @@v4@@ = @@a2@@ ; * ( _DWORD * ) ( @@v4@@ + Number ) = @@a3@@ ; * ( _QWORD * ) ( @@v4@@ + Number ) = @@a4@@ ; * ( _QWORD * ) ( @@v4@@ + Number ) = * ( _QWORD * ) ( @@a1@@ + Number ) ; * ( _QWORD * ) ( @@a1@@ + Number ) = @@v4@@ ; return __readfsqword ( Number ) ^ @@v8@@ ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "int", "s": 4}, "location": "r16"}, {"n": "a4", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r24"}, {"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "r64"}, {"n": "v4", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r8"}, {"n": "v8", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s8"}]}