{"type": "func", "start": 8442432, "end": 8442724, "name": "DS_Dictionary::setSubDictForKey", "pseudocode": "// \n// DS_Dictionary::setSubDictForKey from 0x80d240 to 0x80d364 (292 bytes)\n// \n// 6 xrefs:\n// > GameLevelManager::writePlatformerSaveJournal @ 0x4caf1c\n// > EditorSFXManager::encodeDataTo @ 0x781172\n// > EditorSFXManager::encodeDataTo @ 0x781210\n// > DS_Dictionary::setSubDictForKey @ 0x80d394\n// > DS_Dictionary::setArrayForKey @ 0x80d432\n// > DS_Dictionary::setObjectForKey @ 0x80d55a\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 12:01:33 +0000\n// \n\nvoid __fastcall DS_Dictionary::setSubDictForKey(DS_Dictionary *this, const char *a2, int a3, int a4)\n{\n  const char *v8; // r1\n  const char *v9; // r1\n  const char *v10; // r0\n  const char *v11; // r1\n  int inserted; // r0\n  const char *v13; // r1\n  const char *v14; // r1\n  int v15; // r0\n  int *v16; // r3\n  int v17; // [sp+4h] [bp+0h] BYREF\n  int i; // [sp+8h] [bp+4h] BYREF\n\n  pugi::xml_node::xml_node((pugi::xml_node *)&v17);\n  if ( a3 )\n  {\n    if ( *((_BYTE *)this + 212) )\n      v9 = \"key\";\n    else\n      v9 = \"k\";\n    for ( i = pugi::xml_node::child((pugi::xml_node *)(*((_DWORD *)this + 51) - 4), v9);\n          pugi::xml_node::operator void (*)(pugi::xml_node***)(&i);\n          i = pugi::xml_node::next_sibling((pugi::xml_node *)&i, v13) )\n    {\n      v10 = (const char *)pugi::xml_node::child_value((pugi::xml_node *)&i);\n      if ( !alphaNumericallyLessThan(v10, a2) )\n      {\n        if ( *((_BYTE *)this + 212) )\n          v11 = \"key\";\n        else\n          v11 = \"k\";\n        inserted = pugi::xml_node::insert_child_before(\n                     (pugi::xml_node *)(*((_DWORD *)this + 51) - 4),\n                     v11,\n                     (const pugi::xml_node *)&i);\n        goto LABEL_20;\n      }\n      if ( *((_BYTE *)this + 212) )\n        v13 = \"key\";\n      else\n        v13 = \"k\";\n    }\n  }\n  if ( *((_BYTE *)this + 212) )\n    v8 = \"key\";\n  else\n    v8 = \"k\";\n  inserted = pugi::xml_node::append_child((pugi::xml_node *)(*((_DWORD *)this + 51) - 4), v8);\nLABEL_20:\n  v17 = inserted;\n  i = pugi::xml_node::append_child(&v17, 3);\n  pugi::xml_node::set_value((pugi::xml_node *)&i, a2);\n  if ( *((_BYTE *)this + 212) )\n    v14 = \"dict\";\n  else\n    v14 = \"d\";\n  v15 = pugi::xml_node::insert_child_after(\n          (pugi::xml_node *)(*((_DWORD *)this + 51) - 4),\n          v14,\n          (const pugi::xml_node *)&v17);\n  i = v15;\n  if ( a4 )\n  {\n    v16 = *((int **)this + 51);\n    if ( v16 == *((int **)this + 52) )\n    {\n      std::vector<pugi::xml_node>::__push_back_slow_path<pugi::xml_node const&>((int *)this + 50, &i);\n    }\n    else\n    {\n      if ( v16 )\n        *v16 = v15;\n      *((_DWORD *)this + 51) += 4;\n    }\n  }\n}", "assembly": "; \n; DS_Dictionary::setSubDictForKey from 0x80d240 to 0x80d364 (292 bytes)\n; \n; 6 xrefs:\n; > GameLevelManager::writePlatformerSaveJournal @ 0x4caf1c\n; > EditorSFXManager::encodeDataTo @ 0x781172\n; > EditorSFXManager::encodeDataTo @ 0x781210\n; > DS_Dictionary::setSubDictForKey @ 0x80d394\n; > DS_Dictionary::setArrayForKey @ 0x80d432\n; > DS_Dictionary::setObjectForKey @ 0x80d55a\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 12:01:33 +0000\n; \nPUSH.W          {R4-R11,LR}                                            ; +0x0, 0x80d240\nSUB             SP, SP, #0x14                                          ; +0x4, 0x80d244\nLDR             R6, =(__stack_chk_guard_ptr - 0x80D252)                ; +0x6, 0x80d246\nMOV             R8, R3                                                 ; +0x8, 0x80d248\nADD             R7, SP, #4                                             ; +0xa, 0x80d24a\nMOV             R4, R0                                                 ; +0xc, 0x80d24c\nADD             R6, PC; __stack_chk_guard_ptr                          ; +0xe, 0x80d24e\nLDR             R6, [R6]; __stack_chk_guard                            ; +0x10, 0x80d250\nMOV             R9, R1                                                 ; +0x12, 0x80d252\nMOV             R0, R7; this                                           ; +0x14, 0x80d254\nMOV             R10, R2                                                ; +0x16, 0x80d256\nLDR             R3, [R6]                                               ; +0x18, 0x80d258\nADD             R5, SP, #0x14+var_C                                    ; +0x1a, 0x80d25a\nSTR             R3, [SP,#0x14+var_8]                                   ; +0x1c, 0x80d25c\nBL              _ZN4pugi8xml_nodeC1Ev; pugi::xml_node::xml_node(void)  ; +0x1e, 0x80d25e\nCMP.W           R10, #0                                                ; +0x22, 0x80d262\nBNE             loc_80D27C                                             ; +0x26, 0x80d266\nLDRB.W          R3, [R4,#0xD4]                                         ; +0x28, 0x80d268\nLDR.W           R0, [R4,#0xCC]                                         ; +0x2c, 0x80d26c\nSUBS            R0, #4; this                                           ; +0x30, 0x80d270\nCMP             R3, #0                                                 ; +0x32, 0x80d272\nBNE             loc_80D2EC                                             ; +0x34, 0x80d274\nLDR             R1, =(aK_0 - 0x80D27C); \"k\"                            ; +0x36, 0x80d276\nADD             R1, PC; \"k\"                                            ; +0x38, 0x80d278\nB               loc_80D2F0                                             ; +0x3a, 0x80d27a\nLDRB.W          R3, [R4,#0xD4]                                         ; +0x3c, 0x80d27c\nLDR.W           R0, [R4,#0xCC]                                         ; +0x40, 0x80d280\nSUBS            R0, #4; this                                           ; +0x44, 0x80d284\nCBNZ            R3, loc_80D28E                                         ; +0x46, 0x80d286\nLDR             R1, =(aK_0 - 0x80D28E); \"k\"                            ; +0x48, 0x80d288\nADD             R1, PC; \"k\"                                            ; +0x4a, 0x80d28a\nB               loc_80D292                                             ; +0x4c, 0x80d28c\nLDR             R1, =(aKey - 0x80D294); \"key\"                          ; +0x4e, 0x80d28e\nADD             R1, PC; \"key\"                                          ; +0x50, 0x80d290\nBL              _ZNK4pugi8xml_node5childEPKc; pugi::xml_node::child(char const*) ; +0x52, 0x80d292\nLDR.W           R10, =(aKey - 0x80D2A2); \"key\"                         ; +0x56, 0x80d296\nLDR.W           R11, =(aK_0 - 0x80D2A4); \"k\"                           ; +0x5a, 0x80d29a\nADD             R10, PC; \"key\"                                         ; +0x5e, 0x80d29e\nADD             R11, PC; \"k\"                                           ; +0x60, 0x80d2a0\nSTR             R0, [SP,#0x14+var_C]                                   ; +0x62, 0x80d2a2\nMOV             R0, R5                                                 ; +0x64, 0x80d2a4\nBL              _ZNK4pugi8xml_nodecvPFvPPPS0_EEv; pugi::xml_node::operator void (*)(pugi::xml_node***)(void) ; +0x66, 0x80d2a6\nCMP             R0, #0                                                 ; +0x6a, 0x80d2aa\nBEQ             loc_80D268                                             ; +0x6c, 0x80d2ac\nMOV             R0, R5; this                                           ; +0x6e, 0x80d2ae\nBL              _ZNK4pugi8xml_node11child_valueEv; pugi::xml_node::child_value(void) ; +0x70, 0x80d2b0\nMOV             R1, R9; char *                                         ; +0x74, 0x80d2b4\nBL              _Z24alphaNumericallyLessThanPKcS0_; alphaNumericallyLessThan(char const*,char const*) ; +0x76, 0x80d2b6\nLDRB.W          R3, [R4,#0xD4]                                         ; +0x7a, 0x80d2ba\nCBNZ            R0, loc_80D2DA                                         ; +0x7e, 0x80d2be\nLDR.W           R0, [R4,#0xCC]                                         ; +0x80, 0x80d2c0\nSUBS            R0, #4; this                                           ; +0x84, 0x80d2c4\nCBNZ            R3, loc_80D2CE                                         ; +0x86, 0x80d2c6\nLDR             R1, =(aK_0 - 0x80D2CE); \"k\"                            ; +0x88, 0x80d2c8\nADD             R1, PC; \"k\"                                            ; +0x8a, 0x80d2ca\nB               loc_80D2D2                                             ; +0x8c, 0x80d2cc\nLDR             R1, =(aKey - 0x80D2D4); \"key\"                          ; +0x8e, 0x80d2ce\nADD             R1, PC; \"key\"                                          ; +0x90, 0x80d2d0\nMOV             R2, R5; pugi::xml_node *                               ; +0x92, 0x80d2d2\nBL              _ZN4pugi8xml_node19insert_child_beforeEPKcRKS0_; pugi::xml_node::insert_child_before(char const*,pugi::xml_node const&) ; +0x94, 0x80d2d4\nB               loc_80D2F4                                             ; +0x98, 0x80d2d8\nCMP             R3, #0                                                 ; +0x9a, 0x80d2da\nMOV             R0, R5; this                                           ; +0x9c, 0x80d2dc\nITE NE                                                                 ; +0x9e, 0x80d2de\nMOVNE           R1, R10                                                ; +0xa0, 0x80d2e0\nMOVEQ           R1, R11; char *                                        ; +0xa2, 0x80d2e2\nBL              _ZNK4pugi8xml_node12next_siblingEPKc; pugi::xml_node::next_sibling(char const*) ; +0xa4, 0x80d2e4\nSTR             R0, [SP,#0x14+var_C]                                   ; +0xa8, 0x80d2e8\nB               loc_80D2A4                                             ; +0xaa, 0x80d2ea\nLDR             R1, =(aKey - 0x80D2F2); \"key\"                          ; +0xac, 0x80d2ec\nADD             R1, PC; \"key\"                                          ; +0xae, 0x80d2ee\nBL              _ZN4pugi8xml_node12append_childEPKc; pugi::xml_node::append_child(char const*) ; +0xb0, 0x80d2f0\nSTR             R0, [SP,#0x14+var_10]                                  ; +0xb4, 0x80d2f4\nMOVS            R1, #3                                                 ; +0xb6, 0x80d2f6\nMOV             R0, R7                                                 ; +0xb8, 0x80d2f8\nBL              _ZN4pugi8xml_node12append_childENS_13xml_node_typeE; pugi::xml_node::append_child(pugi::xml_node_type) ; +0xba, 0x80d2fa\nMOV             R1, R9; char *                                         ; +0xbe, 0x80d2fe\nSTR             R0, [SP,#0x14+var_C]                                   ; +0xc0, 0x80d300\nMOV             R0, R5; this                                           ; +0xc2, 0x80d302\nBL              _ZN4pugi8xml_node9set_valueEPKc; pugi::xml_node::set_value(char const*) ; +0xc4, 0x80d304\nLDRB.W          R3, [R4,#0xD4]                                         ; +0xc8, 0x80d308\nLDR.W           R0, [R4,#0xCC]                                         ; +0xcc, 0x80d30c\nSUBS            R0, #4; this                                           ; +0xd0, 0x80d310\nCBNZ            R3, loc_80D31A                                         ; +0xd2, 0x80d312\nLDR             R1, =(aD_1 - 0x80D31A); \"d\"                            ; +0xd4, 0x80d314\nADD             R1, PC; \"d\"                                            ; +0xd6, 0x80d316\nB               loc_80D31E                                             ; +0xd8, 0x80d318\nLDR             R1, =(aDict_1 - 0x80D320); \"dict\"                      ; +0xda, 0x80d31a\nADD             R1, PC; \"dict\"                                         ; +0xdc, 0x80d31c\nMOV             R2, R7; pugi::xml_node *                               ; +0xde, 0x80d31e\nBL              _ZN4pugi8xml_node18insert_child_afterEPKcRKS0_; pugi::xml_node::insert_child_after(char const*,pugi::xml_node const&) ; +0xe0, 0x80d320\nSTR             R0, [SP,#0x14+var_C]                                   ; +0xe4, 0x80d324\nCMP.W           R8, #0                                                 ; +0xe6, 0x80d326\nBEQ             loc_80D352                                             ; +0xea, 0x80d32a\nLDR.W           R3, [R4,#0xCC]                                         ; +0xec, 0x80d32c\nLDR.W           R2, [R4,#0xD0]                                         ; +0xf0, 0x80d330\nCMP             R3, R2                                                 ; +0xf4, 0x80d334\nBEQ             loc_80D348                                             ; +0xf6, 0x80d336\nCBZ             R3, loc_80D33C                                         ; +0xf8, 0x80d338\nSTR             R0, [R3]                                               ; +0xfa, 0x80d33a\nLDR.W           R3, [R4,#0xCC]                                         ; +0xfc, 0x80d33c\nADDS            R3, #4                                                 ; +0x100, 0x80d340\nSTR.W           R3, [R4,#0xCC]                                         ; +0x102, 0x80d342\nB               loc_80D352                                             ; +0x106, 0x80d346\nADD.W           R0, R4, #0xC8                                          ; +0x108, 0x80d348\nMOV             R1, R5                                                 ; +0x10c, 0x80d34c\nBL              _ZNSt6__ndk16vectorIN4pugi8xml_nodeENS_9allocatorIS2_EEE21__push_back_slow_pathIRKS2_EEvOT_; std::vector<pugi::xml_node>::__push_back_slow_path<pugi::xml_node const&>(pugi::xml_node const&) ; +0x10e, 0x80d34e\nLDR             R2, [SP,#0x14+var_8]                                   ; +0x112, 0x80d352\nLDR             R3, [R6]                                               ; +0x114, 0x80d354\nCMP             R2, R3                                                 ; +0x116, 0x80d356\nBEQ             loc_80D35E                                             ; +0x118, 0x80d358\nBLX             __stack_chk_fail                                       ; +0x11a, 0x80d35a\nADD             SP, SP, #0x14                                          ; +0x11e, 0x80d35e\nPOP.W           {R4-R11,PC}                                            ; +0x120, 0x80d360", "xrefs": ["GameLevelManager::writePlatformerSaveJournal @ 0x4caf1c", "EditorSFXManager::encodeDataTo @ 0x781172", "EditorSFXManager::encodeDataTo @ 0x781210", "DS_Dictionary::setSubDictForKey @ 0x80d394", "DS_Dictionary::setArrayForKey @ 0x80d432", "DS_Dictionary::setObjectForKey @ 0x80d55a"], "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"}