Function at 0x481a13
Capabilities:
Check if file exists
Set file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4c5130
mov eax, dword fs:[0]
push eax
sub esp, 0xc0
mov eax, dword [0x4f06b4]
xor eax, esp
mov dword [esp + 0xb8], eax
push ebx
push esi
push edi
mov eax, dword [0x4f06b4]
xor eax, esp
push eax
lea eax, [esp + 0xd0]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x2c], eax
mov esi, edx
xor edi, edi
xor eax, eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x28], esi
mov dword [esp + 0x60], 7
mov dword [esp + 0x5c], edi
mov word [esp + 0x4c], ax
lea edx, [esp + 0x4c]
mov dword [esp + 0xd8], edi
mov eax, dword [ecx]
push edx
call dword [eax + 0x204]
cmp dword [esp + 0x60], 8
mov eax, dword [esp + 0x4c]
jae 0x481a9c
lea eax, [esp + 0x4c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x481ade
mov bl, 1
push 1
xor edi, edi
lea esi, [esp + 0x50]
call fcn.0040a3ed
mov al, bl
mov ecx, dword [esp + 0xd0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xb8]
xor ecx, esp
call fcn.004a545d
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [esi]
mov eax, dword [esi + 4]
sub eax, ecx
push 0x5e
cdq
pop esi
idiv esi
mov byte [esp + 0x13], 1
mov dword [esp + 0x24], edi
test eax, eax
je 0x481ed0
mov dword [esp + 0x20], edi
mov esi, dword [esp + 0x20]
add esi, ecx
xor eax, eax
mov dword [esp + 0x18], esi
mov dword [esp + 0x44], 7
mov dword [esp + 0x40], edi
mov word [esp + 0x30], ax
mov byte [esp + 0xd8], 1
cmp dword [esi + 0x30], edi
je 0x481b8a
lea eax, [esp + 0xac]
push 0x4cb648
push eax
lea edi, [esp + 0x54]
call fcn.00408817
add esi, 0x20
lea ecx, [esp + 0x98]
push esi
push ecx
mov ecx, eax
mov byte [esp + 0xe8], 2
call fcn.00408ce7
add esp, 0x10
mov ebx, eax
lea eax, [esp + 0x30]
mov byte [esp + 0xd8], 3
call fcn.00409d73
push 1
xor edi, edi
lea esi, [esp + 0x94]
call fcn.0040a3ed
lea esi, [esp + 0xac]
jmp 0x481c08
lea eax, [esp + 0x68]
lea ecx, [esi + 4]
push eax
call fcn.00479f66
mov esi, eax
mov byte [esp + 0xdc], 4
lea eax, [esp + 0x94]
mov dword [esp], 0x4cb648
push eax
lea edi, [esp + 0x54]
call fcn.00408817
pop ecx
pop ecx
mov ecx, eax
mov eax, esi
lea edi, [esp + 0xac]
mov byte [esp + 0xd8], 5
call fcn.00408875
mov ebx, eax
lea eax, [esp + 0x30]
mov byte [esp + 0xd8], 6
call fcn.00409d73
push 1
xor edi, edi
lea esi, [esp + 0xb0]
call fcn.0040a3ed
push 1
lea esi, [esp + 0x94]
call fcn.0040a3ed
lea esi, [esp + 0x68]
push 1
xor edi, edi
mov byte [esp + 0xdc], 1
call fcn.0040a3ed
mov eax, dword [esp + 0x30]
push 8
pop edi
cmp dword [esp + 0x44], edi
jae 0x481c2a
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x481db8
mov eax, dword [esp + 0x18]
mov eax, dword [eax]
cmp eax, 1
je 0x481c5c
jbe 0x481dad
cmp eax, 3
jbe 0x481df6
cmp eax, 5
ja 0x481dad
mov eax, dword [esp + 0x30]
cmp dword [esp + 0x44], edi
jae 0x481c6a
lea eax, [esp + 0x30]
mov esi, 0x80
push esi
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov ecx, dword [esp + 0x30]
cmp dword [esp + 0x44], edi
jae 0x481c85
lea ecx, [esp + 0x30]
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileW]
xor eax, eax
push eax
push esi
push 4
push eax
push eax
mov edi, 0x40000000
push edi
push ecx
call ebx
mov dword [esp + 0x18], eax
cmp eax, 0xffffffff
jne 0x481da3
mov ecx, dword [esp + 0x1c]
push dword [esp + 0x2c]
mov eax, dword [ecx]
call dword [eax + 0x240]
test al, al
je 0x481e73
and dword [esp + 0x14], 0
cmp dword [esp + 0x44], 8
mov eax, dword [esp + 0x30]
jae 0x481cd5
lea eax, [esp + 0x30]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
cmp dword [esp + 0x44], 8
mov ecx, dword [esp + 0x30]
jae 0x481cec
lea ecx, [esp + 0x30]
xor eax, eax
push eax
push esi
push 4
push eax
push eax
push edi
push ecx
call ebx
mov dword [esp + 0x18], eax
cmp eax, 0xffffffff
jne 0x481da3
cmp dword [esp + 0x44], 8
mov eax, dword [esp + 0x30]
jae 0x481d14
lea eax, [esp + 0x30]
push dword [esp + 0x14]
mov ecx, dword [0x4f5464]
push eax
push str.Check_File_Writeable_CheckFileWriteable_:__s__d_
push 0
call fcn.0047b68e
add esp, 0x10
push 0x12c
call dword [sym.imp.KERNEL32.dll_Sleep]
inc dword [esp + 0x14]
cmp dword [esp + 0x14], 0x1e
jl 0x481cc6
mov edi, dword [esp + 0x1c]
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x1c4]
mov byte [esp + 0x13], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
sub esp, 0x1c
lea eax, [esp + 0x50]
mov esi, esp
mov dword [esp + 0x34], esp
push eax
call fcn.00409de0
lea ebx, [esp + 0x88]
call fcn.00488fd4
mov ecx, ebx
push ecx
mov byte [esp + 0xdc], 8
mov eax, dword [edi]
push 3
mov ecx, edi
call dword [eax + 0x24c]
mov ecx, ebx
mov byte [esp + 0xd8], 1
call fcn.0048904a
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [esp + 0x13], 0
je 0x481ec3
push 1
xor edi, edi
lea esi, [esp + 0x34]
mov byte [esp + 0xdc], 0
call fcn.0040a3ed
mov eax, dword [esp + 0x28]
mov ecx, dword [eax]
mov eax, dword [eax + 4]
sub eax, ecx
push 0x5e
cdq
pop esi
idiv esi
inc dword [esp + 0x24]
add dword [esp + 0x20], 0x5e
cmp dword [esp + 0x24], eax
jae 0x481ed0
jmp 0x481b00
mov eax, dword [esp + 0x30]
cmp dword [esp + 0x44], edi
jae 0x481e04
lea eax, [esp + 0x30]
push eax
call fcn.00479c22
pop ecx
test al, al
je 0x481dad
mov edi, dword [esp + 0x1c]
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x1c4]
push 0xff
push 0
sub esp, 0x1c
lea eax, [esp + 0x54]
mov esi, esp
mov dword [esp + 0x3c], esp
push eax
mov byte [esp + 0x3b], 0
call fcn.00409de0
lea ebx, [esp + 0x8c]
call fcn.004899c5
mov ecx, ebx
push ecx
mov byte [esp + 0xdc], 9
mov eax, dword [edi]
push 3
mov ecx, edi
call dword [eax + 0x24c]
mov ecx, ebx
mov byte [esp + 0xd8], 1
call fcn.00489a41
jmp 0x481dad
mov esi, dword [esp + 0x1c]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x1c4]
sub esp, 0x1c
mov eax, esp
mov dword [esp + 0x44], esp
push str.unknown
mov byte [esp + 0x33], 0
call fcn.00409d45
lea ebx, [esp + 0x84]
call fcn.00489de4
mov ecx, ebx
push ecx
mov byte [esp + 0xdc], 7
mov eax, dword [esi]
push 3
mov ecx, esi
call dword [eax + 0x24c]
mov ecx, ebx
call fcn.00489e54
push 1
xor edi, edi
lea esi, [esp + 0x34]
call fcn.0040a3ed
mov bl, byte [esp + 0x13]
jmp 0x481aa9