Function at 0x11011e5e8
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 0x11011e63b
call sym.msvcrt.dll___doserrno
mov dword [rax], r15d
call sym.msvcrt.dll__errno
mov dword [rax], 9
jmp 0x11011eeb6
test ecx, ecx
js 0x11011ee8f
cmp edx, dword [0x110195924]
jae 0x11011ee8f
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 0x11011ee8f
cmp ebx, 0x7fffffff
jbe 0x11011e69f
call sym.msvcrt.dll___doserrno
mov dword [rax], r15d
call sym.msvcrt.dll__errno
mov dword [rax], 0x16
jmp 0x11011eea2
mov edi, r15d
test ebx, ebx
je 0x11011ee8b
test al, 2
jne 0x11011ee8b
test r8, r8
je 0x11011e687
mov r12d, dword [rcx + rsi + 0xc]
mov ecx, 4
and r12d, 3
mov eax, r12d
mov dword [rbp - 0x20], r12d
sub eax, 1
je 0x11011e6e6
cmp eax, 1
jne 0x11011e6e1
mov eax, ebx
not eax
test al, 1
je 0x11011e687
and ebx, 0xfffffffe
mov r14, r8
jmp 0x11011e729
mov eax, ebx
not eax
test al, 1
je 0x11011e687
shr ebx, 1
cmp ebx, ecx
cmovb ebx, ecx
mov ecx, ebx
call fcn.110119f74
mov r14, rax
test rax, rax
jne 0x11011e71f
call sym.msvcrt.dll__errno
mov dword [rax], 0xc
call sym.msvcrt.dll___doserrno
mov dword [rax], 8
jmp 0x11011eeb6
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 0x11011e7e2
mov cl, byte [rax + rsi + 9]
cmp cl, r8b
je 0x11011e7e2
test ebx, ebx
je 0x11011e7e2
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 0x11011e7e2
mov rax, qword [r9 + r13*8 + 0x95940]
mov cl, byte [rax + rsi + 0xa]
cmp cl, r8b
je 0x11011e7e2
test ebx, ebx
je 0x11011e7e2
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 0x11011e7e2
mov rax, qword [r9 + r13*8 + 0x95940]
mov cl, byte [rax + rsi + 0xb]
cmp cl, r8b
je 0x11011e7e2
test ebx, ebx
je 0x11011e7e2
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 0x11011e871
lea rcx, [0x110100000]
mov rcx, qword [rcx + r13*8 + 0x95940]
cmp byte [rcx + rsi + 8], 0
jge 0x11011e871
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 0x11011e871
cmp r12d, 2
jne 0x11011e871
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 0x11011e866
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ecx, eax
call fcn.110107d48
or ebx, 0xffffffff
jmp 0x11011ec5a
mov eax, dword [rbp - 0x38]
lea edx, [rax + rax]
mov dword [rbp - 0x38], edx
jmp 0x11011e8b9
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 0x11011ee55
movsxd rdx, dword [rbp - 0x38]
test edx, edx
js 0x11011ee55
mov eax, ebx
cmp rdx, rax
ja 0x11011ee55
lea r11, [0x110100000]
add edi, edx
mov rcx, qword [r11 + r13*8 + 0x95940]
mov al, byte [rcx + rsi + 8]
test al, al
jns 0x11011ec57
cmp r12d, 2
je 0x11011ebc2
mov r8d, 0xa
test edx, edx
je 0x11011e8f3
cmp byte [r14], r8b
jne 0x11011e8f3
or al, 4
jmp 0x11011e8f5
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 0x11011ea79
mov edx, 0x1a
mov rdi, rbx
mov rax, rcx
lea r15d, [rdx - 0xd]
mov cl, byte [rdi]
cmp cl, dl
je 0x11011ea58
lea rdx, [rdi + 1]
cmp cl, r15b
je 0x11011e93e
mov byte [rbx], cl
mov rdi, rdx
inc rbx
jmp 0x11011ea48
dec rax
cmp rdi, rax
jae 0x11011e967
cmp byte [rdx], r8b
jne 0x11011e955
mov byte [rbx], r8b
mov eax, 2
jmp 0x11011e95c
mov byte [rbx], cl
mov eax, 1
inc rbx
add rdi, rax
jmp 0x11011ea44
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 0x11011e9b4
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
test eax, eax
jne 0x11011ea31
cmp dword [rbp - 0x38], 0
je 0x11011ea31
mov rdx, qword [rbp - 0x10]
lea r11, [0x110100000]
mov rax, qword [r11 + r12*8 + 0x95940]
test byte [rdx + rax + 8], 0x48
je 0x11011e9f9
mov r8d, 0xa
cmp byte [rbp + 0x58], r8b
jne 0x11011e9e5
mov byte [rbx], r8b
jmp 0x11011ea41
mov byte [rbx], r15b
mov rcx, qword [r11 + r12*8 + 0x95940]
mov al, byte [rbp + 0x58]
mov byte [rdx + rcx + 9], al
jmp 0x11011ea41
cmp rbx, r14
jne 0x11011ea0a
mov r8d, 0xa
cmp byte [rbp + 0x58], r8b
je 0x11011e9e0
mov ecx, dword [rbp + 0x48]
mov r8d, 1
or rdx, 0xffffffffffffffff
call fcn.11011d438
mov r8d, 0xa
lea r11, [0x110100000]
cmp byte [rbp + 0x58], r8b
je 0x11011ea44
jmp 0x11011ea3e
mov r8d, 0xa
lea r11, [0x110100000]
mov byte [rbx], r15b
inc rbx
mov rax, qword [rbp - 0x30]
mov edx, 0x1a
cmp rdi, rax
jb 0x11011e91e
jmp 0x11011ea75
mov rcx, qword [r11 + r13*8 + 0x95940]
mov al, byte [rcx + rsi + 8]
test al, 0x40
jne 0x11011ea70
or al, 2
mov byte [rcx + rsi + 8], al
jmp 0x11011ea75
mov byte [rbx], dl
inc rbx
mov r12d, dword [rbp - 0x20]
mov edi, ebx
sub edi, r14d
cmp r12d, 1
jne 0x11011ec57
test edi, edi
je 0x11011ec57
mov r12d, 1
sub rbx, r12
cmp byte [rbx], 0
jl 0x11011eaa6
add rbx, r12
jmp 0x11011eb67
mov edx, r12d
jmp 0x11011eabb
cmp edx, 4
jg 0x11011eac9
cmp rbx, r14
jb 0x11011eac9
sub rbx, r12
add edx, r12d
movzx eax, byte [rbx]
cmp byte [rax + r11 + 0x7a120], 0
je 0x11011eaab
movzx ecx, byte [rbx]
movsx eax, byte [rcx + r11 + 0x7a120]
test eax, eax
jne 0x11011eae9
call sym.msvcrt.dll__errno
mov dword [rax], 0x2a
jmp 0x11011e85e
inc eax
cmp eax, edx
jne 0x11011eaf7
movsxd rax, edx
add rbx, rax
jmp 0x11011eb67
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 0x11011eb57
add rbx, r12
mov byte [r9 + rax + 9], cl
cmp edx, 2
jl 0x11011eb38
mov al, byte [rbx]
add rbx, r12
mov rcx, qword [r11 + r8*8 + 0x95940]
mov byte [r9 + rcx + 0xa], al
cmp edx, 3
jne 0x11011eb4f
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 0x11011eb67
mov ecx, dword [rbp + 0x48]
neg edx
movsxd rdx, edx
mov r8d, r12d
call fcn.11011d438
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 0x11011ebad
movsxd rdx, eax
add rdx, rdx
cmp rdx, rbx
ja 0x11011ebad
mov ebx, dword [rbp - 0x34]
lea edi, [rax + rax]
jmp 0x11011ec5e
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ecx, eax
call fcn.110107d48
or ebx, 0xffffffff
jmp 0x11011ec5e
cmp dword [rbp - 0x30], 0
je 0x11011ec78
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 0x11011ec4c
mov r10d, 0x1a
mov rcx, r14
lea r15d, [r10 - 0xd]
lea r11d, [r10 - 0x10]
movzx edx, word [rcx]
cmp dx, r10w
je 0x11011ec38
cmp dx, r15w
je 0x11011ec10
mov word [r8], dx
add r8, 2
add rcx, 2
jmp 0x11011ec31
lea rax, [r9 - 2]
cmp rcx, rax
jae 0x11011ec31
add rcx, 2
cmp word [rcx], r11w
jne 0x11011ec29
mov word [r8], r11w
jmp 0x11011ec2d
mov word [r8], dx
add r8, 2
cmp rcx, r9
jb 0x11011ebf3
jmp 0x11011ec4c
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 0x11011ec6b
mov rcx, r14
call sym.msvcrt.dll_free
cmp ebx, 0xfffffffe
cmove ebx, edi
mov eax, ebx
jmp 0x11011eeb9
mov r8d, 0xa
test edx, edx
je 0x11011ec8c
cmp word [r14], r8w
jne 0x11011ec8c
or al, 4
jmp 0x11011ec8e
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 0x11011ee4b
mov edx, 0x1a
mov rdi, rbx
lea r15d, [rdx - 0xd]
movzx ecx, word [rdi]
cmp cx, dx
je 0x11011ee2c
lea rdx, [rdi + 2]
cmp cx, r15w
je 0x11011ecdd
mov word [rbx], cx
mov rdi, rdx
add rbx, 2
jmp 0x11011ee18
add rax, 0xfffffffffffffffe
cmp rdi, rax
jae 0x11011ed0b
cmp word [rdx], r8w
jne 0x11011ecf7
mov word [rbx], r8w
mov eax, 4
jmp 0x11011ecff
mov word [rbx], cx
mov eax, 2
add rbx, 2
add rdi, rax
jmp 0x11011ee14
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 0x11011ed5c
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
test eax, eax
jne 0x11011edff
cmp dword [rbp - 0x38], 0
je 0x11011edff
mov rdx, qword [rbp - 0x10]
lea r11, [0x110100000]
mov rax, qword [r11 + r12*8 + 0x95940]
test byte [rdx + rax + 8], 0x48
je 0x11011edc4
mov r8d, 0xa
cmp word [rbp + 0x60], r8w
jne 0x11011ed93
mov word [rbx], r8w
jmp 0x11011ee10
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 0x11011ee10
cmp rbx, r14
jne 0x11011edd6
mov r8d, 0xa
cmp word [rbp + 0x60], r8w
je 0x11011ed8d
mov ecx, dword [rbp + 0x48]
mov rdx, 0xfffffffffffffffe
lea r8d, [rdx + 3]
call fcn.11011d438
mov r8d, 0xa
lea r11, [0x110100000]
cmp word [rbp + 0x60], r8w
je 0x11011ee14
jmp 0x11011ee0c
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 0x11011ecb8
jmp 0x11011ee4b
mov rcx, qword [r11 + r13*8 + 0x95940]
mov al, byte [rcx + rsi + 8]
test al, 0x40
jne 0x11011ee44
or al, 2
mov byte [rcx + rsi + 8], al
jmp 0x11011ee4b
mov word [rbx], dx
add rbx, 2
sub ebx, r14d
mov edi, ebx
jmp 0x11011ec57
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
cmp eax, 5
jne 0x11011ee7b
call sym.msvcrt.dll__errno
mov dword [rax], 9
call sym.msvcrt.dll___doserrno
mov dword [rax], 5
jmp 0x11011e85e
cmp eax, 0x6d
jne 0x11011e857
xor ebx, ebx
jmp 0x11011ec5a
xor eax, eax
jmp 0x11011eeb9
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