Function at 0x494dbe
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x34
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 0
cmp dword [ebp + 8], 0
jne 0x494e02
mov dword [esp + 0xc], str.Cannot_open_NULL_path
mov dword [esp + 8], str.w_get_file_content
mov dword [esp + 4], 0xce8
mov dword [esp], str.shared_file_op.c
call dbg._mdebug1
jmp 0x49504f
mov dword [esp + 4], 0x5035ed
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._fopen
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x494e72
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov ebx, eax
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x504818
mov dword [esp + 8], str.w_get_file_content
mov dword [esp + 4], 0xcee
mov dword [esp], str.shared_file_op.c
call dbg._mdebug1
jmp 0x49504f
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call dbg.get_fp_size
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
shr eax, 0x1f
and eax, 1
test al, al
je 0x494ee1
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov ebx, eax
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str._1116_:_Could_not_set_position_in_file__s_due_to____d____s__.
mov dword [esp + 8], str.w_get_file_content
mov dword [esp + 4], 0xcf4
mov dword [esp], str.shared_file_op.c
call dbg._mdebug1
jmp 0x49504f
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp + 0xc]
jle 0x494f2e
mov eax, dword [ebp + 0xc]
lea edx, [eax + 0xfffff]
test eax, eax
cmovs eax, edx
sar eax, 0x14
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Cannot_load_file__s:_it_exceeds__ld_MiB
mov dword [esp + 8], str.w_get_file_content
mov dword [esp + 4], 0xcfa
mov dword [esp], str.shared_file_op.c
call dbg._mdebug1
jmp 0x49504f
mov eax, dword [ebp - 0x14]
add eax, 1
mov dword [esp], eax
call sym._malloc
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x494f8d
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov ebx, eax
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x503710
mov dword [esp + 8], str.w_get_file_content
mov dword [esp + 4], 0xcff
mov dword [esp], str.shared_file_op.c
call dbg._merror_exit
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0xc]
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym._fread
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x14]
cmp dword [ebp - 0x18], eax
je 0x494fcf
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._feof
test eax, eax
jne 0x494fcf
mov eax, 1
jmp 0x494fd4
mov eax, 0
test eax, eax
je 0x495041
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov ebx, eax
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str._1115_:_Could_not_read_from_file__s_due_to____d____s__.
mov dword [esp + 8], str.w_get_file_content
mov dword [esp + 4], 0xd03
mov dword [esp], str.shared_file_op.c
call dbg._mdebug1
cmp dword [ebp - 0x10], 0
je 0x49504e
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call sym._free
mov dword [ebp - 0x10], 0
jmp 0x49504e
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x10]
add eax, edx
mov byte [eax], 0
jmp 0x49504f
nop
cmp dword [ebp - 0xc], 0
je 0x495060
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._fclose
mov eax, dword [ebp - 0x10]
mov ebx, dword [ebp - 4]
leave
ret