Function at 0x427370
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
lea esp, [esp]
mov edi, dword [esi + 4]
mov ecx, dword [esi + 8]
cmp edi, ecx
jb 0x4273c5
push 0
push 0
push 0x2000
lea edi, [esi + 0xc]
push edi
lea eax, [ebp - 8]
push eax
push 0
push 0
push 0
push dword [esi]
call dword [sym.imp.ntdll.dll_NtReadFile]
test eax, eax
js 0x427614
mov eax, dword [ebp - 4]
test eax, eax
je 0x427614
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 0x42765a
test bl, bl
jns 0x427620
cmp ebx, 0xfe
jne 0x42741f
cmp edi, ecx
jb 0x4273ff
mov ecx, esi
call fcn.00427860
test eax, eax
js 0x427614
mov eax, dword [esi + 4]
mov cl, byte [eax]
inc eax
mov dword [esi + 4], eax
cmp cl, 0xff
jne 0x427614
mov eax, dword [ebp + 0xc]
mov dword [eax], 1
jmp 0x427380
cmp al, 0xff
jne 0x427456
cmp edi, ecx
jb 0x427436
mov ecx, esi
call fcn.00427860
test eax, eax
js 0x427614
mov eax, dword [esi + 4]
mov cl, byte [eax]
inc eax
mov dword [esi + 4], eax
cmp cl, 0xfe
jne 0x427614
mov eax, dword [ebp + 0xc]
mov dword [eax], 2
jmp 0x427380
mov eax, ebx
and eax, 0xe0
cmp al, 0xc0
je 0x4275ce
mov eax, ebx
and eax, 0xf0
cmp al, 0xe0
jne 0x427501
cmp edi, ecx
jb 0x427487
mov ecx, esi
call fcn.00427860
test eax, eax
js 0x427614
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 0x427614
and ebx, 0xf
and ecx, 0x3f
shl ebx, 6
or ebx, ecx
mov edi, ebx
cmp edx, dword [esi + 8]
jb 0x4274c0
mov ecx, esi
call fcn.00427860
test eax, eax
js 0x427614
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 0x427614
and ebx, 0x3f
shl edi, 6
or ebx, edi
cmp ebx, 0x800
jb 0x427606
cmp ebx, 0xfeff
je 0x427380
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 0x427614
cmp edi, ecx
jb 0x427523
mov ecx, esi
call fcn.00427860
test eax, eax
js 0x427614
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 0x427614
and ebx, 7
and ecx, 0x3f
shl ebx, 6
or ebx, ecx
cmp edx, dword [esi + 8]
jb 0x42755a
mov ecx, esi
call fcn.00427860
test eax, eax
js 0x427614
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 0x427614
and edi, 0x3f
shl ebx, 6
or edi, ebx
cmp ecx, dword [esi + 8]
jb 0x42758e
mov ecx, esi
call fcn.00427860
test eax, eax
js 0x427614
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 0x427614
and ebx, 0x3f
shl edi, 6
or ebx, edi
cmp ebx, 0x10000
jae 0x4277f3
push ebx
push str.Invalid_UTF_8_sequence_for_character_0x_04x_
call fcn.004270a0
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
cmp edi, ecx
jb 0x4275dd
mov ecx, esi
call fcn.00427860
test eax, eax
js 0x427614
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 0x427614
and ebx, 0x1f
and ecx, 0x3f
shl ebx, 6
or ebx, ecx
cmp ebx, 0x80
jae 0x4277f3
push ebx
push str.Invalid_UTF_8_sequence_for_character_0x_04x_
call fcn.004270a0
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
cmp al, 0x20
jae 0x4277f3
cmp al, 0xa
je 0x4277f3
cmp al, 0xd
je 0x4277f3
cmp al, 9
je 0x4277f3
push ebx
push str.Bad_control_character_0x_02x_not_allowed_by_XML_standard_
call fcn.004270a0
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
sub edx, 1
je 0x42772b
sub edx, 1
jne 0x4277f3
cmp edi, ecx
jb 0x42767b
mov ecx, esi
call fcn.00427860
test eax, eax
js 0x427614
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 0x4276a6
cmp ecx, 0xa
je 0x4276a6
cmp ecx, 0xd
je 0x4276a6
cmp ecx, 9
jne 0x427763
lea eax, [ecx - 0xd800]
cmp eax, 0x3ff
ja 0x4277f3
cmp edx, dword [esi + 8]
jb 0x4276cb
mov ecx, esi
call fcn.00427860
test eax, eax
js 0x427614
mov eax, dword [esi + 4]
movzx edi, byte [eax]
inc eax
mov dword [esi + 4], eax
cmp eax, dword [esi + 8]
jb 0x4276e9
mov ecx, esi
call fcn.00427860
test eax, eax
js 0x427614
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 0x427614
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 0x42773e
mov ecx, esi
call fcn.00427860
test eax, eax
js 0x427614
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 0x42777d
cmp ebx, 0xa
je 0x42777d
cmp ebx, 0xd
je 0x42777d
cmp ebx, 9
je 0x42777d
push ebx
push str.Bad_control_character_0x_02x_not_allowed_by_XML_standard_
call fcn.004270a0
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 0x4277f3
cmp edx, dword [esi + 8]
jb 0x42779e
mov ecx, esi
call fcn.00427860
test eax, eax
js 0x427614
mov eax, dword [esi + 4]
movzx edi, byte [eax]
inc eax
mov dword [esi + 4], eax
cmp eax, dword [esi + 8]
jb 0x4277bc
mov ecx, esi
call fcn.00427860
test eax, eax
js 0x427614
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 0x427614
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