Function at 0x41ed20
Capabilities:
Get file attributes
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x19018
call fcn.004261b0
mov eax, dword [0x436024]
xor eax, esp
mov dword [esp + 0x19014], eax
cmp byte [edi + 0x23f], 0
push ebx
push esi
jne 0x41ef53
push 0
push 0x80
push 4
push 0
push 1
push 0x40000000
lea ebx, [edi + 0x24]
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x41ee18
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 1
je 0x41edaa
and eax, 0xfffffffe
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 0
push 0x80
push 4
push 0
push 1
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x41ee18
mov dword [esp + 0xc], 0
push 0x1e
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
push 0x80
push 4
push 0
push 1
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x41edea
mov eax, dword [esp + 0xc]
add eax, 1
cmp eax, 3
mov dword [esp + 0xc], eax
jb 0x41edb2
cmp dword [esp + 0xc], 3
jne 0x41ee13
cmp esi, 0xffffffff
je 0x41edfd
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop esi
pop ebx
mov ecx, dword [esp + 0x19014]
xor ecx, esp
call fcn.0042575e
mov esp, ebp
pop ebp
ret
cmp esi, 0xffffffff
je 0x41ee25
push 2
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0x18fff
xor ebx, ebx
lea eax, [esp + 0x1d]
push ebx
push eax
mov byte [esp + 0x24], 0
call fcn.00425b9e
add esp, 0xc
mov dword [esp + 0xc], ebx
mov dword [esp + 0x14], ebx
jmp 0x41ee50
mov ecx, dword [edi + 0x244]
test ecx, ecx
je 0x41ef27
mov eax, dword [edi + 0x248]
sub eax, ecx
sar eax, 2
cmp ebx, eax
jae 0x41ef27
test ecx, ecx
je 0x41ee84
mov eax, dword [edi + 0x248]
sub eax, ecx
sar eax, 2
cmp ebx, eax
jb 0x41ee8a
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov ecx, dword [edi + 0x244]
mov ebx, dword [ecx + ebx*4]
mov edx, dword [ebx]
mov ecx, dword [esp + 0xc]
add edx, ecx
cmp edx, 0x19000
jbe 0x41eed0
cmp esi, 0xffffffff
mov dword [esp + 0xc], 0
je 0x41eec4
push 0
lea eax, [esp + 0x10]
push eax
push ecx
lea ecx, [esp + 0x24]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [esp + 0xc], 0
mov ecx, dword [esp + 0xc]
mov eax, dword [ebx]
cmp eax, 0x19000
jbe 0x41ef04
cmp esi, 0xffffffff
mov dword [esp + 0x10], 0
je 0x41ef19
push 0
lea edx, [esp + 0x14]
push edx
push eax
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
add dword [esp + 0x14], 1
mov ebx, dword [esp + 0x14]
jmp 0x41ee50
push eax
lea eax, [esp + ecx + 0x1c]
push ebx
push eax
call sub.MSVCR80.dll_memcpy
mov ecx, dword [ebx]
add esp, 0xc
add dword [esp + 0xc], ecx
add dword [esp + 0x14], 1
mov ebx, dword [esp + 0x14]
jmp 0x41ee50
cmp esi, 0xffffffff
mov dword [esp + 0x10], 0
je 0x41ef53
mov eax, dword [esp + 0xc]
push 0
lea edx, [esp + 0x14]
push edx
push eax
lea ecx, [esp + 0x24]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [sym.imp.MSVCR80.dll_free]
xor esi, esi
jmp 0x41ef60
mov ecx, dword [edi + 0x244]
test ecx, ecx
je 0x41efd2
mov eax, dword [edi + 0x248]
sub eax, ecx
sar eax, 2
cmp esi, eax
jae 0x41efd2
test ecx, ecx
je 0x41ef8c
mov eax, dword [edi + 0x248]
sub eax, ecx
sar eax, 2
cmp esi, eax
jb 0x41ef92
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov edx, dword [edi + 0x244]
mov eax, dword [edx + esi*4]
push eax
call ebx
mov ecx, dword [edi + 0x244]
add esp, 4
test ecx, ecx
je 0x41efba
mov eax, dword [edi + 0x248]
sub eax, ecx
sar eax, 2
cmp esi, eax
jb 0x41efc0
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov ecx, dword [edi + 0x244]
mov dword [ecx + esi*4], 0
add esi, 1
jmp 0x41ef60
mov ebx, dword [edi + 0x248]
cmp ecx, ebx
jbe 0x41efe2
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
mov esi, dword [edi + 0x244]
cmp esi, dword [edi + 0x248]
jbe 0x41eff6
call dword [sym.imp.MSVCR80.dll__invalid_parameter_noinfo]
cmp esi, ebx
je 0x41f02e
mov eax, dword [edi + 0x248]
sub eax, ebx
sar eax, 2
test eax, eax
lea ecx, [eax*4]
lea edx, [ecx + esi]
mov dword [esp + 0x10], edx
jle 0x41f024
push ecx
push ebx
push ecx
push esi
call dword [sym.imp.MSVCR80.dll_memmove_s]
add esp, 0x10
mov eax, dword [esp + 0x10]
mov dword [edi + 0x248], eax
mov ecx, dword [esp + 0x1901c]
pop esi
pop ebx
xor ecx, esp
mov eax, 1
call fcn.0042575e
mov esp, ebp
pop ebp
ret