Function at 0x1004f620
Capabilities:
Check if file exists
Delete file
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x1013ee77
mov eax, dword fs:[0]
push eax
sub esp, 0x678
mov eax, dword [0x10170024]
xor eax, esp
mov dword [esp + 0x670], eax
push ebx
push esi
push edi
mov eax, dword [0x10170024]
xor eax, esp
push eax
lea eax, [esp + 0x688]
mov dword fs:[0], eax
xor edi, edi
push 0x206
lea eax, [esp + 0x47a]
push edi
push eax
mov esi, ecx
mov word [esp + 0x480], di
call sub.MSVCR80.dll_memset
add esp, 0xc
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], edi
mov eax, dword [ebp + 8]
mov dword [esp + 0x690], edi
mov edx, dword [esi]
mov edx, dword [edx + 0xec]
push edi
push eax
mov ecx, esi
call edx
mov ebx, eax
cmp ebx, edi
jne 0x1004f6c5
lea ebx, [esp + 0x18]
mov dword [esp + 0x690], 0xffffffff
call fcn.100036b0
jmp 0x1004f9dc
mov eax, dword [ebx]
mov edx, dword [eax + 0x10]
mov ecx, ebx
mov dword [esp + 0x14], edi
call edx
test eax, eax
jbe 0x1004f7d9
lea ebx, [ebx]
mov eax, dword [ebx]
mov edx, dword [esp + 0x14]
mov eax, dword [eax + 0x14]
lea ecx, [esp + 0x44]
push ecx
push edx
mov ecx, ebx
call eax
mov si, word [esp + 0x268]
xor edx, edx
cmp si, di
lea eax, [esp + 0x474]
lea ecx, [esp + 0x268]
je 0x1004f72a
add ecx, 2
add edx, 1
cmp word [ecx], di
jne 0x1004f710
cmp edx, 0x103
jle 0x1004f72a
mov edi, 0x103
jmp 0x1004f74d
xor edx, edx
cmp si, di
lea ecx, [esp + 0x268]
je 0x1004f74b
jmp 0x1004f740
add ecx, 2
add edx, 1
cmp word [ecx], di
jne 0x1004f740
mov edi, edx
xor edx, edx
test si, si
je 0x1004f77c
lea ecx, [esp + 0x268]
lea esi, [esp + 0x474]
sub ecx, esi
cmp edx, edi
jge 0x1004f77c
mov si, word [ecx + eax]
mov word [eax], si
add eax, 2
add edx, 1
cmp word [ecx + eax], 0
jne 0x1004f764
lea ecx, [esp + 0x474]
push ecx
lea ecx, [esp + 0x2c]
mov word [eax], 0
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_wchar_t_const__]
lea edx, [esp + 0x28]
push edx
lea esi, [esp + 0x1c]
mov byte [esp + 0x694], 1
call fcn.10003480
lea ecx, [esp + 0x28]
mov byte [esp + 0x690], 0
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov esi, dword [esp + 0x14]
mov eax, dword [ebx]
mov edx, dword [eax + 0x10]
add esi, 1
mov ecx, ebx
mov dword [esp + 0x14], esi
call edx
xor edi, edi
cmp esi, eax
jb 0x1004f6e0
mov eax, dword [ebx]
mov edx, dword [eax + 8]
mov ecx, ebx
call edx
mov dword [esp + 0x14], 0
lea ebx, [ebx]
mov ecx, dword [esp + 0x1c]
test ecx, ecx
mov ebx, dword [esp + 0x20]
je 0x1004f8a3
mov esi, ebx
sub esi, ecx
mov eax, 0x92492493
imul esi
add edx, esi
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp edi, eax
jae 0x1004f8a3
mov esi, dword [esp + 0x14]
cmp dword [esi + ecx + 0x18], 8
jb 0x1004f830
mov ecx, dword [esi + ecx + 4]
jmp 0x1004f834
lea ecx, [esi + ecx + 4]
push 0
push 0
push 3
push 0
push 0
push SysReAllocString
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
je 0x1004f862
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
add edi, 1
add esi, 0x1c
mov dword [esp + 0x14], esi
jmp 0x1004f7f0
mov dword [esp + 0x690], 0xffffffff
mov esi, dword [esp + 0x1c]
test esi, esi
je 0x1004f89c
mov edi, dword [esp + 0x20]
cmp esi, edi
je 0x1004f893
lea ecx, [ecx]
mov ecx, esi
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
add esi, 0x1c
cmp esi, edi
jne 0x1004f880
mov esi, dword [esp + 0x1c]
push esi
call sub.MSVCR80.dll_void___cdecl_operator_delete_void__
add esp, 4
xor eax, eax
jmp 0x1004f9e1
xor edi, edi
mov dword [esp + 0x14], edi
lea esp, [esp]
test ecx, ecx
je 0x1004f9a5
mov esi, ebx
sub esi, ecx
mov eax, 0x92492493
imul esi
add edx, esi
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, dword [esp + 0x14]
cmp edx, eax
jae 0x1004f9a5
cmp dword [edi + ecx + 0x18], 8
jb 0x1004f8e8
mov ecx, dword [edi + ecx + 4]
jmp 0x1004f8ec
lea ecx, [edi + ecx + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x1004f947
mov esi, dword [esp + 0x1c]
and ebx, 0xfffffffe
test esi, esi
je 0x1004f924
mov ecx, dword [esp + 0x20]
sub ecx, esi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp dword [esp + 0x14], eax
jb 0x1004f92e
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov esi, dword [esp + 0x1c]
cmp dword [edi + esi + 0x18], 8
jb 0x1004f93b
mov esi, dword [edi + esi + 4]
jmp 0x1004f93f
lea esi, [edi + esi + 4]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov esi, dword [esp + 0x1c]
test esi, esi
je 0x1004f96e
mov ecx, dword [esp + 0x20]
sub ecx, esi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp dword [esp + 0x14], eax
jb 0x1004f978
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov esi, dword [esp + 0x1c]
cmp dword [edi + esi + 0x18], 8
jb 0x1004f985
mov esi, dword [edi + esi + 4]
jmp 0x1004f989
lea esi, [edi + esi + 4]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
add dword [esp + 0x14], 1
mov ebx, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
add edi, 0x1c
jmp 0x1004f8b0
test ecx, ecx
mov dword [esp + 0x690], 0xffffffff
je 0x1004f9dc
cmp ecx, ebx
mov edi, ebx
mov esi, ecx
je 0x1004f9d3
lea esp, [esp]
mov ecx, esi
call dword [sym.imp.MSVCP80.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
add esi, 0x1c
cmp esi, edi
jne 0x1004f9c0
mov ecx, dword [esp + 0x1c]
push ecx
call sub.MSVCR80.dll_void___cdecl_operator_delete_void__
add esp, 4
mov eax, 1
mov ecx, dword [esp + 0x688]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x670]
xor ecx, esp
call fcn.1012d370
mov esp, ebp
pop ebp
ret 4