Function at 0x487da0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xd8
mov eax, dword [0x4c900c]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, ecx
mov dword [ebp - 0xd4], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xd8], eax
push esi
mov eax, dword [ebx]
push edi
mov dword [ebp - 0xd0], edx
mov dword [ebp - 0xc8], ebx
mov dword [eax + 8], 0
call fcn.00487050
mov edx, dword [ebx]
mov esi, dword [edx + 8]
mov dword [ebp - 0xcc], esi
test eax, eax
jne 0x487e02
push eax
mov edx, esi
mov ecx, ebx
call fcn.00486780
jmp 0x488703
mov eax, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
xor ecx, ecx
cmp esi, 3
mov dword [ebp - 0x90], eax
setge cl
lea ecx, [ecx*2 + 1]
mov dword [ebp - 0x98], ecx
jne 0x487f29
cmp dword [ebx + 0x47ec], 3
je 0x487e4b
cmp dword [ebx + 0x47e8], 0
jne 0x487f29
cmp dword [ebx + 0x47e4], 0
jne 0x487f29
mov eax, 1
mov dword [ebp - 0xa8], eax
xorps xmm0, xmm0
mov dword [ebp - 0xac], esi
movups xmmword [ebp - 0xc0], xmm0
test esi, esi
jle 0x487fbf
lea edi, [ebp - 0x80]
mov dword [ebp - 0x94], 0
lea edx, [ebx + 0x46a0]
mov dword [ebp - 0xa0], edi
mov dword [ebp - 0x9c], edx
nop dword [eax]
mov eax, dword [ebx]
mov eax, dword [eax]
add eax, 3
push eax
call dword [ebp - 0x90]
mov ecx, dword [ebp - 0x9c]
add esp, 4
mov dword [ecx + 0x34], eax
test eax, eax
je 0x4886e3
mov eax, dword [ebx + 0x4684]
cdq
idiv dword [ecx]
mov dword [edi], eax
mov dword [ebp - 0xb0], eax
mov eax, dword [ebx + 0x4688]
cdq
idiv dword [ecx + 4]
mov edx, dword [ebp - 0xa0]
mov edi, eax
mov eax, dword [ebp - 0xb0]
mov ecx, edi
dec eax
sar ecx, 1
mov dword [edx + 0xc], ecx
mov ecx, dword [ebx]
mov dword [edx + 4], edi
xor edx, edx
mov ecx, dword [ecx]
add eax, ecx
div dword [ebp - 0xb0]
mov ecx, dword [ebp - 0xa0]
mov edx, dword [ebp - 0x9c]
mov dword [ecx + 8], eax
mov eax, dword [edx + 0x28]
mov dword [ecx - 4], eax
mov dword [ecx - 8], eax
mov eax, dword [ebp - 0xb0]
mov dword [ecx + 0x10], 0
cmp eax, 1
jne 0x487f66
cmp edi, eax
jne 0x487f5a
mov eax, 0x487430
jmp 0x487f89
xor eax, eax
mov dword [ebp - 0xa8], eax
cmp esi, 3
jne 0x487e50
jge 0x487e50
mov esi, 1
xorps xmm0, xmm0
mov dword [ebp - 0xac], esi
movups xmmword [ebp - 0xc0], xmm0
jmp 0x487e6e
cmp edi, 2
jne 0x487f84
mov eax, 0x487440
jmp 0x487f89
cmp eax, 2
jne 0x487f84
cmp edi, 1
jne 0x487f77
mov eax, 0x487670
jmp 0x487f89
cmp edi, 2
jne 0x487f84
mov eax, dword [ebx + 0x4814]
jmp 0x487f89
mov eax, 0x487990
mov dword [ecx - 0xc], eax
add edx, 0x48
mov eax, dword [ebp - 0x94]
add ecx, 0x20
inc eax
mov dword [ebp - 0xa0], ecx
mov dword [ebp - 0x94], eax
mov edi, ecx
mov dword [ebp - 0x9c], edx
cmp eax, esi
jl 0x487e90
mov edx, dword [ebx]
mov ecx, dword [ebp - 0x98]
jmp 0x487fcb
mov dword [ebp - 0xa8], eax
mov dword [ebp - 0xac], esi
mov edi, dword [edx]
mov eax, dword [edx + 4]
mov dword [ebp - 0x94], eax
test edi, edi
js 0x4886e3
je 0x487ff6
mov eax, 0x7fffffff
cdq
idiv edi
cmp ecx, eax
jg 0x4886e3
mov eax, dword [ebp - 0x94]
mov edx, edi
imul edx, ecx
mov dword [ebp - 0x9c], edx
test edx, edx
js 0x4886e3
test eax, eax
js 0x4886e3
je 0x488036
mov esi, dword [ebx]
mov eax, 0x7fffffff
cdq
idiv dword [esi + 4]
mov esi, dword [ebp - 0xac]
cmp dword [ebp - 0x9c], eax
jg 0x4886e3
mov eax, dword [ebp - 0x94]
imul edi, eax
imul edi, ecx
cmp edi, 0x7ffffffe
jg 0x4886e3
lea eax, [edi + 1]
push eax
call dword [ebp - 0x90]
mov edx, dword [ebx]
mov ecx, eax
add esp, 4
mov dword [ebp - 0xa0], ecx
test ecx, ecx
je 0x4886e5
cmp dword [edx + 4], 0
mov dword [ebp - 0xb0], 0
jbe 0x488686
mov eax, dword [ebp - 0x98]
mov dword [ebp - 0xa0], ecx
jmp 0x488096
mov ecx, dword [ebp - 0xa0]
mov edi, dword [edx]
imul edi, dword [ebp - 0xb0]
mov dword [ebp - 0x90], 0
imul edi, eax
add edi, ecx
mov dword [ebp - 0xa4], edi
test esi, esi
jle 0x4881ac
mov edi, dword [ebp - 0xac]
lea eax, [ebx + 0x46bc]
mov dword [ebp - 0x94], eax
lea esi, [ebp - 0x74]
mov ebx, eax
jmp 0x4880e6
mov ecx, dword [ebp - 0xa0]
mov eax, dword [ebp - 0xa8]
mov edx, edi
mov dword [ebp - 0x9c], eax
mov dword [ebp - 0xa8], eax
mov eax, dword [esi - 8]
sar eax, 1
mov dword [ebp - 0x94], ecx
mov dword [ebp - 0xa0], ecx
cmp dword [esi], eax
jl 0x488131
mov edi, dword [ebp - 0x94]
mov eax, dword [esi - 0x10]
mov ecx, dword [esi - 0x14]
mov dword [ebp - 0xa0], edi
mov edi, dword [ebp - 0x9c]
mov dword [ebp - 0xa8], edi
mov edi, edx
jmp 0x488137
mov eax, dword [esi - 0x14]
mov ecx, dword [esi - 0x10]
push dword [esi - 0xc]
push dword [esi - 4]
push ecx
push eax
push dword [ebx + 0x18]
call dword [esi - 0x18]
mov ecx, dword [ebp - 0x90]
add esp, 0x14
mov dword [ebp + ecx*4 - 0xc0], eax
mov eax, dword [esi]
inc eax
mov dword [esi], eax
cmp eax, dword [esi - 8]
jl 0x48817d
inc dword [esi + 4]
mov eax, dword [esi + 4]
mov edx, dword [esi - 0x10]
mov dword [esi], 0
mov dword [esi - 0x14], edx
cmp eax, dword [ebx]
jge 0x48817d
mov eax, dword [ebx + 4]
add eax, edx
mov dword [esi - 0x10], eax
inc ecx
add esi, 0x20
add ebx, 0x48
mov dword [ebp - 0x90], ecx
cmp ecx, edi
jl 0x4880e0
mov ebx, dword [ebp - 0xc8]
mov eax, dword [ebp - 0x98]
mov dword [ebp - 0xac], edi
mov edi, dword [ebp - 0xa4]
mov edx, dword [ebx]
cmp dword [ebp - 0xcc], 3
jl 0x48842c
mov ecx, dword [edx + 8]
cmp ecx, 3
jne 0x488263
cmp dword [ebp - 0xa8], 0
je 0x48823b
xor esi, esi
cmp dword [edx], esi
jbe 0x488425
mov ecx, dword [ebp - 0xbc]
add edi, 2
mov eax, dword [ebp - 0xc0]
mov edx, dword [ebp - 0xb8]
sub eax, ecx
sub edx, ecx
mov dword [ebp - 0x90], eax
mov dword [ebp - 0xa4], edx
mov edx, dword [ebp - 0x98]
movzx eax, byte [eax + ecx]
lea ecx, [ecx + 1]
mov byte [edi - 2], al
inc esi
movzx eax, byte [ecx - 1]
mov byte [edi - 1], al
mov eax, dword [ebp - 0xa4]
movzx eax, byte [eax + ecx - 1]
mov byte [edi], al
mov byte [edi + 1], 0xff
add edi, edx
mov eax, dword [ebx]
cmp esi, dword [eax]
mov eax, dword [ebp - 0x90]
jb 0x488203
mov edx, dword [ebx]
jmp 0x488664
push eax
push dword [edx]
mov eax, dword [ebx + 0x4810]
push dword [ebp - 0xb8]
push dword [ebp - 0xbc]
push dword [ebp - 0xc0]
push edi
call eax
mov edx, dword [ebx]
add esp, 0x18
jmp 0x488664
cmp ecx, 4
jne 0x4883fc
mov ecx, dword [ebx + 0x47e8]
test ecx, ecx
jne 0x488343
mov dword [ebp - 0x90], ecx
cmp dword [edx], ecx
jbe 0x488425
mov edx, dword [ebp - 0xb4]
add edi, 2
mov ecx, dword [ebp - 0xbc]
mov esi, edx
mov eax, dword [ebp - 0xc0]
sub ecx, edx
mov dword [ebp - 0xa4], ecx
sub eax, edx
mov ecx, dword [ebp - 0xb8]
sub ecx, edx
mov dword [ebp - 0x9c], eax
mov dword [ebp - 0x94], ecx
nop dword [eax]
movzx ecx, byte [eax + esi]
lea esi, [esi + 1]
movzx edx, byte [esi - 1]
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [edi - 2], al
mov eax, dword [ebp - 0xa4]
movzx ecx, byte [eax + esi - 1]
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [edi - 1], al
mov eax, dword [ebp - 0x94]
movzx ecx, byte [eax + esi - 1]
imul ecx, edx
mov byte [edi + 1], 0xff
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
mov ecx, dword [ebp - 0x90]
shr eax, 8
inc ecx
mov byte [edi], al
mov eax, dword [ebx]
add edi, dword [ebp - 0x98]
mov dword [ebp - 0x90], ecx
cmp ecx, dword [eax]
mov eax, dword [ebp - 0x9c]
jb 0x4882c0
mov edx, dword [ebx]
jmp 0x488664
mov edx, dword [edx]
mov esi, dword [ebx + 0x4810]
push eax
push edx
push dword [ebp - 0xb8]
push dword [ebp - 0xbc]
push dword [ebp - 0xc0]
push edi
cmp ecx, 2
jne 0x4883f0
call esi
mov eax, dword [ebx]
xor esi, esi
add esp, 0x18
cmp dword [eax], esi
jbe 0x488425
add edi, 2
nop dword [eax]
mov eax, dword [ebp - 0xb4]
movzx edx, byte [esi + eax]
inc esi
movzx eax, byte [edi - 2]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [edi - 2], al
movzx eax, byte [edi - 1]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [edi - 1], al
movzx eax, byte [edi]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [edi], al
mov eax, dword [ebx]
add edi, dword [ebp - 0x98]
cmp esi, dword [eax]
jb 0x488380
mov edx, eax
jmp 0x488664
call esi
mov edx, dword [ebx]
add esp, 0x18
jmp 0x488664
xor ecx, ecx
cmp dword [edx], ecx
jbe 0x488425
inc edi
mov eax, dword [ebp - 0xc0]
mov al, byte [ecx + eax]
inc ecx
mov byte [edi + 1], al
mov byte [edi], al
mov byte [edi - 1], al
mov byte [edi + 2], 0xff
mov eax, dword [ebx]
add edi, dword [ebp - 0x98]
cmp ecx, dword [eax]
jb 0x488403
mov edx, dword [ebx]
jmp 0x488664
cmp dword [ebp - 0xa8], 0
je 0x4884bd
cmp dword [edx], 0
mov dword [ebp - 0x90], 0
jbe 0x488664
mov eax, dword [ebp - 0xc0]
mov esi, eax
mov ecx, dword [ebp - 0xbc]
sub ecx, eax
mov dword [ebp - 0xa4], ecx
mov ecx, dword [ebp - 0xb8]
sub ecx, eax
sub edi, eax
mov dword [ebp - 0x94], ecx
movzx eax, byte [ecx + esi]
lea esi, [esi + 1]
imul ecx, eax, 0x1d
mov eax, dword [ebp - 0xa4]
movzx eax, byte [eax + esi - 1]
imul eax, eax, 0x96
add ecx, eax
movzx eax, byte [esi - 1]
imul eax, eax, 0x4d
add ecx, eax
mov eax, dword [ebp - 0x90]
shr ecx, 8
inc eax
mov byte [edi + esi - 1], cl
mov edx, dword [ebx]
mov ecx, dword [ebp - 0x94]
mov dword [ebp - 0x90], eax
cmp eax, dword [edx]
jb 0x488472
jmp 0x488664
cmp dword [edx + 8], 4
jne 0x488646
mov ecx, dword [ebx + 0x47e8]
test ecx, ecx
jne 0x4885d0
mov dword [ebp - 0x90], ecx
cmp dword [edx], ecx
jbe 0x48866a
mov edx, dword [ebp - 0xb4]
mov ecx, edx
mov eax, dword [ebp - 0xbc]
mov esi, dword [ebp - 0xc0]
sub eax, edx
mov dword [ebp - 0xa4], eax
sub esi, edx
mov eax, dword [ebp - 0xb8]
sub eax, edx
mov dword [ebp - 0x9c], edx
mov dword [ebp - 0xc4], esi
mov dword [ebp - 0x94], eax
nop dword [eax + eax]
movzx esi, byte [ecx + esi]
movzx eax, byte [ecx]
mov edx, dword [ebp - 0xa4]
mov ebx, dword [ebp - 0x94]
imul esi, eax
movzx ecx, byte [ecx + edx]
mov edx, dword [ebp - 0x9c]
imul ecx, eax
sub esi, 0xffffff80
movzx edx, byte [edx + ebx]
imul edx, eax
sub ecx, 0xffffff80
mov ebx, dword [ebp - 0xc8]
mov eax, ecx
mov byte [edi + 1], 0xff
shr eax, 8
add eax, ecx
shr eax, 8
sub edx, 0xffffff80
movzx eax, al
imul ecx, eax, 0x96
mov eax, edx
shr eax, 8
add eax, edx
shr eax, 8
movzx eax, al
imul eax, eax, 0x1d
add ecx, eax
mov eax, esi
shr eax, 8
add eax, esi
mov esi, dword [ebp - 0x90]
shr eax, 8
inc esi
movzx eax, al
imul eax, eax, 0x4d
mov dword [ebp - 0x90], esi
add ecx, eax
mov eax, dword [ebp - 0x98]
shr ecx, 8
mov byte [edi], cl
add edi, eax
mov edx, dword [ebx]
mov ecx, dword [ebp - 0x9c]
inc ecx
mov dword [ebp - 0x9c], ecx
cmp esi, dword [edx]
mov esi, dword [ebp - 0xc4]
jb 0x488520
jmp 0x48866a
cmp ecx, 2
jne 0x488646
cmp dword [edx], 0
mov dword [ebp - 0x90], 0
jbe 0x488664
mov eax, dword [ebp - 0xc0]
mov esi, dword [ebp - 0xb4]
sub eax, esi
mov dword [ebp - 0xc4], eax
nop dword [eax]
mov al, byte [esi + eax]
lea esi, [esi + 1]
not al
movzx ecx, al
movzx eax, byte [esi - 1]
imul ecx, eax
mov byte [edi + 1], 0xff
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [edi], al
mov eax, dword [ebp - 0x90]
mov edx, dword [ebx]
inc eax
add edi, dword [ebp - 0x98]
mov dword [ebp - 0x90], eax
cmp eax, dword [edx]
mov eax, dword [ebp - 0xc4]
jb 0x488600
jmp 0x488664
xor ecx, ecx
cmp dword [edx], ecx
jbe 0x488664
mov esi, dword [ebp - 0xc0]
sub esi, edi
mov al, byte [esi + edi]
lea edi, [edi + 1]
mov byte [edi - 1], al
inc ecx
mov edx, dword [ebx]
cmp ecx, dword [edx]
jb 0x488654
mov eax, dword [ebp - 0x98]
mov ecx, dword [ebp - 0xb0]
mov esi, dword [ebp - 0xac]
inc ecx
mov dword [ebp - 0xb0], ecx
cmp ecx, dword [edx + 4]
jb 0x488090
mov edx, dword [edx + 8]
mov ecx, ebx
push 0
call fcn.00486780
mov eax, dword [ebx]
add esp, 4
mov ecx, dword [ebp - 0xd0]
mov eax, dword [eax]
mov dword [ecx], eax
mov eax, dword [ebx]
mov ecx, dword [ebp - 0xd4]
mov eax, dword [eax + 4]
mov dword [ecx], eax
mov eax, dword [ebp - 0xd8]
test eax, eax
je 0x4886cc
mov ecx, dword [ebx]
xor edx, edx
cmp dword [ecx + 8], 3
setge dl
lea edx, [edx*2 + 1]
mov dword [eax], edx
mov eax, dword [ebp - 0xa0]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004a7a88
mov esp, ebp
pop ebp
ret
mov edx, dword [ebx]
mov edx, dword [edx + 8]
mov ecx, ebx
push 0
call fcn.00486780
mov eax, dword fs:[0x2c]
mov eax, dword [eax]
mov dword [eax + 0xc], str.outofmem
mov ecx, dword [ebp - 8]
add esp, 4
xor ecx, ebp
xor eax, eax
pop edi
pop esi
pop ebx
call fcn.004a7a88
mov esp, ebp
pop ebp
ret