Function at 0x4d240a
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x5abbbd
call fcn.00591b5c
sub esp, 0x114
mov dword [ebp - 0x120], ecx
mov eax, dword [ebp - 0x120]
movzx eax, byte [eax + 8]
cmp eax, 0xdb
je 0x4d2439
push 0
call fcn.004d177c
pop ecx
mov eax, dword [ebp - 0x120]
cmp dword [eax + 0xc], 0
je 0x4d2478
mov eax, dword [ebp - 0x120]
movzx eax, byte [eax + 9]
test eax, eax
jne 0x4d246e
mov eax, dword [ebp - 0x120]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0x110], eax
push dword [ebp - 0x110]
call fcn.00565be4
pop ecx
mov eax, dword [ebp - 0x120]
and dword [eax + 0xc], 0
mov eax, dword [ebp - 0x120]
and dword [eax + 0x10], 0
mov eax, dword [ebp - 0x120]
and dword [eax + 0x14], 0
mov eax, dword [ebp - 0x120]
and byte [eax + 9], 0
lea ecx, [ebp - 0x8c]
call fcn.004d00b6
and dword [ebp - 4], 0
push dword [ebp + 8]
lea ecx, [ebp - 0x8c]
call fcn.004d03d5
push dword [ebp + 0xc]
lea eax, [ebp - 0x8c]
push eax
call fcn.004d5a6a
pop ecx
pop ecx
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
jne 0x4d24ee
and byte [ebp - 0x111], 0
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x8c]
call fcn.004d018e
mov al, byte [ebp - 0x111]
jmp 0x4d27d6
push dword [ebp + 0xc]
push dword [ebp - 0x10]
call fcn.004d634b
pop ecx
pop ecx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], edx
cmp dword [ebp - 0x18], 0
jg 0x4d253c
jl 0x4d250f
cmp dword [ebp - 0x1c], 0
jae 0x4d253c
push 0
push dword [ebp - 0x10]
call fcn.004e81eb
pop ecx
pop ecx
and byte [ebp - 0x112], 0
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x8c]
call fcn.004d018e
mov al, byte [ebp - 0x112]
jmp 0x4d27d6
mov eax, dword [ebp - 0x1c]
or eax, dword [ebp - 0x18]
test eax, eax
jne 0x4d2573
push 0
push dword [ebp - 0x10]
call fcn.004e81eb
pop ecx
pop ecx
mov byte [ebp - 0x113], 1
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x8c]
call fcn.004d018e
mov al, byte [ebp - 0x113]
jmp 0x4d27d6
and dword [ebp - 0x28], 0
and dword [ebp - 0x24], 0
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0x18]
push dword [ebp - 0x1c]
call fcn.004e8146
add esp, 0x10
cmp dword [ebp - 0x24], 0
jbe 0x4d25f0
cmp dword [ebp + 0xc], 0
je 0x4d25c3
push str.Out_of_memory_for_data_buffer
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov ecx, dword [ebp + 0xc]
call dword [eax + 0x10]
push dword [ebp - 0x18]
push dword [ebp - 0x1c]
push str.fileSize
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov ecx, dword [ebp + 0xc]
call dword [eax + 0x30]
push 0
push dword [ebp - 0x10]
call fcn.004e81eb
pop ecx
pop ecx
and byte [ebp - 0x114], 0
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x8c]
call fcn.004d018e
mov al, byte [ebp - 0x114]
jmp 0x4d27d6
mov eax, dword [ebp - 0x28]
add eax, 4
push eax
call fcn.00565bb9
pop ecx
mov dword [ebp - 0x118], eax
mov eax, dword [ebp - 0x120]
mov ecx, dword [ebp - 0x118]
mov dword [eax + 0xc], ecx
mov eax, dword [ebp - 0x120]
cmp dword [eax + 0xc], 0
jne 0x4d2674
cmp dword [ebp + 0xc], 0
je 0x4d2647
push str.Out_of_memory
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov ecx, dword [ebp + 0xc]
call dword [eax + 0x10]
push dword [ebp - 0x28]
push str.fileSize
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov ecx, dword [ebp + 0xc]
call dword [eax + 0x2c]
push 0
push dword [ebp - 0x10]
call fcn.004e81eb
pop ecx
pop ecx
and byte [ebp - 0x119], 0
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x8c]
call fcn.004d018e
mov al, byte [ebp - 0x119]
jmp 0x4d27d6
mov eax, dword [ebp - 0x28]
add eax, 4
push eax
push 0
mov eax, dword [ebp - 0x120]
push dword [eax + 0xc]
call fcn.0058ee10
add esp, 0xc
mov eax, dword [ebp - 0x120]
mov ecx, dword [ebp - 0x28]
mov dword [eax + 0x10], ecx
mov eax, dword [ebp - 0x28]
add eax, 4
mov ecx, dword [ebp - 0x120]
mov dword [ecx + 0x14], eax
and dword [ebp - 0x90], 0
push 0
lea eax, [ebp - 0x90]
push eax
push dword [ebp - 0x28]
mov eax, dword [ebp - 0x120]
push dword [eax + 0xc]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 0x14], eax
mov byte [ebp - 0x1d], 1
cmp dword [ebp - 0x14], 0
jne 0x4d2787
cmp dword [ebp + 0xc], 0
je 0x4d2783
lea ecx, [ebp - 0xac]
call fcn.004cde9c
mov byte [ebp - 4], 1
lea ecx, [ebp - 0xac]
call fcn.004cfd54
lea ecx, [ebp - 0xac]
call fcn.0055420c
push eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov ecx, dword [ebp + 0xc]
call dword [eax + 0x10]
push dword [ebp + 8]
push str.filename
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov ecx, dword [ebp + 0xc]
call dword [eax + 0x28]
lea ecx, [ebp - 0x10c]
call fcn.004d00b6
mov byte [ebp - 4], 2
lea eax, [ebp - 0x10c]
push eax
call fcn.004d4e25
pop ecx
lea ecx, [ebp - 0x10c]
call fcn.004d0c2d
push eax
push str.current_dir
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov ecx, dword [ebp + 0xc]
call dword [eax + 0x28]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x10c]
call fcn.004d018e
and byte [ebp - 4], 0
lea ecx, [ebp - 0xac]
call fcn.004ce1b7
and byte [ebp - 0x1d], 0
mov eax, dword [ebp - 0x90]
cmp eax, dword [ebp - 0x28]
je 0x4d27ac
cmp dword [ebp + 0xc], 0
je 0x4d27a8
push str.Failed_to_read_the_entire_file
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov ecx, dword [ebp + 0xc]
call dword [eax + 0x10]
and byte [ebp - 0x1d], 0
push 0
push dword [ebp - 0x10]
call fcn.004e81eb
pop ecx
pop ecx
mov al, byte [ebp - 0x1d]
mov byte [ebp - 0x11a], al
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x8c]
call fcn.004d018e
mov al, byte [ebp - 0x11a]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
leave
ret 8