Function at 0x4017f4
Capabilities:
Read file on windows
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1dc8
call fcn.00421ba0
push ebx
push esi
push edi
push dword [ebp + 8]
xor esi, esi
xor eax, eax
mov ecx, 0x707
lea edi, [ebp - 0x1dc4]
mov dword [ebp - 0x1dc8], esi
mov byte [ebp - 5], 0
rep stosd dword es:[edi], eax
mov dword [ebp - 4], esi
call fcn.00413638
mov ebx, eax
cmp ebx, esi
pop ecx
jg 0x401838
xor al, al
jmp 0x401b88
push ebx
call fcn.00410adc
push ebx
mov edi, eax
push esi
push edi
mov dword [ebp - 0x10], edi
call fcn.00421a10
add esp, 0x10
mov esi, 0x80
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
xor eax, eax
push eax
push esi
push 3
push eax
push 1
push accept
push dword [ebp + 8]
mov dword [ebp - 0x18], eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x401b75
push 0
lea eax, [ebp - 0x18]
push eax
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
lea eax, [ebp - 0x1dc8]
mov edx, 0x42e2d0
mov ecx, dword [edx]
test ecx, ecx
je 0x4018c5
cmp word [edx + 4], 0
je 0x4018c5
add ecx, edi
inc esi
mov dword [eax], ecx
add edx, 6
add eax, 4
cmp esi, 0x12c
jb 0x4018a5
cmp esi, 0x64
jle 0x4019c4
mov eax, dword [0x42e2d0]
push 6
add eax, edi
push str.no_key
push eax
mov dword [ebp - 4], eax
call fcn.00421b60
add esp, 0xc
test eax, eax
je 0x40192e
lea esi, [ebp - 0x1dc0]
mov ebx, 0x42e2e0
mov dword [ebp - 0xc], 0x12a
cmp dword [ebx - 4], 0
je 0x401923
mov ecx, dword [esi]
test ecx, ecx
je 0x401923
mov ax, word [ebx]
cmp ax, 1
jb 0x401923
push dword [ebp - 4]
movzx eax, ax
push eax
push ecx
call fcn.0041a46e
add esp, 0xc
add ebx, 6
add esi, 4
dec dword [ebp - 0xc]
jne 0x4018fe
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
call fcn.00421b28
pop ecx
call fcn.00421b32
push 0x37
cdq
pop ecx
idiv ecx
xor ebx, ebx
mov esi, edx
add esi, 0xc8
test esi, esi
jle 0x40196c
call fcn.00421b32
cdq
mov ecx, 0xff
idiv ecx
mov eax, dword [ebp - 4]
mov byte [eax + ebx], dl
inc ebx
cmp ebx, esi
jl 0x401954
push 6
push str.no_key
push dword [ebp - 4]
call fcn.00421b60
add esp, 0xc
test eax, eax
je 0x4019c4
lea esi, [ebp - 0x1dc0]
mov ebx, 0x42e2e0
mov dword [ebp - 0xc], 0x12a
cmp dword [ebx - 4], 0
je 0x4019b9
mov ecx, dword [esi]
test ecx, ecx
je 0x4019b9
mov ax, word [ebx]
cmp ax, 1
jb 0x4019b9
push dword [ebp - 4]
movzx eax, ax
push eax
push ecx
call fcn.0041a3d2
add esp, 0xc
add ebx, 6
add esi, 4
dec dword [ebp - 0xc]
jne 0x401994
mov esi, dword [edi + 0x3c]
add esi, edi
and dword [esi + 0x58], 0
mov eax, 0x1000
lea ebx, [esi + 0xf8]
mov dword [esi + 0x38], eax
mov dword [esi + 0x3c], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
call fcn.00421b28
call fcn.00421b32
cdq
mov ecx, 0x107ac00
idiv ecx
xor eax, eax
lea edi, [ebp - 0x1a7]
push 0x62
pop ecx
add edx, 0x457a05be
mov dword [esi + 8], edx
mov byte [ebp - 0x1a8], 0
stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
lea edi, [ebp - 0x1a0]
rep stosd dword es:[edi], eax
movzx eax, word [esi + 6]
lea eax, [eax + eax*4]
shl eax, 3
push eax
lea eax, [ebp - 0x1a8]
push ebx
push eax
call fcn.004216d0
add esp, 0x10
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
call fcn.00421b28
pop ecx
call fcn.00421b32
cdq
push 6
pop ecx
idiv ecx
xor eax, eax
inc eax
mov dword [ebp - 4], eax
shl edx, 0xc
add dword [ebx + 0x10], edx
cmp word [esi + 6], ax
jbe 0x401aa1
lea edi, [ebx + 0x3c]
call fcn.00421b32
cdq
push 5
pop ecx
idiv ecx
shl edx, 0xc
add edx, dword [edi - 0x2c]
add edx, dword [edi - 0x28]
add dword [edi], edx
call fcn.00421b32
cdq
push 4
pop ecx
idiv ecx
add edi, 0x28
shl edx, 0xc
add dword [edi - 0x2c], edx
movzx eax, word [esi + 6]
inc dword [ebp - 4]
cmp dword [ebp - 4], eax
jl 0x401a68
mov eax, dword [ebp - 4]
lea eax, [eax + eax*4]
lea eax, [ebx + eax*8]
mov edi, dword [eax - 0x18]
add edi, dword [eax - 0x14]
push edi
call fcn.00410adc
pop ecx
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
call fcn.00421b28
push edi
push 0
push dword [ebp - 4]
call fcn.00421a10
push 0x1000
push dword [ebp - 0x10]
push dword [ebp - 4]
call fcn.004216d0
and dword [ebp - 0xc], 0
add esp, 0x1c
cmp word [esi + 6], 0
jbe 0x401b27
lea eax, [ebp - 0x194]
mov dword [ebp - 0x14], eax
add ebx, 0x14
jmp 0x401afd
mov eax, dword [ebp - 0x14]
push dword [eax - 4]
mov eax, dword [eax]
add eax, dword [ebp - 0x10]
push eax
mov eax, dword [ebx]
add eax, dword [ebp - 4]
push eax
call fcn.004216d0
movzx eax, word [esi + 6]
add dword [ebp - 0x14], 0x28
add esp, 0xc
inc dword [ebp - 0xc]
add ebx, 0x28
cmp dword [ebp - 0xc], eax
jl 0x401afa
mov esi, 0x80
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
xor ebx, ebx
push ebx
push esi
push 2
push ebx
push 2
push 0x40000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x401b72
push ebx
lea eax, [ebp - 0x18]
push eax
push edi
push dword [ebp - 4]
mov dword [ebp - 0x18], ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 5], 1
mov edi, dword [ebp - 0x10]
push edi
call fcn.00410b23
push dword [ebp - 4]
call fcn.00410b23
mov al, byte [ebp - 5]
pop ecx
pop ecx
pop edi
pop esi
pop ebx
leave
ret