Function at 0x497ca0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x578d4e
mov eax, dword fs:[0]
push eax
sub esp, 0x37c
mov eax, dword [0x5fc150]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov edi, dword [ebp + 8]
mov eax, dword [ebp + 0x14]
mov ebx, dword [ebp + 0x18]
mov dword [ebp - 0x2b4], eax
cmp dword [edi + 0x10], 0x103
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x2bc], eax
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x2b8], ebx
mov dword [ebp - 0x2c0], eax
jb 0x497d07
xor eax, eax
jmp 0x498691
call fcn.0040baa0
cmp dword [edi + 0x14], 8
mov dword [ebp - 0x2b0], eax
jb 0x497d1c
mov eax, dword [edi]
jmp 0x497d1e
mov eax, edi
push 0
lea ecx, [ebp - 0x218]
push ecx
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
test eax, eax
je 0x497d00
cmp eax, 0x104
ja 0x497d00
lea eax, [ebp - 0x218]
push 0x7e
push eax
call fcn.0054422d
add esp, 8
test eax, eax
je 0x497d66
push 0x104
lea eax, [ebp - 0x218]
push eax
push eax
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
test ebx, ebx
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
je 0x497db3
push dword [ebp - 0x2b8]
call ebx
test eax, eax
je 0x497db3
lea eax, [ebp - 0x218]
mov byte [ebp - 0x2a9], 1
push eax
call ebx
test eax, eax
jne 0x497dba
cmp dword [edi + 0x14], 8
jb 0x497d9a
mov eax, dword [edi]
jmp 0x497d9c
mov eax, edi
push eax
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.0054bd88
add esp, 0xc
jmp 0x497dba
mov byte [ebp - 0x2a9], 0
lea eax, [ebp - 0x218]
push eax
lea ecx, [esi + 0x688dc]
call fcn.0045ce90
xor eax, eax
mov dword [ebp - 0x268], 0
mov dword [ebp - 0x264], 0
mov dword [ebp - 0x264], 7
mov dword [ebp - 0x268], 0
mov word [ebp - 0x278], ax
mov dword [ebp - 4], eax
lea ecx, [ebp - 0x2a8]
push 0xffffffffffffffff
push eax
mov dword [ebp - 0x298], eax
mov dword [ebp - 0x294], eax
push edi
mov dword [ebp - 0x294], 7
mov dword [ebp - 0x298], eax
mov word [ebp - 0x2a8], ax
call fcn.00406ac0
mov byte [ebp - 4], 1
cmp dword [edi + 0x14], 8
jb 0x497e40
mov eax, dword [edi]
jmp 0x497e42
mov eax, edi
push eax
call fcn.00439ba0
mov ecx, eax
call fcn.0041b150
mov ebx, eax
test ebx, ebx
jne 0x497e8f
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x278]
call fcn.00403ef0
cmp dword [ebp - 0x264], 8
mov eax, dword [ebp - 0x278]
jae 0x497e7c
lea eax, [ebp - 0x278]
push eax
call fcn.00439ba0
mov ecx, eax
call fcn.0041b150
mov ebx, eax
test ebx, ebx
je 0x497ef0
cmp byte [ebp - 0x2a9], 0
jne 0x497ef0
mov eax, dword [esi + 0x689d0]
test eax, eax
je 0x49866e
mov al, byte [eax + 0x3b8]
test al, al
je 0x49866e
mov eax, dword [esi]
push 5
push dword [eax + 0xc]
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [esi]
mov al, byte [eax + 0x69010]
test al, al
jne 0x497eda
mov ecx, dword [esi + 0x689d0]
push 2
call fcn.004f7430
mov eax, dword [esi]
push 0
push 0
push 5
push dword [eax + 0xc]
call dword [sym.imp.USER32.dll_SendMessageW]
jmp 0x49866e
lea eax, [ebp - 0x218]
mov ecx, esi
push eax
call fcn.0049c2b0
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test al, al
je 0x497f2a
lea eax, [ebp - 0x218]
push eax
call ebx
test eax, eax
je 0x497f2a
lea eax, [ebp - 0x218]
mov ecx, esi
push eax
call fcn.0049a8d0
xor ebx, ebx
jmp 0x49866e
lea eax, [ebp - 0x218]
mov ecx, esi
push eax
call fcn.0049c410
test al, al
je 0x497f70
lea eax, [ebp - 0x218]
push eax
call ebx
test eax, eax
je 0x497f70
mov ecx, dword [ebp - 0x2b0]
lea eax, [ebp - 0x218]
push eax
push 0
call fcn.004ba8a0
push 0xac31
mov ecx, esi
call fcn.0048e6c0
xor ebx, ebx
jmp 0x49866e
lea eax, [ebp - 0x218]
mov byte [ebp - 0x2ab], 0
push eax
call ebx
test eax, eax
jne 0x497f97
mov ecx, dword [ebp - 0x2b0]
push eax
call fcn.004ba550
mov byte [ebp - 0x2ab], 1
lea eax, [ebp - 0x218]
push 0x2a
push eax
call fcn.00544709
add esp, 8
test eax, eax
jne 0x497fc8
lea eax, [ebp - 0x218]
push 0x3f
push eax
call fcn.00544709
add esp, 8
mov byte [ebp - 0x2aa], 0
test eax, eax
je 0x497fcf
mov byte [ebp - 0x2aa], 1
cmp byte [ebp - 0x2a9], 0
jne 0x4980d8
lea eax, [ebp - 0x218]
push eax
call ebx
test eax, eax
jne 0x4980d8
cmp byte [ebp - 0x2aa], al
jne 0x4980d8
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x230]
call fcn.004029a0
mov byte [ebp - 4], 2
lea eax, [ebp - 0x230]
push eax
lea eax, [ebp - 0x290]
push eax
call fcn.00423dd0
add esp, 8
lea ecx, [ebp - 0x290]
call fcn.004038c0
cmp dword [ebp - 0x21c], 8
mov eax, dword [ebp - 0x230]
jae 0x498045
lea eax, [ebp - 0x230]
push eax
call ebx
test eax, eax
je 0x4981bc
mov eax, dword [esi]
lea ecx, [ebp - 0x218]
push ecx
push 0
push 4
push 0x5b1244
push str.__STR_REPLACE___doesnt_exist._Create_it_
push dword [eax + 0xc]
lea ecx, [esi + 0x300]
push str.CreateNewFileOrNot
call fcn.004607b0
cmp eax, 6
jne 0x49824f
lea eax, [ebp - 0x218]
push eax
call fcn.00439ba0
mov ecx, eax
call fcn.0041a4e0
test al, al
jne 0x4980c9
mov eax, dword [esi]
lea ecx, [ebp - 0x218]
push ecx
push 0
push 0
push 0x5b1244
push str.Cannot_create_the_file___STR_REPLACE__.
push dword [eax + 0xc]
lea ecx, [esi + 0x300]
push str.CreateNewFileError
call fcn.004607b0
jmp 0x49824f
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x230]
call fcn.004038c0
mov eax, dword [esi]
lea ecx, [ebp - 0x324]
mov dword [ebp - 0x31c], 0x3f6
push ecx
lea ecx, [esi + 0x68a08]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x324], eax
mov dword [ebp - 0x320], 0
call fcn.004c1430
mov eax, dword [ebp - 0x2b4]
cmp eax, 0xffffffff
jne 0x498122
lea eax, [ebp - 0x218]
mov ecx, esi
push eax
call fcn.00470a10
cmp byte [ebp - 0x2a9], 0
je 0x49827b
push dword [ebp - 0x2c0]
push dword [ebp - 0x2bc]
push dword [ebp - 0x2b8]
push eax
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.00439ba0
mov ecx, eax
call fcn.0041b7d0
mov ebx, eax
mov dword [ebp - 0x2b4], ebx
test ebx, ebx
je 0x49839c
mov eax, dword [ebp - 0x2b8]
test eax, eax
je 0x49829f
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x49829f
lea eax, [ebp - 0x388]
mov dword [ebp - 0x388], 0
push eax
lea ecx, [esi + 0x68a08]
mov dword [ebp - 0x384], ebx
mov dword [ebp - 0x380], 0x3fa
call fcn.004c1430
mov byte [ebx + 0xb1], 1
jmp 0x49829f
push 0x593ed8
lea ecx, [ebp - 0x248]
call fcn.004029a0
mov byte [ebp - 4], 3
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x248]
call fcn.0040a2e0
push str.__cannot_be_opened:_nFolder__
lea ecx, [ebp - 0x248]
call fcn.0040a2e0
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x230]
push eax
lea ecx, [ebp - 0x248]
call fcn.00406650
push str.__doesnt_exist.
lea ecx, [ebp - 0x248]
call fcn.0040a2e0
cmp dword [ebp - 0x234], 8
mov ecx, dword [ebp - 0x248]
jae 0x49822d
lea ecx, [ebp - 0x248]
mov eax, dword [esi]
push 0
push str.Cannot_open_file
push ecx
push dword [eax + 0xc]
call dword [sym.imp.USER32.dll_MessageBoxW]
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x248]
call fcn.004038c0
cmp byte [ebp - 0x2ab], 0
je 0x498265
mov ecx, dword [ebp - 0x2b0]
push 1
call fcn.004ba550
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x230]
call fcn.004038c0
xor ebx, ebx
jmp 0x49866e
push 0
push 0
push 0
push eax
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.00439ba0
mov ecx, eax
call fcn.0041b7d0
mov ebx, eax
mov dword [ebp - 0x2b4], eax
test ebx, ebx
je 0x49839c
mov byte [esi + 0x68a80], 1
call fcn.00439ba0
cmp byte [ebp + 0x10], 0
je 0x4982c6
push 0x10
mov ecx, ebx
mov byte [ebx + 0x3c], 1
call fcn.0041af40
lea eax, [ebp - 0x324]
mov dword [ebp - 0x31c], 0x3ee
push eax
lea ecx, [esi + 0x68a08]
mov dword [ebp - 0x320], ebx
call fcn.004c1430
push 0
push dword [esi + 0x68ff8]
mov ecx, esi
push ebx
call fcn.00475c60
mov eax, dword [esi + 0x689d0]
test eax, eax
je 0x498343
mov al, byte [eax + 0x3b8]
test al, al
je 0x498343
mov eax, dword [esi]
push 5
push dword [eax + 0xc]
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [esi]
mov al, byte [eax + 0x69010]
test al, al
jne 0x498332
mov ecx, dword [esi + 0x689d0]
push 2
call fcn.004f7430
mov eax, dword [esi]
push 0
push 0
push 5
push dword [eax + 0xc]
call dword [sym.imp.USER32.dll_SendMessageW]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [ebp - 0x324]
mov byte [esi + 0x689b4], 1
push eax
lea ecx, [esi + 0x68a08]
mov byte [esi + 0x68a80], 0
mov dword [ebp - 0x31c], 0x3ec
call fcn.004c1430
mov ecx, dword [esi + 0x68fd8]
test ecx, ecx
je 0x498658
push dword [esi + 0x68ff8]
add ecx, 0x6c
push ebx
call fcn.00503480
jmp 0x498658
mov al, byte [ebp - 0x2aa]
test al, al
jne 0x498415
cmp dword [edi + 0x14], 8
jb 0x4983b0
mov eax, dword [edi]
jmp 0x4983b2
mov eax, edi
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x49840f
mov eax, dword [esi]
lea ecx, [ebp - 0x218]
push ecx
push 0
push 0
push str.ERROR
push str.Can_not_open_file___STR_REPLACE__.
push dword [eax + 0xc]
lea ecx, [esi + 0x300]
push str.OpenFileError
call fcn.004607b0
lea eax, [ebp - 0x324]
mov byte [esi + 0x68a80], 0
push eax
lea ecx, [esi + 0x68a08]
mov dword [ebp - 0x31c], 0x3f7
call fcn.004c1430
jmp 0x498658
mov al, byte [ebp - 0x2aa]
mov dword [ebp - 0x224], 0
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x21c], 0
mov byte [ebp - 4], 4
mov dword [ebp - 0x23c], 0
mov dword [ebp - 0x238], 0
mov dword [ebp - 0x234], 0
mov byte [ebp - 4], 5
test al, al
je 0x49850d
cmp dword [edi + 0x14], 8
jb 0x49846b
mov eax, dword [edi]
jmp 0x49846d
mov eax, edi
push 0x5c
push eax
call fcn.00544709
mov ecx, eax
add esp, 8
test ecx, ecx
je 0x4985b3
cmp dword [edi + 0x14], 8
jb 0x49848c
mov edx, dword [edi]
jmp 0x49848e
mov edx, edi
mov eax, ecx
sub eax, edx
sar eax, 1
mov dword [ebp - 0x2bc], eax
lea eax, [ecx + 2]
push eax
lea ecx, [ebp - 0x290]
call fcn.004029a0
mov byte [ebp - 4], 6
lea eax, [ebp - 0x290]
push eax
lea ecx, [ebp - 0x23c]
call fcn.00408a40
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x290]
call fcn.004038c0
cmp dword [edi + 0x14], 8
jb 0x4984d6
mov edi, dword [edi]
mov eax, dword [ebp - 0x2bc]
lea ecx, [ebp - 0x260]
inc eax
push eax
push edi
call fcn.00496f60
mov byte [ebp - 4], 7
cmp dword [ebp - 0x24c], 8
mov eax, dword [ebp - 0x260]
jae 0x498503
lea eax, [ebp - 0x260]
push 0
push dword [ebp + 0xc]
jmp 0x49858e
push edi
lea ecx, [ebp - 0x260]
call fcn.00402970
mov byte [ebp - 4], 8
cmp dword [edi + 0x14], 8
mov eax, dword [edi + 0x10]
jb 0x498528
mov edi, dword [edi]
cmp word [edi + eax*2 - 2], 0x5c
je 0x498540
push 0x588408
lea ecx, [ebp - 0x260]
call fcn.0040a2e0
push 0x594dec
lea ecx, [ebp - 0x290]
call fcn.004029a0
mov byte [ebp - 4], 9
lea eax, [ebp - 0x290]
push eax
lea ecx, [ebp - 0x23c]
call fcn.00408a40
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x290]
call fcn.004038c0
cmp dword [ebp - 0x24c], 8
mov eax, dword [ebp - 0x260]
jae 0x49858a
lea eax, [ebp - 0x260]
push 0
push 1
lea ecx, [ebp - 0x224]
push ecx
lea ecx, [ebp - 0x23c]
push ecx
push eax
mov ecx, esi
call fcn.00471340
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x260]
call fcn.004038c0
mov ecx, dword [ebp - 0x220]
mov eax, 0x2aaaaaab
sub ecx, dword [ebp - 0x224]
imul ecx
sar edx, 2
mov edi, edx
shr edi, 0x1f
add edi, edx
cmp edi, 0xc8
jbe 0x498606
mov eax, dword [esi]
lea ecx, [esi + 0x300]
push 0
push edi
push 4
push str.Amount_of_files_to_open_is_too_large
push str._INT_REPLACE__files_are_about_to_be_opened._rAre_you_sure_to_open_them_
push dword [eax + 0xc]
push str.NbFileToOpenImportantWarning
call fcn.004607b0
cmp eax, 6
sete al
test al, al
je 0x49863a
test edi, edi
je 0x49863a
xor ebx, ebx
lea esp, [esp]
mov eax, dword [ebp - 0x224]
mov ecx, esi
push 0
push 0
push 0
push 0xffffffffffffffff
push 0
push 0
add eax, ebx
push eax
call fcn.00497ca0
add ebx, 0x18
sub edi, 1
jne 0x498610
mov ebx, dword [ebp - 0x2b4]
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x23c]
call fcn.00403aa0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x224]
call fcn.00403aa0
cmp byte [ebp - 0x2ab], 0
je 0x49866e
mov ecx, dword [ebp - 0x2b0]
push 1
call fcn.004ba550
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x2a8]
call fcn.004038c0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x278]
call fcn.004038c0
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0052c233
mov esp, ebp
pop ebp
ret 0x1c