{"type": "func", "start": 5373355632, "end": 5373355845, "name": "SetupItemCompareTriggerPopup::onOpButton", "pseudocode": "// \n// SetupItemCompareTriggerPopup::onOpButton from 0x14046e670 to 0x14046e745 (213 bytes)\n// \n// 2 xrefs:\n// > SetupItemCompareTriggerPopup::init @ 0x14046e340\n// > <???> @ 0x1406db24c\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\nvoid SetupItemCompareTriggerPopup::onOpButton(SetupItemCompareTriggerPopup *a1, cocos2d::CCObject *a2)\n{\n  __int64 v4; // rdi\n  int v5; // ebx\n  int v6; // ecx\n  int v7; // ecx\n  SetupItemCompareTriggerPopup *v8; // rcx\n\n  v4 = (unsigned int)a2->getTag(a2);\n  v5 = (int)a1->getValue(a1, v4) + 1;\n  if ( (_DWORD)v4 == 482 )\n  {\n    v6 = 0;\n    if ( v5 <= 5 )\n      v6 = v5;\n    v5 = v6;\n  }\n  else\n  {\n    if ( (unsigned int)(v4 - 485) <= 1 )\n    {\n      if ( v5 > 3 )\n        v5 = 0;\n    }\n    else if ( (unsigned int)(v4 - 578) <= 1 )\n    {\n      v7 = 0;\n      if ( v5 <= 2 )\n        v7 = v5;\n      v5 = v7;\n    }\n    else if ( v5 > 4 )\n    {\n      v5 = 0;\n    }\n    if ( (unsigned int)(v4 - 480) <= 1 && v5 < 1 )\n      v5 = 1;\n  }\n  SetupTriggerPopup::updateValue(a1, v4, (float)v5);\n  SetupItemCompareTriggerPopup::updateOpButton(v8, (CCMenuItemSpriteExtra *)a2, v5, v4);\n  SetupItemCompareTriggerPopup::updateFormulaLabel(a1);\n}", "assembly": "; \n; SetupItemCompareTriggerPopup::onOpButton from 0x14046e670 to 0x14046e745 (213 bytes)\n; \n; 2 xrefs:\n; > SetupItemCompareTriggerPopup::init @ 0x14046e340\n; > <???> @ 0x1406db24c\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\nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x14046e670\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x14046e675\nmov     [rsp+arg_10], rdi                                              ; +0xa, 0x14046e67a\npush    r14                                                            ; +0xf, 0x14046e67f\nsub     rsp, 20h                                                       ; +0x11, 0x14046e681\nmov     rax, [rdx]                                                     ; +0x15, 0x14046e685\nmov     rsi, rcx                                                       ; +0x18, 0x14046e688\nmov     rcx, rdx                                                       ; +0x1b, 0x14046e68b\nmov     r14, rdx                                                       ; +0x1e, 0x14046e68e\ncall    qword ptr [rax+38h]                                            ; +0x21, 0x14046e691\nmov     r8, [rsi]                                                      ; +0x24, 0x14046e694\nmov     rcx, rsi                                                       ; +0x27, 0x14046e697\nmov     edx, eax                                                       ; +0x2a, 0x14046e69a\nmov     edi, eax                                                       ; +0x2c, 0x14046e69c\ncall    qword ptr [r8+470h]                                            ; +0x2e, 0x14046e69e\ncvttss2si ebx, xmm0                                                    ; +0x35, 0x14046e6a5\ninc     ebx                                                            ; +0x39, 0x14046e6a9\ncmp     edi, 1E2h                                                      ; +0x3b, 0x14046e6ab\njnz     short loc_14046E6BF                                            ; +0x41, 0x14046e6b1\nxor     ecx, ecx                                                       ; +0x43, 0x14046e6b3\ncmp     ebx, 5                                                         ; +0x45, 0x14046e6b5\ncmovle  ecx, ebx                                                       ; +0x48, 0x14046e6b8\nmov     ebx, ecx                                                       ; +0x4b, 0x14046e6bb\njmp     short loc_14046E709                                            ; +0x4d, 0x14046e6bd\nlea     eax, [rdi-1E5h]                                                ; +0x4f, 0x14046e6bf\ncmp     eax, 1                                                         ; +0x55, 0x14046e6c5\njbe     short loc_14046E6EC                                            ; +0x58, 0x14046e6c8\nlea     eax, [rdi-242h]                                                ; +0x5a, 0x14046e6ca\ncmp     eax, 1                                                         ; +0x60, 0x14046e6d0\njbe     short loc_14046E6E0                                            ; +0x63, 0x14046e6d3\ncmp     ebx, 4                                                         ; +0x65, 0x14046e6d5\njle     short loc_14046E6F4                                            ; +0x68, 0x14046e6d8\nxor     ecx, ecx                                                       ; +0x6a, 0x14046e6da\nmov     ebx, ecx                                                       ; +0x6c, 0x14046e6dc\njmp     short loc_14046E6F4                                            ; +0x6e, 0x14046e6de\nxor     ecx, ecx                                                       ; +0x70, 0x14046e6e0\ncmp     ebx, 2                                                         ; +0x72, 0x14046e6e2\ncmovle  ecx, ebx                                                       ; +0x75, 0x14046e6e5\nmov     ebx, ecx                                                       ; +0x78, 0x14046e6e8\njmp     short loc_14046E6F4                                            ; +0x7a, 0x14046e6ea\nxor     ecx, ecx                                                       ; +0x7c, 0x14046e6ec\ncmp     ebx, 3                                                         ; +0x7e, 0x14046e6ee\ncmovg   ebx, ecx                                                       ; +0x81, 0x14046e6f1\nlea     eax, [rdi-1E0h]                                                ; +0x84, 0x14046e6f4\ncmp     eax, 1                                                         ; +0x8a, 0x14046e6fa\nja      short loc_14046E709                                            ; +0x8d, 0x14046e6fd\nmov     eax, 1                                                         ; +0x8f, 0x14046e6ff\ncmp     ebx, eax                                                       ; +0x94, 0x14046e704\ncmovl   ebx, eax                                                       ; +0x96, 0x14046e706\nmovd    xmm2, ebx                                                      ; +0x99, 0x14046e709\nmov     edx, edi                                                       ; +0x9d, 0x14046e70d\ncvtdq2ps xmm2, xmm2                                                    ; +0x9f, 0x14046e70f\nmov     rcx, rsi                                                       ; +0xa2, 0x14046e712\ncall    SetupTriggerPopup__updateValue                                 ; +0xa5, 0x14046e715\nmov     r9d, edi                                                       ; +0xaa, 0x14046e71a\nmov     r8d, ebx                                                       ; +0xad, 0x14046e71d\nmov     rdx, r14                                                       ; +0xb0, 0x14046e720\ncall    SetupItemCompareTriggerPopup__updateOpButton                   ; +0xb3, 0x14046e723\nmov     rcx, rsi                                                       ; +0xb8, 0x14046e728\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xbb, 0x14046e72b\nmov     rsi, [rsp+28h+arg_8]                                           ; +0xc0, 0x14046e730\nmov     rdi, [rsp+28h+arg_10]                                          ; +0xc5, 0x14046e735\nadd     rsp, 20h                                                       ; +0xca, 0x14046e73a\npop     r14                                                            ; +0xce, 0x14046e73e\njmp     SetupItemCompareTriggerPopup__updateFormulaLabel               ; +0xd0, 0x14046e740", "xrefs": ["SetupItemCompareTriggerPopup::init @ 0x14046e340", "<???> @ 0x1406db24c"], "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"}