Function at 0x1401908c0
Capabilities:
Encrypt data using rc4 ksa
Resolve function by parsing pe exports

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, 0xa0
mov ebp, dword [rsp + 0x100]
xor r15d, r15d
mov r13d, dword [rsp + 0x110]
mov r14d, r9d
mov rax, qword [rcx]
cmp r13d, 0x10
mov r10d, r15d
mov qword [rsp + 0x60], r15
sete r10b
mov dword [rsp + 0x38], ebp
inc r10d
mov esi, r8d
mov eax, dword [rax + 8]
mov ebx, r10d
mov r8d, dword [rsp + 0x108]
mov r12d, eax
imul ebx, r14d
mov rdi, rdx
imul r12d, r10d
mov r9, rcx
mov dword [rsp + 0x20], eax
mov r11d, ebx
imul r11d, ebp
mov dword [rsp + 0x40], r12d
mov dword [rsp + 0x28], r11d
cmp r14d, eax
je 0x140190981
inc eax
cmp r14d, eax
je 0x140190981
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.1404703d8
mov r8d, dword [rsp + 0x108]
mov r9, qword [rsp + 0xe0]
mov r11d, dword [rsp + 0x28]
test ebp, ebp
js 0x140191aff
test r8d, r8d
js 0x140191aff
je 0x1401909a6
xor edx, edx
mov eax, 0x7fffffff
div r8d
cmp ebp, eax
jg 0x140191aff
mov ecx, ebp
imul ecx, r8d
test ecx, ecx
js 0x140191aff
test ebx, ebx
js 0x140191aff
je 0x1401909ce
mov eax, 0x7fffffff
cdq
idiv ebx
cmp ecx, eax
jg 0x140191aff
mov eax, r8d
imul eax, r11d
movsxd rcx, eax
call fcn.140470900
mov rbp, qword [rsp + 0xe0]
mov qword [rbp + 0x18], rax
test rax, rax
je 0x140191b03
movsxd r10, dword [rsp + 0x20]
test r10d, r10d
js 0x140191aea
mov r15d, dword [rsp + 0x100]
test r15d, r15d
je 0x140190a20
xor edx, edx
mov eax, 0x7fffffff
div r15d
cmp r10d, eax
jg 0x140191aea
mov edx, r10d
imul edx, r15d
mov dword [rsp + 0x24], edx
test edx, edx
js 0x140191aea
test r13d, r13d
js 0x140191aea
je 0x140190a54
xor edx, edx
mov eax, 0x7fffffff
div r13d
mov edx, dword [rsp + 0x24]
cmp edx, eax
jg 0x140191aea
mov eax, edx
imul eax, r13d
cmp eax, 0x7ffffff8
jg 0x140191aea
mov ecx, dword [rsp + 0x108]
mov r8d, edx
imul r8d, r13d
add r8d, 7
shr r8d, 3
mov dword [rsp + 0x44], r8d
lea eax, [r8 + 1]
imul eax, ecx
cmp esi, eax
jae 0x140190aa3
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.not_enough_pixels
jmp 0x140191b16
xor r11d, r11d
mov dword [rsp + 0x3c], r11d
mov r9d, r11d
test ecx, ecx
je 0x140191627
movsxd r14, r12d
movsxd r13, ebx
mov dword [rsp + 0x24], edx
mov edx, dword [rsp + 0x110]
mov qword [rsp + 0x50], r14
mov qword [rsp + 0x90], r13
mov qword [rsp + 0x68], r10
nop dword [rax]
mov rbx, qword [rbp + 0x18]
mov ecx, r9d
movzx ebp, byte [rdi]
inc rdi
mov esi, dword [rsp + 0x28]
imul ecx, esi
add rbx, rcx
mov qword [rsp + 0x88], rcx
cmp ebp, 4
ja 0x1401915f9
cmp edx, 8
jge 0x140190b3f
cmp r8d, r15d
ja 0x1401915e1
mov eax, dword [rsp + 0xf8]
mov r12d, 1
imul eax, r15d
mov r14d, r12d
mov dword [rsp + 0x40], r12d
mov qword [rsp + 0x50], r12
mov dword [rsp + 0x38], r8d
sub eax, r8d
add rbx, rax
mov rax, rsi
lea r15, [0x140000000]
mov rsi, rbx
sub rsi, rax
test r9d, r9d
jne 0x140190b5d
movzx ebp, byte [rbp + r15 + 0x57c2cc]
test r14, r14
jle 0x140190c76
mov r10, rsi
mov r9, rbx
sub r10, rdi
mov rdx, rdi
sub r9, rdi
mov r8, r14
cmp ebp, 6
ja case.default.0x140190b8b
movsxd rax, ebp
mov eax, dword [r15 + rax*4 + 0x191b3c]
add rax, r15
jmp rax
inc rdx
sub r8, 1
jne 0x140190b78
jmp 0x140190c71
movzx eax, byte [rdx]
mov byte [r9 + rdx], al
lea rdx, [rdx + 1]
sub r8, 1
je 0x140190c71
jmp case.0x140190b8b.0
movzx eax, byte [rdx]
mov byte [r9 + rdx], al
lea rdx, [rdx + 1]
sub r8, 1
je 0x140190c71
jmp case.0x140190b8b.1
movzx eax, byte [r10 + rdx]
add al, byte [rdx]
mov byte [r9 + rdx], al
lea rdx, [rdx + 1]
sub r8, 1
je 0x140190c71
jmp case.0x140190b8b.2
movzx eax, byte [r10 + rdx]
lea rdx, [rdx + 1]
shr al, 1
add al, byte [rdx - 1]
mov byte [r9 + rdx - 1], al
sub r8, 1
je 0x140190c71
jmp case.0x140190b8b.3
movzx eax, byte [r10 + rdx]
lea rdx, [rdx + 1]
test al, al
mov ecx, r11d
cmovne ecx, eax
add cl, byte [rdx - 1]
mov byte [r9 + rdx - 1], cl
sub r8, 1
je 0x140190c71
jmp case.0x140190b8b.4
movzx eax, byte [rdx]
mov byte [r9 + rdx], al
lea rdx, [rdx + 1]
sub r8, 1
je 0x140190c71
jmp case.0x140190b8b.5
movzx eax, byte [rdx]
mov byte [r9 + rdx], al
lea rdx, [rdx + 1]
sub r8, 1
jne case.0x140190b8b.6
mov r10d, dword [rsp + 0x20]
mov eax, dword [rsp + 0x110]
cmp eax, 8
jne 0x140190cbb
movsxd rax, dword [rsp + 0xf8]
cmp r10d, eax
je 0x140190c98
movsxd rcx, r10d
mov byte [rcx + rbx], 0xff
jmp 0x140190c9d
mov rcx, qword [rsp + 0x68]
add rdi, rcx
add rsi, rax
add rbx, rax
mov qword [rsp + 0x48], rsi
mov qword [rsp + 0x30], rbx
mov r10, rdi
mov r15, rdi
mov r8, rsi
jmp 0x140190d17
cmp eax, 0x10
jne 0x140190cf2
cmp r10d, dword [rsp + 0xf8]
je 0x140190cd1
mov word [r14 + rbx], 0xffff
add rsi, r13
movsxd rax, r12d
add rdi, rax
mov qword [rsp + 0x48], rsi
add rbx, r13
mov r10, rdi
mov qword [rsp + 0x30], rbx
mov r15, rdi
mov r8, rsi
jmp 0x140190d17
inc rdi
inc rsi
mov r10, rdi
inc rbx
mov qword [rsp + 0x48], rsi
mov qword [rsp + 0x30], rbx
mov r15, rdi
mov r8, rsi
cmp eax, 8
jl 0x140191264
mov eax, dword [rsp + 0x20]
cmp eax, dword [rsp + 0xf8]
je 0x140191264
inc eax
cmp eax, dword [rsp + 0xf8]
je 0x140190d4c
mov r8d, 0x128b
lea rdx, str.C:_vcpkginstalledx64_windows_staticinclude_stb_image.h
lea rcx, str.img_n1__out_n
call fcn.1404703d8
cmp ebp, 6
ja case.default.0x140190d6c
lea rdx, [0x140000000]
movsxd rax, ebp
mov rdi, r15
mov ecx, dword [rdx + rax*4 + 0x191b58]
add rcx, rdx
jmp rcx
mov eax, dword [rsp + 0x100]
dec eax
cmp eax, 1
jb case.default.0x140190d6c
movsxd r10, r12d
mov r9d, eax
test r14, r14
jle 0x140190db1
mov r8, rdi
mov rcx, rbx
sub r8, rbx
mov rdx, r14
nop word [rax + rax]
movzx eax, byte [r8 + rcx]
mov byte [rcx], al
lea rcx, [rcx + 1]
sub rdx, 1
jne 0x140190da0
mov byte [r14 + rbx], 0xff
add rdi, r10
add rbx, r13
sub r9, 1
jne 0x140190d86
jmp case.default.0x140190d6c
mov eax, dword [rsp + 0x100]
dec eax
cmp eax, 1
jb case.default.0x140190d6c
movsxd r11, r12d
mov r10d, eax
nop
test r14, r14
jle 0x140190e15
mov r8, rbx
mov r9, rbx
sub r8, r13
mov rcx, rdi
sub r8, rdi
mov rdx, r14
sub r9, rdi
nop word [rax + rax]
movzx eax, byte [r8 + rcx]
add al, byte [rcx]
mov byte [rcx + r9], al
lea rcx, [rcx + 1]
sub rdx, 1
jne 0x140190e00
mov byte [r14 + rbx], 0xff
add rdi, r11
add rbx, r13
sub r10, 1
jne 0x140190de0
jmp case.default.0x140190d6c
mov eax, dword [rsp + 0x100]
dec eax
cmp eax, 1
jb case.default.0x140190d6c
movsxd rbp, r12d
xor r15d, r15d
mov r11d, eax
nop word [rax + rax]
mov rdx, r15
test r12d, r12d
jle 0x140190f91
cmp r12d, 8
jb 0x140190f91
lea eax, [r12 - 1]
movsxd rcx, eax
lea rax, [rcx + rdi]
lea r8, [rcx + rbx]
cmp rbx, rax
ja 0x140190e84
cmp r8, rdi
jae 0x140190f91
lea rax, [rcx + rsi]
cmp rbx, rax
ja 0x140190e96
cmp r8, rsi
jae 0x140190f91
cmp r12d, 0x40
jb 0x140190f3f
mov ecx, r12d
and ecx, 0x8000003f
jge 0x140190eb2
dec ecx
or ecx, 0xffffffc0
inc ecx
mov eax, r12d
sub eax, ecx
mov r8, rsi
movsxd r9, eax
sub r8, rdi
lea rax, [rdi + 0x10]
mov rcx, rbx
sub rcx, rdi
nop word [rax + rax]
movdqu xmm0, xmmword [rax - 0x10]
add rdx, 0x40
movdqu xmm1, xmmword [r8 + rax - 0x10]
movdqu xmm2, xmmword [rax + r8]
lea rax, [rax + 0x40]
paddb xmm1, xmm0
movdqu xmm0, xmmword [rax - 0x40]
movdqu xmmword [rcx + rax - 0x50], xmm1
paddb xmm2, xmm0
movdqu xmm0, xmmword [rax - 0x30]
movdqu xmm1, xmmword [r8 + rax - 0x30]
movdqu xmmword [rax + rcx - 0x40], xmm2
paddb xmm1, xmm0
movdqu xmm0, xmmword [rax - 0x20]
movdqu xmm2, xmmword [r8 + rax - 0x20]
movdqu xmmword [rcx + rax - 0x30], xmm1
paddb xmm2, xmm0
movdqu xmmword [rcx + rax - 0x20], xmm2
cmp rdx, r9
jl 0x140190ed0
mov eax, r12d
and al, 0x3f
cmp al, 8
jb 0x140190f91
jmp 0x140190f45
mov r8, rsi
sub r8, rdi
mov ecx, r12d
and ecx, 0x80000007
jge 0x140190f57
dec ecx
or ecx, 0xfffffff8
inc ecx
mov eax, r12d
sub eax, ecx
mov rcx, rbx
movsxd r9, eax
sub rcx, rdi
lea rax, [rdx + rdi]
nop dword [rax]
movq xmm1, qword [rax + r8]
add rdx, 8
movq xmm0, qword [rax]
lea rax, [rax + 8]
paddb xmm1, xmm0
movq qword [rax + rcx - 8], xmm1
cmp rdx, r9
jl 0x140190f70
cmp rdx, r14
jge 0x140190fc5
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 [rcx + r10], al
lea rcx, [rcx + 1]
sub r8, 1
jne 0x140190fb0
mov byte [r14 + rbx], 0xff
add rdi, rbp
add rbx, r13
add rsi, r13
sub r11, 1
jne 0x140190e50
jmp case.default.0x140190d6c
mov eax, dword [rsp + 0x100]
dec eax
cmp eax, 1
jb case.default.0x140190d6c
movsxd r15, r12d
mov ebp, eax
nop dword [rax]
test r14, r14
jle 0x140191040
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 [r8 + rdx]
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 0x140191020
mov byte [r14 + rbx], 0xff
add rdi, r15
add rbx, r13
add rsi, r13
sub rbp, 1
jne 0x140191000
jmp case.default.0x140190d6c
mov eax, dword [rsp + 0x100]
dec eax
cmp eax, 1
jb case.default.0x140190d6c
movsxd rcx, r12d
mov qword [rsp + 0x80], rcx
mov qword [rsp + 0x58], rax
nop dword [rax + rax]
test r14, r14
jle 0x14019112d
mov rax, rsi
mov r10, rbx
sub rax, rbx
sub r10, r13
mov qword [rsp + 0x78], rax
mov r15, r14
mov rax, r13
sub rax, rbx
lea rbx, [rax + rsi]
mov rsi, qword [rsp + 0x78]
add rax, rdi
mov r14, rax
movzx r9d, byte [r10]
movzx ebp, byte [rsi + r10]
mov ecx, r9d
movzx r12d, byte [rbx + r10]
sub ecx, ebp
lea r8d, [r12 + rcx]
mov eax, r8d
sub r8d, ebp
sub eax, r9d
cdq
mov r11d, eax
mov eax, ecx
xor r11d, edx
sub r11d, edx
cdq
mov ecx, eax
mov eax, r8d
xor ecx, edx
sub ecx, edx
cdq
xor eax, edx
sub eax, edx
cmp r11d, ecx
jg 0x1401910f7
cmp r11d, eax
jle 0x140191100
cmp ecx, eax
mov r9d, ebp
cmovle r9d, r12d
add r9b, byte [r14 + r10]
mov byte [r10 + r13], r9b
inc r10
sub r15, 1
jne 0x1401910b2
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x48]
mov r14, qword [rsp + 0x50]
mov rax, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x80]
add rsi, r13
mov byte [r14 + rbx], 0xff
add rbx, r13
mov qword [rsp + 0x48], rsi
add rdi, rcx
mov qword [rsp + 0x30], rbx
sub rax, 1
mov qword [rsp + 0x58], rax
jne 0x140191080
jmp case.default.0x140190d6c
mov eax, dword [rsp + 0x100]
dec eax
cmp eax, 1
jb case.default.0x140190d6c
movsxd r11, r12d
mov r10d, eax
test r14, r14
jle 0x1401911a9
mov r8, rbx
mov r9, rbx
sub r8, r13
mov rcx, rdi
sub r8, rdi
mov rdx, r14
sub r9, rdi
nop dword [rax + rax]
movzx eax, byte [r8 + rcx]
lea rcx, [rcx + 1]
shr al, 1
add al, byte [rcx - 1]
mov byte [r9 + rcx - 1], al
sub rdx, 1
jne 0x140191190
mov byte [r14 + rbx], 0xff
add rdi, r11
add rbx, r13
sub r10, 1
jne 0x140191171
jmp case.default.0x140190d6c
mov eax, dword [rsp + 0x100]
dec eax
cmp eax, 1
jb case.default.0x140190d6c
movsxd r11, r12d
mov r10d, eax
test r14, r14
jle 0x140191205
mov r8, rbx
mov r9, rbx
sub r8, r13
mov rcx, rdi
sub r8, rdi
mov rdx, r14
sub r9, rdi
nop word [rax + rax]
movzx eax, byte [r8 + rcx]
add al, byte [rcx]
mov byte [r9 + rcx], al
lea rcx, [rcx + 1]
sub rdx, 1
jne 0x1401911f0
mov byte [r14 + rbx], 0xff
add rdi, r11
add rbx, r13
sub r10, 1
jne 0x1401911d0
mov edx, dword [rsp + 0x110]
mov rbp, qword [rsp + 0xe0]
cmp edx, 0x10
jne 0x1401915a8
mov rcx, qword [rsp + 0x88]
add rcx, qword [rbp + 0x18]
mov r15d, dword [rsp + 0x100]
test r15d, r15d
je 0x1401915b0
mov eax, r15d
nop
mov byte [r14 + rcx + 1], 0xff
add rcx, r13
sub rax, 1
jne 0x140191250
jmp 0x1401915b0
mov r15d, dword [rsp + 0x38]
dec r15d
imul r15d, r12d
mov dword [rsp + 0x30], r15d
cmp ebp, 6
ja case.default.0x140191295
lea rdx, [0x140000000]
movsxd rax, ebp
movsxd r9, r15d
mov ecx, dword [rdx + rax*4 + 0x191b74]
add rcx, rdx
jmp rcx
mov r8, r9
mov rdx, rdi
mov rcx, rbx
call fcn.14045d390
jmp case.default.0x140191295
test r15d, r15d
jle case.default.0x140191295
mov rdx, rbx
mov rcx, rdi
sub rdx, r14
sub rdx, rdi
sub rbx, rdi
movzx eax, byte [rdx + rcx]
add al, byte [rcx]
mov byte [rbx + rcx], al
lea rcx, [rcx + 1]
sub r9, 1
jne 0x1401912c2
jmp case.default.0x140191295
mov rdx, r11
test r15d, r15d
jle 0x140191421
cmp r15d, 8
jb 0x140191421
lea eax, [r15 - 1]
movsxd rcx, eax
lea rax, [rcx + rdi]
lea r11, [rcx + rbx]
cmp rbx, rax
ja 0x14019130d
cmp r11, rdi
jae 0x140191421
lea rax, [rcx + rsi]
cmp rbx, rax
ja 0x14019131f
cmp r11, rsi
jae 0x140191421
cmp r15d, 0x40
jb 0x1401913cf
mov ecx, r15d
and ecx, 0x8000003f
jge 0x14019133b
dec ecx
or ecx, 0xffffffc0
inc ecx
mov eax, r15d
sub eax, ecx
mov r8, rsi
movsxd r10, eax
sub r8, rdi
lea rax, [rdi + 0x10]
mov rcx, rbx
sub rcx, rdi
nop dword [rax]
nop word [rax + rax]
movdqu xmm0, xmmword [rax - 0x10]
add rdx, 0x40
movdqu xmm1, xmmword [r8 + rax - 0x10]
movdqu xmm2, xmmword [rax + r8]
lea rax, [rax + 0x40]
paddb xmm1, xmm0
movdqu xmm0, xmmword [rax - 0x40]
movdqu xmmword [rcx + rax - 0x50], xmm1
paddb xmm2, xmm0
movdqu xmm0, xmmword [rax - 0x30]
movdqu xmm1, xmmword [r8 + rax - 0x30]
movdqu xmmword [rax + rcx - 0x40], xmm2
paddb xmm1, xmm0
movdqu xmm0, xmmword [rax - 0x20]
movdqu xmm2, xmmword [r8 + rax - 0x20]
movdqu xmmword [rcx + rax - 0x30], xmm1
paddb xmm2, xmm0
movdqu xmmword [rcx + rax - 0x20], xmm2
cmp rdx, r10
jl 0x140191360
mov eax, r15d
and al, 0x3f
cmp al, 8
jb 0x140191421
jmp 0x1401913d2
sub r8, r10
mov ecx, r15d
and ecx, 0x80000007
jge 0x1401913e4
dec ecx
or ecx, 0xfffffff8
inc ecx
mov eax, r15d
sub eax, ecx
mov rcx, rbx
movsxd r10, eax
sub rcx, rdi
lea rax, [rdx + rdi]
nop word [rax + rax]
movq xmm1, qword [rax + r8]
add rdx, 8
movq xmm0, qword [rax]
lea rax, [rax + 8]
paddb xmm1, xmm0
movq qword [rax + rcx - 8], xmm1
cmp rdx, r10
jl 0x140191400
cmp rdx, r9
jge case.default.0x140191295
sub rsi, rdi
lea rcx, [rdx + rdi]
sub rbx, rdi
sub r9, rdx
nop word [rax + rax]
movzx eax, byte [rsi + rcx]
add al, byte [rcx]
mov byte [rbx + rcx], al
lea rcx, [rcx + 1]
sub r9, 1
jne 0x140191440
jmp case.default.0x140191295
test r15d, r15d
jle case.default.0x140191295
mov rdx, rbx
mov r8, rdi
sub rdx, r14
sub r8, rsi
sub rdx, rsi
sub rbx, rsi
nop dword [rax]
nop word [rax + rax]
movzx ecx, byte [rdx + rsi]
movzx eax, byte [rsi]
lea rsi, [rsi + 1]
add ecx, eax
shr ecx, 1
add cl, byte [r8 + rsi - 1]
mov byte [rbx + rsi - 1], cl
sub r9, 1
jne 0x140191480
jmp case.default.0x140191295
test r15d, r15d
jle case.default.0x140191295
mov r11, rbx
mov r12, rsi
sub r11, r14
sub r12, rbx
mov rax, r14
sub rax, rbx
lea r13, [rax + rsi]
lea r15, [rax + rdi]
nop word [rax + rax]
movzx r10d, byte [r11]
movzx esi, byte [r12 + r11]
mov ecx, r10d
movzx ebp, byte [r11 + r13]
sub ecx, esi
lea r8d, [rcx + rbp]
mov eax, r8d
sub r8d, esi
sub eax, r10d
cdq
mov ebx, eax
mov eax, ecx
xor ebx, edx
sub ebx, edx
cdq
mov ecx, eax
mov eax, r8d
xor ecx, edx
sub ecx, edx
cdq
xor eax, edx
sub eax, edx
cmp ebx, ecx
jg 0x140191510
cmp ebx, eax
jle 0x140191519
cmp ecx, eax
mov r10d, esi
cmovle r10d, ebp
add r10b, byte [r15 + r11]
mov byte [r14 + r11], r10b
inc r11
sub r9, 1
jne 0x1401914d0
mov r13, qword [rsp + 0x90]
mov r15d, dword [rsp + 0x30]
jmp case.default.0x140191295
test r15d, r15d
jle case.default.0x140191295
mov rdx, rbx
mov rcx, rdi
sub rdx, r14
sub rdx, rdi
sub rbx, rdi
nop dword [rax]
movzx eax, byte [rdx + rcx]
lea rcx, [rcx + 1]
shr al, 1
add al, byte [rcx - 1]
mov byte [rbx + rcx - 1], al
sub r9, 1
jne 0x140191550
jmp case.default.0x140191295
test r15d, r15d
jle case.default.0x140191295
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 [rcx + rbx], al
lea rcx, [rcx + 1]
sub r9, 1
jne 0x140191580
mov edx, dword [rsp + 0x110]
mov rbp, qword [rsp + 0xe0]
movsxd rax, r15d
add rdi, rax
mov r15d, dword [rsp + 0x100]
mov r9d, dword [rsp + 0x3c]
xor r11d, r11d
mov r12d, dword [rsp + 0x108]
inc r9d
mov r8d, dword [rsp + 0x44]
mov dword [rsp + 0x3c], r9d
cmp r9d, r12d
jae 0x140191611
mov r12d, dword [rsp + 0x40]
mov r10d, dword [rsp + 0x20]
jmp 0x140190ae0
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.invalid_width
jmp 0x140191b16
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.invalid_filter
jmp 0x140191b16
mov r13d, dword [rsp + 0x110]
mov r14d, dword [rsp + 0xf8]
mov edx, dword [rsp + 0x24]
jmp 0x14019162a
mov r12d, ecx
cmp r13d, 8
jge 0x140191a9a
test r12d, r12d
je 0x140191ae3
mov ebp, r14d
movsxd rsi, r15d
imul ebp, r15d
mov r15d, dword [rsp + 0x118]
mov r14d, r8d
nop dword [rax]
nop word [rax + rax]
mov rax, qword [rsp + 0xe0]
mov ecx, r11d
imul ecx, dword [rsp + 0x28]
mov r9, rbp
sub r9, r14
mov rax, qword [rax + 0x18]
add r9, rax
add r9, rcx
lea rbx, [rax + rcx]
mov r8, rbx
test r15d, r15d
jne 0x1401916a1
movsxd rax, r13d
lea rcx, [0x140000000]
movzx r10d, byte [rax + rcx + 0x57c2d8]
jmp 0x1401916a4
mov r10b, 1
cmp r13d, 4
jne 0x140191716
mov edi, edx
cmp edx, 2
jl 0x1401916f5
mov r11d, edi
shr r11, 1
mov eax, r11d
neg eax
lea edi, [rdi + rax*2]
nop
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 0x1401916c0
test edi, edi
jle 0x1401919c0
movzx eax, byte [r9]
shr al, 4
movzx edx, al
movzx ecx, r10b
imul edx, ecx
mov byte [r8], dl
jmp 0x1401919c0
cmp r13d, 2
jne 0x1401917f7
mov edi, edx
cmp edx, 4
jl 0x1401917a5
mov r11d, edi
shr r11, 2
mov eax, r11d
neg eax
lea edi, [rdi + rax*4]
nop word [rax + 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 0x140191740
test edi, edi
jle 0x1401917c0
movzx eax, byte [r9]
shr al, 6
movzx edx, al
movzx ecx, r10b
imul edx, ecx
mov byte [r8], dl
inc r8
cmp edi, 1
jle 0x1401917df
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
cmp edi, 2
jle 0x1401919c0
movzx ecx, byte [r9]
shr cl, 2
and cl, 3
jmp 0x1401919b3
cmp r13d, 1
jne 0x1401919c0
mov r11d, edx
cmp edx, 8
jl 0x1401918e8
mov edi, r11d
shr rdi, 3
mov eax, edi
neg eax
lea r11d, [r11 + rax*8]
nop dword [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 rdi, 1
jne 0x140191820
test r11d, r11d
jle 0x140191904
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 0x140191924
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 0x140191944
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 0x140191964
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 0x140191984
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 0x1401919a4
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
jle 0x1401919c0
movzx ecx, byte [r9]
shr cl, 1
and cl, 1
movzx eax, r10b
movzx ecx, cl
imul ecx, eax
mov byte [r8], cl
mov r10d, dword [rsp + 0x20]
cmp r10d, dword [rsp + 0xf8]
je 0x140191a76
cmp r10d, 1
jne 0x140191a04
lea rcx, [rsi - 1]
test rcx, rcx
js 0x140191a76
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 0x1401919f0
jmp 0x140191a76
cmp r10d, 3
je 0x140191a23
mov r8d, 0x12e4
lea rdx, str.C:_vcpkginstalledx64_windows_staticinclude_stb_image.h
lea rcx, str.img_n__3
call fcn.1404703d8
lea r8, [rsi - 1]
test r8, r8
js 0x140191a76
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 0x140191a50
mov r11, qword [rsp + 0x60]
mov edx, dword [rsp + 0x24]
inc r11d
mov qword [rsp + 0x60], r11
cmp r11d, r12d
jb 0x140191660
mov eax, 1
jmp 0x140191b21
cmp r13d, 0x10
jne 0x140191ae3
mov r9, qword [rbp + 0x18]
imul r14d, r15d
mov r8, r9
imul r14d, r12d
test r14d, r14d
je 0x140191ae3
mov r10d, r14d
nop word [rax + 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 0x140191ac0
mov eax, 1
jmp 0x140191b21
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.too_large
jmp 0x140191b16
mov qword [r9 + 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 + 0xe8]
add rsp, 0xa0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret