Created
June 19, 2025 18:07
-
-
Save Lusamine/71017763588ee24ec7c685fcbf8b348d 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
| bool __fastcall camp_item_get_success(__int64 a1, int handler) | |
| { | |
| unsigned int CampFriendship; // w0 | |
| int *v4; // x8 | |
| float item_chance; // s8 | |
| if ( handler == 1 ) | |
| { | |
| CampFriendship = Pml_PokePara_CoreParam__GetCampFriendship(*(Pml_PokePara_CoreParam_o **)(a1 + 88)); | |
| if ( CampFriendship > 254 ) | |
| goto LABEL_4; | |
| goto LABEL_6; | |
| } | |
| if ( handler ) | |
| goto LABEL_13; | |
| CampFriendship = Pml_PokePara_CoreParam__GetFriendship(*(Pml_PokePara_CoreParam_o **)(a1 + 88)); | |
| if ( CampFriendship <= 254 ) | |
| { | |
| LABEL_6: | |
| if ( CampFriendship >= 220 ) | |
| { | |
| v4 = &dword_7102068BBC; | |
| goto LABEL_19; | |
| } | |
| if ( CampFriendship > 179 ) | |
| { | |
| v4 = &dword_7102068BC8; | |
| goto LABEL_19; | |
| } | |
| if ( CampFriendship > 129 ) | |
| { | |
| v4 = &dword_7102068BD4; | |
| goto LABEL_19; | |
| } | |
| if ( CampFriendship > 79 ) | |
| { | |
| v4 = &dword_7102068BE0; | |
| goto LABEL_19; | |
| } | |
| if ( CampFriendship > 29 ) | |
| { | |
| v4 = &dword_7102068BEC; | |
| goto LABEL_19; | |
| } | |
| if ( CampFriendship ) | |
| { | |
| v4 = &dword_7102068BF8; | |
| goto LABEL_19; | |
| } | |
| LABEL_13: | |
| v4 = &dword_7102068C04; | |
| goto LABEL_19; | |
| } | |
| LABEL_4: | |
| v4 = &dword_7102068BB0; | |
| LABEL_19: | |
| item_chance = *(float *)&v4[handler + 1]; | |
| return get_rand_float(global_struct->main_rng, 1.0) < item_chance; | |
| } | |
| ---- | |
| .text:00000071011BA250 ; =============== S U B R O U T I N E ======================================= | |
| .text:00000071011BA250 | |
| .text:00000071011BA250 ; Attributes: bp-based frame | |
| .text:00000071011BA250 | |
| .text:00000071011BA250 ; bool __fastcall camp_item_get_success(__int64 a1, int handler) | |
| .text:00000071011BA250 camp_item_get_success ; CODE XREF: sub_710126B920+80↓p | |
| .text:00000071011BA250 | |
| .text:00000071011BA250 var_10 = -0x10 | |
| .text:00000071011BA250 var_8 = -8 | |
| .text:00000071011BA250 var_s0 = 0 | |
| .text:00000071011BA250 | |
| .text:00000071011BA250 STR D8, [SP,#-0x10+var_10]! | |
| .text:00000071011BA254 STR X19, [SP,#0x10+var_8] | |
| .text:00000071011BA258 STP X29, X30, [SP,#0x10+var_s0] | |
| .text:00000071011BA25C ADD X29, SP, #0x10 | |
| .text:00000071011BA260 MOV W19, W1 | |
| .text:00000071011BA264 CMP W1, #1 | |
| .text:00000071011BA268 B.EQ loc_71011BA28C | |
| .text:00000071011BA26C CBNZ W19, loc_71011BA2D8 | |
| .text:00000071011BA270 LDR X0, [X0,#0x58] | |
| .text:00000071011BA274 BL Pml.PokePara.CoreParam$$GetFriendship | |
| .text:00000071011BA278 CMP W0, #0xFE | |
| .text:00000071011BA27C B.LS loc_71011BA2A0 | |
| .text:00000071011BA280 | |
| .text:00000071011BA280 loc_71011BA280 ; CODE XREF: camp_item_get_success+4C↓j | |
| .text:00000071011BA280 ADRL X8, dword_7102068BB0 | |
| .text:00000071011BA288 B loc_71011BA31C | |
| .text:00000071011BA28C ; --------------------------------------------------------------------------- | |
| .text:00000071011BA28C | |
| .text:00000071011BA28C loc_71011BA28C ; CODE XREF: camp_item_get_success+18↑j | |
| .text:00000071011BA28C LDR X0, [X0,#0x58] | |
| .text:00000071011BA290 BL Pml.PokePara.CoreParam$$GetCampFriendship | |
| .text:00000071011BA294 AND W0, W0, #0xFF | |
| .text:00000071011BA298 CMP W0, #0xFE | |
| .text:00000071011BA29C B.HI loc_71011BA280 | |
| .text:00000071011BA2A0 | |
| .text:00000071011BA2A0 loc_71011BA2A0 ; CODE XREF: camp_item_get_success+2C↑j | |
| .text:00000071011BA2A0 CMP W0, #0xDC | |
| .text:00000071011BA2A4 B.CS loc_71011BA2E4 | |
| .text:00000071011BA2A8 CMP W0, #0xB3 | |
| .text:00000071011BA2AC B.HI loc_71011BA2F0 | |
| .text:00000071011BA2B0 CMP W0, #0x81 | |
| .text:00000071011BA2B4 B.HI loc_71011BA2FC | |
| .text:00000071011BA2B8 CMP W0, #0x4F ; 'O' | |
| .text:00000071011BA2BC B.HI loc_71011BA308 | |
| .text:00000071011BA2C0 CMP W0, #0x1D | |
| .text:00000071011BA2C4 B.HI loc_71011BA314 | |
| .text:00000071011BA2C8 CBZ W0, loc_71011BA2D8 | |
| .text:00000071011BA2CC ADRL X8, dword_7102068BF8 | |
| .text:00000071011BA2D4 B loc_71011BA31C | |
| .text:00000071011BA2D8 ; --------------------------------------------------------------------------- | |
| .text:00000071011BA2D8 | |
| .text:00000071011BA2D8 loc_71011BA2D8 ; CODE XREF: camp_item_get_success+1C↑j | |
| .text:00000071011BA2D8 ; camp_item_get_success+78↑j | |
| .text:00000071011BA2D8 ADRL X8, dword_7102068C04 | |
| .text:00000071011BA2E0 B loc_71011BA31C | |
| .text:00000071011BA2E4 ; --------------------------------------------------------------------------- | |
| .text:00000071011BA2E4 | |
| .text:00000071011BA2E4 loc_71011BA2E4 ; CODE XREF: camp_item_get_success+54↑j | |
| .text:00000071011BA2E4 ADRL X8, dword_7102068BBC | |
| .text:00000071011BA2EC B loc_71011BA31C | |
| .text:00000071011BA2F0 ; --------------------------------------------------------------------------- | |
| .text:00000071011BA2F0 | |
| .text:00000071011BA2F0 loc_71011BA2F0 ; CODE XREF: camp_item_get_success+5C↑j | |
| .text:00000071011BA2F0 ADRL X8, dword_7102068BC8 | |
| .text:00000071011BA2F8 B loc_71011BA31C | |
| .text:00000071011BA2FC ; --------------------------------------------------------------------------- | |
| .text:00000071011BA2FC | |
| .text:00000071011BA2FC loc_71011BA2FC ; CODE XREF: camp_item_get_success+64↑j | |
| .text:00000071011BA2FC ADRL X8, dword_7102068BD4 | |
| .text:00000071011BA304 B loc_71011BA31C | |
| .text:00000071011BA308 ; --------------------------------------------------------------------------- | |
| .text:00000071011BA308 | |
| .text:00000071011BA308 loc_71011BA308 ; CODE XREF: camp_item_get_success+6C↑j | |
| .text:00000071011BA308 ADRL X8, dword_7102068BE0 | |
| .text:00000071011BA310 B loc_71011BA31C | |
| .text:00000071011BA314 ; --------------------------------------------------------------------------- | |
| .text:00000071011BA314 | |
| .text:00000071011BA314 loc_71011BA314 ; CODE XREF: camp_item_get_success+74↑j | |
| .text:00000071011BA314 ADRL X8, dword_7102068BEC | |
| .text:00000071011BA31C | |
| .text:00000071011BA31C loc_71011BA31C ; CODE XREF: camp_item_get_success+38↑j | |
| .text:00000071011BA31C ; camp_item_get_success+84↑j ... | |
| .text:00000071011BA31C ADRP X9, #off_7102610848@PAGE | |
| .text:00000071011BA320 LDR X9, [X9,#off_7102610848@PAGEOFF] | |
| .text:00000071011BA324 ADD X8, X8, W19,SXTW#2 | |
| .text:00000071011BA328 LDR S8, [X8,#4] | |
| .text:00000071011BA32C LDR X8, [X9] | |
| .text:00000071011BA330 LDR X0, [X8,#0x98] | |
| .text:00000071011BA334 FMOV S0, #1.0 | |
| .text:00000071011BA338 BL get_rand_float | |
| .text:00000071011BA33C FCMP S0, S8 | |
| .text:00000071011BA340 LDP X29, X30, [SP,#0x10+var_s0] | |
| .text:00000071011BA344 LDR X19, [SP,#0x10+var_8] | |
| .text:00000071011BA348 CSET W0, MI | |
| .text:00000071011BA34C LDR D8, [SP+0x10+var_10],#0x20 | |
| .text:00000071011BA350 RET | |
| .text:00000071011BA350 ; End of function camp_item_get_success | |
| ---- | |
| .rodata.2:0000007102068BB0 dword_7102068BB0 DCD 255 ; DATA XREF: camp_item_get_success:loc_71011BA280↑o | |
| .rodata.2:0000007102068BB4 DCD 0x3D4CCCCD | |
| .rodata.2:0000007102068BB8 DCD 0x3D75C28F | |
| .rodata.2:0000007102068BBC dword_7102068BBC DCD 220 ; DATA XREF: camp_item_get_success:loc_71011BA2E4↑o | |
| .rodata.2:0000007102068BC0 DCD 0x3D23D70A | |
| .rodata.2:0000007102068BC4 DCD 0x3D4CCCCD | |
| .rodata.2:0000007102068BC8 dword_7102068BC8 DCD 180 ; DATA XREF: camp_item_get_success:loc_71011BA2F0↑o | |
| .rodata.2:0000007102068BCC DCD 0x3CF5C28F | |
| .rodata.2:0000007102068BD0 DCD 0x3D23D70A | |
| .rodata.2:0000007102068BD4 dword_7102068BD4 DCD 130 ; DATA XREF: camp_item_get_success:loc_71011BA2FC↑o | |
| .rodata.2:0000007102068BD8 DCD 0x3CA3D70A | |
| .rodata.2:0000007102068BDC DCD 0x3CF5C28F | |
| .rodata.2:0000007102068BE0 dword_7102068BE0 DCD 80 ; DATA XREF: camp_item_get_success:loc_71011BA308↑o | |
| .rodata.2:0000007102068BE4 DCD 0x3C23D70A | |
| .rodata.2:0000007102068BE8 DCD 0x3CA3D70A | |
| .rodata.2:0000007102068BEC dword_7102068BEC DCD 30 ; DATA XREF: camp_item_get_success:loc_71011BA314↑o | |
| .rodata.2:0000007102068BF0 DCD 0 | |
| .rodata.2:0000007102068BF4 DCD 0 | |
| .rodata.2:0000007102068BF8 dword_7102068BF8 DCD 1 ; DATA XREF: camp_item_get_success+7C↑o | |
| .rodata.2:0000007102068BFC DCD 0 | |
| .rodata.2:0000007102068C00 DCD 0 | |
| .rodata.2:0000007102068C04 dword_7102068C04 DCD 0 ; DATA XREF: camp_item_get_success:loc_71011BA2D8↑o | |
| .rodata.2:0000007102068C08 DCD 0 | |
| .rodata.2:0000007102068C0C DCD 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment