Function at 0x4706c0
Capabilities:
Check if file exists

Disassembly:
push 0xffffffffffffffff
push 0x4aef18
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4dffd0]
xor eax, esp
push eax
lea eax, [esp + 0x2c]
mov dword fs:[0], eax
mov edi, ecx
mov dword [esp + 0x20], edi
xor ebx, ebx
push ebx
lea esi, [edi + 0x24]
push 0x7d0
mov ecx, esi
call fcn.004866c0
push ebx
push 0xbb8
mov ecx, esi
call fcn.004866c0
push ebx
push 0xfa0
mov ecx, esi
call fcn.004866c0
mov eax, dword [edi + 0x3b4]
cmp eax, 1
jne 0x470818
push eax
push 0x7d0
mov ecx, esi
call fcn.004866c0
mov ecx, dword [edi + 0x3e4]
cmp ecx, ebx
lea ebp, [edi + 0x3e0]
jne 0x47074b
mov dword [esp + 0x14], ebx
jmp 0x470764
mov eax, dword [ebp + 8]
sub eax, ecx
sar eax, 3
cmp eax, 8
mov dword [esp + 0x14], eax
jle 0x470764
mov dword [esp + 0x14], 8
cmp dword [esp + 0x14], ebx
jle 0x4707de
mov dword [esp + 0x18], 0x836
mov edi, dword [ebp + 4]
test edi, edi
je 0x470813
mov ecx, dword [ebp + 8]
mov eax, ecx
sub eax, edi
sar eax, 3
cmp eax, ebx
jbe 0x470813
cmp edi, ecx
jbe 0x470799
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov dword [esp + 0x28], edi
lea edi, [edi + ebx*8]
cmp edi, dword [ebp + 8]
ja 0x4707aa
cmp edi, dword [ebp + 4]
jae 0x4707b0
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov eax, ebp
cmp edi, dword [eax + 8]
jb 0x4707bd
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov eax, dword [edi]
mov ecx, dword [esp + 0x18]
push eax
push ecx
mov ecx, esi
call fcn.00470540
add dword [esp + 0x18], 0x64
add ebx, 1
cmp ebx, dword [esp + 0x14]
jl 0x470772
mov edi, dword [esp + 0x20]
push 0x4bd71c
push 0x385
mov ecx, esi
call fcn.00470540
push 0x4bd710
push 0x386
mov ecx, esi
call fcn.00470540
push 0x4bd704
push 0x64
mov ecx, esi
call fcn.00470540
jmp 0x470a1d
jmp fcn.00471f70
cmp eax, 2
jne 0x470a49
lea ecx, [edi + 0x3cc]
call fcn.0043e700
test eax, eax
jne 0x470a1d
cmp dword [edi + 0x3f8], ebx
jbe 0x470a1d
mov edx, dword [0x500de4]
mov eax, dword [edx + 0xc]
mov ecx, 0x500de4
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
push 1
push 0xbb8
mov ecx, esi
mov dword [esp + 0x3c], ebx
call fcn.004866c0
mov eax, dword [edi + 0x3f4]
mov ebp, dword [eax]
lea ebx, [edi + 0x3f0]
mov dword [esp + 0x1c], ebp
mov edi, 0xc1c
push 0
push edi
mov ecx, esi
call fcn.004866c0
add edi, 0x64
cmp edi, 0xf3c
jl 0x470880
mov edi, 0xc1e
lea ebx, [ebx]
cmp ebx, ebx
mov ecx, dword [ebx + 4]
mov dword [esp + 0x28], ecx
je 0x4708b1
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp ebp, dword [esp + 0x28]
je 0x4709c1
cmp ebp, dword [ebx + 4]
jne 0x4708c6
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
add ebp, 8
mov ecx, ebp
call dword [sym.imp.MSVCP80.dll_public:_unsigned_int___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::size_void_const]
test eax, eax
jbe 0x4709a4
mov edx, dword [esp + 0x1c]
cmp edx, dword [ebx + 4]
jne 0x4708e8
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
lea ecx, [ebp + 0x1c]
call dword [sym.imp.MSVCP80.dll_public:_unsigned_int___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::size_void_const]
test eax, eax
jbe 0x4709a4
mov eax, dword [esp + 0x1c]
cmp eax, dword [ebx + 4]
jne 0x470908
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov ecx, dword [esp + 0x1c]
cmp ecx, dword [ebx + 4]
jne 0x470917
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov ecx, ebp
call dword [sym.imp.MSVCP80.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
lea ecx, [ebp + 0x1c]
call dword [sym.imp.MSVCP80.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
lea edx, [esp + 0x1c]
push 0x4b974c
push edx
call fcn.00405e90
mov eax, dword [esp + 0x24]
add esp, 0x10
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4709a4
push 1
lea ecx, [edi - 2]
push ecx
mov ecx, esi
call fcn.004866c0
mov edx, dword [esp + 0x1c]
cmp edx, dword [ebx + 4]
jne 0x470967
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov ecx, ebp
call dword [sym.imp.MSVCP80.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
push edi
mov ecx, esi
call fcn.00470540
mov ebp, dword [esp + 0x14]
push ebp
lea eax, [edi + 1]
push eax
mov ecx, esi
call fcn.00470540
push ebp
push str.filepath
lea ecx, [edi - 1]
push ecx
mov ecx, esi
call fcn.0046f030
cmp edi, 0xeda
je 0x4709c1
add edi, 0x64
mov ebp, dword [esp + 0x1c]
cmp ebp, dword [ebx + 4]
jne 0x4709b3
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov edx, dword [ebp]
mov dword [esp + 0x1c], edx
mov ebp, edx
jmp 0x4708a0
push 0x4bd6f4
push 0x385
mov ecx, esi
call fcn.00470540
push 0x4bd6e8
push 0x386
mov ecx, esi
call fcn.00470540
push str._g0W
push 0x64
mov ecx, esi
call fcn.00470540
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov dword [esp + 0x34], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x470a19
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [esp + 0x20]
mov edx, dword [edi + 4]
push 1
push 0
push edx
mov dword [edi + 0x394], 0
call dword [sym.imp.USER32.dll_InvalidateRect]
mov ecx, dword [esp + 0x2c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
cmp eax, 3
jne 0x470a1d
push 1
push 0xfa0
mov ecx, esi
call fcn.004866c0
push 0x4bd6d0
push 0x385
mov ecx, esi
call fcn.00470540
push 0x4bd6e8
push 0x386
mov ecx, esi
call fcn.00470540
push 0x4bd6c0
push 0x64
mov ecx, esi
call fcn.00470540
mov ecx, dword [edi + 0x3b8]
push ecx
push 0x1006
mov ecx, esi
call fcn.00470540
jmp 0x470a1d