{"type": "func", "start": 4047780, "end": 4048002, "name": "CCTextInputNode::keyboardWillShow", "pseudocode": "// \n// CCTextInputNode::keyboardWillShow from 0x3dc3a4 to 0x3dc482 (222 bytes)\n// \n// 1 xrefs:\n// > `non-virtual thunk to'CCTextInputNode::keyboardWillShow @ 0x3dc490\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:46:48 +0000\n// \n\nint __fastcall CCTextInputNode::keyboardWillShow(int a1, int a2)\n{\n  cocos2d::CCRect *v2; // r7\n  int result; // r0\n  const cocos2d::CCPoint *v5; // r0\n  float v6; // s16\n  float v7; // s16\n  _BYTE v8[4]; // [sp+4h] [bp-24h] BYREF\n  float v9; // [sp+8h] [bp-20h]\n  float v10; // [sp+14h] [bp-14h] BYREF\n  float v11; // [sp+18h] [bp-10h]\n\n  v2 = (cocos2d::CCRect *)(a2 + 16);\n  result = cocos2d::CCRect::getMaxY((cocos2d::CCRect *)(a2 + 16));\n  CCTextInputNode::s_keyboardTop = result;\n  if ( !*(_BYTE *)(a1 + 434) )\n  {\n    result = *(_DWORD *)(a1 + 416);\n    if ( result )\n    {\n      if ( *(_BYTE *)(a1 + 344) )\n      {\n        v5 = (const cocos2d::CCPoint *)(*(int (__fastcall **)(int))(*(_DWORD *)result + 152))(result);\n        cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v10, v5);\n        sub_3DC220((cocos2d::CCRect *)v8, (const cocos2d::CCPoint *)a1, &v10);\n        v9 = v9 - 4.0;\n        v6 = COERCE_FLOAT(cocos2d::CCRect::getMaxY(v2));\n        v7 = v6 - COERCE_FLOAT(cocos2d::CCRect::getMinY((cocos2d::CCRect *)v8));\n        cocos2d::CCRect::CCRect((cocos2d::CCRect *)&v10, (const cocos2d::CCRect *)v8);\n        if ( v7 < 0.0 )\n          v11 = v11 + v7;\n        result = cocos2d::CCRect::intersectsRect((cocos2d::CCRect *)&v10, v2);\n        if ( result )\n        {\n          result = *(_DWORD *)(a1 + 420);\n          *(_BYTE *)(a1 + 345) = 1;\n          if ( result )\n            return (*(int (__fastcall **)(int, int, float))(*(_DWORD *)result + 12))(\n                     result,\n                     a1,\n                     COERCE_FLOAT(LODWORD(v7)));\n        }\n      }\n    }\n  }\n  return result;\n}", "assembly": "; \n; CCTextInputNode::keyboardWillShow from 0x3dc3a4 to 0x3dc482 (222 bytes)\n; \n; 1 xrefs:\n; > `non-virtual thunk to'CCTextInputNode::keyboardWillShow @ 0x3dc490\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:46:48 +0000\n; \nPUSH.W          {R4-R8,LR}                                             ; +0x0, 0x3dc3a4\nADD.W           R7, R1, #0x10                                          ; +0x4, 0x3dc3a8\nVPUSH           {D8}                                                   ; +0x8, 0x3dc3ac\nMOV             R4, R0                                                 ; +0xc, 0x3dc3b0\nLDR             R6, =(__stack_chk_guard_ptr - 0x3DC3BA)                ; +0xe, 0x3dc3b2\nMOV             R0, R7; this                                           ; +0x10, 0x3dc3b4\nADD             R6, PC; __stack_chk_guard_ptr                          ; +0x12, 0x3dc3b6\nLDR             R6, [R6]; __stack_chk_guard                            ; +0x14, 0x3dc3b8\nSUB             SP, SP, #0x28                                          ; +0x16, 0x3dc3ba\nLDR             R3, [R6]                                               ; +0x18, 0x3dc3bc\nSTR             R3, [SP,#0x28+var_4]                                   ; +0x1a, 0x3dc3be\nBL              _ZNK7cocos2d6CCRect7getMaxYEv; cocos2d::CCRect::getMaxY(void) ; +0x1c, 0x3dc3c0\nLDR             R3, =(_ZN15CCTextInputNode13s_keyboardTopE_ptr - 0x3DC3CA) ; +0x20, 0x3dc3c4\nADD             R3, PC; _ZN15CCTextInputNode13s_keyboardTopE_ptr       ; +0x22, 0x3dc3c6\nLDR             R3, [R3]; CCTextInputNode::s_keyboardTop ...           ; +0x24, 0x3dc3c8\nSTR             R0, [R3]; CCTextInputNode::s_keyboardTop               ; +0x26, 0x3dc3ca\nLDRB.W          R3, [R4,#0x1B2]                                        ; +0x28, 0x3dc3cc\nCMP             R3, #0                                                 ; +0x2c, 0x3dc3d0\nBNE             loc_3DC46C                                             ; +0x2e, 0x3dc3d2\nLDR.W           R0, [R4,#0x1A0]                                        ; +0x30, 0x3dc3d4\nCMP             R0, #0                                                 ; +0x34, 0x3dc3d8\nBEQ             loc_3DC46C                                             ; +0x36, 0x3dc3da\nLDRB.W          R3, [R4,#0x158]                                        ; +0x38, 0x3dc3dc\nCMP             R3, #0                                                 ; +0x3c, 0x3dc3e0\nBEQ             loc_3DC46C                                             ; +0x3e, 0x3dc3e2\nLDR             R3, [R0]                                               ; +0x40, 0x3dc3e4\nADD             R5, SP, #0x28+var_14                                   ; +0x42, 0x3dc3e6\nADD.W           R8, SP, #0x28+var_24                                   ; +0x44, 0x3dc3e8\nLDR.W           R3, [R3,#0x98]                                         ; +0x48, 0x3dc3ec\nBLX             R3                                                     ; +0x4c, 0x3dc3f0\nMOV             R1, R0; cocos2d::CCPoint *                             ; +0x4e, 0x3dc3f2\nMOV             R0, R5; this                                           ; +0x50, 0x3dc3f4\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0x52, 0x3dc3f6\nMOV             R1, R4                                                 ; +0x56, 0x3dc3fa\nMOV             R2, R5                                                 ; +0x58, 0x3dc3fc\nMOV             R0, R8                                                 ; +0x5a, 0x3dc3fe\nBL              sub_3DC220                                             ; +0x5c, 0x3dc400\nVMOV.F32        S14, #4.0                                              ; +0x60, 0x3dc404\nVLDR            S15, [SP,#0x28+var_20]                                 ; +0x64, 0x3dc408\nMOV             R0, R7; this                                           ; +0x68, 0x3dc40c\nVSUB.F32        S15, S15, S14                                          ; +0x6a, 0x3dc40e\nVSTR            S15, [SP,#0x28+var_20]                                 ; +0x6e, 0x3dc412\nBL              _ZNK7cocos2d6CCRect7getMaxYEv; cocos2d::CCRect::getMaxY(void) ; +0x72, 0x3dc416\nVMOV            S16, R0                                                ; +0x76, 0x3dc41a\nMOV             R0, R8; this                                           ; +0x7a, 0x3dc41e\nBL              _ZNK7cocos2d6CCRect7getMinYEv; cocos2d::CCRect::getMinY(void) ; +0x7c, 0x3dc420\nMOV             R1, R8; cocos2d::CCRect *                              ; +0x80, 0x3dc424\nVMOV            S15, R0                                                ; +0x82, 0x3dc426\nMOV             R0, R5; this                                           ; +0x86, 0x3dc42a\nVSUB.F32        S16, S16, S15                                          ; +0x88, 0x3dc42c\nBL              _ZN7cocos2d6CCRectC1ERKS0_; cocos2d::CCRect::CCRect(cocos2d::CCRect const&) ; +0x8c, 0x3dc430\nMOV             R0, R5; this                                           ; +0x90, 0x3dc434\nMOV             R1, R7; cocos2d::CCRect *                              ; +0x92, 0x3dc436\nVCMPE.F32       S16, #0.0                                              ; +0x94, 0x3dc438\nVMRS            APSR_nzcv, FPSCR                                       ; +0x98, 0x3dc43c\nITTT MI                                                                ; +0x9c, 0x3dc440\nVLDRMI          S15, [SP,#0x28+var_10]                                 ; +0x9e, 0x3dc442\nVADDMI.F32      S15, S15, S16                                          ; +0xa2, 0x3dc446\nVSTRMI          S15, [SP,#0x28+var_10]                                 ; +0xa6, 0x3dc44a\nBL              _ZNK7cocos2d6CCRect14intersectsRectERKS0_; cocos2d::CCRect::intersectsRect(cocos2d::CCRect const&) ; +0xaa, 0x3dc44e\nCBZ             R0, loc_3DC46C                                         ; +0xae, 0x3dc452\nLDR.W           R0, [R4,#0x1A4]                                        ; +0xb0, 0x3dc454\nMOVS            R3, #1                                                 ; +0xb4, 0x3dc458\nSTRB.W          R3, [R4,#0x159]                                        ; +0xb6, 0x3dc45a\nCBZ             R0, loc_3DC46C                                         ; +0xba, 0x3dc45e\nLDR             R3, [R0]                                               ; +0xbc, 0x3dc460\nMOV             R1, R4                                                 ; +0xbe, 0x3dc462\nVMOV            R2, S16                                                ; +0xc0, 0x3dc464\nLDR             R3, [R3,#0xC]                                          ; +0xc4, 0x3dc468\nBLX             R3                                                     ; +0xc6, 0x3dc46a\nLDR             R2, [SP,#0x28+var_4]                                   ; +0xc8, 0x3dc46c\nLDR             R3, [R6]                                               ; +0xca, 0x3dc46e\nCMP             R2, R3                                                 ; +0xcc, 0x3dc470\nBEQ             loc_3DC478                                             ; +0xce, 0x3dc472\nBLX             __stack_chk_fail                                       ; +0xd0, 0x3dc474\nADD             SP, SP, #0x28 ; '('                                    ; +0xd4, 0x3dc478\nVPOP            {D8}                                                   ; +0xd6, 0x3dc47a\nPOP.W           {R4-R8,PC}                                             ; +0xda, 0x3dc47e", "xrefs": ["`non-virtual thunk to'CCTextInputNode::keyboardWillShow @ 0x3dc490"], "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"}