Function at 0x50f1b0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x64609b
mov eax, dword fs:[0]
push eax
sub esp, 0x2c8
mov eax, dword [0x6ae654]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x2d4], ecx
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x2bc]
push eax
mov ecx, ebx
mov dword [ebp - 0x284], ebx
mov dword [ebp - 4], 0
call fcn.0050fd50
mov ecx, eax
mov eax, dword [ebp - 0x2bc]
cdq
push edx
push eax
mov dword [ebp - 0x290], ecx
call fcn.005253b0
mov ecx, ebx
call fcn.004445d0
mov ecx, ebx
mov esi, eax
call fcn.004dcc40
cmp esi, 0x10
jne 0x50f24e
mov esi, 8
mov edi, 0x100
mov dword [ebp - 0x288], esi
test eax, eax
je 0x50f263
mov esi, 1
lea edi, [esi + 1]
jmp 0x50f25d
xor edi, edi
cmp esi, 0x20
lea esi, [edi + 0x18]
je 0x50f25d
mov esi, 0x20
mov dword [ebp - 0x288], esi
mov ecx, ebx
call fcn.00446840
mov ecx, dword [ebp - 0x284]
mov ebx, eax
mov dword [ebp - 0x2ac], ebx
call fcn.0041d290
movzx edx, si
imul edx, ebx
mov dword [ebp - 0x28c], eax
mov eax, edx
and eax, reloc.jpeg62.dll_Ordinal_31
jns 0x50f297
dec eax
or eax, 0xffffffe0
inc eax
mov ecx, 0x20
mov ebx, 0x100
sub ecx, eax
neg eax
sbb eax, eax
and eax, ecx
mov ecx, dword [ebp - 0x28c]
add eax, edx
cdq
and edx, 7
add eax, edx
sar eax, 3
cmp ecx, ebx
mov dword [ebp - 0x2a8], eax
cmovl ebx, ecx
imul ebx, eax
mov eax, ecx
cdq
and edx, 0xff
add eax, edx
and eax, 0xffffff00
mov dword [ebp - 0x2a4], ebx
and ecx, 0x800000ff
jns 0x50f2f0
dec ecx
or ecx, 0xffffff00
add ecx, 1
lea esi, [eax - 0x100]
mov ecx, dword [ebp - 0x290]
cmovne esi, eax
mov dword [ebp - 0x11e], 0
mov eax, 0x4d42
mov dword [ebp - 0x2a0], esi
mov word [ebp - 0x124], ax
lea eax, [edi*4 + 0x36]
mov dword [ebp - 0x11a], eax
mov eax, dword [ebp - 0x2a8]
imul eax, dword [ebp - 0x28c]
push 0xe
lea eax, [eax + edi*4]
add eax, 0x36
mov dword [ebp - 0x122], eax
lea eax, [ebp - 0x124]
push eax
call fcn.00525310
mov ecx, dword [ebp - 0x284]
xorps xmm0, xmm0
movlpd qword [ebp - 0x14c], xmm0
mov dword [ebp - 0x144], 0
mov dword [ebp - 0x138], 0
mov dword [ebp - 0x15c], 0x28
call fcn.00446840
mov ecx, dword [ebp - 0x284]
mov dword [ebp - 0x158], eax
call fcn.0041d290
mov ecx, dword [ebp - 0x288]
mov dword [ebp - 0x154], eax
mov eax, 1
mov word [ebp - 0x14e], cx
mov ecx, dword [ebp - 0x284]
mov word [ebp - 0x150], ax
call fcn.0050fec0
mov ecx, dword [ebp - 0x290]
fstp qword [ebp - 0x2c4]
movsd xmm0, qword [ebp - 0x2c4]
mulsd xmm0, qword [0x665a68]
push 0x28
mov dword [ebp - 0x13c], edi
mulsd xmm0, qword [0x665a78]
cvttsd2si eax, xmm0
mov dword [ebp - 0x144], eax
mov dword [ebp - 0x140], eax
lea eax, [ebp - 0x15c]
push eax
call fcn.00525310
test edi, edi
je 0x50f459
mov byte [ebp - 0x271], 0
lea ebx, [edi - 1]
xor esi, esi
cmp esi, edi
jae 0x50f44d
imul eax, esi, 0xff
xor edx, edx
mov ecx, dword [ebp - 0x290]
push 4
div ebx
mov byte [ebp - 0x274], al
mov byte [ebp - 0x273], al
mov byte [ebp - 0x272], al
lea eax, [ebp - 0x274]
push eax
call fcn.00525310
inc esi
jmp 0x50f416
mov ebx, dword [ebp - 0x2a4]
mov esi, dword [ebp - 0x2a0]
lea ecx, [ebp - 0x178]
call fcn.00524180
push ebx
lea ecx, [ebp - 0x178]
mov byte [ebp - 4], 1
call fcn.00524c30
lea ecx, [ebp - 0x178]
call fcn.00524490
mov ecx, dword [ebp - 0x284]
mov dword [ebp - 0x2b8], eax
call fcn.004471e0
push eax
lea ecx, [ebp - 0x270]
call fcn.0057e300
mov eax, dword [ebp - 0x28c]
lea ecx, [ebp - 0x270]
mov edi, dword [ebp - 0x2ac]
mov dword [ebp - 0x128], eax
lea eax, [ebp - 0x134]
push eax
push 0
mov byte [ebp - 4], 2
mov dword [ebp - 0x134], 0
mov dword [ebp - 0x130], 0
mov dword [ebp - 0x12c], edi
call fcn.0057e5f0
mov ecx, dword [ebp - 0x28c]
mov ebx, 0x100
mov eax, ecx
cdq
idiv ebx
test edx, edx
lea ebx, [eax + 1]
cmove ebx, eax
mov eax, edi
mov dword [ebp - 0x2c8], ebx
mov ebx, 0x100
cdq
idiv ebx
mov edi, dword [ebp - 0x284]
test edx, edx
lea ebx, [eax + 1]
cmove ebx, eax
xor eax, eax
mov dword [ebp - 0x2c0], ebx
mov dword [ebp - 0x2a4], eax
cmp eax, dword [ebp - 0x2c8]
jge 0x50f979
mov edi, dword [ebp - 0x2a8]
lea eax, [esi + 0x100]
cmp eax, ecx
cmovg eax, ecx
neg edi
sub eax, esi
mov dword [ebp - 0x278], edi
mov dword [ebp - 0x274], eax
lea ecx, [eax - 1]
imul ecx, dword [ebp - 0x2a8]
add ecx, dword [ebp - 0x2b8]
mov dword [ebp - 0x2cc], ecx
xor ecx, ecx
xor edx, edx
mov dword [ebp - 0x2b4], edx
mov dword [ebp - 0x2b0], ecx
cmp edx, ebx
jge 0x50f92a
mov eax, dword [ebp - 0x288]
lea ebx, [ecx + 0x100]
cmp ebx, dword [ebp - 0x2ac]
push dword [ebp - 0x2a0]
cmovg ebx, dword [ebp - 0x2ac]
movzx eax, ax
sub ebx, ecx
imul eax, ecx
push ecx
lea ecx, [ebp - 0x270]
cdq
and edx, 7
lea esi, [edx + eax]
sar esi, 3
add esi, dword [ebp - 0x2cc]
call fcn.0057e5d0
mov ecx, dword [ebp - 0x288]
movzx eax, cx
dec eax
cmp eax, 0x1f
ja case.0x50f5dc.2
movzx eax, byte [eax + 0x50f9f8]
jmp dword [eax*4 + 0x50f9e4]
lea ecx, [ebp - 0x270]
call fcn.00446840
mov edi, eax
mov dword [ebp - 0x29c], edi
test edi, edi
je 0x50f71c
lea ecx, [ebp - 0x270]
call fcn.0057e5b0
lea ecx, [ebp - 0x270]
mov dword [ebp - 0x294], eax
call fcn.0041d290
lea ecx, [ebp - 0x270]
mov dword [ebp - 0x27c], eax
call fcn.004ad4e0
mov dword [ebp - 0x298], eax
mov eax, dword [ebp - 0x274]
test eax, eax
jle 0x50f91f
mov ecx, dword [ebp - 0x27c]
mov dword [ebp - 0x280], eax
mov eax, dword [ebp - 0x278]
xor edx, edx
test ebx, ebx
jle 0x50f6cb
mov eax, dword [ebp - 0x27c]
lea ecx, [esi + 2]
mov edi, eax
sub eax, esi
mov dword [ebp - 0x2d0], eax
nop word [eax + eax]
mov eax, dword [ebp - 0x29c]
cmp byte [edx + eax], 0
je 0x50f6a0
movzx eax, byte [edi]
mov byte [ecx - 2], al
movzx eax, byte [edi + 1]
mov byte [ecx - 1], al
mov eax, dword [ebp - 0x2d0]
movzx eax, byte [eax + ecx]
mov byte [ecx], al
mov eax, dword [ebp - 0x29c]
mov al, byte [edx + eax]
jmp 0x50f6ab
mov word [ecx - 2], 0xffff
xor al, al
mov byte [ecx], 0xff
mov byte [ecx + 1], al
inc edx
add ecx, 4
add edi, 4
cmp edx, ebx
jl 0x50f670
mov edi, dword [ebp - 0x29c]
mov eax, dword [ebp - 0x278]
mov ecx, dword [ebp - 0x27c]
add edi, dword [ebp - 0x294]
add esi, eax
add ecx, dword [ebp - 0x298]
sub dword [ebp - 0x280], 1
mov dword [ebp - 0x29c], edi
mov dword [ebp - 0x27c], ecx
jne 0x50f651
mov edi, dword [ebp - 0x278]
mov eax, dword [ebp - 0x274]
mov ecx, dword [ebp - 0x2b0]
mov edx, dword [ebp - 0x2b4]
add ecx, 0x100
mov ebx, dword [ebp - 0x2c0]
inc edx
jmp 0x50f56b
mov eax, dword [ebp - 0x274]
mov edi, dword [ebp - 0x278]
shl ebx, 2
test eax, eax
jle 0x50f6fe
add esi, 2
mov edx, eax
test ebx, ebx
jle 0x50f750
lea ecx, [ebx - 1]
mov eax, esi
shr ecx, 2
inc ecx
mov dword [eax - 2], 0xffffff
lea eax, [eax + 4]
sub ecx, 1
jne 0x50f741
add esi, edi
sub edx, 1
jne 0x50f734
jmp case.0x50f5dc.2
push dword [ebp - 0x274]
mov ecx, dword [ebp - 0x2d4]
lea eax, [ebp - 0x270]
push ebx
push edi
push eax
push esi
call fcn.0050f050
jmp case.0x50f5dc.2
lea ecx, [ebp - 0x270]
call fcn.00446840
mov edi, eax
test edi, edi
je 0x50f800
lea ecx, [ebp - 0x270]
call fcn.0057e5b0
lea ecx, [ebp - 0x270]
mov dword [ebp - 0x298], eax
call fcn.0041d290
lea ecx, [ebp - 0x270]
mov dword [ebp - 0x27c], eax
call fcn.004ad4e0
mov dword [ebp - 0x294], eax
xor eax, eax
mov dword [ebp - 0x280], eax
cmp eax, dword [ebp - 0x274]
jge 0x50f6f2
push ebx
push edi
push dword [ebp - 0x27c]
push esi
call fcn.00505aa0
mov eax, dword [ebp - 0x294]
add esp, 0x10
add dword [ebp - 0x27c], eax
mov eax, dword [ebp - 0x280]
add edi, dword [ebp - 0x298]
add esi, dword [ebp - 0x278]
inc eax
jmp 0x50f7bc
xor edi, edi
mov eax, dword [ebp - 0x274]
cmp edi, eax
jge 0x50f91f
push ebx
push 0xff
push esi
call fcn.005051f0
add esi, dword [ebp - 0x278]
add esp, 0xc
inc edi
jmp 0x50f802
lea ecx, [ebp - 0x270]
call fcn.00446840
mov edi, eax
test edi, edi
je 0x50f8e3
lea ecx, [ebp - 0x270]
call fcn.0057e5b0
lea ecx, [ebp - 0x270]
mov dword [ebp - 0x298], eax
call fcn.0041d290
lea ecx, [ebp - 0x270]
mov dword [ebp - 0x27c], eax
call fcn.004ad4e0
push 0x100
mov dword [ebp - 0x294], eax
lea eax, [ebp - 0x114]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
xor eax, eax
mov dword [ebp - 0x280], eax
cmp eax, dword [ebp - 0x274]
jge 0x50f6f2
push ebx
push edi
push dword [ebp - 0x27c]
lea eax, [ebp - 0x114]
push eax
call fcn.00505aa0
add esp, 0x10
lea eax, [ebp - 0x114]
push ebx
push eax
push esi
call fcn.00505a10
mov eax, dword [ebp - 0x294]
add esp, 0xc
add dword [ebp - 0x27c], eax
mov eax, dword [ebp - 0x280]
add edi, dword [ebp - 0x298]
add esi, dword [ebp - 0x278]
inc eax
jmp 0x50f888
lea eax, [ebx + 7]
cdq
and edx, 7
lea ebx, [edx + eax]
mov eax, dword [ebp - 0x274]
sar ebx, 3
test eax, eax
jle 0x50f91f
mov edi, eax
nop dword [eax]
push ebx
push 0xff
push esi
call sub.VCRUNTIME140.dll_memset
add esi, dword [ebp - 0x278]
add esp, 0xc
sub edi, 1
jne 0x50f900
jmp 0x50f6f2
mov edi, dword [ebp - 0x278]
jmp 0x50f6fe
imul eax, dword [ebp - 0x2a8]
mov ecx, dword [ebp - 0x290]
push eax
mov eax, dword [ebp - 0x2b8]
push eax
call fcn.00525310
mov esi, dword [ebp - 0x2a0]
mov edi, dword [ebp - 0x284]
sub esi, 0x100
mov ecx, edi
mov dword [ebp - 0x2a0], esi
call fcn.0050fc30
test eax, eax
je 0x50f979
mov eax, dword [ebp - 0x2a4]
mov ecx, dword [ebp - 0x28c]
inc eax
jmp 0x50f51e
mov ebx, dword [ebp - 0x290]
mov ecx, ebx
call fcn.00525140
mov ecx, ebx
call fcn.005251c0
sub eax, dword [ebp - 0x2bc]
mov ecx, edi
push eax
mov dword [ebp - 0x2c0], edx
call fcn.00470180
lea ecx, [ebp - 0x270]
call fcn.0057e360
lea ecx, [ebp - 0x178]
call fcn.005241b0
mov eax, 1
jmp 0x50f9c6
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.005a4e1e
mov esp, ebp
pop ebp
ret 4