{"name": "l2cap_channel_config_req_msg", "code": "unsigned __int64 __fastcall l2cap_channel_config_req_msg ( __int64 @@a1@@ , int @@a2@@ , int @@a3@@ , void * @@a4@@ , int @@a5@@ ) { __int64 @@v6@@ ; unsigned __int64 @@v7@@ ; @@v7@@ = __readfsqword ( Number ) ; if ( @@a3@@ <= Number && * ( _QWORD * ) ( @@a1@@ + Number * ( @@a3@@ + Number L ) ) ) { @@v6@@ = * ( _QWORD * ) ( @@a1@@ + Number * ( @@a3@@ + Number L ) ) ; * ( _DWORD * ) ( @@v6@@ + Number ) &= Number ; if ( l2cap_channel_config ( @@a1@@ , @@v6@@ , @@a2@@ , @@a4@@ , @@a5@@ ) ) * ( _DWORD * ) ( @@v6@@ + Number ) |= Number ; if ( ( * ( _DWORD * ) ( @@v6@@ + Number ) & Number ) == Number && ( * ( _DWORD * ) ( @@v6@@ + Number ) & Number ) != Number && ! * ( _DWORD * ) ( @@v6@@ + Number ) ) l2cap_channel_config_req_event ( @@a1@@ , @@v6@@ ) ; } else { l2cap_command_reject_cid ( @@a1@@ , * ( _DWORD * ) ( @@a1@@ + Number ) , Number , @@a3@@ , Number ) ; } return __readfsqword ( Number ) ^ @@v7@@ ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "int", "s": 4}, "location": "r16"}, {"n": "a4", "t": {"T": 3, "t": "void"}, "location": "r24"}, {"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "int", "s": 4}, "location": "r64"}, {"n": "a5", "t": {"T": 1, "n": "int", "s": 4}, "location": "r72"}, {"n": "v6", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s16"}, {"n": "v7", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s8"}]}
{"name": "l2cap_command_reject", "code": "unsigned __int64 __fastcall l2cap_command_reject ( __int64 @@a1@@ , char @@a2@@ , unsigned __int16 @@a3@@ , const void * @@a4@@ , int @@a5@@ ) { __int16 @@v8@@ ; __int16 @@v9@@ ; __int64 @@v10@@ ; unsigned __int64 @@v11@@ ; @@v11@@ = __readfsqword ( Number ) ; @@v8@@ = cpu_to_le16 ( @@a3@@ ) ; @@v9@@ = cpu_to_le16 ( ( unsigned __int16 ) @@a5@@ + Number ) ; @@v10@@ = ( * ( __int64 ( __fastcall * * ) ( __int64 , _QWORD ) ) ( @@a1@@ + Number ) ) ( @@a1@@ + Number , ( unsigned int ) ( @@a5@@ + Number ) ) ; * ( _BYTE * ) @@v10@@ = Number ; * ( _BYTE * ) ( @@v10@@ + Number ) = @@a2@@ ; * ( _WORD * ) ( @@v10@@ + Number ) = @@v9@@ ; * ( _WORD * ) ( @@v10@@ + Number ) = @@v8@@ ; if ( @@a5@@ ) memcpy ( ( void * ) ( @@v10@@ + Number ) , @@a4@@ , @@a5@@ ) ; ( * ( void ( __fastcall * * ) ( __int64 ) ) ( @@a1@@ + Number ) ) ( @@a1@@ + Number ) ; return __readfsqword ( Number ) ^ @@v11@@ ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "unsigned __int16", "s": 2}, "location": "r16"}, {"n": "a4", "t": {"T": 3, "t": "const void"}, "location": "r24"}, {"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "char", "s": 1}, "location": "r64"}, {"n": "a5", "t": {"T": 1, "n": "int", "s": 4}, "location": "r72"}, {"n": "v10", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s32"}, {"n": "v9", "t": {"T": 1, "n": "__int16", "s": 2}, "location": "s34"}, {"n": "v8", "t": {"T": 1, "n": "__int16", "s": 2}, "location": "s64"}, {"n": "v11", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s8"}]} {"name": "l2cap_command_reject_cid", "code": "unsigned __int64 __fastcall l2cap_command_reject_cid ( __int64 @@a1@@ , char @@a2@@ , unsigned __int16 @@a3@@ , __int16 @@a4@@ , __int16 @@a5@@ ) { __int16 @@v6@@ [ Number ] ; unsigned __int64 @@v7@@ ; @@v7@@ = __readfsqword ( Number ) ; @@v6@@ [ Number ] = @@a4@@ ; @@v6@@ [ Number ] = @@a5@@ ; l2cap_command_reject ( @@a1@@ , @@a2@@ , @@a3@@ , @@v6@@ , Number ) ; return __readfsqword ( Number ) ^ @@v7@@ ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "unsigned __int16", "s": 2}, "location": "r16"}, {"n": "a4", "t": {"T": 1, "n": "__int16", "s": 2}, "location": "r24"}, {"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "char", "s": 1}, "location": "r64"}, {"n": "a5", "t": {"T": 1, "n": "__int16", "s": 2}, "location": "r72"}, {"n": "v6", "t": {"T": 2, "n": 2, "s": 2, "t": "__int16"}, "location": "s12"}, {"n": "v7", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s8"}]} {"name": "l2cap_channel_config_req_event", "code": "unsigned __int64 __fastcall l2cap_channel_config_req_event ( __int64 @@a1@@ , __int64 @@a2@@ ) { unsigned __int64 @@v3@@ ; @@v3@@ = __readfsqword ( Number ) ; l2cap_channel_config_null ( @@a1@@ , @@a2@@ ) ; return __readfsqword ( Number ) ^ @@v3@@ ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r64"}, {"n": "v3", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s8"}]} {"name": "l2cap_channel_config", "code": "_BOOL8 __fastcall l2cap_channel_config ( __int64 @@a1@@ , __int64 @@a2@@ , int @@a3@@ , void * @@a4@@ , int @@a5@@ ) { void * @@v5@@ ; int v6 ; unsigned __int16 v7 ; void * @@src@@ ; int @@v10@@ ; int @@v11@@ ; __int64 @@v12@@ ; __int64 @@v13@@ ; int @@v14@@ ; unsigned int @@v15@@ ; __int64 @@v16@@ ; void * @@dest@@ ; unsigned __int16 * @@v18@@ ; unsigned __int8 * @@v19@@ ; unsigned __int64 @@v20@@ ; @@v13@@ = @@a1@@ ; @@v12@@ = @@a2@@ ; @@v11@@ = @@a3@@ ; @@src@@ = @@a4@@ ; @@v10@@ = @@a5@@ ; @@v20@@ = __readfsqword ( Number ) ; @@v16@@ = @@a5@@ - Number L ; @@v5@@ = alloca ( Number * ( ( @@a5@@ + Number L ) / Number ) ) ; @@dest@@ = & @@src@@ ; @@v14@@ = Number ; @@src@@ = memcpy ( & @@src@@ , @@a4@@ , @@a5@@ ) ; while ( @@v10@@ ) { @@v18@@ = ( unsigned __int16 * ) @@src@@ ; if ( @@v10@@ <= Number || @@v10@@ <= * ( ( unsigned __int8 * ) @@v18@@ + Number ) + Number ) { @@v14@@ = Number ; break ; } @@src@@ = ( char * ) @@src@@ + * ( ( unsigned __int8 * ) @@v18@@ + Number ) + Number ; @@v10@@ -= * ( ( unsigned __int8 * ) @@v18@@ + Number ) + Number ; v6 = * ( _BYTE * ) @@v18@@ & Number ; if ( v6 == Number ) { if ( * ( ( _BYTE * ) @@v18@@ + Number ) == Number ) { @@v15@@ = * ( ( unsigned __int8 * ) @@v18@@ + Number ) ; if ( @@v15@@ ) { if ( @@v15@@ - Number > Number ) { @@v14@@ = Number ; } else { * ( _DWORD * ) ( @@v12@@ + Number ) = @@v15@@ ; * ( _QWORD * ) ( @@v12@@ + Number ) = l2cap_iframe_in ; @@v15@@ = * ( ( unsigned __int8 * ) @@v18@@ + Number ) ; if ( @@v15@@ && @@v15@@ <= Number ) { @@v15@@ = * ( ( unsigned __int8 * ) @@v18@@ + Number ) ; if ( @@v15@@ ) { @@v15@@ = * ( unsigned __int16 * ) ( ( char * ) @@v18@@ + Number ) ; if ( @@v15@@ > Number ) { * ( _DWORD * ) ( @@v12@@ + Number ) = @@v15@@ ; l2cap_monitor_timer_update ( @@v12@@ ) ; @@v15@@ = * ( unsigned __int16 * ) ( ( char * ) @@v18@@ + Number ) ; if ( @@v15@@ >= * ( _DWORD * ) ( @@v12@@ + Number ) ) { * ( _DWORD * ) ( @@v12@@ + Number ) = @@v15@@ ; } else { * ( unsigned __int16 * ) ( ( char * ) @@v18@@ + Number ) = * ( _DWORD * ) ( @@v12@@ + Number ) ; @@v14@@ = Number ; } } else { * ( ( _BYTE * ) @@v18@@ + Number ) = Number ; * ( ( _BYTE * ) @@v18@@ + Number ) = Number ; @@v14@@ = Number ; } } else { * ( ( _BYTE * ) @@v18@@ + Number ) = Number ; @@v14@@ = Number ; } } else { * ( ( _BYTE * ) @@v18@@ + Number ) = Number ; @@v14@@ = Number ; } } } else { * ( _DWORD * ) ( @@v12@@ + Number ) = Number ; * ( _QWORD * ) ( @@v12@@ + Number ) = l2cap_bframe_in ; } } else { @@v14@@ = Number ; } } else { if ( ( * ( _BYTE * ) @@v18@@ & Number ) > Number ) goto LABEL_49 ; if ( v6 == Number ) { if ( * ( ( _BYTE * ) @@v18@@ + Number ) == Number ) { @@v19@@ = ( unsigned __int8 * ) ( @@v18@@ + Number ) ; @@v15@@ = * ( ( unsigned __int8 * ) @@v18@@ + Number ) ; if ( @@v15@@ ) { * @@v19@@ = Number ; @@v14@@ = Number ; } @@v15@@ = @@v19@@ [ Number ] ; if ( @@v15@@ != Number && @@v15@@ ) { @@v19@@ [ Number ] = Number ; @@v14@@ = Number ; } if ( @@v15@@ ) { @@v15@@ = le32_to_cpu ( * ( _DWORD * ) ( @@v19@@ + Number ) ) ; if ( @@v15@@ == Number ) * ( _DWORD * ) ( @@v19@@ + Number ) = cpu_to_le32 ( Number ) ; @@v15@@ = le32_to_cpu ( * ( _DWORD * ) ( @@v19@@ + Number ) ) ; if ( @@v15@@ == Number ) * ( _DWORD * ) ( @@v19@@ + Number ) = cpu_to_le32 ( Number ) ; } } else { @@v14@@ = Number ; } goto LABEL_51 ; } if ( v6 != Number ) { if ( v6 == Number ) { if ( * ( ( _BYTE * ) @@v18@@ + Number ) == Number ) { v7 = le16_to_cpup ( @@v18@@ + Number ) ; @@v15@@ = v7 ; if ( ! v7 ) { * ( ( _BYTE * ) @@v18@@ + Number ) = Number ; * ( ( _BYTE * ) @@v18@@ + Number ) = Number ; @@v14@@ = Number ; } } else { @@v14@@ = Number ; } goto LABEL_51 ; } LABEL_49 : if ( * ( char * ) @@v18@@ >= Number ) @@v14@@ = Number ; goto LABEL_51 ; } if ( * ( ( _BYTE * ) @@v18@@ + Number ) == Number ) { @@v15@@ = ( unsigned __int16 ) le16_to_cpup ( @@v18@@ + Number ) ; if ( @@v15@@ >= * ( _DWORD * ) ( @@v12@@ + Number ) ) { * ( _DWORD * ) ( @@v12@@ + Number ) = @@v15@@ ; } else { cpu_to_le16w ( @@v18@@ + Number , * ( _DWORD * ) ( @@v12@@ + Number ) ) ; @@v14@@ = Number ; } } else { @@v14@@ = Number ; } } LABEL_51 : if ( @@v14@@ ) break ; } l2cap_configuration_response ( @@v13@@ , * ( _WORD * ) ( @@v12@@ + Number ) , @@v11@@ , @@v14@@ , @@dest@@ , @@v10@@ ) ; return ! @@v14@@ && ! @@v11@@ ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "int", "s": 4}, "location": "r16"}, {"n": "a4", "t": {"T": 3, "t": "void"}, "location": "r24"}, {"n": "v5", "t": {"T": 3, "t": "void"}, "location": "r40"}, {"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r64"}, {"n": "a5", "t": {"T": 1, "n": "int", "s": 4}, "location": "r72"}, {"n": "v11", "t": {"T": 1, "n": "int", "s": 4}, "location": "s100"}, {"n": "v10", "t": {"T": 1, "n": "int", "s": 4}, "location": "s104"}, {"n": "src", "t": {"T": 3, "t": "void"}, "location": "s112"}, {"n": "v20", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s40"}, {"n": "v19", "t": {"T": 3, "t": "unsigned __int8"}, "location": "s48"}, {"n": "v18", "t": {"T": 3, "t": "unsigned __int16"}, "location": "s56"}, {"n": "dest", "t": {"T": 3, "t": "void"}, "location": "s64"}, {"n": "v16", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s72"}, {"n": "v15", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s76"}, {"n": "v14", "t": {"T": 1, "n": "int", "s": 4}, "location": "s80"}, {"n": "v13", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s88"}, {"n": "v12", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "s96"}]} {"name": "l2cap_command", "code": "unsigned __int64 __fastcall l2cap_command ( __int64 @@a1@@ , int @@a2@@ , unsigned int @@a3@@ , unsigned __int16 * @@a4@@ , int @@a5@@ ) { int v5 ; _BOOL4 v6 ; unsigned __int16 v7 ; unsigned __int16 v8 ; unsigned __int16 v9 ; int v10 ; char v11 ; int v12 ; __int64 @@v13@@ ; unsigned __int16 v14 ; unsigned int v15 ; unsigned __int16 v16 ; unsigned __int16 v17 ; unsigned __int64 @@v22@@ ; @@v22@@ = __readfsqword ( Number ) ; * ( _DWORD * ) ( @@a1@@ + Number ) = @@a3@@ ; if ( @@a3@@ == * ( _DWORD * ) ( @@a1@@ + Number ) ) { * ( _DWORD * ) ( @@a1@@ + Number ) = * ( _DWORD * ) ( @@a1@@ + Number ) ; if ( * ( _DWORD * ) ( @@a1@@ + Number ) == Number ) v5 = Number ; else v5 = * ( _DWORD * ) ( @@a1@@ + Number ) + Number ; * ( _DWORD * ) ( @@a1@@ + Number ) = v5 ; } switch ( @@a2@@ ) { case Number : v6 = @@a5@@ != Number && @@a5@@ != Number ; if ( v6 && @@a5@@ != Number ) goto LABEL_33 ; v7 = le16_to_cpu ( * @@a4@@ ) ; fprintf ( stderr , String , String , @@a3@@ , v7 ) ; break ; case Number : if ( @@a5@@ != Number ) goto LABEL_33 ; v8 = le16_to_cpu ( @@a4@@ [ Number ] ) ; v9 = le16_to_cpu ( * @@a4@@ ) ; l2cap_channel_open_req_msg ( @@a1@@ , v9 , v8 ) ; break ; case Number : if ( @@a5@@ != Number ) goto LABEL_33 ; fprintf ( stderr , String , String , @@a3@@ ) ; break ; case Number : if ( @@a5@@ <= Number ) goto LABEL_33 ; v10 = ( unsigned __int16 ) le16_to_cpu ( * @@a4@@ ) ; v11 = le16_to_cpu ( @@a4@@ [ Number ] ) ; l2cap_channel_config_req_msg ( @@a1@@ , v11 & Number , v10 , @@a4@@ + Number , @@a5@@ - Number ) ; break ; case Number : if ( @@a5@@ <= Number ) goto LABEL_33 ; v12 = ( unsigned __int16 ) le16_to_cpu ( * @@a4@@ ) ; @@v13@@ = le16_to_cpu ( @@a4@@ [ Number ] ) & Number ; v14 = le16_to_cpu ( @@a4@@ [ Number ] ) ; if ( ( unsigned int ) l2cap_channel_config_rsp_msg ( @@a1@@ , v14 , @@v13@@ , v12 ) ) fprintf ( stderr , String , String , @@a3@@ ) ; break ; case Number : if ( @@a5@@ != Number ) goto LABEL_33 ; v15 = ( unsigned __int16 ) le16_to_cpu ( @@a4@@ [ Number ] ) ; v16 = le16_to_cpu ( * @@a4@@ ) ; l2cap_channel_close ( @@a1@@ , v16 , v15 ) ; break ; case Number : if ( @@a5@@ != Number ) goto LABEL_33 ; fprintf ( stderr , String , String , @@a3@@ ) ; break ; case Number : l2cap_echo_response ( @@a1@@ , @@a4@@ , @@a5@@ ) ; break ; case Number : fprintf ( stderr , String , String , @@a3@@ ) ; break ; case Number : if ( @@a5@@ != Number ) goto LABEL_33 ; v17 = le16_to_cpu ( * @@a4@@ ) ; l2cap_info ( @@a1@@ , v17 ) ; break ; case Number : if ( @@a5@@ != Number ) goto LABEL_33 ; fprintf ( stderr , String , String , @@a3@@ ) ; break ; default : LABEL_33 : l2cap_command_reject ( @@a1@@ , @@a3@@ , Number , Number L , Number ) ; break ; } return __readfsqword ( Number ) ^ @@v22@@ ; }", "source": [{"n": "v13", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r104"}, {"n": "a3", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "r16"}, {"n": "a4", "t": {"T": 3, "t": "unsigned __int16"}, "location": "r24"}, {"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "int", "s": 4}, "location": "r64"}, {"n": "a5", "t": {"T": 1, "n": "int", "s": 4}, "location": "r72"}, {"n": "v22", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s40"}]}