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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1dc8
call fcn.00420220
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.0041213d
mov ebx, eax
cmp ebx, esi
pop ecx
jg 0x401853
xor al, al
jmp 0x401b9a
push ebx
call fcn.0040fb14
push ebx
mov edi, eax
push esi
push edi
mov dword [ebp - 0x10], edi
call fcn.00420090
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 connect
push dword [ebp + 8]
mov dword [ebp - 0x18], eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x401b87
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, 0x42c2d8
mov ecx, dword [edx]
test ecx, ecx
je 0x4018e0
cmp word [edx + 4], 0
je 0x4018e0
add ecx, edi
inc esi
mov dword [eax], ecx
add edx, 6
add eax, 4
cmp esi, 0x12c
jb 0x4018c0
cmp esi, 0x64
jle 0x4019df
mov eax, dword [0x42c2d8]
push 6
add eax, edi
push str.no_key
push eax
mov dword [ebp - 4], eax
call fcn.004201e0
add esp, 0xc
test eax, eax
je 0x401949
lea ebx, [ebp - 0x1dc0]
mov esi, 0x42c2e8
mov dword [ebp - 0xc], 0x12a
cmp dword [esi - 4], 0
je 0x40193e
mov ecx, dword [ebx]
test ecx, ecx
je 0x40193e
mov ax, word [esi]
cmp ax, 1
jb 0x40193e
push dword [ebp - 4]
movzx eax, ax
push eax
push ecx
call fcn.00418dcf
add esp, 0xc
add esi, 6
add ebx, 4
dec dword [ebp - 0xc]
jne 0x401919
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
call fcn.004201a8
pop ecx
call fcn.004201b2
push 0x37
cdq
pop ecx
idiv ecx
xor esi, esi
mov ebx, edx
add ebx, 0xc8
test ebx, ebx
jle 0x401987
call fcn.004201b2
cdq
mov ecx, 0xff
idiv ecx
mov eax, dword [ebp - 4]
mov byte [eax + esi], dl
inc esi
cmp esi, ebx
jl 0x40196f
push 6
push str.no_key
push dword [ebp - 4]
call fcn.004201e0
add esp, 0xc
test eax, eax
je 0x4019df
lea ebx, [ebp - 0x1dc0]
mov esi, 0x42c2e8
mov dword [ebp - 0xc], 0x12a
cmp dword [esi - 4], 0
je 0x4019d4
mov ecx, dword [ebx]
test ecx, ecx
je 0x4019d4
mov ax, word [esi]
cmp ax, 1
jb 0x4019d4
push dword [ebp - 4]
movzx eax, ax
push eax
push ecx
call fcn.00418d33
add esp, 0xc
add esi, 6
add ebx, 4
dec dword [ebp - 0xc]
jne 0x4019af
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.004201a8
call fcn.004201b2
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.0041fd50
add esp, 0x10
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
call fcn.004201a8
pop ecx
call fcn.004201b2
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 0x401abc
lea edi, [ebx + 0x3c]
call fcn.004201b2
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.004201b2
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 0x401a83
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.0040fb14
pop ecx
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
call fcn.004201a8
push edi
push 0
push dword [ebp - 4]
call fcn.00420090
push 0x1000
push dword [ebp - 0x10]
push dword [ebp - 4]
call fcn.0041fd50
and dword [ebp - 0xc], 0
add esp, 0x1c
cmp word [esi + 6], 0
jbe 0x401b42
lea eax, [ebp - 0x194]
mov dword [ebp - 0x14], eax
add ebx, 0x14
jmp 0x401b18
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.0041fd50
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 0x401b15
push 0
push 0x80
push 2
push 0
push 2
push 0x40000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x401b84
and dword [ebp - 0x18], 0
push 0
lea eax, [ebp - 0x18]
push eax
push edi
push dword [ebp - 4]
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.0040fb5b
push dword [ebp - 4]
call fcn.0040fb5b
mov al, byte [ebp - 5]
pop ecx
pop ecx
pop edi
pop esi
pop ebx
leave
ret