{"type": "func", "start": 3971672, "end": 3971936, "name": "GJMapPack::parsePackColors", "pseudocode": "// \n// GJMapPack::parsePackColors from 0x3c9a58 to 0x3c9b60 (264 bytes)\n// \n// 1 xrefs:\n// > GJMapPack::create @ 0x3c9d58\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\nunsigned int __fastcall GJMapPack::parsePackColors(int a1, char **a2, char **a3)\n{\n  cocos2d::CCArray *v5; // r8\n  cocos2d::CCArray *v6; // r6\n  cocos2d::CCString *v7; // r0\n  char v8; // r9\n  cocos2d::CCString *v9; // r0\n  char v10; // r5\n  cocos2d::CCString *v11; // r0\n  char v12; // r0\n  unsigned int result; // r0\n  cocos2d::CCString *v14; // r0\n  char v15; // r8\n  cocos2d::CCString *v16; // r0\n  char v17; // r5\n  cocos2d::CCString *v18; // r0\n  char v19; // [sp+8h] [bp-Ch] BYREF\n\n  sub_776584((int)&v19, *a2);\n  v5 = sub_3BE530((cocos2d::CCArray *)&v19, \",\");\n  sub_774008(&v19);\n  sub_776584((int)&v19, *a3);\n  v6 = sub_3BE530((cocos2d::CCArray *)&v19, \",\");\n  sub_774008(&v19);\n  *(_WORD *)(a1 + 292) = -1;\n  *(_WORD *)(a1 + 295) = -1;\n  *(_BYTE *)(a1 + 294) = -1;\n  *(_BYTE *)(a1 + 297) = -1;\n  if ( cocos2d::CCArray::count(v5) > 2u )\n  {\n    v7 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v5, 0);\n    v8 = cocos2d::CCString::intValue(v7);\n    v9 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v5, 1u);\n    v10 = cocos2d::CCString::intValue(v9);\n    v11 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v5, 2u);\n    v12 = cocos2d::CCString::intValue(v11);\n    *(_BYTE *)(a1 + 292) = v8;\n    *(_BYTE *)(a1 + 293) = v10;\n    *(_BYTE *)(a1 + 294) = v12;\n  }\n  result = cocos2d::CCArray::count(v6);\n  if ( result > 2 )\n  {\n    v14 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v6, 0);\n    v15 = cocos2d::CCString::intValue(v14);\n    v16 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v6, 1u);\n    v17 = cocos2d::CCString::intValue(v16);\n    v18 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v6, 2u);\n    result = cocos2d::CCString::intValue(v18);\n    *(_BYTE *)(a1 + 295) = v15;\n    *(_BYTE *)(a1 + 296) = v17;\n    *(_BYTE *)(a1 + 297) = result;\n  }\n  return result;\n}", "assembly": "; \n; GJMapPack::parsePackColors from 0x3c9a58 to 0x3c9b60 (264 bytes)\n; \n; 1 xrefs:\n; > GJMapPack::create @ 0x3c9d58\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-R9,LR}                                             ; +0x0, 0x3c9a58\nSUB             SP, SP, #0x14                                          ; +0x4, 0x3c9a5c\nLDR             R7, =(__stack_chk_guard_ptr - 0x3C9A6A)                ; +0x6, 0x3c9a5e\nADD             R5, SP, #0x14+var_C                                    ; +0x8, 0x3c9a60\nADD             R6, SP, #0x14+var_10                                   ; +0xa, 0x3c9a62\nLDR             R1, [R1]; char *                                       ; +0xc, 0x3c9a64\nADD             R7, PC; __stack_chk_guard_ptr                          ; +0xe, 0x3c9a66\nLDR             R7, [R7]; __stack_chk_guard                            ; +0x10, 0x3c9a68\nMOV             R4, R0                                                 ; +0x12, 0x3c9a6a\nMOV             R9, R2                                                 ; +0x14, 0x3c9a6c\nMOV             R0, R5; int                                            ; +0x16, 0x3c9a6e\nLDR             R3, [R7]                                               ; +0x18, 0x3c9a70\nMOV             R2, R6                                                 ; +0x1a, 0x3c9a72\nSTR             R3, [SP,#0x14+var_8]                                   ; +0x1c, 0x3c9a74\nBL              sub_776584                                             ; +0x1e, 0x3c9a76\nLDR             R1, =(asc_948B9B - 0x3C9A82); \",\"                      ; +0x22, 0x3c9a7a\nMOV             R0, R5                                                 ; +0x24, 0x3c9a7c\nADD             R1, PC; \",\"                                            ; +0x26, 0x3c9a7e\nBL              sub_3BE530                                             ; +0x28, 0x3c9a80\nMOV             R8, R0                                                 ; +0x2c, 0x3c9a84\nMOV             R0, R5                                                 ; +0x2e, 0x3c9a86\nBL              sub_774008                                             ; +0x30, 0x3c9a88\nLDR.W           R1, [R9]; char *                                       ; +0x34, 0x3c9a8c\nMOV             R0, R5; int                                            ; +0x38, 0x3c9a90\nMOV             R2, R6                                                 ; +0x3a, 0x3c9a92\nBL              sub_776584                                             ; +0x3c, 0x3c9a94\nLDR             R1, =(asc_948B9B - 0x3C9AA0); \",\"                      ; +0x40, 0x3c9a98\nMOV             R0, R5                                                 ; +0x42, 0x3c9a9a\nADD             R1, PC; \",\"                                            ; +0x44, 0x3c9a9c\nBL              sub_3BE530                                             ; +0x46, 0x3c9a9e\nMOV             R6, R0                                                 ; +0x4a, 0x3c9aa2\nMOV             R0, R5                                                 ; +0x4c, 0x3c9aa4\nBL              sub_774008                                             ; +0x4e, 0x3c9aa6\nLDR             R3, =(a0123456789abcd_1 - 0x3C9AB2); \"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabc\"... ; +0x52, 0x3c9aaa\nMOV             R0, R8; this                                           ; +0x54, 0x3c9aac\nADD             R3, PC; \"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabc\"...   ; +0x56, 0x3c9aae\nLDRH.W          R2, [R3,#(word_9AABBC - 0x9AAB70)]!                    ; +0x58, 0x3c9ab0\nLDRB            R3, [R3,#(byte_9AABBE - 0x9AABBC)]                     ; +0x5c, 0x3c9ab4\nSTRH.W          R2, [R4,#0x124]                                        ; +0x5e, 0x3c9ab6\nSTRH.W          R2, [R4,#0x127]                                        ; +0x62, 0x3c9aba\nSTRB.W          R3, [R4,#0x126]                                        ; +0x66, 0x3c9abe\nSTRB.W          R3, [R4,#0x129]                                        ; +0x6a, 0x3c9ac2\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x6e, 0x3c9ac6\nCMP             R0, #2                                                 ; +0x72, 0x3c9aca\nBLS             loc_3C9B02                                             ; +0x74, 0x3c9acc\nMOVS            R1, #0; unsigned int                                   ; +0x76, 0x3c9ace\nMOV             R0, R8; this                                           ; +0x78, 0x3c9ad0\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x7a, 0x3c9ad2\nBL              _ZNK7cocos2d8CCString8intValueEv; cocos2d::CCString::intValue(void) ; +0x7e, 0x3c9ad6\nMOVS            R1, #1; unsigned int                                   ; +0x82, 0x3c9ada\nMOV             R9, R0                                                 ; +0x84, 0x3c9adc\nMOV             R0, R8; this                                           ; +0x86, 0x3c9ade\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x88, 0x3c9ae0\nBL              _ZNK7cocos2d8CCString8intValueEv; cocos2d::CCString::intValue(void) ; +0x8c, 0x3c9ae4\nMOVS            R1, #2; unsigned int                                   ; +0x90, 0x3c9ae8\nMOV             R5, R0                                                 ; +0x92, 0x3c9aea\nMOV             R0, R8; this                                           ; +0x94, 0x3c9aec\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x96, 0x3c9aee\nBL              _ZNK7cocos2d8CCString8intValueEv; cocos2d::CCString::intValue(void) ; +0x9a, 0x3c9af2\nSTRB.W          R9, [R4,#0x124]                                        ; +0x9e, 0x3c9af6\nSTRB.W          R5, [R4,#0x125]                                        ; +0xa2, 0x3c9afa\nSTRB.W          R0, [R4,#0x126]                                        ; +0xa6, 0x3c9afe\nMOV             R0, R6; this                                           ; +0xaa, 0x3c9b02\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0xac, 0x3c9b04\nCMP             R0, #2                                                 ; +0xb0, 0x3c9b08\nBLS             loc_3C9B4E                                             ; +0xb2, 0x3c9b0a\nMOVS            R1, #0; unsigned int                                   ; +0xb4, 0x3c9b0c\nMOV             R0, R6; this                                           ; +0xb6, 0x3c9b0e\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0xb8, 0x3c9b10\nBL              _ZNK7cocos2d8CCString8intValueEv; cocos2d::CCString::intValue(void) ; +0xbc, 0x3c9b14\nMOVS            R1, #1; unsigned int                                   ; +0xc0, 0x3c9b18\nMOV             R8, R0                                                 ; +0xc2, 0x3c9b1a\nMOV             R0, R6; this                                           ; +0xc4, 0x3c9b1c\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0xc6, 0x3c9b1e\nBL              _ZNK7cocos2d8CCString8intValueEv; cocos2d::CCString::intValue(void) ; +0xca, 0x3c9b22\nMOVS            R1, #2; unsigned int                                   ; +0xce, 0x3c9b26\nMOV             R5, R0                                                 ; +0xd0, 0x3c9b28\nMOV             R0, R6; this                                           ; +0xd2, 0x3c9b2a\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0xd4, 0x3c9b2c\nBL              _ZNK7cocos2d8CCString8intValueEv; cocos2d::CCString::intValue(void) ; +0xd8, 0x3c9b30\nSTRB.W          R8, [R4,#0x127]                                        ; +0xdc, 0x3c9b34\nSTRB.W          R5, [R4,#0x128]                                        ; +0xe0, 0x3c9b38\nSTRB.W          R0, [R4,#0x129]                                        ; +0xe4, 0x3c9b3c\nB               loc_3C9B4E                                             ; +0xe8, 0x3c9b40\nB               loc_3C9B44                                             ; +0xea, 0x3c9b42\nMOV             R0, R5                                                 ; +0xec, 0x3c9b44\nBL              sub_774008                                             ; +0xee, 0x3c9b46\nBL              __cxa_end_cleanup                                      ; +0xf2, 0x3c9b4a\nLDR             R2, [SP,#0x14+var_8]                                   ; +0xf6, 0x3c9b4e\nLDR             R3, [R7]                                               ; +0xf8, 0x3c9b50\nCMP             R2, R3                                                 ; +0xfa, 0x3c9b52\nBEQ             loc_3C9B5A                                             ; +0xfc, 0x3c9b54\nBLX             __stack_chk_fail                                       ; +0xfe, 0x3c9b56\nADD             SP, SP, #0x14                                          ; +0x102, 0x3c9b5a\nPOP.W           {R4-R9,PC}                                             ; +0x104, 0x3c9b5c", "xrefs": ["GJMapPack::create @ 0x3c9d58"], "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"}