Function at 0x4d1ac0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe4
push ebx
push esi
push edi
mov dword [ebp - 4], edx
mov ebx, eax
xor eax, eax
mov dword [ebp - 8], eax
mov esi, dword [ebx + 0x4c]
mov edx, dword [ebx + 0x28]
mov eax, edx
add eax, 0x17
cmp esi, eax
jb 0x4d1ae7
mov dword [ebp - 0x18], eax
jmp 0x4d1b09
test edx, edx
jne 0x4d1af4
mov dword [ebp - 0x18], 0x17
jmp 0x4d1b09
cmp esi, 0x8000
jbe 0x4d1b05
mov dword [ebp - 0x18], 0x8000
jmp 0x4d1b09
dec esi
mov dword [ebp - 0x18], esi
mov byte [ebx + 0x328], 0
mov eax, dword [ebx + 0x4c]
mov esi, dword [ebp - 0x18]
cmp eax, esi
jbe 0x4d1d91
mov eax, dword [ebp - 0x18]
inc eax
call fcn.00402f14
mov dword [ebp - 0x14], eax
xor edi, edi
push ebp
push 0x4d1d8a
push dword fs:[edi]
mov dword fs:[edi], esp
mov eax, dword [ebx + 0x4c]
sub eax, esi
je 0x4d1d70
mov edx, dword [ebx + 0x4c]
sub edx, dword [ebp - 0x18]
xor ecx, ecx
mov eax, dword [ebp - 4]
call fcn.004cd0d0
test al, al
je 0x4d1d70
push 0
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_ReadFile_1
sub dword [ebp - 0x1c], 0x16
cmp dword [ebp - 0x1c], 0
jbe 0x4d1d70
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x1c]
add eax, edx
mov dword [ebx + 0xd8], eax
cmp dword [eax], 0x6054b50
jne 0x4d1d63
mov edx, eax
lea eax, [ebx + 0xc0]
mov ecx, 0x16
call fcn.004d16ac
mov eax, dword [ebx + 0x4c]
mov edx, dword [ebp - 0x18]
sub edx, dword [ebp - 0x1c]
sub eax, edx
add eax, 0x16
mov dword [ebx + 0x2c], eax
or byte [ebx + 0x328], 1
mov edx, dword [ebx + 0xd0]
xor ecx, ecx
mov eax, dword [ebp - 4]
call fcn.004cd0d0
push 0
lea eax, [ebp - 0x1c]
push eax
push 0x2e
lea eax, [ebx + 0x58]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_ReadFile_1
cmp dword [ebx + 0x58], 0x2014b50
jne 0x4d1cb8
or byte [ebx + 0x328], 8
mov eax, dword [ebx + 0xd0]
mov dword [ebp - 8], eax
test byte [ebx + 0x60], 0x40
jne 0x4d1c50
mov edx, dword [ebx + 0x82]
xor ecx, ecx
mov eax, dword [ebp - 4]
call fcn.004cd0d0
push 0
lea eax, [ebp - 0x1c]
push eax
push 0x1e
lea eax, [ebx + 0xdc]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_ReadFile_1
cmp dword [ebx + 0xdc], 0x4034b50
jne 0x4d1d70
or byte [ebx + 0x328], 0x10
jmp 0x4d1d70
mov edx, eax
xor ecx, ecx
mov eax, dword [ebp - 4]
call fcn.004cd0d0
push 0
lea eax, [ebp - 0x1c]
push eax
push 0x2e
lea eax, [ebx + 0x8c]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_ReadFile_1
mov edx, dword [ebx + 0xb6]
xor ecx, ecx
mov eax, dword [ebp - 4]
call fcn.004cd0d0
push 0
lea eax, [ebp - 0x1c]
push eax
push 0x1e
lea eax, [ebx + 0x100]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_ReadFile_1
cmp dword [ebx + 0x100], 0x4034b50
jne 0x4d1d70
or byte [ebx + 0x328], 0x10
jmp 0x4d1d70
mov eax, 0x8001
call fcn.00402f14
mov dword [ebp - 0x10], eax
xor edi, edi
push ebp
push 0x4d1d5c
push dword fs:[edi]
mov dword fs:[edi], esp
xor ecx, ecx
xor edx, edx
mov eax, dword [ebp - 4]
call fcn.004cd0d0
test al, al
je 0x4d1d46
xor eax, eax
mov dword [ebp - 0xc], eax
push 0
lea eax, [ebp - 0x1c]
push eax
push 0x8000
mov esi, dword [ebp - 0x10]
push esi
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_ReadFile_1
mov edx, esi
mov eax, dword [ebp - 0x1c]
test eax, eax
jl 0x4d1d37
inc eax
xor ecx, ecx
cmp byte [edx], 0x50
jne 0x4d1d32
mov esi, dword [ebp - 0x10]
add esi, ecx
cmp dword [esi], 0x4034b50
jne 0x4d1d32
mov eax, dword [ebp - 0xc]
shl eax, 0xf
add ecx, eax
mov dword [ebp - 8], ecx
mov byte [ebx + 0x328], 0x10
jmp 0x4d1d37
inc edx
inc ecx
dec eax
jne 0x4d1d0c
cmp dword [ebp - 8], 0
ja 0x4d1d46
inc dword [ebp - 0xc]
cmp dword [ebp - 0xc], 4
jne 0x4d1ce8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4d1d70
mov eax, dword [ebp - 0x10]
call fcn.00402f2c
ret
dec dword [ebp - 0x1c]
cmp dword [ebp - 0x1c], 0
ja 0x4d1b80
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4d1d91
mov edx, dword [ebp - 0x18]
inc edx
mov eax, dword [ebp - 0x14]
call fcn.00402f2c
ret
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret