Function at 0x404b70
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 0x404d84
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x404d84
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x404d84
test bl, 1
je 0x404bbc
and ebx, 0xfffffffe
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test bl, 0x10
je 0x404d73
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, 0x4846b4
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 0x404d61
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpA]
lea edx, [esp + 0x140]
push 0x4846ec
push edx
call esi
test eax, eax
je 0x404d43
lea eax, [esp + 0x140]
push 0x4846e8
push eax
call esi
test eax, eax
je 0x404d43
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
rep movsb byte es:[edi], byte [esi]
mov edi, 0x484628
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 + 0x10]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x140]
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 + 0x10]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.00404b70
add esp, 4
lea ecx, [esp + 0x114]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x404c6e
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
push ebp
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
pop esi
pop edi
pop ebp
pop ebx
add esp, 0x348
ret
push ebp
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
pop edi
pop ebp
pop ebx
add esp, 0x348
ret
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0x348
ret