{"type": "func", "start": 4296972848, "end": 4296973184, "name": "GJBaseGameLayer::generatePickupAnimRandVal", "pseudocode": "// \n// GJBaseGameLayer::generatePickupAnimRandVal from 0x1001e9a30 to 0x1001e9b80 (336 bytes)\n// \n// 1 xrefs:\n// > GameObject::playDestroyObjectAnim @ 0x10034a378\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid __fastcall GJBaseGameLayer::generatePickupAnimRandVal(GJBaseGameLayer *a1, GameObject *a2, float *a3, float *a4)\n{\n  float *v8; // x23\n  __int64 v9; // x0\n  int v10; // w8\n  int v11; // w9\n  std::__tree_end_node<std::__tree_node_base<void *> *>::pointer left; // x10\n  int v13; // w11\n  int v14; // w11\n  float v15; // s8\n  float v16; // s9\n  __int64 v17; // x0\n  _DWORD v18[2]; // [xsp+Ch] [xbp-54h] BYREF\n  char v19; // [xsp+17h] [xbp-49h] BYREF\n  _DWORD *v20; // [xsp+18h] [xbp-48h] BYREF\n\n  v8 = (float *)((__int64 (__fastcall *)(GameObject *))a2->getPosition)(a2);\n  v9 = ((__int64 (__fastcall *)(GameObject *))a2->getPosition)(a2);\n  v10 = (int)*v8;\n  v11 = (int)*(float *)(v9 + 4);\n  v18[0] = v10;\n  v18[1] = v11;\n  left = a1->m_destroyObjectValues.__tree_.__pair1_.__value_.__left_;\n  if ( left )\n  {\n    while ( 1 )\n    {\n      v13 = *((_DWORD *)left + 7);\n      if ( v13 <= v10 )\n      {\n        if ( v13 < v10 )\n          goto LABEL_6;\n        v14 = *((_DWORD *)left + 8);\n        if ( v14 <= v11 )\n          break;\n      }\nLABEL_7:\n      left = *(std::__tree_end_node<std::__tree_node_base<void *> *>::pointer *)left;\n      if ( !left )\n        goto LABEL_8;\n    }\n    if ( v14 >= v11 )\n      goto LABEL_9;\nLABEL_6:\n    left = (std::__tree_end_node<std::__tree_node_base<void *> *>::pointer)((char *)left + 8);\n    goto LABEL_7;\n  }\nLABEL_8:\n  v15 = (float)(vcvts_n_f32_s32(rand(), 0x1Fu) * 2.0) + -1.0;\n  v16 = vcvts_n_f32_s32(rand(), 0x1Fu);\n  v20 = v18;\n  v17 = sub_10020BE58(&a1->m_destroyObjectValues, v18, &unk_10063A31C, &v20, &v19);\n  *(float *)(v17 + 36) = v15;\n  *(float *)(v17 + 40) = v16;\nLABEL_9:\n  v20 = v18;\n  *a3 = *(float *)(sub_10020BE58(&a1->m_destroyObjectValues, v18, &unk_10063A31C, &v20, &v19) + 36);\n  v20 = v18;\n  *a4 = *(float *)(sub_10020BE58(&a1->m_destroyObjectValues, v18, &unk_10063A31C, &v20, &v19) + 40);\n}", "assembly": "; \n; GJBaseGameLayer::generatePickupAnimRandVal from 0x1001e9a30 to 0x1001e9b80 (336 bytes)\n; \n; 1 xrefs:\n; > GameObject::playDestroyObjectAnim @ 0x10034a378\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nSUB             SP, SP, #0x70                                          ; +0x0, 0x1001e9a30\nSTP             D9, D8, [SP,#0x60+var_40]                              ; +0x4, 0x1001e9a34\nSTP             X24, X23, [SP,#0x60+var_30]                            ; +0x8, 0x1001e9a38\nSTP             X22, X21, [SP,#0x60+var_20]                            ; +0xc, 0x1001e9a3c\nSTP             X20, X19, [SP,#0x60+var_10]                            ; +0x10, 0x1001e9a40\nSTP             X29, X30, [SP,#0x60+var_s0]                            ; +0x14, 0x1001e9a44\nADD             X29, SP, #0x60                                         ; +0x18, 0x1001e9a48\nMOV             X19, X3                                                ; +0x1c, 0x1001e9a4c\nMOV             X21, X2                                                ; +0x20, 0x1001e9a50\nMOV             X22, X1                                                ; +0x24, 0x1001e9a54\nMOV             X20, X0                                                ; +0x28, 0x1001e9a58\nLDR             X8, [X1]                                               ; +0x2c, 0x1001e9a5c\nLDR             X8, [X8,#0xC0]                                         ; +0x30, 0x1001e9a60\nMOV             X0, X1                                                 ; +0x34, 0x1001e9a64\nBLR             X8                                                     ; +0x38, 0x1001e9a68\nMOV             X23, X0                                                ; +0x3c, 0x1001e9a6c\nLDR             X8, [X22]                                              ; +0x40, 0x1001e9a70\nLDR             X8, [X8,#0xC0]                                         ; +0x44, 0x1001e9a74\nMOV             X0, X22                                                ; +0x48, 0x1001e9a78\nBLR             X8                                                     ; +0x4c, 0x1001e9a7c\nLDR             S0, [X23]                                              ; +0x50, 0x1001e9a80\nLDR             S1, [X0,#4]                                            ; +0x54, 0x1001e9a84\nFCVTZS          W8, S0                                                 ; +0x58, 0x1001e9a88\nFCVTZS          W9, S1                                                 ; +0x5c, 0x1001e9a8c\nSTP             W8, W9, [SP,#0x60+var_54]                              ; +0x60, 0x1001e9a90\nMOV             W23, #0x2EE0                                           ; +0x64, 0x1001e9a94\nLDR             X10, [X20,#0x2EE8]                                     ; +0x68, 0x1001e9a98\nCBZ             X10, loc_1001E9ACC                                     ; +0x6c, 0x1001e9a9c\nLDR             W11, [X10,#0x1C]                                       ; +0x70, 0x1001e9aa0\nCMP             W11, W8                                                ; +0x74, 0x1001e9aa4\nB.GT            loc_1001E9AC4                                          ; +0x78, 0x1001e9aa8\nB.LT            loc_1001E9AC0                                          ; +0x7c, 0x1001e9aac\nLDR             W11, [X10,#0x20]                                       ; +0x80, 0x1001e9ab0\nCMP             W11, W9                                                ; +0x84, 0x1001e9ab4\nB.GT            loc_1001E9AC4                                          ; +0x88, 0x1001e9ab8\nB.GE            loc_1001E9B10                                          ; +0x8c, 0x1001e9abc\nADD             X10, X10, #8                                           ; +0x90, 0x1001e9ac0\nLDR             X10, [X10]                                             ; +0x94, 0x1001e9ac4\nCBNZ            X10, loc_1001E9AA0                                     ; +0x98, 0x1001e9ac8\nBL              _rand                                                  ; +0x9c, 0x1001e9acc\nSCVTF           S0, W0, #0x1F                                          ; +0xa0, 0x1001e9ad0\nFMOV            S1, #-1.0                                              ; +0xa4, 0x1001e9ad4\nFMOV            S2, #2.0                                               ; +0xa8, 0x1001e9ad8\nFMADD           S8, S0, S2, S1                                         ; +0xac, 0x1001e9adc\nBL              _rand                                                  ; +0xb0, 0x1001e9ae0\nSCVTF           S9, W0, #0x1F                                          ; +0xb4, 0x1001e9ae4\nADD             X8, SP, #0x60+var_54                                   ; +0xb8, 0x1001e9ae8\nSTR             X8, [SP,#0x60+var_48]                                  ; +0xbc, 0x1001e9aec\nADRL            X2, unk_10063A31C                                      ; +0xc0, 0x1001e9af0\nADD             X0, X20, X23                                           ; +0xc8, 0x1001e9af8\nADD             X1, SP, #0x60+var_54                                   ; +0xcc, 0x1001e9afc\nADD             X3, SP, #0x60+var_48                                   ; +0xd0, 0x1001e9b00\nADD             X4, SP, #0x60+var_49                                   ; +0xd4, 0x1001e9b04\nBL              sub_10020BE58                                          ; +0xd8, 0x1001e9b08\nSTP             S8, S9, [X0,#0x24]                                     ; +0xdc, 0x1001e9b0c\nADD             X24, SP, #0x60+var_54                                  ; +0xe0, 0x1001e9b10\nSTR             X24, [SP,#0x60+var_48]                                 ; +0xe4, 0x1001e9b14\nADRL            X22, unk_10063A31C                                     ; +0xe8, 0x1001e9b18\nADD             X0, X20, X23                                           ; +0xf0, 0x1001e9b20\nADD             X1, SP, #0x60+var_54                                   ; +0xf4, 0x1001e9b24\nADD             X3, SP, #0x60+var_48                                   ; +0xf8, 0x1001e9b28\nADD             X4, SP, #0x60+var_49                                   ; +0xfc, 0x1001e9b2c\nMOV             X2, X22                                                ; +0x100, 0x1001e9b30\nBL              sub_10020BE58                                          ; +0x104, 0x1001e9b34\nLDR             S0, [X0,#0x24]                                         ; +0x108, 0x1001e9b38\nSTR             S0, [X21]                                              ; +0x10c, 0x1001e9b3c\nSTR             X24, [SP,#0x60+var_48]                                 ; +0x110, 0x1001e9b40\nADD             X0, X20, X23                                           ; +0x114, 0x1001e9b44\nADD             X1, SP, #0x60+var_54                                   ; +0x118, 0x1001e9b48\nADD             X3, SP, #0x60+var_48                                   ; +0x11c, 0x1001e9b4c\nADD             X4, SP, #0x60+var_49                                   ; +0x120, 0x1001e9b50\nMOV             X2, X22                                                ; +0x124, 0x1001e9b54\nBL              sub_10020BE58                                          ; +0x128, 0x1001e9b58\nLDR             S0, [X0,#0x28]                                         ; +0x12c, 0x1001e9b5c\nSTR             S0, [X19]                                              ; +0x130, 0x1001e9b60\nLDP             X29, X30, [SP,#0x60+var_s0]                            ; +0x134, 0x1001e9b64\nLDP             X20, X19, [SP,#0x60+var_10]                            ; +0x138, 0x1001e9b68\nLDP             X22, X21, [SP,#0x60+var_20]                            ; +0x13c, 0x1001e9b6c\nLDP             X24, X23, [SP,#0x60+var_30]                            ; +0x140, 0x1001e9b70\nLDP             D9, D8, [SP,#0x60+var_40]                              ; +0x144, 0x1001e9b74\nADD             SP, SP, #0x70 ; 'p'                                    ; +0x148, 0x1001e9b78\nRET                                                                    ; +0x14c, 0x1001e9b7c", "xrefs": ["GameObject::playDestroyObjectAnim @ 0x10034a378"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}