{"type": "func", "start": 4769820, "end": 4770070, "name": "GJBaseGameLayer::generatePickupAnimRandVal", "pseudocode": "// \n// GJBaseGameLayer::generatePickupAnimRandVal from 0x48c81c to 0x48c916 (250 bytes)\n// \n// 1 xrefs:\n// > GameObject::playDestroyObjectAnim @ 0x52b156\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 GJBaseGameLayer::generatePickupAnimRandVal(GJBaseGameLayer *a1, GameObject *a2, float *a3, float *a4)\n{\n  const cocos2d::CCPoint *v8; // r7\n  const cocos2d::CCPoint *v9; // r0\n  float x; // s14\n  std::map<std::pair<int, int>,std::pair<float, float>> *p_m_destroyObjectValues; // r7\n  std::_rb_tree_base *m_parent; // r4\n  std::_rb_tree_base *p_m_header; // r11\n  std::_rb_tree_base *v14; // r5\n  std::_rb_tree_base *m_right; // r3\n  int v16; // r2\n  int v17; // s16\n  int v18; // s17\n  int v19; // r2\n  float *v20; // r0\n  int v21; // r2\n  _DWORD v22[2]; // [sp+4h] [bp-10h] BYREF\n\n  v8 = a2->getPosition(a2);\n  v9 = a2->getPosition(a2);\n  x = v8->x;\n  p_m_destroyObjectValues = &a1->m_destroyObjectValues;\n  m_parent = a1->m_destroyObjectValues.m_header.m_parent;\n  p_m_header = &a1->m_destroyObjectValues.m_header;\n  v14 = &a1->m_destroyObjectValues.m_header;\n  v22[0] = (int)x;\n  v22[1] = (int)v9->y;\n  while ( m_parent )\n  {\n    if ( std::operator<<int,int>(&m_parent[1].m_isblack, v22) )\n    {\n      m_right = m_parent->m_right;\n      m_parent = v14;\n    }\n    else\n    {\n      m_right = m_parent->m_left;\n    }\n    v14 = m_parent;\n    m_parent = m_right;\n  }\n  if ( v14 == p_m_header || std::operator<<int,int>(v22, &v14[1].m_isblack) )\n  {\n    v17 = rand();\n    v18 = rand();\n    v20 = (float *)std::map<std::pair<int,int>,std::pair<float,float>>::operator[](p_m_destroyObjectValues, v22, v19);\n    v20[1] = (float)v18 * 4.6566e-10;\n    *v20 = (float)((float)((float)v17 * 4.6566e-10) + (float)((float)v17 * 4.6566e-10)) - 1.0;\n  }\n  *a3 = *(float *)std::map<std::pair<int,int>,std::pair<float,float>>::operator[](p_m_destroyObjectValues, v22, v16);\n  *a4 = *(float *)(std::map<std::pair<int,int>,std::pair<float,float>>::operator[](p_m_destroyObjectValues, v22, v21) + 4);\n}", "assembly": "; \n; GJBaseGameLayer::generatePickupAnimRandVal from 0x48c81c to 0x48c916 (250 bytes)\n; \n; 1 xrefs:\n; > GameObject::playDestroyObjectAnim @ 0x52b156\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\nPUSH.W          {R4-R11,LR}                                            ; +0x0, 0x48c81c\nMOV             R9, R3                                                 ; +0x4, 0x48c820\nLDR             R6, =(__stack_chk_guard_ptr - 0x48C830)                ; +0x6, 0x48c822\nMOV             R5, R0                                                 ; +0x8, 0x48c824\nVPUSH           {D8}                                                   ; +0xa, 0x48c826\nMOV             R0, R1                                                 ; +0xe, 0x48c82a\nADD             R6, PC; __stack_chk_guard_ptr                          ; +0x10, 0x48c82c\nLDR             R6, [R6]; __stack_chk_guard                            ; +0x12, 0x48c82e\nMOV             R4, R1                                                 ; +0x14, 0x48c830\nMOV             R10, R2                                                ; +0x16, 0x48c832\nLDR             R3, [R6]                                               ; +0x18, 0x48c834\nSUB             SP, SP, #0x14                                          ; +0x1a, 0x48c836\nADD.W           R8, SP, #0x14+var_10                                   ; +0x1c, 0x48c838\nSTR             R3, [SP,#0x14+var_8]                                   ; +0x20, 0x48c83c\nLDR             R3, [R1]                                               ; +0x22, 0x48c83e\nLDR             R3, [R3,#0x60]                                         ; +0x24, 0x48c840\nBLX             R3                                                     ; +0x26, 0x48c842\nLDR             R3, [R4]                                               ; +0x28, 0x48c844\nLDR             R3, [R3,#0x60]                                         ; +0x2a, 0x48c846\nMOV             R7, R0                                                 ; +0x2c, 0x48c848\nMOV             R0, R4                                                 ; +0x2e, 0x48c84a\nBLX             R3                                                     ; +0x30, 0x48c84c\nVLDR            S14, [R7]                                              ; +0x32, 0x48c84e\nADD.W           R7, R5, #0x2980                                        ; +0x36, 0x48c852\nMOVW            R3, #0x29B4                                            ; +0x3a, 0x48c856\nADDS            R7, #0x2C ; ','                                        ; +0x3e, 0x48c85a\nLDR             R4, [R5,R3]                                            ; +0x40, 0x48c85c\nADD.W           R11, R7, #4                                            ; +0x42, 0x48c85e\nVCVT.S32.F32    S14, S14                                               ; +0x46, 0x48c862\nMOV             R5, R11                                                ; +0x4a, 0x48c866\nVSTR            S14, [SP,#0x14+var_10]                                 ; +0x4c, 0x48c868\nVLDR            S15, [R0,#4]                                           ; +0x50, 0x48c86c\nVCVT.S32.F32    S15, S15                                               ; +0x54, 0x48c870\nVSTR            S15, [SP,#0x14+var_C]                                  ; +0x58, 0x48c874\nCBZ             R4, loc_48C894                                         ; +0x5c, 0x48c878\nADD.W           R0, R4, #0x10                                          ; +0x5e, 0x48c87a\nMOV             R1, R8                                                 ; +0x62, 0x48c87e\nBL              _ZStltIiiEbRKSt4pairIT_T0_ES5_; std::operator<<int,int>(std::pair<int,int> const&,std::pair<int,int> const&) ; +0x64, 0x48c880\nCBNZ            R0, loc_48C88A                                         ; +0x68, 0x48c884\nLDR             R3, [R4,#8]                                            ; +0x6a, 0x48c886\nB               loc_48C88E                                             ; +0x6c, 0x48c888\nLDR             R3, [R4,#0xC]                                          ; +0x6e, 0x48c88a\nMOV             R4, R5                                                 ; +0x70, 0x48c88c\nMOV             R5, R4                                                 ; +0x72, 0x48c88e\nMOV             R4, R3                                                 ; +0x74, 0x48c890\nB               loc_48C878                                             ; +0x76, 0x48c892\nCMP             R5, R11                                                ; +0x78, 0x48c894\nBEQ             loc_48C8A4                                             ; +0x7a, 0x48c896\nMOV             R0, R8                                                 ; +0x7c, 0x48c898\nADD.W           R1, R5, #0x10                                          ; +0x7e, 0x48c89a\nBL              _ZStltIiiEbRKSt4pairIT_T0_ES5_; std::operator<<int,int>(std::pair<int,int> const&,std::pair<int,int> const&) ; +0x82, 0x48c89e\nCBZ             R0, loc_48C8E4                                         ; +0x86, 0x48c8a2\nBLX             rand                                                   ; +0x88, 0x48c8a4\nVMOV            S16, R0                                                ; +0x8c, 0x48c8a8\nBLX             rand                                                   ; +0x90, 0x48c8ac\nMOV             R1, R8                                                 ; +0x94, 0x48c8b0\nVMOV            S17, R0                                                ; +0x96, 0x48c8b2\nMOV             R0, R7                                                 ; +0x9a, 0x48c8b6\nBL              _ZNSt3mapISt4pairIiiES0_IffESt4lessIS1_ESaIS0_IKS1_S2_EEEixERS5_; std::map<std::pair<int,int>,std::pair<float,float>>::operator[](std::pair<int,int> const&) ; +0x9c, 0x48c8b8\nVCVT.F32.S32    S16, S16                                               ; +0xa0, 0x48c8bc\nVLDR            S14, =4.6566e-10                                       ; +0xa4, 0x48c8c0\nVMUL.F32        S15, S16, S14                                          ; +0xa8, 0x48c8c4\nVMOV.F32        S13, #1.0                                              ; +0xac, 0x48c8c8\nVADD.F32        S15, S15, S15                                          ; +0xb0, 0x48c8cc\nVCVT.F32.S32    S17, S17                                               ; +0xb4, 0x48c8d0\nVMUL.F32        S17, S17, S14                                          ; +0xb8, 0x48c8d4\nVSUB.F32        S15, S15, S13                                          ; +0xbc, 0x48c8d8\nVSTR            S17, [R0,#4]                                           ; +0xc0, 0x48c8dc\nVSTR            S15, [R0]                                              ; +0xc4, 0x48c8e0\nMOV             R1, R8                                                 ; +0xc8, 0x48c8e4\nMOV             R0, R7                                                 ; +0xca, 0x48c8e6\nBL              _ZNSt3mapISt4pairIiiES0_IffESt4lessIS1_ESaIS0_IKS1_S2_EEEixERS5_; std::map<std::pair<int,int>,std::pair<float,float>>::operator[](std::pair<int,int> const&) ; +0xcc, 0x48c8e8\nMOV             R1, R8                                                 ; +0xd0, 0x48c8ec\nLDR             R3, [R0]                                               ; +0xd2, 0x48c8ee\nMOV             R0, R7                                                 ; +0xd4, 0x48c8f0\nSTR.W           R3, [R10]                                              ; +0xd6, 0x48c8f2\nBL              _ZNSt3mapISt4pairIiiES0_IffESt4lessIS1_ESaIS0_IKS1_S2_EEEixERS5_; std::map<std::pair<int,int>,std::pair<float,float>>::operator[](std::pair<int,int> const&) ; +0xda, 0x48c8f6\nLDR             R2, [SP,#0x14+var_8]                                   ; +0xde, 0x48c8fa\nLDR             R3, [R0,#4]                                            ; +0xe0, 0x48c8fc\nSTR.W           R3, [R9]                                               ; +0xe2, 0x48c8fe\nLDR             R3, [R6]                                               ; +0xe6, 0x48c902\nCMP             R2, R3                                                 ; +0xe8, 0x48c904\nBEQ             loc_48C90C                                             ; +0xea, 0x48c906\nBLX             __stack_chk_fail                                       ; +0xec, 0x48c908\nADD             SP, SP, #0x14                                          ; +0xf0, 0x48c90c\nVPOP            {D8}                                                   ; +0xf2, 0x48c90e\nPOP.W           {R4-R11,PC}                                            ; +0xf6, 0x48c912", "xrefs": ["GameObject::playDestroyObjectAnim @ 0x52b156"], "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"}