Function at 0x42a380
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 0x42a3d5
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 0x42a624
mov eax, dword [ebp - 4]
test eax, eax
je 0x42a624
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 0x42a66a
test bl, bl
jns 0x42a630
cmp ebx, 0xfe
jne 0x42a42f
cmp edi, ecx
jb 0x42a40f
mov ecx, esi
call fcn.0042a870
test eax, eax
js 0x42a624
mov eax, dword [esi + 4]
mov cl, byte [eax]
inc eax
mov dword [esi + 4], eax
cmp cl, 0xff
jne 0x42a624
mov eax, dword [ebp + 0xc]
mov dword [eax], 1
jmp 0x42a390
cmp al, 0xff
jne 0x42a466
cmp edi, ecx
jb 0x42a446
mov ecx, esi
call fcn.0042a870
test eax, eax
js 0x42a624
mov eax, dword [esi + 4]
mov cl, byte [eax]
inc eax
mov dword [esi + 4], eax
cmp cl, 0xfe
jne 0x42a624
mov eax, dword [ebp + 0xc]
mov dword [eax], 2
jmp 0x42a390
mov eax, ebx
and eax, 0xe0
cmp al, 0xc0
je 0x42a5de
mov eax, ebx
and eax, 0xf0
cmp al, 0xe0
jne 0x42a511
cmp edi, ecx
jb 0x42a497
mov ecx, esi
call fcn.0042a870
test eax, eax
js 0x42a624
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 0x42a624
and ebx, 0xf
and ecx, 0x3f
shl ebx, 6
or ebx, ecx
mov edi, ebx
cmp edx, dword [esi + 8]
jb 0x42a4d0
mov ecx, esi
call fcn.0042a870
test eax, eax
js 0x42a624
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 0x42a624
and ebx, 0x3f
shl edi, 6
or ebx, edi
cmp ebx, 0x800
jb 0x42a616
cmp ebx, 0xfeff
je 0x42a390
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 0x42a624
cmp edi, ecx
jb 0x42a533
mov ecx, esi
call fcn.0042a870
test eax, eax
js 0x42a624
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 0x42a624
and ebx, 7
and ecx, 0x3f
shl ebx, 6
or ebx, ecx
cmp edx, dword [esi + 8]
jb 0x42a56a
mov ecx, esi
call fcn.0042a870
test eax, eax
js 0x42a624
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 0x42a624
and edi, 0x3f
shl ebx, 6
or edi, ebx
cmp ecx, dword [esi + 8]
jb 0x42a59e
mov ecx, esi
call fcn.0042a870
test eax, eax
js 0x42a624
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 0x42a624
and ebx, 0x3f
shl edi, 6
or ebx, edi
cmp ebx, 0x10000
jae 0x42a803
push ebx
push str.Invalid_UTF_8_sequence_for_character_0x_04x_
call fcn.0042a040
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
cmp edi, ecx
jb 0x42a5ed
mov ecx, esi
call fcn.0042a870
test eax, eax
js 0x42a624
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 0x42a624
and ebx, 0x1f
and ecx, 0x3f
shl ebx, 6
or ebx, ecx
cmp ebx, 0x80
jae 0x42a803
push ebx
push str.Invalid_UTF_8_sequence_for_character_0x_04x_
call fcn.0042a040
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
cmp al, 0x20
jae 0x42a803
cmp al, 0xa
je 0x42a803
cmp al, 0xd
je 0x42a803
cmp al, 9
je 0x42a803
push ebx
push str.Bad_control_character_0x_02x_not_allowed_by_XML_standard_
call fcn.0042a040
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
sub edx, 1
je 0x42a73b
sub edx, 1
jne 0x42a803
cmp edi, ecx
jb 0x42a68b
mov ecx, esi
call fcn.0042a870
test eax, eax
js 0x42a624
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 0x42a6b6
cmp ecx, 0xa
je 0x42a6b6
cmp ecx, 0xd
je 0x42a6b6
cmp ecx, 9
jne 0x42a773
lea eax, [ecx - 0xd800]
cmp eax, 0x3ff
ja 0x42a803
cmp edx, dword [esi + 8]
jb 0x42a6db
mov ecx, esi
call fcn.0042a870
test eax, eax
js 0x42a624
mov eax, dword [esi + 4]
movzx edi, byte [eax]
inc eax
mov dword [esi + 4], eax
cmp eax, dword [esi + 8]
jb 0x42a6f9
mov ecx, esi
call fcn.0042a870
test eax, eax
js 0x42a624
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 0x42a624
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 0x42a74e
mov ecx, esi
call fcn.0042a870
test eax, eax
js 0x42a624
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 0x42a78d
cmp ebx, 0xa
je 0x42a78d
cmp ebx, 0xd
je 0x42a78d
cmp ebx, 9
je 0x42a78d
push ebx
push str.Bad_control_character_0x_02x_not_allowed_by_XML_standard_
call fcn.0042a040
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 0x42a803
cmp edx, dword [esi + 8]
jb 0x42a7ae
mov ecx, esi
call fcn.0042a870
test eax, eax
js 0x42a624
mov eax, dword [esi + 4]
movzx edi, byte [eax]
inc eax
mov dword [esi + 4], eax
cmp eax, dword [esi + 8]
jb 0x42a7cc
mov ecx, esi
call fcn.0042a870
test eax, eax
js 0x42a624
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 0x42a624
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