Function at 0x40dd40
Capabilities:
Set file attributes

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x42df3b
push eax
mov dword fs:[0], esp
sub esp, 0x534
lea eax, [esp + 0x30]
push esi
push 0x104
push eax
call fcn.0040dfe0
add esp, 8
test eax, eax
je 0x40dfc6
mov ecx, dword [0x436cfc]
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 0x40df97
cmp dword [esp + 0x2c], esi
jne 0x40df97
cmp dword [esp + 0x30], 0x100000
ja 0x40df97
push ebp
push edi
lea ecx, [esp + 0x3c]
push 0x80
push ecx
call dword [sym.imp.KERNEL32.DLL_SetFileAttributesA]
lea edx, [esp + 0x3c]
push 0x437bb0
push edx
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebp, eax
add esp, 8
cmp ebp, esi
mov dword [esp + 0x14], ebp
je 0x40df5c
push ebp
lea eax, [esp + 0x144]
push 0x400
push eax
call dword [sym.imp.MSVCRT.dll_fgets]
add esp, 0xc
test eax, eax
je 0x40df1d
push ebx
mov ebx, dword [esp + 0x558]
xor esi, esi
test ebx, ebx
jle 0x40de42
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 0x40deb8
inc esi
add edi, 4
cmp esi, ebx
jl 0x40de25
lea eax, [esp + 0x144]
test eax, eax
je 0x40defd
lea ecx, [esp + 0x144]
push ecx
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
mov esi, eax
test esi, esi
je 0x40defd
mov eax, dword [esp + 0x10]
mov ecx, dword [eax - 0xc]
lea edi, [eax - 0xc]
cmp ecx, 1
jg 0x40dec6
mov ecx, dword [eax - 8]
mov edx, dword [eax - 4]
lea ebp, [ecx + esi]
cmp ebp, edx
jg 0x40dec2
lea edi, [esp + 0x144]
push esi
inc edx
push edi
add ecx, eax
push edx
push ecx
call fcn.00406c30
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 0x40defd
mov dword [esp + 0x14], 1
jmp 0x40defd
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.0040e0f0
test eax, eax
je 0x40defd
cmp edi, dword [0x436d00]
je 0x40defd
push edi
call dword [sym.imp.KERNEL32.DLL_InterlockedDecrement]
test eax, eax
jg 0x40defd
push edi
call fcn.0042d5f4
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 0x40de18
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 0x40df5c
lea ecx, [esp + 0x3c]
push 0x437bac
push ecx
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
je 0x40df5c
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 [0x436d00]
pop edi
pop ebp
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x40dfc6
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.DLL_InterlockedDecrement]
test eax, eax
jg 0x40dfc6
mov eax, dword [esp + 4]
add eax, 0xfffffff4
push eax
jmp 0x40dfbe
mov eax, dword [esp + 4]
mov edx, dword [0x436d00]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x40dfc6
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.DLL_InterlockedDecrement]
test eax, eax
jg 0x40dfc6
mov edx, dword [esp + 4]
add edx, 0xfffffff4
push edx
call fcn.0042d5f4
add esp, 4
mov ecx, dword [esp + 0x538]
pop esi
mov dword fs:[0], ecx
add esp, 0x540
ret