Function at 0x11011e598
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rdx
mov dword [rsp + 8], ecx
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x68
mov ebx, r8d
mov dword [rbp - 0x34], 0xfffffffe
xor r15d, r15d
mov dword [rbp - 0x28], ebx
mov r8, rdx
mov dword [rbp - 0x30], r15d
movsxd rdx, ecx
cmp edx, 0xfffffffe
jne 0x11011e5eb
call sym.msvcrt.dll___doserrno
mov dword [rax], r15d
call sym.msvcrt.dll__errno
mov dword [rax], 9
jmp 0x11011ee66
test ecx, ecx
js 0x11011ee3f
cmp edx, dword [0x110195924]
jae 0x11011ee3f
mov rax, rdx
mov qword [rbp - 0x18], rdx
and eax, 0x1f
lea r9, [0x110100000]
imul rsi, rax, 0x38
mov r13, rdx
sar r13, 5
mov rcx, qword [r9 + r13*8 + 0x95940]
mov al, byte [rcx + rsi + 8]
test al, 1
je 0x11011ee3f
cmp ebx, 0x7fffffff
jbe 0x11011e64f
call sym.msvcrt.dll___doserrno
mov dword [rax], r15d
call sym.msvcrt.dll__errno
mov dword [rax], 0x16
jmp 0x11011ee52
mov edi, r15d
test ebx, ebx
je 0x11011ee3b
test al, 2
jne 0x11011ee3b
test r8, r8
je 0x11011e637
mov r12d, dword [rcx + rsi + 0xc]
mov ecx, 4
and r12d, 3
mov eax, r12d
mov dword [rbp - 0x20], r12d
sub eax, 1
je 0x11011e696
cmp eax, 1
jne 0x11011e691
mov eax, ebx
not eax
test al, 1
je 0x11011e637
and ebx, 0xfffffffe
mov r14, r8
jmp 0x11011e6d9
mov eax, ebx
not eax
test al, 1
je 0x11011e637
shr ebx, 1
cmp ebx, ecx
cmovb ebx, ecx
mov ecx, ebx
call fcn.110119f14
mov r14, rax
test rax, rax
jne 0x11011e6cf
call sym.msvcrt.dll__errno
mov dword [rax], 0xc
call sym.msvcrt.dll___doserrno
mov dword [rax], 8
jmp 0x11011ee66
mov edx, dword [rbp + 0x48]
lea r9, [0x110100000]
mov rax, qword [r9 + r13*8 + 0x95940]
mov r15, r14
mov r8d, 0xa
test byte [rax + rsi + 8], 0x48
je 0x11011e792
mov cl, byte [rax + rsi + 9]
cmp cl, r8b
je 0x11011e792
test ebx, ebx
je 0x11011e792
mov byte [r14], cl
lea r15, [r14 + 1]
mov rax, qword [r9 + r13*8 + 0x95940]
lea edi, [r8 - 9]
or r10d, 0xffffffff
add ebx, r10d
mov byte [rax + rsi + 9], r8b
test r12d, r12d
je 0x11011e792
mov rax, qword [r9 + r13*8 + 0x95940]
mov cl, byte [rax + rsi + 0xa]
cmp cl, r8b
je 0x11011e792
test ebx, ebx
je 0x11011e792
mov byte [r15], cl
lea edi, [r8 - 8]
mov rax, qword [r9 + r13*8 + 0x95940]
inc r15
add ebx, r10d
mov byte [rax + rsi + 0xa], r8b
cmp r12d, 1
jne 0x11011e792
mov rax, qword [r9 + r13*8 + 0x95940]
mov cl, byte [rax + rsi + 0xb]
cmp cl, r8b
je 0x11011e792
test ebx, ebx
je 0x11011e792
mov byte [r15], cl
lea edi, [r8 - 7]
mov rax, qword [r9 + r13*8 + 0x95940]
inc r15
add ebx, r10d
mov byte [rax + rsi + 0xb], r8b
mov ecx, edx
call sym.msvcrt.dll__isatty
test eax, eax
je 0x11011e821
lea rcx, [0x110100000]
mov rcx, qword [rcx + r13*8 + 0x95940]
cmp byte [rcx + rsi + 8], 0
jge 0x11011e821
mov rcx, qword [rcx + rsi]
lea rdx, [rbp - 0x30]
call qword [sym.imp.api_ms_win_core_console_l1_1_0.dll_GetConsoleMode]
mov dword [rbp - 0x30], eax
test eax, eax
je 0x11011e821
cmp r12d, 2
jne 0x11011e821
and qword [rsp + 0x20], 0
lea rax, [0x110100000]
mov rcx, qword [rax + r13*8 + 0x95940]
lea r9, [rbp - 0x38]
shr ebx, 1
mov rdx, r15
mov r8d, ebx
mov rcx, qword [rcx + rsi]
call qword [sym.imp.api_ms_win_core_console_l1_1_0.dll_ReadConsoleW]
test eax, eax
jne 0x11011e816
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ecx, eax
call fcn.110107d08
or ebx, 0xffffffff
jmp 0x11011ec0a
mov eax, dword [rbp - 0x38]
lea edx, [rax + rax]
mov dword [rbp - 0x38], edx
jmp 0x11011e869
and qword [rsp + 0x20], 0
lea rcx, [0x110100000]
mov rcx, qword [rcx + r13*8 + 0x95940]
lea r9, [rbp - 0x38]
mov r8d, ebx
mov rdx, r15
mov rcx, qword [rcx + rsi]
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_ReadFile]
test eax, eax
je 0x11011ee05
movsxd rdx, dword [rbp - 0x38]
test edx, edx
js 0x11011ee05
mov eax, ebx
cmp rdx, rax
ja 0x11011ee05
lea r11, [0x110100000]
add edi, edx
mov rcx, qword [r11 + r13*8 + 0x95940]
mov al, byte [rcx + rsi + 8]
test al, al
jns 0x11011ec07
cmp r12d, 2
je 0x11011eb72
mov r8d, 0xa
test edx, edx
je 0x11011e8a3
cmp byte [r14], r8b
jne 0x11011e8a3
or al, 4
jmp 0x11011e8a5
and al, 0xfb
mov byte [rcx + rsi + 8], al
mov rbx, r14
movsxd rcx, edi
add rcx, r14
mov qword [rbp - 0x30], rcx
cmp r14, rcx
jae 0x11011ea29
mov edx, 0x1a
mov rdi, rbx
mov rax, rcx
lea r15d, [rdx - 0xd]
mov cl, byte [rdi]
cmp cl, dl
je 0x11011ea08
lea rdx, [rdi + 1]
cmp cl, r15b
je 0x11011e8ee
mov byte [rbx], cl
mov rdi, rdx
inc rbx
jmp 0x11011e9f8
dec rax
cmp rdi, rax
jae 0x11011e917
cmp byte [rdx], r8b
jne 0x11011e905
mov byte [rbx], r8b
mov eax, 2
jmp 0x11011e90c
mov byte [rbx], cl
mov eax, 1
inc rbx
add rdi, rax
jmp 0x11011e9f4
mov rax, qword [rbp - 0x18]
lea r9, [rbp - 0x38]
and qword [rsp + 0x20], 0
mov r12, rax
and eax, 0x1f
sar r12, 5
imul rax, rax, 0x38
mov rcx, qword [r11 + r12*8 + 0x95940]
mov rdi, rdx
mov r8d, 1
mov qword [rbp - 0x10], rax
lea rdx, [rbp + 0x58]
mov rcx, qword [rax + rcx]
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_ReadFile]
test eax, eax
jne 0x11011e964
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
test eax, eax
jne 0x11011e9e1
cmp dword [rbp - 0x38], 0
je 0x11011e9e1
mov rdx, qword [rbp - 0x10]
lea r11, [0x110100000]
mov rax, qword [r11 + r12*8 + 0x95940]
test byte [rdx + rax + 8], 0x48
je 0x11011e9a9
mov r8d, 0xa
cmp byte [rbp + 0x58], r8b
jne 0x11011e995
mov byte [rbx], r8b
jmp 0x11011e9f1
mov byte [rbx], r15b
mov rcx, qword [r11 + r12*8 + 0x95940]
mov al, byte [rbp + 0x58]
mov byte [rdx + rcx + 9], al
jmp 0x11011e9f1
cmp rbx, r14
jne 0x11011e9ba
mov r8d, 0xa
cmp byte [rbp + 0x58], r8b
je 0x11011e990
mov ecx, dword [rbp + 0x48]
mov r8d, 1
or rdx, 0xffffffffffffffff
call fcn.11011d3e8
mov r8d, 0xa
lea r11, [0x110100000]
cmp byte [rbp + 0x58], r8b
je 0x11011e9f4
jmp 0x11011e9ee
mov r8d, 0xa
lea r11, [0x110100000]
mov byte [rbx], r15b
inc rbx
mov rax, qword [rbp - 0x30]
mov edx, 0x1a
cmp rdi, rax
jb 0x11011e8ce
jmp 0x11011ea25
mov rcx, qword [r11 + r13*8 + 0x95940]
mov al, byte [rcx + rsi + 8]
test al, 0x40
jne 0x11011ea20
or al, 2
mov byte [rcx + rsi + 8], al
jmp 0x11011ea25
mov byte [rbx], dl
inc rbx
mov r12d, dword [rbp - 0x20]
mov edi, ebx
sub edi, r14d
cmp r12d, 1
jne 0x11011ec07
test edi, edi
je 0x11011ec07
mov r12d, 1
sub rbx, r12
cmp byte [rbx], 0
jl 0x11011ea56
add rbx, r12
jmp 0x11011eb17
mov edx, r12d
jmp 0x11011ea6b
cmp edx, 4
jg 0x11011ea79
cmp rbx, r14
jb 0x11011ea79
sub rbx, r12
add edx, r12d
movzx eax, byte [rbx]
cmp byte [rax + r11 + 0x7a1d0], 0
je 0x11011ea5b
movzx ecx, byte [rbx]
movsx eax, byte [rcx + r11 + 0x7a1d0]
test eax, eax
jne 0x11011ea99
call sym.msvcrt.dll__errno
mov dword [rax], 0x2a
jmp 0x11011e80e
inc eax
cmp eax, edx
jne 0x11011eaa7
movsxd rax, edx
add rbx, rax
jmp 0x11011eb17
mov rax, qword [rbp - 0x18]
mov r8, rax
and eax, 0x1f
imul r9, rax, 0x38
sar r8, 5
mov rax, qword [r11 + r8*8 + 0x95940]
test byte [r9 + rax + 8], 0x48
je 0x11011eb07
add rbx, r12
mov byte [r9 + rax + 9], cl
cmp edx, 2
jl 0x11011eae8
mov al, byte [rbx]
add rbx, r12
mov rcx, qword [r11 + r8*8 + 0x95940]
mov byte [r9 + rcx + 0xa], al
cmp edx, 3
jne 0x11011eaff
mov al, byte [rbx]
add rbx, r12
mov rcx, qword [r11 + r8*8 + 0x95940]
mov byte [r9 + rcx + 0xb], al
movsxd rax, edx
sub rbx, rax
jmp 0x11011eb17
mov ecx, dword [rbp + 0x48]
neg edx
movsxd rdx, edx
mov r8d, r12d
call fcn.11011d3e8
mov rsi, qword [rbp + 0x50]
mov edi, ebx
mov ebx, dword [rbp - 0x28]
sub edi, r14d
mov eax, ebx
mov r9d, edi
shr eax, 1
mov r8, r14
mov dword [rsp + 0x28], eax
xor edx, edx
mov ecx, 0xfde9
mov qword [rsp + 0x20], rsi
call qword [sym.imp.api_ms_win_core_string_l1_1_0.dll_MultiByteToWideChar]
test eax, eax
je 0x11011eb5d
movsxd rdx, eax
add rdx, rdx
cmp rdx, rbx
ja 0x11011eb5d
mov ebx, dword [rbp - 0x34]
lea edi, [rax + rax]
jmp 0x11011ec0e
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ecx, eax
call fcn.110107d08
or ebx, 0xffffffff
jmp 0x11011ec0e
cmp dword [rbp - 0x30], 0
je 0x11011ec28
mov eax, edi
mov r8, r14
cdq
sub eax, edx
sar eax, 1
movsxd rcx, eax
lea r9, [r14 + rcx*2]
cmp r14, r9
jae 0x11011ebfc
mov r10d, 0x1a
mov rcx, r14
lea r15d, [r10 - 0xd]
lea r11d, [r10 - 0x10]
movzx edx, word [rcx]
cmp dx, r10w
je 0x11011ebe8
cmp dx, r15w
je 0x11011ebc0
mov word [r8], dx
add r8, 2
add rcx, 2
jmp 0x11011ebe1
lea rax, [r9 - 2]
cmp rcx, rax
jae 0x11011ebe1
add rcx, 2
cmp word [rcx], r11w
jne 0x11011ebd9
mov word [r8], r11w
jmp 0x11011ebdd
mov word [r8], dx
add r8, 2
cmp rcx, r9
jb 0x11011eba3
jmp 0x11011ebfc
lea rax, [0x110100000]
mov rax, qword [rax + r13*8 + 0x95940]
or byte [rax + rsi + 8], 2
sub r8, r14
mov rdi, r8
sar rdi, 1
add edi, edi
mov ebx, dword [rbp - 0x34]
mov rsi, qword [rbp + 0x50]
cmp r14, rsi
je 0x11011ec1b
mov rcx, r14
call sym.msvcrt.dll_free
cmp ebx, 0xfffffffe
cmove ebx, edi
mov eax, ebx
jmp 0x11011ee69
mov r8d, 0xa
test edx, edx
je 0x11011ec3c
cmp word [r14], r8w
jne 0x11011ec3c
or al, 4
jmp 0x11011ec3e
and al, 0xfb
mov byte [rcx + rsi + 8], al
mov rbx, r14
movsxd rax, edi
add rax, r14
mov qword [rbp - 0x28], rax
lea rcx, [rax - 1]
cmp r14, rcx
jae 0x11011edfb
mov edx, 0x1a
mov rdi, rbx
lea r15d, [rdx - 0xd]
movzx ecx, word [rdi]
cmp cx, dx
je 0x11011eddc
lea rdx, [rdi + 2]
cmp cx, r15w
je 0x11011ec8d
mov word [rbx], cx
mov rdi, rdx
add rbx, 2
jmp 0x11011edc8
add rax, 0xfffffffffffffffe
cmp rdi, rax
jae 0x11011ecbb
cmp word [rdx], r8w
jne 0x11011eca7
mov word [rbx], r8w
mov eax, 4
jmp 0x11011ecaf
mov word [rbx], cx
mov eax, 2
add rbx, 2
add rdi, rax
jmp 0x11011edc4
mov rax, qword [rbp - 0x18]
lea r9, [rbp - 0x38]
and qword [rsp + 0x20], 0
mov r12, rax
and eax, 0x1f
sar r12, 5
imul r10, rax, 0x38
mov rcx, qword [r11 + r12*8 + 0x95940]
mov rdi, rdx
mov r8d, 2
mov qword [rbp - 0x10], r10
lea rdx, [rbp + 0x60]
mov rcx, qword [r10 + rcx]
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_ReadFile]
test eax, eax
jne 0x11011ed0c
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
test eax, eax
jne 0x11011edaf
cmp dword [rbp - 0x38], 0
je 0x11011edaf
mov rdx, qword [rbp - 0x10]
lea r11, [0x110100000]
mov rax, qword [r11 + r12*8 + 0x95940]
test byte [rdx + rax + 8], 0x48
je 0x11011ed74
mov r8d, 0xa
cmp word [rbp + 0x60], r8w
jne 0x11011ed43
mov word [rbx], r8w
jmp 0x11011edc0
mov word [rbx], r15w
mov al, byte [rbp + 0x60]
mov rcx, qword [r11 + r12*8 + 0x95940]
mov byte [rdx + rcx + 9], al
mov al, byte [rbp + 0x61]
mov rcx, qword [r11 + r12*8 + 0x95940]
mov byte [rdx + rcx + 0xa], al
mov rax, qword [r11 + r12*8 + 0x95940]
mov byte [rdx + rax + 0xb], r8b
jmp 0x11011edc0
cmp rbx, r14
jne 0x11011ed86
mov r8d, 0xa
cmp word [rbp + 0x60], r8w
je 0x11011ed3d
mov ecx, dword [rbp + 0x48]
mov rdx, 0xfffffffffffffffe
lea r8d, [rdx + 3]
call fcn.11011d3e8
mov r8d, 0xa
lea r11, [0x110100000]
cmp word [rbp + 0x60], r8w
je 0x11011edc4
jmp 0x11011edbc
mov r8d, 0xa
lea r11, [0x110100000]
mov word [rbx], r15w
add rbx, 2
mov rax, qword [rbp - 0x28]
lea rcx, [rax - 1]
mov edx, 0x1a
cmp rdi, rcx
jb 0x11011ec68
jmp 0x11011edfb
mov rcx, qword [r11 + r13*8 + 0x95940]
mov al, byte [rcx + rsi + 8]
test al, 0x40
jne 0x11011edf4
or al, 2
mov byte [rcx + rsi + 8], al
jmp 0x11011edfb
mov word [rbx], dx
add rbx, 2
sub ebx, r14d
mov edi, ebx
jmp 0x11011ec07
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
cmp eax, 5
jne 0x11011ee2b
call sym.msvcrt.dll__errno
mov dword [rax], 9
call sym.msvcrt.dll___doserrno
mov dword [rax], 5
jmp 0x11011e80e
cmp eax, 0x6d
jne 0x11011e807
xor ebx, ebx
jmp 0x11011ec0a
xor eax, eax
jmp 0x11011ee69
call sym.msvcrt.dll___doserrno
mov dword [rax], r15d
call sym.msvcrt.dll__errno
mov dword [rax], 9
xor r9d, r9d
mov qword [rsp + 0x20], r15
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call sym.msvcrt.dll__invalid_parameter
or eax, 0xffffffff
add rsp, 0x68
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret