Function at 0x431c20
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov eax, dword [esp + 0x18]
mov ecx, dword [0x520f20]
sub esp, 0x28
test eax, eax
push ebx
push ebp
push esi
push edi
jge 0x431c4b
mov eax, ecx
mov dword [esp + 0x24], 0x52
neg eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], eax
jmp 0x431c5b
mov dword [esp + 0x20], ecx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x24], 0x50
lea eax, [ecx*4]
mov ebp, dword [esp + 0x44]
and eax, 0x3ff
shl ecx, 3
mov eax, dword [eax*4 + 0x573b20]
and ecx, 0x3ff
cdq
and edx, 0x1fff
add eax, edx
mov ebx, eax
mov eax, dword [ecx*4 + 0x573b20]
cdq
mov ecx, dword [esp + 0x4c]
and edx, 0x3ff
add eax, edx
sar eax, 0xa
add eax, 0x50
shl ecx, 8
mov dword [esp + 0x30], eax
mov eax, ecx
cdq
idiv ebp
sar ebx, 0xd
add ebx, 0x28
mov dword [esp + 0x50], ebx
mov edi, eax
mov eax, ecx
cdq
idiv dword [esp + 0x48]
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x2c], edi
lea edx, [edi + ecx]
test edx, edx
mov dword [esp + 0x14], eax
jl 0x431f00
mov esi, ecx
sub esi, edi
cmp esi, dword [0x58bb9c]
jg 0x431f00
mov esi, dword [esp + 0x40]
add esi, eax
test esi, esi
mov dword [esp + 0x28], esi
jl 0x431f00
mov esi, dword [esp + 0x40]
sub esi, eax
mov eax, dword [0x58bb98]
cmp esi, eax
jg 0x431f00
mov eax, edi
neg eax
mov dword [esp + 0x44], eax
lea esi, [eax + ecx]
test esi, esi
jge 0x431d20
neg ecx
mov dword [esp + 0x44], ecx
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 0x40]
neg ecx
add esi, ecx
mov dword [esp + 0x10], ecx
test esi, esi
jge 0x431d3e
mov ecx, dword [esp + 0x40]
neg ecx
mov dword [esp + 0x10], ecx
mov esi, dword [0x58bb9c]
mov dword [esp + 0x18], edi
cmp edx, esi
jle 0x431d54
sub esi, dword [esp + 0x3c]
mov dword [esp + 0x18], esi
mov esi, dword [esp + 0x28]
mov edx, dword [esp + 0x14]
cmp esi, dword [0x58bb98]
mov dword [esp + 0x14], edx
jle 0x431d78
mov edx, dword [0x58bb98]
mov esi, dword [esp + 0x40]
sub edx, esi
mov dword [esp + 0x14], edx
cmp eax, edi
jge 0x431dbd
mov esi, eax
lea ecx, [edi + eax]
imul esi, ebp
shl ecx, 2
sub edi, eax
mov eax, esi
add ecx, 4
cdq
and edx, 0xff
add esi, ebp
add eax, edx
sar eax, 8
mov edx, eax
imul edx, eax
imul eax, ebx
shl eax, 1
mov dword [ecx + 0x4a01f4], edx
mov dword [ecx + 0x4a03f4], eax
dec edi
jne 0x431d89
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x4c]
mov ebp, dword [esp + 0x3c]
imul eax, eax
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x40]
mov esi, dword [0x58bba4]
lea edi, [ecx + eax]
mov eax, dword [esp + 0x44]
imul edi, dword [0x58bba0]
add edi, eax
add edi, ebp
add edi, esi
cmp ecx, edx
mov dword [esp + 0x40], edi
jge 0x431f00
mov esi, ecx
imul esi, dword [esp + 0x48]
sub edx, ecx
mov dword [esp + 0x3c], esi
mov dword [esp + 0x4c], edx
mov eax, esi
mov ecx, dword [esp + 0x18]
cdq
and edx, 0xff
add eax, edx
sar eax, 8
mov ebp, eax
imul ebp, eax
imul eax, ebx
shl eax, 1
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x44]
cmp eax, ecx
jge 0x431edb
mov edx, dword [esp + 0x2c]
mov ebx, edi
lea esi, [eax + edx]
shl esi, 2
sub eax, edi
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x28]
mov edx, dword [esi + 0x4a01f8]
mov edi, dword [esi + 0x4a03f8]
sub eax, edx
sub eax, ebp
js 0x431eb9
mov ecx, dword [eax*4 + 0x502360]
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x14]
add ecx, edx
cdq
idiv ecx
mov edx, eax
mov eax, dword [esp + 0x1c]
add edx, eax
mov eax, edi
and edx, 0x7f
mov edi, dword [esp + 0x20]
shl edx, 7
mov dword [esp + 0x10], edx
cdq
idiv ecx
mov edx, dword [esp + 0x10]
xor ecx, ecx
add eax, edi
and eax, 0x7f
mov cl, byte [edx + eax + 0x5676a0]
mov eax, ecx
cmp eax, 4
jge 0x431eb9
mov ecx, dword [esp + 0x24]
add ecx, eax
shl ecx, 8
xor edx, edx
mov dl, byte [ebx]
mov al, byte [ecx + edx + 0x557680]
mov byte [ebx], al
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x18]
add esi, 4
inc ebx
add ecx, ebx
cmp ecx, eax
jl 0x431e45
mov ebx, dword [esp + 0x50]
mov esi, dword [esp + 0x3c]
mov edi, dword [esp + 0x40]
mov edx, dword [0x58bba0]
mov ecx, dword [esp + 0x48]
mov eax, dword [esp + 0x4c]
add edi, edx
add esi, ecx
dec eax
mov dword [esp + 0x40], edi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x4c], eax
jne 0x431e07
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret