Function at 0x494ce0
Capabilities:
Check if file exists
Create directory
Delete file
Get file attributes
Set file attributes

Disassembly:
sub esp, 0x430
push ebx
push ebp
mov ebp, dword [esp + 0x43c]
push esi
test ebp, ebp
push edi
je 0x495078
mov esi, dword [esp + 0x448]
test esi, esi
je 0x495078
push 0x5c
push ebp
call fcn.0044d8e0
mov edx, eax
add esp, 8
test edx, edx
je 0x495078
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x31]
mov byte [esp + 0x30], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
inc edx
push edx
push esi
stosb byte es:[edi], al
push 0x643284
lea eax, [esp + 0x3c]
push 0x207
push eax
call fcn.0044db78
lea ecx, [esp + 0x44]
add esp, 0x14
xor ebx, ebx
mov esi, 0x57
test ecx, ecx
jne 0x494da1
push esi
mov dword [0x688760], esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
xor ecx, ecx
test eax, eax
je 0x494e10
mov al, byte [esp + 0x44c]
test al, 1
je 0x494de9
push 0xb7
mov dword [0x688760], 0xb7
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x430
ret
push 0
push 0
push 0
push 0
lea edx, [esp + 0x20]
push 0
lea eax, [esp + 0x44]
push edx
push eax
mov dword [esp + 0x2c], 0
call fcn.0049e420
mov eax, dword [esp + 0x2c]
lea ecx, [esp + 0x2c]
add esp, 0x1c
test ecx, ecx
je 0x494dd3
mov ebx, eax
cmp eax, 0xffffffff
je 0x494d68
test al, 0x10
je 0x494d68
mov eax, 1
test al, bl
je 0x494d6a
mov ecx, eax
jmp 0x494d74
test ecx, ecx
je 0x494e10
test al, 2
je 0x494e10
push 5
mov dword [0x688760], 5
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x430
ret
lea edx, [esp + 0x30]
test edx, edx
je 0x49507d
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x494e4f
test al, 0x10
jne 0x495000
lea ecx, [esp + 0x30]
push 0x80
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea edx, [esp + 0x30]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ebx, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea eax, [esp + 0x30]
push 0
push eax
call ebx
test eax, eax
jne 0x495000
mov ecx, 0x81
lea edi, [esp + 0x239]
mov byte [esp + 0x238], al
push 0x207
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x34]
lea edx, [esp + 0x23c]
push ecx
push edx
mov ebp, 1
stosb byte es:[edi], al
call fcn.0044d7e0
lea eax, [esp + 0x244]
push 0x5c
push eax
call fcn.0044d920
mov esi, eax
lea edi, [esp + 0x24c]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x14
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 2
jbe 0x494f00
cmp byte [esp + 0x238], 0x5c
jne 0x494f00
cmp byte [esp + 0x239], 0x5c
jne 0x494f00
lea ecx, [esp + 0x23a]
push 0x5c
push ecx
call fcn.0044d920
add esp, 8
test eax, eax
je 0x494f8e
inc eax
push 0x5c
push eax
call fcn.0044d920
add esp, 8
mov esi, eax
test esi, esi
je 0x494f8e
lea edx, [esp + 0x238]
mov byte [esi], 0
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ebx, eax
mov edi, ebx
and edi, 0x10
jne 0x494f50
test bl, 1
je 0x494f38
and al, 0xfe
lea ecx, [esp + 0x238]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea edx, [esp + 0x238]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ebp, eax
test ebp, ebp
je 0x494fd2
cmp ebx, 0xffffffff
je 0x494f59
test edi, edi
jne 0x494f6b
lea eax, [esp + 0x238]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov ebp, eax
test ebp, ebp
je 0x494fd2
mov byte [esi], 0x5c
inc esi
push 0x5c
push esi
call fcn.0044d920
mov esi, eax
add esp, 8
test esi, esi
jne 0x494f08
test ebp, ebp
je 0x494fd2
mov ebx, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea ecx, [esp + 0x30]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x494fc3
test al, 0x10
jne 0x494fce
test al, 1
je 0x494fb4
and al, 0xfe
push eax
lea eax, [esp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea ecx, [esp + 0x30]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x494fd2
lea edx, [esp + 0x30]
push 0
push edx
call ebx
mov ebp, eax
test ebp, ebp
jne 0x494ff9
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
mov dword [0x688760], eax
je 0x49508a
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x430
ret
mov ebp, dword [esp + 0x444]
mov ecx, 6
xor eax, eax
lea edi, [esp + 0x18]
lea edx, [esp + 0x14]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x44c]
mov edi, ebp
mov dword [esp + 0x18], eax
or ecx, 0xffffffff
xor eax, eax
push edx
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [esp + 0x34]
mov dword [esp + 0x28], ecx
lea ecx, [esp + 0x34]
mov dword [esp + 0x2c], ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
push 0x4950a0
dec ecx
push 0x10
push ebp
mov dword [esp + 0x24], 2
mov dword [esp + 0x2c], 1
mov dword [esp + 0x30], ebp
mov dword [esp + 0x3c], ecx
call fcn.00492e30
mov eax, dword [esp + 0x2c]
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x430
ret
mov esi, 0x57
push esi
mov dword [0x688760], esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x430
ret