Function at 0x40bd90
Capabilities:
Terminate process

Disassembly:
mov eax, 0x5004
call fcn.004dd740
mov eax, dword [0x5040e8]
push ebx
push ebp
mov ebp, dword [eax + 0x130e4]
xor ebx, ebx
push esi
push edi
mov byte [esp + 0x1010], bl
cmp ebp, ebx
jne 0x40bdc6
mov eax, dword [0x504094]
cmp eax, ebx
jne 0x40bdc3
xor ebp, ebp
jmp 0x40bdc6
mov ebp, dword [eax + 0x10]
mov eax, dword [0x504110]
mov esi, dword [sym.imp.MSVCR90.dll__snprintf]
mov edi, dword [sym.imp.MSVCR90.dll_strncat]
cmp eax, ebx
je 0x40be57
dec eax
cmp eax, 3
ja case.default.0x40bde1
jmp dword [eax*4 + 0x40c0d8]
mov eax, str.Cant_load_fonts
jmp 0x40be09
mov eax, str.Cant_init_sound
jmp 0x40be09
mov eax, str.Cant_init_graphics
jmp 0x40be09
mov eax, str.Cant_change_video_mode
jmp 0x40be09
mov eax, str.Error_not_defined
push eax
push str.Library__built_in__message:__s._n_n
lea ecx, [esp + 0x18]
push 0x1000
push ecx
call esi
lea eax, [esp + 0x1020]
add esp, 0x10
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40be28
sub eax, edx
mov edx, 0x4000
sub edx, eax
cmp edx, 1
jbe 0x40be57
mov ecx, 0x3fff
sub ecx, eax
push ecx
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x1018]
push eax
call edi
add esp, 0xc
cmp byte [0x505100], bl
je 0x40beb1
push 0x505100
push str.Library_error_message:__s_n_n
lea ecx, [esp + 0x18]
push 0x1000
push ecx
call esi
lea eax, [esp + 0x1020]
add esp, 0x10
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40be82
sub eax, edx
mov edx, 0x4000
sub edx, eax
cmp edx, 1
jbe 0x40beb1
mov ecx, 0x3fff
sub ecx, eax
push ecx
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x1018]
push eax
call edi
add esp, 0xc
cmp dword [0x50410c], ebx
je 0x40bf06
push str.Out_of_memory_error._n_n
lea ecx, [esp + 0x14]
push 0x1000
push ecx
call esi
lea eax, [esp + 0x101c]
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40bed7
sub eax, edx
mov edx, 0x4000
sub edx, eax
cmp edx, 1
jbe 0x40bf06
mov ecx, 0x3fff
sub ecx, eax
push ecx
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x1018]
push eax
call edi
add esp, 0xc
lea eax, [esp + 0x1010]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40bf10
sub eax, edx
mov ecx, 0x4000
sub ecx, eax
cmp ecx, 1
jbe 0x40bf3f
mov edx, 0x3fff
sub edx, eax
push edx
lea eax, [esp + 0x1014]
push str.Error_detected._n_n
push eax
call edi
add esp, 0xc
mov eax, dword [0x5040e8]
cmp eax, ebx
je 0x40bfbf
mov edx, dword [eax + 0x130ec]
cmp edx, ebx
je 0x40bfbf
lea eax, [esp + 0x1010]
lea esi, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40bf60
sub eax, esi
mov ecx, eax
mov eax, 0x4000
sub eax, ecx
lea ecx, [esp + ecx + 0x1010]
push ecx
push edx
or edx, 0xffffffff
call fcn.00466480
lea eax, [esp + 0x1018]
add esp, 8
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40bf90
sub eax, edx
mov edx, 0x4000
sub edx, eax
cmp edx, 1
jbe 0x40bfbf
mov ecx, 0x3fff
sub ecx, eax
push ecx
lea edx, [esp + 0x1014]
push 0x4f074c
push edx
call edi
add esp, 0xc
lea eax, [esp + 0x1010]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40bfd0
sub eax, edx
mov ecx, 0x4000
sub ecx, eax
cmp ecx, 1
jbe 0x40bfff
mov edx, 0x3fff
sub edx, eax
push edx
lea eax, [esp + 0x1014]
push str.Clipboard_tail:_n
push eax
call edi
add esp, 0xc
lea eax, [esp + 0x1010]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40c010
sub eax, edx
mov ecx, eax
mov eax, 0x4000
sub eax, ecx
lea ecx, [esp + ecx + 0x1010]
push ecx
push ebp
mov edx, 0x14
call fcn.00466480
mov eax, dword [0x5040e8]
add esp, 8
cmp eax, ebx
je 0x40c053
cmp dword [eax + 0x11e7c], ebx
je 0x40c053
call fcn.0046e730
mov eax, dword [0x5040e8]
mov dword [0x50425c], ebx
cmp eax, ebx
je 0x40c06b
cmp byte [eax], bl
je 0x40c06b
push eax
call dword [sym.imp.MSVCR90.dll__chdir]
add esp, 4
lea edx, [esp + 0x1010]
push str.M.U.G.E.N_Error
push edx
mov byte [esp + 0x5017], bl
call fcn.0040c770
lea eax, [esp + 0x1018]
push eax
push 0x4f1718
call fcn.0040c4a0
push str.Exit_with_an_error._n
call fcn.0040c4a0
add esp, 0x14
cmp dword [0x504094], ebx
je 0x40c0c3
push str._nLog_file_successfully_closed._n
call fcn.0040c4a0
add esp, 4
call fcn.0046c270
mov dword [0x504094], ebx
call fcn.0041dee0
call sub.SDL.dll_SDL_Quit
push 1
call dword [sym.imp.MSVCR90.dll_exit]
lea ecx, [ecx]
call 0xef41019a
mov ebp, -1107951552
inc eax
add ch, bh
mov ebp, 0xcccc0040
int3