Function at 0x40150a
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov dword [esp + 4], 0x4000
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._open
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0xffffffff
jne 0x40154a
mov dword [esp + 8], 0x100
mov dword [esp + 4], 0x4100
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._open
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call sym._filelength
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
inc eax
mov dword [esp + 4], 1
mov dword [esp], eax
call sym._calloc
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0xc]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x30]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call sym._read
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call sub.msvcrt.dll__close
mov eax, dword [ebp - 0x20]
add eax, dword [ebp - 0x30]
mov byte [eax], 0
inc dword [ebp - 0x20]
mov dword [ebp - 0x10], 0
jmp 0x4015c3
mov eax, dword [ebp - 0x10]
add eax, dword [ebp - 0x30]
mov al, byte [eax]
cmp al, 0xa
jne 0x4015c0
mov eax, dword [ebp - 0x10]
add eax, dword [ebp - 0x30]
mov byte [eax], 0
inc dword [ebp - 0x10]
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x20]
jl 0x4015ab
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], 1
mov dword [esp], eax
call sym._calloc
mov edx, eax
mov eax, dword [ebp + 0xc]
mov dword [eax], edx
mov dword [ebp - 0x14], 0
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call sym._strlen
mov dword [ebp - 0x1c], eax
jmp 0x4016dd
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 0x18], eax
jmp 0x401647
mov eax, dword [ebp - 0x18]
add eax, dword [ebp - 0x30]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call sym._strcmp
test eax, eax
jle 0x401633
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call sym._strlen
mov edx, dword [ebp - 0x18]
add eax, edx
inc eax
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x18]
jg 0x40160e
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call sym._strlen
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jle 0x401683
mov eax, dword [ebp + 0xc]
mov edx, dword [eax]
mov eax, dword [ebp - 0x14]
add edx, eax
mov eax, dword [ebp - 0x2c]
mov dword [esp + 4], eax
mov dword [esp], edx
call sym._strcpy
mov eax, dword [ebp - 0x1c]
inc eax
add dword [ebp - 0x14], eax
mov dword [ebp - 0x10], 0
jmp 0x4016a6
mov eax, dword [ebp - 0x10]
add eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x1c]
lea edx, [ecx + edx]
inc edx
add edx, dword [ebp - 0x2c]
mov dl, byte [edx]
mov byte [eax], dl
inc dword [ebp - 0x10]
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x2c]
mov ecx, edx
sub ecx, eax
mov eax, ecx
add eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x1c]
not edx
add eax, edx
cmp eax, dword [ebp - 0x10]
jg 0x40168c
mov eax, dword [ebp - 0x1c]
not eax
add dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call sym._strlen
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
inc eax
cmp eax, dword [ebp - 0x20]
jl 0x401605
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call sym._strlen
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0xc]
mov edx, dword [eax]
mov eax, dword [ebp - 0x14]
add edx, eax
mov eax, dword [ebp - 0x2c]
mov dword [esp + 4], eax
mov dword [esp], edx
call sym._strcpy
mov eax, dword [ebp - 0x1c]
inc eax
add dword [ebp - 0x14], eax
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._realloc
mov edx, eax
mov eax, dword [ebp + 0xc]
mov dword [eax], edx
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call sym._free
mov eax, dword [ebp - 0x14]
leave
ret