Function at 0x6d82d0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x24
mov esi, ecx
mov edi, dword [ebp + 0x14]
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
movzx ecx, word [ecx + 4]
mov word [ebp - 0x1a], cx
mov dword [ebp - 0x10], edx
test edx, edx
je 0x6d8322
mov ebx, eax
mov eax, ebx
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x14], esi
mov ebx, eax
jmp 0x6d8443
push 0
push ebx
call fcn.005f3170
add esp, 8
mov dword [ebp - 0x10], eax
jmp 0x6d82f5
xor ecx, ecx
movzx edx, word [eax + ecx]
add ecx, 2
cmp dx, word [ebp - 0x1a]
jae 0x6d8336
test dx, dx
jne 0x6d8324
cmp ecx, 2
sete dl
cmp dword [ebp + 0x10], 0
sete dh
lea ebx, [eax + ecx]
add ebx, 0xfffffffe
or dh, dl
jne 0x6d8358
mov ecx, dword [ebp + 0x10]
push edi
push ebx
push eax
call fcn.006d8210
cmp dword [edi], 0
jle 0x6d8312
mov eax, ebx
add esp, 0x24
pop esi
pop edi
pop ebx
pop ebp
ret 0x10
cmp eax, dword [ebp - 0x10]
mov ecx, dword [ebp + 0x10]
je 0x6d835d
xor eax, eax
cmp edi, 0x10000
setae al
lea ebx, [ebx + eax*2]
add ebx, 2
test ecx, ecx
jne 0x6d8427
mov eax, ebx
mov ebx, dword [ebp - 0x24]
mov esi, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x18]
cmp word [esi + 0xa], cx
ja 0x6d83a1
cmp word [esi + 0x1a], cx
ja 0x6d835d
movzx edx, cx
mov ecx, edx
shr ecx, 1
cmp edx, 0xfc00
mov edx, 0
cmovb ecx, edx
cmp byte [ebp - 0x20], cl
setbe dl
test cl, cl
sete dh
or dh, dl
mov edi, ebx
cmovne edi, eax
cmp cl, 2
cmovae edi, ebx
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x20], ecx
test dh, dh
jne 0x6d830b
jmp 0x6d835d
mov ebx, esi
mov eax, dword [ebp - 0x28]
cmp ebx, eax
je 0x6d8369
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x6d8547
push dword [ebp + 0x14]
push ebx
push dword [ebp - 0x28]
call fcn.006d8210
cmp ebx, dword [ebp - 0x10]
je 0x6d835d
test al, al
je 0x6d835d
xor eax, eax
cmp edi, 0x10000
setae al
lea ebx, [ebx + eax*2]
add ebx, 2
movzx eax, word [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push eax
push edi
call fcn.006d8570
test al, al
je 0x6d835d
cmp ebx, dword [ebp - 0x10]
je 0x6d835d
mov dword [ebp - 0x28], ebx
mov esi, ebx
jmp 0x6d845f
add esi, 2
mov ebx, esi
mov esi, ebx
cmp ebx, dword [ebp - 0x10]
je 0x6d83e3
movzx edi, word [esi]
cmp di, word [ebp - 0x1a]
jb 0x6d8453
mov eax, dword [ebp - 0x14]
mov edx, dword [eax + 0x1c]
mov ecx, dword [edx]
mov dword [ebp - 0x2c], edx
mov ebx, dword [edx + 4]
mov edx, edi
shr edx, 6
movzx ecx, word [ecx + edx*2]
mov edx, edi
and edx, 0x3f
mov dword [ebp - 0x30], ebx
lea edx, [ebx + edx*2]
movzx ebx, word [edx + ecx*2]
movzx ecx, word [eax + 0xa]
cmp cx, bx
setbe dl
mov dword [ebp - 0x18], ebx
and ebx, 0xfdff
cmp ebx, 0xfc00
setne dh
test dl, dh
je 0x6d8453
mov edx, edi
and edx, 0xfc00
cmp edx, 0xd800
jne 0x6d83e1
lea ebx, [esi + 2]
cmp ebx, dword [ebp - 0x10]
je 0x6d8458
movzx eax, word [ebx]
mov edx, eax
and edx, 0xfc00
cmp edx, 0xdc00
jne 0x6d8458
shl edi, 0xa
add edi, eax
add edi, 0xfca02400
mov eax, dword [ebp - 0x2c]
cmp edi, dword [eax + 0x10]
jl 0x6d84fc
mov eax, dword [eax + 0xc]
add eax, 0xfffffffe
jmp 0x6d850d
push edi
push eax
call fcn.0057b9f0
add esp, 8
mov ecx, dword [ebp - 0x14]
movzx ecx, word [ecx + 0xa]
mov edx, dword [ebp - 0x30]
movzx edx, word [edx + eax*2]
cmp cx, dx
setbe al
mov dword [ebp - 0x18], edx
mov ecx, edx
and ecx, 0xfdff
cmp ecx, 0xfc00
setne cl
and cl, al
mov eax, ecx
xor al, 1
movzx eax, al
lea ebx, [esi + eax*4]
test cl, cl
je 0x6d8458
jmp 0x6d83e3
cmp ebx, dword [ebp - 0x10]
je 0x6d835d
xor eax, eax
cmp edi, 0x10000
setae al
lea eax, [ebx + eax*2]
add eax, 2
mov dword [ebp - 0x20], 0
jmp 0x6d838f