Function at 0x47c138
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
sub esp, 0x260
mov dword [ebp - 0x234], eax
movzx eax, byte [ebp + 8]
mov byte [ebp - 0x235], dl
mov edx, dword [ebp - 0x234]
mov byte [ebp - 0x236], al
mov eax, dword [edx]
mov edx, dword [eax]
cmp dword [edx + 0x13], 0x4fa001
sete byte [ebp - 0x237]
cmp byte [ebp - 0x237], 0
jne 0x47c2c0
mov eax, dword [eax]
call fcn.00476b8c
mov edx, eax
mov eax, dword [edx + 3]
cmp al, 0x17
jne 0x47c19a
nop
mov edx, dword [edx + 7]
mov eax, dword [edx + 3]
cmp al, 0x17
je 0x47c190
mov edi, eax
shr edi, 0xa
cmp edx, 0x4fa001
je 0x47c2f2
movsx eax, al
lea ecx, [eax - 0x11]
sar ecx, 1
cmp ecx, 2
je 0x47c2e4
lea eax, [edi*4 + 0x1e]
and eax, 0x3fffff0
call fcn.004ea990
lea esi, [esp + 0x27]
and esi, 0xfffffff0
test edi, edi
je 0x47c1fc
cmp ecx, 1
je 0x47c428
test ecx, ecx
jne 0x47c2a4
mov dword [esp + 8], edi
lea eax, [edx + 7]
mov dword [esp + 4], esi
mov dword [esp], eax
call fcn.0044c124
mov dword [ebp - 0x23c], esi
mov dword [ebp - 0x240], esp
mov eax, dword [ebp - 0x23c]
mov edx, dword [0x4f99d8]
mov dword [esp + 4], eax
lea esi, [eax + edi*4]
mov dword [esp + 8], esi
mov eax, dword [0x4f99d8]
mov dword [esp], eax
call dword [edx + 0x1f]
lea edx, [eax + 0x1f]
mov ecx, eax
and edx, 0xfffffff0
mov eax, edx
call fcn.004ea990
mov edx, dword [ebp - 0x23c]
lea edi, [esp + 0x27]
and edi, 0xfffffff0
mov dword [ebp - 0x22c], edi
lea ecx, [edi + ecx]
lea eax, [ebp - 0x22c]
mov dword [ebp - 0x230], edx
mov edx, dword [0x4f99d8]
mov dword [ebp - 0x244], ecx
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x230]
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0xc], esi
mov dword [esp + 4], eax
mov eax, dword [0x4f99d8]
mov dword [esp], eax
call dword [edx + 0x23]
cmp dword [ebp - 0x230], esi
jne 0x47c2a4
mov eax, dword [ebp - 0x22c]
cmp eax, dword [ebp - 0x244]
je 0x47c307
mov dword [esp], str.c:_usr_work_edrive_w32texsrc_clisp249_clisp_2.49_src_pathname.d
mov eax, 0x156d
mov dword [esp + 4], eax
call fcn.00420a64
lea esi, [esi]
cmp byte [ebp - 0x235], 0
je 0x47c17e
mov eax, edx
call fcn.00476bc0
mov ecx, dword [ebp - 0x234]
mov dword [ecx + 4], eax
lea esp, [ebp - 8]
pop esi
pop edi
pop ebp
ret
add edx, 7
mov dword [ebp - 0x23c], edx
jmp 0x47c202
xor eax, eax
test edi, edi
mov dword [ebp - 0x23c], eax
je 0x47c202
call fcn.0042a998
mov byte [eax], 0
cmp byte [ebp - 0x235], 0
mov byte [ebp - 0x245], 0
mov byte [ebp - 0x246], 0
mov dword [0x698fa0], ebx
je 0x47c386
mov dword [esp + 4], edi
lea esi, [ebp - 0x228]
mov dword [esp], esi
call sub.msvcrt.dll_strcpy
mov dword [esp], esi
call sub.KERNEL32.dll_GetFileAttributesA
sub esp, 4
inc eax
jne 0x47c3a7
mov dword [esp], esi
call sub.msvcrt.dll_strlen
mov dword [eax + esi], 0x6b6e6c2e
mov byte [eax + esi + 4], 0
mov dword [esp], esi
call sub.KERNEL32.dll_GetFileAttributesA
sub esp, 4
inc eax
je 0x47c3a7
lea edx, [ebp - 0x118]
mov eax, esi
call fcn.004741bc
test eax, eax
je 0x47c3a7
dec eax
jne 0x47c3a0
mov byte [ebp - 0x246], 1
jmp 0x47c3a7
mov dword [esp], edi
lea ecx, [ebp - 0x118]
mov dword [esp + 4], ecx
call fcn.004743d0
test eax, eax
je 0x47c440
mov byte [ebp - 0x245], 1
xor eax, eax
cmp byte [ebp - 0x246], 0
mov dword [0x698fa0], eax
je 0x47c3dc
cmp byte [ebp - 0x236], 0
je 0x47c600
mov edx, dword [ebp - 0x234]
mov dword [edx + 4], 0
mov esp, dword [ebp - 0x240]
jmp 0x47c2dd
cmp byte [ebp - 0x245], 0
jne 0x47c544
cmp byte [ebp - 0x237], 0
mov esp, dword [ebp - 0x240]
je 0x47c520
mov edx, dword [ebp - 0x234]
mov eax, dword [edx]
mov eax, dword [eax]
call fcn.00476bc0
cmp byte [ebp - 0x237], 0
mov edx, eax
je 0x47c501
mov ecx, dword [ebp - 0x234]
mov dword [ecx + 4], edx
jmp 0x47c2dd
mov dword [esp + 8], edi
lea eax, [edx + 7]
mov dword [esp + 4], esi
mov dword [esp], eax
call fcn.0044c194
jmp 0x47c1fc
cmp byte [ebp - 0x237], 0
mov byte [ebp - 0x246], 1
jne 0x47c3a7
mov dword [esp], edi
call sub.msvcrt.dll_strlen
mov edx, eax
dec edx
je 0x47c57d
cmp byte [edi + eax - 1], 0x5c
je 0x47c593
dec edx
je 0x47c58e
cmp byte [edx + edi], 0x5c
jne 0x47c470
mov byte [edi + edx + 1], 0
lea eax, [ebp - 0x118]
mov dword [esp + 4], eax
mov dword [esp], edi
call fcn.004743d0
test eax, eax
je 0x47c3a7
lea edx, [ebp - 0x118]
mov dword [esp], edx
call sub.KERNEL32.dll_GetFileAttributesA
mov ecx, dword [ebp - 0x234]
sub esp, 4
cmp eax, 0xffffffff
mov dword [ecx + 8], eax
je 0x47c4c3
test al, 0x10
jne 0x47c597
mov edx, dword [ebp - 0x234]
mov eax, dword [edx]
mov eax, dword [eax]
mov dword [ebx], eax
add ebx, 4
call fcn.00476b8c
mov dword [ebx], eax
mov eax, dword [0x6971f4]
lea edx, [ebx + 4]
lea ebx, [edx + 4]
mov eax, dword [eax + 4]
mov eax, dword [eax + 6]
mov dword [edx], eax
mov eax, str.S:_S_names_a_directory__not_a_file
mov dword [esp + 4], eax
mov dword [esp], 0x18
call fcn.004357dc
mov dword [ebx], eax
lea eax, [ebx + 4]
mov ebx, eax
mov eax, dword [eax - 8]
call fcn.00476b54
inc eax
mov dword [esp], eax
call fcn.00452100
mov edx, eax
jmp 0x47c41a
mov dword [esp], 0x4f5f62
mov esi, 1
mov dword [esp + 4], esi
call fcn.0044555c
mov eax, dword [0x698da0]
mov dword [ebx], eax
add ebx, 4
jmp 0x47c3fc
mov eax, dword [0x4f99d8]
mov dword [esp + 4], eax
lea eax, [ebp - 0x118]
mov dword [esp], eax
call fcn.0044acf4
call fcn.00475748
mov ecx, dword [ebp - 0x234]
mov edx, dword [ecx]
mov dword [edx], eax
cmp dword [eax + 0x13], 0x4fa001
sete byte [ebp - 0x237]
jmp 0x47c3e9
movzx eax, byte [edx + edi]
cmp al, 0x5c
jne 0x47c3a7
jmp 0x47c47d
movzx eax, byte [edi]
jmp 0x47c581
mov al, 0x5c
jmp 0x47c581
mov eax, dword [0x4f99d8]
lea ecx, [ebp - 0x118]
mov dword [esp], ecx
mov dword [esp + 4], eax
call fcn.0044acf4
mov dword [ebx], eax
lea eax, [ebx + 4]
mov ebx, eax
mov eax, dword [eax - 4]
call fcn.00475748
mov dword [ebx], eax
lea esi, [ebx + 4]
mov eax, dword [esi - 0xc]
mov byte [ebp - 0x246], 0
lea edx, [esi + 8]
lea ebx, [esi - 8]
mov eax, dword [eax + 0x13]
mov dword [esi], eax
mov eax, dword [esi - 0xc]
mov eax, dword [eax + 0x17]
mov dword [esi + 4], eax
mov eax, dword [ebp - 0x234]
mov ecx, dword [edx - 0xc]
mov edi, dword [eax]
mov dword [edi], ecx
mov eax, dword [edx - 8]
mov dword [ecx + 0x13], eax
mov ecx, dword [edi]
mov eax, dword [edx - 4]
mov dword [ecx + 0x17], eax
jmp 0x47c3a7
mov ecx, dword [ebp - 0x234]
mov edi, str.S:_Directory_S_does_not_exist
mov eax, dword [ecx]
mov eax, dword [eax]
call fcn.004794f0
mov dword [ebx], eax
lea eax, [ebx + 4]
mov edx, dword [eax - 4]
lea ebx, [eax - 4]
mov ebx, eax
lea ebx, [eax + 4]
mov dword [edx + 0x13], 0x4fa001
lea ebx, [eax + 8]
mov edx, dword [eax - 4]
mov dword [edx + 0x17], 0x4fa001
mov edx, dword [eax - 4]
mov dword [eax], edx
mov edx, dword [0x6971f4]
mov edx, dword [edx + 4]
mov edx, dword [edx + 6]
mov dword [eax + 4], edx
mov dword [esp + 4], edi
jmp 0x47c4f5