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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x828
mov eax, dword [0x1001d040]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 0xc], 1
push ebx
mov ebx, dword [ebp + 8]
push edi
jne 0x10001a4d
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push str.ntdll.dll
call esi
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x10001767
push str.RtlImageNtHeader
push eax
call edi
mov dword [0x1001e434], eax
push str.Kernel32.dll
call esi
test eax, eax
je 0x1000179a
push str.SetProcessMitigationPolicy
push eax
call edi
mov dword [0x1001e454], eax
test eax, eax
je 0x1000179a
push 4
lea ecx, [ebp - 0x828]
mov dword [ebp - 0x828], 3
push ecx
push 3
call eax
push 0x208
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.10003ef0
push 0x208
lea eax, [ebp - 0x414]
push 0
push eax
call fcn.10003ef0
add esp, 0x18
lea eax, [ebp - 0x20c]
push 0x104
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x10001a30
cmp eax, 0xd8
ja 0x10001a30
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x10001810
push 0x10
push str.d3d8
push str.Unable_to_get_dll_path___2___ERROR_INSUFFICIENT_BUFFER_
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
lea eax, [ebp - 0x20c]
push 0x5c
push eax
call fcn.10003844
add esp, 8
test eax, eax
je 0x1000182a
xor ecx, ecx
mov word [eax], cx
push 0x208
lea eax, [ebp - 0x61c]
push 0
push eax
call fcn.10003ef0
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x61c]
push 0x104
push eax
call fcn.10005680
push str.d3d8R.dll
lea eax, [ebp - 0x61c]
push 0x104
push eax
call fcn.100056e4
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
lea eax, [ebp - 0x61c]
add esp, 0x24
push 0
push 0x80
push 3
push 0
push 0
push 0
push eax
call esi
cmp eax, 0xffffffff
je 0x1000189f
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [0x1001e444], 1
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x414]
push 0x104
push eax
call fcn.10005680
push str.Silent_Hill_3_PC_Fix.dll
lea eax, [ebp - 0x414]
push 0x104
push eax
call fcn.100056e4
add esp, 0x18
lea eax, [ebp - 0x414]
push 0
push 0x80
push 3
push 0
push 0
push 0
push eax
call esi
mov esi, dword [sym.imp.USER32.dll_MessageBoxW]
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryW]
cmp eax, 0xffffffff
je 0x1000191c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x414]
push eax
call ebx
test eax, eax
jne 0x1000191c
push 0x10
push str.d3d8
push str.Failed_to_load_game_mod_dll_
push eax
call esi
push 0x208
lea eax, [ebp - 0x824]
push 0
push eax
call fcn.10003ef0
add esp, 0xc
lea eax, [ebp - 0x824]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x10001a18
cmp eax, 0xf5
ja 0x10001a18
push 0x1001aed8
lea eax, [ebp - 0x824]
push 0x104
push eax
call fcn.100056e4
add esp, 0xc
lea eax, [ebp - 0x61c]
cmp byte [0x1001e444], 1
je 0x10001985
lea eax, [ebp - 0x824]
push eax
call ebx
mov dword [0x1001e458], eax
test eax, eax
jne 0x100019a8
push 0x10
push str.d3d8
push str.Failed_to_load_d3d8.dll_
push eax
call esi
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push 0x1001af20
push eax
call edi
push 0x1001af4c
push dword [0x1001e458]
mov dword [0x1001e44c], eax
call edi
push 0x1001af60
push dword [0x1001e458]
mov dword [0x1001e448], eax
call edi
push 0x1001af78
push dword [0x1001e458]
mov dword [0x1001e43c], eax
call edi
push 0x1001af88
push dword [0x1001e458]
mov dword [0x1001e450], eax
call edi
mov dword [0x1001e440], eax
test eax, eax
jne 0x10001a4c
push 0x10
push str.d3d8
push str.Failed_to_get_Direct3DCreate8_in_d3d8.dll_
push eax
call esi
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push 0x10
push str.d3d8
push str.Failed_to_get_System_Directory_
push 0
call esi
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push 0x10
push str.d3d8
push str.Unable_to_get_dll_path___1_
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
mov ecx, dword [ebp - 4]
mov eax, 1
pop edi
xor ecx, ebp
pop ebx
call fcn.100024d1
mov esp, ebp
pop ebp
ret 0xc