{"type": "func", "start": 330916, "end": 330978, "name": "sub_50CA4", "pseudocode": "// \n// sub_50CA4 from 0x50ca4 to 0x50ce2 (62 bytes)\n// \n// 1 xrefs:\n// > sub_522EC @ 0x52312\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_50CA4(int a1, int a2, int *a3)\n{\n  int v5; // r5\n  int result; // r0\n  int v7; // r1\n\n  v5 = accept(a1, nullptr, nullptr);\n  if ( v5 == -1 )\n  {\n    v7 = *(_DWORD *)_errno();\n    result = 43;\n    if ( v7 == 11 )\n      return 45;\n  }\n  else\n  {\n    result = sub_50A6C(v5, a2);\n    if ( !result )\n    {\n      *a3 = v5;\n      return 0;\n    }\n  }\n  return result;\n}", "assembly": "; \n; sub_50CA4 from 0x50ca4 to 0x50ce2 (62 bytes)\n; \n; 1 xrefs:\n; > sub_522EC @ 0x52312\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, 0x50ca4\nADD             R7, SP, #0xC                                           ; +0x2, 0x50ca6\nPUSH.W          {R11}                                                  ; +0x4, 0x50ca8\nMOV             R4, R2                                                 ; +0x8, 0x50cac\nMOV             R6, R1                                                 ; +0xa, 0x50cae\nMOVS            R1, #0; addr                                           ; +0xc, 0x50cb0\nMOVS            R2, #0; addr_len                                       ; +0xe, 0x50cb2\nBLX             accept                                                 ; +0x10, 0x50cb4\nMOV             R5, R0                                                 ; +0x14, 0x50cb8\nADDS            R0, #1                                                 ; +0x16, 0x50cba\nBEQ             loc_50CCE                                              ; +0x18, 0x50cbc\nMOV             R0, R5                                                 ; +0x1a, 0x50cbe\nMOV             R1, R6                                                 ; +0x1c, 0x50cc0\nBL              sub_50A6C                                              ; +0x1e, 0x50cc2\nCBNZ            R0, loc_50CDC                                          ; +0x22, 0x50cc6\nMOVS            R0, #0                                                 ; +0x24, 0x50cc8\nSTR             R5, [R4]                                               ; +0x26, 0x50cca\nB               loc_50CDC                                              ; +0x28, 0x50ccc\nBLX             __errno                                                ; +0x2a, 0x50cce\nLDR             R1, [R0]                                               ; +0x2e, 0x50cd2\nMOVS            R0, #0x2B ; '+'                                        ; +0x30, 0x50cd4\nCMP             R1, #0xB                                               ; +0x32, 0x50cd6\nIT EQ                                                                  ; +0x34, 0x50cd8\nMOVEQ           R0, #0x2D ; '-'                                        ; +0x36, 0x50cda\nPOP.W           {R11}                                                  ; +0x38, 0x50cdc\nPOP             {R4-R7,PC}                                             ; +0x3c, 0x50ce0", "xrefs": ["sub_522EC @ 0x52312"], "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"}