Function at 0x4d0450
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x4040
call fcn.00554650
mov eax, dword [0x5c04b4]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
mov eax, edx
mov dword [ebp - 0x4020], ecx
mov edx, dword [ebp + 0x18]
push esi
push edi
test eax, eax
je 0x4d0580
sub esp, 0xc
mov ecx, eax
neg edx
sbb edx, edx
and edx, 0x59209c
call fcn.004f3690
mov esi, eax
add esp, 0xc
mov dword [ebp - 0x4010], esi
test esi, esi
je 0x4d0580
mov ecx, dword [ebp + 0x10]
mov eax, ecx
mov edx, dword [ebp + 0x14]
or eax, edx
mov ebx, dword [sym.imp.KERNEL32.dll_SetLastError]
je 0x4d0596
cmp byte [0x5c6a90], 0
mov eax, dword [esi]
je 0x4d052d
mov dword [ebp - 0x402c], ecx
mov dword [ebp - 0x4028], edx
test edx, edx
jg 0x4d04e9
jl 0x4d04db
test ecx, ecx
jae 0x4d04e9
push 0x19
call ebx
or eax, 0xffffffff
or ecx, eax
jmp 0x4d0572
push 0xe
push 8
lea ecx, [ebp - 0x402c]
push ecx
lea ecx, [ebp - 0x4040]
push ecx
push eax
call dword [0x5c0080]
mov esi, eax
push esi
call dword [0x5c00a8]
push eax
call ebx
test esi, esi
mov esi, dword [ebp - 0x4010]
jns 0x4d051f
or eax, 0xffffffff
or ecx, eax
jmp 0x4d0572
mov eax, dword [ebp - 0x402c]
mov ecx, dword [ebp - 0x4028]
jmp 0x4d0572
push 0
mov dword [ebp - 0x4018], edx
lea edx, [ebp - 0x4018]
push edx
push ecx
push eax
mov dword [ebp - 0x401c], ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x401c], eax
cmp eax, 0xffffffff
jne 0x4d056c
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4d0566
or eax, 0xffffffff
or ecx, eax
jmp 0x4d0572
mov eax, dword [ebp - 0x401c]
mov ecx, dword [ebp - 0x4018]
and eax, ecx
cmp eax, 0xffffffff
jne 0x4d0596
mov ecx, esi
call fcn.004f3710
mov eax, 0xfffffffe
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00553510
mov esp, ebp
pop ebp
ret
xor edi, edi
mov dword [ebp - 0x4024], 1
mov dword [ebp - 0x4014], edi
xor ebx, ebx
lea ebx, [ebx]
cmp byte [0x5c6a90], 0
mov eax, dword [esi]
push 0
je 0x4d0621
xor ecx, ecx
push ecx
push 0x4000
mov dword [ebp - 0x4034], ecx
mov dword [ebp - 0x4030], ecx
lea ecx, [ebp - 0x400c]
push ecx
lea ecx, [ebp - 0x4034]
push ecx
push 0
push 0
push 0
push eax
call dword [0x5c0260]
mov esi, eax
cmp esi, 0xc0000011
jne 0x4d0602
mov dword [ebp - 0x4030], 0
xor esi, esi
push esi
call dword [0x5c00a8]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
test esi, esi
jns 0x4d0619
or esi, 0xffffffff
jmp 0x4d064a
mov esi, dword [ebp - 0x4030]
jmp 0x4d064a
lea ecx, [ebp - 0x4038]
push ecx
push 0x4000
lea ecx, [ebp - 0x400c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4d0644
or esi, 0xffffffff
jmp 0x4d064a
mov esi, dword [ebp - 0x4038]
cmp esi, 0xffffffff
je 0x4d0700
test esi, esi
je 0x4d06f5
mov eax, dword [ebp - 0x4010]
cmp dword [eax + 4], 0
je 0x4d067c
mov edx, esi
lea ecx, [ebp - 0x400c]
call fcn.004f34f0
cmp esi, eax
jne 0x4d0700
test esi, esi
je 0x4d06f5
mov ecx, dword [ebp - 0x4014]
lea edx, [ebp - 0x400c]
push 1
add edi, esi
push ecx
push dword [ebp + 0xc]
cmp edi, dword [ebp + 8]
ja 0x4d06d4
mov ecx, dword [ebp - 0x4020]
push esi
call fcn.004d0ac0
add esp, 0x10
test eax, eax
jne 0x4d06b9
or ebx, 0xffffffff
xor ecx, ecx
mov dword [ebp - 0x4024], ecx
jmp 0x4d06bf
mov ecx, dword [ebp - 0x4024]
mov dword [ebp - 0x4014], edi
test ecx, ecx
je 0x4d06f5
mov esi, dword [ebp - 0x4010]
jmp 0x4d05b0
mov esi, dword [ebp + 8]
mov eax, esi
sub eax, ecx
mov ecx, dword [ebp - 0x4020]
push eax
call fcn.004d0ac0
add esp, 0x10
mov ebx, eax
neg ebx
mov edi, esi
sbb ebx, ebx
dec ebx
jmp 0x4d06f8
mov esi, dword [ebp + 8]
test ebx, ebx
jne 0x4d0705
cmp edi, esi
jae 0x4d0705
mov ebx, 0xfffffffe
mov ecx, dword [ebp - 0x4010]
call fcn.004f3710
mov ecx, dword [ebp - 8]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00553510
mov esp, ebp
pop ebp
ret