Function at 0x4be790
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff40
push ebx
push esi
push edi
mov esi, dword [ebp + 0x10]
lea edi, [ebp - 0xbc]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, edx
lea edi, [ebp - 0xac]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
mov ebx, dword [ebp + 0xc]
lea edi, [ebp - 0x6c]
lea eax, [ebp - 0xac]
push eax
call fcn.0040a3f0
test eax, eax
jne 0x4bf170
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x30]
cmp eax, dword [ebp - 0xa4]
jge 0x4be7f3
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x30]
mov dword [ebp - 0xa4], eax
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x24]
cmp eax, dword [ebp - 0xa0]
jge 0x4be811
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x24]
mov dword [ebp - 0xa0], eax
cmp dword [ebp - 0xac], 0
jge 0x4be822
xor eax, eax
mov dword [ebp - 0xac], eax
cmp dword [ebp - 0xa8], 0
jge 0x4be833
xor eax, eax
mov dword [ebp - 0xa8], eax
movzx eax, byte [ebp + 8]
mov byte [edi + 3], al
movzx eax, byte [ebp + 8]
mov byte [ebp - 0x71], al
lea eax, [ebp - 0xbc]
push eax
call fcn.0040a3f0
test eax, eax
je 0x4be874
mov eax, dword [ebp + 0x14]
mov edx, dword [eax]
call dword [edx + 0x24]
push eax
lea eax, [ebp - 0xbc]
push eax
mov eax, dword [ebp + 0x14]
mov edx, dword [eax]
call dword [edx + 0x30]
mov ecx, eax
xor edx, edx
xor eax, eax
call fcn.00422bf8
lea eax, [ebp - 0xbc]
mov dl, 1
call fcn.00570fe4
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0xbc]
mov dl, 1
call fcn.00570ff8
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 0x14]
mov edx, dword [eax]
call dword [edx + 0x24]
dec eax
mov edx, dword [ebp - 0xb8]
add edx, dword [ebp - 0x30]
cmp eax, edx
jge 0x4be8bc
mov eax, dword [ebp + 0x14]
mov edx, dword [eax]
call dword [edx + 0x24]
dec eax
sub eax, dword [ebp - 0xb8]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 0x14]
mov edx, dword [eax]
call dword [edx + 0x30]
dec eax
mov edx, dword [ebp - 0xbc]
add edx, dword [ebp - 0x2c]
cmp eax, edx
jge 0x4be8e4
mov eax, dword [ebp + 0x14]
mov edx, dword [eax]
call dword [edx + 0x30]
dec eax
sub eax, dword [ebp - 0xbc]
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x30], 0
jl 0x4bf170
cmp dword [ebp - 0x2c], 0
jl 0x4bf170
mov eax, dword [ebp - 8]
call fcn.00408154
dec eax
mov dword [ebp - 0x78], eax
cmp dword [ebp - 0x78], 0
jl 0x4bf170
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0xc]
sub eax, 1
jb 0x4be924
je 0x4bec5b
jmp 0x4bf170
mov eax, dword [ebp - 0xa8]
mov dword [ebp - 0x8c], eax
mov eax, dword [ebp - 0x78]
test eax, eax
jl 0x4bf170
inc eax
mov dword [ebp - 0x94], eax
mov dword [ebp - 0x18], 0
mov eax, dword [ebp - 0x18]
lea eax, [eax + eax*4]
mov edx, dword [ebp - 8]
mov eax, dword [edx + eax*4]
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0x18]
lea eax, [eax + eax*4]
mov edx, dword [ebp - 8]
mov eax, dword [edx + eax*4 + 4]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x18]
lea eax, [eax + eax*4]
mov edx, dword [ebp - 8]
movzx eax, byte [edx + eax*4 + 8]
mov dword [ebp - 0x7c], eax
mov eax, dword [ebp - 0x8c]
mov dword [ebp - 0x88], eax
lea eax, [ebp - 0xac]
xor edx, edx
call fcn.00570ff8
imul dword [ebp - 0x7c]
mov ecx, 0x64
cdq
idiv ecx
add eax, dword [ebp - 0x88]
mov dword [ebp - 0x8c], eax
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x78]
jne 0x4be9cf
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x24]
mov edx, eax
mov eax, dword [ebp - 0xa0]
call fcn.0040b62c
dec eax
mov dword [ebp - 0x8c], eax
jmp 0x4be9f8
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x24]
mov edx, eax
mov eax, dword [ebp - 0xa0]
call fcn.0040b62c
mov edx, eax
dec edx
mov eax, dword [ebp - 0x8c]
call fcn.0040b62c
mov dword [ebp - 0x8c], eax
mov eax, dword [ebp - 0x8c]
sub eax, dword [ebp - 0x88]
test eax, eax
jle 0x4bec47
movzx eax, byte [ebp - 0x64]
mov dword [ebp - 0xc0], eax
fild dword [ebp - 0xc0]
fstp dword [ebp - 0x34]
wait
movzx eax, byte [ebp - 0x63]
mov dword [ebp - 0xc0], eax
fild dword [ebp - 0xc0]
fstp dword [ebp - 0x38]
wait
movzx eax, byte [ebp - 0x62]
mov dword [ebp - 0xc0], eax
fild dword [ebp - 0xc0]
fstp dword [ebp - 0x3c]
wait
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x78]
je 0x4bea61
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x24]
dec eax
cmp eax, dword [ebp - 0x8c]
jge 0x4bea7e
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x24]
mov edx, eax
dec edx
mov eax, dword [ebp - 0xa0]
dec eax
call fcn.0040b62c
mov dword [ebp - 0x8c], eax
mov eax, dword [ebp - 0x8c]
sub eax, dword [ebp - 0x88]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
je 0x4bf170
movzx eax, byte [ebp - 0x68]
movzx edx, byte [ebp - 0x64]
sub eax, edx
mov dword [ebp - 0xc0], eax
fild dword [ebp - 0xc0]
fild dword [ebp - 0x28]
call fcn.004037e0
fstp qword [ebp - 0x48]
wait
movzx eax, byte [ebp - 0x67]
movzx edx, byte [ebp - 0x63]
sub eax, edx
mov dword [ebp - 0xc0], eax
fild dword [ebp - 0xc0]
fild dword [ebp - 0x28]
call fcn.004037e0
fstp qword [ebp - 0x50]
wait
movzx eax, byte [ebp - 0x66]
movzx edx, byte [ebp - 0x62]
sub eax, edx
mov dword [ebp - 0xc0], eax
fild dword [ebp - 0xc0]
fild dword [ebp - 0x28]
call fcn.004037e0
fstp qword [ebp - 0x58]
wait
mov eax, dword [ebp - 0x88]
mov edx, dword [ebp - 0x8c]
sub edx, eax
jl 0x4bec47
inc edx
mov dword [ebp - 0x98], edx
mov dword [ebp - 0x90], eax
fld dword [ebp - 0x34]
call fcn.00403654
mov byte [edi + 2], al
fld dword [ebp - 0x38]
call fcn.00403654
mov byte [edi + 1], al
fld dword [ebp - 0x3c]
call fcn.00403654
mov byte [edi], al
mov edx, dword [ebp - 0x90]
mov eax, dword [ebp - 4]
call fcn.0043f15c
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x90]
cdq
idiv dword [ebp - 0x30]
add edx, dword [ebp - 0xb8]
mov eax, dword [ebp + 0x14]
call fcn.0043f15c
mov dword [ebp - 0x14], eax
mov esi, dword [ebp - 0xac]
mov eax, dword [ebp - 0xa4]
dec eax
sub eax, esi
jl 0x4bec17
inc eax
mov dword [ebp - 0x9c], eax
mov eax, esi
cdq
idiv dword [ebp - 0x2c]
add edx, dword [ebp - 0xbc]
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + edx*4]
mov dword [ebp - 0x70], eax
movzx edx, byte [ebp - 0x6e]
movzx eax, byte [edi + 2]
movzx ecx, al
sub edx, ecx
movzx ecx, bl
imul edx, ecx
movzx eax, al
shl eax, 8
add edx, eax
shr edx, 8
and dl, 0xff
mov byte [ebp - 0x72], dl
movzx edx, byte [ebp - 0x6f]
movzx eax, byte [edi + 1]
movzx ecx, al
sub edx, ecx
movzx ecx, bl
imul edx, ecx
movzx eax, al
shl eax, 8
add edx, eax
shr edx, 8
and dl, 0xff
mov byte [ebp - 0x73], dl
movzx eax, byte [ebp - 0x70]
movzx edx, byte [edi]
sub eax, edx
movzx edx, bl
imul edx
movzx edx, byte [edi]
shl edx, 8
add eax, edx
shr eax, 8
and al, 0xff
mov byte [ebp - 0x74], al
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0x74]
mov dword [eax + esi*4], edx
inc esi
dec dword [ebp - 0x9c]
jne 0x4beb86
fld dword [ebp - 0x34]
fadd qword [ebp - 0x48]
fstp dword [ebp - 0x34]
wait
fld dword [ebp - 0x38]
fadd qword [ebp - 0x50]
fstp dword [ebp - 0x38]
wait
fld dword [ebp - 0x3c]
fadd qword [ebp - 0x58]
fstp dword [ebp - 0x3c]
wait
inc dword [ebp - 0x90]
dec dword [ebp - 0x98]
jne 0x4beb1e
inc dword [ebp - 0x18]
dec dword [ebp - 0x94]
jne 0x4be949
jmp 0x4bf170
lea eax, [ebp - 0xac]
xor edx, edx
call fcn.00570fe4
mov dword [ebp - 0xc0], eax
fild dword [ebp - 0xc0]
fld dword [0x4bf17c]
call fcn.004037e0
fstp qword [ebp - 0x60]
wait
mov edx, dword [ebp - 0xa8]
mov eax, dword [ebp - 4]
call fcn.0043f15c
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xac]
mov dword [ebp - 0x84], eax
mov eax, dword [ebp - 0x78]
test eax, eax
jl 0x4bee88
inc eax
mov dword [ebp - 0x94], eax
mov dword [ebp - 0x18], 0
mov eax, dword [ebp - 0x18]
lea eax, [eax + eax*4]
mov edx, dword [ebp - 8]
mov eax, dword [edx + eax*4]
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0x18]
lea eax, [eax + eax*4]
mov edx, dword [ebp - 8]
mov eax, dword [edx + eax*4 + 4]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x18]
lea eax, [eax + eax*4]
mov edx, dword [ebp - 8]
movzx eax, byte [edx + eax*4 + 8]
mov dword [ebp - 0x7c], eax
mov eax, dword [ebp - 0x84]
mov dword [ebp - 0x80], eax
fild dword [ebp - 0x7c]
fmul qword [ebp - 0x60]
fild dword [ebp - 0x80]
faddp st(1)
call fcn.00403654
mov dword [ebp - 0x84], eax
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x78]
jne 0x4bed2e
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x30]
mov edx, eax
mov eax, dword [ebp - 0xa4]
call fcn.0040b62c
dec eax
mov dword [ebp - 0x84], eax
jmp 0x4bed57
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x30]
mov edx, eax
mov eax, dword [ebp - 0xa4]
call fcn.0040b62c
mov edx, eax
dec edx
mov eax, dword [ebp - 0x84]
call fcn.0040b62c
mov dword [ebp - 0x84], eax
mov eax, dword [ebp - 0x84]
sub eax, dword [ebp - 0x80]
test eax, eax
jle 0x4bee79
mov eax, dword [ebp - 0x84]
sub eax, dword [ebp - 0x80]
mov dword [ebp - 0x24], eax
movzx eax, byte [ebp - 0x64]
mov dword [ebp - 0xc0], eax
fild dword [ebp - 0xc0]
fstp dword [ebp - 0x34]
wait
movzx eax, byte [ebp - 0x63]
mov dword [ebp - 0xc0], eax
fild dword [ebp - 0xc0]
fstp dword [ebp - 0x38]
wait
movzx eax, byte [ebp - 0x62]
mov dword [ebp - 0xc0], eax
fild dword [ebp - 0xc0]
fstp dword [ebp - 0x3c]
wait
movzx eax, byte [ebp - 0x68]
movzx edx, byte [ebp - 0x64]
sub eax, edx
mov dword [ebp - 0xc0], eax
fild dword [ebp - 0xc0]
fild dword [ebp - 0x24]
call fcn.004037e0
fstp qword [ebp - 0x48]
wait
movzx eax, byte [ebp - 0x67]
movzx edx, byte [ebp - 0x63]
sub eax, edx
mov dword [ebp - 0xc0], eax
fild dword [ebp - 0xc0]
fild dword [ebp - 0x24]
call fcn.004037e0
fstp qword [ebp - 0x50]
wait
movzx eax, byte [ebp - 0x66]
movzx edx, byte [ebp - 0x62]
sub eax, edx
mov dword [ebp - 0xc0], eax
fild dword [ebp - 0xc0]
fild dword [ebp - 0x24]
call fcn.004037e0
fstp qword [ebp - 0x58]
wait
mov esi, dword [ebp - 0x80]
mov eax, dword [ebp - 0x84]
sub eax, esi
jl 0x4bee79
inc eax
mov dword [ebp - 0x98], eax
fld dword [ebp - 0x34]
call fcn.00403654
mov byte [edi + 2], al
fld dword [ebp - 0x38]
call fcn.00403654
mov byte [edi + 1], al
fld dword [ebp - 0x3c]
call fcn.00403654
mov byte [edi], al
mov eax, dword [ebp - 0xc]
mov edx, dword [edi]
mov dword [eax + esi*4], edx
fld dword [ebp - 0x34]
fadd qword [ebp - 0x48]
fstp dword [ebp - 0x34]
wait
fld dword [ebp - 0x38]
fadd qword [ebp - 0x50]
fstp dword [ebp - 0x38]
wait
fld dword [ebp - 0x3c]
fadd qword [ebp - 0x58]
fstp dword [ebp - 0x3c]
wait
inc esi
dec dword [ebp - 0x98]
jne 0x4bee2a
inc dword [ebp - 0x18]
dec dword [ebp - 0x94]
jne 0x4becb9
lea eax, [ebp - 0xac]
mov dl, 1
call fcn.00570ff8
mov edx, eax
mov eax, dword [ebp - 0x30]
call fcn.0040b62c
dec eax
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0xa8]
inc eax
mov edx, dword [ebp - 0x20]
add edx, dword [ebp - 0xa8]
sub edx, eax
jl 0x4befb1
inc edx
mov dword [ebp - 0x94], edx
mov dword [ebp - 0x88], eax
mov edx, dword [ebp - 0x88]
mov eax, dword [ebp - 4]
call fcn.0043f15c
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x88]
cdq
idiv dword [ebp - 0x30]
add edx, dword [ebp - 0xb8]
mov eax, dword [ebp + 0x14]
call fcn.0043f15c
mov dword [ebp - 0x14], eax
mov esi, dword [ebp - 0xac]
mov eax, dword [ebp - 0xa4]
dec eax
sub eax, esi
jl 0x4bef9f
inc eax
mov dword [ebp - 0x98], eax
mov eax, esi
cdq
idiv dword [ebp - 0x2c]
add edx, dword [ebp - 0xbc]
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + edx*4]
mov dword [ebp - 0x70], eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + esi*4]
mov dword [edi], eax
movzx edx, byte [ebp - 0x6e]
movzx ecx, byte [edi + 2]
sub edx, ecx
movzx eax, bl
imul edx, eax
movzx ecx, byte [edi + 2]
shl ecx, 8
add edx, ecx
shr edx, 8
and dl, 0xff
mov byte [edi + 2], dl
movzx edx, byte [ebp - 0x6f]
movzx ecx, byte [edi + 1]
sub edx, ecx
imul edx, eax
movzx ecx, byte [edi + 1]
shl ecx, 8
add edx, ecx
shr edx, 8
and dl, 0xff
mov byte [edi + 1], dl
movzx edx, byte [ebp - 0x70]
movzx ecx, byte [edi]
sub edx, ecx
imul edx, eax
movzx eax, byte [edi]
shl eax, 8
add edx, eax
shr edx, 8
and dl, 0xff
mov byte [edi], dl
mov eax, dword [ebp - 0x10]
mov edx, dword [edi]
mov dword [eax + esi*4], edx
inc esi
dec dword [ebp - 0x98]
jne 0x4bef10
inc dword [ebp - 0x88]
dec dword [ebp - 0x94]
jne 0x4beec8
mov eax, dword [ebp - 0xa8]
mov dword [ebp - 0x88], eax
mov eax, dword [ebp - 0x88]
cdq
idiv dword [ebp - 0x30]
add edx, dword [ebp - 0xb8]
mov eax, dword [ebp + 0x14]
call fcn.0043f15c
mov dword [ebp - 0x14], eax
mov esi, dword [ebp - 0xac]
mov eax, dword [ebp - 0xa4]
dec eax
sub eax, esi
jl 0x4bf083
inc eax
mov dword [ebp - 0x94], eax
mov eax, esi
cdq
idiv dword [ebp - 0x2c]
add edx, dword [ebp - 0xbc]
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + edx*4]
mov dword [ebp - 0x70], eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + esi*4]
mov dword [edi], eax
movzx eax, byte [ebp - 0x6e]
movzx edx, byte [edi + 2]
sub eax, edx
movzx edx, bl
imul edx
movzx edx, byte [edi + 2]
shl edx, 8
add eax, edx
shr eax, 8
and al, 0xff
mov byte [edi + 2], al
movzx eax, byte [ebp - 0x6f]
movzx edx, byte [edi + 1]
sub eax, edx
movzx edx, bl
imul edx
movzx edx, byte [edi + 1]
shl edx, 8
add eax, edx
shr eax, 8
and al, 0xff
mov byte [edi + 1], al
movzx eax, byte [ebp - 0x70]
movzx edx, byte [edi]
sub eax, edx
movzx edx, bl
imul edx
movzx edx, byte [edi]
shl edx, 8
add eax, edx
shr eax, 8
and al, 0xff
mov byte [edi], al
mov eax, dword [ebp - 0xc]
mov edx, dword [edi]
mov dword [eax + esi*4], edx
inc esi
dec dword [ebp - 0x94]
jne 0x4beff4
mov eax, dword [ebp - 0xa8]
add eax, dword [ebp - 0x20]
mov dword [ebp - 0x88], eax
lea eax, [ebp - 0xac]
xor edx, edx
call fcn.00570fe4
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jle 0x4bf10f
jmp 0x4bf0fd
push 0xcc0020
mov eax, dword [ebp - 0xa8]
push eax
mov eax, dword [ebp - 0xac]
push eax
mov eax, dword [ebp - 4]
call fcn.0043efec
call fcn.00439e30
push eax
mov eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x88]
push eax
mov eax, dword [ebp - 0xac]
push eax
mov eax, dword [ebp - 4]
call fcn.0043efec
call fcn.00439e30
push eax
call fcn.00409d2c
mov eax, dword [ebp - 0x20]
add dword [ebp - 0x88], eax
mov eax, dword [ebp - 0xa0]
dec eax
sub eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x88]
jg 0x4bf0aa
mov eax, dword [ebp - 0x88]
cmp eax, dword [ebp - 0xa0]
jge 0x4bf170
push 0xcc0020
mov eax, dword [ebp - 0xa8]
push eax
mov eax, dword [ebp - 0xac]
push eax
mov eax, dword [ebp - 4]
call fcn.0043efec
call fcn.00439e30
push eax
mov eax, dword [ebp - 0xa0]
sub eax, dword [ebp - 0x88]
push eax
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x88]
push eax
mov eax, dword [ebp - 0xac]
push eax
mov eax, dword [ebp - 4]
call fcn.0043efec
call fcn.00439e30
push eax
call fcn.00409d2c
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10