{"type": "func", "start": 6443104576, "end": 6443104653, "name": "sub_18009F940", "pseudocode": "// \n// sub_18009F940 from 0x18009f940 to 0x18009f98d (77 bytes)\n// \n// 1 xrefs:\n// > sub_18009F880 @ 0x18009f880\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\nFILE *__fastcall sub_18009F940(__int64 a1, const char *a2, char a3)\n{\n  const char *v4; // rdx\n\n  if ( (a3 & 3) == 1 )\n  {\n    v4 = \"rb\";\n  }\n  else if ( (a3 & 4) != 0 )\n  {\n    v4 = \"r+b\";\n  }\n  else\n  {\n    v4 = \"wb\";\n    if ( (a3 & 8) == 0 )\n      v4 = nullptr;\n  }\n  if ( a2 && v4 )\n    return fopen(a2, v4);\n  else\n    return nullptr;\n}", "assembly": "; \n; sub_18009F940 from 0x18009f940 to 0x18009f98d (77 bytes)\n; \n; 1 xrefs:\n; > sub_18009F880 @ 0x18009f880\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\nmov     eax, r8d                                                       ; +0x0, 0x18009f940\nxor     ecx, ecx                                                       ; +0x3, 0x18009f943\nand     al, 3                                                          ; +0x5, 0x18009f945\nmov     r9, rdx                                                        ; +0x7, 0x18009f947\ncmp     al, 1                                                          ; +0xa, 0x18009f94a\njnz     short loc_18009F957                                            ; +0xc, 0x18009f94c\nlea     rdx, aRb_0; \"rb\"                                               ; +0xe, 0x18009f94e\njmp     short loc_18009F975                                            ; +0x15, 0x18009f955\ntest    r8b, 4                                                         ; +0x17, 0x18009f957\njz      short loc_18009F966                                            ; +0x1b, 0x18009f95b\nlea     rdx, aRB; \"r+b\"                                                ; +0x1d, 0x18009f95d\njmp     short loc_18009F975                                            ; +0x24, 0x18009f964\ntest    r8b, 8                                                         ; +0x26, 0x18009f966\nlea     rdx, Mode; \"wb\"                                                ; +0x2a, 0x18009f96a\ncmovz   rdx, rcx                                                       ; +0x31, 0x18009f971\ntest    r9, r9                                                         ; +0x35, 0x18009f975\njz      short loc_18009F989                                            ; +0x38, 0x18009f978\ntest    rdx, rdx                                                       ; +0x3a, 0x18009f97a\njz      short loc_18009F989                                            ; +0x3d, 0x18009f97d\nmov     rcx, r9                                                        ; +0x3f, 0x18009f97f\njmp     cs:fopen                                                       ; +0x42, 0x18009f982\nmov     rax, rcx                                                       ; +0x49, 0x18009f989\nretn                                                                   ; +0x4c, 0x18009f98c", "xrefs": ["sub_18009F880 @ 0x18009f880"], "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"}