Function at 0x49f644
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x51fa66
call fcn.004efe80
sub esp, 0x418
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, ecx
test edi, edi
jne 0x49f666
xor al, al
jmp 0x49f865
mov ecx, dword [esi + 0x44]
lea eax, [esi + 0x40]
push ebx
mov dword [ebp - 0x20], eax
mov ebx, dword [eax]
cmp ebx, ecx
je 0x49f698
mov ecx, dword [ebx]
test ecx, ecx
mov dword [ebp + 8], ecx
je 0x49f690
call fcn.0049f17f
push dword [ebp + 8]
call sub.MFC42.DLL_operatordelete
mov eax, dword [ebp - 0x20]
pop ecx
add ebx, 4
cmp ebx, dword [esi + 0x44]
jne 0x49f676
mov ecx, eax
call fcn.004837a2
mov esi, dword [sym.imp.MSVCRT.dll_fread]
push edi
push 1
lea eax, [ebp - 0x24]
pop ebx
mov dword [ebp - 0x24], 0x3e8
push ebx
push 4
push eax
call esi
and dword [ebp - 0x1c], 0
push edi
push ebx
lea eax, [ebp - 0x1c]
push 2
push eax
call esi
and dword [ebp - 0x18], 0
add esp, 0x20
cmp word [ebp - 0x1c], 0
jbe 0x49f862
push 0x38
call sub.MFC42.DLL_operatornew
pop ecx
mov dword [ebp - 0x14], eax
and dword [ebp - 4], 0
test eax, eax
je 0x49f6f5
mov ecx, eax
call fcn.0049f485
jmp 0x49f6f7
xor eax, eax
or dword [ebp - 4], 0xffffffff
and dword [ebp + 8], 0
mov dword [ebp - 0x10], eax
push edi
push ebx
lea eax, [ebp + 8]
push 2
push eax
call esi
movzx eax, word [ebp + 8]
push edi
push eax
lea eax, [ebp - 0x424]
push ebx
push eax
call esi
movzx eax, word [ebp + 8]
and byte [ebp + eax - 0x424], 0
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x424]
push eax
call sub.MSVCRT.dll_strlen
mov ecx, dword [ebp - 0x14]
add esp, 0x24
lea eax, [ebp + eax - 0x424]
push eax
lea eax, [ebp - 0x424]
push eax
call fcn.004092b0
push edi
push ebx
lea eax, [ebp + 8]
push 2
push eax
call esi
movzx eax, word [ebp + 8]
push edi
push eax
lea eax, [ebp - 0x424]
push ebx
push eax
call esi
movzx eax, word [ebp + 8]
and byte [ebp + eax - 0x424], 0
mov eax, dword [ebp - 0x10]
add eax, 0xc
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x424]
push eax
call sub.MSVCRT.dll_strlen
mov ecx, dword [ebp - 0x14]
add esp, 0x24
lea eax, [ebp + eax - 0x424]
push eax
lea eax, [ebp - 0x424]
push eax
call fcn.004092b0
push edi
push ebx
lea eax, [ebp + 8]
push 2
push eax
call esi
movzx eax, word [ebp + 8]
push edi
push eax
lea eax, [ebp - 0x424]
push ebx
push eax
call esi
movzx eax, word [ebp + 8]
and byte [ebp + eax - 0x424], 0
mov eax, dword [ebp - 0x10]
add eax, 0x18
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x424]
push eax
call sub.MSVCRT.dll_strlen
add esp, 0x24
lea eax, [ebp + eax - 0x424]
mov ecx, dword [ebp - 0x14]
push eax
lea eax, [ebp - 0x424]
push eax
call fcn.004092b0
mov eax, dword [ebp - 0x10]
push edi
push 4
add eax, 0x24
push ebx
push eax
call esi
mov eax, dword [ebp - 0x10]
push edi
push 4
add eax, 0x28
push ebx
push eax
call esi
mov eax, dword [ebp - 0x10]
push edi
push 4
add eax, 0x2c
push ebx
push eax
call esi
mov eax, dword [ebp - 0x10]
push edi
push 4
add eax, 0x30
push ebx
push eax
call esi
mov eax, dword [ebp - 0x10]
add esp, 0x40
add eax, 0x34
push edi
push 4
push ebx
push eax
call esi
mov ecx, dword [ebp - 0x20]
add esp, 0x10
lea eax, [ebp - 0x10]
push eax
call fcn.004c3d17
inc dword [ebp - 0x18]
mov ax, word [ebp - 0x18]
cmp ax, word [ebp - 0x1c]
jb 0x49f6d9
mov al, bl
pop ebx
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
leave
ret 4