{"type": "func", "start": 330978, "end": 331014, "name": "sub_50CE2", "pseudocode": "// \n// sub_50CE2 from 0x50ce2 to 0x50d06 (36 bytes)\n// \n// 6 xrefs:\n// > sub_52054 @ 0x52082\n// > sub_522EC @ 0x523f2\n// > sub_6B24C @ 0x6b2a8\n// > sub_BC194 @ 0xbc4e4\n// > sub_BCD40 @ 0xbcd4e\n// > sub_BD0E4 @ 0xbd0ee\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_50CE2(int fd)\n{\n  if ( fd != -1 && (shutdown(fd, 2), close(fd) == -1) )\n    return 43;\n  else\n    return 0;\n}", "assembly": "; \n; sub_50CE2 from 0x50ce2 to 0x50d06 (36 bytes)\n; \n; 6 xrefs:\n; > sub_52054 @ 0x52082\n; > sub_522EC @ 0x523f2\n; > sub_6B24C @ 0x6b2a8\n; > sub_BC194 @ 0xbc4e4\n; > sub_BCD40 @ 0xbcd4e\n; > sub_BD0E4 @ 0xbd0ee\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,R6,R7,LR}                                          ; +0x0, 0x50ce2\nADD             R7, SP, #8                                             ; +0x2, 0x50ce4\nMOV             R4, R0                                                 ; +0x4, 0x50ce6\nADDS            R0, #1                                                 ; +0x6, 0x50ce8\nBEQ             loc_50CFE                                              ; +0x8, 0x50cea\nMOV             R0, R4; fd                                             ; +0xa, 0x50cec\nMOVS            R1, #2; how                                            ; +0xc, 0x50cee\nBLX             shutdown                                               ; +0xe, 0x50cf0\nMOV             R0, R4; fd                                             ; +0x12, 0x50cf4\nBLX             close                                                  ; +0x14, 0x50cf6\nADDS            R0, #1                                                 ; +0x18, 0x50cfa\nBEQ             loc_50D02                                              ; +0x1a, 0x50cfc\nMOVS            R0, #0                                                 ; +0x1c, 0x50cfe\nPOP             {R4,R6,R7,PC}                                          ; +0x1e, 0x50d00\nMOVS            R0, #0x2B ; '+'                                        ; +0x20, 0x50d02\nPOP             {R4,R6,R7,PC}                                          ; +0x22, 0x50d04", "xrefs": ["sub_52054 @ 0x52082", "sub_522EC @ 0x523f2", "sub_6B24C @ 0x6b2a8", "sub_BC194 @ 0xbc4e4", "sub_BCD40 @ 0xbcd4e", "sub_BD0E4 @ 0xbd0ee"], "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"}