Function at 0x4772e0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0xb34
mov ecx, dword [esp + 0xb48]
push ebx
shl ecx, 8
mov eax, ecx
push ebp
cdq
idiv dword [esp + 0xb48]
push esi
push edi
mov ebp, eax
mov eax, ecx
cdq
idiv dword [esp + 0xb54]
mov ecx, dword [esp + 0xb48]
mov dword [esp + 0x30], ebp
mov edx, eax
lea eax, [ebp + ecx]
test eax, eax
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], eax
jl 0x47783a
mov eax, dword [0x60879c]
sub ecx, ebp
cmp ecx, eax
jge 0x47783a
mov ecx, dword [esp + 0xb4c]
lea eax, [edx + ecx]
test eax, eax
mov dword [esp + 0x18], eax
jl 0x47783a
mov eax, dword [0x608798]
sub ecx, edx
cmp ecx, eax
jge 0x47783a
mov eax, dword [0x58a5a0]
mov esi, dword [esp + 0xb5c]
mov ecx, eax
shr ecx, 2
test esi, esi
jge 0x477394
neg ecx
mov dword [esp + 0x38], ecx
lea ebx, [eax + 0x10]
mov ecx, eax
and ebx, 0xff
and ecx, 0x3ff
lea edx, [eax*4 + 0x100]
jmp 0x4773b3
mov dword [esp + 0x38], ecx
mov ebx, eax
lea ecx, [eax*4]
and ebx, 0xff
and ecx, 0x3ff
lea edx, [eax + 0x100]
mov eax, dword [ecx*4 + 0x4ca918]
and edx, 0x3ff
mov ecx, 0x40
mov edi, dword [edx*4 + 0x4ca918]
add eax, edi
lea edi, [esp + 0x44]
cdq
and edx, 0xfff
add eax, edx
sar eax, 0xc
add eax, 0x32
mov dword [esp + 0x34], eax
xor eax, eax
test esi, esi
rep stosd dword es:[edi], eax
jge 0x477436
mov esi, 2
lea edi, [ebx - 2]
mov ecx, esi
sub ecx, ebx
test ecx, ecx
jg 0x4773ff
mov ecx, edi
and ecx, 0x7f
cmp ecx, 0x40
jle 0x477410
mov eax, 0x80
sub eax, ecx
mov ecx, eax
cmp ecx, 0xf
jge 0x47742a
mov eax, 0x55555556
imul ecx
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
add dl, 0x2a
mov byte [esp + esi + 0x44], dl
inc esi
dec edi
cmp esi, 0x100
jl 0x4773f5
jmp 0x477473
mov ecx, 2
lea esi, [ebx - 2]
mov eax, ecx
sub eax, ebx
test eax, eax
jg 0x477448
mov eax, esi
and eax, 0x7f
cmp eax, 0x40
jle 0x477459
mov edx, 0x80
sub edx, eax
mov eax, edx
cmp eax, 0xe
jge 0x477469
cdq
sub eax, edx
sar eax, 1
add al, 0x28
mov byte [esp + ecx + 0x44], al
inc ecx
dec esi
cmp ecx, 0x100
jl 0x47743e
mov ecx, dword [esp + 0xb48]
mov eax, ebp
neg eax
mov ebx, eax
mov dword [esp + 0x2c], ebx
lea edx, [ebx + ecx]
test edx, edx
jge 0x477493
neg ecx
mov dword [esp + 0x2c], ecx
mov ebx, ecx
mov ebp, dword [esp + 0x10]
mov edx, dword [esp + 0xb4c]
neg ebp
lea ecx, [ebp + edx]
test ecx, ecx
jge 0x4774ac
mov ebp, edx
neg ebp
mov ecx, dword [0x60879c]
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x30]
cmp esi, ecx
mov dword [esp + 0x28], edi
jl 0x4774cd
sub ecx, dword [esp + 0xb48]
mov dword [esp + 0x28], ecx
mov esi, dword [0x608798]
mov ecx, dword [esp + 0x10]
cmp dword [esp + 0x18], esi
mov dword [esp + 0x10], ecx
jl 0x4774e9
sub esi, edx
mov dword [esp + 0x10], esi
mov ecx, esi
cmp eax, edi
jge 0x47753d
mov esi, eax
lea ecx, [edi + eax]
imul esi, dword [esp + 0xb50]
shl ecx, 2
sub edi, eax
mov eax, esi
add ecx, 4
cdq
and edx, 0xff
add eax, edx
sar eax, 8
mov edx, eax
imul edx, eax
mov dword [esp + ecx + 0x740], edx
mov edx, dword [esp + 0xb50]
shl eax, 6
mov dword [esp + ecx + 0x340], eax
add esi, edx
dec edi
jne 0x4774ff
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0xb4c]
mov eax, dword [esp + 0xb58]
imul eax, eax
mov dword [esp + 0x3c], eax
mov eax, dword [0x608764]
cmp eax, 8
jne 0x477674
add edx, ebp
mov edi, dword [esp + 0xb48]
imul edx, dword [0x6087a0]
mov esi, dword [0x6087a4]
add edx, ebx
add edx, edi
add edx, esi
cmp ebp, ecx
mov dword [esp + 0x24], edx
jge 0x47783a
mov esi, ebp
imul esi, dword [esp + 0xb54]
sub ecx, ebp
mov dword [esp + 0x20], esi
mov dword [esp + 0x1c], ecx
mov eax, esi
sar eax, 8
mov ebp, eax
imul ebp, eax
shl eax, 6
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x28]
cmp ebx, eax
jge 0x477641
mov eax, dword [esp + 0x30]
lea esi, [ebx + eax]
mov eax, edx
shl esi, 2
sub eax, ebx
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x3c]
mov edx, dword [esp + esi + 0x744]
mov edi, dword [esp + esi + 0x344]
sub eax, edx
sub eax, ebp
js 0x477629
mov edx, dword [esp + 0x34]
xor ecx, ecx
mov cl, byte [eax + 0x4cb918]
mov eax, dword [esp + 0x10]
add ecx, edx
cdq
idiv ecx
mov edx, eax
mov eax, dword [esp + 0x38]
add edx, eax
mov eax, edi
and edx, 0x7f
shl edx, 7
mov dword [esp + 0x14], edx
cdq
idiv ecx
mov edx, dword [esp + 0x14]
xor ecx, ecx
and eax, 0x7f
mov cl, byte [edx + eax + 0x5cc120]
xor eax, eax
mov al, byte [esp + ecx + 0x44]
test eax, eax
je 0x477629
mov ecx, dword [esp + 0x18]
mov byte [ebx + ecx], al
mov eax, dword [esp + 0x28]
inc ebx
add esi, 4
cmp ebx, eax
jl 0x4775c4
mov ebx, dword [esp + 0x2c]
mov edx, dword [esp + 0x24]
mov esi, dword [esp + 0x20]
mov edi, dword [0x6087a0]
mov ecx, dword [esp + 0xb54]
mov eax, dword [esp + 0x1c]
add edx, edi
add esi, ecx
dec eax
mov dword [esp + 0x24], edx
mov dword [esp + 0x20], esi
mov dword [esp + 0x1c], eax
jne 0x477595
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xb34
ret
add edx, ebp
mov eax, dword [esp + 0xb48]
imul edx, dword [0x6087a0]
mov ecx, dword [0x6087a4]
add ebx, eax
add ecx, edx
mov edi, 1
mov edx, 1
lea esi, [esp + 0x144]
lea ebx, [ecx + ebx*2]
mov ecx, dword [0x4d4b84]
shl edi, cl
mov ecx, dword [0x4d4b90]
mov dword [esp + 0x24], ebx
shl edx, cl
or edi, edx
xor edx, edx
mov cl, byte [esp + edx + 0x44]
test cl, cl
jne 0x4776c6
mov eax, edi
jmp 0x4776d6
and ecx, 0xff
xor eax, eax
mov ax, word [ecx*2 + 0x5a4540]
mov word [esi], ax
inc edx
add esi, 2
cmp edx, 0x100
jl 0x4776ba
mov eax, dword [esp + 0x10]
cmp ebp, eax
jge 0x47783a
mov ecx, ebp
imul ecx, dword [esp + 0xb54]
sub eax, ebp
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], eax
mov eax, ecx
mov esi, dword [esp + 0x28]
sar eax, 8
mov edx, eax
mov edi, ebx
imul edx, eax
shl eax, 6
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x2c]
cmp eax, esi
mov dword [esp + 0x40], edx
jge 0x477812
mov ecx, dword [esp + 0x30]
add ecx, eax
shl ecx, 2
sub esi, eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], esi
mov eax, dword [esp + 0x3c]
mov ebp, dword [esp + ecx + 0x744]
mov esi, dword [esp + ecx + 0x344]
sub eax, ebp
sub eax, edx
js 0x4777f1
mov edx, dword [esp + 0x34]
xor ecx, ecx
mov cl, byte [eax + 0x4cb918]
mov eax, dword [esp + 0x10]
add ecx, edx
cdq
idiv ecx
mov ebx, eax
mov eax, dword [esp + 0x38]
add ebx, eax
mov eax, esi
cdq
idiv ecx
and ebx, 0x7f
mov esi, dword [0x4d4b98]
shl ebx, 7
xor edx, edx
and eax, 0x7f
mov dl, byte [ebx + eax + 0x5cc120]
xor eax, eax
mov ebx, esi
mov ax, word [esp + edx*2 + 0x144]
mov dx, word [edi]
and edx, 0xffff
mov ecx, eax
and ecx, esi
and ebx, edx
add ecx, ebx
cmp ecx, esi
jbe 0x4777b8
mov ecx, esi
mov ebx, dword [0x4d4b8c]
mov esi, eax
mov ebp, ebx
and esi, ebx
and ebp, edx
add esi, ebp
cmp esi, ebx
jbe 0x4777ce
mov esi, ebx
mov ebx, dword [0x4d4b80]
mov ebp, ebx
and eax, ebx
and ebp, edx
add eax, ebp
cmp eax, ebx
jbe 0x4777e2
mov eax, ebx
mov edx, dword [esp + 0x40]
or eax, esi
or eax, ecx
mov ecx, dword [esp + 0x1c]
mov word [edi], ax
mov eax, dword [esp + 0x20]
add edi, 2
add ecx, 4
dec eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], eax
jne 0x47773f
mov ecx, dword [esp + 0x18]
mov ebx, dword [esp + 0x24]
mov esi, dword [0x6087a0]
mov edx, dword [esp + 0xb54]
mov eax, dword [esp + 0x14]
add ebx, esi
add ecx, edx
dec eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], eax
jne 0x477705
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xb34
ret