{"type": "func", "start": 375194, "end": 375252, "name": "sub_5B99A", "pseudocode": "// \n// sub_5B99A from 0x5b99a to 0x5b9d4 (58 bytes)\n// \n// 1 xrefs:\n// > sub_5793C @ 0x57944\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_5B99A(_DWORD *a1, int a2)\n{\n  int v3; // r0\n  int result; // r0\n  int v6; // r1\n\n  v3 = a1[2];\n  if ( v3 < 0 )\n    v3 = -v3;\n  if ( v3 >= a2 || (result = sub_5B9F2(a1, a2)) == 0 )\n  {\n    v6 = a1[1];\n    if ( v6 < a2 )\n      memset((void *)(*a1 + 4 * v6), 0, 4 * (a2 - v6));\n    a1[1] = a2;\n    return 0;\n  }\n  return result;\n}", "assembly": "; \n; sub_5B99A from 0x5b99a to 0x5b9d4 (58 bytes)\n; \n; 1 xrefs:\n; > sub_5793C @ 0x57944\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, 0x5b99a\nADD             R7, SP, #8                                             ; +0x2, 0x5b99c\nMOV             R5, R0                                                 ; +0x4, 0x5b99e\nLDR             R0, [R0,#8]                                            ; +0x6, 0x5b9a0\nMOV             R4, R1                                                 ; +0x8, 0x5b9a2\nCMP             R0, #0                                                 ; +0xa, 0x5b9a4\nBPL             loc_5B9AA                                              ; +0xc, 0x5b9a6\nNEGS            R0, R0                                                 ; +0xe, 0x5b9a8\nCMP             R0, R4                                                 ; +0x10, 0x5b9aa\nBGE             loc_5B9BA                                              ; +0x12, 0x5b9ac\nMOV             R0, R5                                                 ; +0x14, 0x5b9ae\nMOV             R1, R4                                                 ; +0x16, 0x5b9b0\nBL              sub_5B9F2                                              ; +0x18, 0x5b9b2\nCBZ             R0, loc_5B9BA                                          ; +0x1c, 0x5b9b6\nPOP             {R4,R5,R7,PC}                                          ; +0x1e, 0x5b9b8\nLDR             R1, [R5,#4]                                            ; +0x20, 0x5b9ba\nCMP             R1, R4                                                 ; +0x22, 0x5b9bc\nBGE             loc_5B9CE                                              ; +0x24, 0x5b9be\nLDR             R0, [R5]                                               ; +0x26, 0x5b9c0\nADD.W           R0, R0, R1,LSL#2                                       ; +0x28, 0x5b9c2\nSUBS            R1, R4, R1                                             ; +0x2c, 0x5b9c6\nLSLS            R1, R1, #2                                             ; +0x2e, 0x5b9c8\nBLX             __aeabi_memclr4                                        ; +0x30, 0x5b9ca\nMOVS            R0, #0                                                 ; +0x34, 0x5b9ce\nSTR             R4, [R5,#4]                                            ; +0x36, 0x5b9d0\nPOP             {R4,R5,R7,PC}                                          ; +0x38, 0x5b9d2", "xrefs": ["sub_5793C @ 0x57944"], "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"}