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

Disassembly:
sub esp, 0xc0
push ebx
mov eax, dword [esp + 0xc8]
push ebp
push esi
xor ebx, ebx
push edi
push ebx
push 0x80
push 3
push ebx
push 7
push SysReAllocStringLen
push eax
call fcn.00406340
mov esi, eax
cmp esi, 0xffffffff
mov dword [esp + 0x18], esi
je 0x406295
mov ecx, 0x28
xor eax, eax
lea edi, [esp + 0x30]
push ebx
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x14]
lea edx, [esp + 0x34]
push ecx
push 0xa0
push edx
push esi
mov dword [esp + 0x24], ebx
mov dword [esp + 0x34], ebx
call fcn.00406370
mov eax, dword [esp + 0xdc]
mov ecx, dword [esp + 0x30]
cmp eax, ecx
jne 0x40628f
mov ecx, dword [esp + 0xe0]
mov eax, dword [esp + 0x34]
cmp ecx, eax
jne 0x40628f
cmp dword [esp + 0x38], 0x62f73a57
jne 0x40628f
cmp word [esp + 0x7c], bx
jne 0x40628f
mov ax, word [esp + 0x7e]
mov dword [esp + 0x1c], ebx
cmp ax, 2
jne 0x40605b
mov dword [esp + 0x1c], 0x58
jmp 0x406094
cmp ax, 3
je 0x406067
cmp ax, 6
jne 0x406094
mov edx, dword [esp + 0xa4]
mov eax, dword [esp + 0xac]
lea ecx, [eax + edx + 0xa0]
mov eax, 1
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0xc8]
cmp ecx, eax
jne 0x406094
mov dword [esp + 0x20], eax
mov edi, dword [esp + 0xd8]
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push edi
call esi
cmp eax, 0xffffffff
je 0x4060b5
push 0x80
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push edi
call esi
push edi
mov dword [esp + 0x30], eax
call fcn.0040e530
mov esi, eax
lea edx, [esi + esi + 8]
push edx
call fcn.00422112
add esp, 8
mov ebp, eax
mov dword [esp + 0x28], ebp
push edi
push ebp
mov word [ebp + esi*2 + 6], bx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push 0x436fc4
push ebp
call fcn.0040e4e1
add esp, 8
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push ebp
call fcn.00406340
mov ebx, eax
cmp ebx, 0xffffffff
je 0x406278
push 0x100000
call fcn.00422112
mov esi, dword [esp + 0x1c]
add esp, 4
mov edi, eax
mov eax, dword [esp + 0x1c]
push 0
push 0
push eax
push esi
mov dword [esp + 0x34], 0
call 0x4062e0
lea ecx, [esp + 0x10]
push 0
push ecx
push 0x100000
push edi
push esi
call fcn.00406370
test eax, eax
je 0x40620c
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x4061a8
mov ax, word [esp + 0x7e]
cmp ax, 2
je 0x406186
cmp ax, 3
je 0x406186
cmp ax, 6
jne 0x4061a8
mov edx, dword [esp + 0x10]
push edx
push edi
call fcn.00405eb0
add esp, 8
jmp 0x4061a8
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x17]
lea ecx, [esp + 0x16]
push eax
push ecx
push edx
push edi
mov byte [esp + 0x26], 0
mov byte [esp + 0x27], 0
call fcn.00405e40
add esp, 0x10
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4061b8
mov dword [esp + 0x24], 1
mov esi, dword [esp + 0x10]
test esi, esi
mov ebp, esi
jbe 0x4061dd
mov ecx, edi
lea eax, [esp + 0x10]
sub ecx, esi
push 0
push eax
add ecx, ebp
push esi
push ecx
push ebx
call 0x4063a0
sub esi, dword [esp + 0x10]
jne 0x4061c2
cmp ebp, 0x100000
jb 0x406204
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x10]
push 0
push edx
push 0x100000
push edi
push eax
call fcn.00406370
test eax, eax
jne 0x406157
mov ebp, dword [esp + 0x28]
mov esi, dword [esp + 0x18]
push edi
call fcn.0042213b
add esp, 4
push esi
call fcn.00406310
push ebx
call fcn.00406310
mov esi, dword [esp + 0x2c]
cmp esi, 0xffffffff
je 0x40623f
mov edi, dword [esp + 0xd8]
push 0x80
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
jmp 0x406246
mov edi, dword [esp + 0xd8]
push 3
push 0
push 0
push edi
push ebp
call 0x4062b0
cmp esi, 0xffffffff
mov ebx, eax
je 0x406262
push esi
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push ebp
call fcn.0042213b
add esp, 4
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc0
ret
mov ecx, dword [esp + 0x18]
push ecx
call fcn.00406310
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc0
ret
push esi
call fcn.00406310
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc0
ret