Function at 0x4045b0
Capabilities:
Get file attributes
Set file attributes

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x40c00b
push eax
mov dword fs:[0], esp
sub esp, 0x514
lea eax, [esp + 0x10]
push 0x104
push eax
call fcn.00404810
add esp, 8
test eax, eax
je 0x4047ec
mov ecx, dword [str.4A_A]
push ebp
push esi
xor esi, esi
push edi
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], ecx
lea edx, [esp + 0x1c]
mov dword [esp + 0x528], esi
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [esp + 0x18], eax
lea eax, [esp + 0x1c]
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea ecx, [esp + 0x1c]
push 0x4103a8
push ecx
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebp, eax
add esp, 8
cmp ebp, esi
mov dword [esp + 0x14], ebp
je 0x4047aa
push ebp
lea edx, [esp + 0x124]
push 0x400
push edx
call dword [sym.imp.MSVCRT.dll_fgets]
add esp, 0xc
test eax, eax
je 0x40476b
push ebx
mov ebx, dword [esp + 0x538]
xor esi, esi
test ebx, ebx
jle 0x404690
mov edi, dword [esp + 0x534]
mov eax, dword [edi]
lea ecx, [esp + 0x124]
push eax
push ecx
call dword [sym.imp.SHLWAPI.dll_StrStrIA]
test eax, eax
jne 0x404706
inc esi
add edi, 4
cmp esi, ebx
jl 0x404673
lea edx, [esp + 0x124]
test edx, edx
je 0x40474b
lea eax, [esp + 0x124]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
test esi, esi
je 0x40474b
mov eax, dword [esp + 0x10]
mov ecx, dword [eax - 0xc]
lea edi, [eax - 0xc]
cmp ecx, 1
jg 0x404714
mov ecx, dword [eax - 8]
mov edx, dword [eax - 4]
lea ebp, [ecx + esi]
cmp ebp, edx
jg 0x404710
lea edi, [esp + 0x124]
push esi
inc edx
push edi
add ecx, eax
push edx
push ecx
call fcn.00402960
mov eax, dword [esp + 0x20]
add esp, 0x10
mov ebp, dword [esp + 0x18]
mov ecx, dword [eax - 8]
add ecx, esi
mov dword [eax - 8], ecx
mov eax, dword [esp + 0x10]
mov ecx, dword [eax - 8]
mov byte [ecx + eax], 0
jmp 0x40474b
mov dword [esp + 0x14], 1
jmp 0x40474b
mov ebp, dword [esp + 0x18]
lea edx, [esp + 0x124]
lea ecx, [esp + 0x10]
push edx
push esi
push eax
mov eax, dword [eax - 8]
push eax
call fcn.00404b60
test eax, eax
je 0x40474b
cmp edi, dword [0x410024]
je 0x40474b
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40474b
push edi
call fcn.0040a920
add esp, 4
push ebp
lea ecx, [esp + 0x128]
push 0x400
push ecx
call dword [sym.imp.MSVCRT.dll_fgets]
add esp, 0xc
test eax, eax
jne 0x404666
pop ebx
mov edi, dword [sym.imp.MSVCRT.dll_fclose]
push ebp
call edi
mov eax, dword [esp + 0x14]
add esp, 4
test eax, eax
je 0x4047aa
lea edx, [esp + 0x1c]
push 0x4103a4
push edx
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
je 0x4047aa
mov eax, dword [esp + 0xc]
push esi
push eax
call dword [sym.imp.MSVCRT.dll_fputs]
push esi
call edi
add esp, 0xc
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x1c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov eax, dword [esp + 0xc]
mov edx, dword [0x410024]
pop edi
pop esi
lea ecx, [eax - 0xc]
pop ebp
cmp ecx, edx
je 0x4047ec
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x4047ec
mov edx, dword [esp]
add edx, 0xfffffff4
push edx
call fcn.0040a920
add esp, 4
mov ecx, dword [esp + 0x514]
mov dword fs:[0], ecx
add esp, 0x520
ret