Function at 0x404d30
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x408740
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebx
push esi
push edi
lea esi, [ecx + 8]
push str._tableRoomtable.ini
lea eax, [ebp - 0x20]
push esi
push eax
call sub.MFC42.DLL_operator_1
xor edi, edi
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], edi
call sub.MFC42.DLL_CString::CString_3
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
mov eax, dword [esi]
push ecx
push edx
push eax
lea ecx, [ebp - 0x14]
push str._s_table_d__dplayer
push ecx
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::Format
mov edx, dword [ebp - 0x14]
add esp, 0x14
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x404dc3
push str._tableplayer
lea eax, [ebp + 0xc]
push esi
push eax
call sub.MFC42.DLL_operator_1
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CString::operator
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x18], edi
call sub.MFC42.DLL_CString::CString_3
mov ecx, dword [ebp - 0x14]
push edi
push ecx
lea edx, [ebp - 0x10]
push str._splayer_d.png
push edx
mov byte [ebp - 4], 3
call sub.MFC42.DLL_CString::Format
mov eax, dword [ebp - 0x10]
push eax
call fcn.004081a0
add esp, 0x14
test eax, eax
je 0x404fe2
mov ecx, dword [ebp + 0x10]
lea esi, [ecx + 0x3c]
mov eax, dword [ebp - 0x10]
test eax, eax
mov dword [ebp + 0x10], eax
jne 0x404e0d
xor ebx, ebx
jmp 0x404e3d
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
inc edi
lea eax, [edi + edi]
add eax, 3
and al, 0xfc
call fcn.00407ea0
mov edx, dword [ebp + 0x10]
mov ebx, esp
push edi
push ebx
push 0xffffffffffffffff
push edx
push 0
push 0
mov word [ebx], 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push 0x10
call sub.gdiplus.dll_GdipAlloc
mov edi, eax
test edi, edi
je 0x404e6c
lea eax, [ebp + 8]
mov dword [edi], 0x40968c
push eax
push ebx
mov dword [ebp + 8], 0
call sub.gdiplus.dll_GdipCreateBitmapFromFile
mov ecx, dword [ebp + 8]
mov dword [edi + 8], eax
mov dword [edi + 4], ecx
jmp 0x404e6e
xor edi, edi
mov eax, dword [esi + 8]
mov edx, dword [esi + 0xc]
sub edx, eax
mov dword [ebp + 0xc], edi
sar edx, 2
cmp edx, 1
mov edi, eax
jae 0x404f28
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x404e9a
sub eax, ecx
sar eax, 2
cmp eax, 1
mov ebx, eax
ja 0x404e9f
mov ebx, 1
mov ecx, esi
call fcn.00406d10
add eax, ebx
mov dword [ebp - 0x1c], eax
jns 0x404eaf
xor eax, eax
shl eax, 2
push eax
call sub.MFC42.DLL_operatornew
mov ecx, dword [esi + 4]
add esp, 4
mov ebx, eax
push ebx
push edi
push ecx
mov ecx, esi
call fcn.00406d30
lea edx, [ebp + 0xc]
mov ecx, esi
push edx
push 1
push eax
mov dword [ebp + 0x10], eax
call fcn.00406d60
mov eax, dword [ebp + 0x10]
mov ecx, dword [esi + 8]
add eax, 4
push eax
push ecx
push edi
mov ecx, esi
call fcn.00406d30
mov edx, dword [esi + 8]
mov eax, dword [esi + 4]
push edx
push eax
mov ecx, esi
call fcn.00405660
mov eax, dword [esi + 4]
push eax
call sub.MFC42.DLL_operatordelete
mov ecx, dword [ebp - 0x1c]
add esp, 4
lea edx, [ebx + ecx*4]
mov ecx, esi
mov dword [esi + 0xc], edx
call fcn.00406d10
lea eax, [ebx + eax*4 + 4]
mov dword [esi + 4], ebx
mov dword [esi + 8], eax
jmp 0x404fb4
mov ecx, eax
sub ecx, edi
sar ecx, 2
cmp ecx, 1
jae 0x404f74
lea ecx, [edi + 4]
push ecx
push eax
push edi
mov ecx, esi
call fcn.00406d30
mov eax, dword [esi + 8]
lea edx, [ebp + 0xc]
mov ecx, eax
push edx
sub ecx, edi
mov edx, 1
sar ecx, 2
sub edx, ecx
mov ecx, esi
push edx
push eax
call fcn.00406d60
mov eax, dword [esi + 8]
cmp edi, eax
je 0x404fb0
mov ecx, dword [ebp + 0xc]
mov dword [edi], ecx
add edi, 4
cmp edi, eax
jne 0x404f66
jmp 0x404fb0
lea ecx, [eax - 4]
push eax
push eax
mov dword [ebp + 0x10], ecx
push ecx
mov ecx, esi
call fcn.00406d30
mov ecx, dword [esi + 8]
lea eax, [ecx - 4]
cmp edi, eax
je 0x404f9d
mov edx, dword [eax - 4]
sub eax, 4
sub ecx, 4
cmp eax, edi
mov dword [ecx], edx
jne 0x404f8e
lea eax, [edi + 4]
cmp edi, eax
je 0x404fb0
mov ecx, dword [ebp + 0xc]
mov dword [edi], ecx
add edi, 4
cmp edi, eax
jne 0x404fa4
add dword [esi + 8], 4
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
inc eax
mov dword [ebp - 0x18], eax
push eax
push edx
lea eax, [ebp - 0x10]
push str._splayer_d.png
push eax
call sub.MFC42.DLL_CString::Format
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.004081a0
add esp, 0x14
test eax, eax
jne 0x404dff
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x20]
mov dword [ebp - 4], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [ebp - 0xc]
lea esp, [ebp - 0x2c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc