{"type": "func", "start": 6442479952, "end": 6442480052, "name": "cocos2d::CCArray::randomObject", "pseudocode": "// \n// cocos2d::CCArray::randomObject from 0x180007150 to 0x1800071b4 (100 bytes)\n// \n// 3 xrefs:\n// > cocos2d::CCDictionary::randomObject @ 0x18000a95a\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801ad9d8\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\nstruct cocos2d::CCObject *__fastcall cocos2d::CCArray::randomObject(cocos2d::CCArray *this)\n{\n  float v3; // xmm1_4\n\n  if ( !this->data->num )\n    return nullptr;\n  v3 = (float)rand() / 32767.0;\n  if ( v3 == 1.0 )\n    v3 = 0.0;\n  return this->data->arr[(float)((float)this->data->num * v3)];\n}", "assembly": "; \n; cocos2d::CCArray::randomObject from 0x180007150 to 0x1800071b4 (100 bytes)\n; \n; 3 xrefs:\n; > cocos2d::CCDictionary::randomObject @ 0x18000a95a\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801ad9d8\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    rbx                                                            ; +0x0, 0x180007150\nsub     rsp, 20h                                                       ; +0x2, 0x180007152\nmov     rax, [rcx+38h]                                                 ; +0x6, 0x180007156\nmov     rbx, rcx                                                       ; +0xa, 0x18000715a\ncmp     dword ptr [rax], 0                                             ; +0xd, 0x18000715d\njnz     short loc_18000716A                                            ; +0x10, 0x180007160\nxor     eax, eax                                                       ; +0x12, 0x180007162\nadd     rsp, 20h                                                       ; +0x14, 0x180007164\npop     rbx                                                            ; +0x18, 0x180007168\nretn                                                                   ; +0x19, 0x180007169\ncall    cs:rand                                                        ; +0x1a, 0x18000716a\nmovd    xmm1, eax                                                      ; +0x20, 0x180007170\ncvtdq2ps xmm1, xmm1                                                    ; +0x24, 0x180007174\ndivss   xmm1, cs:dword_1800E630C                                       ; +0x27, 0x180007177\nucomiss xmm1, cs:flt_1800E61A8                                         ; +0x2f, 0x18000717f\njp      short loc_18000718D                                            ; +0x36, 0x180007186\njnz     short loc_18000718D                                            ; +0x38, 0x180007188\nxorps   xmm1, xmm1                                                     ; +0x3a, 0x18000718a\nmov     rdx, [rbx+38h]                                                 ; +0x3d, 0x18000718d\nxorps   xmm0, xmm0                                                     ; +0x41, 0x180007191\nmov     eax, [rdx]                                                     ; +0x44, 0x180007194\ncvtsi2ss xmm0, rax                                                     ; +0x46, 0x180007196\nmulss   xmm0, xmm1                                                     ; +0x4b, 0x18000719b\ncvttss2si eax, xmm0                                                    ; +0x4f, 0x18000719f\nmovsxd  rcx, eax                                                       ; +0x53, 0x1800071a3\nmov     rax, [rdx+10h]                                                 ; +0x56, 0x1800071a6\nmov     rax, [rax+rcx*8]                                               ; +0x5a, 0x1800071aa\nadd     rsp, 20h                                                       ; +0x5e, 0x1800071ae\npop     rbx                                                            ; +0x62, 0x1800071b2\nretn                                                                   ; +0x63, 0x1800071b3", "xrefs": ["cocos2d::CCDictionary::randomObject @ 0x18000a95a", "<???> @ 0x1801438a8", "<???> @ 0x1801ad9d8"], "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"}