{"type": "func", "start": 4298793584, "end": 4298793675, "name": "BoomScrollLayer::getRelativePageForNum", "pseudocode": "// \n// BoomScrollLayer::getRelativePageForNum from 0x1003a6270 to 0x1003a62cb (91 bytes)\n// \n// 2 xrefs:\n// > ListButtonBar::getPage @ 0x1003f0482\n// > EditButtonBar::getPage @ 0x1005e2552\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\nint __fastcall BoomScrollLayer::getRelativePageForNum(BoomScrollLayer *a1, int a2)\n{\n  int v2; // ecx\n\n  v2 = sub_100720070(*((_QWORD *)&a1->m_dynamicObjects + 4 * !a1->m_dynamic));\n  if ( a2 <= 0 )\n    return a2 + v2 * ((a2 != 0) + ((unsigned __int64)-__SPAIR64__(a2, a2) >> 32) / ((unsigned int)(v2 == 0) + v2));\n  else\n    return a2 % v2;\n}", "assembly": "; \n; BoomScrollLayer::getRelativePageForNum from 0x1003a6270 to 0x1003a62cb (91 bytes)\n; \n; 2 xrefs:\n; > ListButtonBar::getPage @ 0x1003f0482\n; > EditButtonBar::getPage @ 0x1005e2552\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    rbp                                                            ; +0x0, 0x1003a6270\nmov     rbp, rsp                                                       ; +0x1, 0x1003a6271\npush    rbx                                                            ; +0x4, 0x1003a6274\npush    rax                                                            ; +0x5, 0x1003a6275\nmov     ebx, esi                                                       ; +0x6, 0x1003a6276\nmovzx   eax, byte ptr [rdi+1C0h]                                       ; +0x8, 0x1003a6278\nxor     eax, 1                                                         ; +0xf, 0x1003a627f\nshl     eax, 5                                                         ; +0x12, 0x1003a6282\nmov     rdi, [rax+rdi+1B8h]                                            ; +0x15, 0x1003a6285\ncall    sub_100720070                                                  ; +0x1d, 0x1003a628d\nmov     ecx, eax                                                       ; +0x22, 0x1003a6292\ntest    ebx, ebx                                                       ; +0x24, 0x1003a6294\njle     short loc_1003A62A6                                            ; +0x26, 0x1003a6296\nmov     eax, ebx                                                       ; +0x28, 0x1003a6298\ncdq                                                                    ; +0x2a, 0x1003a629a\nidiv    ecx                                                            ; +0x2b, 0x1003a629b\nmov     eax, edx                                                       ; +0x2d, 0x1003a629d\nadd     rsp, 8                                                         ; +0x2f, 0x1003a629f\npop     rbx                                                            ; +0x33, 0x1003a62a3\npop     rbp                                                            ; +0x34, 0x1003a62a4\nretn                                                                   ; +0x35, 0x1003a62a5\nsetnz   al                                                             ; +0x36, 0x1003a62a6\nmovzx   esi, al                                                        ; +0x39, 0x1003a62a9\nlea     eax, [rsi+rbx]                                                 ; +0x3c, 0x1003a62ac\nneg     eax                                                            ; +0x3f, 0x1003a62af\ncmp     ecx, 1                                                         ; +0x41, 0x1003a62b1\nmov     edi, ecx                                                       ; +0x44, 0x1003a62b4\nadc     edi, 0                                                         ; +0x46, 0x1003a62b6\nxor     edx, edx                                                       ; +0x49, 0x1003a62b9\ndiv     edi                                                            ; +0x4b, 0x1003a62bb\nadd     eax, esi                                                       ; +0x4d, 0x1003a62bd\nimul    eax, ecx                                                       ; +0x4f, 0x1003a62bf\nadd     eax, ebx                                                       ; +0x52, 0x1003a62c2\nadd     rsp, 8                                                         ; +0x54, 0x1003a62c4\npop     rbx                                                            ; +0x58, 0x1003a62c8\npop     rbp                                                            ; +0x59, 0x1003a62c9\nretn                                                                   ; +0x5a, 0x1003a62ca", "xrefs": ["ListButtonBar::getPage @ 0x1003f0482", "EditButtonBar::getPage @ 0x1005e2552"], "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"}