Function at 0x10045660
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xd0
mov eax, dword [0x100e41c4]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0xcc], eax
mov dword [ebp - 0xc8], edx
mov dword [ebp - 0xc0], edi
mov eax, dword [edi]
mov dword [eax + 8], 0
call fcn.10044d00
test eax, eax
je 0x10045b9c
mov eax, dword [edi]
mov ecx, dword [eax + 8]
mov dword [ebp - 0xb0], ecx
cmp ecx, 3
jne 0x100456d9
cmp dword [edi + 0x47ec], ecx
je 0x100456cd
cmp dword [edi + 0x47e8], 0
jne 0x100456d9
cmp dword [edi + 0x47e4], 0
jne 0x100456d9
mov dword [ebp - 0xb8], 1
jmp 0x100456e3
mov dword [ebp - 0xb8], 0
mov dword [ebp - 0xa0], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x18], xmm0
test ecx, ecx
jle 0x100457f7
lea ebx, [edi + 0x46a0]
lea esi, [ebp - 0x8c]
mov dword [ebp - 0xac], ebx
nop
mov eax, dword [eax]
add eax, 3
push eax
call fcn.10093c10
add esp, 4
mov dword [ebx + 0x34], eax
test eax, eax
je 0x10045b9c
mov eax, dword [edi + 0x4684]
cdq
idiv dword [ebx]
mov dword [esi + 0xc], 0
mov dword [ebp - 0xa4], eax
mov dword [esi - 4], eax
mov eax, dword [edi + 0x4688]
cdq
idiv dword [ebx + 4]
xor edx, edx
mov ebx, eax
mov eax, dword [edi]
mov ecx, ebx
mov dword [esi], ebx
sar ecx, 1
mov dword [esi + 8], ecx
mov ecx, dword [eax]
mov eax, dword [ebp - 0xa4]
dec eax
add eax, ecx
mov ecx, dword [ebp - 0xa4]
div ecx
mov dword [esi + 4], eax
mov eax, dword [ebp - 0xac]
mov eax, dword [eax + 0x28]
mov dword [esi - 8], eax
mov dword [esi - 0xc], eax
cmp ecx, 1
jne 0x100457a0
cmp ebx, ecx
jne 0x10045792
mov dword [esi - 0x10], 0x10044ee0
jmp 0x100457ca
cmp ebx, 2
jne 0x100457a0
mov dword [esi - 0x10], 0x10044ef0
jmp 0x100457ca
cmp ecx, 2
jne 0x100457c3
cmp ebx, 1
jne 0x100457b3
mov dword [esi - 0x10], 0x10044f40
jmp 0x100457ca
cmp ebx, 2
jne 0x100457c3
mov eax, dword [edi + 0x4814]
mov dword [esi - 0x10], eax
jmp 0x100457ca
mov dword [esi - 0x10], 0x10045290
mov eax, dword [ebp - 0xa0]
add esi, 0x20
mov ebx, dword [ebp - 0xac]
inc eax
add ebx, 0x48
mov dword [ebp - 0xa0], eax
cmp eax, dword [ebp - 0xb0]
mov eax, dword [edi]
mov dword [ebp - 0xac], ebx
jl 0x10045710
mov eax, dword [edi]
mov ecx, 4
push 1
mov ebx, dword [eax + 4]
mov esi, dword [eax]
mov edx, esi
push ebx
call fcn.10040340
add esp, 8
test eax, eax
je 0x10045b9c
imul esi, ebx
lea eax, [esi*4 + 1]
push eax
call fcn.10093c10
mov esi, eax
add esp, 4
mov dword [ebp - 0xbc], esi
test esi, esi
je 0x10045b9c
mov ecx, dword [edi]
xor edx, edx
mov dword [ebp - 0xac], edx
cmp dword [ecx + 4], edx
jbe 0x10045b5f
mov ebx, dword [ebp - 0x18]
mov eax, dword [ecx]
imul eax, edx
cmp dword [ebp - 0xb0], 0
mov dword [ebp - 0xa0], 0
lea ecx, [esi + eax*4]
mov dword [ebp - 0xa4], ecx
jle 0x10045913
lea eax, [edi + 0x46bc]
mov dword [ebp - 0xa8], eax
lea esi, [ebp - 0x84]
mov edi, eax
nop word [eax + eax]
mov eax, dword [esi - 8]
xor ecx, ecx
mov ebx, dword [esi - 0x10]
sar eax, 1
cmp dword [esi], eax
setge cl
test ecx, ecx
je 0x100458aa
mov eax, dword [esi - 0x14]
mov ecx, ebx
jmp 0x100458af
mov ecx, dword [esi - 0x14]
mov eax, ebx
push dword [esi - 0xc]
push dword [esi - 4]
push eax
push ecx
push dword [edi + 0x18]
call dword [esi - 0x18]
mov edx, dword [ebp - 0xa0]
add esp, 0x14
mov dword [ebp + edx*4 - 0x18], eax
mov eax, dword [esi]
inc eax
mov dword [esi], eax
cmp eax, dword [esi - 8]
jl 0x100458ef
inc dword [esi + 4]
mov eax, dword [esi + 4]
mov dword [esi], 0
mov dword [esi - 0x14], ebx
cmp eax, dword [edi]
jge 0x100458ef
mov eax, dword [edi + 4]
add eax, ebx
mov dword [esi - 0x10], eax
inc edx
add esi, 0x20
add edi, 0x48
mov dword [ebp - 0xa0], edx
cmp edx, dword [ebp - 0xb0]
jl 0x10045890
mov ebx, dword [ebp - 0x18]
mov edi, dword [ebp - 0xc0]
mov ecx, dword [ebp - 0xa4]
mov eax, dword [edi]
mov edx, dword [eax + 8]
cmp edx, 3
jne 0x100459a1
cmp dword [ebp - 0xb8], 0
je 0x10045985
xor esi, esi
cmp dword [eax], esi
jbe 0x10045b41
mov edx, dword [ebp - 0x14]
add ecx, 2
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0xa8], ebx
sub ebx, edx
sub eax, edx
mov dword [ebp - 0xa8], eax
nop dword [eax]
movzx eax, byte [ebx + edx]
lea ecx, [ecx + 4]
mov byte [ecx - 6], al
lea edx, [edx + 1]
movzx eax, byte [edx - 1]
inc esi
mov byte [ecx - 5], al
mov eax, dword [ebp - 0xa8]
movzx eax, byte [eax + edx - 1]
mov byte [ecx - 4], al
mov byte [ecx - 3], 0xff
mov eax, dword [edi]
cmp esi, dword [eax]
jb 0x10045950
mov ebx, dword [ebp - 0x18]
jmp 0x10045b41
push 4
push dword [eax]
mov eax, dword [edi + 0x4810]
push dword [ebp - 0x10]
push dword [ebp - 0x14]
push ebx
push ecx
call eax
add esp, 0x18
jmp 0x10045b41
cmp edx, 4
jne 0x10045b20
mov edx, dword [edi + 0x47e8]
test edx, edx
jne 0x10045a73
mov dword [ebp - 0xa0], edx
cmp dword [eax], edx
jbe 0x10045b41
mov eax, dword [ebp - 0xc]
lea esi, [ecx + 2]
mov ecx, dword [ebp - 0x14]
sub eax, ebx
sub ecx, ebx
mov dword [ebp - 0xa8], ebx
mov dword [ebp - 0xa4], ecx
mov ecx, dword [ebp - 0x10]
sub ecx, ebx
mov dword [ebp - 0xb4], eax
mov dword [ebp - 0xc4], ecx
mov al, byte [eax + ebx]
lea esi, [esi + 4]
movzx ecx, byte [ebx]
lea ebx, [ebx + 1]
movzx edx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [esi - 6], al
mov eax, dword [ebp - 0xa4]
movzx ecx, byte [eax + ebx - 1]
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [esi - 5], al
mov eax, dword [ebp - 0xc4]
movzx ecx, byte [eax + ebx - 1]
imul ecx, edx
mov byte [esi - 3], 0xff
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
mov ecx, dword [ebp - 0xa0]
shr eax, 8
inc ecx
mov byte [esi - 4], al
mov eax, dword [edi]
mov dword [ebp - 0xa0], ecx
cmp ecx, dword [eax]
mov eax, dword [ebp - 0xb4]
jb 0x100459f0
mov ebx, dword [ebp - 0x18]
jmp 0x10045b41
push 4
push dword [eax]
mov eax, dword [edi + 0x4810]
push dword [ebp - 0x10]
push dword [ebp - 0x14]
push ebx
push ecx
cmp edx, 2
jne 0x10045997
call eax
mov eax, dword [edi]
add esp, 0x18
mov dword [ebp - 0xb4], 0
cmp dword [eax], 0
jbe 0x10045b41
mov esi, dword [ebp - 0xa4]
mov ebx, dword [ebp - 0xb4]
add esi, 2
mov eax, dword [ebp - 0xc]
lea esi, [esi + 4]
mov al, byte [ebx + eax]
inc ebx
movzx edx, al
or al, 0xff
sub al, byte [esi - 6]
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [esi - 6], al
or al, 0xff
sub al, byte [esi - 5]
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [esi - 5], al
or al, 0xff
sub al, byte [esi - 4]
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [esi - 4], al
mov eax, dword [edi]
cmp ebx, dword [eax]
jb 0x10045ab7
mov ebx, dword [ebp - 0x18]
jmp 0x10045b41
xor edx, edx
cmp dword [eax], edx
jbe 0x10045b41
inc ecx
mov al, byte [edx + ebx]
lea ecx, [ecx + 4]
mov byte [ecx - 3], al
inc edx
mov byte [ecx - 4], al
mov byte [ecx - 5], al
mov byte [ecx - 2], 0xff
mov eax, dword [edi]
cmp edx, dword [eax]
jb 0x10045b27
mov edx, dword [ebp - 0xac]
mov ecx, dword [edi]
inc edx
mov esi, dword [ebp - 0xbc]
mov dword [ebp - 0xac], edx
cmp edx, dword [ecx + 4]
jb 0x10045851
mov edx, dword [edi]
mov ecx, edi
push 0
mov edx, dword [edx + 8]
call fcn.100446d0
mov eax, dword [edi]
add esp, 4
mov ecx, dword [ebp - 0xc8]
mov eax, dword [eax]
mov dword [ecx], eax
mov eax, dword [edi]
mov ecx, dword [ebp - 0xcc]
mov eax, dword [eax + 4]
mov dword [ecx], eax
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.1008d9f1
mov esp, ebp
pop ebp
ret
mov edx, dword [edi]
mov ecx, edi
push 0
mov edx, dword [edx + 8]
call fcn.100446d0
mov ecx, dword [ebp - 8]
add esp, 4
xor ecx, ebp
xor eax, eax
pop edi
pop esi
pop ebx
call fcn.1008d9f1
mov esp, ebp
pop ebp
ret