Function at 0x1400f0da0
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 0x1400f0de5
movzx r8d, byte [rax]
inc rax
mov qword [rcx + 0xb8], rax
jmp 0x1400f0e0a
cmp dword [rcx + 0x30], 0
je 0x1400f0e07
call fcn.1400e5f90
mov rax, qword [rbx + 0xb8]
movzx r8d, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400f0e0a
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 0x1400f0e3e
movzx ebp, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400f0e64
cmp dword [rsi], 0
je 0x1400f0e61
mov rcx, rbx
call fcn.1400e5f90
mov rax, qword [rbx + 0xb8]
movzx ebp, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400f0e64
xor bpl, bpl
mov byte [rsp + 0xf0], bpl
cmp rax, qword [rbx + 0xc0]
jae 0x1400f0e84
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400f0ea9
cmp dword [rsi], 0
je 0x1400f0ea7
mov rcx, rbx
call fcn.1400e5f90
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400f0ea9
xor cl, cl
movzx eax, cl
mov rcx, rbx
mov dword [rsp + 0x38], eax
mov r15d, eax
call fcn.1400e6190
mov rcx, rbx
movsxd r13, eax
call fcn.1400e6190
mov rcx, qword [rbx + 0xb8]
mov dword [rsp + 0x50], eax
cmp rcx, qword [rbx + 0xc0]
jae 0x1400f0ee9
movzx edx, byte [rcx]
inc rcx
mov qword [rbx + 0xb8], rcx
jmp 0x1400f0f0e
cmp dword [rsi], 0
je 0x1400f0f0c
mov rcx, rbx
call fcn.1400e5f90
mov rax, qword [rbx + 0xb8]
movzx edx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400f0f0e
xor dl, dl
mov rcx, rbx
movzx edi, dl
call fcn.1400e6190
mov rcx, rbx
call fcn.1400e6190
mov rcx, rbx
call fcn.1400e6190
mov rcx, rbx
mov dword [rsp + 0xd0], eax
call fcn.1400e6190
mov dword [rsp + 0x34], eax
mov rax, qword [rbx + 0xb8]
cmp rax, qword [rbx + 0xc0]
jae 0x1400f0f5b
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400f0f80
cmp dword [rsi], 0
je 0x1400f0f7e
mov rcx, rbx
call fcn.1400e5f90
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400f0f80
xor cl, cl
movzx edx, cl
mov dword [rsp + 0x54], edx
cmp rax, qword [rbx + 0xc0]
jae 0x1400f0f9f
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400f0fc8
cmp dword [rsi], 0
je 0x1400f0fc6
mov rcx, rbx
call fcn.1400e5f90
mov rax, qword [rbx + 0xb8]
mov edx, dword [rsp + 0x54]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400f0fc8
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 0x1400f0fe9
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 0x1400f1022
mov ecx, edi
sub ecx, 8
je 0x1400f101d
sub ecx, 7
je 0x1400f106a
sub ecx, r12d
je 0x1400f106a
sub ecx, 8
je 0x1400f103f
cmp ecx, 8
jne 0x1400f1046
jmp 0x1400f103f
mov edi, r12d
jmp 0x1400f1042
mov ecx, edx
sub ecx, 8
je 0x1400f1074
sub ecx, 7
je 0x1400f106a
sub ecx, r12d
je 0x1400f105e
sub ecx, 8
je 0x1400f103d
cmp ecx, 8
jne 0x1400f1046
mov edi, edx
shr edi, 3
test edi, edi
jne 0x1400f1077
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.bad_format
jmp 0x1400f180d
cmp r15d, 3
jne 0x1400f106a
lea edi, [r15 - 1]
jmp 0x1400f1077
mov ebp, r12d
mov edi, 3
jmp 0x1400f1077
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 0x1400f17fa
test r15d, r15d
js 0x1400f17fa
je 0x1400f10c0
mov eax, 0x7fffffff
cdq
idiv r15d
cmp r8d, eax
jg 0x1400f17fa
mov ecx, r15d
imul ecx, r8d
test ecx, ecx
js 0x1400f17fa
xor edx, edx
mov eax, 0x7fffffff
div edi
cmp ecx, eax
jg 0x1400f17fa
test r15d, r15d
je 0x1400f10f7
mov eax, 0x7fffffff
cdq
idiv r15d
cmp r8d, eax
jg 0x1400f17e5
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 0x1400f17e5
cmp qword [rbx + 0x10], r14
je 0x1400f114e
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xb8]
mov edx, dword [rsp + 0x30]
cmp ecx, edx
jge 0x1400f114e
mov rax, qword [rbx + 0xc0]
sub edx, ecx
mov rcx, qword [rbx + 0x28]
mov qword [rbx + 0xb8], rax
call qword [rbx + 0x18]
jmp 0x1400f115d
movzx eax, byte [rsp + 0xe8]
add qword [rbx + 0xb8], rax
cmp byte [rsp + 0xf0], r14b
jne 0x1400f1231
mov edx, dword [rsp + 0x38]
mov r13d, edi
mov dword [rsp + 0xe8], ebp
mov dword [rsp + 0x30], edi
cmp edx, 8
jae 0x1400f1465
mov dword [rsp + 0xe8], ebp
mov dword [rsp + 0x30], edi
test ebp, ebp
jne 0x1400f1465
test r15d, r15d
jle 0x1400f176a
mov r15d, edi
imul r15d, dword [rsp + 0xd0]
cmp dword [rsp + 0x58], r14d
je 0x1400f1201
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.1400e6000
add rsi, r12
sub r14, 1
jne 0x1400f11e0
mov r15d, dword [rsp + 0x34]
jmp 0x1400f1765
mov r14d, dword [rsp + 0x34]
movsxd r12, r15d
nop dword [rax]
mov r8d, r15d
mov rdx, rsi
mov rcx, rbx
call fcn.1400e6000
add rsi, r12
sub r14, 1
jne 0x1400f1210
mov r15d, dword [rsp + 0x34]
jmp 0x1400f1765
test r13d, r13d
jns 0x1400f1246
mov rax, qword [rbx + 0xc0]
mov qword [rbx + 0xb8], rax
jmp 0x1400f1281
cmp qword [rbx + 0x10], r14
je 0x1400f127a
mov ecx, dword [rbx + 0xc0]
sub ecx, dword [rbx + 0xb8]
cmp ecx, r13d
jge 0x1400f127a
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 0x1400f1281
add qword [rbx + 0xb8], r13
mov ecx, dword [rsp + 0x50]
test ecx, ecx
js 0x1400f17dc
xor edx, edx
mov eax, 0x7fffffff
div edi
cmp ecx, eax
jg 0x1400f17dc
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 0x1400f17d7
test ebp, ebp
je 0x1400f140a
mov rsi, rax
cmp edi, 3
je 0x1400f12e4
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 0x1400f145d
mov r13d, edi
mov r15d, eax
mov dword [rsp + 0xe8], ebp
mov dword [rsp + 0x30], edi
nop
mov rcx, rbx
call fcn.1400e6190
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 0x1400f1310
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 0x1400f16d7
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 0x1400f14b3
test ebp, ebp
jne 0x1400f14a5
mov rax, qword [rbx + 0xb8]
cmp rax, qword [rbx + 0xc0]
jae 0x1400f146d
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400f1493
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.1400e6000
test eax, eax
jne 0x1400f139b
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 0x1400f180d
mov rdi, rsi
jmp 0x1400f139b
mov rdi, r14
jmp 0x1400f139f
cmp dword [rbx + 0x30], r14d
je 0x1400f1491
mov rcx, rbx
call fcn.1400e5f90
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400f1493
xor cl, cl
movzx r15d, cl
mov ebp, r15d
and ebp, 0x7f
inc ebp
shr r15d, 7
jmp 0x1400f14b3
test r15d, r15d
je 0x1400f14b3
test r12d, r12d
je 0x1400f1671
cmp byte [rsp + 0xf0], r14b
je 0x1400f1552
cmp dword [rsp + 0x54], 8
jne 0x1400f1518
mov rax, qword [rbx + 0xb8]
cmp rax, qword [rbx + 0xc0]
jae 0x1400f14ea
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
movzx eax, cl
jmp 0x1400f1520
cmp dword [rbx + 0x30], r14d
je 0x1400f1511
mov rcx, rbx
call fcn.1400e5f90
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
movzx eax, cl
jmp 0x1400f1520
xor cl, cl
movzx eax, cl
jmp 0x1400f1520
mov rcx, rbx
call fcn.1400e6190
test r13d, r13d
je 0x1400f1664
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 0x1400f1664
cmp dword [rsp + 0xe8], r14d
je 0x1400f1605
cmp r13d, 3
je 0x1400f1580
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.1400e6190
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 0x1400f1664
mov rdi, r14
test r13d, r13d
je 0x1400f1664
nop dword [rax]
mov rax, qword [rbx + 0xb8]
cmp rax, qword [rbx + 0xc0]
jae 0x1400f162f
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400f1655
cmp dword [rbx + 0x30], r14d
je 0x1400f1653
mov rcx, rbx
call fcn.1400e5f90
mov rax, qword [rbx + 0xb8]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xb8], rax
jmp 0x1400f1655
xor cl, cl
mov byte [rsp + rdi + 0xf8], cl
inc rdi
cmp rdi, rsi
jl 0x1400f1610
mov rcx, qword [rsp + 0x68]
mov r12d, r14d
mov rax, qword [rsp + 0x70]
mov rdi, r14
test r13d, r13d
je 0x1400f16a6
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 0x1400f1694
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 0x1400f13d7
mov r15d, dword [rsp + 0x34]
mov ecx, dword [rsp + 0xd0]
cmp dword [rsp + 0x58], r14d
je 0x1400f174e
test r15d, r15d
jle 0x1400f174e
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 0x1400f173a
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 0x1400f1720
add ebx, r11d
sub r10d, r11d
add r14d, 2
cmp r14d, r15d
jl 0x1400f1700
mov r13d, dword [rsp + 0x30]
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x1400f175e
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 0x1400f17a9
mov ecx, dword [rsp + 0xd0]
test ebp, ebp
jne 0x1400f17b0
mov eax, r15d
mov r8, rsi
imul eax, ecx
test eax, eax
je 0x1400f17b0
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 0x1400f1790
mov ecx, dword [rsp + 0xd0]
cmp r13d, 4
je 0x1400f17d2
mov r9d, ecx
mov dword [rsp + 0x20], r15d
mov rcx, rsi
mov r8d, 4
mov edx, r13d
call fcn.1400e6250
mov rsi, rax
mov rax, rsi
jmp 0x1400f1818
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 0x1400f180d
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