Function at 0x1405dc6a0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push rbx
push rbp
push rsi
push r12
push r13
push r14
sub rsp, 0xb8
mov rax, qword [0x1406dc5c0]
xor rax, rsp
mov qword [rsp + 0x98], rax
mov rax, qword [rcx + 0xc0]
mov rbx, rcx
mov rcx, qword [rcx + 0xc8]
xor ebp, ebp
mov qword [rsp + 0x88], r9
mov qword [rsp + 0x70], r8
mov qword [rsp + 0x40], rdx
cmp rax, rcx
jb 0x1405dc708
cmp dword [rbx + 0x30], ebp
je 0x1405dc72a
mov rcx, rbx
call fcn.1405d1010
mov rax, qword [rbx + 0xc0]
mov rcx, qword [rbx + 0xc8]
movzx edx, byte [rax]
inc rax
movzx r8d, dl
mov dword [rsp + 0x60], r8d
mov dword [rsp + 0x34], r8d
mov qword [rbx + 0xc0], rax
cmp rax, rcx
jae 0x1405dc732
jmp 0x1405dc74d
mov dword [rsp + 0x60], ebp
mov dword [rsp + 0x34], ebp
cmp dword [rbx + 0x30], ebp
je 0x1405dc776
mov rcx, rbx
call fcn.1405d1010
mov rax, qword [rbx + 0xc0]
mov rcx, qword [rbx + 0xc8]
movzx esi, byte [rax]
inc rax
movzx edx, sil
mov dword [rsp + 0x58], edx
mov qword [rbx + 0xc0], rax
cmp rax, rcx
jae 0x1405dc77d
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1405dc7a2
xor sil, sil
mov dword [rsp + 0x58], ebp
cmp dword [rbx + 0x30], ebp
je 0x1405dc7a0
mov rcx, rbx
call fcn.1405d1010
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1405dc7a2
xor cl, cl
movzx eax, cl
mov rcx, rbx
mov dword [rsp + 0x3c], eax
call fcn.1405d1220
mov rcx, rbx
movsxd r12, eax
call fcn.1405d1220
mov rcx, qword [rbx + 0xc0]
mov dword [rsp + 0x48], eax
cmp rcx, qword [rbx + 0xc8]
jae 0x1405dc7df
movzx edx, byte [rcx]
inc rcx
mov qword [rbx + 0xc0], rcx
jmp 0x1405dc804
cmp dword [rbx + 0x30], ebp
je 0x1405dc802
mov rcx, rbx
call fcn.1405d1010
mov rax, qword [rbx + 0xc0]
movzx edx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1405dc804
xor dl, dl
mov qword [rsp + 0xb0], rdi
mov rcx, rbx
mov qword [rsp + 0xa8], r15
movzx r14d, dl
call fcn.1405d1220
mov rcx, rbx
call fcn.1405d1220
mov rcx, rbx
call fcn.1405d1220
mov rcx, rbx
mov dword [rsp + 0x54], eax
call fcn.1405d1220
mov rcx, qword [rbx + 0xc8]
mov dword [rsp + 0x50], eax
mov rax, qword [rbx + 0xc0]
cmp rax, rcx
jb 0x1405dc86e
cmp dword [rbx + 0x30], ebp
je 0x1405dc896
mov rcx, rbx
call fcn.1405d1010
mov rax, qword [rbx + 0xc0]
mov rcx, qword [rbx + 0xc8]
movzx edx, byte [rax]
inc rax
movzx r15d, dl
mov qword [rbx + 0xc0], rax
mov edi, r15d
cmp rax, rcx
jae 0x1405dc89b
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1405dc8c0
mov r15d, ebp
mov edi, ebp
cmp dword [rbx + 0x30], ebp
je 0x1405dc8be
mov rcx, rbx
call fcn.1405d1010
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1405dc8c0
xor cl, cl
mov r8d, dword [rsp + 0x50]
mov r13d, 1
movzx eax, cl
mov qword [rsp + 0x80], rbp
mov dword [rsp + 0x90], ebp
mov dword [rsp + 0x4c], ebp
cmp r8d, 0x1000000
jg 0x1405dd0e2
mov r9d, dword [rsp + 0x54]
cmp r9d, 0x1000000
jg 0x1405dd0e2
mov edx, dword [rsp + 0x3c]
cmp edx, 8
mov dword [rsp + 0x38], ebp
lea ecx, [rdx - 8]
cmovb ecx, edx
shr eax, 5
and eax, r13d
mov edx, r13d
sub edx, eax
mov dword [rsp + 0x68], edx
cmp dword [rsp + 0x58], ebp
je 0x1405dc944
mov ecx, r14d
sub ecx, 8
je 0x1405dc99d
sub ecx, 7
je 0x1405dc990
sub ecx, r13d
je 0x1405dc990
sub ecx, 8
je 0x1405dc960
cmp ecx, 8
jne 0x1405dc96d
jmp 0x1405dc960
sub edi, 8
je 0x1405dc99d
sub edi, 7
je 0x1405dc990
sub edi, r13d
je 0x1405dc985
sub edi, 8
je 0x1405dc95d
cmp edi, 8
jne 0x1405dc96d
mov r14d, r15d
shr r14d, 3
mov dword [rsp + 0x38], ebp
test r14d, r14d
jne 0x1405dc9a0
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.bad_format
jmp 0x1405dd0f5
cmp ecx, 3
jne 0x1405dc990
lea r14d, [rcx - 1]
jmp 0x1405dc9a0
mov r14d, 3
mov dword [rsp + 0x38], r13d
jmp 0x1405dc9a0
mov r14d, r13d
mov rax, qword [rsp + 0x40]
mov dword [rax], r9d
mov rax, qword [rsp + 0x70]
mov dword [rax], r8d
mov rax, qword [rsp + 0x88]
test rax, rax
je 0x1405dc9c0
mov dword [rax], r14d
test r9d, r9d
js 0x1405dd0e2
test r8d, r8d
js 0x1405dd0e2
je 0x1405dc9ed
mov eax, 0x7fffffff
mov ecx, ebp
cdq
idiv r8d
cmp r9d, eax
setle cl
test ecx, ecx
je 0x1405dd0e2
mov ecx, r8d
imul ecx, r9d
mov dword [rsp + 0x70], ecx
test ecx, ecx
js 0x1405dd0e2
xor edx, edx
mov eax, 0x7fffffff
div r14d
mov edi, eax
cmp ecx, eax
jg 0x1405dd0e2
test r8d, r8d
je 0x1405dca2b
mov eax, 0x7fffffff
cdq
idiv r8d
cmp r9d, eax
jg 0x1405dd0cd
mov eax, r14d
imul eax, r8d
imul eax, r9d
movsxd rcx, eax
call qword [0x140646a40]
mov qword [rsp + 0x40], rax
test rax, rax
je 0x1405dd0cd
cmp dword [rsp + 0x60], ebp
je 0x1405dca95
mov edx, dword [rsp + 0x34]
cmp qword [rbx + 0x10], rbp
je 0x1405dca86
mov ecx, dword [rbx + 0xc8]
sub ecx, dword [rbx + 0xc0]
cmp ecx, edx
jge 0x1405dca86
mov rax, qword [rbx + 0xc8]
sub edx, ecx
mov rcx, qword [rbx + 0x28]
mov qword [rbx + 0xc0], rax
call qword [rbx + Ordinal_26]
jmp 0x1405dca90
movsxd rax, edx
add qword [rbx + 0xc0], rax
mov rax, qword [rsp + 0x40]
cmp dword [rsp + 0x58], ebp
jne 0x1405dcb4e
mov ecx, dword [rsp + 0x3c]
mov edi, r15d
mov dword [rsp + 0x34], r15d
mov byte [rsp + 0x30], sil
cmp ecx, 8
jae 0x1405dccdd
mov eax, dword [rsp + 0x38]
mov dword [rsp + 0x34], r15d
mov byte [rsp + 0x30], sil
test eax, eax
jne 0x1405dccdd
mov r13d, dword [rsp + 0x50]
mov r12, qword [rsp + 0x40]
test r13d, r13d
jle 0x1405dd062
mov ecx, dword [rsp + 0x54]
mov edi, r13d
mov ebp, ecx
imul ebp, r14d
cmp dword [rsp + 0x68], eax
je 0x1405dcb2c
mov eax, ebp
neg eax
movsxd r15, eax
lea eax, [r13 - 1]
imul eax, r14d
imul eax, ecx
movsxd rsi, eax
add rsi, r12
nop dword [rax]
mov r8d, ebp
mov rdx, rsi
mov rcx, rbx
call fcn.1405d1090
add rsi, r15
sub rdi, 1
jne 0x1405dcb10
jmp 0x1405dd05e
movsxd r15, ebp
mov rsi, r12
mov r8d, ebp
mov rdx, rsi
mov rcx, rbx
call fcn.1405d1090
add rsi, r15
sub rdi, 1
jne 0x1405dcb32
jmp 0x1405dd05e
cmp dword [rsp + 0x48], ebp
jne 0x1405dcb75
mov rcx, rax
call qword [0x140646a20]
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.bad_palette
jmp 0x1405dd0f5
test r12d, r12d
je 0x1405dcbc7
jns 0x1405dcb8c
mov rax, qword [rbx + 0xc8]
mov qword [rbx + 0xc0], rax
jmp 0x1405dcbc7
cmp qword [rbx + 0x10], rbp
je 0x1405dcbc0
mov ecx, dword [rbx + 0xc8]
sub ecx, dword [rbx + 0xc0]
cmp ecx, r12d
jge 0x1405dcbc0
mov rax, qword [rbx + 0xc8]
sub r12d, ecx
mov rcx, qword [rbx + 0x28]
mov edx, r12d
mov qword [rbx + 0xc0], rax
call qword [rbx + Ordinal_26]
jmp 0x1405dcbc7
add qword [rbx + 0xc0], r12
mov ecx, dword [rsp + 0x48]
test ecx, ecx
js 0x1405dd0c2
cmp ecx, edi
mov eax, ebp
setle al
test eax, eax
je 0x1405dd0c2
mov edi, r14d
imul edi, ecx
movsxd rcx, edi
call qword [0x140646a40]
mov qword [rsp + 0x80], rax
mov r12, rax
test rax, rax
je 0x1405dd0c2
cmp dword [rsp + 0x38], ebp
je 0x1405dcd41
mov rdi, rax
cmp r14d, 3
je 0x1405dcc32
mov r8d, 0x1745
lea rdx, str.D:BackupGamingAET_New_MenuImGui_Standalone_mainSourceinclude_stb_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 ecx, dword [rsp + 0x48]
mov dword [rsp + 0x34], r15d
mov byte [rsp + 0x30], sil
test ecx, ecx
jle 0x1405dccd6
mov byte [rsp + 0x30], sil
mov r12d, ecx
mov esi, r14d
mov dword [rsp + 0x34], r15d
mov rcx, rbx
call fcn.1405d1220
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 [rdi], 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 [rdi + 1], dl
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov byte [rdi + 2], dl
add rdi, rsi
sub r12, r13
jne 0x1405dcc58
mov ecx, dword [rsp + 0x3c]
mov edi, r15d
mov eax, dword [rsp + 0x70]
mov esi, r14d
test eax, eax
jle 0x1405dcfcc
mov r15, qword [rsp + 0x40]
lea rdx, [rsp + 0x90]
sub r15, rdx
mov r10d, r14d
mov r9d, eax
mov qword [rsp + 0x60], rax
mov r8d, ebp
mov r12d, ebp
nop dword [rax]
cmp ecx, 8
jb 0x1405dcdc0
test r8d, r8d
jne 0x1405dcdb2
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x1405dcd74
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1405dcd99
mov r8d, edi
mov dword [rsp + 0x34], r15d
mov rdx, r12
mov byte [rsp + 0x30], sil
mov rcx, rbx
call fcn.1405d1090
test eax, eax
jne 0x1405dccd6
mov rcx, qword [rsp + 0x40]
call qword [0x140646a20]
mov rcx, r12
jmp 0x1405dcb57
cmp dword [rbx + 0x30], ebp
je 0x1405dcd97
mov rcx, rbx
call fcn.1405d1010
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1405dcd99
xor cl, cl
movzx r12d, cl
mov r8d, r12d
and r8d, 0x7f
inc r8d
mov dword [rsp + 0x4c], r8d
shr r12d, 7
jmp 0x1405dcdc0
test r12d, r12d
je 0x1405dcdc0
test r13d, r13d
je 0x1405dcf83
cmp byte [rsp + 0x30], bpl
je 0x1405dce5b
cmp edi, 8
jne 0x1405dce1f
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x1405dcdf2
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
movzx eax, cl
jmp 0x1405dce27
cmp dword [rbx + 0x30], ebp
je 0x1405dce18
mov rcx, rbx
call fcn.1405d1010
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
movzx eax, cl
jmp 0x1405dce27
xor cl, cl
movzx eax, cl
jmp 0x1405dce27
mov rcx, rbx
call fcn.1405d1220
cmp eax, dword [rsp + 0x48]
cmovge eax, ebp
test r14d, r14d
je 0x1405dcf73
imul eax, r14d
lea rcx, [rsp + 0x90]
mov r8, rsi
movsxd rdx, eax
add rdx, qword [rsp + 0x80]
call sub.VCRUNTIME140.dll_memcpy
jmp 0x1405dcf73
cmp dword [rsp + 0x38], ebp
je 0x1405dcf0a
cmp r14d, 3
je 0x1405dce85
mov r8d, 0x1776
lea rdx, str.D:BackupGamingAET_New_MenuImGui_Standalone_mainSourceinclude_stb_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.1405d1220
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 + 0x90], 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 + 0x91], dl
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov byte [rsp + 0x92], dl
jmp 0x1405dcf73
mov rdi, rbp
test r14d, r14d
je 0x1405dcf73
nop dword [rax]
nop word [rax + rax]
mov rax, qword [rbx + 0xc0]
cmp rax, qword [rbx + 0xc8]
jae 0x1405dcf3f
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1405dcf64
cmp dword [rbx + 0x30], ebp
je 0x1405dcf62
mov rcx, rbx
call fcn.1405d1010
mov rax, qword [rbx + 0xc0]
movzx ecx, byte [rax]
inc rax
mov qword [rbx + 0xc0], rax
jmp 0x1405dcf64
xor cl, cl
mov byte [rsp + rdi + 0x90], cl
inc rdi
cmp rdi, rsi
jl 0x1405dcf20
mov r8d, dword [rsp + 0x4c]
mov r13d, ebp
mov r9, qword [rsp + 0x60]
mov r10d, r14d
mov rdx, rbp
test r14d, r14d
je 0x1405dcfaa
nop dword [rax + rax]
lea rcx, [rsp + 0x90]
add rcx, rdx
inc rdx
movzx eax, byte [rcx]
mov byte [rcx + r15], al
cmp rdx, rsi
jl 0x1405dcf90
mov edi, dword [rsp + 0x34]
dec r8d
mov ecx, dword [rsp + 0x3c]
add r15, r10
sub r9, 1
mov dword [rsp + 0x4c], r8d
mov qword [rsp + 0x60], r9
jne 0x1405dcd10
mov r12, qword [rsp + 0x40]
mov r13d, dword [rsp + 0x50]
cmp dword [rsp + 0x68], ebp
je 0x1405dd048
test r13d, r13d
jle 0x1405dd048
lea r10d, [r13 - 1]
mov r11d, r14d
imul r11d, dword [rsp + 0x54]
mov ebx, ebp
imul r10d, r14d
imul r10d, dword [rsp + 0x54]
nop word [rax + rax]
mov r8d, r11d
test r11d, r11d
jle 0x1405dd03a
movsxd rax, ebx
movsxd r9, r10d
sub r9, rax
lea rdx, [r12 + rax]
nop word [rax + rax]
movzx eax, byte [rdx + r9]
dec r8d
movzx ecx, byte [rdx]
mov byte [rdx], al
mov byte [rdx + r9], cl
lea rdx, [rdx + 1]
test r8d, r8d
jg 0x1405dd020
add ebx, r11d
sub r10d, r11d
add ebp, 2
cmp ebp, r13d
jl 0x1405dd000
mov rax, qword [rsp + 0x80]
test rax, rax
je 0x1405dd05e
mov rcx, rax
call qword [0x140646a20]
mov eax, dword [rsp + 0x38]
cmp r14d, 3
jb 0x1405dd099
test eax, eax
jne 0x1405dd099
mov eax, dword [rsp + 0x70]
mov r8, r12
test eax, eax
jle 0x1405dd099
mov edx, r14d
mov r10d, eax
nop dword [rax]
movzx ecx, byte [r8]
movzx eax, byte [r8 + 2]
mov byte [r8], al
mov byte [r8 + 2], cl
add r8, rdx
sub r10, 1
jne 0x1405dd080
cmp r14d, 4
je 0x1405dd0bd
mov r9d, dword [rsp + 0x54]
mov r8d, 4
mov edx, r14d
mov dword [rsp + 0x20], r13d
mov rcx, r12
call fcn.1405d12e0
mov r12, rax
mov rax, r12
jmp 0x1405dd100
mov rcx, qword [rsp + 0x40]
call qword [0x140646a20]
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.outofmem
jmp 0x1405dd0f5
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
lea rax, str.too_large
mov edx, 0x1aa8
mov qword [rdx + rcx], rax
xor eax, eax
mov r15, qword [rsp + 0xa8]
mov rdi, qword [rsp + 0xb0]
mov rcx, qword [rsp + 0x98]
xor rcx, rsp
call fcn.14063c0a0
add rsp, 0xb8
pop r14
pop r13
pop r12
pop rsi
pop rbp
pop rbx
ret