{"type": "func", "start": 4300104352, "end": 4300104470, "name": "BrowseSmartKeyLayer::onButton", "pseudocode": "// \n// BrowseSmartKeyLayer::onButton from 0x1004e62a0 to 0x1004e6316 (118 bytes)\n// \n// 1 xrefs:\n// > BrowseSmartKeyLayer::init @ 0x1004e5ee0\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\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:31:20 +0000\n// \n\n__int64 __fastcall BrowseSmartKeyLayer::onButton(__int64 a1, __int64 a2)\n{\n  __int64 result; // rax\n\n  result = (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2) - 1;\n  switch ( (int)result )\n  {\n    case 0:\n      result = BrowseSmartKeyLayer::createTemplateObjects(a1);\n      break;\n    case 1:\n      result = BrowseSmartKeyLayer::deletedSelectedItems(a1);\n      break;\n    case 2:\n      result = BrowseSmartKeyLayer::addChanceToSelected(a1, 0, 1);\n      break;\n    case 3:\n      result = BrowseSmartKeyLayer::addChanceToSelected(a1, 10, 0);\n      break;\n    default:\n      return result;\n  }\n  return result;\n}", "assembly": "; \n; BrowseSmartKeyLayer::onButton from 0x1004e62a0 to 0x1004e6316 (118 bytes)\n; \n; 1 xrefs:\n; > BrowseSmartKeyLayer::init @ 0x1004e5ee0\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\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:31:20 +0000\n; \npush    rbp                                                            ; +0x0, 0x1004e62a0\nmov     rbp, rsp                                                       ; +0x1, 0x1004e62a1\npush    rbx                                                            ; +0x4, 0x1004e62a4\npush    rax                                                            ; +0x5, 0x1004e62a5\nmov     rbx, rdi                                                       ; +0x6, 0x1004e62a6\nmov     rax, [rsi]                                                     ; +0x9, 0x1004e62a9\nmov     rdi, rsi                                                       ; +0xc, 0x1004e62ac\ncall    qword ptr [rax+40h]                                            ; +0xf, 0x1004e62af\ndec     eax; switch 4 cases                                            ; +0x12, 0x1004e62b2\ncmp     eax, 3                                                         ; +0x14, 0x1004e62b4\nja      short def_1004E62C7; jumptable 00000001004E62C7 default case   ; +0x17, 0x1004e62b7\nlea     rcx, jpt_1004E62C7                                             ; +0x19, 0x1004e62b9\nmovsxd  rax, (jpt_1004E62C7 - 1004E6318h)[rcx+rax*4]                   ; +0x20, 0x1004e62c0\nadd     rax, rcx                                                       ; +0x24, 0x1004e62c4\njmp     rax; switch jump                                               ; +0x27, 0x1004e62c7\nmov     rdi, rbx; jumptable 00000001004E62C7 case 1                    ; +0x29, 0x1004e62c9\nadd     rsp, 8                                                         ; +0x2c, 0x1004e62cc\npop     rbx                                                            ; +0x30, 0x1004e62d0\npop     rbp                                                            ; +0x31, 0x1004e62d1\njmp     BrowseSmartKeyLayer__createTemplateObjects                     ; +0x32, 0x1004e62d2\nmov     rdi, rbx; jumptable 00000001004E62C7 case 3                    ; +0x37, 0x1004e62d7\nxor     esi, esi                                                       ; +0x3a, 0x1004e62da\nmov     edx, 1                                                         ; +0x3c, 0x1004e62dc\nadd     rsp, 8                                                         ; +0x41, 0x1004e62e1\npop     rbx                                                            ; +0x45, 0x1004e62e5\npop     rbp                                                            ; +0x46, 0x1004e62e6\njmp     BrowseSmartKeyLayer__addChanceToSelected                       ; +0x47, 0x1004e62e7\nmov     rdi, rbx; jumptable 00000001004E62C7 case 4                    ; +0x4c, 0x1004e62ec\nmov     esi, 0Ah                                                       ; +0x4f, 0x1004e62ef\nxor     edx, edx                                                       ; +0x54, 0x1004e62f4\nadd     rsp, 8                                                         ; +0x56, 0x1004e62f6\npop     rbx                                                            ; +0x5a, 0x1004e62fa\npop     rbp                                                            ; +0x5b, 0x1004e62fb\njmp     BrowseSmartKeyLayer__addChanceToSelected                       ; +0x5c, 0x1004e62fc\nmov     rdi, rbx; jumptable 00000001004E62C7 case 2                    ; +0x61, 0x1004e6301\nadd     rsp, 8                                                         ; +0x64, 0x1004e6304\npop     rbx                                                            ; +0x68, 0x1004e6308\npop     rbp                                                            ; +0x69, 0x1004e6309\njmp     BrowseSmartKeyLayer__deletedSelectedItems                      ; +0x6a, 0x1004e630a\nadd     rsp, 8; jumptable 00000001004E62C7 default case                ; +0x6f, 0x1004e630f\npop     rbx                                                            ; +0x73, 0x1004e6313\npop     rbp                                                            ; +0x74, 0x1004e6314\nretn                                                                   ; +0x75, 0x1004e6315", "xrefs": ["BrowseSmartKeyLayer::init @ 0x1004e5ee0"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "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"}