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

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x41437b
push eax
mov dword fs:[0], esp
sub esp, 0x514
lea eax, [esp + 0x10]
push 0x104
push eax
call fcn.00407ab0
add esp, 8
test eax, eax
je 0x407a8c
mov ecx, dword [0x419030]
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 0x4199c0
push ecx
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebp, eax
add esp, 8
cmp ebp, esi
mov dword [esp + 0x14], ebp
je 0x407a4a
push ebp
lea edx, [esp + 0x124]
push 0x400
push edx
call dword [sym.imp.MSVCRT.dll_fgets]
add esp, 0xc
test eax, eax
je 0x407a0b
push ebx
mov ebx, dword [esp + 0x538]
xor esi, esi
test ebx, ebx
jle 0x407930
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 0x4079a6
inc esi
add edi, 4
cmp esi, ebx
jl 0x407913
lea edx, [esp + 0x124]
test edx, edx
je 0x4079eb
lea eax, [esp + 0x124]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
test esi, esi
je 0x4079eb
mov eax, dword [esp + 0x10]
mov ecx, dword [eax - 0xc]
lea edi, [eax - 0xc]
cmp ecx, 1
jg 0x4079b4
mov ecx, dword [eax - 8]
mov edx, dword [eax - 4]
lea ebp, [ecx + esi]
cmp ebp, edx
jg 0x4079b0
lea edi, [esp + 0x124]
push esi
inc edx
push edi
add ecx, eax
push edx
push ecx
call fcn.00403ff0
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 0x4079eb
mov dword [esp + 0x14], 1
jmp 0x4079eb
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.004087c0
test eax, eax
je 0x4079eb
cmp edi, dword [0x419034]
je 0x4079eb
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x4079eb
push edi
call fcn.00413190
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 0x407906
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 0x407a4a
lea edx, [esp + 0x1c]
push 0x4199bc
push edx
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
je 0x407a4a
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 [0x419034]
pop edi
pop esi
lea ecx, [eax - 0xc]
pop ebp
cmp ecx, edx
je 0x407a8c
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x407a8c
mov edx, dword [esp]
add edx, 0xfffffff4
push edx
call fcn.00413190
add esp, 4
mov ecx, dword [esp + 0x514]
mov dword fs:[0], ecx
add esp, 0x520
ret