Function at 0x406b00
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov ecx, dword [esp + 8]
sub esp, 0x614
mov eax, dword [ecx + 4]
push ebx
push ebp
push esi
test eax, eax
push edi
je 0x406dd7
mov ebx, dword [ecx + 8]
sub ebx, eax
sar ebx, 5
je 0x406dd7
mov edi, dword [esp + 0x628]
lea eax, [esp + 0x224]
lea ecx, [esp + 0x424]
push eax
lea edx, [esp + 0x328]
push ecx
lea eax, [esp + 0x18]
push edx
push eax
push edi
call dword [sym.imp.MSVCRT.dll__splitpath]
add esp, 0x14
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x406b88
test al, 0x10
je 0x406b88
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x1c]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x406ba7
push 0
lea ecx, [esp + 0x328]
push 0
lea edx, [esp + 0x18]
push ecx
lea eax, [esp + 0x28]
push edx
push eax
call dword [sym.imp.MSVCRT.dll__makepath]
add esp, 0x14
lea edi, [esp + 0x1c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [esp + ecx + 0x1b], 0x5c
je 0x406bea
mov edi, 0x11b3d54
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x1c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov al, byte [esp + 0x224]
test al, al
je 0x406c05
lea edi, [esp + 0x224]
lea edx, [esp + 0x524]
jmp 0x406c11
lea edx, [esp + 0x524]
mov edi, 0x11b3ebc
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
test ebx, ebx
rep movsb byte es:[edi], byte [esi]
jle 0x406dd7
xor ebp, ebp
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], ebp
jmp 0x406c46
mov ebp, dword [esp + 0x14]
mov ebx, dword [esp + 0x62c]
mov eax, ebp
add eax, dword [ebx + 4]
mov eax, dword [eax + 4]
test eax, eax
jne 0x406c5e
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
lea ecx, [esp + 0x224]
lea edx, [esp + 0x424]
push ecx
push edx
lea ecx, [esp + 0x32c]
lea edx, [esp + 0x18]
push ecx
push edx
push eax
call dword [sym.imp.MSVCRT.dll__splitpath]
or ecx, 0xffffffff
lea edi, [esp + 0x30]
xor eax, eax
add esp, 0x14
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x120]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x120]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x424]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x120]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x524]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
mov eax, dword [ebx + 4]
rep movsd dword es:[edi], dword [esi]
add ebp, eax
mov ecx, edx
and ecx, 3
mov eax, dword [ebp + 0x18]
test eax, eax
rep movsb byte es:[edi], byte [esi]
jne 0x406dbd
lea edi, [esp + 0x120]
or ecx, 0xffffffff
xor eax, eax
add ebp, 0x10
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
cmp ebx, 0xfffffffd
jbe 0x406d42
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
mov edx, dword [ebp + 4]
xor ecx, ecx
cmp edx, ecx
je 0x406d6a
mov al, byte [edx - 1]
test al, al
je 0x406d6a
cmp al, 0xff
je 0x406d6a
cmp ebx, ecx
jne 0x406d90
dec al
mov byte [edx - 1], al
mov dword [ebp + 4], ecx
mov dword [ebp + 8], ecx
mov dword [ebp + 0xc], ecx
jmp 0x406dbd
cmp ebx, ecx
jne 0x406d7a
push 1
mov ecx, ebp
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
jmp 0x406dbd
mov eax, dword [ebp + 0xc]
cmp eax, 0x1f
ja 0x406d86
cmp eax, ebx
jae 0x406d99
push 1
mov ecx, ebp
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push ebx
mov ecx, ebp
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Copy_unsigned_int_]
mov edi, dword [ebp + 4]
mov ecx, ebx
mov edx, ecx
lea esi, [esp + 0x120]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 4]
mov dword [ebp + 8], ebx
mov byte [eax + ebx], 0
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
add ecx, 0x20
dec eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], eax
jne 0x406c42
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x614
ret