Function at 0x404a58
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [0x411c58]
mov ecx, dword [0x411bd8]
inc eax
mov edx, dword [0x41291c]
push ebx
push esi
mov esi, dword [0x411be4]
mov ebx, dword [esi + 4]
add eax, ebx
cmp ecx, eax
ja 0x404c75
cmp dword [esi + 0x20], 0
jne 0x404a9c
sub ecx, edx
xor eax, eax
cmp ecx, 1
setne al
inc eax
jmp 0x404c71
push edi
mov edi, ecx
sub edi, edx
dec edi
mov dword [ebp - 4], edi
test edi, edi
jle 0x404ab7
mov al, byte [edx]
mov byte [ebx], al
inc ebx
inc edx
sub edi, 1
jne 0x404aa9
mov edi, dword [ebp - 4]
xor eax, eax
inc eax
cmp dword [esi + 0x24], 2
jne 0x404ad3
mov ebx, dword [ebp - 4]
xor edi, edi
and dword [esi + 0x10], edi
mov dword [0x411c58], edi
jmp 0x404c2c
mov edx, dword [esi + 0xc]
mov ebx, edx
sub ebx, edi
dec ebx
test ebx, ebx
jg 0x404b3d
mov ebx, dword [esi + 4]
sub ecx, ebx
cmp dword [esi + 0x14], 0
mov dword [ebp - 8], ecx
je 0x404b1d
lea eax, [edx + edx]
test eax, eax
jg 0x404afd
mov eax, edx
shr eax, 3
add eax, edx
jmp 0x404b00
lea eax, [edx + edx]
lea ecx, [eax + 2]
mov dword [esi + 0xc], eax
cmp ecx, eax
jb 0x404b9b
push ecx
push ebx
call dword [sym.imp.msvcrt.dll_realloc]
pop ecx
pop ecx
mov ecx, dword [ebp - 8]
jmp 0x404b1f
xor eax, eax
mov dword [esi + 4], eax
test eax, eax
je 0x404ba5
mov edx, dword [esi + 0xc]
add ecx, eax
mov ebx, edx
mov dword [0x411bd8], ecx
sub ebx, edi
dec ebx
test ebx, ebx
jle 0x404adf
xor eax, eax
inc eax
mov ecx, 0x2000
cmp ebx, ecx
jle 0x404b48
mov ebx, ecx
cmp dword [esi + 0x18], 0
je 0x404bdb
xor edi, edi
test ebx, ebx
jle 0x404bd0
push dword [0x411bd4]
call dword [sym.imp.msvcrt.dll_getc]
mov esi, dword [0x411be4]
mov edx, eax
pop ecx
cmp edx, 0xffffffff
je 0x404b87
cmp edx, 0xa
je 0x404b8c
mov ecx, dword [esi + 4]
mov eax, dword [ebp - 4]
add ecx, edi
inc edi
mov byte [ecx + eax], dl
cmp edi, ebx
jl 0x404b58
cmp edx, 0xa
jne 0x404baf
mov eax, dword [esi + 4]
mov ebx, dword [ebp - 4]
add eax, edi
inc edi
mov byte [eax + ebx], 0xa
jmp 0x404bb2
mov ecx, 0x40129c
jmp 0x404c7a
mov ecx, 0x4012b0
jmp 0x404c7a
mov ebx, dword [ebp - 4]
cmp edx, 0xffffffff
jne 0x404bd3
push dword [0x411bd4]
call dword [sym.imp.msvcrt.dll_ferror]
pop ecx
test eax, eax
jne 0x404c0f
mov esi, dword [0x411be4]
jmp 0x404bd3
mov ebx, dword [ebp - 4]
mov dword [0x411c58], edi
jmp 0x404c25
push dword [0x411bd4]
push ebx
push eax
mov eax, dword [esi + 4]
add eax, edi
push eax
call dword [sym.imp.msvcrt.dll_fread]
mov edi, eax
add esp, 0x10
mov dword [0x411c58], edi
test edi, edi
jne 0x404c1c
push dword [0x411bd4]
call dword [sym.imp.msvcrt.dll_ferror]
pop ecx
test eax, eax
je 0x404c16
mov ecx, 0x4012dc
jmp 0x404c7a
mov edi, dword [0x411c58]
mov ebx, dword [ebp - 4]
mov esi, dword [0x411be4]
mov dword [esi + 0x10], edi
test edi, edi
jne 0x404c4e
test ebx, ebx
jne 0x404c46
call fcn.00404db3
mov esi, dword [0x411be4]
xor eax, eax
mov edi, dword [0x411c58]
inc eax
jmp 0x404c50
push 2
pop eax
mov dword [esi + 0x24], eax
jmp 0x404c50
xor eax, eax
mov ecx, dword [esi + 4]
add edi, ebx
mov dword [0x411c58], edi
mov byte [edi + ecx], 0
mov ecx, dword [esi + 4]
mov byte [edi + ecx + 1], 0
mov ecx, dword [esi + 4]
mov dword [0x41291c], ecx
pop edi
pop esi
pop ebx
leave
ret
mov ecx, 0x401264
call fcn.00404ea8
int3