{"type": "func", "start": 6443633652, "end": 6443633784, "name": "dllmain_crt_process_detach", "pseudocode": "// \n// dllmain_crt_process_detach from 0x180120bf4 to 0x180120c78 (132 bytes)\n// \n// 4 xrefs:\n// > <???> @ 0x180120bf3\n// > dllmain_crt_dispatch @ 0x180120ad7\n// > dllmain_dispatch @ 0x180120d29\n// > <???> @ 0x180202588\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(__crt_bool a1)\n{\n  char v3; // bl\n  __int64 v4; // rcx\n  __int64 v5; // rcx\n  BOOL v6; // ebx\n  unsigned int v7; // edx\n  HINSTANCE v8; // rcx\n  void *const v9; // r8\n\n  if ( dword_1801F4A2C <= 0 )\n    return 0;\n  --dword_1801F4A2C;\n  v3 = _scrt_acquire_startup_lock();\n  if ( dword_1801F4998 == 2 )\n  {\n    _scrt_dllmain_uninitialize_c();\n    sub_180123D98(v4);\n    sub_180123E0C(v5);\n    dword_1801F4998 = 0;\n    _scrt_release_startup_lock(v3);\n    v6 = _scrt_uninitialize_crt(a1, 0) != 0;\n    _scrt_dllmain_uninitialize_critical();\n    return v6;\n  }\n  else\n  {\n    _scrt_fastfail(7);\n    __debugbreak();\n    return dllmain_dispatch(v8, v7, v9);\n  }\n}", "assembly": "; \n; dllmain_crt_process_detach from 0x180120bf4 to 0x180120c78 (132 bytes)\n; \n; 4 xrefs:\n; > <???> @ 0x180120bf3\n; > dllmain_crt_dispatch @ 0x180120ad7\n; > dllmain_dispatch @ 0x180120d29\n; > <???> @ 0x180202588\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, 0x180120bf4\npush    rdi                                                            ; +0x5, 0x180120bf9\nsub     rsp, 30h                                                       ; +0x6, 0x180120bfa\nmov     dil, cl                                                        ; +0xa, 0x180120bfe\nmov     eax, cs:dword_1801F4A2C                                        ; +0xd, 0x180120c01\ntest    eax, eax                                                       ; +0x13, 0x180120c07\njg      short loc_180120C18                                            ; +0x15, 0x180120c09\nxor     eax, eax                                                       ; +0x17, 0x180120c0b\nmov     rbx, [rsp+38h+arg_0]                                           ; +0x19, 0x180120c0d\nadd     rsp, 30h                                                       ; +0x1e, 0x180120c12\npop     rdi                                                            ; +0x22, 0x180120c16\nretn                                                                   ; +0x23, 0x180120c17\ndec     eax                                                            ; +0x24, 0x180120c18\nmov     cs:dword_1801F4A2C, eax                                        ; +0x26, 0x180120c1a\ncall    __scrt_acquire_startup_lock                                    ; +0x2c, 0x180120c20\nmov     bl, al                                                         ; +0x31, 0x180120c25\nmov     [rsp+38h+var_18], al                                           ; +0x33, 0x180120c27\ncmp     cs:dword_1801F4998, 2                                          ; +0x37, 0x180120c2b\njnz     short loc_180120C6B                                            ; +0x3e, 0x180120c32\ncall    __scrt_dllmain_uninitialize_c                                  ; +0x40, 0x180120c34\ncall    sub_180123D98                                                  ; +0x45, 0x180120c39\ncall    sub_180123E0C                                                  ; +0x4a, 0x180120c3e\nand     cs:dword_1801F4998, 0                                          ; +0x4f, 0x180120c43\nmov     cl, bl                                                         ; +0x56, 0x180120c4a\ncall    __scrt_release_startup_lock                                    ; +0x58, 0x180120c4c\nxor     edx, edx                                                       ; +0x5d, 0x180120c51\nmov     cl, dil                                                        ; +0x5f, 0x180120c53\ncall    __scrt_uninitialize_crt                                        ; +0x62, 0x180120c56\nneg     al                                                             ; +0x67, 0x180120c5b\nsbb     ebx, ebx                                                       ; +0x69, 0x180120c5d\nand     ebx, 1                                                         ; +0x6b, 0x180120c5f\ncall    __scrt_dllmain_uninitialize_critical                           ; +0x6e, 0x180120c62\nmov     eax, ebx                                                       ; +0x73, 0x180120c67\njmp     short loc_180120C0D                                            ; +0x75, 0x180120c69\nmov     ecx, 7                                                         ; +0x77, 0x180120c6b\ncall    __scrt_fastfail                                                ; +0x7c, 0x180120c70\nnop                                                                    ; +0x81, 0x180120c75\nnop                                                                    ; +0x82, 0x180120c76\nint     3; Trap to Debugger                                            ; +0x83, 0x180120c77", "xrefs": ["<???> @ 0x180120bf3", "dllmain_crt_dispatch @ 0x180120ad7", "dllmain_dispatch @ 0x180120d29", "<???> @ 0x180202588"], "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"}