{"type": "func", "start": 774542, "end": 774584, "name": "sub_BD18E", "pseudocode": "// \n// sub_BD18E from 0xbd18e to 0xbd1b8 (42 bytes)\n// \n// 0 xrefs:\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 sub_BD18E(int a1, int a2, int a3, _DWORD *a4)\n{\n  int v4; // r4\n  unsigned int v5; // r1\n  unsigned int v6; // r5\n  int result; // r0\n\n  v4 = *(_DWORD *)(a1 + 420);\n  v5 = *(_DWORD *)(a1 + 16);\n  v6 = v4 + a3;\n  if ( v4 + a3 > v5 )\n    a3 = v5 - v4;\n  *a4 = a3;\n  *(_DWORD *)(a1 + 420) += a3;\n  result = 0;\n  if ( v6 > v5 )\n    return 31;\n  return result;\n}", "assembly": "; \n; sub_BD18E from 0xbd18e to 0xbd1b8 (42 bytes)\n; \n; 0 xrefs:\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            {R4,R5,R7,LR}                                          ; +0x0, 0xbd18e\nADD             R7, SP, #8                                             ; +0x2, 0xbd190\nLDR.W           R4, [R0,#0x1A4]                                        ; +0x4, 0xbd192\nLDR             R1, [R0,#0x10]                                         ; +0x8, 0xbd196\nADDS            R5, R4, R2                                             ; +0xa, 0xbd198\nCMP             R5, R1                                                 ; +0xc, 0xbd19a\nIT HI                                                                  ; +0xe, 0xbd19c\nSUBHI           R2, R1, R4                                             ; +0x10, 0xbd19e\nSTR             R2, [R3]                                               ; +0x12, 0xbd1a0\nCMP             R5, R1                                                 ; +0x14, 0xbd1a2\nLDR.W           R3, [R0,#0x1A4]                                        ; +0x16, 0xbd1a4\nADD             R2, R3                                                 ; +0x1a, 0xbd1a8\nSTR.W           R2, [R0,#0x1A4]                                        ; +0x1c, 0xbd1aa\nMOV.W           R0, #0                                                 ; +0x20, 0xbd1ae\nIT HI                                                                  ; +0x24, 0xbd1b2\nMOVHI           R0, #0x1F                                              ; +0x26, 0xbd1b4\nPOP             {R4,R5,R7,PC}                                          ; +0x28, 0xbd1b6", "xrefs": [], "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"}