Function at 0x408b20
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x2c
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
test eax, eax
sete al
cmp dword [ebp + 0xc], edx
setg dl
or eax, edx
xor edx, edx
test al, 1
jne 0x408bc5
mov ecx, dword [ebp + 8]
mov eax, dword [ecx]
or byte [eax], 1
mov eax, dword [ebp + 0x14]
test eax, eax
setg dl
xor eax, eax
cmp dword [ebp + 0xc], 0
sete al
test eax, edx
je 0x408bd0
mov eax, dword [ecx]
test byte [eax], 0x10
jne 0x408bd0
movzx eax, word [ecx + 0x1e]
mov edi, dword [ebp + 8]
mov ebx, dword [ebp + 0x14]
movzx edx, word [edi + 0x1c]
lea ecx, [eax + ebx]
movzx eax, dx
cmp eax, ecx
jge 0x408ee4
mov word [edi + 0x1e], dx
mov ecx, dword [ebp + 8]
test byte [ecx + 0x82], 2
je 0x408be2
movzx eax, word [ecx + 0x20]
test ax, ax
je 0x408be2
cmp ax, dx
je 0x408be2
mov dword [esp], ecx
mov ebx, dword [ebp + 0x14]
xor eax, eax
mov dword [esp + 4], eax
mov dword [esp + 8], ebx
call fcn.00408a90
mov edi, dword [ebp + 8]
movzx edx, word [edi + 0x1c]
jmp 0x408be2
mov edx, dword [ebp + 0x14]
add esp, 0x2c
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x408d70
mov ecx, dword [ebp + 8]
movzx edx, word [ecx + 0x1c]
mov ebx, dword [ebp + 8]
movzx ecx, dx
add dword [ebp + 0x10], ecx
mov eax, dword [ebx + 0x174]
test eax, eax
je 0x408c11
mov eax, dword [ebx]
movzx eax, byte [eax]
shr al, 4
mov edx, eax
movsx eax, word [ebx + 0x178]
and edx, 1
cmp edx, eax
je 0x408e19
mov eax, dword [ebp + 8]
xor ebx, ebx
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.004074f0
mov ecx, dword [ebp + 8]
mov esi, dword [ebp + 0x14]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x14]
movzx eax, word [edx + 0xa]
add eax, ecx
mov word [edx + 0xa], ax
mov eax, esi
mov edx, dword [ebp + 0xc]
sar eax, 0x1f
xor dword [ebp + 0x14], eax
sub dword [ebp + 0x14], eax
mov eax, dword [ebp + 0x10]
sub eax, edx
lea ebx, [eax + 1]
cmp ebx, dword [ebp + 0x14]
jge 0x408c55
mov dword [ebp + 0x14], ebx
test esi, esi
jle 0x408d82
xor ebx, ebx
mov esi, dword [ebp + 0xc]
cmp ebx, dword [ebp + 0x14]
jge 0x408ca9
mov eax, dword [ebp + 8]
mov edi, dword [ebp + 8]
mov edx, dword [eax + 0x104]
mov edi, dword [edi + 0x100]
mov ecx, dword [eax + 0x10c]
mov dword [ebp - 0x18], edx
mov edx, dword [eax + 0x114]
mov dword [ebp - 0x14], edi
nop
lea esi, [esi]
mov eax, dword [ecx + esi*4]
mov edi, dword [ebp - 0x14]
mov dword [edi + ebx*4], eax
mov eax, dword [edx + esi*4]
inc esi
mov edi, dword [ebp - 0x18]
mov dword [edi + ebx*4], eax
inc ebx
cmp ebx, dword [ebp + 0x14]
jl 0x408c90
mov esi, dword [ebp + 0xc]
mov eax, dword [ebp + 0x14]
lea ebx, [esi + eax]
cmp ebx, dword [ebp + 0x10]
jg 0x408ceb
mov edx, dword [ebp + 8]
mov edi, edx
mov ecx, dword [edx + 0x10c]
mov edi, dword [edi + 0x110]
mov edx, dword [edx + 0x114]
nop
movzx eax, word [edi + ebx*2]
mov word [edi + esi*2], ax
mov eax, dword [ecx + ebx*4]
mov dword [ecx + esi*4], eax
mov eax, dword [edx + ebx*4]
inc ebx
mov dword [edx + esi*4], eax
inc esi
cmp ebx, dword [ebp + 0x10]
jle 0x408cd0
mov edx, dword [ebp + 0x14]
sub dword [ebp + 0x10], edx
mov ebx, edx
mov esi, dword [ebp + 0x10]
inc esi
mov esi, esi
lea edi, [edi]
dec ebx
cmp ebx, 0xffffffff
je 0x408bc2
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x110]
mov edi, edx
mov ecx, dword [edx + 0x10c]
mov word [eax + esi*2], 0
mov eax, dword [edx + 0x100]
mov edx, dword [edx + 0x114]
mov eax, dword [eax + ebx*4]
mov dword [ecx + esi*4], eax
mov eax, dword [edi + 0x104]
mov eax, dword [eax + ebx*4]
mov dword [edx + esi*4], eax
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x408d50
inc esi
jmp 0x408d00
mov eax, dword [edi]
mov eax, dword [eax + 0x10]
mov dword [esp + 0xc], esi
inc esi
mov dword [esp + 0x10], eax
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp], edi
call fcn.00406fa0
jmp 0x408d00
mov eax, dword [ebp + 8]
movzx edx, word [eax + 0x1c]
movzx eax, dx
add dword [ebp + 0xc], eax
jmp 0x408be2
xor ebx, ebx
mov esi, dword [ebp + 0x10]
cmp ebx, dword [ebp + 0x14]
jge 0x408dc9
mov ecx, dword [ebp + 8]
mov edi, dword [ebp + 8]
mov ecx, dword [ecx + 0x100]
mov eax, dword [edi + 0x104]
mov edx, dword [edi + 0x114]
mov dword [ebp - 0x14], ecx
mov ecx, dword [edi + 0x10c]
mov dword [ebp - 0x18], eax
mov eax, dword [ecx + esi*4]
mov edi, dword [ebp - 0x14]
mov dword [edi + ebx*4], eax
mov eax, dword [edx + esi*4]
dec esi
mov edi, dword [ebp - 0x18]
mov dword [edi + ebx*4], eax
inc ebx
cmp ebx, dword [ebp + 0x14]
jl 0x408db0
mov esi, dword [ebp + 0x10]
mov eax, dword [ebp + 0x14]
mov ebx, esi
sub ebx, eax
cmp ebx, dword [ebp + 0xc]
jl 0x408e0b
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x10c]
mov edx, dword [eax + 0x114]
mov edi, dword [eax + 0x110]
lea esi, [esi]
movzx eax, word [edi + ebx*2]
mov word [edi + esi*2], ax
mov eax, dword [ecx + ebx*4]
mov dword [ecx + esi*4], eax
mov eax, dword [edx + ebx*4]
dec ebx
mov dword [edx + esi*4], eax
dec esi
cmp ebx, dword [ebp + 0xc]
jge 0x408df0
mov ebx, dword [ebp + 0x14]
mov esi, dword [ebp + 0xc]
neg dword [ebp + 0x14]
jmp 0x408d00
mov eax, dword [ebp + 8]
mov edi, dword [ebx + 0x17c]
mov eax, dword [eax + 0x18c]
lea ebx, [edi + ecx]
mov esi, eax
add esi, ecx
cmp ebx, dword [ebp + 0xc]
mov dword [ebp - 0x10], eax
setl al
xor edx, edx
cmp esi, dword [ebp + 0xc]
setg dl
test edx, eax
jne 0x408ef0
cmp ebx, dword [ebp + 0x10]
setl al
xor edx, edx
cmp esi, dword [ebp + 0x10]
setg dl
test edx, eax
jne 0x408ef0
mov eax, dword [ebp + 0x14]
mov ecx, ebx
sub ecx, eax
cmp ecx, dword [ebp + 0xc]
setl al
xor edx, edx
cmp ebx, dword [ebp + 0xc]
setge dl
test edx, eax
jne 0x408ef0
cmp ecx, dword [ebp + 0x10]
setg al
xor edx, edx
cmp ebx, dword [ebp + 0x10]
setle dl
test edx, eax
jne 0x408ef0
mov edx, dword [ebp + 0x14]
mov ecx, esi
sub ecx, edx
cmp ecx, dword [ebp + 0xc]
setl dl
xor ebx, ebx
cmp esi, dword [ebp + 0xc]
setge bl
test ebx, edx
jne 0x408ef0
cmp ecx, dword [ebp + 0x10]
setg dl
xor eax, eax
cmp esi, dword [ebp + 0x10]
setle al
test eax, edx
jne 0x408ef0
test ebx, eax
je 0x408c11
mov esi, dword [ebp + 0x14]
mov ecx, dword [ebp + 8]
mov ebx, dword [ebp + 0x14]
sub dword [ebp - 0x10], ebx
sub edi, esi
sub dword [ecx + 0x184], ebx
mov dword [ecx + 0x17c], edi
mov edi, dword [ebp - 0x10]
mov dword [ecx + 0x18c], edi
jmp 0x408c11
mov eax, dword [ebp + 8]
mov word [eax + 0x1e], cx
jmp 0x408b8a
mov edx, dword [ebp + 8]
xor eax, eax
xor edi, edi
mov dword [edx + 0x190], eax
xor eax, eax
mov dword [edx + 0x18c], eax
xor eax, eax
mov dword [edx + 0x188], eax
xor eax, eax
mov dword [edx + 0x184], eax
xor eax, eax
mov dword [edx + 0x180], eax
xor eax, eax
mov dword [edx + 0x17c], eax
mov dword [edx + 0x174], edi
jmp 0x408c11