{"type": "func", "start": 594912, "end": 595016, "name": "sub_913E0", "pseudocode": "// \n// sub_913E0 from 0x913e0 to 0x91448 (104 bytes)\n// \n// 4 xrefs:\n// > sub_9167E @ 0x91740\n// > sub_91750 @ 0x917ae\n// > sub_91940 @ 0x91a12\n// > sub_91940 @ 0x91ad8\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:41:26 +0000\n// \n\nunsigned __int64 __fastcall sub_913E0(int a1, __int64 *a2, unsigned int a3, unsigned int a4)\n{\n  unsigned __int64 v5; // kr08_8\n  int v6; // r2\n\n  v5 = *a2;\n  v6 = *((_DWORD *)a2 + 9);\n  if ( (unsigned __int64)*a2 < *(_QWORD *)(a1 + 24) )\n    v5 = *(_QWORD *)(a1 + 24);\n  if ( !v6 )\n    v6 = 1;\n  if ( __PAIR64__(a4, a3) >= v5 )\n    return (__PAIR64__(a4, a3) - v5) / (unsigned int)v6;\n  else\n    return -(__int64)((v5 - __PAIR64__(a4, a3)) / (unsigned int)v6);\n}", "assembly": "; \n; sub_913E0 from 0x913e0 to 0x91448 (104 bytes)\n; \n; 4 xrefs:\n; > sub_9167E @ 0x91740\n; > sub_91750 @ 0x917ae\n; > sub_91940 @ 0x91a12\n; > sub_91940 @ 0x91ad8\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:41:26 +0000\n; \nPUSH            {R4-R7,LR}                                             ; +0x0, 0x913e0\nADD             R7, SP, #0xC                                           ; +0x2, 0x913e2\nPUSH.W          {R8}                                                   ; +0x4, 0x913e4\nLDRD.W          R5, R4, [R0,#0x18]                                     ; +0x8, 0x913e8\nMOV             R12, R2                                                ; +0xc, 0x913ec\nLDRD.W          R0, R6, [R1]                                           ; +0xe, 0x913ee\nMOV.W           R8, #0                                                 ; +0x12, 0x913f2\nLDR             R2, [R1,#0x24]                                         ; +0x16, 0x913f6\nSUBS            R1, R0, R5                                             ; +0x18, 0x913f8\nSBCS.W          R1, R6, R4                                             ; +0x1a, 0x913fa\nMOV.W           R1, #0                                                 ; +0x1e, 0x913fe\nIT CC                                                                  ; +0x22, 0x91402\nMOVCC           R1, #1                                                 ; +0x24, 0x91404\nCMP             R1, #0                                                 ; +0x26, 0x91406\nITT NE                                                                 ; +0x28, 0x91408\nMOVNE           R6, R4                                                 ; +0x2a, 0x9140a\nMOVNE           R0, R5                                                 ; +0x2c, 0x9140c\nCMP             R2, #0                                                 ; +0x2e, 0x9140e\nIT EQ                                                                  ; +0x30, 0x91410\nMOVEQ           R2, #1                                                 ; +0x32, 0x91412\nSUBS.W          R1, R12, R0                                            ; +0x34, 0x91414\nSBCS.W          R1, R3, R6                                             ; +0x38, 0x91418\nBCS             loc_91434                                              ; +0x3c, 0x9141c\nSUBS.W          R0, R0, R12                                            ; +0x3e, 0x9141e\nSBC.W           R1, R6, R3                                             ; +0x42, 0x91422\nMOVS            R3, #0                                                 ; +0x46, 0x91426\nBLX             j___aeabi_uldivmod                                     ; +0x48, 0x91428\nNEGS            R0, R0                                                 ; +0x4c, 0x9142c\nSBC.W           R1, R8, R1                                             ; +0x4e, 0x9142e\nB               loc_91442                                              ; +0x52, 0x91432\nSUBS.W          R0, R12, R0                                            ; +0x54, 0x91434\nSBC.W           R1, R3, R6                                             ; +0x58, 0x91438\nMOVS            R3, #0                                                 ; +0x5c, 0x9143c\nBLX             j___aeabi_uldivmod                                     ; +0x5e, 0x9143e\nPOP.W           {R8}                                                   ; +0x62, 0x91442\nPOP             {R4-R7,PC}                                             ; +0x66, 0x91446", "xrefs": ["sub_9167E @ 0x91740", "sub_91750 @ 0x917ae", "sub_91940 @ 0x91a12", "sub_91940 @ 0x91ad8"], "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"}