{"type": "func", "start": 6443368004, "end": 6443368132, "name": "dllmain_crt_process_detach", "pseudocode": "// \n// dllmain_crt_process_detach from 0x1800dfe44 to 0x1800dfec4 (128 bytes)\n// \n// 4 xrefs:\n// > <???> @ 0x1800dfe43\n// > dllmain_crt_dispatch @ 0x1800dfd27\n// > dllmain_dispatch @ 0x1800dff75\n// > <???> @ 0x1801bb100\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\n__int64 __fastcall dllmain_crt_process_detach(char a1)\n{\n  char v3; // bl\n  __int64 v4; // rcx\n  cocos2d::CCComponent *v5; // rcx\n  unsigned int v6; // ebx\n  void *v7; // rdx\n  __int64 v8; // rcx\n  unsigned int v9; // edx\n  HINSTANCE v10; // rcx\n  void *const v11; // r8\n\n  if ( dword_1801AC704 <= 0 )\n    return 0;\n  --dword_1801AC704;\n  v3 = _scrt_acquire_startup_lock();\n  if ( dword_1801AC6B8 == 2 )\n  {\n    _scrt_dllmain_uninitialize_c();\n    sub_1800DF74C();\n    sub_1800E04A4(v4);\n    dword_1801AC6B8 = 0;\n    _scrt_release_startup_lock(v3);\n    LOBYTE(v5) = a1;\n    v6 = (unsigned __int8)_scrt_uninitialize_crt(v5, nullptr);\n    _scrt_dllmain_uninitialize_critical(v8, v7);\n    return v6;\n  }\n  else\n  {\n    _scrt_fastfail(7);\n    __debugbreak();\n    return dllmain_dispatch(v10, v9, v11);\n  }\n}", "assembly": "; \n; dllmain_crt_process_detach from 0x1800dfe44 to 0x1800dfec4 (128 bytes)\n; \n; 4 xrefs:\n; > <???> @ 0x1800dfe43\n; > dllmain_crt_dispatch @ 0x1800dfd27\n; > dllmain_dispatch @ 0x1800dff75\n; > <???> @ 0x1801bb100\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     [rsp+arg_0], rbx                                               ; +0x0, 0x1800dfe44\npush    rdi                                                            ; +0x5, 0x1800dfe49\nsub     rsp, 30h                                                       ; +0x6, 0x1800dfe4a\nmov     dil, cl                                                        ; +0xa, 0x1800dfe4e\nmov     eax, cs:dword_1801AC704                                        ; +0xd, 0x1800dfe51\ntest    eax, eax                                                       ; +0x13, 0x1800dfe57\njg      short loc_1800DFE68                                            ; +0x15, 0x1800dfe59\nxor     eax, eax                                                       ; +0x17, 0x1800dfe5b\nmov     rbx, [rsp+38h+arg_0]                                           ; +0x19, 0x1800dfe5d\nadd     rsp, 30h                                                       ; +0x1e, 0x1800dfe62\npop     rdi                                                            ; +0x22, 0x1800dfe66\nretn                                                                   ; +0x23, 0x1800dfe67\ndec     eax                                                            ; +0x24, 0x1800dfe68\nmov     cs:dword_1801AC704, eax                                        ; +0x26, 0x1800dfe6a\ncall    __scrt_acquire_startup_lock                                    ; +0x2c, 0x1800dfe70\nmov     bl, al                                                         ; +0x31, 0x1800dfe75\nmov     [rsp+38h+var_18], al                                           ; +0x33, 0x1800dfe77\ncmp     cs:dword_1801AC6B8, 2                                          ; +0x37, 0x1800dfe7b\njnz     short loc_1800DFEB7                                            ; +0x3e, 0x1800dfe82\ncall    __scrt_dllmain_uninitialize_c                                  ; +0x40, 0x1800dfe84\ncall    sub_1800DF74C                                                  ; +0x45, 0x1800dfe89\ncall    sub_1800E04A4                                                  ; +0x4a, 0x1800dfe8e\nand     cs:dword_1801AC6B8, 0                                          ; +0x4f, 0x1800dfe93\nmov     cl, bl                                                         ; +0x56, 0x1800dfe9a\ncall    __scrt_release_startup_lock                                    ; +0x58, 0x1800dfe9c\nxor     edx, edx                                                       ; +0x5d, 0x1800dfea1\nmov     cl, dil                                                        ; +0x5f, 0x1800dfea3\ncall    __scrt_uninitialize_crt                                        ; +0x62, 0x1800dfea6\nmovzx   ebx, al                                                        ; +0x67, 0x1800dfeab\ncall    __scrt_dllmain_uninitialize_critical                           ; +0x6a, 0x1800dfeae\nmov     eax, ebx                                                       ; +0x6f, 0x1800dfeb3\njmp     short loc_1800DFE5D                                            ; +0x71, 0x1800dfeb5\nmov     ecx, 7                                                         ; +0x73, 0x1800dfeb7\ncall    __scrt_fastfail                                                ; +0x78, 0x1800dfebc\nnop                                                                    ; +0x7d, 0x1800dfec1\nnop                                                                    ; +0x7e, 0x1800dfec2\nint     3; Trap to Debugger                                            ; +0x7f, 0x1800dfec3", "xrefs": ["<???> @ 0x1800dfe43", "dllmain_crt_dispatch @ 0x1800dfd27", "dllmain_dispatch @ 0x1800dff75", "<???> @ 0x1801bb100"], "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"}