Function at 0x50e350
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x39c
mov eax, dword [0x661850]
xor eax, ebp
mov dword [ebp - 0x18], eax
push esi
cmp dword [0x663738], 0
jne 0x50e385
push 2
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
push 0x40a1a0
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov dword [0x663738], eax
xor eax, eax
jne 0x50e364
mov dword [ebp - 8], 1
mov dword [ebp - 0xc], 8
lea ecx, [ebp - 0xc]
push ecx
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
mov dword [ebp - 0x274], eax
call fcn.0050ebb0
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [ebp - 0x270], eax
call fcn.00411250
call fcn.0050eff0
call fcn.00408c20
mov dword [ebp - 0x26c], 0
mov byte [ebp - 0xb8], 0
xor edx, edx
mov dword [ebp - 0xb7], edx
mov dword [ebp - 0xb3], edx
mov dword [ebp - 0xaf], edx
mov dword [ebp - 0xab], edx
mov dword [ebp - 0xa7], edx
mov dword [ebp - 0xa3], edx
mov dword [ebp - 0x9f], edx
mov word [ebp - 0x9b], dx
mov byte [ebp - 0x99], dl
push 0x7c
push 0
lea eax, [ebp - 0x98]
push eax
call fcn.005454d0
add esp, 0xc
lea ecx, [ebp - 0xb8]
push ecx
push 0xffffffffffffffff
push 0
call dword [sym.imp.USER32.dll_EnumDisplaySettingsA]
movzx edx, byte [0x69d4b6]
test edx, edx
je 0x50e466
push 0xd
push 2
push 0x8d
push 0
push str.Legend_Of_Mir_3
mov eax, dword [ebp + 8]
push eax
mov ecx, 0x69ec08
call fcn.00538930
mov dword [ebp - 0x26c], eax
jmp 0x50e48a
push 0xd
push 1
push 0x8d
push 0
push str.Legend_Of_Mir_3
mov ecx, dword [ebp + 8]
push ecx
mov ecx, 0x69ec08
call fcn.00538930
mov dword [ebp - 0x26c], eax
push 0
mov ecx, 0x69ec08
call fcn.004edfb0
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov ecx, 0x69ec08
call fcn.004edfb0
push eax
mov ecx, 0x69e668
call fcn.00525150
push 0
push 0
push 0
push 0
mov ecx, 0x69ec08
call fcn.004edfb0
push eax
mov ecx, 0x69ec08
call fcn.004f67e0
push eax
mov ecx, 0x7c0e48
call fcn.00512000
push 0
mov ecx, 0x7c0e48
call fcn.0043b450
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov ecx, 0x7c0e48
call fcn.0043b450
mov dword [0x69edc6], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
call fcn.0054809d
add esp, 4
lea edx, [ebp - 0x268]
push edx
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x50e529
or eax, 0xffffffff
jmp 0x50e950
mov ecx, 0x69eea8
call fcn.0044d580
mov dword [0x69edfa], 0x69eea8
mov eax, dword [0x69edfa]
mov dword [0x7d27d4], eax
mov byte [0x69e641], 0
mov dword [ebp - 0x27c], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 4], 0
push str.Mir3___migrate_direct_version_7_to_9__r_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov ecx, 1
test ecx, ecx
je 0x50e88a
push 0
push 0
push 0
push 0
lea edx, [ebp - 0xd4]
push edx
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
je 0x50e60f
push 0
push 0
push 0
lea eax, [ebp - 0xd4]
push eax
call dword [sym.imp.USER32.dll_GetMessageA]
test eax, eax
jne 0x50e5f0
movzx ecx, word [ebp - 0x94]
test ecx, ecx
je 0x50e5e5
movzx edx, byte [0x69d4b6]
test edx, edx
je 0x50e5e5
movzx eax, byte [0x69ee7a]
test eax, eax
jne 0x50e5e5
push 0
lea ecx, [ebp - 0xb8]
push ecx
call dword [sym.imp.USER32.dll_ChangeDisplaySettingsA]
mov eax, dword [ebp - 0xcc]
jmp 0x50e950
lea edx, [ebp - 0xd4]
push edx
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0xd4]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
jmp 0x50e885
call dword [sym.imp.WINMM.dll_timeGetTime]
sub eax, dword [ebp - 0x14]
cmp eax, 0x3e8
jb 0x50e64e
call dword [sym.imp.WINMM.dll_timeGetTime]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x27c]
imul eax, eax, 0x64
xor edx, edx
mov ecx, 0x3c
div ecx
mov dword [0x69edba], eax
mov dword [ebp - 0x27c], 0
jmp 0x50e880
call dword [sym.imp.WINMM.dll_timeGetTime]
mov ecx, eax
sub ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x27c]
imul eax, eax, 0x3e8
xor edx, edx
mov esi, 0x3c
div esi
cmp ecx, eax
jb 0x50e878
mov edx, dword [ebp - 0x27c]
add edx, 1
mov dword [ebp - 0x27c], edx
call dword [sym.imp.WINMM.dll_timeGetTime]
sub eax, dword [ebp - 4]
mov dword [ebp - 0x10], eax
call dword [sym.imp.WINMM.dll_timeGetTime]
mov dword [ebp - 4], eax
movzx eax, byte [0x69ee7a]
test eax, eax
je 0x50e6b2
cmp dword [0x6658d4], 0
jne 0x50e853
mov ecx, 0x69ec08
call fcn.0040ceb0
mov dword [ebp - 0x398], eax
mov ecx, dword [ebp - 0x398]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x398]
push eax
mov ecx, dword [edx + 0xc]
call ecx
mov dword [ebp - 0x278], eax
cmp dword [ebp - 0x278], 0
jne 0x50e7ce
mov dl, byte [0x69e641]
mov byte [ebp - 0x39c], dl
cmp byte [ebp - 0x39c], 0
je 0x50e712
cmp byte [ebp - 0x39c], 2
je 0x50e722
cmp byte [ebp - 0x39c], 3
je 0x50e732
jmp 0x50e78c
mov eax, dword [ebp - 0x10]
push eax
mov ecx, 0x69eea8
call fcn.0044f420
jmp 0x50e78c
mov ecx, dword [ebp - 0x10]
push ecx
mov ecx, 0x6a0858
call fcn.0051a560
jmp 0x50e78c
movzx edx, byte [0x69e65b]
test edx, edx
je 0x50e77e
mov byte [0x69e65b], 0
push 0
push 0
push 0x585a4c
push 0xffff
push 0xff0000
mov ecx, 0x6eeef8
call fcn.0048ce80
push 0
push 0
push 0x585a4c
push 0xffff
push 0xff0000
mov ecx, 0x6eeef8
call fcn.0048ce80
mov eax, dword [ebp - 0x10]
push eax
mov ecx, 0x6acf18
call fcn.004149f0
push 2
call dword [sym.imp.USER32.dll_GetKeyState]
movsx ecx, ax
shr ecx, 8
and ecx, 0xff
movzx edx, cl
test edx, edx
je 0x50e7cc
lea eax, [ebp - 0x284]
push eax
call dword [sym.imp.USER32.dll_GetCursorPos]
lea ecx, [ebp - 0x284]
push ecx
mov ecx, 0x69ec08
call fcn.004edfb0
push eax
call dword [sym.imp.USER32.dll_ScreenToClient]
jmp 0x50e847
mov byte [0x6658de], 1
movzx edx, byte [0x69e641]
test edx, edx
jne 0x50e7f6
mov ecx, 0x69f2bf
call fcn.0053ad20
mov ecx, 0x69f01a
call fcn.0053ad20
jmp 0x50e822
movzx eax, byte [0x69e641]
cmp eax, 2
jne 0x50e818
mov ecx, 0x6a0860
call fcn.0053ad20
mov ecx, 0x6a0b05
call fcn.0053ad20
jmp 0x50e822
mov ecx, 0x6caf5c
call fcn.0050b380
sub esp, 0x2c
mov ecx, esp
mov dword [ebp - 0x394], esp
push 0x7c0e10
call fcn.0050f340
mov ecx, 0x69ec08
call fcn.00539120
test eax, eax
je 0x50e847
jmp 0x50e88a
mov ecx, 0x69ec08
call fcn.005371f0
jmp 0x50e876
push 2
call dword [sym.imp.KERNEL32.dll_Sleep]
movzx ecx, byte [0x69e65b]
test ecx, ecx
jne 0x50e876
cmp dword [0x6658d4], 0
je 0x50e876
mov byte [0x69e65b], 1
jmp 0x50e880
push 2
call dword [sym.imp.KERNEL32.dll_Sleep]
call fcn.0050e970
jmp 0x50e578
cmp dword [0x6698fc], 0
je 0x50e8b8
push 0
mov edx, dword [0x6698fc]
push edx
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov eax, dword [0x6698fc]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x6698fc], 0
cmp dword [0x69d4a0], 0
je 0x50e904
mov byte [ebp - 0x390], 0
push 0x103
push 0
lea ecx, [ebp - 0x38f]
push ecx
call fcn.005454d0
add esp, 0xc
push 0x69df00
push 0x69dcf0
push str..king_saved_s__s.cfg
lea edx, [ebp - 0x390]
push edx
call fcn.005456a9
add esp, 0x10
push 0
call dword [0x69d4a0]
movzx eax, word [ebp - 0x94]
test eax, eax
je 0x50e91e
push 0
lea ecx, [ebp - 0xb8]
push ecx
call dword [sym.imp.USER32.dll_ChangeDisplaySettingsA]
cmp dword [0x663738], 0
je 0x50e946
push 0
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
mov edx, dword [0x663738]
push edx
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov dword [0x663738], 0
xor eax, eax
jne 0x50e91e
mov eax, dword [ebp - 0xcc]
pop esi
mov ecx, dword [ebp - 0x18]
xor ecx, ebp
call fcn.0054514c
mov esp, ebp
pop ebp
ret 0x10