Function at 0x4041b0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, edx
mov dword [ebp - 0xc], ecx
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 8], eax
cmp esi, eax
jne 0x4041cd
mov eax, ecx
pop esi
mov esp, ebp
pop ebp
ret
cmp esi, 1
jl 0x4041d7
cmp esi, 4
jle 0x4041ef
push 0x622
push str.C:Users_adeptDesktopMAADeditorMAADeditorCode_stb_image.h
push str.req_comp___1__req_comp___4
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
add esp, 0xc
push ebx
push edi
test esi, esi
js 0x404549
mov ebx, dword [ebp + 0xc]
test ebx, ebx
js 0x404549
je 0x404216
mov eax, 0x7fffffff
cdq
idiv ebx
cmp esi, eax
jg 0x404549
mov ecx, esi
imul ecx, ebx
mov dword [ebp + 8], ecx
test ecx, ecx
js 0x404549
mov edi, dword [ebp + 0x10]
test edi, edi
js 0x404549
je 0x404243
mov eax, 0x7fffffff
cdq
idiv edi
cmp ecx, eax
jg 0x404549
mov eax, ecx
imul eax, edi
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov ecx, eax
add esp, 4
mov dword [ebp - 0x18], ecx
test ecx, ecx
je 0x404549
test edi, edi
jle 0x40441e
mov eax, dword [ebp - 8]
mov edx, dword [ebp + 8]
lea edi, [eax*8 - 0xa]
add edi, esi
imul eax, ebx
mov dword [ebp - 4], edi
mov dword [ebp - 8], eax
mov eax, ecx
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], ecx
nop word [eax + eax]
mov esi, ecx
cmp edi, 0x19
ja case.0x4042a2.3
movzx ecx, byte [edi + 0x40459c]
jmp dword [ecx*4 + 0x404568]
lea edx, [ebx - 1]
test ebx, ebx
jle 0x4042c3
sub edx, 1
mov cl, byte [esi]
mov byte [eax], cl
lea esi, [esi + 1]
mov byte [eax + 1], 0xff
lea eax, [eax + 2]
jns 0x4042b0
mov edx, dword [ebp + 8]
jmp 0x404403
lea edx, [ebx - 1]
test ebx, ebx
jle 0x4042c3
sub edx, 1
mov cl, byte [esi]
mov byte [eax + 2], cl
lea esi, [esi + 1]
mov byte [eax + 1], cl
lea eax, [eax + 3]
mov byte [eax - 3], cl
jns 0x4042d2
mov edx, dword [ebp + 8]
jmp 0x404403
lea edx, [ebx - 1]
test ebx, ebx
jle 0x4042c3
sub edx, 1
mov cl, byte [esi]
mov byte [eax + 2], cl
lea esi, [esi + 1]
mov byte [eax + 1], cl
lea eax, [eax + 4]
mov byte [eax - 4], cl
mov byte [eax - 1], 0xff
jns 0x4042f7
mov edx, dword [ebp + 8]
jmp 0x404403
lea edx, [ebx - 1]
test ebx, ebx
jle 0x4042c3
sub edx, 1
mov cl, byte [esi]
mov byte [eax], cl
lea esi, [esi + 2]
lea eax, [eax + 1]
jns 0x404320
mov edx, dword [ebp + 8]
jmp 0x404403
lea edx, [ebx - 1]
test ebx, ebx
jle 0x4042c3
nop
sub edx, 1
mov cl, byte [esi]
mov byte [eax + 2], cl
lea esi, [esi + 2]
mov byte [eax + 1], cl
lea eax, [eax + 3]
mov byte [eax - 3], cl
jns 0x404340
mov edx, dword [ebp + 8]
jmp 0x404403
lea edx, [ebx - 1]
test ebx, ebx
jle 0x4042c3
nop dword [eax]
sub edx, 1
mov cl, byte [esi]
mov byte [eax + 2], cl
lea esi, [esi + 2]
mov byte [eax + 1], cl
lea eax, [eax + 4]
mov byte [eax - 4], cl
movzx ecx, byte [esi - 1]
mov byte [eax - 1], cl
jns 0x404370
mov edx, dword [ebp + 8]
jmp 0x404403
lea edx, [ebx - 1]
test ebx, ebx
jle 0x4042c3
nop dword [eax]
sub edx, 1
movzx ecx, byte [esi]
mov byte [eax], cl
lea esi, [esi + 3]
movzx ecx, byte [esi - 2]
lea eax, [eax + 4]
mov byte [eax - 3], cl
movzx ecx, byte [esi - 1]
mov byte [eax - 2], cl
mov byte [eax - 1], 0xff
jns 0x4043a0
mov edx, dword [ebp + 8]
jmp 0x404403
lea edi, [ebx - 1]
test ebx, ebx
jle 0x404400
nop
movzx ecx, byte [esi + 1]
lea esi, [esi + 3]
imul edx, ecx, 0x96
lea eax, [eax + 1]
movzx ecx, byte [esi - 1]
imul ecx, ecx, 0x1d
add edx, ecx
movzx ecx, byte [esi - 3]
imul ecx, ecx, 0x4d
add edx, ecx
shr edx, 8
sub edi, 1
mov byte [eax - 1], dl
jns 0x4043d0
mov edx, dword [ebp + 8]
mov edi, dword [ebp - 4]
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x14]
add ecx, dword [ebp - 8]
add eax, edx
sub dword [ebp + 0x10], 1
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x14], eax
jne 0x404290
push dword [ebp - 0xc]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, dword [ebp - 0x18]
add esp, 4
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
lea edi, [ebx - 1]
test ebx, ebx
jle 0x404400
nop dword [eax + eax]
movzx ecx, byte [esi + 1]
lea esi, [esi + 3]
imul edx, ecx, 0x96
lea eax, [eax + 2]
movzx ecx, byte [esi - 1]
imul ecx, ecx, 0x1d
add edx, ecx
movzx ecx, byte [esi - 3]
imul ecx, ecx, 0x4d
mov byte [eax - 1], 0xff
add edx, ecx
shr edx, 8
sub edi, 1
mov byte [eax - 2], dl
jns 0x404440
jmp 0x4043fd
lea edi, [ebx - 1]
test ebx, ebx
jle 0x404400
nop word [eax + eax]
movzx ecx, byte [esi + 1]
lea esi, [esi + 4]
imul edx, ecx, 0x96
lea eax, [eax + 1]
movzx ecx, byte [esi - 2]
imul ecx, ecx, 0x1d
add edx, ecx
movzx ecx, byte [esi - 4]
imul ecx, ecx, 0x4d
add edx, ecx
shr edx, 8
sub edi, 1
mov byte [eax - 1], dl
jns 0x404480
jmp 0x4043fd
lea edi, [ebx - 1]
test ebx, ebx
jle 0x404400
nop dword [eax]
movzx ecx, byte [esi + 1]
lea esi, [esi + 4]
imul edx, ecx, 0x96
lea eax, [eax + 2]
movzx ecx, byte [esi - 2]
imul ecx, ecx, 0x1d
add edx, ecx
movzx ecx, byte [esi - 4]
imul ecx, ecx, 0x4d
add edx, ecx
shr edx, 8
sub edi, 1
mov byte [eax - 2], dl
mov cl, byte [esi - 1]
mov byte [eax - 1], cl
jns 0x4044c0
jmp 0x4043fd
lea edx, [ebx - 1]
test ebx, ebx
jle 0x4042c3
sub edx, 1
movzx ecx, byte [esi]
mov byte [eax], cl
lea esi, [esi + 4]
movzx ecx, byte [esi - 3]
lea eax, [eax + 3]
mov byte [eax - 2], cl
movzx ecx, byte [esi - 2]
mov byte [eax - 1], cl
jns 0x404503
mov edx, dword [ebp + 8]
jmp 0x404403
push 0x63f
push str.C:Users_adeptDesktopMAADeditorMAADeditorCode_stb_image.h
push 0x487a60
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__wassert]
mov edx, dword [ebp + 8]
add esp, 0xc
jmp 0x404403
push dword [ebp - 0xc]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov dword [0x4983b8], 0x487950
xor eax, eax
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret