Function at 0x47e708
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
sub esp, 0x70
lea esi, [ebx + 4]
mov dword [ebp - 0x2c], edx
lea edx, [esi - 4]
mov ecx, dword [ebp - 0x2c]
mov dword [ebx], 0x4fa001
or ecx, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
mov dword [ebp - 0x30], edx
mov edx, dword [esi - 0x14]
mov dword [esi + 4], eax
lea ebx, [esi + 8]
mov dword [ebp - 0x10], 0
mov dword [esi], edx
lea edx, [esi + 4]
mov dword [ebp - 0x18], edx
sete dl
cmp dword [ebp + 0xc], 2
mov dword [ebp - 0x14], 0
sete al
or eax, edx
and eax, 1
mov edx, 1
movzx eax, al
mov dword [esp], eax
lea eax, [ebp - 0x18]
call fcn.0047cac8
mov eax, dword [ebp - 0x14]
test eax, eax
je case.0x47e842.2
mov dword [esi - 4], eax
cmp dword [0x4fe608], 0x4fa001
je 0x47e790
mov edx, dword [ebp - 0x2c]
call 0x47e304
mov eax, dword [esi - 4]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x2c], 5
mov byte [ebp - 0x31], 0
mov byte [ebp - 0x32], 0
ja case.0x47e7a5.2
mov eax, dword [ebp - 0x2c]
jmp dword [eax*4 + 0x5674fc]
lea eax, [ebp - 0x18]
call fcn.0047c8c4
test al, al
jne 0x47eb76
cmp dword [ebp + 0xc], 1
je 0x47ec4f
mov esi, dword [ebp + 0xc]
test esi, esi
sete al
cmp dword [ebp + 0xc], 2
sete dl
or eax, edx
test al, 1
je 0x47e9f5
lea esi, [esi]
lea edi, [edi]
lea esp, [ebp - 8]
mov eax, 0x4fa001
pop esi
sub ebx, 0x1c
pop edi
pop ebp
ret
mov byte [ebp - 0x32], 1
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x47e820
lea eax, [edi - 6]
cmp eax, 1
jbe 0x47e820
mov dword [ebp + 0xc], 3
lea esi, [esi]
test edi, edi
jne 0x47e829
mov edi, 5
lea eax, [ebp - 0x18]
call fcn.0047c8c4
test al, al
je 0x47e9e0
cmp edi, 6
ja case.0x47e842.0
jmp dword [edi*4 + 0x567514]
mov eax, 0x1aca
mov dword [esp + 4], eax
mov dword [esp], str.c:_usr_work_edrive_w32texsrc_clisp249_clisp_2.49_src_pathname.d
call fcn.00420a64
mov ecx, dword [ebp - 0x30]
mov edx, dword [ecx]
mov eax, dword [edx + 3]
cmp al, 0x17
jne 0x47e88a
jmp 0x47e880
mov edx, dword [edx + 7]
mov eax, dword [edx + 3]
cmp al, 0x17
je 0x47e880
mov edi, eax
shr edi, 0xa
cmp edx, 0x4fa001
je 0x47ec5f
movsx eax, al
lea ecx, [eax - 0x11]
sar ecx, 1
cmp ecx, 2
je 0x47ec54
lea eax, [edi*4 + 0x1e]
and eax, 0x3fffff0
call fcn.004ea990
lea esi, [esp + 0x2b]
and esi, 0xfffffff0
test edi, edi
jne 0x47eb80
mov dword [ebp - 0x48], esi
mov dword [ebp - 0x4c], esp
mov eax, dword [ebp - 0x48]
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 - 0x48]
lea edi, [esp + 0x2b]
and edi, 0xfffffff0
mov dword [ebp - 0x24], edi
lea ecx, [edi + ecx]
lea eax, [ebp - 0x24]
mov dword [ebp - 0x28], edx
mov edx, dword [0x4f99d8]
mov dword [ebp - 0x50], ecx
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x28]
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 - 0x28], esi
jne 0x47e954
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x50]
je 0x47ebcf
mov esi, 0x1a91
mov dword [esp + 4], esi
jmp 0x47e859
mov byte [ebp - 0x31], 1
lea esi, [esi]
lea edi, [edi]
movzx edx, byte [ebp - 0x32]
lea eax, [edi - 6]
cmp eax, 1
seta al
movzx eax, al
mov dword [esp], eax
mov ecx, dword [ebp - 0x30]
mov eax, dword [ecx]
call fcn.0047d9dc
mov dword [esp], eax
call fcn.00420004
mov ecx, eax
mov eax, dword [ebx - 0x18]
mov dword [ebx], eax
lea eax, [ebx + 4]
mov edx, dword [eax - 0x18]
mov dword [eax + 8], ecx
lea ebx, [eax + 8]
lea ebx, [eax + 0xc]
mov dword [eax], edx
mov edx, dword [eax - 0x14]
mov dword [eax + 4], edx
mov eax, 1
mov dword [esp + 8], eax
movzx eax, byte [ebp - 0x31]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call fcn.0048e5bc
lea esp, [ebp - 8]
sub ebx, 0x14
pop esi
pop edi
pop ebp
ret
cmp dword [ebp + 0xc], 1
jbe 0x47ec4f
cmp dword [ebp + 0xc], 2
jne case.0x47e842.0
jmp case.0x47e842.2
mov ecx, dword [ebp - 0x30]
mov edx, dword [ecx]
mov eax, dword [edx + 3]
cmp al, 0x17
jne 0x47ea1a
jmp 0x47ea10
mov edx, dword [edx + 7]
mov eax, dword [edx + 3]
cmp al, 0x17
je 0x47ea10
mov edi, eax
shr edi, 0xa
cmp edx, 0x4fa001
je 0x47ec7e
movsx eax, al
lea ecx, [eax - 0x11]
sar ecx, 1
cmp ecx, 2
je 0x47ec73
lea eax, [edi*4 + 0x1e]
and eax, 0x3fffff0
call fcn.004ea990
lea esi, [esp + 0x2b]
and esi, 0xfffffff0
test edi, edi
je 0x47ea7c
cmp ecx, 1
je 0x47ecbf
test ecx, ecx
jne 0x47ebc5
mov dword [esp + 8], edi
lea eax, [edx + 7]
mov dword [esp + 4], esi
mov dword [esp], eax
call fcn.0044c124
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x3c], esp
mov eax, dword [ebp - 0x38]
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 - 0x38]
lea edi, [esp + 0x2b]
and edi, 0xfffffff0
mov dword [ebp - 0x1c], edi
lea ecx, [edi + ecx]
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x20], edx
mov edx, dword [0x4f99d8]
mov dword [ebp - 0x40], ecx
mov dword [esp + 0x14], ecx
xor ecx, ecx
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x20]
mov dword [esp + 0xc], esi
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov eax, dword [0x4f99d8]
mov dword [esp], eax
call dword [edx + 0x23]
cmp dword [ebp - 0x20], esi
jne 0x47ebc5
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x40]
jne 0x47ebc5
mov byte [eax], 0
xor eax, eax
xor esi, esi
mov dword [0x698fa0], ebx
mov dword [esp + 0x18], eax
mov eax, pe_nt_image_headers32
mov dword [esp + 0x14], eax
mov eax, 2
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [esp + 0xc], eax
mov eax, 3
mov dword [esp + 8], eax
mov dword [esp + 4], esi
mov dword [esp], edi
call sub.KERNEL32.dll_CreateFileA
sub esp, 0x1c
cmp eax, 0xffffffff
je 0x47ed16
mov dword [0x698fa0], ebx
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
sub esp, 4
xor edx, edx
test eax, eax
mov dword [0x698fa0], edx
je 0x47eced
mov esp, dword [ebp - 0x3c]
mov ecx, 0x4fa001
jmp 0x47e997
cmp ecx, 1
je 0x47ec92
test ecx, ecx
jne 0x47e954
mov dword [esp + 8], edi
lea eax, [edx + 7]
mov dword [esp + 4], esi
mov dword [esp], eax
call fcn.0044c124
jmp 0x47e8cc
mov ecx, dword [ebp - 0x30]
xor edx, edx
cmp edi, 4
sete dl
mov eax, dword [ecx]
call fcn.0047de30
jmp case.0x47e842.0
call fcn.0047abcc
mov eax, 0x1a86
jmp 0x47e855
mov byte [eax], 0
mov eax, 3
cmp dword [ebp + 0xc], 3
sete byte [ebp - 0x51]
cmp byte [ebp - 0x51], 0
jne 0x47ecaa
mov dword [0x698fa0], ebx
xor ecx, ecx
mov edx, pe_nt_image_headers32
mov dword [esp + 0x18], ecx
mov esi, 3
mov ecx, 0x80000000
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [esp + 0x14], edx
mov dword [esp + 0xc], eax
mov dword [esp + 8], esi
mov dword [esp + 4], ecx
mov dword [esp], edi
call sub.KERNEL32.dll_CreateFileA
sub esp, 0x1c
xor edx, edx
cmp eax, 0xffffffff
mov dword [0x698fa0], edx
je 0x47ecd7
mov dword [ebp - 0x44], eax
mov eax, 1
test al, al
mov esp, dword [ebp - 0x4c]
jne 0x47ecb4
cmp dword [ebp + 0xc], 2
je case.0x47e842.2
call fcn.0047ca94
add edx, 7
mov dword [ebp - 0x48], edx
jmp 0x47e8cf
mov dword [ebp - 0x48], 0
test edi, edi
je 0x47e8cf
call fcn.0042a998
add edx, 7
mov dword [ebp - 0x38], edx
jmp 0x47ea7f
mov dword [ebp - 0x38], 0
test edi, edi
je 0x47ea7f
call fcn.0042a998
mov dword [esp + 8], edi
lea eax, [edx + 7]
mov dword [esp + 4], esi
mov dword [esp], eax
call fcn.0044c194
jmp 0x47e8cc
mov eax, 4
jmp 0x47ebe9
mov ecx, dword [ebp - 0x44]
mov dword [esp], ecx
jmp 0x47e990
mov dword [esp + 8], edi
lea eax, [edx + 7]
mov dword [esp + 4], esi
mov dword [esp], eax
call fcn.0044c194
jmp 0x47ea7c
call sub.KERNEL32.dll_GetLastError
cmp eax, 2
jne 0x47ed00
xor eax, eax
cmp byte [ebp - 0x51], 0
je 0x47ec3e
mov eax, dword [ebx - 4]
mov dword [esp], 0x503be1
mov dword [esp + 4], eax
call fcn.004396a0
call sub.KERNEL32.dll_GetLastError
cmp eax, 3
je 0x47ece1
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x35
jne 0x47eced
jmp 0x47ece1
xor ecx, ecx
mov dword [0x698fa0], ecx
jmp 0x47eced