{"type": "func", "start": 4605344, "end": 4605496, "name": "DrawGridLayer::getPortalMinMax", "pseudocode": "// \n// DrawGridLayer::getPortalMinMax from 0x4645a0 to 0x464638 (152 bytes)\n// \n// 1 xrefs:\n// > DrawGridLayer::draw @ 0x464faa\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:48:54 +0000\n// \n\nDrawGridLayer *__fastcall DrawGridLayer::getPortalMinMax(DrawGridLayer *this, GameObject *a2, int a3)\n{\n  float v5; // s17\n  int v6; // r0\n  float v7; // s15\n\n  if ( (*(int (__fastcall **)(int, GameObject *))(*(_DWORD *)a3 + 900))(a3, a2) == 16 )\n  {\n    v5 = 240.0;\n  }\n  else\n  {\n    v5 = 300.0;\n    if ( (*(int (__fastcall **)(int))(*(_DWORD *)a3 + 900))(a3) == 33 )\n      v5 = 270.0;\n  }\n  v6 = (*(int (__fastcall **)(int))(*(_DWORD *)a3 + 96))(a3);\n  v7 = floorf((float)((float)(*(float *)(v6 + 4) - (float)(v5 * 0.5)) + 0.0) / 30.0) * 30.0;\n  if ( v7 <= 90.0 )\n    v7 = 90.0;\n  cocos2d::CCPoint::CCPoint(this, v7, v7 + v5);\n  return this;\n}", "assembly": "; \n; DrawGridLayer::getPortalMinMax from 0x4645a0 to 0x464638 (152 bytes)\n; \n; 1 xrefs:\n; > DrawGridLayer::draw @ 0x464faa\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:48:54 +0000\n; \nPUSH            {R3-R5,LR}                                             ; +0x0, 0x4645a0\nMOV             R5, R0                                                 ; +0x2, 0x4645a2\nVPUSH           {D8}                                                   ; +0x4, 0x4645a4\nMOV             R0, R2                                                 ; +0x8, 0x4645a8\nMOV             R4, R2                                                 ; +0xa, 0x4645aa\nLDR             R3, [R2]                                               ; +0xc, 0x4645ac\nLDR.W           R3, [R3,#0x384]                                        ; +0xe, 0x4645ae\nBLX             R3                                                     ; +0x12, 0x4645b2\nCMP             R0, #0x10                                              ; +0x14, 0x4645b4\nBEQ             loc_4645D4                                             ; +0x16, 0x4645b6\nLDR             R3, [R4]                                               ; +0x18, 0x4645b8\nMOV             R0, R4                                                 ; +0x1a, 0x4645ba\nVLDR            S17, =300.0                                            ; +0x1c, 0x4645bc\nLDR.W           R3, [R3,#0x384]                                        ; +0x20, 0x4645c0\nBLX             R3                                                     ; +0x24, 0x4645c4\nVLDR            S15, =270.0                                            ; +0x26, 0x4645c6\nCMP             R0, #0x21 ; '!'                                        ; +0x2a, 0x4645ca\nIT EQ                                                                  ; +0x2c, 0x4645cc\nVMOVEQ.F32      S17, S15                                               ; +0x2e, 0x4645ce\nB               loc_4645D8                                             ; +0x32, 0x4645d2\nVLDR            S17, =240.0                                            ; +0x34, 0x4645d4\nLDR             R3, [R4]                                               ; +0x38, 0x4645d8\nMOV             R0, R4                                                 ; +0x3a, 0x4645da\nVMOV.F32        S16, #30.0                                             ; +0x3c, 0x4645dc\nLDR             R3, [R3,#0x60]                                         ; +0x40, 0x4645e0\nBLX             R3                                                     ; +0x42, 0x4645e2\nVMOV.F32        S14, #0.5                                              ; +0x44, 0x4645e4\nVLDR            S15, [R0,#4]                                           ; +0x48, 0x4645e8\nVMLS.F32        S15, S17, S14                                          ; +0x4c, 0x4645ec\nVLDR            S14, =0.0                                              ; +0x50, 0x4645f0\nVADD.F32        S15, S15, S14                                          ; +0x54, 0x4645f4\nVDIV.F32        S15, S15, S16                                          ; +0x58, 0x4645f8\nVMOV            R0, S15; x                                             ; +0x5c, 0x4645fc\nBLX             floorf                                                 ; +0x60, 0x464600\nVLDR            S14, =90.0                                             ; +0x64, 0x464604\nVMOV            S15, R0                                                ; +0x68, 0x464608\nMOV             R0, R5; this                                           ; +0x6c, 0x46460c\nVMUL.F32        S15, S15, S16                                          ; +0x6e, 0x46460e\nVCMPE.F32       S15, S14                                               ; +0x72, 0x464612\nVMRS            APSR_nzcv, FPSCR                                       ; +0x76, 0x464616\nIT LE                                                                  ; +0x7a, 0x46461a\nVMOVLE.F32      S15, S14                                               ; +0x7c, 0x46461c\nVMOV            R1, S15; float                                         ; +0x80, 0x464620\nVADD.F32        S15, S15, S17                                          ; +0x84, 0x464624\nVMOV            R2, S15; float                                         ; +0x88, 0x464628\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x8c, 0x46462c\nVPOP            {D8}                                                   ; +0x90, 0x464630\nMOV             R0, R5                                                 ; +0x94, 0x464634\nPOP             {R3-R5,PC}                                             ; +0x96, 0x464636", "xrefs": ["DrawGridLayer::draw @ 0x464faa"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}