Function at 0x467a20
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0x24
push ebx
push ebp
push esi
mov esi, dword [esp + 0x34]
movzx ax, byte [esi]
movzx dx, byte [esi + 1]
push edi
movzx ebp, ax
movzx edi, dx
movzx ecx, bp
movzx eax, di
mov bl, byte [esi]
cmp bl, 0xff
mov dword [esp + 0x18], esi
jne 0x467a56
mov dl, byte [esi + 1]
cmp dl, bl
je 0x467aad
test dl, dl
je 0x467aa8
movzx edx, bl
movsx ebx, bp
cmp ebx, edx
mov dword [esp + 0x30], edx
jle 0x467a6b
movzx dx, byte [esi]
movzx ebp, dx
mov dl, byte [esi + 1]
movzx esi, dl
movsx ebx, di
cmp ebx, esi
jle 0x467a7f
movzx si, dl
movzx edi, si
movsx esi, cx
cmp esi, dword [esp + 0x30]
jge 0x467a93
mov ecx, dword [esp + 0x18]
movzx cx, byte [ecx]
movzx ecx, cx
movzx esi, dl
movsx ebx, ax
cmp ebx, esi
mov esi, dword [esp + 0x18]
jge 0x467aa8
movzx dx, dl
movzx eax, dx
add esi, 2
jmp 0x467a40
movsx esi, di
movsx edx, ax
sub edx, esi
mov dword [esp + 0x24], esi
movsx ebx, bp
movsx esi, cx
sub esi, ebx
mov dword [esp + 0x2c], ebx
lea ebx, [edx*4]
cmp esi, ebx
jle 0x467add
sub ecx, ebp
add ecx, 1
movzx edi, cx
movzx ebx, di
jmp 0x467b00
add esi, esi
add esi, esi
sub eax, edi
cmp edx, esi
jle 0x467af2
add eax, 1
movzx edi, ax
movzx ebx, di
jmp 0x467b00
sub ecx, ebp
add ecx, 1
add eax, 1
movzx ebx, cx
movzx edi, ax
mov esi, dword [esp + 0x38]
mov ebp, dword [esp + 0x24]
mov al, byte [esi]
cmp al, 0xff
jne 0x467b19
mov cl, byte [esi + 1]
cmp cl, al
je 0x467b4a
test cl, cl
je 0x467b45
movzx ecx, al
sub ecx, dword [esp + 0x2c]
mov eax, ecx
shl eax, 6
sub eax, ecx
cdq
movsx ecx, bx
idiv ecx
movzx ecx, byte [esi + 1]
sub ecx, ebp
mov byte [esi], al
mov eax, ecx
shl eax, 6
sub eax, ecx
movsx ecx, di
cdq
idiv ecx
mov byte [esi + 1], al
add esi, 2
jmp 0x467b08
mov ebp, dword [esp + 0x3c]
lea ecx, [ebp + 0x80]
cmp ebp, ecx
mov eax, ebp
jae 0x467b72
mov edx, ecx
sub edx, ebp
mov edi, edi
mov word [eax], 0x1e
mov word [edx + eax], 0x1e
add eax, 2
cmp eax, ecx
jb 0x467b60
mov eax, dword [esp + 0x38]
cmp byte [eax], 0xff
mov ecx, eax
jne 0x467b88
lea ecx, [ecx]
add ecx, 2
cmp byte [ecx], 0xff
je 0x467b80
mov al, byte [ecx + 1]
cmp al, 0xff
je 0x46808f
jmp 0x467ba4
mov ecx, dword [esp + 0x18]
movzx dx, byte [ecx]
movzx ax, al
add ecx, 2
movzx esi, ax
mov al, byte [ecx]
cmp al, 0xff
movzx edx, dx
mov dword [esp + 0x14], edx
mov dword [esp + 0x20], esi
mov dword [esp + 0x18], ecx
jne 0x467be8
cmp byte [ecx + 1], 0xff
je 0x467bd5
add ecx, 2
cmp byte [ecx], 0xff
je 0x467bc7
cmp byte [ecx + 1], 0xff
mov dword [esp + 0x18], ecx
je 0x46808f
jmp 0x468080
movzx cx, byte [ecx + 1]
movzx ax, al
movzx eax, ax
cmp dx, ax
movzx ecx, cx
mov dword [esp + 0x10], eax
mov dword [esp + 0x1c], ecx
jne 0x467c11
cmp si, cx
je 0x468080
mov esi, dword [esp + 0x20]
movsx eax, si
movsx edx, cx
mov esi, eax
sub esi, edx
mov dword [esp + 0x24], eax
mov dword [esp + 0x30], edx
jns 0x467c29
sub edx, eax
jmp 0x467c2b
mov edx, esi
movsx ebx, word [esp + 0x14]
movsx edi, word [esp + 0x10]
mov ecx, ebx
sub ecx, edi
mov dword [esp + 0x2c], ebx
jns 0x467c45
mov eax, edi
sub eax, ebx
jmp 0x467c47
mov eax, ecx
cmp edx, eax
jle 0x467e5c
mov eax, dword [esp + 0x30]
sub eax, dword [esp + 0x24]
mov edx, esi
js 0x467c5d
mov edx, eax
mov eax, edi
sub eax, ebx
js 0x467c65
mov ecx, eax
lea eax, [edx + 1]
shl eax, 6
cdq
add ecx, 1
idiv ecx
mov ecx, dword [esp + 0x20]
movsx eax, ax
lea edx, [eax + eax*4]
sar edx, 6
movzx eax, dx
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x1c]
cmp ax, cx
jle 0x467cfe
add ecx, 0xfffffffe
movzx ebx, cx
mov ecx, dword [esp + 0x30]
movsx eax, bx
add ecx, 2
cmp eax, ecx
mov dword [esp + 0x30], ecx
jg 0x467d6c
lea ecx, [ebx - 2]
movzx edi, cx
lea edx, [edi + 2]
cmp dx, 0x3f
ja 0x467ced
movsx edx, di
lea esi, [eax + 2]
cmp edx, esi
movzx ecx, di
jg 0x467ced
cmp cx, word [esp + 0x20]
jl 0x467ce3
cmp cx, word [esp + 0x1c]
jg 0x467ce3
add word [ebp + eax*2 + 0x80], 5
lea edx, [ebp + 0x80]
add ecx, 1
movsx edx, cx
cmp edx, esi
jle 0x467cc6
add ebx, 1
movsx eax, bx
add edi, 1
cmp eax, dword [esp + 0x30]
jle 0x467cb0
jmp 0x467d6c
mov ecx, dword [esp + 0x24]
add eax, 0xfffffffe
movzx ebx, ax
movsx eax, bx
add ecx, 2
cmp eax, ecx
mov dword [esp + 0x30], ecx
jg 0x467d6c
lea ecx, [ebx - 2]
movzx edi, cx
lea esp, [esp]
lea edx, [edi + 2]
cmp dx, 0x3f
ja 0x467d5d
movsx edx, di
lea esi, [eax + 2]
cmp edx, esi
movzx ecx, di
jg 0x467d5d
cmp cx, word [esp + 0x1c]
jl 0x467d53
cmp cx, word [esp + 0x20]
jg 0x467d53
add word [ebp + eax*2 + 0x80], 5
lea edx, [ebp + 0x80]
add ecx, 1
movsx edx, cx
cmp edx, esi
jle 0x467d36
add ebx, 1
movsx eax, bx
add edi, 1
cmp eax, dword [esp + 0x30]
jle 0x467d20
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
cmp cx, ax
jge 0x467dec
add ecx, 0xfffffffe
movsx eax, ax
movzx edi, cx
lea ecx, [eax + 2]
movsx eax, di
cmp eax, ecx
mov dword [esp + 0x30], ecx
jg 0x468080
lea ecx, [edi - 2]
movzx esi, cx
lea ebx, [ebx]
lea edx, [esi + 2]
cmp dx, 0x3f
ja 0x467dd8
movsx ebx, si
lea edx, [eax + 2]
cmp ebx, edx
movzx ecx, si
jg 0x467dd8
cmp cx, word [esp + 0x14]
jl 0x467dce
cmp cx, word [esp + 0x10]
jg 0x467dce
mov bx, word [esp + 0x28]
add word [ebp + eax*2], bx
add ecx, 1
movsx ebx, cx
cmp ebx, edx
jle 0x467db6
add edi, 1
movsx eax, di
add esi, 1
cmp eax, dword [esp + 0x30]
jle 0x467da0
jmp 0x468080
mov ecx, dword [esp + 0x2c]
add eax, 0xfffffffe
movzx edi, ax
movsx eax, di
add ecx, 2
cmp eax, ecx
mov dword [esp + 0x30], ecx
jg 0x468080
lea ecx, [edi - 2]
movzx esi, cx
mov edi, edi
lea edx, [esi + 2]
cmp dx, 0x3f
ja 0x467e48
movsx ebx, si
lea edx, [eax + 2]
cmp ebx, edx
movzx ecx, si
jg 0x467e48
cmp cx, word [esp + 0x10]
jl 0x467e3e
cmp cx, word [esp + 0x14]
jg 0x467e3e
mov bx, word [esp + 0x28]
add word [ebp + eax*2], bx
add ecx, 1
movsx ebx, cx
cmp ebx, edx
jle 0x467e26
add edi, 1
movsx eax, di
add esi, 1
cmp eax, dword [esp + 0x30]
jle 0x467e10
jmp 0x468080
mov ax, word [esp + 0x14]
cmp word [esp + 0x10], ax
je 0x467e91
mov eax, edi
sub eax, ebx
mov edx, ecx
js 0x467e72
mov edx, eax
mov eax, dword [esp + 0x30]
sub eax, dword [esp + 0x24]
mov ecx, esi
js 0x467e80
mov ecx, eax
lea eax, [edx + 1]
shl eax, 6
cdq
add ecx, 1
idiv ecx
movzx eax, ax
jmp 0x467e96
mov eax, 0x40
movsx eax, ax
lea ecx, [eax + eax*4]
mov ax, word [esp + 0x14]
sar ecx, 6
cmp word [esp + 0x10], ax
movzx edx, cx
mov dword [esp + 0x28], edx
jle 0x467f25
mov ecx, dword [esp + 0x14]
movsx eax, word [esp + 0x10]
add ecx, 0xfffffffe
movzx edi, cx
lea ecx, [eax + 2]
movsx eax, di
cmp eax, ecx
mov dword [esp + 0x30], ecx
jg 0x467f89
lea edx, [edi - 2]
movzx esi, dx
lea esp, [esp]
lea ecx, [esi + 2]
cmp cx, 0x3f
ja 0x467f14
movsx ebx, si
lea edx, [eax + 2]
cmp ebx, edx
movzx ecx, si
jg 0x467f14
cmp cx, word [esp + 0x14]
jl 0x467f0a
cmp cx, word [esp + 0x10]
jg 0x467f0a
add word [ebp + eax*2], 5
add ecx, 1
movsx ebx, cx
cmp ebx, edx
jle 0x467ef6
add edi, 1
movsx eax, di
add esi, 1
cmp eax, dword [esp + 0x30]
jle 0x467ee0
jmp 0x467f89
mov edx, dword [esp + 0x10]
add edx, 0xfffffffe
movzx edi, dx
movsx eax, di
add ebx, 2
cmp eax, ebx
jg 0x467f89
lea ecx, [edi - 2]
movzx esi, cx
nop
lea edx, [esi + 2]
cmp dx, 0x3f
ja 0x467f7c
movsx ebp, si
lea edx, [eax + 2]
cmp ebp, edx
movzx ecx, si
jg 0x467f78
cmp cx, word [esp + 0x10]
jl 0x467f6e
cmp cx, word [esp + 0x14]
jg 0x467f6e
mov ebp, dword [esp + 0x3c]
add word [ebp + eax*2], 5
add ecx, 1
movsx ebp, cx
cmp ebp, edx
jle 0x467f56
mov ebp, dword [esp + 0x3c]
add edi, 1
movsx eax, di
add esi, 1
cmp eax, ebx
jle 0x467f40
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
cmp ax, cx
jle 0x46800c
add ecx, 0xfffffffe
movsx eax, ax
movzx ebx, cx
lea ecx, [eax + 2]
movsx eax, bx
cmp eax, ecx
mov dword [esp + 0x30], ecx
jg 0x468080
lea ecx, [ebx - 2]
movzx edi, cx
lea edx, [edi + 2]
cmp dx, 0x3f
ja 0x467ffb
movsx edx, di
lea esi, [eax + 2]
cmp edx, esi
movzx ecx, di
jg 0x467ffb
lea ecx, [ecx]
cmp cx, word [esp + 0x20]
jl 0x467ff1
cmp cx, word [esp + 0x1c]
jg 0x467ff1
lea edx, [ebp + 0x80]
mov bp, word [esp + 0x28]
add word [edx + eax*2], bp
mov ebp, dword [esp + 0x3c]
add ecx, 1
movsx edx, cx
cmp edx, esi
jle 0x467fd0
add ebx, 1
movsx eax, bx
add edi, 1
cmp eax, dword [esp + 0x30]
jle 0x467fb7
jmp 0x468080
add eax, 0xfffffffe
movzx ebx, ax
movsx eax, cx
lea ecx, [eax + 2]
movsx eax, bx
cmp eax, ecx
mov dword [esp + 0x30], ecx
jg 0x468080
lea ecx, [ebx - 2]
movzx edi, cx
lea esp, [esp]
lea edx, [edi + 2]
cmp dx, 0x3f
ja 0x468071
movsx edx, di
lea esi, [eax + 2]
cmp edx, esi
movzx ecx, di
jg 0x468071
cmp cx, word [esp + 0x1c]
jl 0x468067
cmp cx, word [esp + 0x20]
jg 0x468067
lea edx, [ebp + 0x80]
mov bp, word [esp + 0x28]
add word [edx + eax*2], bp
mov ebp, dword [esp + 0x3c]
add ecx, 1
movsx edx, cx
cmp edx, esi
jle 0x468046
add ebx, 1
movsx eax, bx
add edi, 1
cmp eax, dword [esp + 0x30]
jle 0x468030
mov eax, dword [esp + 0x18]
mov al, byte [eax + 1]
cmp al, 0xff
jne 0x467ba0
xor ebx, ebx
xor esi, esi
lea edx, [ebp + 0x80]
cmp ebp, edx
mov eax, ebp
mov dword [esp + 0x30], ebx
mov dword [esp + 0x2c], esi
jae 0x4680ca
mov ecx, edx
sub ecx, ebp
jmp 0x4680b0
movzx edi, word [eax]
add ebx, edi
movzx edi, word [ecx + eax]
add eax, 2
add esi, edi
cmp eax, edx
jb 0x4680b0
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], ebx
xor esi, esi
xor edi, edi
cmp ebp, edx
mov ecx, ebp
jae 0x46811f
mov ebp, edx
sub ebp, dword [esp + 0x3c]
jmp 0x4680e4
mov ebx, dword [esp + 0x30]
movzx edx, word [ecx]
movzx eax, word [ecx + ebp]
add edi, eax
add esi, edx
mov eax, esi
shl eax, 6
sub eax, esi
cdq
idiv ebx
add ecx, 2
mov word [ecx - 2], ax
mov eax, edi
shl eax, 6
sub eax, edi
cdq
idiv dword [esp + 0x2c]
mov edx, dword [esp + 0x3c]
add edx, 0x80
cmp ecx, edx
mov word [ecx + ebp - 2], ax
jb 0x4680e0
mov eax, 0x3f
mov word [edx + 0x7e], ax
mov edx, dword [esp + 0x3c]
mov word [edx + 0x7e], ax
mov eax, dword [esp + 0x38]
cmp byte [eax], 0xff
jne 0x468148
lea esp, [esp]
add eax, 2
cmp byte [eax], 0xff
je 0x468140
cmp byte [eax + 1], 0xff
je 0x46817a
mov edi, edi
mov cl, byte [eax]
cmp cl, 0xff
je 0x468171
movzx esi, byte [eax + 1]
movzx ecx, cl
movzx ecx, byte [edx + ecx*2]
mov byte [eax], cl
lea ecx, [edx + 0x80]
movzx ecx, byte [ecx + esi*2]
mov byte [eax + 1], cl
add eax, 2
cmp byte [eax + 1], 0xff
jne 0x468150
pop edi
pop esi
pop ebp
xor ax, ax
pop ebx
add esp, 0x24
ret