Function at 0x505150
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x704050
mov eax, dword fs:[0]
push eax
sub esp, 0x50
push ebx
push esi
push edi
mov eax, dword [0x7e6410]
xor eax, esp
push eax
lea eax, [esp + 0x60]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [edi]
mov eax, dword [eax + 0x1c]
call eax
test al, al
jne 0x5051d5
push 0
push str.FileStream::insert______invalid_file.
lea ecx, [esp + 0x4c]
call fcn.004c5540
mov edx, dword [esp + 0x48]
mov dword [esp + 0x44], vtable.TagLib::String.0
mov eax, dword [edx + 4]
mov ecx, dword [eax]
mov eax, dword [edx + 4]
dec ecx
mov dword [eax], ecx
jne 0x50544e
mov ecx, dword [esp + 0x48]
push 1
mov eax, dword [ecx]
call dword [eax]
mov ecx, dword [esp + 0x60]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [edi]
mov ecx, edi
mov eax, dword [eax + 0x18]
call eax
test al, al
je 0x50522e
push 0
push str.FileStream::insert______read_only_file.
lea ecx, [esp + 0x58]
call fcn.004c5540
mov edx, dword [esp + 0x54]
mov dword [esp + 0x50], vtable.TagLib::String.0
mov eax, dword [edx + 4]
mov ecx, dword [eax]
mov eax, dword [edx + 4]
dec ecx
mov dword [eax], ecx
jne 0x50544e
mov ecx, dword [esp + 0x54]
push 1
mov eax, dword [ecx]
call dword [eax]
mov ecx, dword [esp + 0x60]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov ebx, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebx + 4]
mov edx, dword [eax + 0xc]
cmp edx, ecx
jne 0x505267
mov eax, dword [edi]
mov ecx, edi
push 0
push dword [ebp + 0xc]
call dword [eax + 0x20]
mov eax, dword [edi]
mov ecx, edi
push ebx
call dword [eax + 0xc]
mov ecx, dword [esp + 0x60]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
jae 0x5052a9
mov eax, dword [edi]
mov ecx, edi
mov esi, dword [ebp + 0xc]
push 0
push esi
call dword [eax + 0x20]
mov eax, dword [edi]
mov ecx, edi
push ebx
call dword [eax + 0xc]
mov eax, dword [ebx + 4]
mov ecx, dword [ebp + 0x10]
mov edx, dword [edi]
mov eax, dword [eax + 0xc]
sub ecx, eax
push ecx
add eax, esi
mov ecx, edi
push eax
call dword [edx + 0x14]
mov ecx, dword [esp + 0x60]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, edx
mov ebx, 0x400
sub eax, ecx
cmp eax, ebx
jbe 0x5052c9
mov ebx, edx
sub ebx, ecx
sub ebx, 0x401
shr ebx, 0xa
add ebx, 2
shl ebx, 0xa
mov eax, dword [ebp + 0xc]
push dword [ebp + 8]
mov dword [esp + 0x24], eax
add eax, ecx
lea ecx, [esp + 0x38]
mov dword [esp + 0x20], eax
call fcn.004c2c50
push 0
push ebx
lea ecx, [esp + 0x34]
mov dword [esp + 0x70], 0
call fcn.004c2bd0
mov byte [esp + 0x68], 1
mov esi, dword [esp + 0x30]
add esi, 0xc
mov eax, dword [edi]
mov ecx, edi
push 0
push dword [esp + 0x20]
call dword [eax + 0x20]
mov eax, dword [edi + 4]
lea ecx, [esp + 0x2c]
mov esi, dword [esi]
mov eax, dword [eax]
mov dword [esp + 0x24], eax
call fcn.004c3bf0
mov ecx, dword [esp + 0x30]
cmp dword [ecx + 0xc], 0
lea eax, [ecx + 0xc]
mov dword [esp + 0x18], eax
jbe 0x50533e
mov eax, dword [ecx + 4]
mov ecx, dword [ecx + 8]
add ecx, dword [eax]
jmp 0x505340
xor ecx, ecx
push 0
lea eax, [esp + 0x2c]
push eax
push esi
push ecx
push dword [esp + 0x34]
call dword [sym.imp.KERNEL32.dll_ReadFile]
neg eax
mov byte [esp + 0x14], 0
sbb esi, esi
mov eax, dword [esp + 0x18]
and esi, dword [esp + 0x28]
cmp esi, dword [eax]
je 0x5053a7
lea ecx, [esp + 0x2c]
call fcn.004c3bf0
mov ecx, dword [esp + 0x30]
lea edx, [ecx + 0xc]
mov dword [esp + 0x18], edx
mov eax, dword [ecx + 8]
add eax, dword [edx]
mov ecx, dword [ecx + 4]
push eax
call fcn.004c3c70
mov ecx, dword [esp + 0x30]
lea eax, [esp + 0x14]
push eax
mov eax, dword [ecx + 8]
mov ecx, dword [ecx + 4]
add eax, esi
push eax
call fcn.004c3cc0
mov eax, dword [esp + 0x18]
mov dword [eax], esi
add dword [esp + 0x1c], ebx
cmp esi, ebx
jae 0x5053b6
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x24]
mov eax, dword [edi]
mov ecx, edi
push 0
push dword [esp + 0x24]
call dword [eax + 0x20]
mov eax, dword [edi]
lea ecx, [esp + 0x34]
push ecx
mov ecx, edi
call dword [eax + 0xc]
test esi, esi
je 0x505421
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x20]
add ecx, dword [eax + 0xc]
lea eax, [esp + 0x2c]
mov dword [esp + 0x20], ecx
lea ecx, [esp + 0x3c]
push eax
call fcn.004c2c50
mov ecx, dword [esp + 0x38]
mov esi, dword [esp + 0x18]
mov edx, dword [eax + 4]
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x38], edx
mov dword [esp + 0x3c], vtable.TagLib::ByteVector.0
test ecx, ecx
je 0x505302
push ecx
call fcn.004c2ee0
jmp 0x505302
mov byte [esp + 0x68], 0
push ecx
mov ecx, dword [esp + 0x34]
call fcn.004c2ee0
mov dword [esp + 0x68], 0xffffffff
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x34], vtable.TagLib::ByteVector.0
test ecx, ecx
je 0x50544e
push ecx
call fcn.004c2ee0
mov ecx, dword [esp + 0x60]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc