Function at 0x1800017c0
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 [0x180091010]
xor rax, rsp
mov qword [rsp + 0x240], rax
mov qword [0x1800919e0], rcx
test edx, edx
je 0x180001b09
cmp edx, 1
jne 0x180001c87
xor ebx, ebx
cmp qword [0x1800a1e20], rbx
jne 0x1800019bc
xor edx, edx
mov qword [0x1800a1e20], 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
nop dword [rax]
cmp word [rax + 2], bx
lea rax, [rax + 2]
jne 0x180001840
movups xmm0, xmmword [0x18005bb08]
lea rcx, [rsp + 0x30]
movups xmmword [rax], xmm0
movsd xmm0, qword [0x18005bb18]
movsd qword [rax + 0x10], xmm0
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov qword [0x1800a1e20], rax
test rax, rax
je 0x1800019bc
lea rdx, [0x18005bb20]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1800a1e20]
lea rdx, [0x18005bb40]
mov qword [0x1800a1e28], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1800a1e20]
lea rdx, [0x18005bb60]
mov qword [0x1800a1e58], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1800a1e20]
lea rdx, [0x18005bb80]
mov qword [0x1800a1e30], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1800a1e20]
lea rdx, [0x18005bba0]
mov qword [0x1800a1e48], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1800a1e20]
lea rdx, [0x18005bbb8]
mov qword [0x1800a1e60], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1800a1e20]
lea rdx, [0x18005bbd0]
mov qword [0x1800a1e18], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1800a1e20]
lea rdx, [0x18005bbe8]
mov qword [0x1800a1e08], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1800a1e20]
lea rdx, [0x18005bc00]
mov qword [0x1800a1e68], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1800a1e20]
lea rdx, [0x18005bc20]
mov qword [0x1800a1e38], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1800a1e20]
lea rdx, [0x18005bc30]
mov qword [0x1800a1e10], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x1800a1e20]
lea rdx, [0x18005bc40]
mov qword [0x1800a1e40], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1800a1e50], rax
call fcn.18004fa40
mov r8d, 0x104
lea rdx, [0x180091a40]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov edx, 0x5c
lea rcx, [0x180091a40]
call qword [sym.imp.VCRUNTIME140.dll_wcsrchr]
test rax, rax
je 0x1800019f1
mov word [rax + 2], bx
lea rax, [0x180091a40]
sub rax, 2
nop dword [rax]
cmp word [rax + 2], bx
lea rax, [rax + 2]
jne 0x180001a00
movups xmm0, xmmword [str.mk1hook_log.txt]
lea rdx, [0x180083d28]
movups xmm1, xmmword [0x180083d18]
lea rcx, [0x180091a40]
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, [0x180083d2c]
lea rcx, [0x180091a40]
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.18004e320
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
call fcn.1800557d0
call fcn.180055bc0
mov rdi, rbx
lea rsi, [0x180000000]
nop word [rax + rax]
cmp qword [rsi + rdi*8 + 0x91cc0], 0
jne 0x180001ac8
mov r8, qword [rsi + rdi*8 + 0x86a00]
lea rdx, str.ERROR:_Could_not_find__s_
inc ebx
lea rcx, str.PatternSolver::CheckMissingPatterns
call fcn.18004e370
inc rdi
cmp rdi, 0x20
jl 0x180001aa0
test ebx, ebx
jle 0x180001aff
mov r9d, 0x34
lea r8, [0x18005baf8]
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 0x180001aff
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
call fcn.1800011a0
jmp 0x180001c87
mov rcx, qword [0x180091c50]
xor ebx, ebx
mov qword [rsp + 0x260], rbp
test rcx, rcx
je 0x180001b2c
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov qword [0x180091c50], rbx
cmp byte [0x1800919e9], bl
je 0x180001be3
mov rax, qword [0x180091a30]
test rax, rax
je 0x180001b4d
mov rsi, qword [rax + 0x98]
jmp 0x180001b50
mov rsi, rbx
mov rcx, qword [rsi + 0x30]
lea rdi, [rax + 8]
test rcx, rcx
je 0x180001b6a
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rax, qword [0x180091a30]
and dword [rdi + 4], 0xfffffff8
mov qword [rdi + 0x80], rbx
mov qword [rdi + 0x90], rbx
test rax, rax
je 0x180001b87
dec dword [rax + 0xf4]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rdi, qword [0x180091a30]
test rdi, rdi
je 0x180001ba5
mov rsi, qword [rdi + 0xa0]
jmp 0x180001ba8
mov rsi, rbx
call fcn.180030e90
mov rcx, qword [rsi + 0x48]
call fcn.180058adc
mov rax, qword [0x180091a30]
and dword [rdi + 0xc], 0xfffffff7
mov qword [rdi + 0x90], rbx
mov qword [rdi + 0xa0], rbx
test rax, rax
je 0x180001bda
dec dword [rax + 0xf4]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [0x1800a1eb0]
movabs rbp, 0x23ee08fb823ee09
mov r8, qword [0x1800a1ea8]
mov rax, rbp
sub rcx, r8
mov esi, ebx
imul rcx
sar rdx, 2
mov rax, rdx
shr rax, 0x3f
add rdx, rax
je 0x180001c7f
mov r9, rbx
nop dword [rax]
imul rdi, r9, 0x1c8
add rdi, r8
mov rax, qword [rdi + 0x1b8]
test rax, rax
je 0x180001c3f
call rax
mov r8, qword [0x1800a1ea8]
mov rcx, qword [rdi]
test rcx, rcx
je 0x180001c57
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov qword [rdi], rbx
mov r8, qword [0x1800a1ea8]
mov rcx, qword [0x1800a1eb0]
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 0x180001c20
mov rbp, qword [rsp + 0x260]
mov eax, 1
mov rcx, qword [rsp + 0x240]
xor rcx, rsp
call fcn.180058a80
lea r11, [rsp + 0x250]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret