Created
November 27, 2019 00:41
-
-
Save Francesco149/6287a96740fb6dab44983aedf7f5e88c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void BattleResultRequest$$beginRequest | |
| (undefined4 requestBase,undefined4 __unused,uint battleEntityPrimaryKey1, | |
| int battleEntityPrimaryKey2,uint battleResult,undefined4 winResult,undefined4 scores, | |
| undefined4 action,Array *voicePlayedList,Array *aliveEnemys, | |
| Array_RaidResult_ *raidResult,Array_SuperBossResult_ *superBossResult, | |
| undefined4 elapsedTurn,undefined4 usedTurnList,undefined4 recordType, | |
| undefined4 recordValueJson,int tdPlayed,undefined4 usedEquipSkillList) | |
| { | |
| int iVar1; | |
| undefined4 crcData; | |
| uint uVar2; | |
| undefined4 uVar3; | |
| uint extraout_r1; | |
| uint extraout_r1_00; | |
| uint extraout_r1_01; | |
| uint extraout_r1_02; | |
| int iVar4; | |
| uint uVar5; | |
| uint uVar6; | |
| uint uVar7; | |
| SuperBossResult *pSVar8; | |
| int *piVar9; | |
| uint superBossCrc; | |
| uint raidResultCrc1; | |
| RaidResult *raidResultItem; | |
| uint aliveUniqueIdsCrc1; | |
| uint uVar10; | |
| String *s; | |
| int superBossCrc2; | |
| int aliveUniqueIdsCrc2; | |
| bool bVar11; | |
| undefined8 userId; | |
| int raidResultCrc2; | |
| undefined4 local_40; | |
| undefined4 local_3c; | |
| undefined4 local_38; | |
| uint local_34; | |
| uint battleStatus; | |
| int local_2c; | |
| if (DAT_027ec620 == '\0') { | |
| FUN_003479b0(0x169d); | |
| DAT_027ec620 = '\x01'; | |
| } | |
| iVar1 = thunk_FUN_00382384(Class$Dictionary_string_-object_); | |
| FUN_006e8278(iVar1,Method$Dictionary_string_-object_..ctor()); | |
| battleStatus = battleEntityPrimaryKey1; | |
| local_2c = battleEntityPrimaryKey2; | |
| crcData = FUN_00381f7c(Class$long,&battleStatus); | |
| if (iVar1 == 0) { | |
| throwNullPointer(0); | |
| } | |
| FUN_006eabe0(iVar1,"battleId",crcData,Method$Dictionary_string_-object_.Add()); | |
| local_34 = battleResult; | |
| crcData = FUN_00381f7c(Class$int,&local_34); | |
| if (iVar1 == 0) { | |
| throwNullPointer(0); | |
| } | |
| FUN_006eabe0(iVar1,"battleResult",crcData,Method$Dictionary_string_-object_.Add()); | |
| local_38 = winResult; | |
| crcData = FUN_00381f7c(Class$int,&local_38); | |
| if (iVar1 == 0) { | |
| throwNullPointer(0); | |
| FUN_006eabe0(0,"winResult",crcData,Method$Dictionary_string_-object_.Add()); | |
| throwNullPointer(0); | |
| } | |
| else { | |
| FUN_006eabe0(iVar1,"winResult",crcData,Method$Dictionary_string_-object_.Add()); | |
| } | |
| FUN_006eabe0(iVar1,"scores",scores,Method$Dictionary_string_-object_.Add()); | |
| if (iVar1 == 0) { | |
| throwNullPointer(0); | |
| } | |
| FUN_006eabe0(iVar1,"action",action,Method$Dictionary_string_-object_.Add()); | |
| if (((*(byte *)(Class$JsonManager + 0xbf) & 2) != 0) && (*(int *)(Class$JsonManager + 0x70) == 0)) | |
| { | |
| FUN_0035803c(); | |
| } | |
| crcData = JsonManager$$toJson(raidResult,0); | |
| if (iVar1 == 0) { | |
| throwNullPointer(0); | |
| } | |
| FUN_006eabe0(iVar1,"raidResult",crcData,Method$Dictionary_string_-object_.Add()); | |
| crcData = JsonManager$$toJson(superBossResult,0); | |
| if (iVar1 == 0) { | |
| throwNullPointer(0); | |
| } | |
| FUN_006eabe0(iVar1,"superBossResult",crcData,Method$Dictionary_string_-object_.Add()); | |
| local_3c = elapsedTurn; | |
| crcData = FUN_00381f7c(Class$int,&local_3c); | |
| if (iVar1 == 0) { | |
| throwNullPointer(0); | |
| } | |
| FUN_006eabe0(iVar1,"elapsedTurn",crcData,Method$Dictionary_string_-object_.Add()); | |
| local_40 = recordType; | |
| crcData = FUN_00381f7c(Class$int,&local_40); | |
| if (iVar1 == 0) { | |
| throwNullPointer(0); | |
| FUN_006eabe0(0,"recordType",crcData,Method$Dictionary_string_-object_.Add()); | |
| throwNullPointer(0); | |
| } | |
| else { | |
| FUN_006eabe0(iVar1,"recordType",crcData,Method$Dictionary_string_-object_.Add()); | |
| } | |
| FUN_006eabe0(iVar1,"recordValueJson",recordValueJson,Method$Dictionary_string_-object_.Add()); | |
| if (tdPlayed == 0) { | |
| throwNullPointer(0); | |
| } | |
| crcData = List$$ToArray(tdPlayed,Method$List_Dictionary_string_-object__.ToArray()); | |
| crcData = JsonManager$$toJson(crcData,0); | |
| if (iVar1 == 0) { | |
| throwNullPointer(0); | |
| FUN_006eabe0(0,"tdPlayed",crcData,Method$Dictionary_string_-object_.Add()); | |
| throwNullPointer(0); | |
| } | |
| else { | |
| FUN_006eabe0(iVar1,"tdPlayed",crcData,Method$Dictionary_string_-object_.Add()); | |
| } | |
| FUN_006eabe0(iVar1,"usedEquipSkillList",usedEquipSkillList,Method$Dictionary_string_-object_.Add() | |
| ); | |
| superBossCrc = 0; | |
| raidResultCrc1 = 0; | |
| raidResultCrc2 = 0; | |
| uVar10 = extraout_r1; | |
| while( true ) { | |
| if (raidResult == (Array_RaidResult_ *)0x0) { | |
| throwNullPointer(0); | |
| uVar10 = extraout_r1_00; | |
| } | |
| if (raidResult->length <= (int)superBossCrc) break; | |
| if ((uint)raidResult->length <= superBossCrc) { | |
| crcData = IndexOutOfRangeException(); | |
| throw(crcData,0,0); | |
| } | |
| raidResultItem = raidResult->data[superBossCrc]; | |
| if (raidResultItem == (RaidResult *)0x0) { | |
| throwNullPointer(0); | |
| } | |
| superBossCrc = superBossCrc + 1; | |
| aliveUniqueIdsCrc1 = *(uint *)&raidResultItem->field_0x8; | |
| uVar10 = *(uint *)&raidResultItem->field_0xc; | |
| uVar2 = *(uint *)&raidResultItem->field_0x10; | |
| uVar5 = raidResultCrc1 + uVar2 + uVar10; | |
| uVar10 = raidResultCrc2 + ((int)uVar2 >> 0x1f) + (uint)CARRY4(raidResultCrc1,uVar2) + | |
| ((int)uVar10 >> 0x1f) + (uint)CARRY4(raidResultCrc1 + uVar2,uVar10); | |
| raidResultCrc1 = uVar5 + aliveUniqueIdsCrc1; | |
| raidResultCrc2 = | |
| uVar10 + ((int)aliveUniqueIdsCrc1 >> 0x1f) + (uint)CARRY4(uVar5,aliveUniqueIdsCrc1); | |
| } | |
| aliveUniqueIdsCrc1 = 0; | |
| superBossCrc = 0; | |
| superBossCrc2 = 0; | |
| while( true ) { | |
| if (superBossResult == (Array_SuperBossResult_ *)0x0) { | |
| throwNullPointer(0,uVar10); | |
| uVar10 = extraout_r1_02; | |
| } | |
| if (superBossResult->length <= (int)aliveUniqueIdsCrc1) break; | |
| if ((uint)superBossResult->length <= aliveUniqueIdsCrc1) { | |
| crcData = IndexOutOfRangeException(); | |
| throw(crcData,0,0); | |
| uVar10 = extraout_r1_01; | |
| } | |
| pSVar8 = superBossResult->data[aliveUniqueIdsCrc1]; | |
| if (pSVar8 == (SuperBossResult *)0x0) { | |
| throwNullPointer(0,uVar10); | |
| } | |
| aliveUniqueIdsCrc1 = aliveUniqueIdsCrc1 + 1; | |
| uVar2 = *(uint *)&pSVar8->field_0x8; | |
| uVar10 = *(uint *)&pSVar8->field_0xc; | |
| uVar5 = *(uint *)&pSVar8->field_0x10; | |
| bVar11 = CARRY4(superBossCrc,uVar5); | |
| uVar6 = superBossCrc + uVar5; | |
| uVar7 = uVar6 + uVar2; | |
| superBossCrc = uVar7 + uVar10; | |
| superBossCrc2 = | |
| superBossCrc2 + ((int)uVar5 >> 0x1f) + (uint)bVar11 + | |
| ((int)uVar2 >> 0x1f) + (uint)CARRY4(uVar6,uVar2) + | |
| ((int)uVar10 >> 0x1f) + (uint)CARRY4(uVar7,uVar10); | |
| } | |
| if (iVar1 == 0) { | |
| throwNullPointer(0,uVar10); | |
| } | |
| FUN_006eabe0(iVar1,"aliveUniqueIds",aliveEnemys,Method$Dictionary_string_-object_.Add()); | |
| uVar10 = 0; | |
| aliveUniqueIdsCrc1 = 0; | |
| aliveUniqueIdsCrc2 = 0; | |
| while( true ) { | |
| if (aliveEnemys == (Array *)0x0) { | |
| throwNullPointer(0); | |
| } | |
| if (aliveEnemys->length <= (int)uVar10) break; | |
| if ((uint)aliveEnemys->length <= uVar10) { | |
| crcData = IndexOutOfRangeException(); | |
| throw(crcData,0,0); | |
| } | |
| uVar2 = *(uint *)(aliveEnemys->data + uVar10 * 4); | |
| uVar10 = uVar10 + 1; | |
| bVar11 = CARRY4(aliveUniqueIdsCrc1,uVar2); | |
| aliveUniqueIdsCrc1 = aliveUniqueIdsCrc1 + uVar2; | |
| aliveUniqueIdsCrc2 = aliveUniqueIdsCrc2 + ((int)uVar2 >> 0x1f) + (uint)bVar11; | |
| } | |
| if (((Class$NetworkManager->field_0xbf & 2) != 0) && (Class$NetworkManager->field_0x70 == 0)) { | |
| FUN_0035803c(); | |
| } | |
| userId = NetworkManager$$get_UserId(0); | |
| uVar10 = (uint)((ulonglong)userId >> 0x20); | |
| if (((*(byte *)(Class$System.BitConverter + 0xbf) & 2) != 0) && | |
| (*(int *)(Class$System.BitConverter + 0x70) == 0)) { | |
| FUN_0035803c(); | |
| } | |
| crcData = BitConverter$$GetBytes | |
| (uVar10 + battleResult, | |
| (int)userId + ((int)battleResult >> 0x1f) + (uint)CARRY4(uVar10,battleResult) | |
| ,0); | |
| uVar3 = BitConverter$$GetBytes | |
| (raidResultCrc1 - 0x408fd5,raidResultCrc2 - (uint)(raidResultCrc1 < 0x408fd5),0) | |
| ; | |
| crcData = FUN_015e2484(crcData,uVar3,Method$Enumerable.Concat()_byte_); | |
| iVar4 = aliveUniqueIdsCrc2 + (uint)CARRY4(aliveUniqueIdsCrc1,-(aliveUniqueIdsCrc2 >> 0x1f)); | |
| uVar3 = BitConverter$$GetBytes | |
| ((uint)((byte)iVar4 & 1) << 0x1f | | |
| aliveUniqueIdsCrc1 + -(aliveUniqueIdsCrc2 >> 0x1f) >> 1,iVar4 >> 1,0); | |
| crcData = FUN_015e2484(crcData,uVar3,Method$Enumerable.Concat()_byte_); | |
| uVar3 = BitConverter$$GetBytes | |
| (battleEntityPrimaryKey1 + 0x80000001, | |
| battleEntityPrimaryKey2 - (uint)(battleEntityPrimaryKey1 < 0x7fffffff),0); | |
| crcData = FUN_015e2484(crcData,uVar3,Method$Enumerable.Concat()_byte_); | |
| uVar3 = BitConverter$$GetBytes | |
| (superBossCrc - 0x25acf6,superBossCrc2 - (uint)(superBossCrc < 0x25acf6),0); | |
| crcData = FUN_015e2484(crcData,uVar3,Method$Enumerable.Concat()_byte_); | |
| crcData = FUN_0174f6e4(crcData,Method$Enumerable.ToArray()_byte_); | |
| if (((*(byte *)(Class$Crc32 + 0xbf) & 2) != 0) && (*(int *)(Class$Crc32 + 0x70) == 0)) { | |
| FUN_0035803c(); | |
| } | |
| battleStatus = Crc32$$Compute(crcData,0); | |
| crcData = FUN_00381f7c(Class$uint,&battleStatus); | |
| if (iVar1 == 0) { | |
| throwNullPointer(0); | |
| } | |
| FUN_006eabe0(iVar1,"battleStatus",crcData,Method$Dictionary_string_-object_.Add()); | |
| if (voicePlayedList != (Array *)0x0) { | |
| if (((Class$string->field_0xbf & 2) != 0) && (Class$string->field_0x70 == 0)) { | |
| FUN_0035803c(); | |
| } | |
| uVar10 = voicePlayedList->length; | |
| s = Class$string->staticData->empty; | |
| if (0 < (int)uVar10) { | |
| superBossCrc = 0; | |
| do { | |
| if (uVar10 <= superBossCrc) { | |
| crcData = IndexOutOfRangeException(); | |
| throw(crcData,0,0); | |
| } | |
| superBossCrc2 = *(int *)(voicePlayedList->data + superBossCrc * 4); | |
| if ((superBossCrc2 != 0) && (*(int *)(superBossCrc2 + 0xc) == 2)) { | |
| if (((Class$string->field_0xbf & 2) != 0) && (Class$string->field_0x70 == 0)) { | |
| FUN_0035803c(); | |
| } | |
| aliveUniqueIdsCrc2 = String$$IsNullOrEmpty(s); | |
| if (aliveUniqueIdsCrc2 == 1) { | |
| piVar9 = (int *)InstantiateArray(Class$object[],5); | |
| if (piVar9 == (int *)0x0) { | |
| throwNullPointer(0); | |
| } | |
| if (("[" != (String *)0x0) && | |
| (aliveUniqueIdsCrc2 = FUN_003822bc("[",*(undefined4 *)(*piVar9 + 0x20)), | |
| aliveUniqueIdsCrc2 == 0)) { | |
| crcData = FUN_00374a74(); | |
| throw(crcData,0,0); | |
| } | |
| s = "["; | |
| if (piVar9[3] == 0) { | |
| crcData = IndexOutOfRangeException(); | |
| throw(crcData,0,0); | |
| } | |
| *(String **)(piVar9 + 4) = s; | |
| if (*(int *)(superBossCrc2 + 0xc) == 0) { | |
| crcData = IndexOutOfRangeException(); | |
| throw(crcData,0,0); | |
| } | |
| battleStatus = *(uint *)(superBossCrc2 + 0x10); | |
| s = (String *)FUN_00381f7c(Class$int,&battleStatus); | |
| if ((s != (String *)0x0) && | |
| (aliveUniqueIdsCrc2 = FUN_003822bc(s,*(undefined4 *)(*piVar9 + 0x20)), | |
| aliveUniqueIdsCrc2 == 0)) { | |
| crcData = FUN_00374a74(); | |
| throw(crcData,0,0); | |
| } | |
| if ((uint)piVar9[3] < 2) { | |
| crcData = IndexOutOfRangeException(); | |
| throw(crcData,0,0); | |
| } | |
| *(String **)(piVar9 + 5) = s; | |
| if (("," != (String *)0x0) && | |
| (aliveUniqueIdsCrc2 = FUN_003822bc(",",*(undefined4 *)(*piVar9 + 0x20)), | |
| aliveUniqueIdsCrc2 == 0)) { | |
| crcData = FUN_00374a74(); | |
| throw(crcData,0,0); | |
| } | |
| s = ","; | |
| if ((uint)piVar9[3] < 3) { | |
| crcData = IndexOutOfRangeException(); | |
| throw(crcData,0,0); | |
| } | |
| *(String **)(piVar9 + 6) = s; | |
| if (*(uint *)(superBossCrc2 + 0xc) < 2) { | |
| crcData = IndexOutOfRangeException(); | |
| throw(crcData,0,0); | |
| } | |
| local_34 = *(uint *)(superBossCrc2 + 0x14); | |
| s = (String *)FUN_00381f7c(Class$int,&local_34); | |
| if ((s != (String *)0x0) && | |
| (superBossCrc2 = FUN_003822bc(s,*(undefined4 *)(*piVar9 + 0x20)), superBossCrc2 == 0) | |
| ) { | |
| crcData = FUN_00374a74(); | |
| throw(crcData,0,0); | |
| } | |
| if ((uint)piVar9[3] < 4) { | |
| crcData = IndexOutOfRangeException(); | |
| throw(crcData,0,0); | |
| } | |
| *(String **)(piVar9 + 7) = s; | |
| if (("]" != (String *)0x0) && | |
| (superBossCrc2 = FUN_003822bc("]",*(undefined4 *)(*piVar9 + 0x20)), | |
| superBossCrc2 == 0)) { | |
| crcData = FUN_00374a74(); | |
| throw(crcData,0,0); | |
| } | |
| s = "]"; | |
| if ((uint)piVar9[3] < 5) { | |
| crcData = IndexOutOfRangeException(); | |
| throw(crcData,0,0); | |
| } | |
| *(String **)(piVar9 + 8) = s; | |
| } | |
| else { | |
| piVar9 = (int *)InstantiateArray(Class$object[],6); | |
| if (piVar9 == (int *)0x0) { | |
| throwNullPointer(0); | |
| } | |
| if ((s != (String *)0x0) && | |
| (aliveUniqueIdsCrc2 = FUN_003822bc(s,*(undefined4 *)(*piVar9 + 0x20)), | |
| aliveUniqueIdsCrc2 == 0)) { | |
| crcData = FUN_00374a74(); | |
| throw(crcData,0,0); | |
| } | |
| if (piVar9[3] == 0) { | |
| crcData = IndexOutOfRangeException(); | |
| throw(crcData,0,0); | |
| } | |
| *(String **)(piVar9 + 4) = s; | |
| if ((",[" != (String *)0x0) && | |
| (aliveUniqueIdsCrc2 = FUN_003822bc(",[",*(undefined4 *)(*piVar9 + 0x20)), | |
| aliveUniqueIdsCrc2 == 0)) { | |
| crcData = FUN_00374a74(); | |
| throw(crcData,0,0); | |
| } | |
| s = ",["; | |
| if ((uint)piVar9[3] < 2) { | |
| crcData = IndexOutOfRangeException(); | |
| throw(crcData,0,0); | |
| } | |
| *(String **)(piVar9 + 5) = s; | |
| if (*(int *)(superBossCrc2 + 0xc) == 0) { | |
| crcData = IndexOutOfRangeException(); | |
| throw(crcData,0,0); | |
| } | |
| battleStatus = *(uint *)(superBossCrc2 + 0x10); | |
| s = (String *)FUN_00381f7c(Class$int,&battleStatus); | |
| if ((s != (String *)0x0) && | |
| (aliveUniqueIdsCrc2 = FUN_003822bc(s,*(undefined4 *)(*piVar9 + 0x20)), | |
| aliveUniqueIdsCrc2 == 0)) { | |
| crcData = FUN_00374a74(); | |
| throw(crcData,0,0); | |
| } | |
| if ((uint)piVar9[3] < 3) { | |
| crcData = IndexOutOfRangeException(); | |
| throw(crcData,0,0); | |
| } | |
| *(String **)(piVar9 + 6) = s; | |
| if (("," != (String *)0x0) && | |
| (aliveUniqueIdsCrc2 = FUN_003822bc(",",*(undefined4 *)(*piVar9 + 0x20)), | |
| aliveUniqueIdsCrc2 == 0)) { | |
| crcData = FUN_00374a74(); | |
| throw(crcData,0,0); | |
| } | |
| s = ","; | |
| if ((uint)piVar9[3] < 4) { | |
| crcData = IndexOutOfRangeException(); | |
| throw(crcData,0,0); | |
| } | |
| *(String **)(piVar9 + 7) = s; | |
| if (*(uint *)(superBossCrc2 + 0xc) < 2) { | |
| crcData = IndexOutOfRangeException(); | |
| throw(crcData,0,0); | |
| } | |
| local_34 = *(uint *)(superBossCrc2 + 0x14); | |
| s = (String *)FUN_00381f7c(Class$int,&local_34); | |
| if ((s != (String *)0x0) && | |
| (superBossCrc2 = FUN_003822bc(s,*(undefined4 *)(*piVar9 + 0x20)), superBossCrc2 == 0) | |
| ) { | |
| crcData = FUN_00374a74(); | |
| throw(crcData,0,0); | |
| } | |
| if ((uint)piVar9[3] < 5) { | |
| crcData = IndexOutOfRangeException(); | |
| throw(crcData,0,0); | |
| } | |
| *(String **)(piVar9 + 8) = s; | |
| if (("]" != (String *)0x0) && | |
| (superBossCrc2 = FUN_003822bc("]",*(undefined4 *)(*piVar9 + 0x20)), | |
| superBossCrc2 == 0)) { | |
| crcData = FUN_00374a74(); | |
| throw(crcData,0,0); | |
| } | |
| s = "]"; | |
| if ((uint)piVar9[3] < 6) { | |
| crcData = IndexOutOfRangeException(); | |
| throw(crcData,0,0); | |
| } | |
| *(String **)(piVar9 + 9) = s; | |
| } | |
| if (((Class$string->field_0xbf & 2) != 0) && (Class$string->field_0x70 == 0)) { | |
| FUN_0035803c(); | |
| } | |
| s = (String *)String$$Concat(piVar9,0); | |
| } | |
| uVar10 = voicePlayedList->length; | |
| superBossCrc = superBossCrc + 1; | |
| } while ((int)superBossCrc < (int)uVar10); | |
| } | |
| if (((Class$string->field_0xbf & 2) != 0) && (Class$string->field_0x70 == 0)) { | |
| FUN_0035803c(); | |
| } | |
| crcData = String$$Concat("[",s,"]",0); | |
| if (iVar1 == 0) { | |
| throwNullPointer(0); | |
| } | |
| FUN_006eabe0(iVar1,"voicePlayedList",crcData,Method$Dictionary_string_-object_.Add()); | |
| } | |
| if (iVar1 == 0) { | |
| throwNullPointer(0); | |
| } | |
| FUN_006eabe0(iVar1,"usedTurnList",usedTurnList,Method$Dictionary_string_-object_.Add()); | |
| if (((*(byte *)(Class$JsonManager + 0xbf) & 2) != 0) && (*(int *)(Class$JsonManager + 0x70) == 0)) | |
| { | |
| FUN_0035803c(); | |
| } | |
| crcData = JsonManager$$toJson(iVar1,0); | |
| if (((Class$CatAndMouseGame->field_0xbf & 2) != 0) && (Class$CatAndMouseGame->field_0x70 == 0)) { | |
| FUN_0035803c(); | |
| } | |
| crcData = CatAndMouseGame$$CatGame5(crcData,0); | |
| RequestBase$$addField(requestBase,"result",crcData,0); | |
| RequestBase$$beginRequest(requestBase,0); | |
| return; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment