Function at 0x431880
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0x38
mov ecx, dword [esp + 0x4c]
push ebx
mov ebx, dword [esp + 0x48]
push ebp
shl ecx, 8
mov eax, ecx
push esi
cdq
idiv ebx
push edi
mov ebp, eax
mov eax, ecx
cdq
idiv dword [esp + 0x58]
mov edx, ebp
mov dword [esp + 0x30], ebp
neg edx
cmp edx, ebp
mov dword [esp + 0x20], edx
mov dword [esp + 0x18], eax
jge 0x4318fa
mov esi, edx
lea ecx, [ebp + edx]
mov edi, ebp
imul esi, ebx
shl ecx, 2
sub edi, edx
mov eax, esi
add ecx, 4
cdq
and edx, 0xff
add esi, ebx
add eax, edx
sar eax, 8
mov edx, eax
imul edx, eax
imul eax, dword [esp + 0x60]
shl eax, 1
mov dword [ecx + 0x4a01f4], edx
mov dword [ecx + 0x4a03f4], eax
dec edi
jne 0x4318c4
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x18]
test ebp, ebp
jle 0x431900
mov edx, ebp
mov ecx, dword [esp + 0x4c]
lea esi, [edx + edx]
mov dword [esp + 0x54], esi
lea edx, [ebp + ecx]
test edx, edx
jl 0x431c10
mov edx, dword [0x58bb9c]
sub ecx, ebp
cmp ecx, edx
mov dword [esp + 0x1c], ecx
jg 0x431c10
mov ebx, dword [esp + 0x50]
lea edi, [eax + ebx]
test edi, edi
mov dword [esp + 0x10], edi
jl 0x431c10
sub ebx, eax
mov eax, dword [0x58bb98]
cmp ebx, eax
mov dword [esp + 0x40], ebx
jg 0x431c10
mov eax, dword [esp + 0x5c]
push 0x4000
imul eax, eax
push 0
mov dword [esp + 0x40], eax
call fcn.00465ac0
mov edx, dword [esp + 0x20]
add esp, 8
mov ecx, edx
mov dword [esp + 0x44], eax
neg ecx
cmp ecx, edx
mov dword [esp + 0x28], eax
mov dword [esp + 0x14], ecx
jge 0x431ae8
imul ecx, dword [esp + 0x58]
mov dword [esp + 0x34], ecx
mov eax, ecx
mov edi, dword [esp + 0x20]
cdq
and edx, 0xff
add eax, edx
sar eax, 8
mov ebx, eax
imul ebx, eax
imul eax, dword [esp + 0x60]
shl eax, 1
cmp edi, ebp
mov dword [esp + 0x3c], eax
jge 0x431abd
add ebp, edi
shl ebp, 2
mov dword [esp + 0x2c], ebp
mov eax, dword [ebp + 0x4a03f8]
mov ebp, dword [ebp + 0x4a01f8]
mov ecx, dword [esp + 0x38]
sub ecx, ebp
sub ecx, ebx
js 0x431a05
mov ecx, dword [ecx*4 + 0x502360]
mov esi, dword [esp + 0x60]
cdq
add ecx, esi
idiv ecx
mov edx, dword [esp + 0x4c]
mov esi, eax
mov eax, dword [esp + 0x3c]
add esi, edx
cdq
idiv ecx
mov ecx, dword [esp + 0x50]
add eax, ecx
mov ecx, 1
jmp 0x431a19
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x50]
lea esi, [edi + eax]
lea eax, [ecx + edx]
xor ecx, ecx
cmp esi, dword [0x58bb9c]
jae 0x431a8e
cmp eax, dword [0x58bb98]
jae 0x431a8e
imul eax, dword [0x58bba0]
mov edx, dword [0x58bba4]
add eax, esi
test ecx, ecx
mov al, byte [eax + edx]
mov byte [esp + 0x24], al
je 0x431a90
lea eax, [ebx + ebp]
xor edx, edx
mov ecx, dword [eax*4 + 0x502360]
mov eax, ecx
shl eax, 0x1c
sub eax, ecx
mov ecx, dword [esp + 0x5c]
add eax, ecx
shl eax, 4
div ecx
cmp eax, 0x10
jge 0x431a7c
mov ecx, dword [esp + 0x24]
shl eax, 8
and ecx, 0xff
mov al, byte [eax + ecx + 0x57e800]
jmp 0x431a90
mov edx, dword [esp + 0x24]
and edx, 0xff
mov al, byte [edx + 0x57f700]
jmp 0x431a90
xor al, al
mov ecx, dword [esp + 0x28]
mov ebp, dword [esp + 0x2c]
add ebp, 4
mov byte [ecx], al
mov eax, dword [esp + 0x30]
inc ecx
inc edi
cmp edi, eax
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], ebp
jl 0x4319c3
mov esi, dword [esp + 0x54]
mov ecx, dword [esp + 0x34]
mov ebp, eax
mov eax, dword [esp + 0x14]
mov edi, dword [esp + 0x58]
mov edx, dword [esp + 0x18]
inc eax
add ecx, edi
cmp eax, edx
mov dword [esp + 0x14], eax
mov dword [esp + 0x34], ecx
jl 0x431990
mov ebx, dword [esp + 0x40]
mov edi, dword [esp + 0x10]
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x1c]
test ecx, ecx
jge 0x431b53
mov edx, dword [0x58bba0]
mov ebp, dword [0x58bba4]
imul edx, ebx
add edx, ebp
cmp ebx, edi
jge 0x431c10
cmp ebx, dword [0x58bb98]
jge 0x431c10
test ebx, ebx
jl 0x431b3c
mov edi, dword [esp + 0x1c]
lea ecx, [edi + esi]
mov esi, eax
mov ebp, ecx
sub esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x54]
mov edi, dword [esp + 0x10]
mov ebp, dword [0x58bba0]
add eax, esi
add edx, ebp
inc ebx
cmp ebx, edi
jl 0x431b09
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret
mov ebp, dword [0x58bb9c]
lea edx, [ecx + esi]
cmp edx, ebp
mov edx, dword [0x58bba0]
jle 0x431bc8
imul edx, ebx
mov ebp, dword [0x58bba4]
add edx, ecx
add edx, ebp
cmp ebx, edi
jge 0x431c10
cmp ebx, dword [0x58bb98]
jge 0x431c10
test ebx, ebx
jl 0x431bb1
mov ecx, dword [0x58bb9c]
mov esi, dword [esp + 0x1c]
sub ecx, esi
mov esi, eax
mov ebp, ecx
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x54]
mov edi, dword [esp + 0x10]
mov ebp, dword [0x58bba0]
add eax, esi
add edx, ebp
inc ebx
cmp ebx, edi
jl 0x431b7b
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret
imul edx, ebx
mov ebp, dword [0x58bba4]
add edx, ecx
add edx, ebp
cmp ebx, edi
jge 0x431c10
cmp ebx, dword [0x58bb98]
jge 0x431c10
test ebx, ebx
jl 0x431c01
mov ecx, esi
mov esi, eax
mov ebp, ecx
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x54]
mov edi, dword [esp + 0x10]
mov ebp, dword [0x58bba0]
add eax, esi
add edx, ebp
inc ebx
cmp ebx, edi
jl 0x431bd9
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret