Function at 0x676489
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
movzx bx, ah
setae bl
mov ebx, dword [ebp + 0x10]
push esi
push edi
mov edi, dword [ebx]
mov esi, eax
cwde
mov eax, dword [ebp + 8]
push eax
mov dword [ebp - 4], edi
mov dword [ebx], 0
call fcn.00693306
mov ecx, dword [ebp + 0x14]
test bh, 0x78
test dx, di
clc
mov dword [ecx], 0
cmp dword [esi + 0x48], 0x112
je 0x87fcb9
cmp dword [esi + 0x4c], 0
je 0x67659c
test edi, edi
jbe 0x67651c
mov ecx, dword [esi + 0x58]
cmc
test ebx, edx
cmp ecx, 5
jae 0x67650d
mov eax, dword [ebp + 0xc]
mov dl, byte [eax]
mov byte [ecx + esi + 0x5c], dl
inc dword [esi + 0x58]
inc dword [ebx]
inc eax
cmc
sub edi, 1
mov dword [ebp + 0xc], eax
jne 0x6764e2
mov dword [ebp - 4], edi
test di, 0x1572
cmp esp, 0xb9a68cb
cmc
cmp dword [esi + 0x58], 5
jb 0x67ea8c
cmp byte [esi + 0x5c], 0
jne 0x87e936
movzx eax, byte [esi + 0x5d]
rcl cl, cl
movzx ecx, byte [esi + 0x5e]
movzx edx, byte [esi + 0x5f]
stc
cmc
clc
shl eax, 8
cmp si, sp
or eax, ecx
rol ch, cl
bt cx, ax
btc ecx, edi
movzx ecx, byte [esi + 0x60]
cmp di, 0x612d
shl eax, 8
test eax, edi
or eax, edx
cdq
sar dl, cl
btr dx, 0x5b
shl eax, 8
or eax, ecx
bts dx, si
mov dword [esi + 0x20], eax
btr dx, 0xfa
mov dword [esi + 0x1c], 0xffffffff
cmp ah, 0x3e
bsf edx, eax
mov dword [esi + 0x4c], 0
bt edx, 0xc2
inc dl
mov dword [esi + 0x58], 0
mov edx, dword [ebp + 8]
test eax, edx
cmp dword [esi + 0x24], edx
jae 0x686841
cmp dword [esi + 0x50], 0
je 0x676c6e
mov ecx, dword [esi + 4]
mov dh, 0xd3
add ecx, dword [esi]
shrd dx, di, 0x40
mov edx, dword [esi + 0x10]
shld ax, ax, 0x2a
mov eax, 0x300
cmp ebp, 0x41005604
clc
shl eax, cl
clc
test al, 0x75
add eax, 0x736
je 0x676624
mov ecx, eax
adc di, 0x345b
test cl, 0xf6
mov eax, 0x400
btr di, bx
mov edi, edx
sbb dx, dx
xor edx, esi
movzx edx, ax
lahf
or eax, esi
mov eax, edx
shl edx, 0x10
or eax, edx
cmp ebp, 0x28944c94
shr ecx, 1
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
rcr cx, 0xae
mov edi, dword [ebp - 4]
neg cl
mov ecx, 1
cmc
cmp sp, si
xor eax, eax
mov dword [esi + 0x44], ecx
mov dword [esi + 0x40], ecx
mov dword [esi + 0x3c], ecx
mov dword [esi + 0x38], ecx
mov dword [esi + 0x34], eax
mov dword [esi + 0x50], eax
jmp 0x676c77
mov ecx, 1
cmp esp, edx
shr bh, cl
mov ebx, dword [esi + 0x58]
cmp ebp, 0x649c717c
test ebx, ebx
jne 0x678e6d
mov ebx, dword [ebp + 0xc]
test esp, esp
cmc
cmp edi, 0x14
jb 0x678222
lea eax, [edi + ebx - 0x14]
jmp 0x67825d
push ebx
cmovbe ecx, esp
mov eax, edi
mov ecx, 0x7ab50b5c
movzx cx, dh
xchg ecx, ecx
mov ecx, esi
call fcn.00697f6c
lea esp, [esp + 4]
test bp, sp
cmc
test eax, eax
mov eax, 0x739b11e3
mov eax, ebx
je 0x67ea46
mov ebx, dword [ebp + 0xc]
not di
cmovns edi, ebx
xchg di, di
mov edi, dword [ebp + 8]
push eax
cmovg eax, esp
not ax
bswap eax
mov eax, esi
mov dword [esi + 0x18], ebx
call fcn.008871f4
test eax, eax
jne 0x87e936
mov eax, dword [esi + 0x18]
mov ecx, dword [ebp + 0x10]
cmp ax, di
stc
cmc
sub eax, ebx
cmc
cmp sp, ax
add dword [ecx], eax
add ebx, eax
mov dword [ebp + 0xc], ebx
jmp 0x678f4b
sub edi, edi
test ebp, 0x71a948b7
mov dword [ebp - 8], edi
stc
cmp ah, dh
clc
cmp ebx, 0x14
jae 0x678ebf
cmp edi, dword [ebp - 4]
jae 0x678ebb
mov eax, dword [ebp + 0xc]
sar dl, 0x15
cmp esp, ebp
rcr dl, cl
mov dl, byte [edi + eax]
clc
test ebp, 0x5c623ef9
mov byte [ebx + esi + 0x5c], dl
cmp esi, 0x316a0f55
lea ebx, [ebx + ecx]
lea edi, [edi + ecx]
cmp ebx, 0x14
jb 0x678e85
mov dword [ebp - 8], edi
clc
mov dword [esi + 0x58], ebx
test bp, 0x771c
cmp ebx, 0x14
jae 0x678ef9
lea eax, [esi + 0x5c]
cmovp ecx, edi
not cl
push eax
movzx ecx, cx
bswap eax
cbw
mov eax, ebx
movzx cx, ah
mov ecx, esi
call fcn.00697f6c
lea esp, [esp + 4]
test eax, eax
je 0x680a2d
mov edi, dword [ebp + 8]
cwde
lea eax, [esi + 0x5c]
mov dword [esi + 0x18], eax
push eax
movzx eax, di
mov eax, ebp
cbw
mov eax, esi
call fcn.008871f4
test eax, eax
jne 0x87e936
mov ecx, dword [esi + 0x18]
inc dh
sub ax, 0x1530
mov edx, dword [ebp - 8]
sub ecx, ebx
lahf
sub ecx, esi
shl al, cl
rol ah, 0xa
lea eax, [edx + ecx - 0x5c]
rol ecx, cl
mov ecx, dword [ebp + 0x10]
cmp cl, ch
add dword [ecx], eax
test ecx, edx
stc
cmc
add dword [ebp + 0xc], eax
mov dword [esi + 0x58], 0
sub dword [ebp - 4], eax
cmp bp, bx
stc
cmp dword [esi + 0x48], 0x112
je 0x87fcb9
mov edi, dword [ebp - 4]
mov ebx, dword [ebp + 0x10]
jmp 0x6764d0
lea ecx, [edi + ebx]
bt edx, 0xd3
add dl, cl
lea edx, [esi + 0x5c]
test dx, sp
cmp dh, al
cmp ebx, ecx
je 0x67ea73
sub edx, ebx
setne bl
mov bl, byte [eax]
mov byte [edx + eax], bl
inc eax
clc
cmp eax, ecx
jne 0x67ea64
mov eax, dword [ebp + 0x10]
rol bx, 0x13
mov dword [esi + 0x58], edi
btr bx, sp
cmc
sal si, 0x4a
add dword [eax], edi
shrd edi, ebp, 0xfd
mov eax, dword [ebp + 0x14]
sub bl, cl
pop edi
sbb si, ax
sub si, 0x7313
sar bl, 0xf5
pop esi
and bx, 0x7053
sbb bx, si
mov dword [eax], 3
sub eax, eax
setp bl
pop ebx
mov esp, ebp
movzx ebp, sp
pop ebp
ret
mov eax, dword [ebp + 0x10]
sar ecx, 0x11
add dword [eax], edi
mov ecx, dword [ebp + 0x14]
pop edi
rcl esi, 0x77
pop esi
rcr bl, cl
mov dword [ecx], 3
ror bl, cl
neg bl
adc bl, 0x76
xor eax, eax
movzx bx, al
mov bx, dx
setge bl
pop ebx
mov esp, ebp
bswap bp
mov bp, 0x407e
pop ebp
ret
mov ecx, dword [ebp + 0x14]
pop edi
test ecx, esp
bt ebx, 0x2a
pop esi
btr bx, 0x55
mov dword [ecx], 4
rcl bl, 0x6d
bt bx, 0x25
dec bh
sub eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0x48], 0
jne 0x686855
cmp dword [esi + 0x20], 0
je 0x682e75
mov edx, dword [ebp + 0x14]
test edx, eax
pop edi
bt esi, 0x5a
pop esi
add bh, bl
cmp al, al
mov dword [edx], 2
bt ebx, 0x6f
rcr bh, cl
sub eax, eax
xchg ebx, ebx
setno bh
pop ebx
mov esp, ebp
mov ebp, 0x23a63a98
bswap bp
pop ebp
ret
pop edi
pop esi
movsx ebx, bp
cbw
mov eax, 1
pop ebx
mov esp, ebp
xchg ebp, ebp
mov bp, bp
mov ebp, 0x64f56e76
pop ebp
ret
cmp dword [esi + 0x20], 0
jne 0x87fcd7
mov edx, dword [ebp + 0x14]
bswap edi
mov dword [edx], 1
bts di, sp
bt bx, 0x13
xor eax, eax
cmp dh, 0x42
movsx ebx, dx
cmp dword [esi + 0x20], eax
movsx edi, sp
pop edi
pop esi
xchg al, bl
movsx bx, bl
movsx ebx, bp
setne al
setbe bl
pop ebx
mov esp, ebp
cmovae bp, bx
pop ebp
ret