Function at 0x50c6cc
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffd0
mov dword [esp], edx
mov esi, eax
lea ebp, [esp + 0xc]
mov dl, 6
mov eax, esi
call fcn.00432950
mov dl, 1
mov eax, dword [0x42aa8c]
call fcn.004313d0
mov dword [esp + 4], eax
xor edi, edi
xor eax, eax
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [esp + 0x14], eax
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x20]
mov ebx, eax
dec ebx
test ebx, ebx
jl 0x50c761
inc ebx
mov dword [esp + 8], 0
mov edx, dword [esp + 8]
mov eax, esi
call fcn.00431b10
mov dword [ebp], eax
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x2c]
dec eax
test eax, eax
jl 0x50c75a
inc eax
mov edx, dword [ebp]
movzx edx, byte [edx + 2]
add edi, edx
mov edx, dword [ebp]
movzx edx, byte [edx + 1]
add dword [esp + 0x10], edx
mov edx, dword [ebp]
movzx edx, byte [edx]
add dword [esp + 0x14], edx
add dword [ebp], 3
dec eax
jne 0x50c735
inc dword [esp + 8]
dec ebx
jne 0x50c71a
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x2c]
mov ebx, eax
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x20]
imul ebx, eax
test ebx, ebx
jne 0x50c77d
mov ebx, 1
mov eax, dword [esp + 0x14]
cdq
idiv ebx
mov ecx, eax
mov eax, dword [esp + 0x10]
cdq
idiv ebx
push eax
mov eax, edi
cdq
idiv ebx
pop edx
call fcn.004085e8
mov edx, dword [esp]
mov dword [edx], eax
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x2c]
mov edx, eax
mov eax, dword [esp + 4]
mov ecx, dword [eax]
call dword [ecx + 0x40]
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x20]
mov edx, eax
mov eax, dword [esp + 4]
mov ecx, dword [eax]
call dword [ecx + 0x34]
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x2c]
mov ebp, eax
sub ebp, dword [0x70ae78]
push 0xcc0020
push 0
push 0
mov eax, esi
call fcn.004319a0
call fcn.0042cc3c
push eax
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x20]
sub eax, dword [0x70ae78]
push eax
push ebp
push 0
push 0
mov eax, dword [esp + 0x24]
call fcn.004319a0
call fcn.0042cc3c
push eax
call sub.gdi32.dll_BitBlt
mov eax, dword [0x70ae78]
push eax
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x20]
sub eax, dword [0x70ae78]
push eax
mov eax, dword [esp + 8]
mov eax, dword [eax]
push eax
mov eax, dword [esp + 0x10]
call fcn.004319a0
call fcn.0042cc3c
xor ecx, ecx
mov edx, ebp
call fcn.0050c344
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x20]
mov ebp, eax
sub ebp, dword [0x70ae78]
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x2c]
sub eax, dword [0x70ae78]
push eax
mov eax, dword [0x70ae78]
push eax
mov eax, dword [esp + 8]
mov eax, dword [eax]
push eax
mov eax, dword [esp + 0x10]
call fcn.004319a0
call fcn.0042cc3c
mov ecx, ebp
xor edx, edx
call fcn.0050c344
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x20]
push eax
mov eax, dword [esp + 4]
mov eax, dword [eax]
push eax
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x2c]
push eax
mov eax, esi
call fcn.004319a0
call fcn.0042cc3c
push eax
mov eax, dword [esp + 0x14]
call fcn.004319a0
call fcn.0042cc3c
pop edx
pop ecx
call fcn.0050c394
lea eax, [esp + 0x18]
xor ecx, ecx
mov edx, 4
call fcn.004035f8
mov byte [esp + 0x18], 0
mov byte [esp + 0x1a], 0xff
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x2c]
mov ebp, eax
sub ebp, dword [0x70ae78]
mov ebx, dword [0x70ae78]
dec ebx
test ebx, ebx
jl 0x50c963
inc ebx
xor edi, edi
mov dword [esp + 0x2c], edi
fild dword [esp + 0x2c]
fld xword [0x50c9dc]
fmulp st(1)
call fcn.004030ec
mov dl, 0xff
sub dl, al
mov byte [esp + 0x1a], dl
push dword [esp + 0x18]
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x20]
sub eax, dword [0x70ae78]
push eax
push 1
push 0
lea eax, [edi + ebp]
push eax
mov eax, esi
call fcn.004319a0
call fcn.0042cc3c
push eax
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x20]
sub eax, dword [0x70ae78]
push eax
push 1
push 0
lea eax, [edi + ebp]
push eax
mov eax, dword [esp + 0x2c]
call fcn.004319a0
call fcn.0042cc3c
push eax
call sub.msimg32.dll_AlphaBlend
inc edi
dec ebx
jne 0x50c8f1
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x20]
push eax
lea eax, [esp + 0x20]
push eax
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x2c]
sub eax, dword [0x70ae78]
push eax
mov eax, esi
mov edx, dword [eax]
call dword [edx + 0x20]
mov edx, eax
sub edx, dword [0x70ae78]
xor eax, eax
pop ecx
call fcn.0041ce0c
push 0
push 0x64
mov eax, esi
call fcn.004319a0
call fcn.0042cc3c
push eax
mov eax, dword [esp + 0x10]
call fcn.004319a0
call fcn.0042cc3c
lea ecx, [esp + 0x28]
pop edx
call fcn.0050c4c4
mov edx, dword [esp + 4]
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [esp + 4]
call fcn.00403fa4
add esp, 0x30
pop ebp
pop edi
pop esi
pop ebx
ret