Function at 0x1400f00a0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x88
mov rax, qword [rcx + 0xb8]
mov rbx, rcx
cmp rax, qword [rcx + 0xc0]
jae 0x1400f00e5
movzx r8d, byte [rax]
inc rax
mov qword [rcx + 0xb8], rax
jmp 0x1400f010a
cmp dword [rcx + 0x30], 0
je 0x1400f0107
call fcn.1400e5290
mov rax, qword [rbx + 0xb8]
movzx r8d, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400f010a
xor r8b, r8b
mov ecx, 0x30
mov byte [rsp + 0xe8], r8b
mov rdx, rbx
lea rsi, [rcx + rbx]
movzx ecx, r8b
mov dword [rsp + 0x30], ecx
cmp rax, qword [rbx + 0xc0]
jae 0x1400f013e
movzx ebp, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400f0164
cmp dword [rsi], 0
je 0x1400f0161
mov rcx, rbx
call fcn.1400e5290
mov rax, qword [rbx + 0xb8]
movzx ebp, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400f0164
xor bpl, bpl
mov byte [rsp + 0xf0], bpl
cmp rax, qword [rbx + 0xc0]
jae 0x1400f0184
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400f01a9
cmp dword [rsi], 0
je 0x1400f01a7
mov rcx, rbx
call fcn.1400e5290
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400f01a9
xor cl, cl
movzx eax, cl
mov rcx, rbx
mov dword [rsp + 0x38], eax
mov r15d, eax
call fcn.1400e5490
mov rcx, rbx
movsxd r13, eax
call fcn.1400e5490
mov rcx, qword [rbx + 0xb8]
mov dword [rsp + 0x50], eax
cmp rcx, qword [rbx + 0xc0]
jae 0x1400f01e9
movzx edx, byte [rcx]
inc rcx
mov qword [rbx + 0xb8], rcx
jmp 0x1400f020e
cmp dword [rsi], 0
je 0x1400f020c
mov rcx, rbx
call fcn.1400e5290
mov rax, qword [rbx + 0xb8]
movzx edx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400f020e
xor dl, dl
mov rcx, rbx
movzx edi, dl
call fcn.1400e5490
mov rcx, rbx
call fcn.1400e5490
mov rcx, rbx
call fcn.1400e5490
mov rcx, rbx
mov dword [rsp + 0xd0], eax
call fcn.1400e5490
mov dword [rsp + 0x34], eax
mov rax, qword [rbx + 0xb8]
cmp rax, qword [rbx + 0xc0]
jae 0x1400f025b
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400f0280
cmp dword [rsi], 0
je 0x1400f027e
mov rcx, rbx
call fcn.1400e5290
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400f0280
xor cl, cl
movzx edx, cl
mov dword [rsp + 0x54], edx
cmp rax, qword [rbx + 0xc0]
jae 0x1400f029f
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400f02c8
cmp dword [rsi], 0
je 0x1400f02c6
mov rcx, rbx
call fcn.1400e5290
mov rax, qword [rbx + 0xb8]
mov edx, dword [rsp + 0x54]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400f02c8
xor cl, cl
xor r14d, r14d
movzx eax, cl
mov qword [rsp + 0x48], r14
mov dword [rsp + 0xf8], r14d
lea r12d, [r14 + 1]
cmp r15d, 8
jb 0x1400f02e9
sub r15d, 8
shr eax, 5
mov ecx, r12d
and eax, r12d
sub ecx, eax
test bpl, bpl
mov dword [rsp + 0x58], ecx
mov ebp, r14d
je 0x1400f0322
mov ecx, edi
sub ecx, 8
je 0x1400f031d
sub ecx, 7
je 0x1400f036a
sub ecx, r12d
je 0x1400f036a
sub ecx, 8
je 0x1400f033f
cmp ecx, 8
jne 0x1400f0346
jmp 0x1400f033f
mov edi, r12d
jmp 0x1400f0342
mov ecx, edx
sub ecx, 8
je 0x1400f0374
sub ecx, 7
je 0x1400f036a
sub ecx, r12d
je 0x1400f035e
sub ecx, 8
je 0x1400f033d
cmp ecx, 8
jne 0x1400f0346
mov edi, edx
shr edi, 3
test edi, edi
jne 0x1400f0377
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.bad_format
jmp 0x1400f0b0d
cmp r15d, 3
jne 0x1400f036a
lea edi, [r15 - 1]
jmp 0x1400f0377
mov ebp, r12d
mov edi, 3
jmp 0x1400f0377
mov edi, r12d
mov rax, qword [rsp + 0xd8]
mov r8d, dword [rsp + 0xd0]
mov r15d, dword [rsp + 0x34]
mov dword [rax], r8d
mov rax, qword [rsp + 0xe0]
mov dword [rax], r15d
test r8d, r8d
js 0x1400f0afa
test r15d, r15d
js 0x1400f0afa
je 0x1400f03c0
mov eax, 0x7fffffff
cdq
idiv r15d
cmp r8d, eax
jg 0x1400f0afa
mov ecx, r15d
imul ecx, r8d
test ecx, ecx
js 0x1400f0afa
xor edx, edx
mov eax, 0x7fffffff
div edi
cmp ecx, eax
jg 0x1400f0afa
test r15d, r15d
je 0x1400f03f7
mov eax, 0x7fffffff
cdq
idiv r15d
cmp r8d, eax
jg 0x1400f0ae5
mov eax, r15d
imul eax, edi
imul eax, r8d
movsxd rcx, eax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rsp + 0x40], rax
mov rsi, rax
test rax, rax
je 0x1400f0ae5
cmp qword [rbx + 0x10], r14
je 0x1400f044e
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xb8]
mov edx, dword [rsp + 0x30]
cmp ecx, edx
jge 0x1400f044e
mov rax, qword [rbx + 0xc0]
sub edx, ecx
mov rcx, qword [rbx + 0x28]
mov qword [rbx + 0xb8], rax
call qword [rbx + 0x18]
jmp 0x1400f045d
movzx eax, byte [rsp + 0xe8]
add qword [rbx + 0xb8], rax
cmp byte [rsp + 0xf0], r14b
jne 0x1400f0531
mov edx, dword [rsp + 0x38]
mov r13d, edi
mov dword [rsp + 0xe8], ebp
mov dword [rsp + 0x30], edi
cmp edx, 8
jae 0x1400f0765
mov dword [rsp + 0xe8], ebp
mov dword [rsp + 0x30], edi
test ebp, ebp
jne 0x1400f0765
test r15d, r15d
jle 0x1400f0a6a
mov r15d, edi
imul r15d, dword [rsp + 0xd0]
cmp dword [rsp + 0x58], r14d
je 0x1400f0501
mov ecx, dword [rsp + 0x34]
mov eax, r15d
neg eax
mov r14d, ecx
movsxd r12, eax
lea eax, [rcx - 1]
imul eax, edi
imul eax, dword [rsp + 0xd0]
movsxd rsi, eax
add rsi, qword [rsp + 0x40]
nop word [rax + rax]
mov r8d, r15d
mov rdx, rsi
mov rcx, rbx
call fcn.1400e5300
add rsi, r12
sub r14, 1
jne 0x1400f04e0
mov r15d, dword [rsp + 0x34]
jmp 0x1400f0a65
mov r14d, dword [rsp + 0x34]
movsxd r12, r15d
nop dword [rax]
mov r8d, r15d
mov rdx, rsi
mov rcx, rbx
call fcn.1400e5300
add rsi, r12
sub r14, 1
jne 0x1400f0510
mov r15d, dword [rsp + 0x34]
jmp 0x1400f0a65
test r13d, r13d
jns 0x1400f0546
mov rax, qword [rbx + 0xc0]
mov qword [rbx + 0xb8], rax
jmp 0x1400f0581
cmp qword [rbx + 0x10], r14
je 0x1400f057a
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xb8]
cmp ecx, r13d
jge 0x1400f057a
mov rax, qword [rbx + 0xc0]
sub r13d, ecx
mov rcx, qword [rbx + 0x28]
mov edx, r13d
mov qword [rbx + 0xb8], rax
call qword [rbx + 0x18]
jmp 0x1400f0581
add qword [rbx + 0xb8], r13
mov ecx, dword [rsp + 0x50]
test ecx, ecx
js 0x1400f0adc
xor edx, edx
mov eax, 0x7fffffff
div edi
cmp ecx, eax
jg 0x1400f0adc
mov esi, edi
imul esi, ecx
movsxd rcx, esi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rsp + 0x48], rax
test rax, rax
je 0x1400f0ad7
test ebp, ebp
je 0x1400f070a
mov rsi, rax
cmp edi, 3
je 0x1400f05e4
mov r8d, 0x1687
lea rdx, str.E:ReposSimHapticlibsimgui_stb_image.h
lea rcx, str.tga_comp__STBI_rgb
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
mov eax, dword [rsp + 0x50]
mov r13d, edi
mov dword [rsp + 0xe8], ebp
mov dword [rsp + 0x30], edi
test eax, eax
jle 0x1400f075d
mov r13d, edi
mov r15d, eax
mov dword [rsp + 0xe8], ebp
mov dword [rsp + 0x30], edi
nop
mov rcx, rbx
call fcn.1400e5490
movzx r8d, ax
mov eax, r8d
shr eax, 0xa
and eax, 0x1f
imul ecx, eax, 0xff
mov eax, 0x84210843
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, r8d
shr eax, 5
and r8d, 0x1f
and eax, 0x1f
mov byte [rsi], dl
imul ecx, eax, 0xff
mov eax, 0x84210843
imul ecx
add edx, ecx
imul ecx, r8d, 0xff
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, 0x84210843
mov byte [rsi + 1], dl
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov byte [rsi + 2], dl
add rsi, r13
sub r15, r12
jne 0x1400f0610
mov r15d, dword [rsp + 0x34]
mov r13d, edi
mov rdi, qword [rsp + 0x48]
mov edx, dword [rsp + 0x38]
mov ecx, dword [rsp + 0xd0]
mov eax, r15d
imul eax, ecx
mov esi, r13d
test eax, eax
je 0x1400f09d7
mov rcx, qword [rsp + 0x40]
lea r8, [rsp + 0xf8]
sub rcx, r8
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x68], rcx
mov ebp, r14d
mov r15d, r14d
cmp edx, 8
jb 0x1400f07b3
test ebp, ebp
jne 0x1400f07a5
mov rax, qword [rbx + 0xb8]
cmp rax, qword [rbx + 0xc0]
jae 0x1400f076d
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400f0793
mov r13d, edi
mov dword [rsp + 0x30], edi
mov r8d, esi
mov dword [rsp + 0xe8], ebp
mov rdx, rax
mov rcx, rbx
mov rdi, rax
call fcn.1400e5300
test eax, eax
jne 0x1400f069b
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.bad_palette
jmp 0x1400f0b0d
mov rdi, rsi
jmp 0x1400f069b
mov rdi, r14
jmp 0x1400f069f
cmp dword [rbx + 0x30], r14d
je 0x1400f0791
mov rcx, rbx
call fcn.1400e5290
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400f0793
xor cl, cl
movzx r15d, cl
mov ebp, r15d
and ebp, 0x7f
inc ebp
shr r15d, 7
jmp 0x1400f07b3
test r15d, r15d
je 0x1400f07b3
test r12d, r12d
je 0x1400f0971
cmp byte [rsp + 0xf0], r14b
je 0x1400f0852
cmp dword [rsp + 0x54], 8
jne 0x1400f0818
mov rax, qword [rbx + 0xb8]
cmp rax, qword [rbx + 0xc0]
jae 0x1400f07ea
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
movzx eax, cl
jmp 0x1400f0820
cmp dword [rbx + 0x30], r14d
je 0x1400f0811
mov rcx, rbx
call fcn.1400e5290
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
movzx eax, cl
jmp 0x1400f0820
xor cl, cl
movzx eax, cl
jmp 0x1400f0820
mov rcx, rbx
call fcn.1400e5490
test r13d, r13d
je 0x1400f0964
cmp eax, dword [rsp + 0x50]
mov ecx, r14d
mov r8, rsi
cmovl ecx, eax
imul ecx, r13d
movsxd rdx, ecx
lea rcx, [rsp + 0xf8]
add rdx, rdi
call sub.VCRUNTIME140.dll_memcpy
jmp 0x1400f0964
cmp dword [rsp + 0xe8], r14d
je 0x1400f0905
cmp r13d, 3
je 0x1400f0880
mov r8d, 0x16bc
lea rdx, str.E:ReposSimHapticlibsimgui_stb_image.h
lea rcx, str.tga_comp__STBI_rgb
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
mov rcx, rbx
call fcn.1400e5490
movzx r8d, ax
mov eax, r8d
shr eax, 0xa
and eax, 0x1f
imul ecx, eax, 0xff
mov eax, 0x84210843
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, r8d
shr eax, 5
and r8d, 0x1f
and eax, 0x1f
mov byte [rsp + 0xf8], dl
imul ecx, eax, 0xff
mov eax, 0x84210843
imul ecx
add edx, ecx
imul ecx, r8d, 0xff
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, 0x84210843
mov byte [rsp + 0xf9], dl
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov byte [rsp + 0xfa], dl
jmp 0x1400f0964
mov rdi, r14
test r13d, r13d
je 0x1400f0964
nop dword [rax]
mov rax, qword [rbx + 0xb8]
cmp rax, qword [rbx + 0xc0]
jae 0x1400f092f
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400f0955
cmp dword [rbx + 0x30], r14d
je 0x1400f0953
mov rcx, rbx
call fcn.1400e5290
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400f0955
xor cl, cl
mov byte [rsp + rdi + 0xf8], cl
inc rdi
cmp rdi, rsi
jl 0x1400f0910
mov rcx, qword [rsp + 0x68]
mov r12d, r14d
mov rax, qword [rsp + 0x70]
mov rdi, r14
test r13d, r13d
je 0x1400f09a6
lea rax, [rsp + 0xf8]
mov r8, rsi
add rcx, rax
lea rdx, [rsp + 0xf8]
call sub.VCRUNTIME140.dll_memcpy
inc rdi
cmp rdi, rsi
jl 0x1400f0994
mov rcx, qword [rsp + 0x68]
mov rax, qword [rsp + 0x70]
mov rdi, qword [rsp + 0x48]
dec ebp
movsxd rdx, r13d
add rcx, rdx
mov edx, dword [rsp + 0x38]
sub rax, 1
mov qword [rsp + 0x68], rcx
mov qword [rsp + 0x70], rax
jne 0x1400f06d7
mov r15d, dword [rsp + 0x34]
mov ecx, dword [rsp + 0xd0]
cmp dword [rsp + 0x58], r14d
je 0x1400f0a4e
test r15d, r15d
jle 0x1400f0a4e
mov r11d, r13d
lea r10d, [r15 - 1]
imul r10d, r13d
mov ebx, r14d
mov r13, qword [rsp + 0x40]
imul r11d, ecx
imul r10d, ecx
nop
mov r8d, r11d
test r11d, r11d
jle 0x1400f0a3a
movsxd rax, ebx
movsxd r9, r10d
sub r9, rax
lea rdx, [rax + r13]
nop word [rax + rax]
movzx eax, byte [r9 + rdx]
dec r8d
movzx ecx, byte [rdx]
mov byte [rdx], al
mov byte [r9 + rdx], cl
lea rdx, [rdx + 1]
test r8d, r8d
jg 0x1400f0a20
add ebx, r11d
sub r10d, r11d
add r14d, 2
cmp r14d, r15d
jl 0x1400f0a00
mov r13d, dword [rsp + 0x30]
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x1400f0a5e
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov ebp, dword [rsp + 0xe8]
mov rsi, qword [rsp + 0x40]
cmp r13d, 3
jb 0x1400f0aa9
mov ecx, dword [rsp + 0xd0]
test ebp, ebp
jne 0x1400f0ab0
mov eax, r15d
mov r8, rsi
imul eax, ecx
test eax, eax
je 0x1400f0ab0
mov r11d, r13d
mov r10d, eax
nop
movzx ecx, byte [r8]
movzx eax, byte [r8 + 2]
mov byte [r8], al
mov byte [r8 + 2], cl
add r8, r11
sub r10, 1
jne 0x1400f0a90
mov ecx, dword [rsp + 0xd0]
cmp r13d, 4
je 0x1400f0ad2
mov r9d, ecx
mov dword [rsp + 0x20], r15d
mov rcx, rsi
mov r8d, 4
mov edx, r13d
call fcn.1400e5550
mov rsi, rax
mov rax, rsi
jmp 0x1400f0b18
mov rsi, qword [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.outofmem
jmp 0x1400f0b0d
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.too_large
mov edx, 0x18
mov qword [rdx + rcx], rax
xor eax, eax
add rsp, 0x88
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret