{"type": "func", "start": 785314, "end": 785370, "name": "sub_BFBA2", "pseudocode": "// \n// sub_BFBA2 from 0xbfba2 to 0xbfbda (56 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_BFBA2(int a1, void *ptr, size_t a3, size_t *a4)\n{\n  size_t v7; // r0\n  int result; // r0\n  int v9; // r1\n\n  v7 = fread(ptr, 1u, a3, *(FILE **)(a1 + 4));\n  *a4 = v7;\n  if ( v7 == a3 )\n    return 0;\n  v9 = feof(*(FILE **)(a1 + 4));\n  result = 16;\n  if ( !v9 )\n    return 13;\n  return result;\n}", "assembly": "; \n; sub_BFBA2 from 0xbfba2 to 0xbfbda (56 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-R7,LR}                                             ; +0x0, 0xbfba2\nADD             R7, SP, #0xC                                           ; +0x2, 0xbfba4\nPUSH.W          {R11}                                                  ; +0x4, 0xbfba6\nMOV             R5, R3                                                 ; +0x8, 0xbfbaa\nLDR             R3, [R0,#4]; stream                                    ; +0xa, 0xbfbac\nMOV             R4, R0                                                 ; +0xc, 0xbfbae\nMOV             R0, R1; ptr                                            ; +0xe, 0xbfbb0\nMOVS            R1, #1; size                                           ; +0x10, 0xbfbb2\nMOV             R6, R2                                                 ; +0x12, 0xbfbb4\nBLX             fread                                                  ; +0x14, 0xbfbb6\nCMP             R0, R6                                                 ; +0x18, 0xbfbba\nSTR             R0, [R5]                                               ; +0x1a, 0xbfbbc\nBNE             loc_BFBC4                                              ; +0x1c, 0xbfbbe\nMOVS            R0, #0                                                 ; +0x1e, 0xbfbc0\nB               loc_BFBD4                                              ; +0x20, 0xbfbc2\nLDR             R0, [R4,#4]; stream                                    ; +0x22, 0xbfbc4\nBLX             feof                                                   ; +0x24, 0xbfbc6\nMOV             R1, R0                                                 ; +0x28, 0xbfbca\nMOVS            R0, #0x10                                              ; +0x2a, 0xbfbcc\nCMP             R1, #0                                                 ; +0x2c, 0xbfbce\nIT EQ                                                                  ; +0x2e, 0xbfbd0\nMOVEQ           R0, #0xD                                               ; +0x30, 0xbfbd2\nPOP.W           {R11}                                                  ; +0x32, 0xbfbd4\nPOP             {R4-R7,PC}                                             ; +0x36, 0xbfbd8", "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"}