Function at 0x4ad060
Capabilities:
Check for time delay via queryperformancecounter
Hide graphical window
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xe8
mov eax, dword [0x5153d4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
push 0xc3
push 0
push 0x773240
mov dword [0x773320], eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [0x77326c], esi
cmp dword [ebp + 0xc], 0
mov dword [0x7732f0], 0xcf0000
jne 0x4ad155
push 4
mov dword [0x773254], 0
mov dword [0x773260], 0
mov dword [0x773264], 0x5103e4
call dword [sym.imp.GDI32.dll_GetStockObject]
push 0x7f00
push 0
mov dword [0x77325c], eax
mov dword [0x773250], esi
mov dword [0x773240], 3
mov dword [0x773244], 0x4ace80
mov dword [0x773248], 0
mov dword [0x77324c], 0
call dword [sym.imp.USER32.dll_LoadCursorA]
push 0x773240
mov dword [0x773258], eax
call dword [sym.imp.USER32.dll_RegisterClassA]
test ax, ax
jne 0x4ad14f
push 0
push 0x50f980
push str.Unable_To_Register_Window_Class
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b557b
mov esp, ebp
pop ebp
ret 0x10
mov esi, dword [0x77326c]
push 0
push esi
push 0
push 0
push DirectSoundEnumerateA
push DirectSoundEnumerateA
push DirectSoundEnumerateA
push DirectSoundEnumerateA
push 0xcf0000
push str.Tomb_Raider_III
push str.Window_Class
push 0x40000
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov dword [0x773268], eax
test eax, eax
jne 0x4ad1b8
push eax
push 0x50f980
push str.Unable_To_Create_Window
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b557b
mov esp, ebp
pop ebp
ret 0x10
push ebx
push 0
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
push dword [0x773268]
call dword [sym.imp.USER32.dll_UpdateWindow]
mov eax, dword [0x773268]
push 0x773270
push 0x498e10
mov dword [0x7c8360], eax
call dword [sym.imp.DDRAW.dll_DirectDrawEnumerateA]
push 0x773270
push 0x49a450
call dword [sym.imp.DSOUND.dll_DirectSoundEnumerateA]
mov ebx, dword [sym.imp.VCRUNTIME140.dll_strstr]
push str.gold
push dword [0x773320]
mov dword [0x7732a8], 0x773280
mov dword [0x7732a4], 0x773270
call ebx
add esp, 8
test eax, eax
lea ecx, [eax + 4]
cmove ecx, eax
test ecx, ecx
setne byte [0x77333e]
test ecx, ecx
je 0x4ad26f
movups xmm0, xmmword [0x516720]
mov ax, word [0x516748]
mov word [0x51671c], ax
movups xmmword [0x5166f4], xmm0
movups xmm0, xmmword [0x516730]
movups xmmword [0x516704], xmm0
movq xmm0, qword [0x516740]
movq qword [0x516714], xmm0
push edi
push 0x50f4d8
push str.data.bin
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov edi, eax
add esp, 8
test edi, edi
je 0x4ad2bd
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
push edi
push 0xa
push 4
push 0x6ef198
call esi
push edi
push 0xa
push 4
push 0x6ef1c0
call esi
push edi
push 1
push 4
push 0x6ef1e8
call esi
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 0x34
call fcn.004ae3b0
test al, al
je 0x4ad841
push str.setup
push dword [0x773320]
call ebx
add esp, 8
test eax, eax
lea ecx, [eax + 5]
cmove ecx, eax
test ecx, ecx
jne 0x4ad841
call fcn.0049e080
mov ebx, dword [sym.imp.USER32.dll_MessageBoxA]
mov byte [0x7732f5], al
test al, al
jne 0x4ad30e
push 0
push str.tomb3
push str.Failed_to_load_WinPlay
push 0
call ebx
push 5
push 0
push 0
push dword [0x7732d4]
push dword [0x7732d0]
push 0
push dword [0x773268]
call dword [sym.imp.USER32.dll_SetWindowPos]
call dword [sym.imp.USER32.dll_GetDesktopWindow]
mov edi, eax
push edi
call dword [sym.imp.USER32.dll_GetDC]
mov esi, eax
push 0xc
push esi
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
push esi
push edi
mov dword [0x7d1254], eax
call dword [sym.imp.USER32.dll_ReleaseDC]
movzx eax, byte [0x7732f4]
mov edx, 0x773280
push eax
push 1
mov ecx, 0x773270
call fcn.00499980
add esp, 8
test al, al
jne 0x4ad3ae
mov cl, 1
call fcn.004acf80
mov ecx, 0x773270
call fcn.0049a510
mov eax, dword [sym.imp.USER32.dll_ShowWindow]
push 0
push dword [0x773268]
call eax
push 0x30
push str.Error
push str.Tomb_Raider_3_Failed_To_Initialise__Please_Run_Setup
push dword [0x773268]
call ebx
jmp 0x4ad908
cmp byte [0x7732f4], 0
push 0xfffffffffffffff0
push dword [0x773268]
je 0x4ad40f
call dword [sym.imp.USER32.dll_GetWindowLongA]
mov esi, eax
and esi, 0x7f30ffff
or esi, 0xcf0000
and esi, 0xfff2ffff
push esi
push 0xfffffffffffffff0
push dword [0x773268]
call dword [sym.imp.USER32.dll_SetWindowLongA]
cmp dword [0x7732f0], 0
je 0x4ad3f7
mov dword [0x7732f0], esi
push 0x7f00
push 0
call dword [sym.imp.USER32.dll_LoadCursorA]
push eax
call dword [sym.imp.USER32.dll_SetCursor]
push 1
jmp 0x4ad44b
call dword [sym.imp.USER32.dll_GetWindowLongA]
mov esi, eax
and esi, 0xff30ffff
or esi, 0x80000000
push esi
push 0xfffffffffffffff0
push dword [0x773268]
call dword [sym.imp.USER32.dll_SetWindowLongA]
cmp dword [0x7732f0], 0
je 0x4ad441
mov dword [0x7732f0], esi
push 0
call dword [sym.imp.USER32.dll_SetCursor]
push 0
call dword [sym.imp.USER32.dll_ShowCursor]
push dword [0x773268]
call dword [sym.imp.USER32.dll_UpdateWindow]
push dword [ebp + 0x14]
mov eax, dword [sym.imp.USER32.dll_ShowWindow]
push dword [0x773268]
call eax
mov esi, dword [0x7732a8]
mov eax, dword [0x7732a4]
imul ecx, dword [esi], 0x3a0
imul edx, dword [esi + 4], 0x2f1
mov eax, dword [eax + 4]
add edx, dword [ecx + eax + 0x39c]
test byte [edx + 0x298], 4
jne 0x4ad4aa
imul ecx, dword [esi + 0x10], 0x9a
mov eax, dword [edx + 0x2ed]
mov byte [ecx + eax + 5], 0
cmp dword [0x773298], 0
mov esi, dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
setne byte [0x773310]
mov dword [0x773315], 2
xor eax, eax
mov dword [0x773319], 3
cmp dword [0x77329c], eax
mov dword [0x748f7c], 0
setne al
mov dword [0x7732f7], 0x100
inc eax
mov dword [0x773311], eax
lea eax, [ebp - 0xc]
push eax
call esi
mov edi, dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x4ad598
mov edx, dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
call fcn.004b5f70
movsd xmm1, qword [0x5107a8]
lea eax, [ebp - 0x14]
divsd xmm1, xmm0
push eax
xorps xmm0, xmm0
movsd qword [0x7cc920], xmm1
movsd qword [0x7cc910], xmm0
call edi
test eax, eax
je 0x4ad564
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
call fcn.004b5f70
subsd xmm0, qword [0x7cc910]
mulsd xmm0, qword [0x7cc920]
movsd qword [0x7cc910], xmm0
jmp 0x4ad5c5
call dword [sym.imp.WINMM.dll_timeGetTime]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x5108d0]
subsd xmm0, qword [0x7cc918]
divsd xmm0, qword [0x5107d0]
movsd qword [0x7cc910], xmm0
jmp 0x4ad5c5
xorps xmm0, xmm0
movsd qword [0x7cc920], xmm0
call dword [sym.imp.WINMM.dll_timeGetTime]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x5108d0]
movsd qword [0x7cc918], xmm0
mov eax, dword [0x7732b4]
mov dword [0x7c2ad4], eax
lea eax, [ebp - 0x14]
push eax
mov dword [0x74a23c], 0
mov byte [0x516e96], 1
mov dword [0x7475fc], 0x4988e0
mov dword [0x747708], 0x498900
mov dword [0x747704], 0x4989c0
mov dword [0x747700], 0x4989d0
mov dword [0x77330c], 0x5000
mov dword [0x773304], 0x3000
call esi
test eax, eax
je 0x4ad657
push 0
push 0x3c
push dword [ebp - 0x10]
push dword [ebp - 0x14]
call fcn.004b5ce0
mov dword [0x7cc8d0], eax
lea eax, [ebp - 0xc]
push eax
mov dword [0x7cc8d4], edx
call edi
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
mov dword [0x7cc8d8], eax
mov dword [0x7cc8dc], ecx
mov dword [0x747710], 0
call fcn.004a11b0
push 0x400
push 0
push 0x7c7ad8
call sub.VCRUNTIME140.dll_memset
push 0x80
push 0
push 0x6f5158
call sub.VCRUNTIME140.dll_memset
mov eax, dword [0x7732a8]
add esp, 0x18
mov dword [0x6e0d38], 0
imul ecx, dword [eax + 8], 0x214
mov eax, dword [0x7732a4]
push 0
push 0x6f45c4
mov eax, dword [eax + 0xc]
push dword [ecx + eax + 0x200]
call dword [sym.imp.DSOUND.dll_DirectSoundCreate8]
test eax, eax
js 0x4ad75f
mov eax, dword [0x6f45c4]
push 3
push dword [0x773268]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x18]
test eax, eax
js 0x4ad91d
mov eax, dword [0x6f45c4]
lea edx, [ebp - 8]
push 0
xorps xmm0, xmm0
mov dword [ebp - 0x2c], 0
push edx
movlpd qword [ebp - 0x44], xmm0
lea edx, [ebp - 0x4c]
movlpd qword [ebp - 0x3c], xmm0
movlpd qword [ebp - 0x34], xmm0
mov dword [ebp - 0x4c], 0x24
mov dword [ebp - 0x48], 1
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0xc]
test eax, eax
js 0x4ad75f
mov eax, 4
mov dword [ebp - 0x28], 0x20001
mov word [ebp - 0x1c], ax
lea edx, [ebp - 0x28]
mov eax, dword [ebp - 8]
mov dword [ebp - 0x24], 0x5622
mov dword [ebp - 0x20], 0x15888
mov dword [ebp - 0x1a], 0x10
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0x38]
mov ecx, dword [ebp - 8]
test ecx, ecx
je 0x4ad75f
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
push 0
push 0x7c2ad0
push 0x4b7360
push 0x800
push dword [0x77326c]
call dword [sym.imp.DINPUT8.dll_DirectInput8Create]
test eax, eax
js 0x4ad927
mov eax, dword [0x7c2ad0]
push 0
push 0x7c2acc
push 0x4b7380
mov ecx, dword [eax]
push eax
call dword [ecx + 0xc]
test eax, eax
js 0x4ad931
mov eax, dword [0x7c2acc]
push 0xa
push dword [0x773268]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x34]
test eax, eax
js 0x4ad93b
mov eax, dword [0x7c2acc]
push 0x4b73e0
push eax
mov ecx, dword [eax]
call dword [ecx + 0x2c]
test eax, eax
js 0x4ad945
mov eax, dword [0x7c2acc]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x1c]
test eax, eax
js 0x4ad94f
call fcn.00489860
call fcn.00489de0
mov dword [0x773308], 0
mov byte [0x6e0d72], 0
mov byte [0x666dfe], 0
call fcn.004ab100
call dword [sym.imp.USER32.dll_GetDesktopWindow]
mov esi, eax
push esi
call dword [sym.imp.USER32.dll_GetDC]
mov ecx, 0x9c
push eax
mov word [ebp - 0xc4], cx
mov ecx, dword [0x7d1254]
push esi
mov dword [ebp - 0x80], ecx
call dword [sym.imp.USER32.dll_ReleaseDC]
jmp 0x4ad8ef
mov esi, dword [0x77326c]
mov edi, dword [sym.imp.USER32.dll_ShowCursor]
push 1
mov dword [0x7ba10c], 0x773270
mov dword [0x7ba108], 0x773280
call edi
push 0
push 0x488710
push 0
push 0x68
push esi
call dword [sym.imp.USER32.dll_DialogBoxParamA]
push 0
mov esi, eax
call edi
cmp esi, 0xffffffff
jne 0x4ad896
push 0
push 0x50f980
push str.Unable_To_Initialise_Dialog
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov ecx, 0x773270
call fcn.0049a510
call dword [sym.imp.USER32.dll_GetDesktopWindow]
mov ebx, dword [sym.imp.USER32.dll_GetDC]
mov edi, eax
push edi
call ebx
mov esi, eax
push 0xc
push esi
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
push esi
push edi
mov edi, dword [sym.imp.USER32.dll_ReleaseDC]
mov dword [0x7d1254], eax
call edi
call dword [sym.imp.USER32.dll_GetDesktopWindow]
mov esi, eax
push esi
call ebx
mov ecx, 0x9c
push eax
mov word [ebp - 0xc4], cx
mov ecx, dword [0x7d1254]
push esi
mov dword [ebp - 0x80], ecx
call edi
push 0
lea eax, [ebp - 0xe8]
mov dword [ebp - 0xc0], 0x40000
push eax
call dword [sym.imp.USER32.dll_ChangeDisplaySettingsA]
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop ebx
xor ecx, ebp
pop esi
call fcn.004b557b
mov esp, ebp
pop ebp
ret 0x10
mov ecx, str.DS_Start:_SetCooperativeLevel_failed
call fcn.004ad960
mov ecx, str.DI_Create_failed
call fcn.004ad960
mov ecx, str.Keyboard_device_creation_failed.
call fcn.004ad960
mov ecx, str.Keyboard_SetCooperativeLevel_failed
call fcn.004ad960
mov ecx, str.Keyboard_SetDataFormat_failed
call fcn.004ad960
mov ecx, str.Keyboard_Acquire_failed
call fcn.004ad960
int3