Function at 0x41a560
Capabilities:
Get common file path
Terminate process

Disassembly:
sub esp, 0x204
push ebx
push ebp
mov ebp, dword [0x5040ec]
push esi
push edi
push str.SDL_DISABLE_LOCK_KEYS1
call sub.SDL.dll_SDL_putenv
add esp, 4
push 0xffff
call sub.SDL.dll_SDL_Init
add esp, 4
xor ebx, ebx
push str.MUGEN
push str.M.U.G.E.N
mov dword [0x504110], ebx
mov byte [0x505200], bl
mov byte [0x505100], bl
call sub.SDL.dll_SDL_WM_SetCaption
call fcn.0041a500
push str.Allocating_game_variables_n
call fcn.0040c4a0
add esp, 0xc
push 0x13108
push 1
call dword [sym.imp.MSVCR90.dll_calloc]
add esp, 8
cmp eax, ebx
jne 0x41a5f3
push str.Cant_allocate_game_variables._n_n
mov dword [0x50410c], 1
call dword [sym.imp.MSVCR90.dll_printf]
add esp, 4
push 1
call dword [sym.imp.MSVCR90.dll_exit]
mov dword [0x5040e8], eax
push 0x400
mov eax, 0x20
call fcn.004661e0
mov ecx, dword [0x5040e8]
add esp, 4
mov dword [ecx + 0x130ec], eax
cmp eax, ebx
jne 0x41a630
push str.Cant_allocate_error_clipboard._n_n
call dword [sym.imp.MSVCR90.dll_printf]
add esp, 4
push 1
call dword [sym.imp.MSVCR90.dll_exit]
add ecx, 0x200
push 0x200
push ecx
call dword [sym.imp.MSVCR90.dll__getcwd]
mov edx, dword [0x5040e8]
add esp, 8
test eax, eax
je 0x41a6b5
lea edi, [edx + 0x200]
mov eax, edi
lea esi, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x41a660
sub eax, esi
cmp byte [eax + edx + 0x1ff], 0x5c
jne 0x41a688
mov eax, edi
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x41a678
sub eax, esi
mov byte [eax + edx + 0x1ff], bl
mov eax, edi
lea esi, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x41a690
sub eax, esi
cmp byte [eax + edx + 0x1ff], 0x2f
je 0x41a6b5
dec edi
mov al, byte [edi + 1]
inc edi
cmp al, bl
jne 0x41a6a4
mov ax, word [0x4f2f64]
mov word [edi], ax
cmp byte [ebp + 0x388], bl
lea esi, [ebp + 0x388]
je 0x41a6fc
push 0x1ff
lea ecx, [edx + 0x200]
push ecx
push edx
mov byte [edx], bl
call dword [sym.imp.MSVCR90.dll_strncat]
add esp, 0xc
push esi
call dword [sym.imp.MSVCR90.dll__chdir]
add esp, 4
test eax, eax
je 0x41a6fc
push esi
push str.Could_not_change_to_gamedir__s_n
call fcn.0040c140
add esp, 8
call fcn.0040bd90
push str.Reading_configuration_file...
call fcn.0040c4a0
add esp, 4
call fcn.0045de80
test eax, eax
jne 0x41a729
push str.data_mugen.cfg
push str.Error_reading__s_n
call fcn.0040c140
add esp, 8
call fcn.0040bd90
push 0x4f06c0
call fcn.0040c4a0
mov edx, dword [0x5040e8]
add esp, 4
cmp dword [ebp + 0x58c], ebx
je 0x41a74e
mov dword [edx + 0x128f8], 1
cmp dword [ebp + 0x184], ebx
je 0x41a79d
lea esi, [edx + 0x129b4]
mov dword [edx + 0x129b0], 1
lea eax, [ebp + 0x188]
mov edx, esi
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
cmp cl, bl
jne 0x41a770
push 0x4f28e8
push esi
call dword [sym.imp.MSVCR90.dll_fopen]
add esp, 8
cmp eax, ebx
je 0x41a797
push eax
call dword [sym.imp.MSVCR90.dll_fclose]
add esp, 4
mov edx, dword [0x5040e8]
lea edi, [edx + 0x12bb4]
lea esi, [ebp + 0x598]
mov ecx, 0x13
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp + 0x5f4]
mov dword [edx + 0x130f4], eax
mov ecx, dword [ebp + 0x5f8]
mov dword [edx + 0x13100], ecx
mov eax, dword [ebp + 0x590]
mov dword [edx + 0x12bf4], eax
mov ecx, dword [ebp + 0x5f0]
mov dword [edx + 0x11ec0], ecx
mov eax, dword [ebp + 0x5ec]
xor ecx, ecx
mov dword [edx + 0x11ebc], eax
cmp byte [ebp + 0x40], bl
push str.Initializing_timer...
setne cl
mov dword [edx + 0x130c8], ecx
call fcn.0040c4a0
add esp, 4
cmp dword [0x504720], ebx
jne 0x41a814
call fcn.00476c90
cmp dword [0x504724], ebx
je 0x41a829
push str.performance_timer_enabled...
call fcn.0040c4a0
add esp, 4
mov edx, dword [0x504b2c]
mov eax, dword [0x504b28]
push edx
push eax
push str.frequency__lli...
call fcn.0040c4a0
add esp, 0xc
push 0x4f06c0
call fcn.0040c4a0
add esp, 4
push str.Initializing_keyboard...
call fcn.0040c4a0
add esp, 4
call fcn.0046e2f0
push str.configuring...
call fcn.0040c4a0
add esp, 4
push ebx
push ebx
mov dword [0x5044d8], 2
mov dword [0x503874], ebx
mov dword [0x503870], ebx
mov dword [0x500178], ebx
call sub.SDL.dll_SDL_EnableKeyRepeat
mov edi, 1
push 0x4f06c0
mov dword [0x50017c], ebx
mov dword [0x503468], edi
call fcn.0040c4a0
add esp, 0xc
push str.Initializing_input_engine...
call fcn.0040c4a0
add esp, 4
call fcn.0041b340
call fcn.0046b450
test eax, eax
jne 0x41a8d5
push str.Cant_init_input_n
call fcn.0040c0f0
push 0x4f06c0
call fcn.0040c4a0
add esp, 4
push str.Initializing_sound...
call fcn.0040c4a0
add esp, 4
cmp dword [ebp + 0x588], ebx
je 0x41a916
mov ecx, dword [0x5040e8]
push str.sound_is_disabled_n
mov dword [ecx + 0x11e7c], ebx
mov dword [0x5044e0], ebx
call fcn.0040c4a0
add esp, 4
mov eax, dword [0x5040e8]
cmp dword [eax + 0x11e7c], ebx
je 0x41aa37
mov edx, dword [eax + 0x12924]
mov ecx, dword [eax + 0x12920]
mov ebx, dword [eax + 0x12900]
push edx
mov edx, dword [eax + 0x128fc]
push ecx
mov ecx, dword [eax + 0x128f0]
push edx
mov edx, dword [eax + 0x12908]
push ecx
mov ecx, dword [eax + 0x12904]
call fcn.0046e430
add esp, 0x10
test eax, eax
jne 0x41a984
mov edx, dword [0x5040e8]
xor esi, esi
push str.Could_not_initialize_sound_mixer._n
mov dword [edx + 0x11e7c], esi
mov dword [0x5044e0], esi
call fcn.0040c4a0
add esp, 4
jmp 0x41a999
push 0x4f06c0
mov dword [0x5044e0], edi
call fcn.0040c4a0
add esp, 4
xor esi, esi
mov eax, dword [0x5040e8]
mov dword [0x504110], esi
cmp dword [eax + 0x11e7c], esi
je 0x41aa35
cmp dword [eax + 0x128f8], 0
jne 0x41aa35
push str.Initializing_BGM...
call fcn.0040c4a0
mov eax, dword [0x5040e8]
fld qword [eax + 0x11e90]
mov edx, dword [eax + 0x12928]
fmul qword [eax + 0x11e80]
push ecx
mov ecx, dword [eax + 0x1292c]
mov eax, dword [eax + 0x1290c]
fdiv qword [0x4fd818]
fstp qword [esp]
push ecx
push edx
push eax
call fcn.00470310
add esp, 0x14
test eax, eax
jne 0x41aa17
push str.Could_not_initialize_BGM._n
call fcn.0040c4a0
mov ecx, dword [0x5040e8]
mov dword [ecx + 0x128f8], edi
jmp 0x41aa32
push 0x4f06c0
call fcn.0040c4a0
mov edx, dword [0x5040e8]
mov eax, dword [edx + 0x1291c]
mov dword [0x5038b4], eax
add esp, 4
xor ebx, ebx
push str.Initializing_graphics...
call fcn.0040c4a0
mov esi, dword [0x5040e8]
fld qword [esi + 0x12890]
add esp, 4
call fcn.004dc850
fld qword [esi + 0x12888]
push eax
call fcn.004dc850
push eax
push str.gameCoord__ix_i...
call fcn.0040c4a0
add esp, 0xc
call fcn.004628e0
test eax, eax
jne 0x41aa7d
call fcn.0040bd90
mov eax, dword [0x5040e8]
mov ecx, dword [eax + 0x128d0]
mov edx, dword [eax + 0x128bc]
push ecx
push edx
push str.render_mode__i__i...
call fcn.0040c4a0
mov esi, dword [0x5040e8]
mov eax, dword [esi + 0x128bc]
add esp, 0xc
cmp eax, ebx
jl 0x41a6f7
cmp eax, 2
jg 0x41a6f7
mov dword [0x504224], eax
call fcn.0046c190
mov eax, dword [esi + 0x128b8]
mov ecx, dword [esi + 0x128b4]
mov edx, dword [esi + 0x128b0]
push ebx
push eax
push ecx
push edx
push str.trying__ix_ix_i_mode_0x_X...
call fcn.0040c4a0
mov eax, dword [0x5040e8]
mov esi, dword [eax + 0x128dc]
add esp, 0x14
call fcn.004635c0
mov esi, dword [0x5040e8]
mov ecx, dword [esi + 0x128b8]
fld qword [esi + 0x12890]
mov edx, dword [esi + 0x128b4]
fld qword [esi + 0x12888]
mov eax, dword [esi + 0x128b0]
fxch st(1)
push ecx
push edx
push eax
call fcn.004dc850
push eax
call fcn.004dc850
mov ebx, dword [esi + 0x128d0]
call fcn.00462990
add esp, 0x10
test eax, eax
jne 0x41ab4f
push str.failed.
call fcn.0040c4a0
add esp, 4
call fcn.0040bd90
push str.success...
call fcn.0040c4a0
xor ebx, ebx
add esp, 4
cmp dword [0x503890], ebx
je 0x41ab7b
mov ecx, dword [0x5040e8]
test byte [ecx + 0x128d0], 2
je 0x41ab7b
mov dword [0x5038b4], ebx
push 0x4f06c0
call fcn.0040c4a0
mov edx, dword [0x5040e8]
add esp, 4
push str.Setting_callbacks...
mov dword [edx + 0x126a8], edi
call fcn.0040c4a0
add esp, 4
push 0x4f06c0
mov dword [0x50425c], 0x41e260
call fcn.0040c4a0
add esp, 4
push str.Initializing_font...
call fcn.0040c4a0
add esp, 4
call sub.SDL_ttf.dll_TTF_Init
test eax, eax
je 0x41abe0
push str.failed.
call fcn.0040c4a0
add esp, 4
call fcn.0040bd90
push 0x1ff
lea eax, [esp + 0x15]
push ebx
push eax
mov byte [esp + 0x1c], bl
call sub.MSVCR90.dll_memset
add esp, 0xc
lea ecx, [esp + 0x10]
push ecx
push ebx
push ebx
push 0x14
push ebx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
test eax, eax
jne 0x41ac2d
push 0x1ff
lea edx, [esp + 0x14]
push edx
push 0x5042c8
call dword [sym.imp.MSVCR90.dll_strncpy]
add esp, 0xc
mov dword [0x5042c0], 0x5042c8
push 0x4f06c0
call fcn.0040c4a0
add esp, 4
push str.Initializing_game_variables...
call fcn.0040c4a0
add esp, 4
call fcn.0041dab0
test eax, eax
jne 0x41ac55
call fcn.0040bd90
push 0x4f06c0
call fcn.0040c4a0
mov eax, dword [0x5040e8]
mov ecx, dword [eax + 0x11ec8]
add esp, 4
push ecx
push str.Session_RNG_seed_is__u_n
call fcn.0040c4a0
push str.Loading_system_fonts...
call fcn.0040c4a0
add esp, 0xc
call fcn.0041de60
test eax, eax
jne 0x41ac93
call fcn.0040bd90
push 0x4f06c0
call fcn.0040c4a0
add esp, 4
push str.Loading_options..._n
call fcn.0040c4a0
add esp, 4
call fcn.0045f100
call fcn.0045f170
push str.Options_loaded_OK_n
call fcn.0040c4a0
mov eax, dword [ebp + 0x5e4]
mov ecx, dword [0x5040e8]
add esp, 4
cmp eax, ebx
jle 0x41acda
mov dword [ecx + 0x12c00], eax
mov eax, dword [ebp + 0x5e8]
cmp eax, 0xfffffff7
jl 0x41acf0
cmp eax, 9
jg 0x41acf0
mov dword [ecx + 0x12c0c], eax
push str.Loading_system..._n
call fcn.0040c4a0
lea edi, [ebp + 0x140]
add esp, 4
cmp byte [edi], bl
je 0x41ad37
mov eax, dword [0x5040e8]
mov edx, dword [str.data_]
mov dword [eax + 0x10e28], edx
mov cx, word [0x4f174c]
lea edx, [eax + 0x10c28]
lea ebx, [eax + 0x10e2d]
mov word [eax + 0x10e2c], cx
call fcn.00461680
call fcn.0045c4d0
test eax, eax
jne 0x41ad64
mov eax, dword [0x5040e8]
lea edx, [eax + 0x10c28]
push edx
add eax, 0x10e28
push eax
push str.Error_loading_system_data:__s_s_n
call fcn.0040c140
add esp, 0xc
call fcn.0040bd90
call fcn.0042e2f0
test eax, eax
jne 0x41ad7f
push str.Error_initializing_lua_state
call fcn.0040c140
add esp, 4
call fcn.0040bd90
call fcn.0041ae10
test eax, eax
jne 0x41ad9a
push str.Error_initializing_console
call fcn.0040c140
add esp, 4
call fcn.0040bd90
mov eax, dword [0x5040e8]
fld qword [eax + 0x11e80]
sub esp, 8
fdiv qword [0x4fd818]
fmul qword [eax + 0x11e88]
fstp qword [esp]
call fcn.00444c80
push str.System_loaded_OK_n
call fcn.0040c4a0
mov esi, dword [0x5040e8]
mov eax, dword [esi + 0x128cc]
fld qword [esi + 0x11090]
add esp, 0xc
push eax
call fcn.004dc850
fld qword [esi + 0x11088]
push eax
call fcn.004dc850
push eax
call fcn.0045ff40
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x204
ret