Function at 0x40f3b0
Capabilities:
Set file attributes

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x44039b
push eax
mov dword fs:[0], esp
sub esp, 0x534
lea eax, [esp + 0x30]
push esi
push 0x104
push eax
call fcn.0040f650
add esp, 8
test eax, eax
je 0x40f636
mov ecx, dword [0x449b4c]
xor esi, esi
mov dword [esp + 8], esi
mov dword [esp + 4], ecx
lea edx, [esp + 0x10]
lea eax, [esp + 0x34]
push edx
push esi
push eax
mov dword [esp + 0x54c], esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExA]
test eax, eax
je 0x40f607
cmp dword [esp + 0x2c], esi
jne 0x40f607
cmp dword [esp + 0x30], 0x100000
ja 0x40f607
push ebp
push edi
lea ecx, [esp + 0x3c]
push 0x80
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea edx, [esp + 0x3c]
push 0x44aa80
push edx
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebp, eax
add esp, 8
cmp ebp, esi
mov dword [esp + 0x14], ebp
je 0x40f5cc
push ebp
lea eax, [esp + 0x144]
push 0x400
push eax
call dword [sym.imp.MSVCRT.dll_fgets]
add esp, 0xc
test eax, eax
je 0x40f58d
push ebx
mov ebx, dword [esp + 0x558]
xor esi, esi
test ebx, ebx
jle 0x40f4b2
mov edi, dword [esp + 0x554]
mov ecx, dword [edi]
lea edx, [esp + 0x144]
push ecx
push edx
call dword [sym.imp.SHLWAPI.dll_StrStrIA]
test eax, eax
jne 0x40f528
inc esi
add edi, 4
cmp esi, ebx
jl 0x40f495
lea eax, [esp + 0x144]
test eax, eax
je 0x40f56d
lea ecx, [esp + 0x144]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
test esi, esi
je 0x40f56d
mov eax, dword [esp + 0x10]
mov ecx, dword [eax - 0xc]
lea edi, [eax - 0xc]
cmp ecx, 1
jg 0x40f536
mov ecx, dword [eax - 8]
mov edx, dword [eax - 4]
lea ebp, [ecx + esi]
cmp ebp, edx
jg 0x40f532
lea edi, [esp + 0x144]
push esi
inc edx
push edi
add ecx, eax
push edx
push ecx
call fcn.00406910
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 edx, dword [eax - 8]
mov byte [edx + eax], 0
jmp 0x40f56d
mov dword [esp + 0x14], 1
jmp 0x40f56d
mov ebp, dword [esp + 0x18]
mov edx, dword [eax - 8]
lea ecx, [esp + 0x144]
push ecx
push esi
push eax
push edx
lea ecx, [esp + 0x20]
call fcn.0040f760
test eax, eax
je 0x40f56d
cmp edi, dword [0x449b50]
je 0x40f56d
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40f56d
push edi
call fcn.0043fa08
add esp, 4
push ebp
lea eax, [esp + 0x148]
push 0x400
push eax
call dword [sym.imp.MSVCRT.dll_fgets]
add esp, 0xc
test eax, eax
jne 0x40f488
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 0x40f5cc
lea ecx, [esp + 0x3c]
push 0x44aa7c
push ecx
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
je 0x40f5cc
mov edx, dword [esp + 0xc]
push esi
push edx
call dword [sym.imp.MSVCRT.dll_fputs]
push esi
call edi
add esp, 0xc
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x3c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov eax, dword [esp + 0xc]
mov ecx, dword [0x449b50]
pop edi
pop ebp
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x40f636
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40f636
mov eax, dword [esp + 4]
add eax, 0xfffffff4
push eax
jmp 0x40f62e
mov eax, dword [esp + 4]
mov edx, dword [0x449b50]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x40f636
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40f636
mov edx, dword [esp + 4]
add edx, 0xfffffff4
push edx
call fcn.0043fa08
add esp, 4
mov ecx, dword [esp + 0x538]
pop esi
mov dword fs:[0], ecx
add esp, 0x540
ret