Function at 0x10001030
Capabilities:
Get common file path
Link many functions at runtime
Print debug messages

Disassembly:
sub esp, 0x104
push ebx
push esi
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0xd]
mov byte [esp + 0xc], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [0x10016b98]
test eax, eax
jne 0x1000129d
mov ebx, dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push str.LoadOrgDll
call ebx
lea eax, [esp + 0xc]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea edi, [esp + 0xc]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, str.ddraw.dll
cmp byte [esp + ecx + 0xb], 0x5c
je 0x10001097
mov edi, 0x100161fc
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push ebp
lea edx, [esp + 0x10]
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea eax, [esp + 0x10]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call ebx
lea ecx, [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
mov dword [0x10016b98], eax
pop ebp
je 0x1000129d
push str.Init_Function_Address
call ebx
mov edx, dword [0x10016b98]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.AcquireDDThreadLock
push edx
call esi
mov dword [0x10016b40], eax
mov eax, dword [0x10016b98]
push str.CheckFullscreen
push eax
call esi
mov ecx, dword [0x10016b98]
push str.CompleteCreateSysmemSurface
push ecx
mov dword [0x10016b44], eax
call esi
mov edx, dword [0x10016b98]
push str.D3DParseUnknownCommand
push edx
mov dword [0x10016b48], eax
call esi
mov dword [0x10016b4c], eax
mov eax, dword [0x10016b98]
push str.DDGetAttachedSurfaceLcl
push eax
call esi
mov ecx, dword [0x10016b98]
push str.DDInternalLock
push ecx
mov dword [0x10016b50], eax
call esi
mov edx, dword [0x10016b98]
push str.DDInternalUnlock
push edx
mov dword [0x10016b54], eax
call esi
mov dword [0x10016b58], eax
mov eax, dword [0x10016b98]
push str.DSoundHelp
push eax
call esi
mov ecx, dword [0x10016b98]
push str.DirectDrawCreate
push ecx
mov dword [0x10016b5c], eax
call esi
mov edx, dword [0x10016b98]
push str.DirectDrawCreateClipper
push edx
mov dword [0x10016b60], eax
call esi
mov dword [0x10016b64], eax
mov eax, dword [0x10016b98]
push str.DirectDrawCreateEx
push eax
call esi
mov ecx, dword [0x10016b98]
push str.DirectDrawEnumerateA
push ecx
mov dword [0x10016b68], eax
call esi
mov edx, dword [0x10016b98]
push str.DirectDrawEnumerateExA
push edx
mov dword [0x10016b6c], eax
call esi
mov dword [0x10016b70], eax
mov eax, dword [0x10016b98]
push str.DirectDrawEnumerateExW
push eax
call esi
mov ecx, dword [0x10016b98]
push str.DirectDrawEnumerateW
push ecx
mov dword [0x10016b74], eax
call esi
mov edx, dword [0x10016b98]
push str.DllCanUnloadNow
mov dword [0x10016b78], eax
push edx
call esi
mov dword [0x10016b7c], eax
mov eax, dword [0x10016b98]
push str.DllGetClassObject
push eax
call esi
mov ecx, dword [0x10016b98]
push str.GetDDSurfaceLocal
push ecx
mov dword [0x10016b80], eax
call esi
mov edx, dword [0x10016b98]
push str.GetOLEThunkData
push edx
mov dword [0x10016b84], eax
call esi
mov dword [0x10016b88], eax
mov eax, dword [0x10016b98]
push str.GetSurfaceFromDC
push eax
call esi
mov ecx, dword [0x10016b98]
push str.ReleaseDDThreadLock
push ecx
mov dword [0x10016b8c], eax
call esi
mov edx, dword [0x10016b98]
push str.RegisterSpecialCase
push edx
mov dword [0x10016b90], eax
call esi
mov dword [0x10016b94], eax
call fcn.10001c30
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x104
ret
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x104
ret