Function at 0x140065ab0
Capabilities:
Manipulate console buffer

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x3fe0]
mov eax, 0x40e0
call fcn.14008cda0
sub rsp, rax
mov rax, qword [0x14014a1f8]
xor rax, rsp
mov qword [rbp + 0x3fd0], rax
movzx eax, byte [rcx + 0x11c]
lea r12, [rbp - 0x30]
mov r14d, dword [rcx + 0x118]
mov rbx, rdx
movzx r15d, byte [rcx + 0x11e]
mov r13, rcx
mov dword [rsp + 0x48], eax
xor edi, edi
movzx eax, byte [rcx + 0x11d]
mov edx, 0xffffffff
mov dword [r9], edi
mov rsi, r9
mov rcx, qword [0x140150988]
mov dword [rsp + 0x34], r14d
mov byte [rsp + 0x31], al
mov byte [rsp + 0x30], r15b
mov qword [rsp + 0x40], r12
call qword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
test eax, eax
jne 0x140067252
cmp dword [0x14014b070], edi
mov r11d, 0x2000
movups xmm0, xmmword [rbx]
movups xmmword [rsp + 0x58], xmm0
mov eax, dword [rsp + 0x58]
jne 0x140065d51
test eax, eax
je 0x140065d51
mov rbx, qword [rsp + 0x60]
mov r9d, eax
mov r8, rbx
mov dword [rsp + 0x28], edi
xor edx, edx
mov qword [rsp + 0x20], rdi
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.DLL_MultiByteToWideChar]
mov edi, eax
test eax, eax
je 0x140065d16
lea r12d, [rax*2 + 2]
xor edx, edx
mov eax, edx
lea r14, [rbp - 0x30]
mov ecx, 0x2000
mov qword [rsp + 0x40], r14
cmp r12d, ecx
seta al
mov dword [rsp + 0x38], eax
jbe 0x140065bdd
mov ecx, r12d
test r12d, r12d
je 0x140065bd5
call qword [0x14014b098]
mov r14, rax
mov qword [rsp + 0x40], rax
jmp 0x140065bdd
mov r14, rdx
mov qword [rsp + 0x40], rdx
mov r9d, dword [rsp + 0x58]
mov r8, rbx
mov dword [rsp + 0x28], edi
xor edx, edx
mov ecx, 0xfde9
mov qword [rsp + 0x20], r14
call qword [sym.imp.KERNEL32.DLL_MultiByteToWideChar]
test eax, eax
je 0x140065cca
mov r15, qword [rsp + 0x40]
xor r9d, r9d
mov r14d, r9d
mov r11d, 0x2000
nop dword [rax]
nop dword [rax + rax]
mov ebx, edi
sub ebx, r14d
cmp ebx, r11d
cmova ebx, r11d
cmp dword [rsi], 0
jne 0x140065c67
mov rcx, qword [r13 + 0x110]
mov r8d, ebx
mov eax, r14d
mov qword [rsp + 0x20], r9
lea r9, [rsp + 0x4c]
lea rdx, [r15 + rax*2]
call qword [sym.imp.KERNEL32.DLL_WriteConsoleW]
test eax, eax
jne 0x140065c5e
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [rsi], eax
xor r9d, r9d
mov r11d, 0x2000
add r14d, ebx
cmp r14d, edi
jb 0x140065c20
movzx r15d, byte [rsp + 0x30]
cmp r12d, r11d
jbe 0x140065caa
call fcn.1400b55fc
mov rcx, qword [rsp + 0x40]
mov ebx, dword [rax]
call qword [0x14014b0b0]
call fcn.1400b55fc
xor r9d, r9d
mov r11d, 0x2000
mov dword [rsp + 0x38], r9d
mov dword [rax], ebx
lea rax, [rbp - 0x30]
mov qword [rsp + 0x40], rax
movzx r10d, byte [rsp + 0x31]
mov edi, r9d
mov ecx, dword [rsp + 0x48]
mov byte [rsp + 0x31], r10b
mov dword [rsp + 0x48], ecx
mov byte [rsp + 0x30], r15b
jmp 0x14006715f
cmp r12d, 0x2000
jbe 0x140065cea
call fcn.1400b55fc
mov rcx, r14
mov ebx, dword [rax]
call qword [0x14014b0b0]
call fcn.1400b55fc
mov dword [rax], ebx
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov ecx, dword [rsp + 0x48]
mov r11d, 0x2000
mov dword [rsi], eax
xor r9d, r9d
movzx eax, byte [rsp + 0x31]
mov byte [rsp + 0x31], al
mov dword [rsp + 0x48], ecx
mov byte [rsp + 0x30], r15b
jmp 0x14006715f
call qword [sym.imp.KERNEL32.DLL_GetLastError]
xor r9d, r9d
mov dword [rsp + 0x34], r14d
mov dword [rsi], eax
mov r11d, 0x2000
mov eax, dword [rsp + 0x48]
mov dword [rsp + 0x48], eax
movzx eax, byte [rsp + 0x31]
mov byte [rsp + 0x31], al
mov dword [rsp + 0x38], r9d
mov byte [rsp + 0x30], r15b
mov qword [rsp + 0x40], r12
jmp 0x14006715f
xor r9d, r9d
mov dword [rsp + 0x3c], r9d
mov r8d, r9d
mov dword [rsp + 0x38], r9d
test eax, eax
je 0x14006715f
movzx r10d, byte [rsp + 0x31]
lea rbx, [0x140000000]
mov ecx, dword [rsp + 0x48]
mov byte [rsp + 0x31], r10b
mov dword [rsp + 0x38], r9d
mov dword [rsp + 0x48], ecx
mov byte [rsp + 0x30], r15b
mov qword [rsp + 0x40], r12
jmp 0x140065da4
mov ecx, dword [rsp + 0x48]
mov rdx, qword [rsp + 0x60]
mov eax, r8d
movzx edx, byte [rax + rdx]
movzx eax, dl
test cl, cl
jne 0x140065dfe
not al
movzx eax, al
bsr r8d, eax
je 0x140065e37
cmp r8d, 7
jne 0x140065dd1
mov r9d, edx
mov dword [rsp + 0x34], edx
jmp 0x140065e42
cmp r8d, 5
ja 0x140065e37
mov ecx, 8
mov r9d, 0xff
sub ecx, r8d
sar r9d, cl
mov ecx, 6
and r9d, edx
sub cl, r8b
mov r8d, dword [rsp + 0x3c]
mov dword [rsp + 0x48], ecx
jmp 0x140065e1b
and al, 0xc0
cmp al, 0x80
jne 0x140065e2a
add cl, 0xff
mov r9d, edx
mov eax, r14d
mov dword [rsp + 0x48], ecx
and r9d, 0x3f
shl eax, 6
or r9d, eax
mov dword [rsp + 0x34], r9d
test cl, cl
jne 0x140067137
jmp 0x140065e42
dec r8d
mov byte [rsp + 0x48], 0
mov dword [rsp + 0x3c], r8d
mov r9d, 0xfffd
mov dword [rsp + 0x34], r9d
test r15b, r15b
jne 0x140065e72
cmp r9d, 0x1b
je 0x140065e6a
cmp r9d, 0x9b
jne 0x1400661b7
mov r15b, 4
mov byte [r13 + 0x11f], 0
jmp 0x14006712d
mov r15b, 2
jmp 0x14006712d
cmp r15b, 2
jne 0x140066453
lea eax, [r9 - 0x1b]
cmp eax, 0x48
ja case.0x140065e9b.33
movzx eax, byte [rbx + rax + 0x67274]
mov ecx, dword [rbx + rax*4 + 0x67258]
add rcx, rbx
jmp rcx
mov r15b, 8
jmp 0x14006712d
xor r15d, r15d
mov r14d, r15d
nop dword [rax + rax]
mov ebx, edi
sub ebx, r14d
cmp ebx, r11d
cmova ebx, r11d
cmp dword [rsi], r15d
jne 0x140065ef3
mov rcx, qword [r13 + 0x110]
lea r9, [rbp - 0x54]
mov eax, r14d
mov r8d, ebx
mov qword [rsp + 0x20], r15
lea rdx, [r12 + rax*2]
call qword [sym.imp.KERNEL32.DLL_WriteConsoleW]
test eax, eax
jne 0x140065eed
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [rsi], eax
mov r11d, 0x2000
add r14d, ebx
cmp r14d, edi
jb 0x140065eb0
cmp dword [rsp + 0x38], r15d
je 0x140065f27
call fcn.1400b55fc
mov rcx, r12
mov ebx, dword [rax]
call qword [0x14014b0b0]
call fcn.1400b55fc
lea r12, [rbp - 0x30]
mov dword [rsp + 0x38], r15d
mov qword [rsp + 0x40], r12
mov dword [rax], ebx
mov edi, r15d
movzx r14d, word [0x14014b084]
mov dword [rsp + 0x50], r15d
cmp dword [rsi], r15d
jne 0x140065fef
mov rcx, qword [r13 + 0x110]
movzx edx, r14w
call qword [sym.imp.KERNEL32.DLL_SetConsoleTextAttribute]
test eax, eax
je 0x140065fe7
mov rcx, qword [r13 + 0x110]
mov ebx, r15d
mov edx, ebx
call qword [sym.imp.KERNEL32.DLL_SetConsoleCursorPosition]
test eax, eax
je 0x140065fe7
nop
mov rcx, qword [r13 + 0x110]
lea rdx, [rbp - 0x48]
call qword [sym.imp.KERNEL32.DLL_GetConsoleScreenBufferInfo]
test eax, eax
je 0x140065fe7
movsx eax, word [rbp - 0x48]
mov edx, 0x20
movsx r8d, word [rbp - 0x46]
mov r9d, ebx
mov rcx, qword [r13 + 0x110]
imul r8d, eax
lea rax, [rsp + 0x4c]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.DLL_FillConsoleOutputCharacterW]
test eax, eax
je 0x140065fdc
mov r8d, dword [rsp + 0x4c]
lea rax, [rsp + 0x4c]
mov rcx, qword [r13 + 0x110]
mov r9d, ebx
movzx edx, r14w
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.DLL_FillConsoleOutputAttribute]
test eax, eax
jne 0x140065ffa
call qword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, 0x57
je 0x140065f70
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [rsi], eax
movzx r10d, byte [rsp + 0x31]
jmp 0x14006712d
movsx eax, word [rbp - 0x48]
mov ecx, r15d
movsx edx, word [rbp - 0x38]
mov dword [0x14014b088], eax
movsx eax, word [rbp - 0x3c]
sub edx, eax
mov dword [0x14014b074], r15d
movsx eax, word [rbp - 0x42]
inc edx
sub eax, edx
mov dword [0x14014b078], edx
inc eax
test eax, eax
jle 0x140066034
mov dword [0x14014b074], eax
mov ecx, eax
movsx r8d, word [rbp - 0x46]
lea eax, [rdx + rcx]
cmp eax, r8d
jle 0x14006604c
mov ecx, r8d
sub ecx, edx
mov dword [0x14014b074], ecx
test ecx, ecx
jns 0x140065fef
movzx r10d, byte [rsp + 0x31]
mov dword [0x14014b074], r15d
jmp 0x14006712d
xor r15d, r15d
mov r14d, r15d
nop dword [rax + rax]
mov ebx, edi
sub ebx, r14d
cmp ebx, r11d
cmova ebx, r11d
cmp dword [rsi], r15d
jne 0x1400660b3
mov rcx, qword [r13 + 0x110]
lea r9, [rbp - 0x50]
mov eax, r14d
mov r8d, ebx
mov qword [rsp + 0x20], r15
lea rdx, [r12 + rax*2]
call qword [sym.imp.KERNEL32.DLL_WriteConsoleW]
test eax, eax
jne 0x1400660ad
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [rsi], eax
mov r11d, 0x2000
add r14d, ebx
cmp r14d, edi
jb 0x140066070
cmp dword [rsp + 0x38], r15d
je 0x1400660e7
call fcn.1400b55fc
mov rcx, r12
mov ebx, dword [rax]
call qword [0x14014b0b0]
call fcn.1400b55fc
lea r12, [rbp - 0x30]
mov dword [rsp + 0x38], r15d
mov qword [rsp + 0x40], r12
mov dword [rax], ebx
mov r8, rsi
mov dl, 1
mov rcx, r13
mov edi, r15d
call fcn.140065820
movzx r10d, byte [rsp + 0x31]
jmp 0x14006712d
xor r15d, r15d
mov r14d, r15d
nop dword [rax + rax]
mov ebx, edi
sub ebx, r14d
cmp ebx, r11d
cmova ebx, r11d
cmp dword [rsi], r15d
jne 0x140066153
mov rcx, qword [r13 + 0x110]
lea r9, [rbp - 0x4c]
mov eax, r14d
mov r8d, ebx
mov qword [rsp + 0x20], r15
lea rdx, [r12 + rax*2]
call qword [sym.imp.KERNEL32.DLL_WriteConsoleW]
test eax, eax
jne 0x14006614d
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [rsi], eax
mov r11d, 0x2000
add r14d, ebx
cmp r14d, edi
jb 0x140066110
cmp dword [rsp + 0x38], r15d
je 0x140066187
call fcn.1400b55fc
mov rcx, r12
mov ebx, dword [rax]
call qword [0x14014b0b0]
call fcn.1400b55fc
lea r12, [rbp - 0x30]
mov dword [rsp + 0x38], r15d
mov qword [rsp + 0x40], r12
mov dword [rax], ebx
mov r8, rsi
mov dl, 1
mov rcx, r13
mov edi, r15d
call fcn.140065950
movzx r10d, byte [rsp + 0x31]
jmp 0x14006712d
xor r15b, r15b
lea eax, [r9 - 0x40]
mov byte [rsp + 0x30], r15b
cmp eax, 0x1f
jbe case.0x140065e9b.27
cmp r9d, 0xffff
jbe 0x1400661ca
mov dword [rsp + 0x34], 0xfffd
jmp 0x1400661de
cmp r9d, 0xa
je 0x140066358
cmp r9d, 0xd
je 0x1400662a6
mov eax, edi
mov rcx, r11
sub rcx, rax
cmp rcx, 1
jae 0x140066285
xor r15d, r15d
mov r14d, r15d
nop word [rax + rax]
mov ebx, edi
sub ebx, r14d
cmp ebx, r11d
cmova ebx, r11d
cmp dword [rsi], r15d
jne 0x140066244
mov rcx, qword [r13 + 0x110]
lea r9, [rsp + 0x68]
mov eax, r14d
mov r8d, ebx
mov qword [rsp + 0x20], r15
lea rdx, [r12 + rax*2]
call qword [sym.imp.KERNEL32.DLL_WriteConsoleW]
test eax, eax
jne 0x14006623e
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [rsi], eax
mov r11d, 0x2000
add r14d, ebx
cmp r14d, edi
jb 0x140066200
cmp dword [rsp + 0x38], r15d
movzx r15d, byte [rsp + 0x30]
je 0x140066281
call fcn.1400b55fc
mov rcx, r12
mov ebx, dword [rax]
call qword [0x14014b0b0]
call fcn.1400b55fc
xor edx, edx
lea r12, [rbp - 0x30]
mov dword [rsp + 0x38], edx
mov qword [rsp + 0x40], r12
mov dword [rax], ebx
jmp 0x140066283
xor edx, edx
mov edi, edx
mov r14d, dword [rsp + 0x34]
mov r8d, dword [rsp + 0x3c]
mov eax, edi
inc edi
xor r10b, r10b
mov byte [rsp + 0x31], r10b
mov word [rbp + rax*2 - 0x30], r14w
jmp 0x14006713c
cmp r10b, 0xa
je 0x140066445
mov eax, edi
mov rcx, r11
sub rcx, rax
cmp rcx, 1
jae 0x14006643b
xor r15d, r15d
mov r14d, r15d
nop dword [rax + rax]
mov ebx, edi
sub ebx, r14d
cmp ebx, r11d
cmova ebx, r11d
cmp dword [rsi], r15d
jne 0x140066314
mov rcx, qword [r13 + 0x110]
lea r9, [rsp + 0x70]
mov eax, r14d
mov r8d, ebx
mov qword [rsp + 0x20], r15
lea rdx, [r12 + rax*2]
call qword [sym.imp.KERNEL32.DLL_WriteConsoleW]
test eax, eax
jne 0x14006630e
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [rsi], eax
mov r11d, 0x2000
add r14d, ebx
cmp r14d, edi
jb 0x1400662d0
cmp dword [rsp + 0x38], r15d
movzx r15d, byte [rsp + 0x30]
je 0x140066432
call fcn.1400b55fc
mov rcx, r12
mov ebx, dword [rax]
call qword [0x14014b0b0]
call fcn.1400b55fc
xor edx, edx
lea r12, [rbp - 0x30]
mov dword [rsp + 0x38], edx
mov qword [rsp + 0x40], r12
mov dword [rax], ebx
jmp 0x140066434
cmp r10b, 0xd
je 0x1400662b0
mov eax, edi
mov rcx, r11
sub rcx, rax
cmp rcx, 2
jae 0x14006640a
xor r15d, r15d
mov r14d, r15d
nop word [rax + rax]
mov ebx, edi
sub ebx, r14d
cmp ebx, r11d
cmova ebx, r11d
cmp dword [rsi], r15d
jne 0x1400663c4
mov rcx, qword [r13 + 0x110]
lea r9, [rsp + 0x6c]
mov eax, r14d
mov r8d, ebx
mov qword [rsp + 0x20], r15
lea rdx, [r12 + rax*2]
call qword [sym.imp.KERNEL32.DLL_WriteConsoleW]
test eax, eax
jne 0x1400663be
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [rsi], eax
mov r11d, 0x2000
add r14d, ebx
cmp r14d, edi
jb 0x140066380
cmp dword [rsp + 0x38], r15d
movzx r15d, byte [rsp + 0x30]
je 0x140066401
call fcn.1400b55fc
mov rcx, r12
mov ebx, dword [rax]
call qword [0x14014b0b0]
call fcn.1400b55fc
xor edx, edx
lea r12, [rbp - 0x30]
mov dword [rsp + 0x38], edx
mov qword [rsp + 0x40], r12
mov dword [rax], ebx
jmp 0x140066403
xor edx, edx
mov r9d, dword [rsp + 0x34]
mov edi, edx
mov eax, edi
mov ecx, 0xd
inc edi
mov byte [rsp + 0x31], r9b
movzx r10d, r9b
mov word [rbp + rax*2 - 0x30], cx
mov ecx, 0xa
mov word [rbp + rdi*2 - 0x30], cx
inc edi
jmp case.0x140065e9b.27
xor edx, edx
mov r9d, dword [rsp + 0x34]
mov edi, edx
mov eax, edi
inc edi
mov word [rbp + rax*2 - 0x30], r9w
movzx r10d, r9b
mov byte [rsp + 0x31], r9b
jmp case.0x140065e9b.27
test r15b, 4
je 0x1400670b4
test r15b, 0x10
jne 0x140067090
lea eax, [r9 - 0x30]
cmp eax, 9
ja 0x140066507
movzx eax, byte [r13 + 0x11f]
mov r14d, dword [rsp + 0x34]
mov r8d, dword [rsp + 0x3c]
test r15b, 0x20
jne 0x1400664c5
cmp al, 4
jb 0x14006649e
or r15b, 0x10
mov byte [rsp + 0x30], r15b
jmp 0x14006713c
or r15b, 0x20
inc al
mov byte [rsp + 0x30], r15b
movzx ecx, al
lea eax, [r9 - 0x30]
mov byte [r13 + 0x11f], cl
mov word [r13 + rcx*2 + 0x11e], ax
jmp 0x14006713c
lea rdx, [rax*2]
movzx eax, word [rdx + r13 + 0x11e]
lea ecx, [rax + rax*4]
add ecx, ecx
cmp ecx, 0xffff
jbe 0x1400664f1
or r15b, 0x10
mov byte [rsp + 0x30], r15b
jmp 0x14006713c
sub cx, 0x30
add cx, r9w
mov word [rdx + r13 + 0x11e], cx
jmp 0x14006713c
cmp r9d, 0x3b
jne 0x14006655d
test r15b, 0x20
je 0x14006651c
and r15b, 0xdf
jmp 0x14006712d
movzx eax, byte [r13 + 0x11f]
mov r14d, dword [rsp + 0x34]
mov r8d, dword [rsp + 0x3c]
cmp al, 4
jb 0x140066540
or r15b, 0x10
mov byte [rsp + 0x30], r15b
jmp 0x14006713c
inc al
movzx eax, al
xor r9d, r9d
mov byte [r13 + 0x11f], al
mov word [r13 + rax*2 + 0x11e], r9w
jmp 0x14006713f
cmp r9d, 0x3f
jne 0x140066580
test r15b, 0x20
jne 0x140066577
cmp byte [r13 + 0x11f], 0
je case.0x140065e9b.27
or r15b, 0x10
jmp 0x14006712d
lea eax, [r9 - 0x40]
cmp eax, 0x3e
ja 0x140066577
movzx edx, byte [r13 + 0x11f]
test dl, dl
jne 0x14006659b
cmp r9d, 0x5b
je 0x140066577
lea eax, [r9 - 0x41]
cmp eax, 0x34
ja case.0x1400665ba.80
movzx eax, byte [rbx + rax + 0x67300]
mov ecx, dword [rbx + rax*4 + 0x672c0]
add rcx, rbx
jmp rcx
xor r15d, r15d
mov r14d, r15d
nop dword [rax]
nop word [rax + rax]
mov ebx, edi
sub ebx, r14d
cmp ebx, r11d
cmova ebx, r11d
cmp dword [rsi], r15d
jne 0x140066614
mov rcx, qword [r13 + 0x110]
lea r9, [rsp + 0x74]
mov eax, r14d
mov r8d, ebx
mov qword [rsp + 0x20], r15
lea rdx, [r12 + rax*2]
call qword [sym.imp.KERNEL32.DLL_WriteConsoleW]
test eax, eax
jne 0x14006660e
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [rsi], eax
mov r11d, 0x2000
add r14d, ebx
cmp r14d, edi
jb 0x1400665d0
cmp dword [rsp + 0x38], r15d
je 0x140066648
call fcn.1400b55fc
mov rcx, r12
mov ebx, dword [rax]
call qword [0x14014b0b0]
call fcn.1400b55fc
lea r12, [rbp - 0x30]
mov dword [rsp + 0x38], r15d
mov qword [rsp + 0x40], r12
mov dword [rax], ebx
mov edi, r15d
cmp byte [r13 + 0x11f], r15b
je 0x14006665e
movzx r9d, word [r13 + 0x120]
jmp 0x140066664
mov r9d, 1
neg r9d
mov r8b, 1
xor edx, edx
mov qword [rsp + 0x28], rsi
mov byte [rsp + 0x20], 1
mov rcx, r13
call fcn.140065060
movzx r10d, byte [rsp + 0x31]
mov r14d, dword [rsp + 0x34]
xor r9d, r9d
mov r8d, dword [rsp + 0x3c]
xor r15b, r15b
mov byte [rsp + 0x30], r15b
jmp 0x14006713f
xor r15d, r15d
mov r14d, r15d
nop dword [rax]
nop dword [rax + rax]
mov ebx, edi
sub ebx, r14d
cmp ebx, r11d
cmova ebx, r11d
cmp dword [rsi], r15d
jne 0x1400666f4
mov rcx, qword [r13 + 0x110]
lea r9, [rsp + 0x78]
mov eax, r14d
mov r8d, ebx
mov qword [rsp + 0x20], r15
lea rdx, [r12 + rax*2]
call qword [sym.imp.KERNEL32.DLL_WriteConsoleW]
test eax, eax
jne 0x1400666ee
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [rsi], eax
mov r11d, 0x2000
add r14d, ebx
cmp r14d, edi
jb 0x1400666b0
cmp dword [rsp + 0x38], r15d
je 0x140066728
call fcn.1400b55fc
mov rcx, r12
mov ebx, dword [rax]
call qword [0x14014b0b0]
call fcn.1400b55fc
lea r12, [rbp - 0x30]
mov dword [rsp + 0x38], r15d
mov qword [rsp + 0x40], r12
mov dword [rax], ebx
mov edi, r15d
cmp byte [r13 + 0x11f], r15b
je 0x140066741
movzx r9d, word [r13 + 0x120]
jmp 0x140066667
mov r9d, 1
jmp 0x140066667
xor r15d, r15d
mov r14d, r15d
nop dword [rax]
nop word [rax + rax]
mov ebx, edi
sub ebx, r14d
cmp ebx, r11d
cmova ebx, r11d
cmp dword [rsi], r15d
jne 0x1400667a4
mov rcx, qword [r13 + 0x110]
lea r9, [rsp + 0x7c]
mov eax, r14d
mov r8d, ebx
mov qword [rsp + 0x20], r15
lea rdx, [r12 + rax*2]
call qword [sym.imp.KERNEL32.DLL_WriteConsoleW]
test eax, eax
jne 0x14006679e
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [rsi], eax
mov r11d, 0x2000
add r14d, ebx
cmp r14d, edi
jb 0x140066760
cmp dword [rsp + 0x38], r15d
je 0x1400667d8
call fcn.1400b55fc
mov rcx, r12
mov ebx, dword [rax]
call qword [0x14014b0b0]
call fcn.1400b55fc
lea r12, [rbp - 0x30]
mov dword [rsp + 0x38], r15d
mov qword [rsp + 0x40], r12
mov dword [rax], ebx
mov edi, r15d
cmp byte [r13 + 0x11f], r15b
je 0x1400667f7
movzx edx, word [r13 + 0x120]
xor r9d, r9d
mov r8b, 1
jmp 0x14006666c
mov edx, 1
xor r9d, r9d
movzx r8d, dl
jmp 0x14006666c
xor r15d, r15d
mov r14d, r15d
nop
mov ebx, edi
sub ebx, r14d
cmp ebx, r11d
cmova ebx, r11d
cmp dword [rsi], r15d
jne 0x140066853
mov rcx, qword [r13 + 0x110]
lea r9, [rbp - 0x80]
mov eax, r14d
mov r8d, ebx
mov qword [rsp + 0x20], r15
lea rdx, [r12 + rax*2]
call qword [sym.imp.KERNEL32.DLL_WriteConsoleW]
test eax, eax
jne 0x14006684d
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [rsi], eax
mov r11d, 0x2000
add r14d, ebx
cmp r14d, edi
jb 0x140066810
cmp dword [rsp + 0x38], r15d
je 0x140066887
call fcn.1400b55fc
mov rcx, r12
mov ebx, dword [rax]
call qword [0x14014b0b0]
call fcn.1400b55fc
lea r12, [rbp - 0x30]
mov dword [rsp + 0x38], r15d
mov qword [rsp + 0x40], r12
mov dword [rax], ebx
mov edi, r15d
cmp byte [r13 + 0x11f], r15b
je 0x1400668a8
movzx edx, word [r13 + 0x120]
mov r8b, 1
neg edx
xor r9d, r9d
jmp 0x14006666c
mov edx, 1
mov r8b, 1
neg edx
xor r9d, r9d
jmp 0x14006666c
xor r15d, r15d
mov r14d, r15d
mov ebx, edi
sub ebx, r14d
cmp ebx, r11d
cmova ebx, r11d
cmp dword [rsi], r15d
jne 0x140066903
mov rcx, qword [r13 + 0x110]
lea r9, [rbp - 0x7c]
mov eax, r14d
mov r8d, ebx
mov qword [rsp + 0x20], r15
lea rdx, [r12 + rax*2]
call qword [sym.imp.KERNEL32.DLL_WriteConsoleW]
test eax, eax
jne 0x1400668fd
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [rsi], eax
mov r11d, 0x2000
add r14d, ebx
cmp r14d, edi
jb 0x1400668c0
cmp dword [rsp + 0x38], r15d
je 0x140066937
call fcn.1400b55fc
mov rcx, r12
mov ebx, dword [rax]
call qword [0x14014b0b0]
call fcn.1400b55fc
lea r12, [rbp - 0x30]
mov dword [rsp + 0x38], r15d
mov qword [rsp + 0x40], r12
mov dword [rax], ebx
mov edi, r15d
cmp byte [r13 + 0x11f], r15b
je 0x140066953
movzx r9d, word [r13 + 0x120]
xor r8d, r8d
jmp 0x14006666a
mov r9d, 1
xor r8d, r8d
jmp 0x14006666a
xor r15d, r15d
mov r14d, r15d
nop word [rax + rax]
mov ebx, edi
sub ebx, r14d
cmp ebx, r11d
cmova ebx, r11d
cmp dword [rsi], r15d
jne 0x1400669b3
mov rcx, qword [r13 + 0x110]
lea r9, [rbp - 0x78]
mov eax, r14d
mov r8d, ebx
mov qword [rsp + 0x20], r15
lea rdx, [r12 + rax*2]
call qword [sym.imp.KERNEL32.DLL_WriteConsoleW]
test eax, eax
jne 0x1400669ad
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [rsi], eax
mov r11d, 0x2000
add r14d, ebx
cmp r14d, edi
jb 0x140066970
cmp dword [rsp + 0x38], r15d
je 0x1400669e7
call fcn.1400b55fc
mov rcx, r12
mov ebx, dword [rax]
call qword [0x14014b0b0]
call fcn.1400b55fc
lea r12, [rbp - 0x30]
mov dword [rsp + 0x38], r15d
mov qword [rsp + 0x40], r12
mov dword [rax], ebx
mov edi, r15d
cmp byte [r13 + 0x11f], r15b
je 0x140066a06
movzx r9d, word [r13 + 0x120]
neg r9d
xor r8d, r8d
jmp 0x14006666a
mov r9d, 1
neg r9d
xor r8d, r8d
jmp 0x14006666a
xor r15d, r15d
mov r14d, r15d
nop dword [rax]
mov ebx, edi
sub ebx, r14d
cmp ebx, r11d
cmova ebx, r11d
cmp dword [rsi], r15d
jne 0x140066a63
mov rcx, qword [r13 + 0x110]
lea r9, [rbp - 0x74]
mov eax, r14d
mov r8d, ebx
mov qword [rsp + 0x20], r15
lea rdx, [r12 + rax*2]
call qword [sym.imp.KERNEL32.DLL_WriteConsoleW]
test eax, eax
jne 0x140066a5d
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [rsi], eax
mov r11d, 0x2000
add r14d, ebx
cmp r14d, edi
jb 0x140066a20
cmp dword [rsp + 0x38], r15d
je 0x140066a97
call fcn.1400b55fc
mov rcx, r12
mov ebx, dword [rax]
call qword [0x14014b0b0]
call fcn.1400b55fc
lea r12, [rbp - 0x30]
mov dword [rsp + 0x38], r15d
mov qword [rsp + 0x40], r12
mov dword [rax], ebx
cmp byte [r13 + 0x11f], 1
mov edi, r15d
jb 0x140066ab4
movzx eax, word [r13 + 0x120]
lea edx, [rax - 1]
test ax, ax
jne 0x140066ab7
mov edx, r15d
xor r9d, r9d
xor r8d, r8d
jmp 0x14006666c
xor r15d, r15d
mov r14d, r15d
nop dword [rax + rax]
mov ebx, edi
sub ebx, r14d
cmp ebx, r11d
cmova ebx, r11d
cmp dword [rsi], r15d
jne 0x140066b13
mov rcx, qword [r13 + 0x110]
lea r9, [rbp - 0x70]
mov eax, r14d
mov r8d, ebx
mov qword [rsp + 0x20], r15
lea rdx, [r12 + rax*2]
call qword [sym.imp.KERNEL32.DLL_WriteConsoleW]
test eax, eax
jne 0x140066b0d
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [rsi], eax
mov r11d, 0x2000
add r14d, ebx
cmp r14d, edi
jb 0x140066ad0
cmp dword [rsp + 0x38], r15d
je 0x140066b47
call fcn.1400b55fc
mov rcx, r12
mov ebx, dword [rax]
call qword [0x14014b0b0]
call fcn.1400b55fc
lea r12, [rbp - 0x30]
mov dword [rsp + 0x38], r15d
mov qword [rsp + 0x40], r12
mov dword [rax], ebx
movzx ecx, byte [r13 + 0x11f]
mov edi, r15d
cmp cl, 1
jb 0x140066b68
movzx eax, word [r13 + 0x120]
lea r9d, [rax - 1]
test ax, ax
jne 0x140066b6b
mov r9d, r15d
cmp cl, 2
jb 0x140066b80
movzx eax, word [r13 + 0x122]
lea edx, [rax - 1]
test ax, ax
jne 0x140066b83
mov edx, r15d
mov qword [rsp + 0x28], rsi
xor r8d, r8d
mov byte [rsp + 0x20], dil
jmp 0x140066676
xor r9d, r9d
mov r14d, r9d
nop dword [rax + rax]
mov ebx, edi
sub ebx, r14d
cmp ebx, r11d
cmova ebx, r11d
cmp dword [rsi], 0
jne 0x140066be6
mov rcx, qword [r13 + 0x110]
mov r8d, ebx
mov eax, r14d
mov qword [rsp + 0x20], r9
lea r9, [rbp - 0x6c]
lea rdx, [r12 + rax*2]
call qword [sym.imp.KERNEL32.DLL_WriteConsoleW]
test eax, eax
jne 0x140066bdd
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [rsi], eax
xor r9d, r9d
mov r11d, 0x2000
add r14d, ebx
cmp r14d, edi
jb 0x140066ba0
cmp dword [rsp + 0x38], 0
je 0x140066c1d
call fcn.1400b55fc
mov rcx, r12
mov ebx, dword [rax]
call qword [0x14014b0b0]
call fcn.1400b55fc
xor r9d, r9d
lea r12, [rbp - 0x30]
mov dword [rsp + 0x38], r9d
mov qword [rsp + 0x40], r12
mov dword [rax], ebx
cmp byte [r13 + 0x11f], 0
mov edi, r9d
je 0x140066c54
movzx edx, word [r13 + 0x120]
cmp edx, 2
jbe 0x140066c57
movzx r10d, byte [rsp + 0x31]
xor r15b, r15b
mov r14d, dword [rsp + 0x34]
mov r8d, dword [rsp + 0x3c]
mov byte [rsp + 0x30], r15b
jmp 0x14006713f
mov edx, r9d
mov r9, rsi
mov r8b, 1
mov rcx, r13
call fcn.1400651e0
jmp 0x14006667e
xor r9d, r9d
mov r14d, r9d
mov ebx, edi
sub ebx, r14d
cmp ebx, r11d
cmova ebx, r11d
cmp dword [rsi], 0
jne 0x140066cb6
mov rcx, qword [r13 + 0x110]
mov r8d, ebx
mov eax, r14d
mov qword [rsp + 0x20], r9
lea r9, [rbp - 0x68]
lea rdx, [r12 + rax*2]
call qword [sym.imp.KERNEL32.DLL_WriteConsoleW]
test eax, eax
jne 0x140066cad
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [rsi], eax
xor r9d, r9d
mov r11d, 0x2000
add r14d, ebx
cmp r14d, edi
jb 0x140066c70
cmp dword [rsp + 0x38], 0
je 0x140066ced
call fcn.1400b55fc
mov rcx, r12
mov ebx, dword [rax]
call qword [0x14014b0b0]
call fcn.1400b55fc
xor r9d, r9d
lea r12, [rbp - 0x30]
mov dword [rsp + 0x38], r9d
mov qword [rsp + 0x40], r12
mov dword [rax], ebx
cmp byte [r13 + 0x11f], 0
mov edi, r9d
je 0x140066d1e
movzx edx, word [r13 + 0x120]
cmp edx, 2
ja 0x140066c37
mov r9, rsi
xor r8d, r8d
mov rcx, r13
call fcn.1400651e0
jmp 0x14006667e
mov edx, r9d
xor r8d, r8d
mov r9, rsi
mov rcx, r13
call fcn.1400651e0
jmp 0x14006667e
xor r15d, r15d
mov r14d, r15d
nop word [rax + rax]
mov ebx, edi
sub ebx, r14d
cmp ebx, r11d
cmova ebx, r11d
cmp dword [rsi], r15d
jne 0x140066d83
mov rcx, qword [r13 + 0x110]
lea r9, [rbp - 0x64]
mov eax, r14d
mov r8d, ebx
mov qword [rsp + 0x20], r15
lea rdx, [r12 + rax*2]
call qword [sym.imp.KERNEL32.DLL_WriteConsoleW]
test eax, eax
jne 0x140066d7d
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [rsi], eax
mov r11d, 0x2000
add r14d, ebx
cmp r14d, edi
jb 0x140066d40
cmp dword [rsp + 0x38], r15d
je 0x140066db7
call fcn.1400b55fc
mov rcx, r12
mov ebx, dword [rax]
call qword [0x14014b0b0]
call fcn.1400b55fc
lea r12, [rbp - 0x30]
mov dword [rsp + 0x38], r15d
mov qword [rsp + 0x40], r12
mov dword [rax], ebx
mov rdx, rsi
mov rcx, r13
mov edi, r15d
call fcn.1400654b0
jmp 0x14006667e
xor r15d, r15d
mov r14d, r15d
mov ebx, edi
sub ebx, r14d
cmp ebx, r11d
cmova ebx, r11d
cmp dword [rsi], r15d
jne 0x140066e13
mov rcx, qword [r13 + 0x110]
lea r9, [rbp - 0x60]
mov eax, r14d
mov r8d, ebx
mov qword [rsp + 0x20], r15
lea rdx, [r12 + rax*2]
call qword [sym.imp.KERNEL32.DLL_WriteConsoleW]
test eax, eax
jne 0x140066e0d
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [rsi], eax
mov r11d, 0x2000
add r14d, ebx
cmp r14d, edi
jb 0x140066dd0
cmp dword [rsp + 0x38], r15d
je 0x140066e47
call fcn.1400b55fc
mov rcx, r12
mov ebx, dword [rax]
call qword [0x14014b0b0]
call fcn.1400b55fc
lea r12, [rbp - 0x30]
mov dword [rsp + 0x38], r15d
mov qword [rsp + 0x40], r12
mov dword [rax], ebx
mov r8, rsi
xor edx, edx
mov rcx, r13
mov edi, r15d
call fcn.140065820
jmp 0x14006667e
xor r9d, r9d
mov r14d, r9d
nop dword [rax]
nop word [rax + rax]
mov ebx, edi
sub ebx, r14d
cmp ebx, r11d
cmova ebx, r11d
cmp dword [rsi], 0
jne 0x140066eb6
mov rcx, qword [r13 + 0x110]
mov r8d, ebx
mov eax, r14d
mov qword [rsp + 0x20], r9
lea r9, [rbp - 0x5c]
lea rdx, [r12 + rax*2]
call qword [sym.imp.KERNEL32.DLL_WriteConsoleW]
test eax, eax
jne 0x140066ead
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [rsi], eax
xor r9d, r9d
mov r11d, 0x2000
add r14d, ebx
cmp r14d, edi
jb 0x140066e70
cmp dword [rsp + 0x38], 0
je 0x140066eed
call fcn.1400b55fc
mov rcx, r12
mov ebx, dword [rax]
call qword [0x14014b0b0]
call fcn.1400b55fc
xor r9d, r9d
lea r12, [rbp - 0x30]
mov dword [rsp + 0x38], r9d
mov qword [rsp + 0x40], r12
mov dword [rax], ebx
cmp dword [rsi], 0
mov edi, r9d
jne 0x140066c37
test dword [r13 + 0x58], 0x4000000
je 0x140066c37
movsx r9d, word [r13 + 0x12a]
xor r8d, r8d
movsx edx, word [r13 + 0x128]
mov qword [rsp + 0x28], rsi
mov byte [rsp + 0x20], 0
jmp 0x140066676
cmp dl, 1
jne case.0x1400665ba.80
cmp word [r13 + 0x120], 0x19
jne case.0x1400665ba.80
xor r15d, r15d
mov r14d, r15d
nop word [rax + rax]
mov ebx, edi
sub ebx, r14d
cmp ebx, r11d
cmova ebx, r11d
cmp dword [rsi], r15d
jne 0x140066f93
mov rcx, qword [r13 + 0x110]
lea r9, [rbp - 0x58]
mov eax, r14d
mov r8d, ebx
mov qword [rsp + 0x20], r15
lea rdx, [r12 + rax*2]
call qword [sym.imp.KERNEL32.DLL_WriteConsoleW]
test eax, eax
jne 0x140066f8d
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [rsi], eax
mov r11d, 0x2000
add r14d, ebx
cmp r14d, edi
jb 0x140066f50
cmp dword [rsp + 0x38], r15d
je 0x140066fc7
call fcn.1400b55fc
mov rcx, r12
mov ebx, dword [rax]
call qword [0x14014b0b0]
call fcn.1400b55fc
lea r12, [rbp - 0x30]
mov dword [rsp + 0x38], r15d
mov qword [rsp + 0x40], r12
mov dword [rax], ebx
mov r8, rsi
xor edx, edx
mov rcx, r13
mov edi, r15d
call fcn.140065a30
jmp 0x14006667e
cmp dl, 1
jne case.0x1400665ba.80
cmp word [r13 + 0x120], 0x19
jne case.0x1400665ba.80
xor r15d, r15d
mov r14d, r15d
nop word [rax + rax]
mov ebx, edi
sub ebx, r14d
cmp ebx, r11d
cmova ebx, r11d
cmp dword [rsi], r15d
jne 0x140067044
mov rcx, qword [r13 + 0x110]
lea r9, [rsp + 0x54]
mov eax, r14d
mov r8d, ebx
mov qword [rsp + 0x20], r15
lea rdx, [r12 + rax*2]
call qword [sym.imp.KERNEL32.DLL_WriteConsoleW]
test eax, eax
jne 0x14006703e
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [rsi], eax
mov r11d, 0x2000
add r14d, ebx
cmp r14d, edi
jb 0x140067000
cmp dword [rsp + 0x38], r15d
je 0x140067078
call fcn.1400b55fc
mov rcx, r12
mov ebx, dword [rax]
call qword [0x14014b0b0]
call fcn.1400b55fc
lea r12, [rbp - 0x30]
mov dword [rsp + 0x38], r15d
mov qword [rsp + 0x40], r12
mov dword [rax], ebx
mov r8, rsi
mov edx, 1
mov rcx, r13
mov edi, r15d
call fcn.140065a30
jmp 0x14006667e
mov r14d, dword [rsp + 0x34]
lea eax, [r9 - 0x40]
mov r8d, dword [rsp + 0x3c]
cmp eax, 0x3e
ja 0x14006713c
xor r15b, r15b
mov byte [rsp + 0x30], r15b
jmp 0x14006713c
test r15b, 8
je 0x140067252
test r15b, 0x40
je 0x1400670f6
test r15b, r15b
js 0x1400670f0
cmp r9d, 0x22
jne 0x1400670d5
and r15b, 0xbf
jmp 0x14006712d
mov r14d, dword [rsp + 0x34]
mov r8d, dword [rsp + 0x3c]
cmp r9d, 0x5c
jne 0x14006713c
or r15b, 0x80
mov byte [rsp + 0x30], r15b
jmp 0x14006713c
and r15b, 0x7f
jmp 0x14006712d
cmp r9d, 7
je 0x14006712a
cmp r9d, 0x5c
jne 0x14006710e
test r15b, 2
jne 0x14006712a
and r15b, 0xfd
jmp 0x14006712d
cmp r9d, 0x1b
jne 0x14006711a
or r15b, 2
jmp 0x14006712d
cmp r9d, 0x22
jne 0x140067108
and r15b, 0x3d
or r15b, 0x40
jmp 0x14006712d
xor r15b, r15b
mov byte [rsp + 0x30], r15b
mov r8d, dword [rsp + 0x3c]
mov r14d, dword [rsp + 0x34]
xor r9d, r9d
inc r8d
lea rbx, [0x140000000]
mov r11d, 0x2000
mov dword [rsp + 0x3c], r8d
cmp r8d, dword [rsp + 0x58]
jb 0x140065da0
mov r12d, dword [rsp + 0x34]
mov r14d, r9d
mov r15, qword [rsp + 0x40]
nop dword [rax]
mov ebx, edi
sub ebx, r14d
cmp ebx, r11d
cmova ebx, r11d
cmp dword [rsi], 0
jne 0x1400671b7
mov rcx, qword [r13 + 0x110]
mov r8d, ebx
mov eax, r14d
mov qword [rsp + 0x20], r9
lea r9, [rsp + 0x54]
lea rdx, [r15 + rax*2]
call qword [sym.imp.KERNEL32.DLL_WriteConsoleW]
test eax, eax
jne 0x1400671ae
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [rsi], eax
xor r9d, r9d
mov r11d, 0x2000
add r14d, ebx
cmp r14d, edi
jb 0x140067170
cmp dword [rsp + 0x38], 0
movzx r15d, byte [rsp + 0x30]
je 0x1400671e5
call fcn.1400b55fc
mov rcx, qword [rsp + 0x40]
mov ebx, dword [rax]
call qword [0x14014b0b0]
call fcn.1400b55fc
mov dword [rax], ebx
mov eax, dword [rsp + 0x48]
xor r8d, r8d
mov byte [r13 + 0x11c], al
movzx eax, byte [rsp + 0x31]
mov byte [r13 + 0x11d], al
mov dword [r13 + 0x118], r12d
lea edx, [r8 + 1]
mov byte [r13 + 0x11e], r15b
mov rcx, qword [0x140150988]
call qword [sym.imp.KERNEL32.DLL_ReleaseSemaphore]
test eax, eax
je 0x140067252
mov eax, dword [rsi]
neg eax
sbb eax, eax
mov rcx, qword [rbp + 0x3fd0]
xor rcx, rsp
call fcn.14008c170
mov rbx, qword [rsp + 0x4130]
add rsp, 0x40e0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call fcn.1400b4fc0
int3