原始标题:QQ官方机器人消息权限获取设置逆向实录

特征:一堆恶心的混淆,还有各种包装层。
已知条件
选择菜单标题:机器人可获取的群聊消息范围(IOS端)
选项
0:获取全部群消息
1:获取@机器人的最近10条消息
2:仅获取@机器人的消息
最底下按钮:取消

dc1/bp

入口:dc1/bp

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
//
// Decompiled by Jadx - 642ms
//
package dc1;

import androidx.compose.runtime.Composable;
import androidx.compose.runtime.Composer;
import androidx.compose.runtime.ComposerKt;
import androidx.compose.runtime.ScopeUpdateScope;
import androidx.compose.runtime.internal.ComposableLambda;
import androidx.compose.runtime.internal.ComposableLambdaKt;
import com.tencent.ntcompose.foundation.event.BackHandlerKt;
import ec1.e;
import en4.d;
import hz0.cv;
import hz0.cw;
import java.util.ArrayList;
import java.util.List;
import kotlin.Unit;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

public final class bp {
/* JADX WARN: Code restructure failed: missing block: B:65:0x0140, code lost:

if (r7 == androidx.compose.runtime.Composer.Companion.getEmpty()) goto L63;
*/
@Composable
/*
Code decompiled incorrectly, please refer to instructions dump.
*/
public static final void a(
@NotNull e eVar, //列表数据对象
@NotNull Function1<? super Integer, Unit> function1,
@NotNull Function0<Unit> function0,
@NotNull Function0<Unit> function02,
@Nullable Composer composer,
int i //常数值为8
){
String str;
Object obj;
Composer composer2;
Composer startRestartGroup = composer.startRestartGroup(-569297212);
int i2 = (i & 14) == 0 ? (startRestartGroup.changed(eVar) ? 4 : 2) | i : i;
if ((i & 112) == 0) {
i2 |= startRestartGroup.changed(function1) ? 32 : 16;
}
if ((i & 896) == 0) {
i2 |= startRestartGroup.changed(function0) ? 256 : 128;
}
if ((i & 7168) == 0) {
i2 |= startRestartGroup.changed(function02) ? 2048 : 1024;
}
if ((i2 & 5851) == 1170 && startRestartGroup.getSkipping()) {
startRestartGroup.skipToGroupEnd();
composer2 = startRestartGroup;
} else {
if (ComposerKt.isTraceInProgress()) {
ComposerKt.traceEventStart(-569297212, i2, -1, "com.tencent.hippykotlin.demo.pages.group.qtroop_robot.popView.compose.GroupAuthOptionsActionSheet (GroupAuthOptionsActionSheet.kt:35)");
}
boolean z = true;
BackHandlerKt.a(false, new a(eVar, function0), startRestartGroup, 0, 1);
boolean e = eVar.e();
d b = eVar.b();
if (b == null || (str = b.b()) == null) {
str = "机器人阅读群聊消息的范围"; //菜单标题
}
List<ec1.d> c = eVar.c(); //获取权限列表
ArrayList arrayList = new ArrayList(CollectionsKt.collectionSizeOrDefault(c, 10));
for (ec1.d dVar : c) { //创建菜单选项
String a = dVar.a(); //每个选项的文本
ComposableLambda composableLambda = ComposableLambdaKt.composableLambda(startRestartGroup, -407341940, z, new b(dVar, eVar));
startRestartGroup.startReplaceableGroup(0x1e7b2b64);
boolean changed = startRestartGroup.changed(function1) | startRestartGroup.changed(dVar); //点击后同步一次内存中的值(调用传入function1方法,回调)
Object rememberedValue = startRestartGroup.rememberedValue();
if (changed || rememberedValue == Composer.Companion.getEmpty()) {
rememberedValue = new c(function1, dVar);
startRestartGroup.updateRememberedValue(rememberedValue);
}
startRestartGroup.endReplaceableGroup();
arrayList.add(new cv(a, composableLambda, (Function0) rememberedValue));
z = true;
}
Object[] array = arrayList.toArray(new cv[0]);
Intrinsics.checkNotNull(array, "null cannot be cast to non-null type kotlin.Array<T of kotlin.collections.ArraysKt__ArraysJVMKt.toTypedArray>");
cv[] cvVarArr = (cv[]) array;
startRestartGroup.startReplaceableGroup(0x44faf204);
boolean changed2 = startRestartGroup.changed(function0);
Object rememberedValue2 = startRestartGroup.rememberedValue();
if (changed2 || rememberedValue2 == Composer.Companion.getEmpty()) {
rememberedValue2 = new d(function0);
startRestartGroup.updateRememberedValue(rememberedValue2);
}
startRestartGroup.endReplaceableGroup();
Function1 function12 = (Function1) rememberedValue2;
startRestartGroup.startReplaceableGroup(0x44faf204);
boolean changed3 = startRestartGroup.changed(function02);
Object rememberedValue3 = startRestartGroup.rememberedValue();
if (!changed3) {
obj = rememberedValue3;
}
e eVar2 = new e(function02);
startRestartGroup.updateRememberedValue(eVar2);
obj = eVar2;
startRestartGroup.endReplaceableGroup();
composer2 = startRestartGroup;
cw.a(e, str, false, cvVarArr, "取消", function12, (Boolean) null, (Function0) obj, startRestartGroup, 28672, 68); //菜单最底部的那个“取消”按钮
if (ComposerKt.isTraceInProgress()) {
ComposerKt.traceEventEnd();
}
}
ScopeUpdateScope endRestartGroup = composer2.endRestartGroup();
if (endRestartGroup == null) {
return;
}
endRestartGroup.updateScope(new f(eVar, function1, function0, function02, i));
}
}

其中使用到的数据对象:
ec1.d

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//
// Decompiled by Jadx - 658ms
//
package ec1;

import androidx.compose.runtime.internal.StabilityInferred;
import kotlin.jvm.internal.Intrinsics;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

@StabilityInferred(parameters = 0)
public final class d {

@NotNull
private final String a;
private final int b;

public d(@NotNull String str, int i) {
this.a = str;
this.b = i;
}

@NotNull
public final String a() {
return this.a;
}

public final int b() {
return this.b;
}

public boolean equals(@Nullable Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof d)) {
return false;
}
d dVar = (d) obj;
return Intrinsics.areEqual(this.a, dVar.a) && this.b == dVar.b;
}

public int hashCode() {
return (this.a.hashCode() * 31) + this.b;
}

@NotNull
public String toString() {
return "ActionSheetOption(showName=" + this.a + ", value=" + this.b + ')';
}
}

ec1.e(上面那个类的a方法的入参其中之一,位置是第一个)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
//
// Decompiled by Jadx - 585ms
//
package ec1;

import androidx.compose.runtime.internal.StabilityInferred;
import en4.d;
import java.util.ArrayList;
import java.util.List;
import kotlin.UInt;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

@StabilityInferred(parameters = 0)
public final class e {
private final boolean a;

@NotNull
private final String b;

@Nullable
private final d c;
private final int d;

public e() {
this(false, null, null, 0, 15, null);
}

@NotNull
public final String a() {
return this.b;
}

@Nullable
public final d b() {
return this.c;
}

/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r1v0 */
/* JADX WARN: Type inference failed for: r1v1 */
/* JADX WARN: Type inference failed for: r1v2 */
/* JADX WARN: Type inference failed for: r1v5, types: [java.util.List] */
/* JADX WARN: Type inference failed for: r1v6, types: [java.util.ArrayList] */
@NotNull
public final List<d> c() { //权限列表,返回值List<ec1.d>
?? r1;
List c;
d dVar = this.c;
if (dVar == null || (c = dVar.c()) == null) {
r1 = 0;
} else {
r1 = new ArrayList();
for (Object obj : c) {
en4.e eVar = (en4.e) obj;
if (!eVar.a() || eVar.d() == UInt.constructor-impl(this.d)) {
r1.add(obj);
}
}
}
if (r1 == 0) {
r1 = CollectionsKt.emptyList();
}
Iterable<en4.e> iterable = (Iterable) r1;
ArrayList arrayList = new ArrayList(CollectionsKt.collectionSizeOrDefault(iterable, 10));
for (en4.e eVar2 : iterable) {
arrayList.add(new d(eVar2.c(), eVar2.d()));
}
return arrayList;
}

public final int d() {
return this.d;
}

public final boolean e() {
return this.a;
}

public boolean equals(@Nullable Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof e)) {
return false;
}
e eVar = (e) obj;
return this.a == eVar.a && Intrinsics.areEqual(this.b, eVar.b) && Intrinsics.areEqual(this.c, eVar.c) && this.d == eVar.d;
}

/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r0v1, types: [int] */
/* JADX WARN: Type inference failed for: r0v8 */
/* JADX WARN: Type inference failed for: r0v9 */
public int hashCode() {
boolean z = this.a;
?? r0 = z;
if (z) {
r0 = 1;
}
int hashCode = ((r0 * 31) + this.b.hashCode()) * 31;
d dVar = this.c;
return ((hashCode + (dVar == null ? 0 : dVar.hashCode())) * 31) + this.d;
}

@NotNull
public String toString() {
return "ActionSheetState(isShowing=" + this.a + ", itemId=" + this.b + ", optionInfo=" + this.c + ", selectedValue=" + this.d + ')';
}

public e(boolean z, @NotNull String str, @Nullable d dVar, int i) {
this.a = z;
this.b = str;
this.c = dVar;
this.d = i;
}

public e(boolean z, String str, d dVar, int i, int i2, DefaultConstructorMarker defaultConstructorMarker) {
this((i2 & 1) != 0 ? false : z, (i2 & 2) != 0 ? "" : str, (i2 & 4) != 0 ? null : dVar, (i2 & 8) != 0 ? 0 : i);
}
}

cc1/a$c

通过符号查找Ldc1/bp,我们得以找到它的上层调用cc1/a$c。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
//
// Decompiled by Jadx - 711ms
//
package cc1;

import androidx.compose.runtime.Composer;
import androidx.compose.runtime.ComposerKt;
import com.tencent.ntcompose.lifecycle.viewmodel.compose.a;
import com.tencent.ntcompose.ui.platform.CompositionLocalsKt;
import dc1.bp;
import ec1.b;
import fi4.c;
import kotlin.Unit;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Lambda;

final class a$c extends Lambda implements Function2<Composer, Integer, Unit> {
final a m;

/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
a$c(a aVar) {
super(2);
this.m = aVar;
}

public Object invoke(Object obj, Object obj2) {
b bVar;
String str;
String str2;
Composer composer = (Composer) obj;
int intValue = ((Number) obj2).intValue();
if ((intValue & 11) == 2 && composer.getSkipping()) {
composer.skipToGroupEnd();
} else {
if (ComposerKt.isTraceInProgress()) {
ComposerKt.traceEventStart(0x064d7cb9, intValue, -1, "com.tencent.hippykotlin.demo.pages.group.qtroop_robot.popView.AIGroupServiceAgreementPage.onCreate.<anonymous> (AIGroupServiceAgreementPage.kt:58)");
}
fi4.b R0 = a.R0(this.m);
b bVar2 = null;
if (R0 == null) {
Intrinsics.throwUninitializedPropertyAccessException("viewModel");
R0 = null;
}
a.b(R0, ((c) composer.consume(CompositionLocalsKt.e())).getLifecycle(), composer, 0);
composer.startReplaceableGroup(-1004680359);
b R02 = a.R0(this.m);
if (R02 == null) {
Intrinsics.throwUninitializedPropertyAccessException("viewModel");
R02 = null;
}
if (R02.N0()) {
b R03 = a.R0(this.m);
if (R03 == null) {
Intrinsics.throwUninitializedPropertyAccessException("viewModel");
bVar = null;
} else {
bVar = R03;
}
b R04 = a.R0(this.m);
if (R04 == null) {
Intrinsics.throwUninitializedPropertyAccessException("viewModel");
R04 = null;
}
en4.b J0 = R04.J0();
if (J0 == null || (str = J0.g()) == null) {
str = "";
}
b R05 = a.R0(this.m);
if (R05 == null) {
Intrinsics.throwUninitializedPropertyAccessException("viewModel");
R05 = null;
}
en4.b J02 = R05.J0();
if (J02 == null || (str2 = J02.d()) == null) {
str2 = "";
}
dc1.a.a(bVar, str, str2, b.m, composer, 3072);
}
composer.endReplaceableGroup();
b R06 = a.R0(this.m); //获取状态值
if (R06 == null) {
Intrinsics.throwUninitializedPropertyAccessException("viewModel");
} else {
bVar2 = R06;
}
bp.a(bVar2.I0(), new d(this.m), new f(this.m), new g(this.m), composer, 8); //调用dc1/bp.a入口
if (ComposerKt.isTraceInProgress()) {
ComposerKt.traceEventEnd();
}
}
return Unit.INSTANCE;
}
}

ec1.b(上面获取状态值的数据类型b)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
//
// Decompiled by Jadx - 604ms
//
package ec1;

import androidx.compose.runtime.MutableState;
import androidx.compose.runtime.SnapshotMutationPolicy;
import androidx.compose.runtime.SnapshotStateKt;
import androidx.compose.runtime.State;
import androidx.compose.runtime.internal.StabilityInferred;
import com.tencent.kuikly.core.log.KLog;
import com.tencent.ntcompose.lifecycle.common.Lifecycle;
import com.tencent.qq.ntkernel.robot.IKernelRobotService;
import en4.c;
import en4.d;
import en4.f;
import fi4.a;
import fy0.jv;
import ii4.g;
import j11.ac;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import kotlin.UInt;
import kotlin.ULong;
import kotlin.Unit;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import q11.e;

@StabilityInferred(parameters = 0)
public final class b extends g implements a {
private final long a;

@NotNull
private final String b;
private final long c;

@NotNull
private final String d;

@NotNull
private final MutableState e = SnapshotStateKt.mutableStateOf$default((Object) null, (SnapshotMutationPolicy) null, 2, (Object) null);

@NotNull
private final MutableState f = SnapshotStateKt.mutableStateOf$default(CollectionsKt.emptyList(), (SnapshotMutationPolicy) null, 2, (Object) null);

@NotNull
private final MutableState g;

@NotNull
private final MutableState h;

@NotNull
private final MutableState i;

@NotNull
private final MutableState j;

@NotNull
private final MutableState k;

@NotNull
private final MutableState l;

//构造函数
public b(
long j, //群号
@NotNull String str, //机器人uid
long j2, //机器人QQ号
@NotNull String str2 //场景值
) {
this.a = j;
this.b = str;
this.c = j2;
this.d = str2;
Boolean bool = Boolean.FALSE;
this.g = SnapshotStateKt.mutableStateOf$default(bool, (SnapshotMutationPolicy) null, 2, (Object) null);
this.h = SnapshotStateKt.mutableStateOf$default(bool, (SnapshotMutationPolicy) null, 2, (Object) null);
this.i = SnapshotStateKt.mutableStateOf$default(new e(false, (String) null, (d) null, 0, 15, (DefaultConstructorMarker) null), (SnapshotMutationPolicy) null, 2, (Object) null);
int i = f.e;
this.j = SnapshotStateKt.mutableStateOf$default(f.a(), (SnapshotMutationPolicy) null, 2, (Object) null);
this.k = SnapshotStateKt.mutableStateOf$default(Boolean.TRUE, (SnapshotMutationPolicy) null, 2, (Object) null);
this.l = SnapshotStateKt.mutableStateOf$default(bool, (SnapshotMutationPolicy) null, 2, (Object) null);
KLog.INSTANCE.i("AIGroupServiceAgreementVM", "ViewModel 初始化完成");
}

public static final void E0(b bVar, en4.b bVar2) {
bVar.e.setValue(bVar2);
}

public static final void F0(b bVar, List list) {
bVar.f.setValue(list);
}

private final void O0(boolean z, boolean z2, Function2<? super Boolean, ? super Boolean, Unit> function2) {
KLog.INSTANCE.i("AIGroupServiceAgreementVM", "setGroupAuth 结果: " + z);
this.h.setValue(Boolean.valueOf(z));
this.g.setValue(Boolean.FALSE);
if (!z) {
ac.a.f(ac.g, "授权设置失败,请稍后重试", jv.Warning, (e) null, 4, (Object) null);
}
function2.invoke(Boolean.valueOf(z), Boolean.valueOf(z2));
}

public final void G0() {
this.j.setValue(f.a());
}

public final void H0() {
try {
en4.a aVar = new en4.a(0L, (String) null, 0L, (String) null, 0, false, false, 127, (DefaultConstructorMarker) null);
aVar.j(ULong.constructor-impl(this.a));
aVar.h(this.b);
aVar.i(ULong.constructor-impl(this.c));
aVar.k("");
aVar.l(2);
aVar.m(true);
IKernelRobotService.d.a().q(aVar, new a(this));
} catch (Exception e) {
KLog.INSTANCE.e("AIGroupServiceAgreementVM", "fetchAuthDetailInfo error: " + e.getMessage());
}
}

@NotNull
public final e I0() {
return (e) this.i.getValue();
}

@Nullable
public final en4.b J0() {
return (en4.b) this.e.getValue();
}

@NotNull
public final f K0() {
return (f) this.j.getValue();
}

public final boolean L0() {
List<c> M0 = M0();
if ((M0 instanceof Collection) && M0.isEmpty()) {
return false;
}
for (c cVar : M0) {
if (cVar.a() || cVar.f() == 1) {
return true;
}
}
return false;
}

@NotNull
public final List<c> M0() { //权限列表
return (List) this.f.getValue();
}

public final boolean N0() {
return ((Boolean) this.k.getValue()).booleanValue();
}

public final void P0() {
this.i.setValue(new e(false, (String) null, (d) null, 0, 15, (DefaultConstructorMarker) null));
}

public final void Q0() {
this.j.setValue(f.b(K0(), false, (String) null, (String) null, 6, (Object) null));
}

////状态值获取
public final boolean R0() {
return ((Boolean) this.h.getValue()).booleanValue();
}

public final boolean S0() {
return ((Boolean) this.g.getValue()).booleanValue();
}

public final void T0() {
this.k.setValue(Boolean.TRUE);
}

public final void U0(int i) {
e I0 = I0();
String a = I0.a();
d b = I0.b();
String a2 = b != null ? b.a() : null;
if (a2 == null) {
a2 = "";
}
List<c> M0 = M0();
ArrayList arrayList = new ArrayList(CollectionsKt.collectionSizeOrDefault(M0, 10));
for (c cVar : M0) {
if (Intrinsics.areEqual(cVar.c(), a)) {
for (d dVar : cVar.d()) {
if (Intrinsics.areEqual(dVar.a(), a2)) {
dVar.h(UInt.constructor-impl(i));
}
}
}
arrayList.add(cVar);
}
this.f.setValue(arrayList);
KLog.INSTANCE.i("AIGroupServiceAgreementVM", "权限 [" + a + "] 选项 [" + a2 + "] 更新为: " + i);
P0();
}

//////开始准备发包
public final void V0(@NotNull Function2<? super Boolean, ? super Boolean, Unit> function2) {
if (S0()) {
KLog.INSTANCE.i("AIGroupServiceAgreementVM", "请求正在处理中,忽略重复点击");
return;
}
if (!(com.tencent.kuikly.core.manager.d.a.i().L0("QQKuiklyPlatformApi").z() != ac.b.NOT_REACHABLE)) {
ac.a.f(ac.g, "网络连接不可用,请稍后重试", jv.Warning, (e) null, 4, (Object) null);
return;
}
this.g.setValue(Boolean.TRUE);
boolean L0 = L0();
KLog kLog = KLog.INSTANCE;
StringBuilder sb = new StringBuilder("用户同意授权, groupCode: ");
long j = this.a;
sb.append(j);
sb.append(", botUid: ");
String str = this.b;
sb.append(str);
kLog.i("AIGroupServiceAgreementVM", sb.toString());
for (c cVar : M0()) {
String joinToString$default = CollectionsKt.joinToString$default(cVar.d(), (CharSequence) null, (CharSequence) null, (CharSequence) null, 0, (CharSequence) null, c.m, 31, (Object) null);
KLog.INSTANCE.i("AIGroupServiceAgreementVM", "权限 [" + cVar.c() + "]: switch=" + cVar.a() + ", options=[" + joinToString$default + ']');
}
try {
f fVar = new f(
0L,
(String) null,
0L, (List) null,
(String) null,
31,
(DefaultConstructorMarker) null
); //创建发包对象en4.f
fVar.h(ULong.constructor-impl(j)); //groupCode群号
fVar.f(str); //botUid机器人uid
fVar.g(ULong.constructor-impl(this.c)); //botUin机器人QQ号
fVar.j(this.d); //scene场景值
fVar.i(M0()); //权限列表,实质上是this.f.getValue()
IKernelRobotService.d.a().s(fVar, new a(this, L0, function2)); ////////调用内核对接方法发包
} catch (Exception e) {
KLog.INSTANCE.e("AIGroupServiceAgreementVM", "setGroupAuth 异常: " + e.getMessage());
O0(false, L0, function2);
}
}

public final boolean W0() {
State state = this.l;
if (!((Boolean) state.getValue()).booleanValue()) {
return true;
}
Boolean bool = Boolean.FALSE;
this.k.setValue(bool);
state.setValue(bool);
return false;
}

public final void X0(@NotNull c cVar) {
d dVar = (d) CollectionsKt.firstOrNull(cVar.d());
if (dVar == null || dVar.c().isEmpty()) {
return;
}
this.i.setValue(new e(true, cVar.c(), dVar, dVar.d()));
this.l.setValue(Boolean.TRUE);
}

public final void Y0() {
en4.b J0 = J0();
String c = J0 != null ? J0.c() : null;
if (c == null) {
c = "";
}
en4.b J02 = J0();
String b = J02 != null ? J02.b() : null;
this.j.setValue(new f(true, c, b != null ? b : ""));
}

public final void Z0(@NotNull String str, boolean z) {
List<c> M0 = M0();
ArrayList arrayList = new ArrayList(CollectionsKt.collectionSizeOrDefault(M0, 10));
for (c cVar : M0) {
if (Intrinsics.areEqual(cVar.c(), str)) {
c cVar2 = new c((String) null, (String) null, (String) null, 0, false, (List) null, 63, (DefaultConstructorMarker) null);
cVar2.i(cVar.c());
cVar2.k(cVar.e());
cVar2.h(cVar.b());
cVar2.g(z);
cVar2.j(cVar.d());
cVar2.l(cVar.f());
cVar = cVar2;
}
arrayList.add(cVar);
}
this.f.setValue(arrayList);
KLog.INSTANCE.i("AIGroupServiceAgreementVM", "权限 [" + str + "] 开关状态: " + z);
}

protected void onCleared() {
super.onCleared();
KLog.INSTANCE.d("AIGroupServiceAgreementVM", "ViewModel 已清理");
}

public void y(@NotNull fi4.c cVar, @NotNull Lifecycle.Event event) {
KLog.INSTANCE.d("AIGroupServiceAgreementVM", "生命周期状态变化: " + event.name());
}
}

别忘了还有cc1/a 这个类,里面包含包体参数规则:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//
// Decompiled by Jadx - 494ms
//
package cc1;

import androidx.compose.runtime.CompositionContext;
import androidx.compose.runtime.internal.ComposableLambdaKt;
import androidx.compose.runtime.internal.StabilityInferred;
import com.tencent.kuikly.core.log.KLog;
import com.tencent.kuikly.core.manager.d;
import com.tencent.kuikly.core.module.Module;
import ez0.b;
import java.util.Map;
import kotlin.text.StringsKt;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

@StabilityInferred(parameters = 0)
public final class a extends b {
private long u;
private long w;
private ec1.b y;

@NotNull
private String v = "";

@NotNull
private String x = "";

@Nullable
public Map<String, Module> Q() {
z0("KTIKernelGroupService", new a());
z0("KTIKernelRobotService", new b());
return super.Q();
}

public void j0(@Nullable com.tencent.ntcompose.activity.a aVar) {
super.j0(aVar);
d.a.i().L0("QQKuiklyPlatformApi").R(true);
//群号
Long longOrNull = StringsKt.toLongOrNull(d().r().p("groupCode"));
this.u = longOrNull != null ? longOrNull.longValue() : 0L;
//机器人uid
this.v = d().r().p("botUid");
//机器人QQ号
Long longOrNull2 = StringsKt.toLongOrNull(d().r().p("botUin"));
this.w = longOrNull2 != null ? longOrNull2.longValue() : 0L;
//场景
Integer intOrNull = StringsKt.toIntOrNull(d().r().p("callbackCode"));
if (intOrNull != null) {
intOrNull.intValue();
}
this.x = d().r().p("scene");


KLog.INSTANCE.i("AIGroupServiceAgreementPage", "parseParams: params=" + d().r());
ec1.b bVar = new ec1.b(this.u, this.v, this.w, this.x); //传给ec1.b构造函数里面
this.y = bVar;
bVar.H0();
com.tencent.ntcompose.activity.d.c(this, (CompositionContext) null, ComposableLambdaKt.composableLambdaInstance(0x064d7cb9, true, new c(this)), 1, (Object) null);
}
}

en4.f(发包对象)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
//
// Decompiled by Jadx - 449ms
//
package en4;

import androidx.compose.runtime.internal.StabilityInferred;
import java.util.List;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.internal.DefaultConstructorMarker;
import org.jetbrains.annotations.NotNull;

@StabilityInferred(parameters = 0)
public final class f {
private long a;

@NotNull
private String b;
private long c;

@NotNull
private List<c> d;

@NotNull
private String e;

public f(long j, String str, long j2, List list, String str2, int i, DefaultConstructorMarker defaultConstructorMarker) {
j = (i & 1) != 0 ? 0L : j;
str = (i & 2) != 0 ? "" : str;
j2 = (i & 4) != 0 ? 0L : j2;
list = (i & 8) != 0 ? CollectionsKt.emptyList() : list;
str2 = (i & 16) != 0 ? "" : str2;
this.a = j;
this.b = str;
this.c = j2;
this.d = list;
this.e = str2;
}

@NotNull
public final String a() {
return this.b;
}

public final long b() {
return this.c;
}

public final long c() {
return this.a;
}

@NotNull
public final List<c> d() {
return this.d;
}

@NotNull
public final String e() {
return this.e;
}

public final void f(@NotNull String str) { //机器人uid
this.b = str;
}

public final void g(long j) { //机器人QQ号
this.c = j;
}

public final void h(long j) { //群号
this.a = j;
}

public final void i(@NotNull List<c> list) { //权限列表
this.d = list;
}

public final void j(@NotNull String str) { //场景值
this.e = str;
}
}

权限项本体en4.c

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
//
// Decompiled by Jadx - 738ms
//
package en4;

import androidx.compose.runtime.internal.StabilityInferred;
import java.util.List;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.internal.DefaultConstructorMarker;
import org.jetbrains.annotations.NotNull;

@StabilityInferred(parameters = 0)
public final class c {

@NotNull
private String a;

@NotNull
private String b;

@NotNull
private String c;
private int d;
private boolean e;

@NotNull
private List<d> f;

public c() {
this(null, null, null, 0, false, null, 63, null);
}

public final boolean a() {
return this.e;
}

@NotNull
public final String b() {
return this.c;
}

@NotNull
public final String c() {
return this.a;
}

@NotNull
public final List<d> d() {
return this.f;
}

@NotNull
public final String e() {
return this.b;
}

public final int f() {
return this.d;
}

public final void g(boolean z) {
this.e = z;
}

public final void h(@NotNull String str) {
this.c = str;
}

public final void i(@NotNull String str) {
this.a = str;
}

public final void j(@NotNull List<d> list) {
this.f = list;
}

public final void k(@NotNull String str) {
this.b = str;
}

public final void l(int i) {
this.d = i;
}

public c(String str, String str2, String str3, int i, boolean z, List list, int i2, DefaultConstructorMarker defaultConstructorMarker) {
str = (i2 & 1) != 0 ? "" : str;
str2 = (i2 & 2) != 0 ? "" : str2;
str3 = (i2 & 4) != 0 ? "" : str3;
i = (i2 & 8) != 0 ? 0 : i;
z = (i2 & 16) != 0 ? false : z;
list = (i2 & 32) != 0 ? CollectionsKt.emptyList() : list;
this.a = str;
this.b = str2;
this.c = str3;
this.d = i;
this.e = z;
this.f = list;
}
}

IKernelRobotService

终于啊,遇到一个名字没混淆的了。这个算是之前的一个最终调用类。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
//
// Decompiled by Jadx - 922ms
//
package com.tencent.qq.ntkernel.robot;

import androidx.compose.runtime.internal.StabilityInferred;
import cn4.s;
import com.tencent.kuikly.core.module.Module;
import dn4.b;
import en4.c;
import en4.d;
import en4.f;
import fn4.e;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import jm4.a;
import kotlin.ULong;
import kotlin.Unit;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.ArrayIteratorKt;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.StringsKt;
import kotlin.text.UStringsKt;
import org.jetbrains.annotations.NotNull;

@StabilityInferred(parameters = 0)
public final class IKernelRobotService extends Module {

@NotNull
public static final Companion d = new Companion((DefaultConstructorMarker) null);

@NotNull
private final Map<ae, Function1<Object, Unit>> c = new LinkedHashMap();

public final void A(@NotNull e eVar, @NotNull aa aaVar) {
String str;
ArrayList arrayList = new ArrayList();
ArrayList arrayList2 = new ArrayList();
arrayList2.add("groupCode");
long a = eVar.a();
if (a == 0) {
str = "0";
} else if (a > 0) {
str = Long.toString(a, 10);
} else {
char[] cArr = new char[64];
long j = (a >>> 1) / 5;
long j2 = 10;
int i = 63;
cArr[63] = Character.forDigit((int) (a - (j * j2)), 10);
while (j > 0) {
i--;
cArr[i] = Character.forDigit((int) (j % j2), 10);
j /= j2;
}
str = new String(cArr, i, 64 - i);
}
arrayList2.add(str);
Object[] array = arrayList2.toArray(new Object[0]);
Intrinsics.checkNotNull(array, "null cannot be cast to non-null type kotlin.Array<T of kotlin.collections.ArraysKt__ArraysJVMKt.toTypedArray>");
arrayList.add(Integer.valueOf(array.length));
CollectionsKt.addAll(arrayList, array);
arrayList.add(String.valueOf(aaVar.hashCode()));
getGroupRobotListForInvite.kernelCallback.1 r1 = new getGroupRobotListForInvite.kernelCallback.1(aaVar);
Object[] array2 = arrayList.toArray(new Object[0]);
Intrinsics.checkNotNull(array2, "null cannot be cast to non-null type kotlin.Array<T of kotlin.collections.ArraysKt__ArraysJVMKt.toTypedArray>");
l(true, "getGroupRobotListForInvite", array2, r1);
}

public final void B(@NotNull j jVar, @NotNull ac acVar) {
ArrayList arrayList = new ArrayList();
ArrayList arrayList2 = new ArrayList();
arrayList2.add("botUin");
arrayList2.add(String.valueOf(jVar.a()));
arrayList2.add("position");
arrayList2.add(Integer.valueOf(jVar.b()));
Object[] array = arrayList2.toArray(new Object[0]);
Intrinsics.checkNotNull(array, "null cannot be cast to non-null type kotlin.Array<T of kotlin.collections.ArraysKt__ArraysJVMKt.toTypedArray>");
arrayList.add(Integer.valueOf(array.length));
CollectionsKt.addAll(arrayList, array);
arrayList.add(String.valueOf(acVar.hashCode()));
getRedDot.kernelCallback.1 r1 = new getRedDot.kernelCallback.1(acVar);
Object[] array2 = arrayList.toArray(new Object[0]);
Intrinsics.checkNotNull(array2, "null cannot be cast to non-null type kotlin.Array<T of kotlin.collections.ArraysKt__ArraysJVMKt.toTypedArray>");
l(true, "getRedDot", array2, r1);
}

public final void C(long j) {
String str;
ArrayList arrayList = new ArrayList();
if (j == 0) {
str = "0";
} else if (j > 0) {
str = Long.toString(j, 10);
} else {
char[] cArr = new char[64];
long j2 = (j >>> 1) / 5;
long j3 = 10;
int i = 63;
cArr[63] = Character.forDigit((int) (j - (j2 * j3)), 10);
while (j2 > 0) {
i--;
cArr[i] = Character.forDigit((int) (j2 % j3), 10);
j2 /= j3;
}
str = new String(cArr, i, 64 - i);
}
arrayList.add(str);
Object[] array = arrayList.toArray(new Object[0]);
Intrinsics.checkNotNull(array, "null cannot be cast to non-null type kotlin.Array<T of kotlin.collections.ArraysKt__ArraysJVMKt.toTypedArray>");
k("removeKernelRobotListener", array, (Function1) null);
((LinkedHashMap) this.c).clear();
}

public final void D(@NotNull s sVar, @NotNull a aVar) {
ArrayList arrayList = new ArrayList();
ArrayList arrayList2 = new ArrayList();
arrayList2.add("modelId");
arrayList2.add(sVar.b());
arrayList2.add("uid");
arrayList2.add(sVar.c());
arrayList2.add("buttonIds");
arrayList2.add(Integer.valueOf(sVar.a().size()));
arrayList2.addAll(sVar.a());
arrayList2.add("unSelectedbtnIds");
arrayList2.add(Integer.valueOf(sVar.d().size()));
arrayList2.addAll(sVar.d());
Object[] array = arrayList2.toArray(new Object[0]);
Intrinsics.checkNotNull(array, "null cannot be cast to non-null type kotlin.Array<T of kotlin.collections.ArraysKt__ArraysJVMKt.toTypedArray>");
arrayList.add(Integer.valueOf(array.length));
CollectionsKt.addAll(arrayList, array);
arrayList.add(String.valueOf(aVar.hashCode()));
saveSelectedAIModelOrOptIds.kernelCallback.1 r1 = new saveSelectedAIModelOrOptIds.kernelCallback.1(aVar);
Object[] array2 = arrayList.toArray(new Object[0]);
Intrinsics.checkNotNull(array2, "null cannot be cast to non-null type kotlin.Array<T of kotlin.collections.ArraysKt__ArraysJVMKt.toTypedArray>");
l(true, "saveSelectedAIModelOrOptIds", array2, r1);
}

public final void E(@NotNull bm bmVar, @NotNull v vVar) {
String str;
String str2;
String str3;
String str4;
ArrayList arrayList = new ArrayList();
ArrayList arrayList2 = new ArrayList();
arrayList2.add("botAppId");
long b = bmVar.b();
String str5 = "0";
if (b == 0) {
str2 = "0";
str = str2;
} else if (b > 0) {
str2 = Long.toString(b, 10);
str = "0";
} else {
char[] cArr = new char[64];
long j = (b >>> 1) / 5;
long j2 = 10;
cArr[63] = Character.forDigit((int) (b - (j * j2)), 10);
int i = 63;
while (j > 0) {
i--;
cArr[i] = Character.forDigit((int) (j % j2), 10);
j /= j2;
str5 = str5;
}
str = str5;
str2 = new String(cArr, i, 64 - i);
}
arrayList2.add(str2);
arrayList2.add("botUin");
long d2 = bmVar.d();
if (d2 == 0) {
str3 = str;
} else if (d2 > 0) {
str3 = Long.toString(d2, 10);
} else {
char[] cArr2 = new char[64];
long j3 = (d2 >>> 1) / 5;
long j4 = 10;
cArr2[63] = Character.forDigit((int) (d2 - (j3 * j4)), 10);
int i2 = 63;
while (j3 > 0) {
i2--;
cArr2[i2] = Character.forDigit((int) (j3 % j4), 10);
j3 /= j4;
}
str3 = new String(cArr2, i2, 64 - i2);
}
arrayList2.add(str3);
arrayList2.add("callbackData");
arrayList2.add(bmVar.g());
arrayList2.add("c2cUin");
long e = bmVar.e();
if (e == 0) {
str4 = str;
} else if (e > 0) {
str4 = Long.toString(e, 10);
} else {
char[] cArr3 = new char[64];
long j5 = (e >>> 1) / 5;
long j6 = 10;
int i3 = 63;
cArr3[63] = Character.forDigit((int) (e - (j5 * j6)), 10);
while (j5 > 0) {
i3--;
cArr3[i3] = Character.forDigit((int) (j5 % j6), 10);
j5 /= j6;
}
str4 = new String(cArr3, i3, 64 - i3);
}
arrayList2.add(str4);
arrayList2.add("chatType");
arrayList2.add(Long.toString(bmVar.h() & 4294967295L, 10));
arrayList2.add("botUid");
arrayList2.add(bmVar.c());
arrayList2.add("action");
arrayList2.add(Integer.valueOf(bmVar.a()));
arrayList2.add("callBackType");
arrayList2.add(Integer.valueOf(bmVar.f()));
Object[] array = arrayList2.toArray(new Object[0]);
Intrinsics.checkNotNull(array, "null cannot be cast to non-null type kotlin.Array<T of kotlin.collections.ArraysKt__ArraysJVMKt.toTypedArray>");
arrayList.add(Integer.valueOf(array.length));
CollectionsKt.addAll(arrayList, array);
arrayList.add(String.valueOf(vVar.hashCode()));
selectAIModel.kernelCallback.1 r1 = new selectAIModel.kernelCallback.1(vVar);
Object[] array2 = arrayList.toArray(new Object[0]);
Intrinsics.checkNotNull(array2, "null cannot be cast to non-null type kotlin.Array<T of kotlin.collections.ArraysKt__ArraysJVMKt.toTypedArray>");
l(true, "selectAIModel", array2, r1);
}

@NotNull
public String h() {
return "KTIKernelRobotService";
}

public final void q(@NotNull en4.a aVar, @NotNull y yVar) {
String str;
String str2;
String str3;
ArrayList arrayList = new ArrayList();
ArrayList arrayList2 = new ArrayList();
arrayList2.add("groupCode");
long c = aVar.c();
if (c == 0) {
str2 = "0";
str = str2;
} else if (c > 0) {
str2 = Long.toString(c, 10);
str = "0";
} else {
char[] cArr = new char[64];
str = "0";
long j = (c >>> 1) / 5;
long j2 = 10;
cArr[63] = Character.forDigit((int) (c - (j * j2)), 10);
int i = 63;
while (j > 0) {
i--;
cArr[i] = Character.forDigit((int) (j % j2), 10);
j /= j2;
}
str2 = new String(cArr, i, 64 - i);
}
arrayList2.add(str2);
arrayList2.add("botUid");
arrayList2.add(aVar.a());
arrayList2.add("botUin");
long b = aVar.b();
if (b == 0) {
str3 = str;
} else if (b > 0) {
str3 = Long.toString(b, 10);
} else {
char[] cArr2 = new char[64];
long j3 = (b >>> 1) / 5;
long j4 = 10;
cArr2[63] = Character.forDigit((int) (b - (j3 * j4)), 10);
int i2 = 63;
for (long j5 = 0; j3 > j5; j5 = 0) {
i2--;
cArr2[i2] = Character.forDigit((int) (j3 % j4), 10);
j3 /= j4;
}
str3 = new String(cArr2, i2, 64 - i2);
}
arrayList2.add(str3);
arrayList2.add("param");
arrayList2.add(aVar.e());
arrayList2.add("scene");
arrayList2.add(Integer.valueOf(aVar.f()));
arrayList2.add("useLocalTmpCacheFirst");
arrayList2.add(Integer.valueOf(aVar.g() ? 1 : 0));
arrayList2.add("needAddToLocalTmpCache");
arrayList2.add(Integer.valueOf(aVar.d() ? 1 : 0));
Object[] array = arrayList2.toArray(new Object[0]);
Intrinsics.checkNotNull(array, "null cannot be cast to non-null type kotlin.Array<T of kotlin.collections.ArraysKt__ArraysJVMKt.toTypedArray>");
arrayList.add(Integer.valueOf(array.length));
CollectionsKt.addAll(arrayList, array);
arrayList.add(String.valueOf(yVar.hashCode()));
GetGroupRobotAuthListDetail.kernelCallback.1 r1 = new GetGroupRobotAuthListDetail.kernelCallback.1(yVar);
Object[] array2 = arrayList.toArray(new Object[0]);
Intrinsics.checkNotNull(array2, "null cannot be cast to non-null type kotlin.Array<T of kotlin.collections.ArraysKt__ArraysJVMKt.toTypedArray>");
l(true, "GetGroupRobotAuthListDetail", array2, r1);
}

public final void r(@NotNull km4.a aVar, @NotNull ad adVar) {
String str;
String str2;
long j;
String str3;
ArrayList arrayList = new ArrayList();
ArrayList arrayList2 = new ArrayList();
arrayList2.add("groupCode");
long b = aVar.b();
long j2 = 0;
int i = 64;
if (b == 0) {
str2 = "0";
str = str2;
} else if (b > 0) {
str2 = Long.toString(b, 10);
str = "0";
} else {
char[] cArr = new char[64];
str = "0";
long j3 = (b >>> 1) / 5;
long j4 = 10;
cArr[63] = Character.forDigit((int) (b - (j3 * j4)), 10);
int i2 = 63;
while (j3 > 0) {
i2--;
cArr[i2] = Character.forDigit((int) (j3 % j4), 10);
j3 /= j4;
}
str2 = new String(cArr, i2, 64 - i2);
}
arrayList2.add(str2);
arrayList2.add("botUins");
arrayList2.add(Integer.valueOf(aVar.a().size()));
List a = aVar.a();
ArrayList arrayList3 = new ArrayList(CollectionsKt.collectionSizeOrDefault(a, 10));
Iterator it = a.iterator();
while (it.hasNext()) {
long j5 = ((ULong) it.next()).unbox-impl();
if (j5 == j2) {
str3 = str;
} else if (j5 > j2) {
str3 = Long.toString(j5, 10);
} else {
char[] cArr2 = new char[i];
long j6 = (j5 >>> 1) / 5;
long j7 = 10;
cArr2[63] = Character.forDigit((int) (j5 - (j6 * j7)), 10);
int i3 = 63;
j = 0;
while (j6 > 0) {
i3--;
cArr2[i3] = Character.forDigit((int) (j6 % j7), 10);
j6 /= j7;
}
str3 = new String(cArr2, i3, 64 - i3);
arrayList3.add(str3);
j2 = j;
i = 64;
}
j = j2;
arrayList3.add(str3);
j2 = j;
i = 64;
}
arrayList2.addAll(arrayList3);
arrayList2.add("mainSrcId");
arrayList2.add(Long.toString(aVar.c() & 4294967295L, 10));
arrayList2.add("subSrcId");
arrayList2.add(Long.toString(aVar.d() & 4294967295L, 10));
Object[] array = arrayList2.toArray(new Object[0]);
Intrinsics.checkNotNull(array, "null cannot be cast to non-null type kotlin.Array<T of kotlin.collections.ArraysKt__ArraysJVMKt.toTypedArray>");
arrayList.add(Integer.valueOf(array.length));
CollectionsKt.addAll(arrayList, array);
arrayList.add(String.valueOf(adVar.hashCode()));
InviteRobotToGroup.kernelCallback.1 r1 = new InviteRobotToGroup.kernelCallback.1(adVar);
Object[] array2 = arrayList.toArray(new Object[0]);
Intrinsics.checkNotNull(array2, "null cannot be cast to non-null type kotlin.Array<T of kotlin.collections.ArraysKt__ArraysJVMKt.toTypedArray>");
l(true, "InviteRobotToGroup", array2, r1);
}

public final void s(@NotNull f fVar, @NotNull af afVar) {
String str;
String str2;
String str3;
ArrayList arrayList = new ArrayList();
ArrayList arrayList2 = new ArrayList();
arrayList2.add("groupCode");
long c = fVar.c();
if (c == 0) {
str2 = "0";
str = str2;
} else if (c > 0) {
str2 = Long.toString(c, 10);
str = "0";
} else {
char[] cArr = new char[64];
str = "0";
long j = (c >>> 1) / 5;
long j2 = 10;
cArr[63] = Character.forDigit((int) (c - (j * j2)), 10);
int i = 63;
while (j > 0) {
i--;
cArr[i] = Character.forDigit((int) (j % j2), 10);
j /= j2;
}
str2 = new String(cArr, i, 64 - i);
}
arrayList2.add(str2);
arrayList2.add("botUid");
arrayList2.add(fVar.a());
arrayList2.add("botUin");
long b = fVar.b();
if (b == 0) {
str3 = str;
} else if (b > 0) {
str3 = Long.toString(b, 10);
} else {
char[] cArr2 = new char[64];
long j3 = (b >>> 1) / 5;
long j4 = 10;
cArr2[63] = Character.forDigit((int) (b - (j3 * j4)), 10);
int i2 = 63;
for (long j5 = 0; j3 > j5; j5 = 0) {
i2--;
cArr2[i2] = Character.forDigit((int) (j3 % j4), 10);
j3 /= j4;
}
str3 = new String(cArr2, i2, 64 - i2);
}
arrayList2.add(str3);
arrayList2.add("items");
arrayList2.add(Integer.valueOf(fVar.d().size()));
for (c cVar : fVar.d()) {
ArrayList arrayList3 = new ArrayList();
arrayList3.add("id");
arrayList3.add(cVar.c());
arrayList3.add("title");
arrayList3.add(cVar.e());
arrayList3.add("desc");
arrayList3.add(cVar.b());
arrayList3.add("valueType");
arrayList3.add(Integer.valueOf(cVar.f()));
arrayList3.add("boolSwitch");
arrayList3.add(Integer.valueOf(cVar.a() ? 1 : 0));
arrayList3.add("options");
arrayList3.add(Integer.valueOf(cVar.d().size()));
for (d dVar : cVar.d()) {
ArrayList arrayList4 = new ArrayList();
arrayList4.add("id");
arrayList4.add(dVar.a());
arrayList4.add("name");
arrayList4.add(dVar.b());
arrayList4.add("value");
arrayList4.add(Long.toString(dVar.d() & 4294967295L, 10));
arrayList4.add("selectList");
arrayList4.add(Integer.valueOf(dVar.c().size()));
for (en4.e eVar : dVar.c()) {
ArrayList arrayList5 = new ArrayList();
arrayList5.add("name");
arrayList5.add(eVar.b());
arrayList5.add("showName");
arrayList5.add(eVar.c());
arrayList5.add("value");
ArrayList arrayList6 = arrayList3;
arrayList5.add(Long.toString(eVar.d() & 4294967295L, 10));
arrayList5.add("disable");
arrayList5.add(Integer.valueOf(eVar.a() ? 1 : 0));
Object[] array = arrayList5.toArray(new Object[0]);
Intrinsics.checkNotNull(array, "null cannot be cast to non-null type kotlin.Array<T of kotlin.collections.ArraysKt__ArraysJVMKt.toTypedArray>");
arrayList4.add(Integer.valueOf(array.length));
CollectionsKt.addAll(arrayList4, array);
arrayList3 = arrayList6;
}
ArrayList arrayList7 = arrayList3;
Object[] array2 = arrayList4.toArray(new Object[0]);
Intrinsics.checkNotNull(array2, "null cannot be cast to non-null type kotlin.Array<T of kotlin.collections.ArraysKt__ArraysJVMKt.toTypedArray>");
arrayList7.add(Integer.valueOf(array2.length));
CollectionsKt.addAll(arrayList7, array2);
arrayList3 = arrayList7;
}
Object[] array3 = arrayList3.toArray(new Object[0]);
Intrinsics.checkNotNull(array3, "null cannot be cast to non-null type kotlin.Array<T of kotlin.collections.ArraysKt__ArraysJVMKt.toTypedArray>");
arrayList2.add(Integer.valueOf(array3.length));
CollectionsKt.addAll(arrayList2, array3);
}
arrayList2.add("source");
arrayList2.add(fVar.e());
Object[] array4 = arrayList2.toArray(new Object[0]);
Intrinsics.checkNotNull(array4, "null cannot be cast to non-null type kotlin.Array<T of kotlin.collections.ArraysKt__ArraysJVMKt.toTypedArray>");
arrayList.add(Integer.valueOf(array4.length));
CollectionsKt.addAll(arrayList, array4);
arrayList.add(String.valueOf(afVar.hashCode()));
SetGroupRobotAuth.kernelCallback.1 r1 = new SetGroupRobotAuth.kernelCallback.1(afVar);
Object[] array5 = arrayList.toArray(new Object[0]);
Intrinsics.checkNotNull(array5, "null cannot be cast to non-null type kotlin.Array<T of kotlin.collections.ArraysKt__ArraysJVMKt.toTypedArray>");
l(true, "SetGroupRobotAuth", array5, r1);
}

public final void t(@NotNull aw awVar, @NotNull u uVar) {
String str;
ArrayList arrayList = new ArrayList();
ArrayList arrayList2 = new ArrayList();
arrayList2.add("robotUin");
long b = awVar.b();
if (b == 0) {
str = "0";
} else if (b > 0) {
str = Long.toString(b, 10);
} else {
char[] cArr = new char[64];
long j = (b >>> 1) / 5;
long j2 = 10;
int i = 63;
cArr[63] = Character.forDigit((int) (b - (j * j2)), 10);
while (j > 0) {
i--;
cArr[i] = Character.forDigit((int) (j % j2), 10);
j /= j2;
}
str = new String(cArr, i, 64 - i);
}
arrayList2.add(str);
arrayList2.add("robotUid");
arrayList2.add(awVar.a());
Object[] array = arrayList2.toArray(new Object[0]);
Intrinsics.checkNotNull(array, "null cannot be cast to non-null type kotlin.Array<T of kotlin.collections.ArraysKt__ArraysJVMKt.toTypedArray>");
arrayList.add(Integer.valueOf(array.length));
CollectionsKt.addAll(arrayList, array);
arrayList.add(String.valueOf(uVar.hashCode()));
addFriend.kernelCallback.1 r1 = new addFriend.kernelCallback.1(uVar);
Object[] array2 = arrayList.toArray(new Object[0]);
Intrinsics.checkNotNull(array2, "null cannot be cast to non-null type kotlin.Array<T of kotlin.collections.ArraysKt__ArraysJVMKt.toTypedArray>");
l(true, "addFriend", array2, r1);
}

public final long u(@NotNull ae aeVar) {
ArrayList arrayList = new ArrayList();
arrayList.add(String.valueOf(aeVar.hashCode()));
Function1<Object, Unit> function1 = new addKernelRobotListener.kernelRobotListener.1<>(aeVar);
Object[] array = arrayList.toArray(new Object[0]);
Intrinsics.checkNotNull(array, "null cannot be cast to non-null type kotlin.Array<T of kotlin.collections.ArraysKt__ArraysJVMKt.toTypedArray>");
Object l = l(true, "addKernelRobotListener", array, function1);
this.c.put(aeVar, function1);
Intrinsics.checkNotNull(l, "null cannot be cast to non-null type kotlin.String");
String str = (String) l;
if (str.length() == 0) {
return 0L;
}
return StringsKt.startsWith$default(str, "-", false, 2, (Object) null) ? ULong.constructor-impl(Long.parseLong(str)) : UStringsKt.toULong(str);
}

public final void v(@NotNull i iVar, @NotNull w wVar) {
ArrayList arrayList = new ArrayList();
ArrayList arrayList2 = new ArrayList();
arrayList2.add("botUin");
arrayList2.add(String.valueOf(iVar.a()));
arrayList2.add("position");
arrayList2.add(Integer.valueOf(iVar.c()));
arrayList2.add("sessionId");
arrayList2.add(iVar.d());
arrayList2.add("msgId");
if (iVar.b() != null) {
ak b = iVar.b();
Intrinsics.checkNotNull(b);
ArrayList arrayList3 = new ArrayList();
arrayList3.add("ntSeq");
arrayList3.add(String.valueOf(b.b()));
arrayList3.add("msgRand");
arrayList3.add(String.valueOf(b.a()));
arrayList3.add("srcTime");
arrayList3.add(String.valueOf(b.c()));
Object[] array = arrayList3.toArray(new Object[0]);
Intrinsics.checkNotNull(array, "null cannot be cast to non-null type kotlin.Array<T of kotlin.collections.ArraysKt__ArraysJVMKt.toTypedArray>");
arrayList2.add(Integer.valueOf(array.length));
CollectionsKt.addAll(arrayList2, array);
} else {
arrayList2.add(new byte[0]);
}
Object[] array2 = arrayList2.toArray(new Object[0]);
Intrinsics.checkNotNull(array2, "null cannot be cast to non-null type kotlin.Array<T of kotlin.collections.ArraysKt__ArraysJVMKt.toTypedArray>");
arrayList.add(Integer.valueOf(array2.length));
CollectionsKt.addAll(arrayList, array2);
arrayList.add(String.valueOf(wVar.hashCode()));
delRedDot.kernelCallback.1 r8 = new delRedDot.kernelCallback.1(wVar);
Object[] array3 = arrayList.toArray(new Object[0]);
Intrinsics.checkNotNull(array3, "null cannot be cast to non-null type kotlin.Array<T of kotlin.collections.ArraysKt__ArraysJVMKt.toTypedArray>");
l(true, "delRedDot", array3, r8);
}

public final void w(@NotNull n nVar, @NotNull ab abVar) {
String str;
String str2;
String str3;
ArrayList arrayList = new ArrayList();
ArrayList arrayList2 = new ArrayList();
arrayList2.add("robotUin");
long f = nVar.f();
if (f == 0) {
str2 = "0";
str = str2;
} else if (f > 0) {
str2 = Long.toString(f, 10);
str = "0";
} else {
char[] cArr = new char[64];
str = "0";
long j = (f >>> 1) / 5;
long j2 = 10;
cArr[63] = Character.forDigit((int) (f - (j * j2)), 10);
int i = 63;
while (j > 0) {
i--;
cArr[i] = Character.forDigit((int) (j % j2), 10);
j /= j2;
}
str2 = new String(cArr, i, 64 - i);
}
arrayList2.add(str2);
arrayList2.add("groupId");
long c = nVar.c();
if (c == 0) {
str3 = str;
} else if (c > 0) {
str3 = Long.toString(c, 10);
} else {
char[] cArr2 = new char[64];
long j3 = (c >>> 1) / 5;
long j4 = 10;
cArr2[63] = Character.forDigit((int) (c - (j3 * j4)), 10);
int i2 = 63;
for (long j5 = 0; j3 > j5; j5 = 0) {
i2--;
cArr2[i2] = Character.forDigit((int) (j3 % j4), 10);
j3 /= j4;
}
str3 = new String(cArr2, i2, 64 - i2);
}
arrayList2.add(str3);
arrayList2.add("bkn");
arrayList2.add(nVar.a());
arrayList2.add("robotBizType");
arrayList2.add(Long.toString(nVar.d() & 4294967295L, 10));
arrayList2.add("robotUid");
arrayList2.add(nVar.e());
arrayList2.add("fetchType");
arrayList2.add(Integer.valueOf(nVar.b()));
Object[] array = arrayList2.toArray(new Object[0]);
Intrinsics.checkNotNull(array, "null cannot be cast to non-null type kotlin.Array<T of kotlin.collections.ArraysKt__ArraysJVMKt.toTypedArray>");
arrayList.add(Integer.valueOf(array.length));
CollectionsKt.addAll(arrayList, array);
arrayList.add(String.valueOf(abVar.hashCode()));
fetchGroupRobotProfileWithReq.kernelCallback.1 r1 = new fetchGroupRobotProfileWithReq.kernelCallback.1(abVar);
Object[] array2 = arrayList.toArray(new Object[0]);
Intrinsics.checkNotNull(array2, "null cannot be cast to non-null type kotlin.Array<T of kotlin.collections.ArraysKt__ArraysJVMKt.toTypedArray>");
l(true, "fetchGroupRobotProfileWithReq", array2, r1);
}

@NotNull
public final List<b> x() {
Object[] array = new ArrayList().toArray(new Object[0]);
Intrinsics.checkNotNull(array, "null cannot be cast to non-null type kotlin.Array<T of kotlin.collections.ArraysKt__ArraysJVMKt.toTypedArray>");
Object l = l(true, "getAllRobotFriendsFromCache", array, (Function1) null);
Object[] objArr = l instanceof Object[] ? (Object[]) l : null;
if (objArr != null) {
if (!(objArr.length == 0)) {
Iterator it = ArrayIteratorKt.iterator(objArr);
it.next();
Object next = it.next();
int intValue = next == null ? 0 : next instanceof Integer ? ((Number) next).intValue() : ((Number) next).intValue();
ArrayList arrayList = new ArrayList();
for (int i = 0; i < intValue; i++) {
Object next2 = it.next();
int intValue2 = next2 == null ? 0 : next2 instanceof Integer ? ((Number) next2).intValue() : ((Number) next2).intValue();
Object[] objArr2 = new Object[intValue2];
for (int i2 = 0; i2 < intValue2; i2++) {
objArr2[i2] = it.next();
}
arrayList.add(dn4.c.a(objArr2));
}
return arrayList;
}
}
return CollectionsKt.emptyList();
}

public final void y(@NotNull fn4.c cVar, @NotNull x xVar) {
String str;
ArrayList arrayList = new ArrayList();
ArrayList arrayList2 = new ArrayList();
arrayList2.add("robotUin");
long a = cVar.a();
if (a == 0) {
str = "0";
} else if (a > 0) {
str = Long.toString(a, 10);
} else {
char[] cArr = new char[64];
long j = (a >>> 1) / 5;
long j2 = 10;
int i = 63;
cArr[63] = Character.forDigit((int) (a - (j * j2)), 10);
while (j > 0) {
i--;
cArr[i] = Character.forDigit((int) (j % j2), 10);
j /= j2;
}
str = new String(cArr, i, 64 - i);
}
arrayList2.add(str);
Object[] array = arrayList2.toArray(new Object[0]);
Intrinsics.checkNotNull(array, "null cannot be cast to non-null type kotlin.Array<T of kotlin.collections.ArraysKt__ArraysJVMKt.toTypedArray>");
arrayList.add(Integer.valueOf(array.length));
CollectionsKt.addAll(arrayList, array);
arrayList.add(String.valueOf(xVar.hashCode()));
getGroupListForGroupRobot.kernelCallback.1 r1 = new getGroupListForGroupRobot.kernelCallback.1(xVar);
Object[] array2 = arrayList.toArray(new Object[0]);
Intrinsics.checkNotNull(array2, "null cannot be cast to non-null type kotlin.Array<T of kotlin.collections.ArraysKt__ArraysJVMKt.toTypedArray>");
l(true, "getGroupListForGroupRobot", array2, r1);
}

public final void z(@NotNull fn4.a aVar, @NotNull z zVar) {
ArrayList arrayList = new ArrayList();
Object[] array = new ArrayList().toArray(new Object[0]);
Intrinsics.checkNotNull(array, "null cannot be cast to non-null type kotlin.Array<T of kotlin.collections.ArraysKt__ArraysJVMKt.toTypedArray>");
arrayList.add(Integer.valueOf(array.length));
CollectionsKt.addAll(arrayList, array);
arrayList.add(String.valueOf(zVar.hashCode()));
getGroupRobotListForCreate.kernelCallback.1 r0 = new getGroupRobotListForCreate.kernelCallback.1(zVar);
Object[] array2 = arrayList.toArray(new Object[0]);
Intrinsics.checkNotNull(array2, "null cannot be cast to non-null type kotlin.Array<T of kotlin.collections.ArraysKt__ArraysJVMKt.toTypedArray>");
l(true, "getGroupRobotListForCreate", array2, r0);
}
}