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

Disassembly:
sub esp, 0x24
mov eax, dword [0x41f0bc]
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0xffffffff
mov byte [eax], 0
mov ebx, 0x7f7f
mov eax, dword [0x41f0d8]
mov ecx, dword [0x41f100]
inc eax
cmp eax, ecx
mov dword [0x41f0d8], eax
jae 0x40a174
mov ebp, dword [0x41f0d4]
push ebp
call fcn.00403b10
mov dword [0x41f0d4], eax
xor eax, eax
mov ax, word [ebp + 4]
push ebp
mov dword [esp + 0x20], eax
mov word [ebp + 4], 0
call fcn.00409260
mov ecx, dword [0x41f0c0]
mov dword [esp + 0x28], eax
add esp, 8
cmp byte [ecx], 0
je 0x409a94
test byte [esp + 0x18], 2
je 0x409b8b
mov edx, dword [0x41f0b8]
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x409af7
mov ecx, dword [0x41f0c0]
mov edx, dword [0x41f0b4]
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x409b0d
mov ecx, dword [0x41f0b4]
push 0x5c
push ecx
call fcn.00413140
add esp, 8
test eax, eax
je 0x409b30
mov byte [eax + 1], 0
mov edx, dword [0x41f248]
test byte [edx], 0x10
je 0x409b8b
mov eax, dword [0x41f0c0]
push 0
push eax
call fcn.00401140
mov esi, eax
add esp, 8
cmp esi, 0xffffffff
je 0x409b82
push 0xfffffffffffffff8
push esi
call fcn.004012a0
lea ecx, [esp + 0x34]
push 8
push ecx
push esi
call fcn.004011c0
push esi
call fcn.004013c0
add esp, 0x18
cmp word [esp + 0x2c], bx
jne 0x409b82
test byte [esp + 0x2e], 2
jne 0x409a94
mov edx, dword [0x41f0b8]
mov byte [edx], 0x30
mov eax, dword [0x41f0d8]
xor edx, edx
lea eax, [eax + eax*4 + 5]
lea eax, [eax + eax*4]
shl eax, 2
div dword [0x41f100]
mov dword [esp + 0x28], eax
mov eax, dword [ebp + 8]
test ah, 1
jne 0x40a145
test dword [0x41f2e0], eax
je 0x40a145
test ah, 2
jne 0x409d45
test al, 0x40
mov edi, 1
je 0x409be2
mov eax, dword [0x41f0c0]
push eax
call fcn.00401100
add esp, 4
test eax, eax
jne 0x409c41
mov eax, dword [esp + 0x20]
test eax, eax
je 0x409c43
mov ecx, dword [0x41f0c0]
push 0
push ecx
mov dword [esp + 0x24], 0
call fcn.00401140
mov esi, eax
add esp, 8
cmp esi, 0xffffffff
je 0x409c36
push esi
call fcn.004012c0
mov ecx, dword [ebp + 0x18]
add esp, 4
cmp eax, ecx
jne 0x409c2d
lea edx, [esp + 0x24]
lea eax, [esp + 0x1c]
push edx
push eax
push esi
call fcn.00405500
add esp, 0xc
push esi
call fcn.004013c0
add esp, 4
mov ecx, dword [esp + 0x1c]
mov eax, dword [ebp + 0x14]
cmp ecx, eax
jne 0x409c43
xor edi, edi
test edi, edi
mov dword [0x41f354], 0
je 0x409d59
mov eax, dword [0x41f24c]
test eax, eax
je 0x409a94
push 2
push 5
call fcn.00403a00
add esp, 8
test eax, eax
je 0x409c85
cmp byte [eax], 0
je 0x409c85
mov eax, dword [0x41f0c0]
push eax
call fcn.00401f80
add esp, 4
mov ecx, dword [0x41f0c0]
push ecx
call fcn.004023b0
mov ecx, dword [0x41f0c0]
mov edx, dword [0x41f0bc]
add esp, 4
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x409ca0
mov edx, dword [0x41f0bc]
push str..__A
push edx
call fcn.004020a0
mov eax, dword [0x41f0bc]
push 0
push eax
call fcn.00401140
add esp, 0x10
cmp eax, 0xffffffff
je 0x409d10
push eax
call fcn.004013c0
mov esi, dword [0x41f0bc]
or ecx, 0xffffffff
mov edi, esi
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, esi
push eax
mov dl, byte [ecx + esi - 1]
or ecx, 0xffffffff
inc dl
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [ecx + esi - 1], dl
mov eax, dword [0x41f0bc]
push eax
call fcn.00401140
add esp, 0xc
cmp eax, 0xffffffff
jne 0x409cd0
mov ecx, dword [0x41f0bc]
push ecx
call fcn.00401190
mov ebx, eax
add esp, 4
cmp ebx, 0xffffffff
mov dword [esp + 0x10], ebx
jne 0x409d68
mov edx, dword [0x41f0bc]
mov dword [0x41f354], 0x11
push edx
call fcn.00407050
jmp 0x40a15b
mov edx, dword [0x41f0c0]
push edx
call fcn.004023b0
add esp, 4
jmp 0x40a145
mov ebx, dword [esp + 0x10]
mov word [ebp + 4], 0x1f5
jmp 0x40a087
test byte [esp + 0x18], 2
je 0x409e6a
mov ecx, dword [0x41f254]
test ecx, ecx
je 0x409f40
mov eax, dword [0x41f250]
test eax, eax
je 0x409f40
push eax
push ecx
push ebx
call fcn.00401200
add esp, 0xc
mov dword [0x41f354], eax
test eax, eax
jne 0x40a15e
mov eax, dword [ebp + 0x1c]
push eax
call fcn.00407260
add esp, 4
mov dword [0x41f354], eax
test eax, eax
jne 0x40a15e
mov ecx, dword [0x41a2e8]
lea edx, [ecx - 0x738580]
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
not ecx
add ecx, 0xfffffffe
cmp ecx, 0x14
jl 0x409de2
cmp byte [ecx + edx], 0x9a
je 0x409df5
mov edx, dword [0x41f324]
push 0
push 0x64
push 0xb
push edx
call dword [sym.imp.USER32.dll_SetTimer]
mov eax, dword [ebp + 0x20]
mov ecx, dword [0x41a2bc]
push 0
push 0
push eax
push ecx
push ebx
call fcn.00403500
mov esi, eax
mov eax, dword [0x41f2d0]
add esp, 0x14
test esi, esi
je 0x409e4c
cmp eax, 2
je 0x40a15e
push 0
push ebp
call fcn.00403e30
add esp, 8
push eax
push 0
push ebp
call fcn.00403e30
add esp, 8
push eax
push esi
call fcn.00407400
add esp, 0xc
mov dword [0x41f354], eax
jmp 0x40a15e
cmp eax, 2
je 0x40a15e
push ebx
call fcn.004013c0
add esp, 4
or ebx, 0xffffffff
mov dword [esp + 0x10], ebx
jmp 0x409f40
mov edx, dword [ebp + 0x1c]
push edx
call fcn.00407260
add esp, 4
mov dword [0x41f354], eax
test eax, eax
jne 0x40a15e
mov eax, dword [0x41a2bc]
lea ecx, [esp + 0x24]
push ecx
mov ecx, dword [ebp + 0x20]
lea edx, [esp + 0x20]
push edx
push ecx
push eax
push ebx
call fcn.00403500
mov esi, eax
mov eax, dword [0x41f2d0]
add esp, 0x14
test esi, esi
je 0x409edf
cmp eax, 2
je 0x40a15e
push 0
push ebp
call fcn.00403e30
add esp, 8
push eax
push 0
push ebp
call fcn.00403e30
add esp, 8
push eax
push esi
call fcn.00407400
add esp, 0xc
mov dword [0x41f354], eax
jmp 0x40a15e
cmp eax, 2
je 0x40a15e
mov eax, dword [ebp + 8]
test al, 8
je 0x409f09
test al, 6
lea eax, [ebp + 0x3c]
jne 0x409ef9
lea eax, [ebp + 0x28]
lea edx, [eax + 0x10]
lea ecx, [eax + 8]
push edx
push ecx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push ebx
call fcn.004013c0
mov edx, dword [esp + 0x20]
mov eax, dword [ebp + 0x18]
add esp, 4
or ebx, 0xffffffff
cmp edx, eax
mov dword [esp + 0x10], ebx
jne 0x409f2f
mov eax, dword [esp + 0x24]
mov ecx, dword [ebp + 0x14]
cmp eax, ecx
je 0x409f40
call fcn.00409940
test eax, eax
je 0x40a174
mov ebx, dword [esp + 0x10]
cmp dword [ebp + 0x10], 3
jne 0x409f7e
mov ecx, dword [0x41f0c0]
push 0
push ecx
call fcn.00401140
add esp, 8
cmp eax, 0xffffffff
je 0x409f7e
push eax
call fcn.004013c0
mov edx, dword [0x41f0c0]
push edx
call fcn.00402b70
mov eax, dword [0x41f0c0]
push eax
call fcn.004013d0
add esp, 0xc
jmp 0x409f82
mov eax, dword [esp + 0x20]
cmp dword [ebp + 0x10], 2
je 0x40a053
mov ecx, dword [ebp + 8]
test ch, 0x10
jne 0x40a053
test eax, eax
je 0x409fd0
mov ecx, dword [0x41f0bc]
mov edx, dword [0x41f0c0]
push ecx
push edx
call fcn.0040b500
add esp, 8
test eax, eax
je 0x409fc8
mov dword [0x41f34c], 1
mov word [ebp + 4], 0x1f4
jmp 0x409fdf
mov word [ebp + 4], 0x1b
jmp 0x409fdf
mov eax, dword [0x41f0bc]
push eax
push ebp
call fcn.00409530
add esp, 8
mov cx, word [ebp + 4]
cmp cx, 0x1b
jne 0x40a004
mov ecx, dword [0x41f0c0]
mov dword [0x41f354], 0x16
push ecx
call fcn.00407050
jmp 0x40a15b
mov eax, dword [ebp + 0xc]
mov edi, 0x80
test ah, 0x10
je 0x40a016
mov edi, 0x81
test ah, 8
je 0x40a01e
or edi, 2
cmp edi, 0x80
je 0x40a087
mov esi, dword [0x41f0c0]
cmp cx, 0x1f4
jne 0x40a039
mov esi, dword [0x41f0bc]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40a087
and al, 0xfc
or eax, edi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
jmp 0x40a087
mov edi, dword [0x41f0bc]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
inc ecx
push ecx
call fcn.00413290
mov dword [ebp + 0x24], eax
mov ecx, dword [0x41f0bc]
add esp, 4
mov edx, eax
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x40a077
mov word [ebp + 4], 0x1f6
mov eax, dword [0x41f354]
test eax, eax
jne 0x40a15e
mov edx, dword [0x41f0bc]
mov al, byte [esp + 0x18]
test al, 2
mov byte [edx], 0
je 0x40a0ab
mov word [ebp + 4], 0
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x40a0db
mov eax, dword [ebp + 8]
test ah, 4
je 0x40a0db
mov ax, word [ebp + 4]
cmp ax, 0x17
je 0x40a0d6
cmp ax, 0x19
je 0x40a0d6
cmp ax, 0x1f5
je 0x40a0d6
cmp ax, 0x1f4
jne 0x40a0db
call fcn.004099c0
cmp dword [ebp + 0x10], 3
jne 0x40a0ff
mov ax, word [ebp + 4]
cmp ax, 0x17
je 0x40a0f1
cmp ax, 0x19
jne 0x40a0ff
mov eax, dword [0x41f0c0]
push eax
call fcn.00402860
add esp, 4
mov eax, dword [ebp + 8]
test ah, 0x10
je 0x40a137
mov eax, dword [0x41f284]
test eax, eax
je 0x40a118
cmp word [ebp + 4], 0x1f5
je 0x40a12e
mov ax, word [ebp + 4]
cmp ax, 0x17
je 0x40a12e
cmp ax, 0x19
je 0x40a12e
cmp ax, 0x1f4
jne 0x40a137
push ebp
call fcn.00408640
add esp, 4
mov eax, dword [ebp + 8]
test ah, 8
je 0x40a145
mov dword [0x41f0e8], ebp
mov ecx, dword [esp + 0x28]
push ecx
call fcn.00401f00
mov ebx, dword [esp + 0x14]
mov dword [esp + 0x18], 1
add esp, 4
cmp ebx, 0xffffffff
je 0x40a16c
push ebx
call fcn.004013c0
add esp, 4
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x40a187
mov eax, dword [0x41f0bc]
cmp byte [eax], 0
je 0x40a187
push eax
call fcn.00413d41
add esp, 4
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret