Function at 0x4d5a20
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
nop
mov edi, dword [esi + 4]
mov ecx, dword [esi + 8]
cmp edi, ecx
jb 0x4d5a77
push 0
push 0
push 0x2000
lea edi, [esi + 0xc]
push edi
lea eax, [esp + 0x20]
push eax
push 0
push 0
push 0
push dword [esi]
call dword [sym.imp.ntdll.dll_NtReadFile]
test eax, eax
js 0x4d5cc6
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4d5cc6
lea ecx, [edi + eax]
mov dword [esi + 4], edi
mov dword [esi + 8], ecx
mov al, byte [edi]
inc edi
mov edx, dword [ebp + 0xc]
mov dword [esi + 4], edi
movzx ebx, al
mov edx, dword [edx]
sub edx, 0
jne 0x4d5d0c
test bl, bl
jns 0x4d5cd2
cmp ebx, 0xfe
jne 0x4d5ad1
cmp edi, ecx
jb 0x4d5ab1
mov ecx, esi
call fcn.004d5f10
test eax, eax
js 0x4d5cc6
mov eax, dword [esi + 4]
mov cl, byte [eax]
inc eax
mov dword [esi + 4], eax
cmp cl, 0xff
jne 0x4d5cc6
mov eax, dword [ebp + 0xc]
mov dword [eax], 1
jmp 0x4d5a30
cmp al, 0xff
jne 0x4d5b08
cmp edi, ecx
jb 0x4d5ae8
mov ecx, esi
call fcn.004d5f10
test eax, eax
js 0x4d5cc6
mov eax, dword [esi + 4]
mov cl, byte [eax]
inc eax
mov dword [esi + 4], eax
cmp cl, 0xfe
jne 0x4d5cc6
mov eax, dword [ebp + 0xc]
mov dword [eax], 2
jmp 0x4d5a30
mov eax, ebx
and eax, 0xe0
cmp al, 0xc0
je 0x4d5c80
mov eax, ebx
and eax, 0xf0
cmp al, 0xe0
jne 0x4d5bb3
cmp edi, ecx
jb 0x4d5b39
mov ecx, esi
call fcn.004d5f10
test eax, eax
js 0x4d5cc6
mov eax, dword [esi + 4]
movzx ecx, byte [eax]
lea edx, [eax + 1]
mov eax, ecx
mov dword [esi + 4], edx
and al, 0xc0
cmp al, 0x80
jne 0x4d5cc6
and ebx, 0xf
and ecx, 0x3f
shl ebx, 6
or ebx, ecx
mov edi, ebx
cmp edx, dword [esi + 8]
jb 0x4d5b72
mov ecx, esi
call fcn.004d5f10
test eax, eax
js 0x4d5cc6
mov eax, dword [esi + 4]
movzx ebx, byte [eax]
inc eax
mov dword [esi + 4], eax
mov eax, ebx
and al, 0xc0
cmp al, 0x80
jne 0x4d5cc6
and ebx, 0x3f
shl edi, 6
or ebx, edi
cmp ebx, 0x800
jb 0x4d5cb8
cmp ebx, 0xfeff
je 0x4d5a30
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov eax, ebx
and eax, 0xf8
cmp al, 0xf0
jne 0x4d5cc6
cmp edi, ecx
jb 0x4d5bd5
mov ecx, esi
call fcn.004d5f10
test eax, eax
js 0x4d5cc6
mov eax, dword [esi + 4]
movzx ecx, byte [eax]
lea edx, [eax + 1]
mov eax, ecx
mov dword [esi + 4], edx
and al, 0xc0
cmp al, 0x80
jne 0x4d5cc6
and ebx, 7
and ecx, 0x3f
shl ebx, 6
or ebx, ecx
cmp edx, dword [esi + 8]
jb 0x4d5c0c
mov ecx, esi
call fcn.004d5f10
test eax, eax
js 0x4d5cc6
mov eax, dword [esi + 4]
movzx edi, byte [eax]
lea ecx, [eax + 1]
mov eax, edi
mov dword [esi + 4], ecx
and al, 0xc0
cmp al, 0x80
jne 0x4d5cc6
and edi, 0x3f
shl ebx, 6
or edi, ebx
cmp ecx, dword [esi + 8]
jb 0x4d5c40
mov ecx, esi
call fcn.004d5f10
test eax, eax
js 0x4d5cc6
mov eax, dword [esi + 4]
movzx ebx, byte [eax]
inc eax
mov dword [esi + 4], eax
mov eax, ebx
and al, 0xc0
cmp al, 0x80
jne 0x4d5cc6
and ebx, 0x3f
shl edi, 6
or ebx, edi
cmp ebx, 0x10000
jae 0x4d5ea5
push ebx
push str.Invalid_UTF_8_sequence_for_character_0x_04x_
call fcn.004d5730
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
cmp edi, ecx
jb 0x4d5c8f
mov ecx, esi
call fcn.004d5f10
test eax, eax
js 0x4d5cc6
mov eax, dword [esi + 4]
movzx ecx, byte [eax]
inc eax
mov dword [esi + 4], eax
mov eax, ecx
and al, 0xc0
cmp al, 0x80
jne 0x4d5cc6
and ebx, 0x1f
and ecx, 0x3f
shl ebx, 6
or ebx, ecx
cmp ebx, 0x80
jae 0x4d5ea5
push ebx
push str.Invalid_UTF_8_sequence_for_character_0x_04x_
call fcn.004d5730
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
cmp al, 0x20
jae 0x4d5ea5
cmp al, 0xa
je 0x4d5ea5
cmp al, 0xd
je 0x4d5ea5
cmp al, 9
je 0x4d5ea5
push ebx
push str.Bad_control_character_0x_02x_not_allowed_by_XML_standard_
call fcn.004d5730
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
sub edx, 1
je 0x4d5ddd
sub edx, 1
jne 0x4d5ea5
cmp edi, ecx
jb 0x4d5d2d
mov ecx, esi
call fcn.004d5f10
test eax, eax
js 0x4d5cc6
mov eax, dword [esi + 4]
movzx ecx, byte [eax]
lea edx, [eax + 1]
shl ecx, 8
or ecx, ebx
mov dword [esi + 4], edx
mov ebx, ecx
cmp ecx, 0x20
jae 0x4d5d58
cmp ecx, 0xa
je 0x4d5d58
cmp ecx, 0xd
je 0x4d5d58
cmp ecx, 9
jne 0x4d5e15
lea eax, [ecx - 0xd800]
cmp eax, 0x3ff
ja 0x4d5ea5
cmp edx, dword [esi + 8]
jb 0x4d5d7d
mov ecx, esi
call fcn.004d5f10
test eax, eax
js 0x4d5cc6
mov eax, dword [esi + 4]
movzx edi, byte [eax]
inc eax
mov dword [esi + 4], eax
cmp eax, dword [esi + 8]
jb 0x4d5d9b
mov ecx, esi
call fcn.004d5f10
test eax, eax
js 0x4d5cc6
mov eax, dword [esi + 4]
movzx ecx, byte [eax]
inc eax
shl ecx, 8
or ecx, edi
mov dword [esi + 4], eax
lea eax, [ecx - 0xdc00]
cmp eax, 0x3fe
ja 0x4d5cc6
and ebx, 0x3ff
and ecx, 0x3ff
shl ebx, 0xa
or ebx, ecx
add ebx, 0x10000
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
cmp edi, ecx
jb 0x4d5df0
mov ecx, esi
call fcn.004d5f10
test eax, eax
js 0x4d5cc6
mov eax, dword [esi + 4]
shl ebx, 8
movzx ecx, byte [eax]
lea edx, [eax + 1]
or ebx, ecx
mov dword [esi + 4], edx
cmp ebx, 0x20
jae 0x4d5e2f
cmp ebx, 0xa
je 0x4d5e2f
cmp ebx, 0xd
je 0x4d5e2f
cmp ebx, 9
je 0x4d5e2f
push ebx
push str.Bad_control_character_0x_02x_not_allowed_by_XML_standard_
call fcn.004d5730
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
lea eax, [ebx - 0xd800]
cmp eax, 0x3ff
ja 0x4d5ea5
cmp edx, dword [esi + 8]
jb 0x4d5e50
mov ecx, esi
call fcn.004d5f10
test eax, eax
js 0x4d5cc6
mov eax, dword [esi + 4]
movzx edi, byte [eax]
inc eax
mov dword [esi + 4], eax
cmp eax, dword [esi + 8]
jb 0x4d5e6e
mov ecx, esi
call fcn.004d5f10
test eax, eax
js 0x4d5cc6
mov eax, dword [esi + 4]
shl edi, 8
movzx ecx, byte [eax]
inc eax
or edi, ecx
mov dword [esi + 4], eax
lea eax, [edi - 0xdc00]
cmp eax, 0x3fe
ja 0x4d5cc6
and ebx, 0x3ff
and edi, 0x3ff
shl ebx, 0xa
or ebx, edi
add ebx, 0x10000
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret 8