Function at 0x14018f150
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov qword [rsp + 0x10], rbx
mov dword [rsp + 0x20], r9d
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x90
mov ebp, dword [rsp + 0xf0]
xor r15d, r15d
cmp dword [rsp + 0x100], 0x10
mov r14d, r9d
mov rax, qword [rcx]
mov r10d, r15d
mov r13d, dword [rsp + 0xf8]
sete r10b
inc r10d
mov dword [rsp + 0x40], ebp
mov ebx, r10d
mov esi, r8d
mov eax, dword [rax + 8]
mov rdi, rdx
imul ebx, r9d
mov r12d, eax
imul r12d, r10d
mov r8, rcx
mov dword [rsp + 0x20], eax
mov r9d, ebx
imul r9d, ebp
mov dword [rsp + 0x48], r12d
mov dword [rsp + 0x30], r9d
cmp r14d, eax
je 0x14018f200
inc eax
cmp r14d, eax
je 0x14018f200
mov r8d, 0x1237
lea rdx, str.C:_vcpkginstalledx64_windows_staticinclude_stb_image.h
lea rcx, str.out_n__s__img_n__out_n__s__img_n1
call fcn.1404b9c98
mov r8, qword [rsp + 0xd0]
mov r9d, dword [rsp + 0x30]
test ebp, ebp
js 0x14019035f
test r13d, r13d
js 0x14019035f
je 0x14018f225
xor edx, edx
mov eax, 0x7fffffff
div r13d
cmp ebp, eax
jg 0x14019035f
mov ecx, ebp
imul ecx, r13d
test ecx, ecx
js 0x14019035f
test ebx, ebx
js 0x14019035f
je 0x14018f24d
mov eax, 0x7fffffff
cdq
idiv ebx
cmp ecx, eax
jg 0x14019035f
mov eax, r13d
imul eax, r9d
movsxd rcx, eax
call fcn.1404b9d50
mov r9, qword [rsp + 0xd0]
mov qword [r9 + 0x18], rax
test rax, rax
je 0x140190363
movsxd r11, dword [rsp + 0x20]
test r11d, r11d
js 0x14019034a
mov r10d, ebp
test ebp, ebp
je 0x14018f299
xor edx, edx
mov eax, 0x7fffffff
div r10d
cmp r11d, eax
jg 0x14019034a
mov ebp, r11d
imul ebp, r10d
mov dword [rsp + 0x24], ebp
test ebp, ebp
js 0x14019034a
mov ecx, dword [rsp + 0x100]
test ecx, ecx
js 0x14019034a
je 0x14018f2ce
xor edx, edx
mov eax, 0x7fffffff
div ecx
cmp ebp, eax
jg 0x14019034a
mov eax, ebp
imul eax, ecx
cmp eax, 0x7ffffff8
jg 0x14019034a
mov edx, ebp
imul edx, ecx
add edx, 7
shr edx, 3
mov dword [rsp + 0x4c], edx
lea eax, [rdx + 1]
imul eax, r13d
cmp esi, eax
jae 0x14018f310
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.not_enough_pixels
jmp 0x140190376
mov dword [rsp + 0x44], r15d
mov r8d, r15d
test r13d, r13d
je 0x14018fe82
movsxd r14, r12d
mov r9, r11
movsxd r13, ebx
mov qword [rsp + 0x58], r14
mov qword [rsp + 0x68], r13
mov qword [rsp + 0x28], r11
mov dword [rsp + 0x24], ebp
nop dword [rax]
movzx ebp, byte [rdi]
mov ecx, r8d
mov esi, dword [rsp + 0x30]
inc rdi
mov rax, qword [rsp + 0xd0]
imul ecx, esi
mov rbx, qword [rax + 0x18]
add rbx, rcx
mov qword [rsp + 0x88], rcx
cmp ebp, 4
ja 0x14018fe5a
cmp dword [rsp + 0x100], 8
jge 0x14018f3aa
cmp edx, r10d
ja 0x14018fe42
mov eax, dword [rsp + 0xe8]
mov r12d, 1
imul eax, r10d
mov r14d, r12d
mov dword [rsp + 0x48], r12d
mov qword [rsp + 0x58], r12
mov dword [rsp + 0x40], edx
sub eax, edx
add rbx, rax
mov rax, rsi
lea rcx, [0x140000000]
mov rsi, rbx
sub rsi, rax
test r8d, r8d
jne 0x14018f3c7
movzx ebp, byte [rbp + rcx + 0x5e800c]
test r14, r14
jle 0x14018f504
mov r11, rsi
mov r10, rbx
sub r11, rdi
mov rdx, rdi
sub r10, rdi
mov r9, r14
mov r8, rdx
cmp ebp, 6
ja case.default.0x14018f3f7
movsxd rax, ebp
mov eax, dword [rcx + rax*4 + 0x19039c]
add rax, rcx
jmp rax
inc rdx
sub r9, 1
je 0x14018f4fa
lea rcx, [0x140000000]
jmp 0x14018f3e2
movzx eax, byte [rdx]
inc rdx
mov byte [r10 + r8], al
sub r9, 1
je 0x14018f4fa
mov r8, rdx
jmp case.0x14018f3f7.0
movzx eax, byte [rdx]
inc rdx
mov byte [r10 + r8], al
sub r9, 1
je 0x14018f4fa
mov r8, rdx
jmp case.0x14018f3f7.1
movzx eax, byte [r11 + r8]
add al, byte [rdx]
inc rdx
mov byte [r10 + r8], al
sub r9, 1
je 0x14018f4fa
mov r8, rdx
jmp case.0x14018f3f7.2
movzx eax, byte [r11 + r8]
shr al, 1
add al, byte [rdx]
inc rdx
mov byte [r10 + r8], al
sub r9, 1
je 0x14018f4fa
mov r8, rdx
jmp case.0x14018f3f7.3
movzx eax, byte [r11 + r8]
mov ecx, r15d
test al, al
cmovne ecx, eax
add cl, byte [rdx]
inc rdx
mov byte [r10 + r8], cl
sub r9, 1
je 0x14018f4fa
mov r8, rdx
jmp case.0x14018f3f7.4
movzx eax, byte [rdx]
inc rdx
mov byte [r10 + r8], al
sub r9, 1
je 0x14018f4fa
mov r8, rdx
jmp case.0x14018f3f7.5
movzx eax, byte [rdx]
inc rdx
mov byte [r10 + r8], al
sub r9, 1
je 0x14018f4f5
mov r8, rdx
jmp case.0x14018f3f7.6
mov r13, qword [rsp + 0x68]
mov r9, qword [rsp + 0x28]
mov r11d, dword [rsp + 0x20]
mov eax, dword [rsp + 0x100]
cmp eax, 8
jne 0x14018f53a
movsxd rax, dword [rsp + 0xe8]
cmp r11d, eax
je 0x14018f522
mov byte [r9 + rbx], 0xff
add rdi, r9
add rsi, rax
add rbx, rax
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x38], rbx
mov r15, rdi
jmp 0x14018f58a
cmp eax, 0x10
jne 0x14018f56b
cmp r11d, dword [rsp + 0xe8]
je 0x14018f550
mov word [r14 + rbx], 0xffff
add rsi, r13
movsxd rax, r12d
add rdi, rax
mov qword [rsp + 0x50], rsi
add rbx, r13
mov r15, rdi
mov qword [rsp + 0x38], rbx
jmp 0x14018f58a
inc rdi
inc rsi
mov r15, rdi
inc rbx
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x38], rbx
cmp eax, 8
jl 0x14018fac4
cmp r11d, dword [rsp + 0xe8]
je 0x14018fac4
lea eax, [r11 + 1]
cmp eax, dword [rsp + 0xe8]
je 0x14018f5be
mov r8d, 0x128b
lea rdx, str.C:_vcpkginstalledx64_windows_staticinclude_stb_image.h
lea rcx, str.img_n1__out_n
call fcn.1404b9c98
cmp ebp, 6
ja case.default.0x14018f5de
lea rdx, [0x140000000]
movsxd rax, ebp
mov rdi, r15
mov ecx, dword [rdx + rax*4 + 0x1903b8]
add rcx, rdx
jmp rcx
mov edx, dword [rsp + 0xf0]
lea eax, [rdx - 1]
cmp eax, 1
jb 0x14018fa7c
movsxd r10, r12d
mov r9d, eax
nop dword [rax]
test r14, r14
jle 0x14018f622
mov r8, rdi
mov rcx, rbx
sub r8, rbx
mov rdx, r14
movzx eax, byte [rcx + r8]
mov byte [rcx], al
lea rcx, [rcx + 1]
sub rdx, 1
jne 0x14018f611
mov byte [r14 + rbx], 0xff
add rdi, r10
add rbx, r13
sub r9, 1
jne 0x14018f600
jmp case.default.0x14018f5de
mov edx, dword [rsp + 0xf0]
lea eax, [rdx - 1]
cmp eax, 1
jb 0x14018fa7c
movsxd r11, r12d
mov r10d, eax
test r14, r14
jle 0x14018f684
mov rdx, rbx
mov r9, rbx
sub rdx, r13
mov rcx, rdi
sub rdx, rdi
mov r8, r14
sub r9, rdi
nop dword [rax + rax]
movzx eax, byte [rcx + rdx]
add al, byte [rcx]
mov byte [r9 + rcx], al
lea rcx, [rcx + 1]
sub r8, 1
jne 0x14018f670
mov byte [r14 + rbx], 0xff
add rdi, r11
add rbx, r13
sub r10, 1
jne 0x14018f651
jmp case.default.0x14018f5de
mov edx, dword [rsp + 0xf0]
lea eax, [rdx - 1]
cmp eax, 1
jb 0x14018fa7c
movsxd rbp, r12d
mov r11d, eax
xor eax, eax
mov edx, eax
test r12d, r12d
jle 0x14018f7f1
cmp r12d, 8
jb 0x14018f7f1
lea eax, [r12 - 1]
movsxd rcx, eax
lea rax, [rcx + rdi]
lea r8, [rcx + rbx]
cmp rbx, rax
ja 0x14018f6e8
cmp r8, rdi
jae 0x14018f7f1
lea rax, [rcx + rsi]
cmp rbx, rax
ja 0x14018f6fa
cmp r8, rsi
jae 0x14018f7f1
cmp r12d, 0x40
jb 0x14018f79d
mov ecx, r12d
and ecx, 0x8000003f
jge 0x14018f716
dec ecx
or ecx, 0xffffffc0
inc ecx
mov eax, r12d
sub eax, ecx
mov rcx, rsi
movsxd r9, eax
sub rcx, rdi
lea rax, [rdi + 0x10]
mov r8, rbx
sub r8, rdi
nop
movdqu xmm0, xmmword [rax - 0x10]
add rdx, 0x40
movdqu xmm1, xmmword [rax + rcx - 0x10]
movdqu xmm2, xmmword [rax + rcx]
lea rax, [rax + 0x40]
paddb xmm1, xmm0
movdqu xmm0, xmmword [rax - 0x40]
movdqu xmmword [r8 + rax - 0x50], xmm1
paddb xmm2, xmm0
movdqu xmm0, xmmword [rax - 0x30]
movdqu xmm1, xmmword [rax + rcx - 0x30]
movdqu xmmword [r8 + rax - 0x40], xmm2
paddb xmm1, xmm0
movdqu xmm0, xmmword [rax - 0x20]
movdqu xmm2, xmmword [rax + rcx - 0x20]
movdqu xmmword [r8 + rax - 0x30], xmm1
paddb xmm2, xmm0
movdqu xmmword [r8 + rax - 0x20], xmm2
cmp rdx, r9
jl 0x14018f730
mov eax, r12d
and al, 0x3f
cmp al, 8
jb 0x14018f7f1
mov ecx, r12d
and ecx, 0x80000007
jge 0x14018f7af
dec ecx
or ecx, 0xfffffff8
inc ecx
mov eax, r12d
sub eax, ecx
mov rcx, rsi
movsxd r9, eax
sub rcx, rdi
lea rax, [rdx + rdi]
mov r8, rbx
sub r8, rdi
nop word [rax + rax]
movq xmm1, qword [rax + rcx]
add rdx, 8
movq xmm0, qword [rax]
lea rax, [rax + 8]
paddb xmm1, xmm0
movq qword [r8 + rax - 8], xmm1
cmp rdx, r9
jl 0x14018f7d0
cmp rdx, r14
jge 0x14018f825
mov r9, rsi
lea rcx, [rdx + rdi]
mov r10, rbx
sub r9, rdi
sub r10, rdi
mov r8, r14
sub r8, rdx
nop dword [rax]
movzx eax, byte [rcx + r9]
add al, byte [rcx]
mov byte [r10 + rcx], al
lea rcx, [rcx + 1]
sub r8, 1
jne 0x14018f810
mov byte [r14 + rbx], 0xff
add rdi, rbp
add rbx, r13
add rsi, r13
sub r11, 1
jne 0x14018f6b3
jmp case.default.0x14018f5de
mov edx, dword [rsp + 0xf0]
lea eax, [rdx - 1]
cmp eax, 1
jb 0x14018fa7c
movsxd r15, r12d
mov ebp, eax
nop word [rax + rax]
test r14, r14
jle 0x14018f8a0
mov r8, rbx
mov r10, rdi
sub r8, r13
sub r10, rsi
sub r8, rsi
mov r11, rbx
sub r11, rsi
mov rdx, rsi
mov r9, r14
movzx ecx, byte [rdx + r8]
movzx eax, byte [rdx]
lea rdx, [rdx + 1]
add ecx, eax
shr ecx, 1
add cl, byte [r10 + rdx - 1]
mov byte [r11 + rdx - 1], cl
sub r9, 1
jne 0x14018f880
mov byte [r14 + rbx], 0xff
add rdi, r15
add rbx, r13
add rsi, r13
sub rbp, 1
jne 0x14018f860
jmp case.default.0x14018f5de
mov edx, dword [rsp + 0xf0]
lea eax, [rdx - 1]
cmp eax, 1
jb 0x14018fa7c
movsxd rcx, r12d
mov qword [rsp + 0x80], rcx
mov qword [rsp + 0x60], rax
nop dword [rax]
test r14, r14
jle 0x14018f98a
mov rax, rsi
mov r9, rbx
sub rax, rbx
sub r9, r13
mov qword [rsp + 0x70], rax
mov r12, r14
mov r14, qword [rsp + 0x70]
mov rax, r13
sub rax, rbx
lea rbx, [rax + rsi]
lea rsi, [rdi + rax]
movzx r8d, byte [r9]
movzx ebp, byte [r9 + r14]
mov ecx, r8d
movzx r15d, byte [rbx + r9]
sub ecx, ebp
mov r11d, ecx
lea edx, [r15 + rcx]
mov eax, edx
sub eax, r8d
mov r10d, eax
neg r10d
cmovs r10d, eax
neg r11d
cmovs r11d, ecx
sub edx, ebp
mov eax, edx
neg eax
cmovs eax, edx
cmp r10d, r11d
jg 0x14018f953
cmp r10d, eax
jle 0x14018f95d
cmp r11d, eax
mov r8d, ebp
cmovle r8d, r15d
add r8b, byte [rsi + r9]
mov byte [r9 + r13], r8b
inc r9
sub r12, 1
jne 0x14018f910
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x50]
mov r14, qword [rsp + 0x58]
mov rax, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x80]
add rsi, r13
mov byte [r14 + rbx], 0xff
add rbx, r13
mov qword [rsp + 0x50], rsi
add rdi, rcx
mov qword [rsp + 0x38], rbx
sub rax, 1
mov qword [rsp + 0x60], rax
jne 0x14018f8e0
jmp case.default.0x14018f5de
mov edx, dword [rsp + 0xf0]
lea eax, [rdx - 1]
cmp eax, 1
jb 0x14018fa7c
movsxd r11, r12d
mov r10d, eax
nop
test r14, r14
jle 0x14018fa08
mov rdx, rbx
mov r9, rbx
sub rdx, r13
mov rcx, rdi
sub rdx, rdi
mov r8, r14
sub r9, rdi
nop word [rax + rax]
movzx eax, byte [rcx + rdx]
lea rcx, [rcx + 1]
shr al, 1
add al, byte [rcx - 1]
mov byte [r9 + rcx - 1], al
sub r8, 1
jne 0x14018f9f0
mov byte [r14 + rbx], 0xff
add rdi, r11
add rbx, r13
sub r10, 1
jne 0x14018f9d0
jmp case.default.0x14018f5de
mov edx, dword [rsp + 0xf0]
lea eax, [rdx - 1]
cmp eax, 1
jb 0x14018fa7c
movsxd r11, r12d
mov r10d, eax
test r14, r14
jle 0x14018fa64
mov rdx, rbx
mov r9, rbx
sub rdx, r13
mov rcx, rdi
sub rdx, rdi
mov r8, r14
sub r9, rdi
nop word [rax + rax]
movzx eax, byte [rcx + rdx]
add al, byte [rcx]
mov byte [r9 + rcx], al
lea rcx, [rcx + 1]
sub r8, 1
jne 0x14018fa50
mov byte [r14 + rbx], 0xff
add rdi, r11
add rbx, r13
sub r10, 1
jne 0x14018fa30
mov edx, dword [rsp + 0xf0]
mov ecx, dword [rsp + 0x100]
mov r9, qword [rsp + 0xd0]
cmp ecx, 0x10
jne 0x14018fe08
mov rcx, qword [rsp + 0x88]
add rcx, qword [r9 + 0x18]
test edx, edx
je 0x14018fe01
mov eax, edx
nop word [rax + rax]
mov byte [r14 + rcx + 1], 0xff
add rcx, r13
sub rax, 1
jne 0x14018fab0
jmp 0x14018fe01
mov r15d, dword [rsp + 0x40]
dec r15d
imul r15d, r12d
mov dword [rsp + 0x38], r15d
cmp ebp, 6
ja case.default.0x14018faf5
lea rdx, [0x140000000]
movsxd rax, ebp
movsxd r8, r15d
mov ecx, dword [rdx + rax*4 + 0x1903d4]
add rcx, rdx
jmp rcx
mov rdx, rdi
mov rcx, rbx
call fcn.1404dd160
jmp case.default.0x14018faf5
test r15d, r15d
jle case.default.0x14018faf5
mov rdx, rbx
mov rcx, rdi
sub rdx, r14
sub rdx, rdi
sub rbx, rdi
nop
movzx eax, byte [rcx + rdx]
add al, byte [rcx]
mov byte [rbx + rcx], al
lea rcx, [rcx + 1]
sub r8, 1
jne 0x14018fb20
jmp case.default.0x14018faf5
xor eax, eax
mov edx, eax
test r15d, r15d
jle 0x14018fc81
cmp r15d, 8
jb 0x14018fc81
lea eax, [r15 - 1]
movsxd rcx, eax
lea rax, [rcx + rdi]
lea r9, [rcx + rbx]
cmp rbx, rax
ja 0x14018fb6c
cmp r9, rdi
jae 0x14018fc81
lea rax, [rcx + rsi]
cmp rbx, rax
ja 0x14018fb7e
cmp r9, rsi
jae 0x14018fc81
cmp r15d, 0x40
jb 0x14018fc2d
mov ecx, r15d
and ecx, 0x8000003f
jge 0x14018fb9a
dec ecx
or ecx, 0xffffffc0
inc ecx
mov eax, r15d
sub eax, ecx
mov rcx, rsi
movsxd r10, eax
sub rcx, rdi
lea rax, [rdi + 0x10]
mov r9, rbx
sub r9, rdi
nop dword [rax]
nop word [rax + rax]
movdqu xmm0, xmmword [rax - 0x10]
add rdx, 0x40
movdqu xmm1, xmmword [rax + rcx - 0x10]
movdqu xmm2, xmmword [rax + rcx]
lea rax, [rax + 0x40]
paddb xmm1, xmm0
movdqu xmm0, xmmword [rax - 0x40]
movdqu xmmword [r9 + rax - 0x50], xmm1
paddb xmm2, xmm0
movdqu xmm0, xmmword [rax - 0x30]
movdqu xmm1, xmmword [rax + rcx - 0x30]
movdqu xmmword [r9 + rax - 0x40], xmm2
paddb xmm1, xmm0
movdqu xmm0, xmmword [rax - 0x20]
movdqu xmm2, xmmword [rax + rcx - 0x20]
movdqu xmmword [r9 + rax - 0x30], xmm1
paddb xmm2, xmm0
movdqu xmmword [r9 + rax - 0x20], xmm2
cmp rdx, r10
jl 0x14018fbc0
mov eax, r15d
and al, 0x3f
cmp al, 8
jb 0x14018fc81
mov ecx, r15d
and ecx, 0x80000007
jge 0x14018fc3f
dec ecx
or ecx, 0xfffffff8
inc ecx
mov eax, r15d
sub eax, ecx
mov rcx, rsi
movsxd r10, eax
sub rcx, rdi
lea rax, [rdx + rdi]
mov r9, rbx
sub r9, rdi
nop word [rax + rax]
movq xmm1, qword [rax + rcx]
add rdx, 8
movq xmm0, qword [rax]
lea rax, [rax + 8]
paddb xmm1, xmm0
movq qword [r9 + rax - 8], xmm1
cmp rdx, r10
jl 0x14018fc60
cmp rdx, r8
jge case.default.0x14018faf5
sub rsi, rdi
lea rcx, [rdx + rdi]
sub rbx, rdi
sub r8, rdx
nop word [rax + rax]
movzx eax, byte [rcx + rsi]
add al, byte [rcx]
mov byte [rbx + rcx], al
lea rcx, [rcx + 1]
sub r8, 1
jne 0x14018fca0
jmp case.default.0x14018faf5
test r15d, r15d
jle case.default.0x14018faf5
mov rdx, rbx
mov r9, rdi
sub rdx, r14
sub r9, rsi
sub rdx, rsi
sub rbx, rsi
nop dword [rax]
nop word [rax + rax]
movzx ecx, byte [rsi + rdx]
movzx eax, byte [rsi]
lea rsi, [rsi + 1]
add ecx, eax
shr ecx, 1
add cl, byte [r9 + rsi - 1]
mov byte [rbx + rsi - 1], cl
sub r8, 1
jne 0x14018fce0
jmp case.default.0x14018faf5
test r15d, r15d
jle case.default.0x14018faf5
mov r10, rbx
mov r12, rsi
sub r10, r14
sub r12, rbx
mov rax, r14
sub rax, rbx
lea r13, [rax + rsi]
lea r15, [rax + rdi]
nop word [rax + rax]
movzx r9d, byte [r10]
movzx esi, byte [r10 + r12]
mov ecx, r9d
movzx ebp, byte [r10 + r13]
sub ecx, esi
mov ebx, ecx
lea edx, [rcx + rbp]
mov eax, edx
sub eax, r9d
mov r11d, eax
neg r11d
cmovs r11d, eax
neg ebx
cmovs ebx, ecx
sub edx, esi
mov eax, edx
neg eax
cmovs eax, edx
cmp r11d, ebx
jg 0x14018fd6f
cmp r11d, eax
jle 0x14018fd78
cmp ebx, eax
mov r9d, esi
cmovle r9d, ebp
add r9b, byte [r15 + r10]
mov byte [r14 + r10], r9b
inc r10
sub r8, 1
jne 0x14018fd30
mov r13, qword [rsp + 0x68]
mov r15d, dword [rsp + 0x38]
jmp case.default.0x14018faf5
test r15d, r15d
jle case.default.0x14018faf5
mov rdx, rbx
mov rcx, rdi
sub rdx, r14
sub rdx, rdi
sub rbx, rdi
nop dword [rax]
movzx eax, byte [rcx + rdx]
lea rcx, [rcx + 1]
shr al, 1
add al, byte [rcx - 1]
mov byte [rbx + rcx - 1], al
sub r8, 1
jne 0x14018fdb0
jmp case.default.0x14018faf5
test r15d, r15d
jle case.default.0x14018faf5
mov rdx, rbx
mov rcx, rdi
sub rdx, r14
sub rdx, rdi
sub rbx, rdi
nop dword [rax]
movzx eax, byte [rcx + rdx]
add al, byte [rcx]
mov byte [rbx + rcx], al
lea rcx, [rcx + 1]
sub r8, 1
jne 0x14018fde0
mov r9, qword [rsp + 0xd0]
movsxd rax, r15d
add rdi, rax
mov ecx, dword [rsp + 0x100]
mov r8d, dword [rsp + 0x44]
mov r10d, dword [rsp + 0xf0]
inc r8d
mov edx, dword [rsp + 0x4c]
mov r11d, dword [rsp + 0x20]
mov dword [rsp + 0x44], r8d
cmp r8d, dword [rsp + 0xf8]
jae 0x14018fe72
mov r12d, dword [rsp + 0x48]
xor r15d, r15d
mov r9, qword [rsp + 0x28]
jmp 0x14018f340
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.invalid_width
jmp 0x140190376
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.invalid_filter
jmp 0x140190376
mov r14d, dword [rsp + 0xe8]
mov r13d, dword [rsp + 0xf8]
cmp ecx, 8
jge 0x140190300
test r13d, r13d
je 0x140190343
mov r12d, dword [rsp + 0x108]
imul r14d, r10d
xor r13d, r13d
movsxd rbp, r10d
mov r15d, edx
nop dword [rax]
mov rsi, qword [r9 + 0x18]
mov eax, r13d
imul eax, dword [rsp + 0x30]
mov r9, r14
sub r9, r15
add r9, rsi
mov edi, eax
add r9, rdi
lea r8, [rsi + rax]
test r12d, r12d
jne 0x14018fee8
movsxd rax, ecx
lea rdx, [0x140000000]
movzx r10d, byte [rax + rdx + 0x5e8018]
jmp 0x14018feeb
mov r10b, 1
cmp ecx, 4
jne 0x14018ff6b
mov ebx, dword [rsp + 0x24]
cmp ebx, 2
jl 0x14018ff45
mov r11d, ebx
shr r11, 1
mov eax, r11d
neg eax
lea ebx, [rbx + rax*2]
nop word [rax + rax]
movzx eax, byte [r9]
shr al, 4
movzx edx, al
movzx ecx, r10b
imul edx, ecx
movzx ecx, r10b
mov byte [r8], dl
movzx eax, byte [r9]
inc r9
and al, 0xf
movzx edx, al
imul edx, ecx
mov byte [r8 + 1], dl
add r8, 2
sub r11, 1
jne 0x14018ff10
mov r11d, dword [rsp + 0x20]
test ebx, ebx
jle 0x140190225
movzx eax, byte [r9]
shr al, 4
movzx edx, al
movzx ecx, r10b
imul edx, ecx
mov byte [r8], dl
jmp 0x140190225
cmp ecx, 2
jne 0x14019004c
mov ebx, dword [rsp + 0x24]
cmp ebx, 4
jl 0x14018fff5
mov r11d, ebx
shr r11, 2
mov eax, r11d
neg eax
lea ebx, [rbx + rax*4]
nop dword [rax]
movzx eax, byte [r9]
shr al, 6
movzx edx, al
movzx ecx, r10b
imul edx, ecx
movzx eax, r10b
mov byte [r8], dl
movzx ecx, byte [r9]
shr cl, 4
and cl, 3
movzx ecx, cl
imul ecx, eax
movzx eax, r10b
mov byte [r8 + 1], cl
movzx ecx, byte [r9]
shr cl, 2
and cl, 3
movzx ecx, cl
imul ecx, eax
mov byte [r8 + 2], cl
movzx eax, byte [r9]
inc r9
and al, 3
movzx ecx, r10b
movzx edx, al
imul edx, ecx
mov byte [r8 + 3], dl
add r8, 4
sub r11, 1
jne 0x14018ff90
test ebx, ebx
jle 0x140190010
movzx eax, byte [r9]
shr al, 6
movzx edx, al
movzx ecx, r10b
imul edx, ecx
mov byte [r8], dl
inc r8
cmp ebx, 1
jle 0x14019002f
movzx ecx, byte [r9]
shr cl, 4
and cl, 3
movzx eax, r10b
movzx ecx, cl
imul ecx, eax
mov byte [r8], cl
inc r8
mov r11d, dword [rsp + 0x20]
cmp ebx, 2
jle 0x140190225
movzx ecx, byte [r9]
shr cl, 2
and cl, 3
jmp 0x140190218
cmp ecx, 1
jne 0x140190225
mov r11d, dword [rsp + 0x24]
cmp r11d, 8
jl 0x140190148
mov ebx, r11d
shr rbx, 3
mov eax, ebx
neg eax
lea r11d, [r11 + rax*8]
nop dword [rax]
nop word [rax + rax]
movzx eax, byte [r9]
shr al, 7
movzx edx, al
movzx ecx, r10b
imul edx, ecx
movzx eax, r10b
mov byte [r8], dl
movzx ecx, byte [r9]
shr cl, 6
and cl, 1
movzx ecx, cl
imul ecx, eax
movzx eax, r10b
mov byte [r8 + 1], cl
movzx ecx, byte [r9]
shr cl, 5
and cl, 1
movzx ecx, cl
imul ecx, eax
movzx eax, r10b
mov byte [r8 + 2], cl
movzx ecx, byte [r9]
shr cl, 4
and cl, 1
movzx ecx, cl
imul ecx, eax
movzx eax, r10b
mov byte [r8 + 3], cl
movzx ecx, byte [r9]
shr cl, 3
and cl, 1
movzx ecx, cl
imul ecx, eax
movzx eax, r10b
mov byte [r8 + 4], cl
movzx ecx, byte [r9]
shr cl, 2
and cl, 1
movzx ecx, cl
imul ecx, eax
movzx eax, r10b
mov byte [r8 + 5], cl
movzx ecx, byte [r9]
shr cl, 1
and cl, 1
movzx ecx, cl
imul ecx, eax
mov byte [r8 + 6], cl
movzx eax, byte [r9]
inc r9
and al, 1
movzx ecx, r10b
movzx edx, al
imul edx, ecx
mov byte [r8 + 7], dl
add r8, 8
sub rbx, 1
jne 0x140190080
test r11d, r11d
jle 0x140190164
movzx eax, byte [r9]
shr al, 7
movzx edx, al
movzx ecx, r10b
imul edx, ecx
mov byte [r8], dl
inc r8
cmp r11d, 1
jle 0x140190184
movzx ecx, byte [r9]
shr cl, 6
and cl, 1
movzx eax, r10b
movzx ecx, cl
imul ecx, eax
mov byte [r8], cl
inc r8
cmp r11d, 2
jle 0x1401901a4
movzx ecx, byte [r9]
shr cl, 5
and cl, 1
movzx eax, r10b
movzx ecx, cl
imul ecx, eax
mov byte [r8], cl
inc r8
cmp r11d, 3
jle 0x1401901c4
movzx ecx, byte [r9]
shr cl, 4
and cl, 1
movzx eax, r10b
movzx ecx, cl
imul ecx, eax
mov byte [r8], cl
inc r8
cmp r11d, 4
jle 0x1401901e4
movzx ecx, byte [r9]
shr cl, 3
and cl, 1
movzx eax, r10b
movzx ecx, cl
imul ecx, eax
mov byte [r8], cl
inc r8
cmp r11d, 5
jle 0x140190204
movzx ecx, byte [r9]
shr cl, 2
and cl, 1
movzx eax, r10b
movzx ecx, cl
imul ecx, eax
mov byte [r8], cl
inc r8
cmp r11d, 6
mov r11d, dword [rsp + 0x20]
jle 0x140190225
movzx ecx, byte [r9]
shr cl, 1
and cl, 1
movzx eax, r10b
movzx ecx, cl
imul ecx, eax
mov byte [r8], cl
cmp r11d, dword [rsp + 0xe8]
je 0x1401902d6
lea rbx, [rsi + rdi]
cmp r11d, 1
jne 0x140190264
lea rcx, [rbp - 1]
test rcx, rcx
js 0x1401902d6
nop word [rax + rax]
mov byte [rbx + rcx*2 + 1], 0xff
movzx eax, byte [rcx + rbx]
mov byte [rbx + rcx*2], al
sub rcx, 1
jns 0x140190250
jmp 0x1401902d6
cmp r11d, 3
je 0x140190288
mov r8d, 0x12e4
lea rdx, str.C:_vcpkginstalledx64_windows_staticinclude_stb_image.h
lea rcx, str.img_n__3
call fcn.1404b9c98
mov r11d, dword [rsp + 0x20]
lea r8, [rbp - 1]
test r8, r8
js 0x1401902d6
lea rdx, [r8*2 + 1]
add rdx, rbx
lea rcx, [r8*4 + 2]
add rdx, r8
add rcx, rbx
nop word [rax + rax]
sub r8, 1
mov byte [rcx + 1], 0xff
movzx eax, byte [rdx + 1]
lea rdx, [rdx - 3]
mov byte [rcx], al
lea rcx, [rcx - 4]
movzx eax, byte [rdx + 3]
mov byte [rcx + 3], al
movzx eax, byte [rdx + 2]
mov byte [rcx + 2], al
jns 0x1401902b0
mov ecx, dword [rsp + 0x100]
inc r13d
mov r9, qword [rsp + 0xd0]
cmp r13d, dword [rsp + 0xf8]
jb 0x14018feb0
mov eax, 1
jmp 0x140190381
cmp ecx, 0x10
jne 0x140190343
mov r9, qword [r9 + 0x18]
imul r14d, r10d
mov r8, r9
imul r14d, r13d
test r14d, r14d
je 0x140190343
mov r10d, r14d
nop dword [rax]
movzx edx, byte [r9]
lea r9, [r9 + 2]
movzx ecx, byte [r8 + 1]
lea r8, [r8 + 2]
shl dx, 8
or dx, cx
mov word [r8 - 2], dx
sub r10, 1
jne 0x140190320
mov eax, 1
jmp 0x140190381
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.too_large
jmp 0x140190376
mov qword [r8 + 0x18], r15
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.outofmem
mov edx, 0x28
mov qword [rdx + rcx], rax
xor eax, eax
mov rbx, qword [rsp + 0xd8]
add rsp, 0x90
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret