Function at 0x4c8ea0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x23c
mov eax, dword [0x7ce4e4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, ecx
mov dword [ebp - 0x220], esi
mov dword [ebp - 0x224], edi
test edi, edi
je 0x4c9293
cmp word [edi], 0
je 0x4c9293
lea eax, [esi + 0x5c]
xor ebx, ebx
push eax
mov dword [ebp - 0x228], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea eax, [esi + 0xc]
mov esi, dword [eax]
mov dword [ebp - 0x22c], eax
cmp esi, dword [eax + 4]
je 0x4c8f24
nop dword [eax + eax]
mov eax, dword [esi]
push edi
push dword [eax + 0xc]
call fcn.005d0064
add esp, 8
test eax, eax
je 0x4c8f22
mov eax, dword [ebp - 0x22c]
add esi, 4
cmp esi, dword [eax + 4]
jne 0x4c8f00
jmp 0x4c8f24
mov ebx, dword [esi]
push dword [ebp - 0x228]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test ebx, ebx
je 0x4c8f49
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005be209
mov esp, ebp
pop ebp
ret 8
push 0x30
call fcn.005be217
mov esi, eax
add esp, 4
mov ecx, esi
mov dword [ebp - 0x21c], esi
call fcn.004cea20
push 0x2e
push edi
mov dword [esi], vtable.t_cuTextureEx.0
mov dword [ebp - 0x238], esi
call fcn.005c02be
add esp, 8
mov dword [ebp - 0x218], eax
test eax, eax
jne 0x4c8f8c
mov eax, dword [esi]
mov ecx, esi
jmp 0x4c9290
mov ecx, edi
call fcn.004c8d10
mov ebx, eax
test ebx, ebx
jne 0x4c902d
push str..bmp
push dword [ebp - 0x218]
call fcn.005d0064
add esp, 8
test eax, eax
jne 0x4c8fc4
lea ebx, [eax + 1]
xor al, al
mov byte [ebp - 0x211], al
jmp 0x4c9086
push 0x795528
push dword [ebp - 0x218]
call fcn.005d0064
add esp, 8
test eax, eax
jne 0x4c8fec
push edi
push edi
mov ecx, esi
lea ebx, [eax + 2]
call fcn.004cef00
jmp 0x4c9078
push str..jpg
push dword [ebp - 0x218]
call fcn.005d0064
add esp, 8
test eax, eax
jne 0x4c9011
push edi
push edi
mov ecx, esi
lea ebx, [eax + 3]
call fcn.004cf080
jmp 0x4c9078
push str..gif
push dword [ebp - 0x218]
call fcn.005d0064
add esp, 8
test eax, eax
jne 0x4c902d
lea ebx, [eax + 4]
jmp 0x4c906f
mov byte [ebp - 0x211], 0
mov eax, ebx
cmp ebx, 1
je 0x4c9086
mov ecx, ebx
cmp eax, 2
jne 0x4c904d
push edi
push edi
mov ecx, esi
call fcn.004cef00
jmp 0x4c9078
mov ebx, ecx
mov eax, ebx
cmp ecx, 3
jne 0x4c9061
push edi
push edi
mov ecx, esi
call fcn.004cf080
jmp 0x4c9078
mov byte [ebp - 0x211], 0
mov ebx, eax
cmp eax, 4
jne 0x4c9086
push edi
push edi
mov ecx, esi
call fcn.004ceb00
mov byte [ebp - 0x211], al
test al, al
jne 0x4c92ae
mov eax, dword [ebp - 0x220]
mov esi, dword [eax + 0x48]
cmp esi, dword [eax + 0x4c]
je 0x4c91a4
nop dword [eax + eax]
mov ecx, dword [esi]
xor edi, edi
mov dword [ebp - 0x234], ecx
mov eax, dword [ecx + 0x224]
sub eax, dword [ecx + 0x220]
sar eax, 2
mov dword [ebp - 0x230], eax
test eax, eax
jle 0x4c918c
nop word [eax + eax]
mov eax, dword [ecx + 0x220]
push dword [ebp - 0x224]
mov eax, dword [eax + edi*4]
mov dword [ebp - 0x218], eax
push dword [eax]
call fcn.005d0064
add esp, 8
test eax, eax
je 0x4c9107
mov ecx, dword [ebp - 0x234]
inc edi
cmp edi, dword [ebp - 0x230]
jl 0x4c90d0
jmp 0x4c918c
cmp ebx, 1
je 0x4c917e
cmp ebx, 2
jne 0x4c9132
mov eax, dword [ebp - 0x218]
mov ecx, dword [ebp - 0x21c]
push dword [eax + 8]
push dword [eax + 4]
push dword [eax]
call fcn.004cefb0
mov byte [ebp - 0x211], al
jmp 0x4c9184
cmp ebx, 3
jne 0x4c9158
mov eax, dword [ebp - 0x218]
mov ecx, dword [ebp - 0x21c]
push dword [eax + 8]
push dword [eax + 4]
push dword [eax]
call fcn.004cf150
mov byte [ebp - 0x211], al
jmp 0x4c9184
cmp ebx, 4
jne 0x4c917e
mov eax, dword [ebp - 0x218]
mov ecx, dword [ebp - 0x21c]
push dword [eax + 8]
push dword [eax + 4]
push dword [eax]
call fcn.004cebb0
mov byte [ebp - 0x211], al
jmp 0x4c9184
mov al, byte [ebp - 0x211]
test al, al
jne 0x4c92a8
mov eax, dword [ebp - 0x220]
add esi, 4
cmp esi, dword [eax + 0x4c]
jne 0x4c90a0
mov edi, dword [ebp - 0x224]
push 0x208
lea eax, [ebp - 0x210]
push 0
push eax
call fcn.005c0be0
mov eax, dword [ebp - 0x220]
add esp, 0xc
mov esi, dword [eax + 0x30]
cmp esi, dword [eax + 0x34]
je 0x4c9288
nop dword [eax]
push edi
push dword [esi]
lea eax, [ebp - 0x210]
push 0x7928cc
push 0x104
push eax
call fcn.00475a40
add esp, 0x14
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4c9276
shr eax, 4
not al
test al, 1
je 0x4c9276
cmp ebx, 1
je 0x4c926c
cmp ebx, 2
jne 0x4c922c
mov ecx, dword [ebp - 0x21c]
lea eax, [ebp - 0x210]
push eax
push edi
call fcn.004cef00
mov byte [ebp - 0x211], al
jmp 0x4c9272
cmp ebx, 3
jne 0x4c924c
mov ecx, dword [ebp - 0x21c]
lea eax, [ebp - 0x210]
push eax
push edi
call fcn.004cf080
mov byte [ebp - 0x211], al
jmp 0x4c9272
cmp ebx, 4
jne 0x4c926c
mov ecx, dword [ebp - 0x21c]
lea eax, [ebp - 0x210]
push eax
push edi
call fcn.004ceb00
mov byte [ebp - 0x211], al
jmp 0x4c9272
mov al, byte [ebp - 0x211]
test al, al
jne 0x4c92a8
mov eax, dword [ebp - 0x220]
add esi, 4
cmp esi, dword [eax + 0x34]
jne 0x4c91d0
mov ecx, dword [ebp - 0x21c]
mov eax, dword [ecx]
call dword [eax + 8]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005be209
mov esp, ebp
pop ebp
ret 8
mov esi, dword [ebp - 0x21c]
mov ebx, dword [ebp - 0x228]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [ebp - 0x22c]
mov eax, dword [ecx + 4]
cmp eax, dword [ecx + 8]
je 0x4c92eb
mov dword [eax], esi
add dword [ecx + 4], 4
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005be209
mov esp, ebp
pop ebp
ret 8
lea edx, [ebp - 0x238]
push edx
push eax
call fcn.004c9760
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005be209
mov esp, ebp
pop ebp
ret 8