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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40a5d0
push 0x4086f6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x70
mov eax, dword [0x4122b8]
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
mov dword [ebp - 0x4c], 0
mov eax, dword [ebp + 0x2c]
mov dword [eax], 0
mov ebx, dword [ebp + 0x1c]
test ebx, ebx
je 0x401630
mov eax, dword [ebp + 0x10]
test al, al
jns 0x40152e
mov ecx, dword [0x40a5c0]
mov dword [ebp - 0x30], ecx
mov edx, dword [0x40a5c4]
mov dword [ebp - 0x2c], edx
mov ecx, dword [0x40a5c8]
mov dword [ebp - 0x28], ecx
mov dx, word [0x40a5cc]
mov word [ebp - 0x24], dx
and eax, 0x7f
push eax
lea ecx, [ebp - 0x44]
call fcn.00401000
add esp, 4
lea eax, [ebp - 0x44]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401507
sub eax, edx
lea edi, [ebp - 0x30]
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x401514
mov ecx, eax
mov esi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x401547
mov cx, word [0x40a5bc]
mov word [ebp - 0x30], cx
mov dl, byte [0x40a5be]
mov byte [ebp - 0x2e], dl
add al, 0x41
mov byte [ebp - 0x30], al
mov dword [ebp - 0x48], 0xffffffff
mov dword [ebp - 4], 0
lea eax, [ebp - 0x30]
push eax
mov edi, dword [ebp + 8]
mov ecx, edi
call fcn.004013c0
mov esi, eax
mov dword [ebp - 0x48], esi
cmp esi, 0xffffffff
je 0x401622
lea edx, [ebp - 0x70]
push edx
push esi
mov ecx, edi
call fcn.00401450
mov dword [ebp - 0x50], eax
test eax, eax
jne 0x401599
push 0xffffffffffffffff
lea eax, [ebp - 0x10]
push eax
call sub.MSVCR71.dll__local_unwind2
add esp, 8
xor eax, eax
jmp 0x4016cc
mov eax, dword [ebp + 0x18]
cdq
push edx
push eax
push 0
mov ecx, dword [ebp - 0x64]
push ecx
call fcn.00408700
mov ecx, eax
mov edi, edx
mov eax, dword [ebp + 0x14]
cdq
add ecx, eax
adc edi, edx
push 0
mov edx, dword [ebp - 0x60]
push edx
push edi
push ecx
call fcn.00408700
mov ecx, eax
mov edi, edx
mov eax, ebx
cdq
add ecx, eax
adc edi, edx
sub ecx, 1
sbb edi, 0
push 0
mov edx, dword [ebp - 0x5c]
push edx
push edi
push ecx
call fcn.00408700
mov dword [ebp - 0x7c], eax
mov dword [ebp - 0x78], edx
mov dword [ebp - 0x74], eax
mov ecx, edx
sar ecx, 0x1f
mov dword [ebp - 0x54], edx
push 0
lea edx, [ebp - 0x54]
push edx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 4
push 0x3000
mov eax, dword [ebp - 0x5c]
mov edi, dword [ebp + 0x20]
imul eax, edi
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ebx, eax
mov dword [ebp - 0x80], ebx
test ebx, ebx
jne 0x401637
push 0xffffffffffffffff
lea ecx, [ebp - 0x10]
push ecx
call sub.MSVCR71.dll__local_unwind2
add esp, 8
xor eax, eax
jmp 0x4016cc
mov eax, dword [ebp - 0x5c]
imul eax, edi
mov edi, dword [ebp + 0x24]
cmp eax, edi
jg 0x401646
mov edi, eax
mov dword [ebp - 0x58], edi
mov ecx, dword [ebp + 0xc]
push 0
test ecx, ecx
je 0x401679
mov edx, dword [ebp + 0x2c]
push edx
push eax
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 0x50], eax
mov ecx, edi
mov esi, ebx
mov edi, dword [ebp + 0x28]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x4016a8
mov ecx, edi
mov esi, dword [ebp + 0x28]
mov edi, ebx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 0x2c]
push eax
mov ecx, dword [ebp - 0x5c]
imul ecx, dword [ebp + 0x20]
push ecx
push ebx
mov edx, dword [ebp - 0x48]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x50], eax
push 0x8000
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov dword [ebp - 0x4c], 1
mov dword [ebp - 4], 0xffffffff
call fcn.004016e7
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x1c]
call fcn.00408681
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x28