Created
August 20, 2022 19:24
-
-
Save Lusamine/482e5753de7533d0e81e9713c93dccc1 to your computer and use it in GitHub Desktop.
This file contains 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
_QWORD *__fastcall get_capture_visual_indicator_index(_QWORD *a1, capture_info *a2) | |
{ | |
int ai_behavior_type; // w8 | |
_BOOL4 is_eating_cake; // w9 | |
int is_eating_cake_or_sleeping; // w9 | |
int indicator_type; // w8 MAPDST | |
__int64 v8; // x19 | |
_QWORD *v9; // x0 | |
__int64 v10; // x21 | |
const char *indicator_hash; // x20 | |
size_t indicator_string; // x0 | |
unsigned __int8 indicator_strln; // w9 | |
unsigned __int8 *v14; // x8 | |
int v15; // t1 | |
__int64 v16; // [xsp+0h] [xbp-40h] BYREF | |
const char *v17; // [xsp+8h] [xbp-38h] | |
size_t v18; // [xsp+10h] [xbp-30h] | |
__int64 v19; // [xsp+18h] [xbp-28h] | |
if ( *(float *)&a2->capture_ratio < 0.00000011921 ) | |
{ | |
indicator_type = 0; | |
if ( *((_BYTE *)a1 + 32) ) | |
goto LABEL_13; | |
} | |
else | |
{ | |
ai_behavior_type = a2->ai_behavior_type; | |
is_eating_cake = ai_behavior_type == 3 && a2->ai_feeding_behavior == 1;// eating cake | |
is_eating_cake_or_sleeping = is_eating_cake || ai_behavior_type == 4;// sleeping | |
if ( (ai_behavior_type | 1) == 7 || ai_behavior_type == 3 )// stunned/resting/feeding | |
indicator_type = 2; | |
else | |
indicator_type = 1; | |
if ( is_eating_cake_or_sleeping ) | |
indicator_type = 3; | |
if ( *((_BYTE *)a1 + 32) ) | |
{ | |
LABEL_13: | |
if ( indicator_type == *((_DWORD *)a1 + 9) ) | |
return a1; | |
} | |
} | |
*((_BYTE *)a1 + 32) = 1; | |
v8 = a1[2]; | |
*((_DWORD *)a1 + 9) = indicator_type; | |
v16 = 0x34D81B41D12AD2B8LL; | |
v17 = "anime_keep_dif_lv0"; | |
v18 = 18LL; | |
v19 = 0LL; | |
v9 = *(_QWORD **)(v8 + 328); | |
if ( v9 ) | |
{ | |
sub_710273B430(v9, &v16); | |
v9 = *(_QWORD **)(v8 + 328); | |
} | |
v16 = 0x34D81C41D12AD46BLL; | |
v17 = "anime_keep_dif_lv1"; | |
v18 = 18LL; | |
v19 = 0LL; | |
if ( v9 ) | |
{ | |
sub_710273B430(v9, &v16); | |
v9 = *(_QWORD **)(v8 + 328); | |
} | |
v16 = 0x4AE0BD426EE308FELL; | |
v17 = "anime_keep_dif_Lv2"; | |
v18 = 18LL; | |
v19 = 0LL; | |
if ( v9 ) | |
{ | |
sub_710273B430(v9, &v16); | |
v9 = *(_QWORD **)(v8 + 328); | |
} | |
v16 = 0x4AE0BE426EE30AB1LL; | |
v17 = "anime_keep_dif_Lv3"; | |
v18 = 18LL; | |
v19 = 0LL; | |
if ( v9 ) | |
sub_710273B430(v9, &v16); | |
v10 = 0xCBF29CE484222645LL; | |
sub_7100C2E2F0(v8, "anime_switch_dif"); | |
indicator_hash = capture_indicator_type_hash_table[indicator_type]; | |
indicator_string = strlen_0(indicator_hash); | |
indicator_strln = *indicator_hash; | |
if ( *indicator_hash ) | |
{ | |
v14 = (unsigned __int8 *)(indicator_hash + 1); | |
do | |
{ | |
v10 = 0x100000001B3LL * (v10 ^ indicator_strln); | |
v15 = *v14++; | |
indicator_strln = v15; | |
} | |
while ( v15 ); | |
} | |
v16 = v10; | |
v17 = indicator_hash; | |
v18 = indicator_string; | |
v19 = 0LL; | |
a1 = *(_QWORD **)(v8 + 328); | |
if ( a1 ) | |
return sub_710273B1E8(a1, &v16); | |
return a1; | |
} | |
---- | |
.text:000000710247F428 ; _QWORD *__fastcall get_capture_visual_indicator_index(_QWORD *, capture_info *) | |
.text:000000710247F428 get_capture_visual_indicator_index ; CODE XREF: sub_7101E2C388+1ADC↑p | |
.text:000000710247F428 | |
.text:000000710247F428 var_40 = -0x40 | |
.text:000000710247F428 anonymous_0 = -0x38 | |
.text:000000710247F428 var_30 = -0x30 | |
.text:000000710247F428 anonymous_1 = -0x28 | |
.text:000000710247F428 var_20 = -0x20 | |
.text:000000710247F428 var_10 = -0x10 | |
.text:000000710247F428 var_s0 = 0 | |
.text:000000710247F428 | |
.text:000000710247F428 SUB SP, SP, #0x50 | |
.text:000000710247F42C STR X21, [SP,#0x40+var_20] | |
.text:000000710247F430 STP X20, X19, [SP,#0x40+var_10] | |
.text:000000710247F434 STP X29, X30, [SP,#0x40+var_s0] | |
.text:000000710247F438 ADD X29, SP, #0x40 | |
.text:000000710247F43C MOV W8, #0x34000000 | |
.text:000000710247F440 LDR S0, [X1,#0x8C] | |
.text:000000710247F444 FMOV S1, W8 | |
.text:000000710247F448 FCMP S0, S1 | |
.text:000000710247F44C B.MI loc_710247F4B4 | |
.text:000000710247F450 LDR W8, [X1,#0x3C] | |
.text:000000710247F454 CMP W8, #3 | |
.text:000000710247F458 B.EQ loc_710247F61C | |
.text:000000710247F45C MOV W9, WZR | |
.text:000000710247F460 | |
.text:000000710247F460 loc_710247F460 ; CODE XREF: get_capture_visual_indicator_index+200↓j | |
.text:000000710247F460 CMP W8, #4 | |
.text:000000710247F464 ORR W11, W8, #1 | |
.text:000000710247F468 CSET W10, EQ | |
.text:000000710247F46C CMP W11, #7 | |
.text:000000710247F470 ORR W9, W9, W10 | |
.text:000000710247F474 CCMP W8, #3, #4, NE | |
.text:000000710247F478 MOV W8, #1 | |
.text:000000710247F47C MOV W10, #3 | |
.text:000000710247F480 CINC W8, W8, EQ | |
.text:000000710247F484 CMP W9, #0 | |
.text:000000710247F488 CSEL W20, W10, W8, NE | |
.text:000000710247F48C LDRB W8, [X0,#0x20] | |
.text:000000710247F490 CBZ W8, loc_710247F4C0 | |
.text:000000710247F494 | |
.text:000000710247F494 loc_710247F494 ; CODE XREF: get_capture_visual_indicator_index+94↓j | |
.text:000000710247F494 LDR W8, [X0,#0x24] | |
.text:000000710247F498 CMP W20, W8 | |
.text:000000710247F49C B.NE loc_710247F4C0 | |
.text:000000710247F4A0 | |
.text:000000710247F4A0 loc_710247F4A0 ; CODE XREF: get_capture_visual_indicator_index+1E4↓j | |
.text:000000710247F4A0 ; get_capture_visual_indicator_index+1F0↓j | |
.text:000000710247F4A0 LDP X29, X30, [SP,#0x40+var_s0] | |
.text:000000710247F4A4 LDR X21, [SP,#0x40+var_20] | |
.text:000000710247F4A8 LDP X20, X19, [SP,#0x40+var_10] | |
.text:000000710247F4AC ADD SP, SP, #0x50 ; 'P' | |
.text:000000710247F4B0 RET | |
.text:000000710247F4B4 ; --------------------------------------------------------------------------- | |
.text:000000710247F4B4 | |
.text:000000710247F4B4 loc_710247F4B4 ; CODE XREF: get_capture_visual_indicator_index+24↑j | |
.text:000000710247F4B4 MOV W20, WZR | |
.text:000000710247F4B8 LDRB W8, [X0,#0x20] | |
.text:000000710247F4BC CBNZ W8, loc_710247F494 | |
.text:000000710247F4C0 | |
.text:000000710247F4C0 loc_710247F4C0 ; CODE XREF: get_capture_visual_indicator_index+68↑j | |
.text:000000710247F4C0 ; get_capture_visual_indicator_index+74↑j | |
.text:000000710247F4C0 MOV W8, #1 | |
.text:000000710247F4C4 STRB W8, [X0,#0x20] | |
.text:000000710247F4C8 LDR X19, [X0,#0x10] | |
.text:000000710247F4CC MOV X8, #0x34D81B41D12AD2B8 | |
.text:000000710247F4DC ADRL X9, aAnimeKeepDifLv ; "anime_keep_dif_lv0" | |
.text:000000710247F4E4 STR W20, [X0,#0x24] | |
.text:000000710247F4E8 STP X8, X9, [SP,#0x40+var_40] | |
.text:000000710247F4EC MOV W8, #0x12 | |
.text:000000710247F4F0 STP X8, XZR, [SP,#0x40+var_30] | |
.text:000000710247F4F4 LDR X0, [X19,#0x148] | |
.text:000000710247F4F8 CBZ X0, loc_710247F508 | |
.text:000000710247F4FC MOV X1, SP | |
.text:000000710247F500 BL sub_710273B430 | |
.text:000000710247F504 LDR X0, [X19,#0x148] | |
.text:000000710247F508 | |
.text:000000710247F508 loc_710247F508 ; CODE XREF: get_capture_visual_indicator_index+D0↑j | |
.text:000000710247F508 MOV X9, #0xD12AD46B | |
.text:000000710247F510 ADRL X8, aAnimeKeepDifLv_0 ; "anime_keep_dif_lv1" | |
.text:000000710247F518 MOVK X9, #0x1C41,LSL#32 | |
.text:000000710247F51C MOVK X9, #0x34D8,LSL#48 | |
.text:000000710247F520 STP X9, X8, [SP,#0x40+var_40] | |
.text:000000710247F524 MOV W8, #0x12 | |
.text:000000710247F528 STP X8, XZR, [SP,#0x40+var_30] | |
.text:000000710247F52C CBZ X0, loc_710247F53C | |
.text:000000710247F530 MOV X1, SP | |
.text:000000710247F534 BL sub_710273B430 | |
.text:000000710247F538 LDR X0, [X19,#0x148] | |
.text:000000710247F53C | |
.text:000000710247F53C loc_710247F53C ; CODE XREF: get_capture_visual_indicator_index+104↑j | |
.text:000000710247F53C MOV X9, #0x6EE308FE | |
.text:000000710247F544 ADRL X8, aAnimeKeepDifLv_1 ; "anime_keep_dif_Lv2" | |
.text:000000710247F54C MOVK X9, #0xBD42,LSL#32 | |
.text:000000710247F550 MOVK X9, #0x4AE0,LSL#48 | |
.text:000000710247F554 STP X9, X8, [SP,#0x40+var_40] | |
.text:000000710247F558 MOV W8, #0x12 | |
.text:000000710247F55C STP X8, XZR, [SP,#0x40+var_30] | |
.text:000000710247F560 CBZ X0, loc_710247F570 | |
.text:000000710247F564 MOV X1, SP | |
.text:000000710247F568 BL sub_710273B430 | |
.text:000000710247F56C LDR X0, [X19,#0x148] | |
.text:000000710247F570 | |
.text:000000710247F570 loc_710247F570 ; CODE XREF: get_capture_visual_indicator_index+138↑j | |
.text:000000710247F570 MOV X9, #0x6EE30AB1 | |
.text:000000710247F578 ADRL X8, aAnimeKeepDifLv_2 ; "anime_keep_dif_Lv3" | |
.text:000000710247F580 MOVK X9, #0xBE42,LSL#32 | |
.text:000000710247F584 MOVK X9, #0x4AE0,LSL#48 | |
.text:000000710247F588 STP X9, X8, [SP,#0x40+var_40] | |
.text:000000710247F58C MOV W8, #0x12 | |
.text:000000710247F590 STP X8, XZR, [SP,#0x40+var_30] | |
.text:000000710247F594 CBZ X0, loc_710247F5A0 | |
.text:000000710247F598 MOV X1, SP | |
.text:000000710247F59C BL sub_710273B430 | |
.text:000000710247F5A0 | |
.text:000000710247F5A0 loc_710247F5A0 ; CODE XREF: get_capture_visual_indicator_index+16C↑j | |
.text:000000710247F5A0 UCVTF S0, W20 | |
.text:000000710247F5A4 MOV X21, #0x84222645 | |
.text:000000710247F5AC ADRL X1, aAnimeSwitchDif ; "anime_switch_dif" | |
.text:000000710247F5B4 MOV X0, X19 ; int | |
.text:000000710247F5B8 MOVK X21, #0x9CE4,LSL#32 | |
.text:000000710247F5BC MOVK X21, #0xCBF2,LSL#48 | |
.text:000000710247F5C0 BL sub_7100C2E2F0 | |
.text:000000710247F5C4 ADRL X8, capture_indicator_type_hash_table | |
.text:000000710247F5CC LDR X20, [X8,W20,UXTW#3] | |
.text:000000710247F5D0 MOV X0, X20 ; s | |
.text:000000710247F5D4 BL strlen_0 | |
.text:000000710247F5D8 LDRB W9, [X20] ; "anime_keep_dif_lv0" | |
.text:000000710247F5DC CBZ W9, loc_710247F600 | |
.text:000000710247F5E0 MOV X10, #0x1B3 | |
.text:000000710247F5E4 ADD X8, X20, #1 | |
.text:000000710247F5E8 MOVK X10, #0x100,LSL#32 | |
.text:000000710247F5EC | |
.text:000000710247F5EC loc_710247F5EC ; CODE XREF: get_capture_visual_indicator_index+1D4↓j | |
.text:000000710247F5EC AND X9, X9, #0xFF | |
.text:000000710247F5F0 EOR X9, X21, X9 | |
.text:000000710247F5F4 MUL X21, X9, X10 | |
.text:000000710247F5F8 LDRB W9, [X8],#1 ; "nime_keep_dif_lv0" | |
.text:000000710247F5FC CBNZ W9, loc_710247F5EC | |
.text:000000710247F600 | |
.text:000000710247F600 loc_710247F600 ; CODE XREF: get_capture_visual_indicator_index+1B4↑j | |
.text:000000710247F600 STP X21, X20, [SP,#0x40+var_40] | |
.text:000000710247F604 STP X0, XZR, [SP,#0x40+var_30] | |
.text:000000710247F608 LDR X0, [X19,#0x148] | |
.text:000000710247F60C CBZ X0, loc_710247F4A0 | |
.text:000000710247F610 MOV X1, SP | |
.text:000000710247F614 BL sub_710273B1E8 | |
.text:000000710247F618 B loc_710247F4A0 | |
.text:000000710247F61C ; --------------------------------------------------------------------------- | |
.text:000000710247F61C | |
.text:000000710247F61C loc_710247F61C ; CODE XREF: get_capture_visual_indicator_index+30↑j | |
.text:000000710247F61C LDR W9, [X1,#0x68] | |
.text:000000710247F620 CMP W9, #1 | |
.text:000000710247F624 CSET W9, EQ | |
.text:000000710247F628 B loc_710247F460 | |
.text:000000710247F628 ; End of function get_capture_visual_indicator_index |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment