{"type": "func", "start": 5284832, "end": 5285096, "name": "AudioEffectsLayer::getBGSquare", "pseudocode": "// \n// AudioEffectsLayer::getBGSquare from 0x50a3e0 to 0x50a4e8 (264 bytes)\n// \n// 0 xrefs:\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:51:27 +0000\n// \n\nfloat *__fastcall AudioEffectsLayer::getBGSquare(AudioEffectsLayer *this)\n{\n  unsigned int v1; // r6\n  float v2; // r1\n  float v3; // r2\n  const char *v4; // r1\n  float v5; // s16\n  float *v6; // r4\n  _BYTE v8[8]; // [sp+4h] [bp-18h] BYREF\n  _BYTE v9[8]; // [sp+Ch] [bp-10h] BYREF\n\n  rand();\n  v1 = lroundf();\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v8);\n  switch ( v1 )\n  {\n    case 0u:\n      v2 = 60.0;\n      goto LABEL_21;\n    case 1u:\n      v2 = 170.0;\n      v3 = 40.0;\n      break;\n    case 2u:\n      v2 = 280.0;\n      v3 = 60.0;\n      break;\n    case 3u:\n      v2 = 430.0;\n      v3 = 77.0;\n      break;\n    case 4u:\n      v2 = 25.0;\n      goto LABEL_8;\n    case 5u:\n      v2 = 90.0;\nLABEL_8:\n      v3 = 150.0;\n      break;\n    case 6u:\n      v2 = 170.0;\n      v3 = 380.0;\n      break;\n    case 7u:\n      v2 = 280.0;\n      goto LABEL_19;\n    case 8u:\n      v2 = 360.0;\n      v3 = 186.0;\n      break;\n    case 9u:\n      v2 = 360.0;\n      goto LABEL_14;\n    case 0xAu:\n      v2 = 446.0;\nLABEL_14:\n      v3 = 230.0;\n      break;\n    case 0xBu:\n      v2 = 40.0;\n      v3 = 234.0;\n      break;\n    case 0xCu:\n      v2 = 150.0;\n      v3 = 250.0;\n      break;\n    case 0xDu:\n      v2 = 300.0;\n      v3 = 325.0;\n      break;\n    case 0xEu:\n      v2 = 0.0;\nLABEL_19:\n      v3 = 177.0;\n      break;\n    default:\n      v2 = 0.0;\nLABEL_21:\n      v3 = v2;\n      break;\n  }\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v9, v2, v3);\n  cocos2d::CCPoint::operator=(v8, v9);\n  if ( v1 > 0xE )\n    v5 = 10.0;\n  else\n    v5 = flt_BECAB0[v1];\n  v6 = (float *)cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)\"whiteSquare60_001.png\", v4);\n  (*(void (__fastcall **)(float *, _BYTE *))(*(_DWORD *)v6 + 92))(v6, v8);\n  (*(void (__fastcall **)(float *, _DWORD))(*(_DWORD *)v6 + 80))(v6, v5 / v6[86]);\n  return v6;\n}", "assembly": "; \n; AudioEffectsLayer::getBGSquare from 0x50a3e0 to 0x50a4e8 (264 bytes)\n; \n; 0 xrefs:\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:51:27 +0000\n; \nPUSH            {R4-R7,LR}                                             ; +0x0, 0x50a3e0\nLDR             R7, =(__stack_chk_guard_ptr - 0x50A3EC)                ; +0x2, 0x50a3e2\nVPUSH           {D8}                                                   ; +0x4, 0x50a3e4\nADD             R7, PC; __stack_chk_guard_ptr                          ; +0x8, 0x50a3e8\nLDR             R7, [R7]; __stack_chk_guard                            ; +0xa, 0x50a3ea\nLDR             R3, [R7]                                               ; +0xc, 0x50a3ec\nSUB             SP, SP, #0x1C                                          ; +0xe, 0x50a3ee\nADD             R5, SP, #0x1C+var_18                                   ; +0x10, 0x50a3f0\nADD             R4, SP, #0x1C+var_10                                   ; +0x12, 0x50a3f2\nSTR             R3, [SP,#0x1C+var_8]                                   ; +0x14, 0x50a3f4\nBLX             rand                                                   ; +0x16, 0x50a3f6\nVMOV.F32        S15, #14.0                                             ; +0x1a, 0x50a3fa\nVMOV            S14, R0                                                ; +0x1e, 0x50a3fe\nVCVT.F32.S32    S14, S14, #0x1F                                        ; +0x22, 0x50a402\nVMUL.F32        S15, S14, S15                                          ; +0x26, 0x50a406\nVMOV            R0, S15                                                ; +0x2a, 0x50a40a\nBLX             lroundf                                                ; +0x2e, 0x50a40e\nMOV             R6, R0                                                 ; +0x32, 0x50a412\nMOV             R0, R5; this                                           ; +0x34, 0x50a414\nBL              _ZN7cocos2d7CCPointC1Ev; cocos2d::CCPoint::CCPoint(void) ; +0x36, 0x50a416\nMOV             R0, R4; this                                           ; +0x3a, 0x50a41a\nCMP             R6, #0xE; switch 15 cases                              ; +0x3c, 0x50a41c\nBHI             def_50A420; jumptable 0050A420 default case            ; +0x3e, 0x50a41e\nTBB.W           [PC,R6]; switch jump                                   ; +0x40, 0x50a420\nDCB 8; jump table for switch statement                                 ; +0x44, 0x50a424\nDCB 0xA                                                                ; +0x45, 0x50a425\nDCB 0xD                                                                ; +0x46, 0x50a426\nDCB 0x10                                                               ; +0x47, 0x50a427\nDCB 0x13                                                               ; +0x48, 0x50a428\nDCB 0x15                                                               ; +0x49, 0x50a429\nDCB 0x18                                                               ; +0x4a, 0x50a42a\nDCB 0x1B                                                               ; +0x4b, 0x50a42b\nDCB 0x1D                                                               ; +0x4c, 0x50a42c\nDCB 0x20                                                               ; +0x4d, 0x50a42d\nDCB 0x22                                                               ; +0x4e, 0x50a42e\nDCB 0x25                                                               ; +0x4f, 0x50a42f\nDCB 0x28                                                               ; +0x50, 0x50a430\nDCB 0x2B                                                               ; +0x51, 0x50a431\nDCB 0x2E                                                               ; +0x52, 0x50a432\nALIGN 2                                                                ; +0x53, 0x50a433\nLDR             R1, flt_50A4E8; jumptable 0050A420 case 0              ; +0x54, 0x50a434\nB               loc_50A488                                             ; +0x56, 0x50a436\nLDR             R1, =0x432A0000; jumptable 0050A420 case 1             ; +0x58, 0x50a438\nLDR             R2, =0x42200000                                        ; +0x5a, 0x50a43a\nB               loc_50A48A                                             ; +0x5c, 0x50a43c\nLDR             R1, =0x438C0000; jumptable 0050A420 case 2             ; +0x5e, 0x50a43e\nLDR             R2, flt_50A4E8                                         ; +0x60, 0x50a440\nB               loc_50A48A                                             ; +0x62, 0x50a442\nLDR             R1, =0x43D70000; jumptable 0050A420 case 3             ; +0x64, 0x50a444\nLDR             R2, =0x429A0000                                        ; +0x66, 0x50a446\nB               loc_50A48A                                             ; +0x68, 0x50a448\nLDR             R1, =0x41C80000; jumptable 0050A420 case 4             ; +0x6a, 0x50a44a\nB               loc_50A450                                             ; +0x6c, 0x50a44c\nLDR             R1, =0x42B40000; jumptable 0050A420 case 5             ; +0x6e, 0x50a44e\nLDR             R2, =0x43160000                                        ; +0x70, 0x50a450\nB               loc_50A48A                                             ; +0x72, 0x50a452\nLDR             R1, =0x432A0000; jumptable 0050A420 case 6             ; +0x74, 0x50a454\nLDR             R2, =0x43BE0000                                        ; +0x76, 0x50a456\nB               loc_50A48A                                             ; +0x78, 0x50a458\nLDR             R1, =0x438C0000; jumptable 0050A420 case 7             ; +0x7a, 0x50a45a\nB               loc_50A482                                             ; +0x7c, 0x50a45c\nLDR             R1, =0x43B40000; jumptable 0050A420 case 8             ; +0x7e, 0x50a45e\nLDR             R2, =0x433A0000                                        ; +0x80, 0x50a460\nB               loc_50A48A                                             ; +0x82, 0x50a462\nLDR             R1, =0x43B40000; jumptable 0050A420 case 9             ; +0x84, 0x50a464\nB               loc_50A46A                                             ; +0x86, 0x50a466\nLDR             R1, =0x43DF0000; jumptable 0050A420 case 10            ; +0x88, 0x50a468\nLDR             R2, =0x43660000                                        ; +0x8a, 0x50a46a\nB               loc_50A48A                                             ; +0x8c, 0x50a46c\nLDR             R1, =0x42200000; jumptable 0050A420 case 11            ; +0x8e, 0x50a46e\nLDR             R2, =0x436A0000                                        ; +0x90, 0x50a470\nB               loc_50A48A                                             ; +0x92, 0x50a472\nLDR             R1, =0x43160000; jumptable 0050A420 case 12            ; +0x94, 0x50a474\nLDR             R2, =0x437A0000                                        ; +0x96, 0x50a476\nB               loc_50A48A                                             ; +0x98, 0x50a478\nLDR             R1, =0x43960000; jumptable 0050A420 case 13            ; +0x9a, 0x50a47a\nLDR             R2, =0x43A28000                                        ; +0x9c, 0x50a47c\nB               loc_50A48A                                             ; +0x9e, 0x50a47e\nMOVS            R1, #0; jumptable 0050A420 case 14                     ; +0xa0, 0x50a480\nLDR             R2, =0x43310000                                        ; +0xa2, 0x50a482\nB               loc_50A48A                                             ; +0xa4, 0x50a484\nMOVS            R1, #0; jumptable 0050A420 default case                ; +0xa6, 0x50a486\nMOV             R2, R1; float                                          ; +0xa8, 0x50a488\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0xaa, 0x50a48a\nMOV             R0, R5                                                 ; +0xae, 0x50a48e\nMOV             R1, R4                                                 ; +0xb0, 0x50a490\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0xb2, 0x50a492\nCMP             R6, #0xE                                               ; +0xb6, 0x50a496\nBHI             loc_50A4A8                                             ; +0xb8, 0x50a498\nLDR             R3, =(flt_BECAB0 - 0x50A4A0)                           ; +0xba, 0x50a49a\nADD             R3, PC; flt_BECAB0                                     ; +0xbc, 0x50a49c\nADD.W           R6, R3, R6,LSL#2                                       ; +0xbe, 0x50a49e\nVLDR            S16, [R6]                                              ; +0xc2, 0x50a4a2\nB               loc_50A4AC                                             ; +0xc6, 0x50a4a6\nVMOV.F32        S16, #10.0                                             ; +0xc8, 0x50a4a8\nLDR             R0, =(aWhitesquare600 - 0x50A4B2); \"whiteSquare60_001.png\" ; +0xcc, 0x50a4ac\nADD             R0, PC; \"whiteSquare60_001.png\"                        ; +0xce, 0x50a4ae\nBL              _ZN7cocos2d8CCSprite25createWithSpriteFrameNameEPKc; cocos2d::CCSprite::createWithSpriteFrameName(char const*) ; +0xd0, 0x50a4b0\nMOV             R1, R5                                                 ; +0xd4, 0x50a4b4\nLDR             R3, [R0]                                               ; +0xd6, 0x50a4b6\nMOV             R4, R0                                                 ; +0xd8, 0x50a4b8\nLDR             R3, [R3,#0x5C]                                         ; +0xda, 0x50a4ba\nBLX             R3                                                     ; +0xdc, 0x50a4bc\nVLDR            S15, [R4,#0x158]                                       ; +0xde, 0x50a4be\nLDR             R3, [R4]                                               ; +0xe2, 0x50a4c2\nMOV             R0, R4                                                 ; +0xe4, 0x50a4c4\nVDIV.F32        S15, S16, S15                                          ; +0xe6, 0x50a4c6\nLDR             R3, [R3,#0x50]                                         ; +0xea, 0x50a4ca\nVMOV            R1, S15                                                ; +0xec, 0x50a4cc\nBLX             R3                                                     ; +0xf0, 0x50a4d0\nLDR             R2, [SP,#0x1C+var_8]                                   ; +0xf2, 0x50a4d2\nLDR             R3, [R7]                                               ; +0xf4, 0x50a4d4\nMOV             R0, R4                                                 ; +0xf6, 0x50a4d6\nCMP             R2, R3                                                 ; +0xf8, 0x50a4d8\nBEQ             loc_50A4E0                                             ; +0xfa, 0x50a4da\nBLX             __stack_chk_fail                                       ; +0xfc, 0x50a4dc\nADD             SP, SP, #0x1C                                          ; +0x100, 0x50a4e0\nVPOP            {D8}                                                   ; +0x102, 0x50a4e2\nPOP             {R4-R7,PC}                                             ; +0x106, 0x50a4e6", "xrefs": [], "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"}