Function at 0x4d5420
Capabilities:
Check for time delay via gettickcount
Terminate process

Disassembly:
sub esp, 0x28
push ebx
push ebp
push esi
push edi
call fcn.004ce840
push 0x4cea00
call fcn.004de091
add esp, 4
push str.reached_winmain__n
call fcn.004ceb00
mov eax, dword [str.Ultima_Online]
add esp, 4
xor ebx, ebx
push ebx
push eax
call dword [sym.imp.USER32.dll_FindWindowA]
test eax, eax
je 0x4d546e
push 0x40
push ebx
push str.Another_copy_of_UO_is_already_running_
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
push ebx
call fcn.004de7d8
mov ecx, 0x40
xor eax, eax
mov edi, 0xcc2af0
mov dword [0xcc514c], ebx
rep stosd dword es:[edi], eax
call fcn.004d52c0
call fcn.004795b0
push 0x4795e0
call fcn.004de091
push 4
call fcn.004ddf8e
add esp, 8
cmp eax, ebx
je 0x4d54ad
mov ecx, eax
call fcn.004a84e0
jmp 0x4d54af
xor eax, eax
push 0x4d5290
mov dword [0xd589a0], eax
call fcn.004de091
call fcn.00401e90
push fcn.00401e90
call fcn.004de091
call fcn.00479700
push 2
call fcn.00479750
call fcn.00440bb0
push 0x441090
call fcn.004de091
call fcn.004798b0
push 0x479c50
call fcn.004de091
call fcn.004489c0
push 0x448b70
call fcn.004de091
call fcn.00408400
push fcn.00401e90
call fcn.004de091
call fcn.00401e70
push fcn.00401e90
call fcn.004de091
call fcn.004c4460
push 0x4c4490
call fcn.004de091
call fcn.004770d0
push fcn.00401e90
call fcn.004de091
call fcn.004bfa40
push fcn.00401e90
call fcn.004de091
call fcn.004cf520
push 0x4cf5f0
call fcn.004de091
call fcn.0046b410
push fcn.00401e90
call fcn.004de091
call fcn.00442080
push 0x4420f0
call fcn.004de091
call fcn.004866d0
push 0x486770
call fcn.004de091
call fcn.00452690
push 0x452810
call fcn.004de091
add esp, 0x40
call fcn.004905e0
push 0x4905f0
call fcn.004de091
add esp, 4
push ebx
call dword [sym.imp.ole32.dll_CoInitialize]
push str.CWinApp::startup__:_begin._n
call fcn.004ceb00
mov ecx, 0x100
xor eax, eax
mov edi, 0xd58324
push 0x4d5220
rep stosd dword es:[edi], eax
mov dword [0xd58728], ebx
mov dword [0xd58320], ebx
mov dword [0xd581e0], ebx
mov dword [0xd581e4], 1
mov dword [0xd58748], ebx
call fcn.004de091
call fcn.004602b0
push 0x4603e0
call fcn.004de091
call fcn.0047ead0
push 0x47ed20
call fcn.004de091
call fcn.004d2ff0
push 0x4d3090
call fcn.004de091
call fcn.004d39c0
push 0x4d3ab0
call fcn.004de091
call fcn.004a6480
push 0x4a64d0
call fcn.004de091
call fcn.00437940
push fcn.00401e90
call fcn.004de091
call fcn.00481a10
push fcn.00401e90
call fcn.004de091
call fcn.004b3cc0
push 0x4b3d20
call fcn.004de091
call fcn.004d1270
push 0x4d12c0
call fcn.004de091
call fcn.00410460
push fcn.00401e90
call fcn.004de091
call fcn.0040b640
push 0x40b720
call fcn.004de091
add esp, 0x34
push str.UoClientApp
push 0x20
push ebx
push 2
push ebx
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov esi, dword [sym.imp.USER32.dll_MessageBoxA]
mov ebp, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [sym.imp.KERNEL32.dll_ExitProcess]
cmp eax, ebx
mov dword [0x54d3c0], eax
je 0x4d56fa
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4d56fa
mov ecx, dword [0x54d3c0]
push ecx
call ebp
push ebx
push str.ERROR
push str.Another_instance_of_UO_is_already_running.
push ebx
call esi
push 1
call edi
push str.UoPatchApp
push ebx
push 4
call dword [sym.imp.KERNEL32.dll_OpenFileMappingA]
cmp eax, ebx
mov dword [0x54d3c0], eax
je 0x4d5726
push eax
call ebp
push ebx
push str.ERROR
push str.An_instance_of_UO_Patch_is_already_running.
push ebx
call esi
push 1
call edi
mov ebx, dword [sym.imp.USER32.dll_GetDesktopWindow]
call ebx
push eax
call dword [sym.imp.USER32.dll_GetWindowDC]
mov ebp, eax
push 0xc
push ebp
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
push ebp
mov dword [esp + 0x14], eax
call ebx
push eax
call dword [sym.imp.USER32.dll_ReleaseDC]
cmp dword [esp + 0x10], 0x10
jge 0x4d5769
push 0
push str.Error:_Color_Mode
push str.ERROR:_Ultima_Online_requires_that_Windows_be_in_16_bit_color_mode_in_order_to_run._n_nPlease_go_to_the_Windows_Display_Settings_in_the_Control_Panel_and_change_the_color_setting_before_attempting_to_run_UO.
push 0
call esi
push 1
call edi
xor ebp, ebp
push 0x7f8a
push ebp
call dword [sym.imp.USER32.dll_LoadCursorA]
mov edi, dword [sym.imp.USER32.dll_SetCursor]
push eax
call edi
push 0x4d5250
mov ebx, eax
call fcn.004de091
push 0x4d5260
call fcn.004de091
push 0x150
call fcn.004ddf8e
add esp, 0xc
cmp eax, ebp
je 0x4d57b0
mov ecx, eax
call fcn.0041d6b0
jmp 0x4d57b2
xor eax, eax
mov dword [0xd58990], eax
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
cmp dword [esp + 0x40], ebp
je 0x4d57cf
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x28
ret 0x10
call fcn.0047f520
mov esi, dword [sym.imp.USER32.dll_GetSystemMetrics]
push ebp
call esi
cmp eax, 0x280
jne 0x4d57f6
push 1
call esi
cmp eax, 0x1e0
jne 0x4d57f6
mov byte [0x50a1c4], 0
lea edx, [esp + 0x18]
lea eax, [esp + 0x14]
push edx
push eax
push str._dx_d
push 0x547a80
call fcn.004debb9
add esp, 0x10
push ebp
call esi
cmp eax, 0x320
jne 0x4d5842
push 1
call esi
cmp eax, 0x258
jne 0x4d5842
cmp dword [esp + 0x14], 0x320
jne 0x4d5842
cmp dword [esp + 0x18], 0x258
jne 0x4d5842
mov byte [0x50a1c4], 0
call fcn.004604e0
call fcn.0045fe20
call fcn.00479e10
call fcn.0047f480
call fcn.00425f60
mov ecx, dword [esp + 0x48]
mov edx, dword [esp + 0x44]
mov esi, dword [esp + 0x3c]
push ecx
push edx
push ebp
push esi
call fcn.004d5c60
mov eax, dword [0x54d3bc]
add esp, 0x10
cmp eax, ebp
je 0x4d5889
push ebp
mov dword [0x54d3bc], ebp
call dword [sym.imp.USER32.dll_ShowCursor]
push 1
call fcn.0047b3c0
mov eax, dword [0xd58724]
push eax
call fcn.004d3b20
push 0x194
call fcn.004ddf8e
add esp, 0xc
cmp eax, ebp
je 0x4d58b9
mov ecx, eax
call fcn.004c19d0
mov dword [esp + 0x40], eax
jmp 0x4d58bd
mov dword [esp + 0x40], ebp
call fcn.0046fcd0
mov al, byte [0xcc9317]
test al, al
jne 0x4d58d4
mov al, byte [0x5474ec]
test al, al
je 0x4d58f1
call fcn.004d7930
mov al, byte [0x5474ec]
test al, al
je 0x4d58f1
push 0x5094d8
push 0x7c
call fcn.00437d80
add esp, 8
mov ecx, dword [0xcc505c]
cmp ecx, ebp
je 0x4d5901
mov edx, dword [ecx]
push 1
call dword [edx]
push 0x20018
call fcn.004ddf8e
add esp, 4
cmp eax, ebp
je 0x4d591b
mov ecx, eax
call fcn.004c2fc0
jmp 0x4d591d
xor eax, eax
push 0x8e
push esi
mov dword [0xcc505c], eax
call dword [sym.imp.USER32.dll_LoadAcceleratorsA]
push ebx
mov dword [esp + 0x4c], eax
call edi
call fcn.00448c90
push 0x22c
call fcn.004ddf8e
add esp, 4
cmp eax, ebp
je 0x4d5954
mov ecx, eax
call fcn.0046df00
jmp 0x4d5956
xor eax, eax
mov ecx, eax
mov dword [0xcc4c44], eax
call fcn.0046df60
push 0x312b4
call fcn.004ddf8e
add esp, 4
cmp eax, ebp
je 0x4d597c
mov ecx, eax
call fcn.004c0bf0
jmp 0x4d597e
xor eax, eax
mov esi, dword [sym.imp.USER32.dll_GetMenu]
mov dword [0xcc516c], eax
mov eax, dword [0xd58724]
push eax
call esi
mov cl, byte [0x5474fb]
mov edi, dword [sym.imp.USER32.dll_CheckMenuItem]
neg cl
sbb ecx, ecx
and ecx, 8
push ecx
push 0x9cbc
push eax
call edi
mov edx, dword [0xd58724]
push edx
call esi
mov cl, byte [0xd580d0]
neg cl
sbb ecx, ecx
and ecx, 8
push ecx
push 0x9c89
push eax
call edi
mov edx, dword [0xd58724]
push edx
call esi
mov cl, byte [0xd58166]
neg cl
sbb ecx, ecx
and ecx, 8
push ecx
push 0x9c8a
push eax
call edi
mov dword [esp + 0x20], 0x400
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0
push 1
push 8
mov ebp, eax
call fcn.004d3360
push 0x4d5c50
call fcn.004de091
add esp, 0x10
push str.WinMain:_just_before_main_program_loop._n
call fcn.004ceb30
mov ebx, dword [sym.imp.USER32.dll_PeekMessageA]
add esp, 4
push 1
push 0
push 0
lea edx, [esp + 0x28]
push 0
push edx
call ebx
test eax, eax
je 0x4d5a8e
cmp dword [esp + 0x20], 0x12
je 0x4d5b51
mov ecx, dword [esp + 0x48]
mov edx, dword [0xd58724]
lea eax, [esp + 0x1c]
push eax
push ecx
push edx
call dword [sym.imp.USER32.dll_TranslateAcceleratorA]
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea ecx, [esp + 0x1c]
push ecx
call dword [sym.imp.USER32.dll_DispatchMessageA]
call fcn.004d41f0
call fcn.004720c0
push 1
push 0
push 0
lea edx, [esp + 0x28]
push 0
push edx
call ebx
test eax, eax
jne 0x4d5a39
cmp dword [esp + 0x20], 0x12
je 0x4d5b51
mov eax, dword [0xcc5164]
mov esi, dword [eax]
cmp esi, eax
je 0x4d5ad9
mov eax, dword [esi + 8]
mov edi, dword [eax + 4]
mov dword [0xcc5174], eax
mov ecx, dword [eax + 0x6c]
test ecx, ecx
je 0x4d5abe
mov ecx, dword [eax + 4]
call fcn.004c0b90
mov ecx, edi
call fcn.004c1630
mov eax, dword [0xcc5174]
test eax, eax
je 0x4d5ad9
mov esi, dword [esi]
mov eax, dword [0xcc5164]
cmp esi, eax
jne 0x4d5aa4
mov ecx, dword [0xcc505c]
mov dword [0xcc5174], 0
call fcn.004c3250
call fcn.004d41f0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [0xcc4e70]
mov esi, eax
sub eax, ebp
cmp eax, ecx
jb 0x4d5b47
add ecx, ecx
cmp eax, ecx
jb 0x4d5b36
mov al, byte [0xcc9316]
test al, al
je 0x4d5b20
push 1
call fcn.0047f7c0
add esp, 4
push 0
call fcn.0047f7c0
add esp, 4
mov ebp, esi
call fcn.00401e90
jmp 0x4d5a26
push 0
call fcn.0047f7c0
mov eax, dword [0xcc4e70]
add esp, 4
add ebp, eax
call fcn.00401e90
jmp 0x4d5a26
call fcn.0046fe20
push 0xcc1f70
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0xd58728]
test eax, eax
je 0x4d5b71
push eax
call dword [sym.imp.WINMM.dll_timeKillEvent]
push 0xcc1f70
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edi, dword [sym.imp.USER32.dll_SendMessageA]
mov esi, 0xd58324
mov eax, dword [esi]
test eax, eax
je 0x4d5b96
push 0
push 0
push 0x10
push eax
call edi
add esi, 4
cmp esi, 0xd58724
jl 0x4d5b87
mov eax, dword [0xd581dc]
test eax, eax
je 0x4d5bb1
push eax
call dword [sym.imp.USER32.dll_DestroyMenu]
mov ecx, dword [0xcc535c]
test ecx, ecx
je 0x4d5bc1
mov edx, dword [ecx]
push 1
call dword [edx]
mov ecx, dword [0xcc4c44]
test ecx, ecx
je 0x4d5bd1
mov eax, dword [ecx]
push 1
call dword [eax]
mov ecx, dword [0xcc516c]
mov dword [0xcc4c44], 0
test ecx, ecx
je 0x4d5beb
mov edx, dword [ecx]
push 1
call dword [edx]
mov ecx, dword [esp + 0x40]
mov dword [0xcc516c], 0
test ecx, ecx
je 0x4d5c03
mov eax, dword [ecx]
push 1
call dword [eax]
mov eax, dword [0xd16b94]
test eax, eax
je 0x4d5c15
push eax
call fcn.004de560
add esp, 4
mov esi, dword [0xd58990]
test esi, esi
je 0x4d5c2f
mov ecx, esi
call fcn.0041d6f0
push esi
call fcn.004ddac0
add esp, 4
mov ecx, dword [0xcc505c]
test ecx, ecx
je 0x4d5c3f
mov edx, dword [ecx]
push 1
call dword [edx]
mov eax, dword [esp + 0x24]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret 0x10