Function at 0x1400c9865
Capabilities:
Read file on windows

Disassembly:
jmp 0x140227270
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov dword [rsp + 8], ecx
sub rsp, 0xf8
movsxd rax, dword [rsp + 0x100]
cmp rax, 0xfffffffffffffffe
jne 0x1402272b3
call fcn.1400cb7fa
mov dword [rax], 0
call fcn.1400c9f54
mov dword [rax], 9
mov eax, 0xffffffff
jmp 0x140228021
cmp dword [rsp + 0x100], 0
jl 0x1402272d9
mov eax, dword [0x1402c43cc]
cmp dword [rsp + 0x100], eax
jae 0x1402272d9
mov dword [rsp + 0x88], 1
jmp 0x1402272e4
mov dword [rsp + 0x88], 0
mov eax, dword [rsp + 0x88]
mov dword [rsp + 0x8c], eax
cmp dword [rsp + 0x8c], 0
jne 0x140227336
lea rax, str.fh___0___unsigned_fh____unsigned__nhandle
mov qword [rsp + 0x28], rax
lea rax, [0x140275ea8]
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov r8d, 0x19e
lea rdx, [0x140297620]
mov ecx, 2
call fcn.1400c8a32
cmp eax, 1
jne 0x140227336
int3
cmp dword [rsp + 0x8c], 0
jne 0x140227389
call fcn.1400cb7fa
mov dword [rax], 0
call fcn.1400c9f54
mov dword [rax], 9
mov qword [rsp + 0x20], 0
mov r9d, 0x19e
lea r8, [0x140297620]
lea rdx, str._read_nolock
lea rcx, str.fh___0___unsigned_fh____unsigned__nhandle
call fcn.1400ccaf6
mov eax, 0xffffffff
jmp 0x140228021
mov eax, dword [rsp + 0x100]
sar eax, 6
cdqe
lea rcx, [0x1402c3f00]
mov edx, dword [rsp + 0x100]
and edx, 0x3f
movsxd rdx, edx
imul rdx, rdx, 0x48
mov rax, qword [rcx + rax*8]
movzx eax, byte [rax + rdx + 0x38]
and eax, 1
test eax, eax
je 0x1402273c7
mov dword [rsp + 0x54], 1
jmp 0x1402273cf
mov dword [rsp + 0x54], 0
mov eax, dword [rsp + 0x54]
mov dword [rsp + 0x58], eax
cmp dword [rsp + 0x58], 0
jne 0x140227418
lea rax, str._osfile_fh___FOPEN
mov qword [rsp + 0x28], rax
lea rax, [0x140275ea8]
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov r8d, 0x19f
lea rdx, [0x140297620]
mov ecx, 2
call fcn.1400c8a32
cmp eax, 1
jne 0x140227418
int3
cmp dword [rsp + 0x58], 0
jne 0x140227468
call fcn.1400cb7fa
mov dword [rax], 0
call fcn.1400c9f54
mov dword [rax], 9
mov qword [rsp + 0x20], 0
mov r9d, 0x19f
lea r8, [0x140297620]
lea rdx, str._read_nolock
lea rcx, str._osfile_fh___FOPEN
call fcn.1400ccaf6
mov eax, 0xffffffff
jmp 0x140228021
cmp dword [rsp + 0x110], 0x7fffffff
ja 0x14022747f
mov dword [rsp + 0x5c], 1
jmp 0x140227487
mov dword [rsp + 0x5c], 0
mov eax, dword [rsp + 0x5c]
mov dword [rsp + 0x60], eax
cmp dword [rsp + 0x60], 0
jne 0x1402274d0
lea rax, str.result_buffer_size___INT_MAX
mov qword [rsp + 0x28], rax
lea rax, [0x140275ea8]
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov r8d, 0x1a0
lea rdx, [0x140297620]
mov ecx, 2
call fcn.1400c8a32
cmp eax, 1
jne 0x1402274d0
int3
cmp dword [rsp + 0x60], 0
jne 0x140227520
call fcn.1400cb7fa
mov dword [rax], 0
call fcn.1400c9f54
mov dword [rax], 0x16
mov qword [rsp + 0x20], 0
mov r9d, 0x1a0
lea r8, [0x140297620]
lea rdx, str._read_nolock
lea rcx, str.result_buffer_size___INT_MAX
call fcn.1400ccaf6
mov eax, 0xffffffff
jmp 0x140228021
cmp dword [rsp + 0x110], 0
je 0x14022755e
mov eax, dword [rsp + 0x100]
sar eax, 6
cdqe
lea rcx, [0x1402c3f00]
mov edx, dword [rsp + 0x100]
and edx, 0x3f
movsxd rdx, edx
imul rdx, rdx, 0x48
mov rax, qword [rcx + rax*8]
movzx eax, byte [rax + rdx + 0x38]
and eax, 2
test eax, eax
je 0x140227565
xor eax, eax
jmp 0x140228021
cmp qword [rsp + 0x108], 0
je 0x14022757a
mov dword [rsp + 0x64], 1
jmp 0x140227582
mov dword [rsp + 0x64], 0
mov eax, dword [rsp + 0x64]
mov dword [rsp + 0x68], eax
cmp dword [rsp + 0x68], 0
jne 0x1402275cb
lea rax, str.result_buffer___nullptr
mov qword [rsp + 0x28], rax
lea rax, [0x140275ea8]
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov r8d, 0x1a6
lea rdx, [0x140297620]
mov ecx, 2
call fcn.1400c8a32
cmp eax, 1
jne 0x1402275cb
int3
cmp dword [rsp + 0x68], 0
jne 0x14022761b
call fcn.1400cb7fa
mov dword [rax], 0
call fcn.1400c9f54
mov dword [rax], 0x16
mov qword [rsp + 0x20], 0
mov r9d, 0x1a6
lea r8, [0x140297620]
lea rdx, str._read_nolock
lea rcx, str.result_buffer___nullptr
call fcn.1400ccaf6
mov eax, 0xffffffff
jmp 0x140228021
mov eax, dword [rsp + 0x100]
sar eax, 6
cdqe
lea rcx, [0x1402c3f00]
mov edx, dword [rsp + 0x100]
and edx, 0x3f
movsxd rdx, edx
imul rdx, rdx, 0x48
mov rax, qword [rcx + rax*8]
mov rax, qword [rax + rdx + 0x28]
mov qword [rsp + 0xc0], rax
mov eax, dword [rsp + 0x100]
sar eax, 6
cdqe
lea rcx, [0x1402c3f00]
mov edx, dword [rsp + 0x100]
and edx, 0x3f
movsxd rdx, edx
imul rdx, rdx, 0x48
mov rax, qword [rcx + rax*8]
movzx eax, byte [rax + rdx + 0x39]
mov byte [rsp + 0x30], al
xor edx, edx
lea rcx, [rsp + 0x48]
call fcn.1400ca8b9
movzx eax, byte [rsp + 0x30]
mov byte [rsp + 0x6c], al
cmp byte [rsp + 0x6c], 1
je 0x1402276ad
cmp byte [rsp + 0x6c], 2
je 0x1402278ab
jmp 0x1402279a6
xor edx, edx
mov eax, dword [rsp + 0x110]
mov ecx, 2
div ecx
mov eax, edx
test eax, eax
jne 0x1402276cd
mov dword [rsp + 0x70], 1
jmp 0x1402276d5
mov dword [rsp + 0x70], 0
mov eax, dword [rsp + 0x70]
mov dword [rsp + 0x74], eax
cmp dword [rsp + 0x74], 0
jne 0x14022771e
lea rax, str.result_buffer_size___2__0
mov qword [rsp + 0x28], rax
lea rax, [0x140275ea8]
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov r8d, 0x1c6
lea rdx, [0x140297620]
mov ecx, 2
call fcn.1400c8a32
cmp eax, 1
jne 0x14022771e
int3
cmp dword [rsp + 0x74], 0
jne 0x140227785
call fcn.1400cb7fa
mov dword [rax], 0
call fcn.1400c9f54
mov dword [rax], 0x16
mov qword [rsp + 0x20], 0
mov r9d, 0x1c6
lea r8, [0x140297620]
lea rdx, str._read_nolock
lea rcx, str.result_buffer_size___2__0
call fcn.1400ccaf6
mov dword [rsp + 0xb8], 0xffffffff
lea rcx, [rsp + 0x48]
call fcn.1400c8dbb
mov eax, dword [rsp + 0xb8]
jmp 0x140228021
xor edx, edx
mov eax, dword [rsp + 0x110]
mov ecx, 2
div ecx
cmp eax, 4
jae 0x1402277a4
mov dword [rsp + 0x78], 4
jmp 0x1402277b8
xor edx, edx
mov eax, dword [rsp + 0x110]
mov ecx, 2
div ecx
mov dword [rsp + 0x78], eax
mov eax, dword [rsp + 0x78]
mov dword [rsp + 0x34], eax
mov eax, dword [rsp + 0x34]
mov r9d, 0x1cc
lea r8, str.minkernelcrtsucrt_src_appcrtlowio_read.cpp
mov edx, 2
mov ecx, eax
call fcn.1400caae4
mov rdx, rax
lea rcx, [rsp + 0xd8]
call fcn.1400ca8b9
mov rdx, rax
lea rcx, [rsp + 0x48]
call fcn.1400ccdfd
lea rcx, [rsp + 0xd8]
call fcn.1400c8dbb
lea rcx, [rsp + 0x48]
call fcn.1400cb46c
mov qword [rsp + 0x40], rax
cmp qword [rsp + 0x40], 0
jne 0x140227855
call fcn.1400c9f54
mov dword [rax], 0xc
call fcn.1400cb7fa
mov dword [rax], 8
mov dword [rsp + 0xbc], 0xffffffff
lea rcx, [rsp + 0x48]
call fcn.1400c8dbb
mov eax, dword [rsp + 0xbc]
jmp 0x140228021
mov r8d, 1
xor edx, edx
mov ecx, dword [rsp + 0x100]
call fcn.1400c8e79
mov qword [rsp + 0xe0], rax
mov eax, dword [rsp + 0x100]
sar eax, 6
cdqe
lea rcx, [0x1402c3f00]
mov edx, dword [rsp + 0x100]
and edx, 0x3f
movsxd rdx, edx
imul rdx, rdx, 0x48
mov rax, qword [rcx + rax*8]
mov rcx, qword [rsp + 0xe0]
mov qword [rax + rdx + 0x30], rcx
jmp 0x1402279be
xor edx, edx
mov eax, dword [rsp + 0x110]
mov ecx, 2
div ecx
mov eax, edx
test eax, eax
jne 0x1402278cb
mov dword [rsp + 0x7c], 1
jmp 0x1402278d3
mov dword [rsp + 0x7c], 0
mov eax, dword [rsp + 0x7c]
mov dword [rsp + 0x80], eax
cmp dword [rsp + 0x80], 0
jne 0x140227922
lea rax, str._result_buffer_size___2___0
mov qword [rsp + 0x28], rax
lea rax, [0x140275ea8]
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov r8d, 0x1da
lea rdx, [0x140297620]
mov ecx, 2
call fcn.1400c8a32
cmp eax, 1
jne 0x140227922
int3
cmp dword [rsp + 0x80], 0
jne 0x14022798c
call fcn.1400cb7fa
mov dword [rax], 0
call fcn.1400c9f54
mov dword [rax], 0x16
mov qword [rsp + 0x20], 0
mov r9d, 0x1da
lea r8, [0x140297620]
lea rdx, str._read_nolock
lea rcx, str._result_buffer_size___2___0
call fcn.1400ccaf6
mov dword [rsp + 0x90], 0xffffffff
lea rcx, [rsp + 0x48]
call fcn.1400c8dbb
mov eax, dword [rsp + 0x90]
jmp 0x140228021
mov eax, dword [rsp + 0x110]
mov dword [rsp + 0x34], eax
mov rax, qword [rsp + 0x108]
mov qword [rsp + 0x40], rax
jmp 0x1402279be
mov eax, dword [rsp + 0x110]
mov dword [rsp + 0x34], eax
mov rax, qword [rsp + 0x108]
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0xc8], rax
mov dword [rsp + 0x38], 0
mov eax, dword [rsp + 0x100]
sar eax, 6
cdqe
lea rcx, [0x1402c3f00]
mov edx, dword [rsp + 0x100]
and edx, 0x3f
movsxd rdx, edx
imul rdx, rdx, 0x48
mov rax, qword [rcx + rax*8]
movzx eax, byte [rax + rdx + 0x38]
and eax, 0x48
test eax, eax
je 0x140227cd6
mov eax, dword [rsp + 0x100]
sar eax, 6
cdqe
lea rcx, [0x1402c3f00]
mov edx, dword [rsp + 0x100]
and edx, 0x3f
movsxd rdx, edx
imul rdx, rdx, 0x48
mov rax, qword [rcx + rax*8]
add rax, rdx
mov ecx, 1
imul rcx, rcx, 0
movsx eax, byte [rax + rcx + 0x3a]
cmp eax, 0xa
je 0x140227cd6
cmp dword [rsp + 0x34], 0
je 0x140227cd6
mov eax, dword [rsp + 0x100]
sar eax, 6
cdqe
lea rcx, [0x1402c3f00]
mov edx, dword [rsp + 0x100]
and edx, 0x3f
movsxd rdx, edx
imul rdx, rdx, 0x48
add rdx, qword [rcx + rax*8]
mov rax, rdx
mov ecx, 1
imul rcx, rcx, 0
mov rdx, qword [rsp + 0x40]
movzx eax, byte [rax + rcx + 0x3a]
mov byte [rdx], al
mov rax, qword [rsp + 0x40]
inc rax
mov qword [rsp + 0x40], rax
mov eax, dword [rsp + 0x38]
inc eax
mov dword [rsp + 0x38], eax
mov eax, dword [rsp + 0x34]
dec eax
mov dword [rsp + 0x34], eax
mov eax, dword [rsp + 0x100]
sar eax, 6
cdqe
lea rcx, [0x1402c3f00]
mov edx, dword [rsp + 0x100]
and edx, 0x3f
movsxd rdx, edx
imul rdx, rdx, 0x48
add rdx, qword [rcx + rax*8]
mov rax, rdx
mov ecx, 1
imul rcx, rcx, 0
mov byte [rax + rcx + 0x3a], 0xa
cmp byte [rsp + 0x30], 0
je 0x140227cd6
mov eax, dword [rsp + 0x100]
sar eax, 6
cdqe
lea rcx, [0x1402c3f00]
mov edx, dword [rsp + 0x100]
and edx, 0x3f
movsxd rdx, edx
imul rdx, rdx, 0x48
mov rax, qword [rcx + rax*8]
add rax, rdx
mov ecx, 1
imul rcx, rcx, 1
movsx eax, byte [rax + rcx + 0x3a]
cmp eax, 0xa
je 0x140227cd6
cmp dword [rsp + 0x34], 0
je 0x140227cd6
mov eax, dword [rsp + 0x100]
sar eax, 6
cdqe
lea rcx, [0x1402c3f00]
mov edx, dword [rsp + 0x100]
and edx, 0x3f
movsxd rdx, edx
imul rdx, rdx, 0x48
add rdx, qword [rcx + rax*8]
mov rax, rdx
mov ecx, 1
imul rcx, rcx, 1
mov rdx, qword [rsp + 0x40]
movzx eax, byte [rax + rcx + 0x3a]
mov byte [rdx], al
mov rax, qword [rsp + 0x40]
inc rax
mov qword [rsp + 0x40], rax
mov eax, dword [rsp + 0x38]
inc eax
mov dword [rsp + 0x38], eax
mov eax, dword [rsp + 0x34]
dec eax
mov dword [rsp + 0x34], eax
mov eax, dword [rsp + 0x100]
sar eax, 6
cdqe
lea rcx, [0x1402c3f00]
mov edx, dword [rsp + 0x100]
and edx, 0x3f
movsxd rdx, edx
imul rdx, rdx, 0x48
add rdx, qword [rcx + rax*8]
mov rax, rdx
mov ecx, 1
imul rcx, rcx, 1
mov byte [rax + rcx + 0x3a], 0xa
cmp byte [rsp + 0x30], 1
jne 0x140227cd6
mov eax, dword [rsp + 0x100]
sar eax, 6
cdqe
lea rcx, [0x1402c3f00]
mov edx, dword [rsp + 0x100]
and edx, 0x3f
movsxd rdx, edx
imul rdx, rdx, 0x48
mov rax, qword [rcx + rax*8]
add rax, rdx
mov ecx, 1
imul rcx, rcx, 2
movsx eax, byte [rax + rcx + 0x3a]
cmp eax, 0xa
je 0x140227cd6
cmp dword [rsp + 0x34], 0
je 0x140227cd6
mov eax, dword [rsp + 0x100]
sar eax, 6
cdqe
lea rcx, [0x1402c3f00]
mov edx, dword [rsp + 0x100]
and edx, 0x3f
movsxd rdx, edx
imul rdx, rdx, 0x48
add rdx, qword [rcx + rax*8]
mov rax, rdx
mov ecx, 1
imul rcx, rcx, 2
mov rdx, qword [rsp + 0x40]
movzx eax, byte [rax + rcx + 0x3a]
mov byte [rdx], al
mov rax, qword [rsp + 0x40]
inc rax
mov qword [rsp + 0x40], rax
mov eax, dword [rsp + 0x38]
inc eax
mov dword [rsp + 0x38], eax
mov eax, dword [rsp + 0x34]
dec eax
mov dword [rsp + 0x34], eax
mov eax, dword [rsp + 0x100]
sar eax, 6
cdqe
lea rcx, [0x1402c3f00]
mov edx, dword [rsp + 0x100]
and edx, 0x3f
movsxd rdx, edx
imul rdx, rdx, 0x48
add rdx, qword [rcx + rax*8]
mov rax, rdx
mov ecx, 1
imul rcx, rcx, 2
mov byte [rax + rcx + 0x3a], 0xa
mov ecx, dword [rsp + 0x100]
call fcn.1400cdbe5
test eax, eax
je 0x140227d3d
mov eax, dword [rsp + 0x100]
sar eax, 6
cdqe
lea rcx, [0x1402c3f00]
mov edx, dword [rsp + 0x100]
and edx, 0x3f
movsxd rdx, edx
imul rdx, rdx, 0x48
mov rax, qword [rcx + rax*8]
movzx eax, byte [rax + rdx + 0x38]
and eax, 0x80
test eax, eax
je 0x140227d3d
lea rdx, [rsp + 0xd0]
mov rcx, qword [rsp + 0xc0]
call qword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x140227d3d
mov byte [rsp + 0x3c], 1
jmp 0x140227d42
mov byte [rsp + 0x3c], 0
movzx eax, byte [rsp + 0x3c]
mov byte [rsp + 0x3d], al
movzx eax, byte [rsp + 0x3d]
test eax, eax
je 0x140227de3
cmp byte [rsp + 0x30], 2
jne 0x140227de3
mov eax, dword [rsp + 0x34]
xor edx, edx
mov ecx, 2
div rcx
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x98]
mov r8d, eax
mov rdx, qword [rsp + 0x40]
mov rcx, qword [rsp + 0xc0]
call qword [sym.imp.KERNEL32.dll_ReadConsoleW]
test eax, eax
jne 0x140227dca
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.1400c9973
mov dword [rsp + 0x94], 0xffffffff
lea rcx, [rsp + 0x48]
call fcn.1400c8dbb
mov eax, dword [rsp + 0x94]
jmp 0x140228021
mov eax, dword [rsp + 0x98]
movsxd rcx, dword [rsp + 0x38]
lea rax, [rcx + rax*2]
mov dword [rsp + 0x38], eax
jmp 0x140227ed5
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x84]
mov r8d, dword [rsp + 0x34]
mov rdx, qword [rsp + 0x40]
mov rcx, qword [rsp + 0xc0]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140227e24
mov eax, dword [rsp + 0x110]
cmp dword [rsp + 0x84], eax
jbe 0x140227ec2
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 5
jne 0x140227e6e
call fcn.1400c9f54
mov dword [rax], 9
call fcn.1400cb7fa
mov ecx, dword [rsp + 0x50]
mov dword [rax], ecx
mov dword [rsp + 0x9c], 0xffffffff
lea rcx, [rsp + 0x48]
call fcn.1400c8dbb
mov eax, dword [rsp + 0x9c]
jmp 0x140228021
cmp dword [rsp + 0x50], 0x6d
jne 0x140227e98
mov dword [rsp + 0xa0], 0
lea rcx, [rsp + 0x48]
call fcn.1400c8dbb
mov eax, dword [rsp + 0xa0]
jmp 0x140228021
mov ecx, dword [rsp + 0x50]
call fcn.1400c9973
mov dword [rsp + 0xa4], 0xffffffff
lea rcx, [rsp + 0x48]
call fcn.1400c8dbb
mov eax, dword [rsp + 0xa4]
jmp 0x140228021
mov eax, dword [rsp + 0x84]
mov ecx, dword [rsp + 0x38]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x38], eax
mov eax, dword [rsp + 0x100]
sar eax, 6
cdqe
lea rcx, [0x1402c3f00]
mov edx, dword [rsp + 0x100]
and edx, 0x3f
movsxd rdx, edx
imul rdx, rdx, 0x48
mov rax, qword [rcx + rax*8]
movzx eax, byte [rax + rdx + 0x38]
and eax, 0x80
test eax, eax
jne 0x140227f2c
mov eax, dword [rsp + 0x38]
mov dword [rsp + 0xa8], eax
lea rcx, [rsp + 0x48]
call fcn.1400c8dbb
mov eax, dword [rsp + 0xa8]
jmp 0x140228021
cmp byte [rsp + 0x30], 2
je 0x140227f8c
mov eax, dword [rsp + 0x110]
xor edx, edx
mov ecx, 2
div rcx
movsxd rcx, dword [rsp + 0x38]
mov qword [rsp + 0x20], rax
mov r9, qword [rsp + 0x108]
mov r8, rcx
mov rdx, qword [rsp + 0x40]
mov ecx, dword [rsp + 0x100]
call fcn.140226810
mov dword [rsp + 0xac], eax
lea rcx, [rsp + 0x48]
call fcn.1400c8dbb
mov eax, dword [rsp + 0xac]
jmp 0x140228021
movzx eax, byte [rsp + 0x3d]
test eax, eax
je 0x140227fd7
movsxd rax, dword [rsp + 0x38]
xor edx, edx
mov ecx, 2
div rcx
mov r8, rax
mov rdx, qword [rsp + 0xc8]
mov ecx, dword [rsp + 0x100]
call fcn.140226c90
mov dword [rsp + 0xb0], eax
lea rcx, [rsp + 0x48]
call fcn.1400c8dbb
mov eax, dword [rsp + 0xb0]
jmp 0x140228021
movsxd rax, dword [rsp + 0x38]
xor edx, edx
mov ecx, 2
div rcx
mov r8, rax
mov rdx, qword [rsp + 0xc8]
mov ecx, dword [rsp + 0x100]
call fcn.1402260e0
mov dword [rsp + 0xb4], eax
lea rcx, [rsp + 0x48]
call fcn.1400c8dbb
mov eax, dword [rsp + 0xb4]
jmp 0x140228021
add rsp, 0xf8
ret