Function at 0x450490
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0x814
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 4]
test eax, eax
jne 0x4504b0
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x814
ret
mov ecx, pe_nt_image_headers32
xor eax, eax
lea edi, [esp + 0x24]
xor ebx, ebx
rep stosd dword es:[edi], eax
mov ecx, pe_nt_image_headers32
lea edi, [esp + 0x424]
rep stosd dword es:[edi], eax
mov ecx, dword [esi + 0x10]
test ecx, ecx
jle 0x45057b
mov dword [esp + 0x10], eax
cdq
idiv ecx
mov dword [esi + 0x144], eax
mov eax, dword [esi + 0x148]
test eax, eax
jne 0x45057b
mov eax, dword [esi + 0xc]
xor edi, edi
test eax, eax
jle 0x450564
push ebx
lea eax, [esp + 0x20]
push edi
push eax
mov ecx, esi
call sym.ConversionShow.exe_public:_struct_tagRGBQUAD___thiscall_CxImage::GetPixelColor_long_int__long_int_
mov eax, dword [eax]
mov dword [esp + 0x14], eax
mov ecx, dword [esp + 0x15]
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 + 0x16]
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 + 0x24]
lea eax, [esp + ecx*4 + 0x24]
inc edx
inc edi
mov dword [eax], edx
mov eax, dword [esi + 0xc]
cmp edi, eax
jl 0x4504fc
mov eax, dword [esp + 0x10]
mov ecx, dword [esi + 0x10]
inc ebx
add eax, 0x32
cmp ebx, ecx
mov dword [esp + 0x10], eax
jl 0x4504dc
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 0xc]
imul ecx, eax
mov eax, 0x51eb851f
xor edi, edi
imul ecx
sar edx, 5
mov ecx, edx
lea eax, [esp + 0x24]
shr ecx, 0x1f
add edx, ecx
xor ecx, ecx
add edi, dword [eax]
cmp edi, edx
jg 0x4505af
inc ecx
add eax, 4
cmp ecx, 0xff
jb 0x45059d
xor ebx, ebx
mov edi, 0xff
lea eax, [esp + 0x420]
add ebx, dword [eax]
cmp ebx, edx
jg 0x4505cb
dec edi
sub eax, 4
test edi, edi
jne 0x4505bd
cmp ecx, edi
jne 0x450616
xor edx, edx
xor ecx, ecx
lea eax, [esp + 0x24]
add edx, dword [eax]
test edx, edx
jg 0x4505e9
inc ecx
add eax, 4
cmp ecx, 0xff
jb 0x4505d7
xor edx, edx
mov edi, 0xff
lea eax, [esp + 0x420]
add edx, dword [eax]
test edx, edx
jg 0x450605
dec edi
sub eax, 4
test edi, edi
jne 0x4505f7
cmp ecx, edi
jne 0x450616
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x814
ret
xor eax, eax
lea edx, [esp + 0x424]
mov dword [esp + 0x10], eax
xor ebx, ebx
mov dword [esp + 0x1c], edx
cmp eax, ecx
jge 0x450635
mov dword [edx], 0
jmp 0x450660
cmp eax, edi
jle 0x450641
mov dword [edx], 0xff
jmp 0x450660
mov edx, ecx
mov eax, ebx
shl edx, 7
sub edx, ecx
mov ebp, edi
shl edx, 1
sub eax, edx
sub ebp, ecx
xor edx, edx
div ebp
mov edx, dword [esp + 0x1c]
mov dword [edx], eax
mov eax, dword [esp + 0x10]
add ebx, 0xfe
inc eax
add edx, 4
cmp ebx, 0xfd02
mov dword [esp + 0x10], eax
mov dword [esp + 0x1c], edx
jbe 0x450629
mov eax, dword [esi + 0x28]
test eax, eax
jne 0x450733
mov ecx, dword [esi + 0x10]
xor ebx, ebx
test ecx, ecx
jle 0x450794
xor ebp, ebp
mov eax, ebp
cdq
idiv ecx
add eax, 0x32
mov dword [esi + 0x144], eax
mov eax, dword [esi + 0x148]
test eax, eax
jne 0x450794
mov eax, dword [esi + 0xc]
xor edi, edi
test eax, eax
jle 0x450717
push ebx
lea eax, [esp + 0x20]
push edi
push eax
mov ecx, esi
call sym.ConversionShow.exe_public:_struct_tagRGBQUAD___thiscall_CxImage::GetPixelColor_long_int__long_int_
mov eax, dword [eax]
lea ecx, [esp + 0x10]
push eax
push ecx
mov ecx, esi
call sym.ConversionShow.exe_public:_struct_tagRGBQUAD___thiscall_CxImage::RGBtoYUV_struct_tagRGBQUAD_
mov edx, dword [eax]
mov dword [esp + 0x14], edx
mov eax, dword [esp + 0x16]
and eax, 0xff
mov cl, byte [esp + eax*4 + 0x424]
lea eax, [esp + 0x20]
mov byte [esp + 0x16], cl
mov edx, dword [esp + 0x14]
push edx
push eax
mov ecx, esi
call sym.ConversionShow.exe_public:_struct_tagRGBQUAD___thiscall_CxImage::YUVtoRGB_struct_tagRGBQUAD_
mov eax, dword [eax]
push 0
push eax
push ebx
push edi
mov ecx, esi
call sym.ConversionShow.exe_public:_void___thiscall_CxImage::SetPixelColor_long_int__long_int__struct_tagRGBQUAD__bool_
mov eax, dword [esi + 0xc]
inc edi
cmp edi, eax
jl 0x4506b9
mov ecx, dword [esi + 0x10]
inc ebx
add ebp, 0x32
cmp ebx, ecx
jl 0x450694
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x814
ret
xor edi, edi
test eax, eax
jle 0x450794
lea ecx, [esp + 0x20]
push edi
push ecx
mov ecx, esi
call sym.ConversionShow.exe_public:_struct_tagRGBQUAD___thiscall_CxImage::GetPaletteColor_unsigned_char_
mov eax, dword [eax]
lea edx, [esp + 0x1c]
push eax
push edx
mov ecx, esi
call sym.ConversionShow.exe_public:_struct_tagRGBQUAD___thiscall_CxImage::RGBtoYUV_struct_tagRGBQUAD_
mov eax, dword [eax]
mov dword [esp + 0x14], eax
mov ecx, dword [esp + 0x16]
and ecx, 0xff
mov dl, byte [esp + ecx*4 + 0x424]
lea ecx, [esp + 0x10]
mov byte [esp + 0x16], dl
mov eax, dword [esp + 0x14]
push eax
push ecx
mov ecx, esi
call sym.ConversionShow.exe_public:_struct_tagRGBQUAD___thiscall_CxImage::YUVtoRGB_struct_tagRGBQUAD_
mov eax, dword [eax]
mov ecx, esi
push eax
push edi
call sym.ConversionShow.exe_public:_void___thiscall_CxImage::SetPaletteColor_unsigned_char__struct_tagRGBQUAD_
mov eax, dword [esi + 0x28]
inc edi
cmp edi, eax
jl 0x450739
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x814
ret