Function at 0x4079f0
Capabilities:
Set file attributes

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x415c4b
push eax
mov dword fs:[0], esp
sub esp, 0x534
lea eax, [esp + 0x30]
push esi
push 0x104
push eax
call fcn.00407c90
add esp, 8
test eax, eax
je 0x407c76
mov ecx, dword [0x41a030]
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 0x407c47
cmp dword [esp + 0x2c], esi
jne 0x407c47
cmp dword [esp + 0x30], 0x100000
ja 0x407c47
push ebp
push edi
lea ecx, [esp + 0x3c]
push 0x80
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea edx, [esp + 0x3c]
push 0x41a9a0
push edx
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebp, eax
add esp, 8
cmp ebp, esi
mov dword [esp + 0x14], ebp
je 0x407c0c
push ebp
lea eax, [esp + 0x144]
push 0x400
push eax
call dword [sym.imp.MSVCRT.dll_fgets]
add esp, 0xc
test eax, eax
je 0x407bcd
push ebx
mov ebx, dword [esp + 0x558]
xor esi, esi
test ebx, ebx
jle 0x407af2
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 0x407b68
inc esi
add edi, 4
cmp esi, ebx
jl 0x407ad5
lea eax, [esp + 0x144]
test eax, eax
je 0x407bad
lea ecx, [esp + 0x144]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
test esi, esi
je 0x407bad
mov eax, dword [esp + 0x10]
mov ecx, dword [eax - 0xc]
lea edi, [eax - 0xc]
cmp ecx, 1
jg 0x407b76
mov ecx, dword [eax - 8]
mov edx, dword [eax - 4]
lea ebp, [ecx + esi]
cmp ebp, edx
jg 0x407b72
lea edi, [esp + 0x144]
push esi
inc edx
push edi
add ecx, eax
push edx
push ecx
call fcn.00404100
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 0x407bad
mov dword [esp + 0x14], 1
jmp 0x407bad
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.00408a90
test eax, eax
je 0x407bad
cmp edi, dword [0x41a034]
je 0x407bad
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x407bad
push edi
call fcn.00414a60
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 0x407ac8
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 0x407c0c
lea ecx, [esp + 0x3c]
push 0x41a99c
push ecx
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
je 0x407c0c
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 [0x41a034]
pop edi
pop ebp
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x407c76
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x407c76
mov eax, dword [esp + 4]
add eax, 0xfffffff4
push eax
jmp 0x407c6e
mov eax, dword [esp + 4]
mov edx, dword [0x41a034]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x407c76
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x407c76
mov edx, dword [esp + 4]
add edx, 0xfffffff4
push edx
call fcn.00414a60
add esp, 4
mov ecx, dword [esp + 0x538]
pop esi
mov dword fs:[0], ecx
add esp, 0x540
ret