{"type": "func", "start": 6443363360, "end": 6443363529, "name": "sub_1800DEC20", "pseudocode": "// \n// sub_1800DEC20 from 0x1800dec20 to 0x1800decc9 (169 bytes)\n// \n// 2 xrefs:\n// > sub_1800DDC10 @ 0x1800de066\n// > <???> @ 0x1801baf20\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\nunsigned int __fastcall sub_1800DEC20(_QWORD *a1)\n{\n  __int64 v2; // rdx\n  __int64 v3; // rcx\n  __int64 v4; // r8\n  int Error; // eax\n  const char *v6; // rax\n  __int64 v8; // rdx\n  __int64 v9; // rcx\n  __int64 v10; // r8\n  int v11; // eax\n  const char *v12; // rax\n\n  if ( a1 )\n  {\n    if ( !(unsigned int)eglMakeCurrent(qword_1801AC168, a1[84], a1[84], a1[83]) )\n    {\n      Error = eglGetError(v3, v2, v4);\n      v6 = sub_1800DEAE0(Error);\n      return (unsigned int)sub_1800D3530(0x10008u, \"EGL: Failed to make context current: %s\", v6);\n    }\n  }\n  else if ( !(unsigned int)eglMakeCurrent(qword_1801AC168, 0, 0, 0) )\n  {\n    v11 = eglGetError(v9, v8, v10);\n    v12 = sub_1800DEAE0(v11);\n    return (unsigned int)sub_1800D3530(0x10008u, \"EGL: Failed to clear current context: %s\", v12);\n  }\n  return sub_1800D99D0((__int64)&unk_1801AB18C, a1);\n}", "assembly": "; \n; sub_1800DEC20 from 0x1800dec20 to 0x1800decc9 (169 bytes)\n; \n; 2 xrefs:\n; > sub_1800DDC10 @ 0x1800de066\n; > <???> @ 0x1801baf20\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    rbx                                                            ; +0x0, 0x1800dec20\nsub     rsp, 20h                                                       ; +0x2, 0x1800dec22\nmov     rbx, rcx                                                       ; +0x6, 0x1800dec26\ntest    rcx, rcx                                                       ; +0x9, 0x1800dec29\njz      short loc_1800DEC76                                            ; +0xc, 0x1800dec2c\nmov     rdx, [rcx+2A0h]                                                ; +0xe, 0x1800dec2e\nmov     r9, [rcx+298h]                                                 ; +0x15, 0x1800dec35\nmov     r8, rdx                                                        ; +0x1c, 0x1800dec3c\nmov     rcx, cs:qword_1801AC168                                        ; +0x1f, 0x1800dec3f\ncall    cs:eglMakeCurrent                                              ; +0x26, 0x1800dec46\ntest    eax, eax                                                       ; +0x2c, 0x1800dec4c\njnz     short loc_1800DECB5                                            ; +0x2e, 0x1800dec4e\ncall    cs:eglGetError                                                 ; +0x30, 0x1800dec50\nmov     ecx, eax                                                       ; +0x36, 0x1800dec56\ncall    sub_1800DEAE0                                                  ; +0x38, 0x1800dec58\nmov     r8, rax                                                        ; +0x3d, 0x1800dec5d\nlea     rdx, aEglFailedToMak; \"EGL: Failed to make context current: %s\" ; +0x40, 0x1800dec60\nmov     ecx, 10008h                                                    ; +0x47, 0x1800dec67\nadd     rsp, 20h                                                       ; +0x4c, 0x1800dec6c\npop     rbx                                                            ; +0x50, 0x1800dec70\njmp     sub_1800D3530                                                  ; +0x51, 0x1800dec71\nmov     rcx, cs:qword_1801AC168                                        ; +0x56, 0x1800dec76\nxor     r9d, r9d                                                       ; +0x5d, 0x1800dec7d\nxor     r8d, r8d                                                       ; +0x60, 0x1800dec80\nxor     edx, edx                                                       ; +0x63, 0x1800dec83\ncall    cs:eglMakeCurrent                                              ; +0x65, 0x1800dec85\ntest    eax, eax                                                       ; +0x6b, 0x1800dec8b\njnz     short loc_1800DECB5                                            ; +0x6d, 0x1800dec8d\ncall    cs:eglGetError                                                 ; +0x6f, 0x1800dec8f\nmov     ecx, eax                                                       ; +0x75, 0x1800dec95\ncall    sub_1800DEAE0                                                  ; +0x77, 0x1800dec97\nmov     r8, rax                                                        ; +0x7c, 0x1800dec9c\nlea     rdx, aEglFailedToCle; \"EGL: Failed to clear current context: %\"... ; +0x7f, 0x1800dec9f\nmov     ecx, 10008h                                                    ; +0x86, 0x1800deca6\nadd     rsp, 20h                                                       ; +0x8b, 0x1800decab\npop     rbx                                                            ; +0x8f, 0x1800decaf\njmp     sub_1800D3530                                                  ; +0x90, 0x1800decb0\nmov     rdx, rbx                                                       ; +0x95, 0x1800decb5\nlea     rcx, unk_1801AB18C                                             ; +0x98, 0x1800decb8\nadd     rsp, 20h                                                       ; +0x9f, 0x1800decbf\npop     rbx                                                            ; +0xa3, 0x1800decc3\njmp     sub_1800D99D0                                                  ; +0xa4, 0x1800decc4", "xrefs": ["sub_1800DDC10 @ 0x1800de066", "<???> @ 0x1801baf20"], "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"}