Function at 0x180001740
Capabilities:
Get common file path
Link many functions at runtime
Terminate process

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x250
mov rax, qword [0x180085010]
xor rax, rsp
mov qword [rsp + 0x240], rax
test edx, edx
je 0x180001a6e
cmp edx, 1
jne 0x180001be7
xor ebx, ebx
cmp qword [0x180095d98], rbx
jne 0x180001932
xor edx, edx
mov qword [0x180095d98], rbx
mov r8d, 0x104
lea rcx, [rsp + 0x30]
call sub.VCRUNTIME140.dll_memset
mov edx, 0x104
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea rax, [rsp + 0x30]
sub rax, 2
cmp word [rax + 2], bx
lea rax, [rax + 2]
jne 0x1800017b6
movups xmm0, xmmword [0x180051ae8]
lea rcx, [rsp + 0x30]
movups xmmword [rax], xmm0
movsd xmm0, qword [0x180051af8]
movsd qword [rax + 0x10], xmm0
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov qword [0x180095d98], rax
test rax, rax
je 0x180001932
lea rdx, [0x180051b00]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x180095d98]
lea rdx, [0x180051b20]
mov qword [0x180095da0], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x180095d98]
lea rdx, [0x180051b40]
mov qword [0x180095dd0], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x180095d98]
lea rdx, [0x180051b60]
mov qword [0x180095da8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x180095d98]
lea rdx, [0x180051b80]
mov qword [0x180095dc0], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x180095d98]
lea rdx, [0x180051b98]
mov qword [0x180095dd8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x180095d98]
lea rdx, [0x180051bb0]
mov qword [0x180095d90], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x180095d98]
lea rdx, [0x180051bc8]
mov qword [0x180095d80], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x180095d98]
lea rdx, [0x180051be0]
mov qword [0x180095de0], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x180095d98]
lea rdx, [0x180051c00]
mov qword [0x180095db0], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x180095d98]
lea rdx, [0x180051c10]
mov qword [0x180095d88], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x180095d98]
lea rdx, [0x180051c20]
mov qword [0x180095db8], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x180095dc8], rax
mov r8d, 0x104
lea rdx, [0x180085a40]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov edx, 0x5c
lea rcx, [0x180085a40]
call qword [sym.imp.VCRUNTIME140.dll_wcsrchr]
test rax, rax
je 0x180001962
mov word [rax + 2], bx
lea rax, [0x180085a40]
sub rax, 2
nop dword [rax]
cmp word [rax + 2], bx
lea rax, [rax + 2]
jne 0x180001970
movups xmm0, xmmword [str.mk1hook_log.txt]
lea rdx, [0x1800797f0]
movups xmm1, xmmword [0x1800797e0]
lea rcx, [0x180085a40]
movups xmmword [rax], xmm0
movups xmmword [rax + 0x10], xmm1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
lea rdx, [0x1800797f4]
lea rcx, [0x180085a40]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen]
xor ecx, ecx
mov rdi, rax
call qword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
lea rcx, [rsp + 0x20]
mov qword [rsp + 0x20], rax
call qword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__ctime64]
lea rdx, str.Logging_Started____s
mov rcx, rdi
mov r8, rax
call fcn.180045be0
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
call fcn.18004bee0
mov rdi, rbx
lea rsi, [0x180000000]
cmp qword [rsi + rdi*8 + 0x85ca0], 0
jne 0x180001a2d
mov r8, qword [rsi + rdi*8 + 0x7ab30]
lea rdx, str.ERROR:_Could_not_find__s_
inc ebx
lea rcx, str.PatternSolver::CheckMissingPatterns
call fcn.180045c30
inc rdi
cmp rdi, 0x13
jl 0x180001a05
test ebx, ebx
jle 0x180001a64
mov r9d, 0x34
lea r8, [0x180051ad8]
lea rdx, str.Could_not_start_MK1Hook__n_nOne_or_more_code_patterns_could_not_be_found__this_might_indicate_that_game_version_is_not_supported_or_the_plugin_has_not_been_updated._n_nMK1Hook_officially_is_only_tested_with_latest_Steam_version._nCheck_log_for_more_details._n_nDo_you_want_to_try_to_run_the_game_anyway__It_might_crash_or_have_missing_features__n
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxW]
cmp eax, 7
jne 0x180001a64
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
call fcn.1800011a0
jmp 0x180001be7
mov rcx, qword [0x180085c48]
xor ebx, ebx
mov qword [rsp + 0x260], rbp
test rcx, rcx
je 0x180001a91
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov qword [0x180085c48], rbx
cmp byte [0x1800859e1], bl
je 0x180001b48
mov rax, qword [0x180085a28]
test rax, rax
je 0x180001ab2
mov rsi, qword [rax + 0x98]
jmp 0x180001ab5
mov rsi, rbx
mov rcx, qword [rsi + 0x30]
lea rdi, [rax + 8]
test rcx, rcx
je 0x180001acf
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rax, qword [0x180085a28]
and dword [rdi + 4], 0xfffffff8
mov qword [rdi + 0x80], rbx
mov qword [rdi + 0x90], rbx
test rax, rax
je 0x180001aec
dec dword [rax + 0xf4]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rdi, qword [0x180085a28]
test rdi, rdi
je 0x180001b0a
mov rsi, qword [rdi + 0xa0]
jmp 0x180001b0d
mov rsi, rbx
call fcn.18002f910
mov rcx, qword [rsi + 0x48]
call fcn.18004e55c
mov rax, qword [0x180085a28]
and dword [rdi + 0xc], 0xfffffff7
mov qword [rdi + 0x90], rbx
mov qword [rdi + 0xa0], rbx
test rax, rax
je 0x180001b3f
dec dword [rax + 0xf4]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [0x180095e28]
movabs rbp, 0x23ee08fb823ee09
mov r8, qword [0x180095e20]
mov rax, rbp
sub rcx, r8
mov esi, ebx
imul rcx
sar rdx, 2
mov rax, rdx
shr rax, 0x3f
add rdx, rax
je 0x180001bdf
mov r9, rbx
nop
imul rdi, r9, 0x1c8
add rdi, r8
mov rax, qword [rdi + 0x1b8]
test rax, rax
je 0x180001b9f
call rax
mov r8, qword [0x180095e20]
mov rcx, qword [rdi]
test rcx, rcx
je 0x180001bb7
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov qword [rdi], rbx
mov r8, qword [0x180095e20]
mov rcx, qword [0x180095e28]
inc esi
sub rcx, r8
mov r9d, esi
mov rax, rbp
imul rcx
sar rdx, 2
mov rax, rdx
shr rax, 0x3f
add rdx, rax
cmp r9, rdx
jb 0x180001b80
mov rbp, qword [rsp + 0x260]
mov eax, 1
mov rcx, qword [rsp + 0x240]
xor rcx, rsp
call fcn.18004e500
lea r11, [rsp + 0x250]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret