Function at 0x686850
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
xor ebp, ebp
push edi
push esi
push ebx
sub esp, 0x3c
mov dword [esp + 0x28], eax
mov eax, dword [edx]
mov dword [esp + 0x24], edx
mov esi, dword [esp + 0x50]
mov dword [esp + 0x2c], ecx
test eax, eax
je 0x686878
cmp byte [eax], 0x78
je 0x6869f0
movzx eax, byte [esi]
test al, al
je 0x686a5e
mov edi, 1
mov edx, 1
xor edi, ebp
xor ebx, ebx
mov ecx, 1
mov byte [esp + 0x1f], dl
lea esi, [esi]
test cl, cl
je 0x6868b4
xor ecx, ecx
cmp ebx, 0x24
jg 0x6868b4
cmp byte [ebx + str.http:__www.w3.org_XML_1998_namespace], al
sete cl
cmp byte [esp + 0x1f], 0
je 0x6868d6
mov edx, edi
test dl, dl
je 0x6868d6
cmp ebx, 0x1d
mov byte [esp + 0x1f], 0
jg 0x6868d6
cmp byte [ebx + str.http:__www.w3.org_2000_xmlns_], al
sete byte [esp + 0x1f]
add ebx, 1
movzx eax, byte [esi + ebx]
test al, al
jne 0x6868a0
xor eax, eax
movzx edx, byte [esp + 0x1f]
cmp ebx, 0x24
sete al
and ecx, eax
xor eax, eax
cmp ebx, 0x1d
sete al
and edx, eax
mov eax, ebp
cmp cl, al
je 0x686914
cmp al, 1
sbb edi, edi
and edi, 2
add edi, 0x26
add esp, 0x3c
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
test dl, dl
mov edi, 0x28
jne 0x68690a
mov eax, dword [esp + 0x28]
mov ebp, dword [eax + 0x178]
cmp byte [eax + 0x1d8], 1
sbb ebx, 0xffffffff
test ebp, ebp
je 0x686a9c
cmp dword [ebp + 0x18], ebx
jl 0x686a69
mov eax, dword [ebp + 4]
mov edx, dword [esp + 0x28]
mov dword [edx + 0x178], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp + 0x14], ebx
mov dword [esp + 8], ebx
mov dword [esp + 4], esi
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov eax, dword [esp + 0x28]
movzx edx, byte [eax + 0x1d8]
test dl, dl
je 0x68697b
mov eax, dword [ebp + 0x10]
mov byte [eax + ebx - 1], dl
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x2c]
mov eax, dword [edx + 4]
mov dword [ebp], edx
mov dword [ebp + 0xc], ecx
mov dword [ebp + 8], eax
mov eax, ebp
cmp byte [esi], 0
je 0x686a40
mov ecx, dword [esp + 0x54]
xor edi, edi
mov edx, dword [esp + 0x24]
mov dword [edx + 4], eax
mov eax, dword [ecx]
mov dword [ebp + 4], eax
mov eax, dword [esp + 0x2c]
mov dword [ecx], ebp
test eax, eax
je 0x68690a
mov edx, dword [esp + 0x28]
mov eax, dword [edx + 0x64]
test eax, eax
je 0x68690a
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov ebp, dword [edx + 4]
test ebp, ebp
cmove esi, edi
mov dword [esp + 8], esi
mov edx, dword [edx]
mov dword [esp + 4], edx
mov edx, dword [ecx + 4]
mov dword [esp], edx
call eax
jmp 0x68690a
cmp byte [eax + 1], 0x6d
jne 0x686878
cmp byte [eax + 2], 0x6c
nop
jne 0x686878
movzx edx, byte [eax + 3]
test dl, dl
sete cl
cmp dl, 0x6e
mov ebp, ecx
jne 0x686878
xor ebp, ebp
cmp byte [eax + 4], 0x73
jne 0x686878
cmp byte [eax + 5], 0
mov edi, 0x27
je 0x68690a
jmp 0x686878
mov eax, dword [esp + 0x28]
mov edx, dword [eax + 0x164]
xor eax, eax
add edx, 0x98
cmp dword [esp + 0x24], edx
cmovne eax, ebp
jmp 0x68699a
xor edx, edx
xor ecx, ecx
xor ebx, ebx
jmp 0x6868fa
lea edx, [ebx + 0x18]
mov ecx, dword [esp + 0x28]
mov di, 1
mov dword [esp + 4], edx
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x20], edx
mov dword [esp], eax
call dword [ecx + 0x10]
mov edx, dword [esp + 0x20]
test eax, eax
je 0x68690a
mov dword [ebp + 0x10], eax
mov dword [ebp + 0x18], edx
jmp 0x686942
mov ecx, dword [esp + 0x28]
mov edi, 1
mov dword [esp], 0x1c
call dword [ecx + 0xc]
test eax, eax
mov ebp, eax
je 0x68690a
mov ecx, dword [esp + 0x28]
lea edx, [ebx + 0x18]
mov dword [esp], edx
mov dword [esp + 0x20], edx
call dword [ecx + 0xc]
mov edx, dword [esp + 0x20]
test eax, eax
mov dword [ebp + 0x10], eax
je 0x686add
mov dword [ebp + 0x18], edx
jmp 0x68694f
mov eax, dword [esp + 0x28]
mov dword [esp], ebp
call dword [eax + 0x14]
jmp 0x68690a