Function at 0x41ae14
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe8
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x14], ebx
mov ebx, ecx
test ebx, ebx
js 0x41ae32
shr ebx, 2
mov esi, dword [edx + ebx*4]
dec ebx
push esi
jns 0x41ae2b
mov edx, esp
mov dword [ebp - 8], ecx
mov dword [ebp - 4], edx
mov ebx, eax
mov esi, dword [ebp + 0x1c]
mov edi, dword [ebp + 0x24]
xor eax, eax
push ebp
push 0x41b0c9
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp + 8]
xor edx, edx
mov dword [eax], edx
test edi, edi
je 0x41af17
push 0
lea eax, [ebp - 0x14]
mov ecx, 1
mov edx, dword [0x41adf0]
call fcn.004053c4
add esp, 4
push edi
lea eax, [ebp - 0x14]
mov ecx, 1
mov edx, dword [0x41adf0]
call fcn.004053c4
add esp, 4
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
push 0
push 0
push dword [ebp - 0xc]
push dword [ebp - 0x10]
push ebx
call sub.kernel32.dll_SetFilePointerEx
push 0
lea eax, [ebp - 0x18]
push eax
push edi
mov eax, dword [ebp - 0x14]
push eax
push ebx
call sub.kernel32.dll_ReadFile_1
cmp dword [ebp - 0x18], 0
je 0x41af17
mov eax, dword [ebp - 0x14]
mov al, byte [eax]
mov edx, dword [ebp + 0x10]
mov byte [edx], al
mov eax, dword [ebp - 4]
push eax
mov eax, dword [ebp - 8]
push eax
push 0x17
mov eax, dword [ebp - 0x14]
call fcn.00405210
mov edx, eax
mov ecx, edi
mov eax, dword [ebp - 0x14]
call fcn.00418800
push 0
push 0
push dword [ebp - 0xc]
push dword [ebp - 0x10]
push ebx
call sub.kernel32.dll_SetFilePointerEx
push 0
lea eax, [ebp - 0x18]
push eax
push edi
mov eax, dword [ebp - 0x14]
push eax
push ebx
call sub.kernel32.dll_WriteFile_1
cmp dword [ebp - 0x18], 0
je 0x41af17
mov eax, dword [ebp + 8]
inc dword [eax]
cmp dword [ebp + 0x20], 0
je 0x41afeb
push 0
lea eax, [ebp - 0x14]
mov ecx, 1
mov edx, dword [0x41adf0]
call fcn.004053c4
add esp, 4
mov eax, dword [ebp + 0x20]
push eax
lea eax, [ebp - 0x14]
mov ecx, 1
mov edx, dword [0x41adf0]
call fcn.004053c4
add esp, 4
fild qword [ebp + 0x14]
fdiv dword [0x41b0e0]
call fcn.00402a64
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], edx
push 0
push 0
push dword [ebp - 0xc]
push dword [ebp - 0x10]
push ebx
call sub.kernel32.dll_SetFilePointerEx
push 0
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp + 0x20]
push eax
mov eax, dword [ebp - 0x14]
push eax
push ebx
call sub.kernel32.dll_ReadFile_1
cmp dword [ebp - 0x18], 0
je 0x41afeb
mov eax, dword [ebp - 0x14]
mov al, byte [eax]
mov edx, dword [ebp + 0x10]
mov byte [edx + 1], al
mov eax, dword [ebp - 4]
push eax
mov eax, dword [ebp - 8]
push eax
push 0x2a
mov eax, dword [ebp - 0x14]
call fcn.00405210
mov edx, eax
mov ecx, dword [ebp + 0x20]
mov eax, dword [ebp - 0x14]
call fcn.00418800
push 0
push 0
push dword [ebp - 0xc]
push dword [ebp - 0x10]
push ebx
call sub.kernel32.dll_SetFilePointerEx
push 0
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp + 0x20]
push eax
mov eax, dword [ebp - 0x14]
push eax
push ebx
call sub.kernel32.dll_WriteFile_1
cmp dword [ebp - 0x18], 0
je 0x41afeb
mov eax, dword [ebp + 8]
add dword [eax], 2
test esi, esi
je 0x41b0ad
push 0
lea eax, [ebp - 0x14]
mov ecx, 1
mov edx, dword [0x41adf0]
call fcn.004053c4
add esp, 4
push esi
lea eax, [ebp - 0x14]
mov ecx, 1
mov edx, dword [0x41adf0]
call fcn.004053c4
add esp, 4
mov eax, esi
neg eax
cdq
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], edx
push 2
push 0
push dword [ebp - 0xc]
push dword [ebp - 0x10]
push ebx
call sub.kernel32.dll_SetFilePointerEx
push 0
lea eax, [ebp - 0x18]
push eax
push esi
mov eax, dword [ebp - 0x14]
push eax
push ebx
call sub.kernel32.dll_ReadFile_1
cmp dword [ebp - 0x18], 0
je 0x41b0ad
mov eax, dword [ebp - 0x14]
mov al, byte [eax]
mov edx, dword [ebp + 0x10]
mov byte [edx + 2], al
mov eax, dword [ebp - 4]
push eax
mov eax, dword [ebp - 8]
push eax
push 0x81
mov eax, dword [ebp - 0x14]
call fcn.00405210
mov edx, eax
mov ecx, esi
mov eax, dword [ebp - 0x14]
call fcn.00418800
push 2
push 0
push dword [ebp - 0xc]
push dword [ebp - 0x10]
push ebx
call sub.kernel32.dll_SetFilePointerEx
push 0
lea eax, [ebp - 0x18]
push eax
push esi
mov eax, dword [ebp - 0x14]
push eax
push ebx
call sub.kernel32.dll_WriteFile_1
cmp dword [ebp - 0x18], 0
je 0x41b0ad
mov eax, dword [ebp + 8]
add dword [eax], 4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x41b0d0
lea eax, [ebp - 0x14]
mov edx, dword [0x41adf0]
call fcn.004054c4
ret