Function at 0x4e4d60
Capabilities:
Terminate process

Disassembly:
sub esp, 0x28
push ebx
push ebp
push esi
push edi
call fcn.004ddf30
push 0x4de0f0
call fcn.004eda21
add esp, 4
push str.reached_winmain__n
call fcn.004de1f0
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 0x4e4dae
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.004edfc3
mov ecx, 0x40
xor eax, eax
mov edi, 0xcf1228
mov dword [0xcf3894], ebx
rep stosd dword es:[edi], eax
call fcn.004e4bf0
call fcn.004b9ed0
push 0x4b9f00
call fcn.004eda21
push 4
call fcn.004ed8ee
add esp, 8
cmp eax, ebx
je 0x4e4ded
mov ecx, eax
call fcn.004d0fa0
jmp 0x4e4def
xor eax, eax
push 0x4e4bc0
mov dword [0xd84250], eax
call fcn.004eda21
add esp, 4
mov ecx, 0x636ab0
call fcn.00411da0
push 0x4e4d50
call fcn.004eda21
call fcn.00402d20
push fcn.00402d20
call fcn.004eda21
call fcn.004bb0e0
push 2
call fcn.004bb130
call fcn.004a5b20
push 0x4a6000
call fcn.004eda21
call fcn.004bb290
push 0x4bb630
call fcn.004eda21
call fcn.004aad20
push 0x4aaed0
call fcn.004eda21
call fcn.00409810
push fcn.00402d20
call fcn.004eda21
call fcn.00401fb0
push fcn.00402d20
call fcn.004eda21
call fcn.004d5b10
push 0x4d5b40
call fcn.004eda21
call fcn.004b7cb0
push fcn.00402d20
call fcn.004eda21
call fcn.004d4c50
push fcn.00402d20
call fcn.004eda21
call fcn.004ded40
push 0x4dee10
call fcn.004eda21
call fcn.004adac0
push fcn.00402d20
call fcn.004eda21
call fcn.004a6ff0
push 0x4a7060
call fcn.004eda21
call fcn.004c97b0
push 0x4c9850
call fcn.004eda21
call fcn.00462f70
push 0x4630f0
call fcn.004eda21
add esp, 0x40
call fcn.00415160
push 0x415170
call fcn.004eda21
add esp, 4
push ebx
call dword [sym.imp.ole32.dll_CoInitialize]
push str.CWinApp::startup__:_begin._n
call fcn.004de1f0
mov ecx, pe_nt_image_headers32
xor eax, eax
mov edi, 0xd83bc4
push 0x4e4b50
rep stosd dword es:[edi], eax
mov dword [0xd83fc8], ebx
mov dword [0xd83bc0], ebx
mov dword [0xd83a80], ebx
mov dword [0xd83a84], 1
mov dword [0xd83fe8], ebx
call fcn.004eda21
call fcn.004abf10
push 0x4ac210
call fcn.004eda21
call fcn.004c0710
push 0x4c0a00
call fcn.004eda21
call fcn.004e2870
push 0x4e2900
call fcn.004eda21
call fcn.004e3270
push 0x4e3360
call fcn.004eda21
call fcn.004cef50
push 0x4cefa0
call fcn.004eda21
call fcn.004a1ce0
push fcn.00402d20
call fcn.004eda21
call fcn.004c43f0
push fcn.00402d20
call fcn.004eda21
call fcn.004d10d0
push 0x4d1130
call fcn.004eda21
call fcn.004e0ad0
push 0x4e0b20
call fcn.004eda21
call fcn.0049bc80
push fcn.00402d20
call fcn.004eda21
call fcn.0040d370
push 0x40d450
call fcn.004eda21
add esp, 0x34
call fcn.004ba080
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 [0x5627d4], eax
je 0x4e5056
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4e5056
mov ecx, dword [0x5627d4]
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 [0x5627d4], eax
je 0x4e5082
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 0x4e50c5
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 0x4e4b80
mov ebx, eax
call fcn.004eda21
push 0x4e4b90
call fcn.004eda21
push 0x150
call fcn.004ed8ee
add esp, 0xc
cmp eax, ebp
je 0x4e510c
mov ecx, eax
call fcn.0049cdf0
jmp 0x4e510e
xor eax, eax
mov dword [0xd84240], eax
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
cmp dword [esp + 0x40], ebp
je 0x4e512b
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x28
ret 0x10
call fcn.004c1360
mov esi, dword [sym.imp.USER32.dll_GetSystemMetrics]
push ebp
call esi
cmp eax, 0x280
jne 0x4e5152
push 1
call esi
cmp eax, 0x1e0
jne 0x4e5152
mov byte [0x5221dc], 0
lea edx, [esp + 0x18]
lea eax, [esp + 0x14]
push edx
push eax
push str._dx_d
push 0x560478
call fcn.004ede83
add esp, 0x10
push ebp
call esi
cmp eax, 0x320
jne 0x4e519e
push 1
call esi
cmp eax, 0x258
jne 0x4e519e
cmp dword [esp + 0x14], 0x320
jne 0x4e519e
cmp dword [esp + 0x18], 0x258
jne 0x4e519e
mov byte [0x5221dc], 0
call fcn.004ac350
call fcn.004abb80
call fcn.004bb7f0
call fcn.004c12c0
call fcn.0043f0a0
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.004e5610
mov eax, dword [0x5627cc]
add esp, 0x10
cmp eax, ebp
je 0x4e51e5
push ebp
mov dword [0x5627cc], ebp
call dword [sym.imp.USER32.dll_ShowCursor]
push 1
call fcn.004bcdf0
mov eax, dword [0xd83fc4]
push eax
call fcn.004e33d0
push 0x194
call fcn.004ed8ee
add esp, 0xc
cmp eax, ebp
je 0x4e5215
mov ecx, eax
call fcn.0042d7d0
mov dword [esp + 0x40], eax
jmp 0x4e5219
mov dword [esp + 0x40], ebp
call fcn.004b2f00
mov al, byte [0xcf7e5c]
test al, al
jne 0x4e5230
mov al, byte [0x55fee8]
test al, al
je 0x4e524d
call fcn.004e7340
mov al, byte [0x55fee8]
test al, al
je 0x4e524d
push 0x51cdf8
push 0x7d
call fcn.004a2160
add esp, 8
mov ecx, dword [0xcf37a4]
cmp ecx, ebp
je 0x4e525d
mov edx, dword [ecx]
push 1
call dword [edx]
push 0x200d8
call fcn.004ed8ee
add esp, 4
cmp eax, ebp
je 0x4e5277
mov ecx, eax
call fcn.0042eef0
jmp 0x4e5279
xor eax, eax
push 0x8e
push esi
mov dword [0xcf37a4], eax
call dword [sym.imp.USER32.dll_LoadAcceleratorsA]
push ebx
mov dword [esp + 0x4c], eax
call edi
call fcn.004aaff0
push 0x22c
call fcn.004ed8ee
add esp, 4
cmp eax, ebp
je 0x4e52b0
mov ecx, eax
call fcn.004b05a0
jmp 0x4e52b2
xor eax, eax
mov ecx, eax
mov dword [0xcf338c], eax
call fcn.004b0600
push 0x31384
call fcn.004ed8ee
add esp, 4
cmp eax, ebp
je 0x4e52d8
mov ecx, eax
call fcn.0042c930
jmp 0x4e52da
xor eax, eax
mov esi, dword [sym.imp.USER32.dll_GetMenu]
mov dword [0xcf38a8], eax
mov eax, dword [0xd83fc4]
push eax
call esi
mov cl, byte [0x55fef7]
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 [0xd83fc4]
push edx
call esi
mov cl, byte [0xd8396c]
neg cl
sbb ecx, ecx
and ecx, 8
push ecx
push 0x9c89
push eax
call edi
mov edx, dword [0xd83fc4]
push edx
call esi
mov cl, byte [0xd83a06]
neg cl
sbb ecx, ecx
and ecx, 8
push ecx
push 0x9c8a
push eax
call edi
mov dword [esp + 0x20], 0x400
call dword [0xd84224]
push 0
push 1
push 8
mov ebp, eax
call fcn.004e2bd0
push 0x4e5d40
call fcn.004eda21
add esp, 0x10
push str.WinMain:_just_before_main_program_loop._n
call fcn.004de220
mov ebx, dword [sym.imp.USER32.dll_PeekMessageA]
add esp, 4
mov dword [0x5627d0], 0x64
mov eax, dword [0x5627d0]
mov edi, dword [sym.imp.USER32.dll_TranslateAcceleratorA]
dec eax
mov dword [0x5627d0], eax
jne 0x4e53ca
mov ecx, dword [0xcf3ea4]
mov dword [0x5627d0], 0x64
test ecx, ecx
je 0x4e53ca
mov eax, dword [0xcf37a0]
test eax, eax
je 0x4e53ca
cmp dword [ecx + 0x80], eax
je 0x4e53ca
mov dword [ecx + 0x80], eax
push 1
push 0
push 0
lea edx, [esp + 0x28]
push 0
push edx
call ebx
test eax, eax
je 0x4e542e
mov esi, dword [esp + 0x48]
cmp dword [esp + 0x20], 0x12
je 0x4e551c
mov ecx, dword [0xd83fc4]
lea eax, [esp + 0x1c]
push eax
push esi
push ecx
call edi
lea edx, [esp + 0x1c]
push edx
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
call fcn.004e3aa0
call fcn.004b52f0
push 1
push 0
push 0
lea ecx, [esp + 0x28]
push 0
push ecx
call ebx
test eax, eax
jne 0x4e53e1
cmp dword [esp + 0x20], 0x12
je 0x4e551c
call dword [0xd84224]
mov edx, dword [0xcf132c]
mov dword [0xcf1334], eax
push edx
push eax
call fcn.004dece0
mov dword [0xcf1330], eax
mov eax, dword [0xcf38a4]
add esp, 8
mov esi, dword [eax]
cmp esi, eax
je 0x4e5499
mov eax, dword [esi + 8]
mov edi, dword [eax + 4]
mov dword [0xcf38b8], eax
mov ecx, dword [eax + 0x6c]
test ecx, ecx
je 0x4e547e
mov ecx, dword [eax + 4]
call fcn.0042c810
mov ecx, edi
call fcn.0042d470
mov eax, dword [0xcf38b8]
test eax, eax
je 0x4e5499
mov esi, dword [esi]
mov eax, dword [0xcf38a4]
cmp esi, eax
jne 0x4e5464
mov dword [0xcf38b8], 0
call dword [0xd84224]
mov ecx, dword [0xcf37a4]
mov dword [0xcf132c], eax
call fcn.0042f2c0
call fcn.004e3aa0
call dword [0xd84224]
mov ecx, dword [0xcf35b8]
mov esi, eax
sub eax, ebp
cmp eax, ecx
jb 0x4e5512
add ecx, ecx
cmp eax, ecx
jb 0x4e5501
mov al, byte [0xcf7e5b]
test al, al
je 0x4e54eb
push 1
call fcn.004c1600
add esp, 4
push 0
call fcn.004c1600
add esp, 4
mov ebp, esi
call fcn.00402d20
jmp 0x4e538c
push 0
call fcn.004c1600
mov eax, dword [0xcf35b8]
add esp, 4
add ebp, eax
call fcn.00402d20
jmp 0x4e538c
call fcn.004b3050
push 0xcf0698
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0xd83fc8]
test eax, eax
je 0x4e553c
push eax
call dword [sym.imp.WINMM.dll_timeKillEvent]
push 0xcf0698
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edi, dword [sym.imp.USER32.dll_SendMessageA]
mov esi, 0xd83bc4
xor ebx, ebx
mov eax, dword [esi]
cmp eax, ebx
je 0x4e5561
push ebx
push ebx
push 0x10
push eax
call edi
add esi, 4
cmp esi, 0xd83fc4
jl 0x4e5554
mov eax, dword [0xd83a7c]
cmp eax, ebx
je 0x4e557c
push eax
call dword [sym.imp.USER32.dll_DestroyMenu]
mov ecx, dword [0xcf3ea4]
cmp ecx, ebx
je 0x4e558c
mov edx, dword [ecx]
push 1
call dword [edx]
mov ecx, dword [0xcf338c]
cmp ecx, ebx
je 0x4e559c
mov eax, dword [ecx]
push 1
call dword [eax]
mov ecx, dword [0xcf38a8]
mov dword [0xcf338c], ebx
cmp ecx, ebx
je 0x4e55b2
mov edx, dword [ecx]
push 1
call dword [edx]
mov ecx, dword [esp + 0x40]
mov dword [0xcf38a8], ebx
cmp ecx, ebx
je 0x4e55c6
mov eax, dword [ecx]
push 1
call dword [eax]
mov eax, dword [0xd42400]
cmp eax, ebx
je 0x4e55d8
push eax
call fcn.004edeb7
add esp, 4
mov esi, dword [0xd84240]
cmp esi, ebx
je 0x4e55f2
mov ecx, esi
call fcn.0049ce30
push esi
call fcn.004ed4d0
add esp, 4
mov ecx, dword [0xcf37a4]
cmp ecx, ebx
je 0x4e5602
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