Function at 0x10023a00
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0x818
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 4]
test eax, eax
jne 0x10023a20
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x818
ret
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0x28]
xor ebx, ebx
rep stosd dword es:[edi], eax
mov ecx, 0x100
lea edi, [esp + 0x428]
rep stosd dword es:[edi], eax
mov ecx, dword [esi + 0x10]
test ecx, ecx
jle 0x10023aed
mov dword [esp + 0x10], eax
cdq
idiv ecx
mov dword [esi + 0x144], eax
mov eax, dword [esi + 0x148]
test eax, eax
jne 0x10023aed
mov eax, dword [esi + 0xc]
xor edi, edi
test eax, eax
jle 0x10023ad6
push 1
push ebx
lea eax, [esp + 0x1c]
push edi
push eax
mov ecx, esi
call sym.YunImage.fne_public:_struct_tagRGBQUAD___thiscall_CxImage::GetPixelColor_long_int__long_int__bool_
mov eax, dword [eax]
mov dword [esp + 0x18], eax
mov ecx, dword [esp + 0x19]
and ecx, 0xff
and eax, 0xff
lea edx, [ecx + ecx*2]
lea edx, [edx + edx*4]
lea edx, [edx + edx*4]
lea ebp, [ecx + edx*8]
mov edx, dword [esp + 0x1a]
and edx, 0xff
mov ecx, edx
shl ecx, 4
add ecx, edx
lea edx, [eax + eax*2]
lea ecx, [ecx + ecx*8]
lea eax, [eax + edx*4]
lea ecx, [ebp + ecx*2]
lea eax, [eax + eax*8]
add ecx, eax
sar ecx, 0xa
mov edx, dword [esp + ecx*4 + 0x28]
lea eax, [esp + ecx*4 + 0x28]
inc edx
inc edi
mov dword [eax], edx
mov eax, dword [esi + 0xc]
cmp edi, eax
jl 0x10023a6c
mov eax, dword [esp + 0x10]
mov ecx, dword [esi + 0x10]
inc ebx
add eax, 0x32
cmp ebx, ecx
mov dword [esp + 0x10], eax
jl 0x10023a4c
mov ebp, dword [esi + 0xc]
mov eax, dword [esi + 0x10]
mov ecx, ebp
xor edi, edi
imul ecx, eax
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov ecx, edx
lea eax, [esp + 0x28]
shr ecx, 0x1f
add edx, ecx
xor ecx, ecx
add edi, dword [eax]
cmp edi, edx
jg 0x10023b23
inc ecx
add eax, 4
cmp ecx, 0xff
jb 0x10023b11
xor ebx, ebx
mov edi, 0xff
lea eax, [esp + 0x424]
add ebx, dword [eax]
cmp ebx, edx
jg 0x10023b3f
dec edi
sub eax, 4
test edi, edi
jne 0x10023b31
cmp ecx, edi
jne 0x10023b8a
xor edx, edx
xor ecx, ecx
lea eax, [esp + 0x28]
add edx, dword [eax]
test edx, edx
jg 0x10023b5d
inc ecx
add eax, 4
cmp ecx, 0xff
jb 0x10023b4b
xor edx, edx
mov edi, 0xff
lea eax, [esp + 0x424]
add edx, dword [eax]
test edx, edx
jg 0x10023b79
dec edi
sub eax, 4
test edi, edi
jne 0x10023b6b
cmp ecx, edi
jne 0x10023b8a
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x818
ret
xor ebx, ebx
xor eax, eax
lea edx, [esp + 0x428]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], edx
cmp ebx, ecx
jge 0x10023bad
mov dword [edx], 0
jmp 0x10023bda
cmp ebx, edi
jle 0x10023bb9
mov dword [edx], 0xff
jmp 0x10023bda
mov edx, ecx
mov ebx, edi
shl edx, 7
sub edx, ecx
sub ebx, ecx
shl edx, 1
sub eax, edx
xor edx, edx
div ebx
mov edx, dword [esp + 0x14]
mov ebx, dword [esp + 0x10]
mov dword [edx], eax
mov eax, dword [esp + 0x18]
add eax, 0xfe
inc ebx
add edx, 4
cmp eax, 0xfd02
mov dword [esp + 0x10], ebx
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], edx
jbe 0x10023ba1
mov eax, dword [esi + 0x28]
test eax, eax
jne 0x10023caf
mov eax, dword [esi + 0x10]
xor ebx, ebx
test eax, eax
jle 0x10023d05
xor eax, eax
mov dword [esp + 0x14], eax
cdq
idiv dword [esi + 0x10]
add eax, 0x32
mov dword [esi + 0x144], eax
mov eax, dword [esi + 0x148]
test eax, eax
jne 0x10023d05
xor edi, edi
test ebp, ebp
jle 0x10023c8b
push 1
push ebx
lea eax, [esp + 0x20]
push edi
push eax
mov ecx, esi
call sym.YunImage.fne_public:_struct_tagRGBQUAD___thiscall_CxImage::GetPixelColor_long_int__long_int__bool_
mov eax, dword [eax]
push eax
call sym.YunImage.fne_public:_static_struct_tagRGBQUAD___cdecl_CxImage::RGBtoYUV_struct_tagRGBQUAD_
mov dword [esp + 0x24], eax
mov ecx, dword [esp + 0x26]
and ecx, 0xff
mov dword [esp + 0x14], eax
mov dl, byte [esp + ecx*4 + 0x42c]
mov byte [esp + 0x16], dl
mov eax, dword [esp + 0x14]
push eax
call sym.YunImage.fne_public:_static_struct_tagRGBQUAD___cdecl_CxImage::YUVtoRGB_struct_tagRGBQUAD_
add esp, 8
mov ecx, esi
push 0
push eax
push ebx
push edi
call sym.YunImage.fne_public:_void___thiscall_CxImage::SetPixelColor_long_int__long_int__struct_tagRGBQUAD__bool_
mov ebp, dword [esi + 0xc]
inc edi
cmp edi, ebp
jl 0x10023c35
mov eax, dword [esp + 0x14]
mov ecx, dword [esi + 0x10]
inc ebx
add eax, 0x32
cmp ebx, ecx
mov dword [esp + 0x14], eax
jl 0x10023c14
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x818
ret
xor edi, edi
test eax, eax
jle 0x10023d05
lea ecx, [esp + 0x14]
push edi
push ecx
mov ecx, esi
call sym.YunImage.fne_public:_struct_tagRGBQUAD___thiscall_CxImage::GetPaletteColor_unsigned_char_
mov eax, dword [eax]
push eax
call sym.YunImage.fne_public:_static_struct_tagRGBQUAD___cdecl_CxImage::RGBtoYUV_struct_tagRGBQUAD_
mov dword [esp + 0x24], eax
mov edx, dword [esp + 0x26]
and edx, 0xff
mov dword [esp + 0x14], eax
mov al, byte [esp + edx*4 + 0x42c]
mov byte [esp + 0x16], al
mov ecx, dword [esp + 0x14]
push ecx
call sym.YunImage.fne_public:_static_struct_tagRGBQUAD___cdecl_CxImage::YUVtoRGB_struct_tagRGBQUAD_
add esp, 8
mov ecx, esi
push eax
push edi
call sym.YunImage.fne_public:_void___thiscall_CxImage::SetPaletteColor_unsigned_char__struct_tagRGBQUAD_
mov eax, dword [esi + 0x28]
inc edi
cmp edi, eax
jl 0x10023cb5
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x818
ret