{"type": "func", "start": 6442580400, "end": 6442580528, "name": "dllmain_crt_process_detach", "pseudocode": "// \n// dllmain_crt_process_detach from 0x18001f9b0 to 0x18001fa30 (128 bytes)\n// \n// 4 xrefs:\n// > <???> @ 0x18001f9af\n// > dllmain_crt_dispatch @ 0x18001f893\n// > dllmain_dispatch @ 0x18001fae1\n// > <???> @ 0x18004b25c\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  __int64 v5; // rcx\n  __int64 v6; // rcx\n  unsigned int v7; // ebx\n  unsigned int v8; // edx\n  HINSTANCE v9; // rcx\n  void *const v10; // r8\n\n  if ( dword_180048038 <= 0 )\n    return 0;\n  --dword_180048038;\n  v3 = _scrt_acquire_startup_lock();\n  if ( dword_180047FF0 == 2 )\n  {\n    _scrt_dllmain_uninitialize_c();\n    sub_180020158(v4);\n    sub_1800201CC(v5);\n    dword_180047FF0 = 0;\n    _scrt_release_startup_lock(v3);\n    LOBYTE(v6) = a1;\n    v7 = (unsigned __int8)_scrt_uninitialize_crt(v6, 0);\n    _scrt_dllmain_uninitialize_critical();\n    return v7;\n  }\n  else\n  {\n    _scrt_fastfail(7);\n    __debugbreak();\n    return dllmain_dispatch(v9, v8, v10);\n  }\n}", "assembly": "; \n; dllmain_crt_process_detach from 0x18001f9b0 to 0x18001fa30 (128 bytes)\n; \n; 4 xrefs:\n; > <???> @ 0x18001f9af\n; > dllmain_crt_dispatch @ 0x18001f893\n; > dllmain_dispatch @ 0x18001fae1\n; > <???> @ 0x18004b25c\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, 0x18001f9b0\npush    rdi                                                            ; +0x5, 0x18001f9b5\nsub     rsp, 30h                                                       ; +0x6, 0x18001f9b6\nmov     dil, cl                                                        ; +0xa, 0x18001f9ba\nmov     eax, cs:dword_180048038                                        ; +0xd, 0x18001f9bd\ntest    eax, eax                                                       ; +0x13, 0x18001f9c3\njg      short loc_18001F9D4                                            ; +0x15, 0x18001f9c5\nxor     eax, eax                                                       ; +0x17, 0x18001f9c7\nmov     rbx, [rsp+38h+arg_0]                                           ; +0x19, 0x18001f9c9\nadd     rsp, 30h                                                       ; +0x1e, 0x18001f9ce\npop     rdi                                                            ; +0x22, 0x18001f9d2\nretn                                                                   ; +0x23, 0x18001f9d3\ndec     eax                                                            ; +0x24, 0x18001f9d4\nmov     cs:dword_180048038, eax                                        ; +0x26, 0x18001f9d6\ncall    __scrt_acquire_startup_lock                                    ; +0x2c, 0x18001f9dc\nmov     bl, al                                                         ; +0x31, 0x18001f9e1\nmov     [rsp+38h+var_18], al                                           ; +0x33, 0x18001f9e3\ncmp     cs:dword_180047FF0, 2                                          ; +0x37, 0x18001f9e7\njnz     short loc_18001FA23                                            ; +0x3e, 0x18001f9ee\ncall    __scrt_dllmain_uninitialize_c                                  ; +0x40, 0x18001f9f0\ncall    sub_180020158                                                  ; +0x45, 0x18001f9f5\ncall    sub_1800201CC                                                  ; +0x4a, 0x18001f9fa\nand     cs:dword_180047FF0, 0                                          ; +0x4f, 0x18001f9ff\nmov     cl, bl                                                         ; +0x56, 0x18001fa06\ncall    __scrt_release_startup_lock                                    ; +0x58, 0x18001fa08\nxor     edx, edx                                                       ; +0x5d, 0x18001fa0d\nmov     cl, dil                                                        ; +0x5f, 0x18001fa0f\ncall    __scrt_uninitialize_crt                                        ; +0x62, 0x18001fa12\nmovzx   ebx, al                                                        ; +0x67, 0x18001fa17\ncall    __scrt_dllmain_uninitialize_critical                           ; +0x6a, 0x18001fa1a\nmov     eax, ebx                                                       ; +0x6f, 0x18001fa1f\njmp     short loc_18001F9C9                                            ; +0x71, 0x18001fa21\nmov     ecx, 7                                                         ; +0x73, 0x18001fa23\ncall    __scrt_fastfail                                                ; +0x78, 0x18001fa28\nnop                                                                    ; +0x7d, 0x18001fa2d\nnop                                                                    ; +0x7e, 0x18001fa2e\nint     3; Trap to Debugger                                            ; +0x7f, 0x18001fa2f", "xrefs": ["<???> @ 0x18001f9af", "dllmain_crt_dispatch @ 0x18001f893", "dllmain_dispatch @ 0x18001fae1", "<???> @ 0x18004b25c"], "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"}