{"type": "func", "start": 4201652, "end": 4201916, "name": "AudioEffectsLayer::getBGSquare", "pseudocode": "// \n// AudioEffectsLayer::getBGSquare from 0x401cb4 to 0x401dbc (264 bytes)\n// \n// 0 xrefs:\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\ncocos2d::CCSprite *AudioEffectsLayer::getBGSquare(AudioEffectsLayer *a1)\n{\n  unsigned int v1; // r6\n  float v2; // r1\n  float v3; // r2\n  int v4; // r2\n  bool v5; // r3\n  float v6; // s16\n  cocos2d::CCSprite *v7; // r4\n  cocos2d::CCPoint v9; // [sp+4h] [bp-18h] BYREF\n  cocos2d::CCPoint v10; // [sp+Ch] [bp-10h] BYREF\n\n  rand();\n  v1 = lroundf();\n  cocos2d::CCPoint::CCPoint(&v9);\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(&v10, v2, v3);\n  cocos2d::CCPoint::operator=((PlayerObject *)&v9, COERCE_FLOAT(&v10), v4, v5);\n  if ( v1 > 0xE )\n    v6 = 10.0;\n  else\n    v6 = flt_9AB1D8[v1 + 2];\n  v7 = cocos2d::CCSprite::createWithSpriteFrameName(\"whiteSquare60_001.png\");\n  v7->setPosition(v7, &v9);\n  ((void (__fastcall *)(cocos2d::CCSprite *, _DWORD))v7->setScale)(v7, v6 / v7->m_obRect.size.width);\n  return v7;\n}", "assembly": "; \n; AudioEffectsLayer::getBGSquare from 0x401cb4 to 0x401dbc (264 bytes)\n; \n; 0 xrefs:\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            {R4-R7,LR}                                             ; +0x0, 0x401cb4\nLDR             R7, =(__stack_chk_guard_ptr - 0x401CC0)                ; +0x2, 0x401cb6\nVPUSH           {D8}                                                   ; +0x4, 0x401cb8\nADD             R7, PC; __stack_chk_guard_ptr                          ; +0x8, 0x401cbc\nLDR             R7, [R7]; __stack_chk_guard                            ; +0xa, 0x401cbe\nLDR             R3, [R7]                                               ; +0xc, 0x401cc0\nSUB             SP, SP, #0x1C                                          ; +0xe, 0x401cc2\nADD             R5, SP, #0x1C+var_18                                   ; +0x10, 0x401cc4\nADD             R4, SP, #0x1C+var_10                                   ; +0x12, 0x401cc6\nSTR             R3, [SP,#0x1C+var_8]                                   ; +0x14, 0x401cc8\nBLX             rand                                                   ; +0x16, 0x401cca\nVMOV.F32        S15, #14.0                                             ; +0x1a, 0x401cce\nVMOV            S14, R0                                                ; +0x1e, 0x401cd2\nVCVT.F32.S32    S14, S14, #0x1F                                        ; +0x22, 0x401cd6\nVMUL.F32        S15, S14, S15                                          ; +0x26, 0x401cda\nVMOV            R0, S15                                                ; +0x2a, 0x401cde\nBLX             lroundf                                                ; +0x2e, 0x401ce2\nMOV             R6, R0                                                 ; +0x32, 0x401ce6\nMOV             R0, R5; this                                           ; +0x34, 0x401ce8\nBL              _ZN7cocos2d7CCPointC1Ev; cocos2d::CCPoint::CCPoint(void) ; +0x36, 0x401cea\nMOV             R0, R4; this                                           ; +0x3a, 0x401cee\nCMP             R6, #0xE; switch 15 cases                              ; +0x3c, 0x401cf0\nBHI             def_401CF4; jumptable 00401CF4 default case            ; +0x3e, 0x401cf2\nTBB.W           [PC,R6]; switch jump                                   ; +0x40, 0x401cf4\nDCB 8; jump table for switch statement                                 ; +0x44, 0x401cf8\nDCB 0xA                                                                ; +0x45, 0x401cf9\nDCB 0xD                                                                ; +0x46, 0x401cfa\nDCB 0x10                                                               ; +0x47, 0x401cfb\nDCB 0x13                                                               ; +0x48, 0x401cfc\nDCB 0x15                                                               ; +0x49, 0x401cfd\nDCB 0x18                                                               ; +0x4a, 0x401cfe\nDCB 0x1B                                                               ; +0x4b, 0x401cff\nDCB 0x1D                                                               ; +0x4c, 0x401d00\nDCB 0x20                                                               ; +0x4d, 0x401d01\nDCB 0x22                                                               ; +0x4e, 0x401d02\nDCB 0x25                                                               ; +0x4f, 0x401d03\nDCB 0x28                                                               ; +0x50, 0x401d04\nDCB 0x2B                                                               ; +0x51, 0x401d05\nDCB 0x2E                                                               ; +0x52, 0x401d06\nALIGN 2                                                                ; +0x53, 0x401d07\nLDR             R1, flt_401DBC; jumptable 00401CF4 case 0              ; +0x54, 0x401d08\nB               loc_401D5C                                             ; +0x56, 0x401d0a\nLDR             R1, =0x432A0000; jumptable 00401CF4 case 1             ; +0x58, 0x401d0c\nLDR             R2, =0x42200000                                        ; +0x5a, 0x401d0e\nB               loc_401D5E                                             ; +0x5c, 0x401d10\nLDR             R1, =0x438C0000; jumptable 00401CF4 case 2             ; +0x5e, 0x401d12\nLDR             R2, flt_401DBC                                         ; +0x60, 0x401d14\nB               loc_401D5E                                             ; +0x62, 0x401d16\nLDR             R1, =0x43D70000; jumptable 00401CF4 case 3             ; +0x64, 0x401d18\nLDR             R2, =0x429A0000                                        ; +0x66, 0x401d1a\nB               loc_401D5E                                             ; +0x68, 0x401d1c\nLDR             R1, =0x41C80000; jumptable 00401CF4 case 4             ; +0x6a, 0x401d1e\nB               loc_401D24                                             ; +0x6c, 0x401d20\nLDR             R1, =0x42B40000; jumptable 00401CF4 case 5             ; +0x6e, 0x401d22\nLDR             R2, =0x43160000                                        ; +0x70, 0x401d24\nB               loc_401D5E                                             ; +0x72, 0x401d26\nLDR             R1, =0x432A0000; jumptable 00401CF4 case 6             ; +0x74, 0x401d28\nLDR             R2, =0x43BE0000                                        ; +0x76, 0x401d2a\nB               loc_401D5E                                             ; +0x78, 0x401d2c\nLDR             R1, =0x438C0000; jumptable 00401CF4 case 7             ; +0x7a, 0x401d2e\nB               loc_401D56                                             ; +0x7c, 0x401d30\nLDR             R1, =0x43B40000; jumptable 00401CF4 case 8             ; +0x7e, 0x401d32\nLDR             R2, =0x433A0000                                        ; +0x80, 0x401d34\nB               loc_401D5E                                             ; +0x82, 0x401d36\nLDR             R1, =0x43B40000; jumptable 00401CF4 case 9             ; +0x84, 0x401d38\nB               loc_401D3E                                             ; +0x86, 0x401d3a\nLDR             R1, =0x43DF0000; jumptable 00401CF4 case 10            ; +0x88, 0x401d3c\nLDR             R2, =0x43660000                                        ; +0x8a, 0x401d3e\nB               loc_401D5E                                             ; +0x8c, 0x401d40\nLDR             R1, =0x42200000; jumptable 00401CF4 case 11            ; +0x8e, 0x401d42\nLDR             R2, =0x436A0000                                        ; +0x90, 0x401d44\nB               loc_401D5E                                             ; +0x92, 0x401d46\nLDR             R1, =0x43160000; jumptable 00401CF4 case 12            ; +0x94, 0x401d48\nLDR             R2, =0x437A0000                                        ; +0x96, 0x401d4a\nB               loc_401D5E                                             ; +0x98, 0x401d4c\nLDR             R1, =0x43960000; jumptable 00401CF4 case 13            ; +0x9a, 0x401d4e\nLDR             R2, =0x43A28000                                        ; +0x9c, 0x401d50\nB               loc_401D5E                                             ; +0x9e, 0x401d52\nMOVS            R1, #0; jumptable 00401CF4 case 14                     ; +0xa0, 0x401d54\nLDR             R2, =0x43310000                                        ; +0xa2, 0x401d56\nB               loc_401D5E                                             ; +0xa4, 0x401d58\nMOVS            R1, #0; jumptable 00401CF4 default case                ; +0xa6, 0x401d5a\nMOV             R2, R1; float                                          ; +0xa8, 0x401d5c\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0xaa, 0x401d5e\nMOV             R0, R5                                                 ; +0xae, 0x401d62\nMOV             R1, R4                                                 ; +0xb0, 0x401d64\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0xb2, 0x401d66\nCMP             R6, #0xE                                               ; +0xb6, 0x401d6a\nBHI             loc_401D7C                                             ; +0xb8, 0x401d6c\nLDR             R3, =(flt_9AB1D8 - 0x401D74)                           ; +0xba, 0x401d6e\nADD             R3, PC; flt_9AB1D8                                     ; +0xbc, 0x401d70\nADD.W           R6, R3, R6,LSL#2                                       ; +0xbe, 0x401d72\nVLDR            S16, [R6,#8]                                           ; +0xc2, 0x401d76\nB               loc_401D80                                             ; +0xc6, 0x401d7a\nVMOV.F32        S16, #10.0                                             ; +0xc8, 0x401d7c\nLDR             R0, =(aWhitesquare600 - 0x401D86); \"whiteSquare60_001.png\" ; +0xcc, 0x401d80\nADD             R0, PC; \"whiteSquare60_001.png\"                        ; +0xce, 0x401d82\nBL              _ZN7cocos2d8CCSprite25createWithSpriteFrameNameEPKc; cocos2d::CCSprite::createWithSpriteFrameName(char const*) ; +0xd0, 0x401d84\nMOV             R1, R5                                                 ; +0xd4, 0x401d88\nLDR             R3, [R0]                                               ; +0xd6, 0x401d8a\nMOV             R4, R0                                                 ; +0xd8, 0x401d8c\nLDR             R3, [R3,#0x5C]                                         ; +0xda, 0x401d8e\nBLX             R3                                                     ; +0xdc, 0x401d90\nVLDR            S15, [R4,#0x158]                                       ; +0xde, 0x401d92\nLDR             R3, [R4]                                               ; +0xe2, 0x401d96\nMOV             R0, R4                                                 ; +0xe4, 0x401d98\nVDIV.F32        S15, S16, S15                                          ; +0xe6, 0x401d9a\nLDR             R3, [R3,#0x50]                                         ; +0xea, 0x401d9e\nVMOV            R1, S15                                                ; +0xec, 0x401da0\nBLX             R3                                                     ; +0xf0, 0x401da4\nLDR             R2, [SP,#0x1C+var_8]                                   ; +0xf2, 0x401da6\nLDR             R3, [R7]                                               ; +0xf4, 0x401da8\nMOV             R0, R4                                                 ; +0xf6, 0x401daa\nCMP             R2, R3                                                 ; +0xf8, 0x401dac\nBEQ             loc_401DB4                                             ; +0xfa, 0x401dae\nBLX             __stack_chk_fail                                       ; +0xfc, 0x401db0\nADD             SP, SP, #0x1C                                          ; +0x100, 0x401db4\nVPOP            {D8}                                                   ; +0x102, 0x401db6\nPOP             {R4-R7,PC}                                             ; +0x106, 0x401dba", "xrefs": [], "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"}