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

Disassembly:
sub esp, 0x348
push ebx
push ebp
mov ebp, dword [esp + 0x354]
push edi
test ebp, ebp
je 0x407577
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x407577
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x407577
test bl, 1
je 0x40737c
and ebx, 0xfffffffe
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test bl, 0x10
je 0x40754d
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x251]
mov byte [esp + 0x250], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
push esi
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x254]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x254]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
mov dword [esp + 0x114], eax
rep movsb byte es:[edi], byte [esi]
mov edi, 0x4eaba4
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x4f
lea edi, [esp + 0x118]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x114]
lea ecx, [esp + 0x254]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x407522
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpA]
lea edx, [esp + 0x140]
push 0x4eabdc
push edx
call esi
test eax, eax
je 0x407504
lea eax, [esp + 0x140]
push 0x4eabd8
push eax
call esi
test eax, eax
je 0x407504
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x11]
mov byte [esp + 0x10], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
or ecx, 0xffffffff
mov edi, ebp
xor eax, eax
lea edx, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x10]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov edi, 0x4ea234
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 + 0x14]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x144]
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 eax, [esp + 0x14]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.00407330
add esp, 8
lea ecx, [esp + 0x114]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x40742e
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
push ebp
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
pop esi
jne 0x407579
mov ecx, dword [esp + 0x35c]
test ecx, ecx
je 0x407579
push 4
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
pop edi
pop ebp
pop ebx
add esp, 0x348
ret
push ebp
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x407579
mov ecx, dword [esp + 0x35c]
test ecx, ecx
je 0x407579
push 4
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
pop edi
pop ebp
pop ebx
add esp, 0x348
ret
xor eax, eax
pop edi
pop ebp
pop ebx
add esp, 0x348
ret