Function at 0x56f220
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x13c
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov eax, dword [eax + 0x18]
add ebx, 0x10
push edi
mov dword [esp + 0x14], eax
mov ecx, dword [eax + 0x14]
mov byte [esp + 0x2c], 2
mov dword [ebx + 0x2c], ecx
mov edi, dword [eax + 0x1c]
xor ecx, ecx
mov word [ebx + 0xc], 2
mov dx, cx
mov dword [ebx + 8], ecx
mov word [esp + 0x2a], dx
mov dword [ebx + 8], 0xc
mov ax, word [ebx + 8]
mov edx, dword [0x6660d8]
mov word [esp + 0x28], cx
mov byte [esp + 0x2d], cl
mov byte [esp + 0x2e], cl
mov byte [esp + 0x2f], cl
mov word [esp + 0x30], cx
mov word [esp + 0x32], ax
mov edx, dword [edx + 0xec]
mov dword [esp + 0x18], edi
test dl, 0x10
mov al, 0xe
mov esi, 0x10
je 0x56f2a9
mov byte [esp + 0x34], 0xb
jmp 0x56f2ce
test dl, 4
je 0x56f2b5
mov byte [esp + 0x34], 9
jmp 0x56f2ce
test dl, dl
jns 0x56f2bf
mov byte [esp + 0x34], al
jmp 0x56f2ce
test dl, 2
mov byte [esp + 0x34], 8
jne 0x56f2ce
mov byte [esp + 0x34], 4
mov dword [ebx + 8], esi
mov dx, si
mov dword [ebx + 8], 0x14
mov si, word [ebx + 8]
mov word [esp + 0x3a], dx
mov word [esp + 0x42], si
mov esi, dword [0x6660d8]
mov edx, 6
mov byte [esp + 0x35], 0
mov byte [esp + 0x36], 1
mov byte [esp + 0x37], 0
mov word [esp + 0x38], cx
mov byte [esp + 0x3c], dl
mov byte [esp + 0x3d], 0
mov byte [esp + 0x3e], 2
mov byte [esp + 0x3f], 0
mov word [esp + 0x40], cx
test byte [esi + 0xec], 0x80
je 0x56f336
mov byte [esp + 0x44], al
mov dword [ebx + 8], 0x18
jmp 0x56f342
mov byte [esp + 0x44], 2
mov dword [ebx + 8], 0x20
mov word [ebx + 0xc], dx
lea eax, [edi*8]
mov edx, 0x20
mov byte [esp + 0x45], 0
sub edx, eax
mov eax, dword [ebx + 8]
cmp eax, edx
mov byte [esp + 0x46], 3
mov byte [esp + 0x47], 0
mov esi, 4
jbe 0x56f3f4
cmp edi, ecx
mov dword [esp + 0xc], ecx
jbe 0x56f440
mov eax, dword [esp + 0x14]
lea edi, [eax + 0x34]
mov edx, dword [esp + 0x14]
mov cx, word [ebx + 8]
mov word [esp + esi*8 + 0x2a], cx
mov ecx, dword [edi]
mov eax, dword [edx + 0x14]
mov word [esp + esi*8 + 0x28], 0
push eax
push ecx
call fcn.005b9d40
mov dl, byte [esp + 0x14]
mov byte [esp + esi*8 + 0x34], al
and eax, 0xff
mov byte [esp + esi*8 + 0x35], 0
push eax
mov byte [esp + esi*8 + 0x3a], 5
mov byte [esp + esi*8 + 0x3b], dl
call fcn.005b68d0
mov ecx, dword [ebx + 8]
add esp, 0xc
add ecx, eax
mov eax, 0x10
mov dword [ebx + 8], ecx
mov ecx, dword [esp + 0xc]
shl eax, cl
inc esi
add edi, 4
or word [ebx + 0xc], ax
mov eax, dword [esp + 0x18]
inc ecx
cmp ecx, eax
mov dword [esp + 0xc], ecx
jb 0x56f386
jmp 0x56f440
cmp edi, ecx
jbe 0x56f440
mov edi, dword [esp + 0x18]
mov edx, 6
mov ax, word [ebx + 8]
mov word [esp + esi*8 + 0x28], 0
mov word [esp + esi*8 + 0x2a], ax
mov eax, dword [ebx + 8]
add eax, 8
mov byte [esp + esi*8 + 0x2c], 1
mov dword [ebx + 8], eax
mov eax, 0x10
shl eax, cl
mov byte [esp + esi*8 + 0x2d], 0
mov byte [esp + esi*8 + 0x2e], 5
mov byte [esp + esi*8 + 0x2f], cl
inc esi
or edx, eax
inc ecx
cmp ecx, edi
jb 0x56f401
mov word [ebx + 0xc], dx
mov edi, dword [ebp + 0xc]
lea ecx, [esp + 0x28]
mov word [esp + esi*8 + 0x28], 0xff
mov word [esp + esi*8 + 0x2a], 0
lea eax, [edi + 0x34]
mov byte [esp + esi*8 + 0x2c], 0x11
push eax
push ecx
mov byte [esp + esi*8 + 0x35], 0
mov byte [esp + esi*8 + 0x36], 0
mov byte [esp + esi*8 + 0x37], 0
mov dword [esp + 0x28], eax
call fcn.005960b0
mov edx, dword [esp + 0x1c]
mov ecx, dword [ebx + 8]
lea esi, [ebx + 4]
mov eax, dword [edx + 0x14]
push esi
imul eax, ecx
push ebx
push eax
push ecx
mov byte [ebx + 0xe], 1
call fcn.0059bf20
add esp, 0x18
test eax, eax
je 0x56f524
mov eax, dword [edi + 4]
mov dword [edi + 0x30], 0
mov dword [esp + 0xc], eax
lea ecx, [edi + 0x54]
mov eax, dword [esi]
xor edx, edx
div dword [ebx + 8]
mov edx, dword [ecx - 0x10]
add ecx, 0x24
add eax, edx
mov dword [ecx - 0x24], eax
mov eax, dword [esp + 0xc]
dec eax
mov dword [esp + 0xc], eax
jne 0x56f4b0
mov ecx, dword [edi + 4]
mov esi, dword [esp + 0x18]
mov dword [esp + 0xc], ecx
add edi, 0x50
mov edx, dword [edi - 8]
push edx
call fcn.00567990
add esp, 4
cmp eax, 2
jne 0x56f4f5
mov eax, dword [0x6660e4]
mov dword [edi], eax
jmp 0x56f516
cmp esi, 1
jne 0x56f504
mov ecx, dword [0x6660dc]
mov dword [edi], ecx
jmp 0x56f516
mov eax, dword [0x6660e0]
xor edx, edx
cmp esi, 2
setne dl
dec edx
and edx, eax
mov dword [edi], edx
mov eax, dword [esp + 0xc]
add edi, 0x24
dec eax
mov dword [esp + 0xc], eax
jne 0x56f4db
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x10]
push edx
lea edx, [esp + 0xbc]
mov eax, dword [eax]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x10]
mov edi, dword [esp + 0x14]
mov esi, dword [ebx + 8]
lea edx, [esp + 0x1c]
push 0x800
push edx
mov edx, dword [edi + 0x14]
imul edx, esi
mov eax, dword [ebx]
push edx
mov edx, dword [ebx + 4]
mov dword [esp + 0x18], esi
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0x2c]
test eax, eax
jl 0x56f87d
mov eax, dword [edi + 0x1c]
mov ecx, dword [edi + 0x5c]
mov dword [esp + 0x20], eax
xor eax, eax
mov ecx, dword [ecx + 0x14]
mov dl, byte [esp + eax*8 + 0xbe]
test dl, dl
jne 0x56f592
mov dl, byte [esp + eax*8 + 0xbf]
test dl, dl
je 0x56f595
inc eax
jmp 0x56f57c
push esi
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x20]
mov edx, dword [esi + 0x14]
push edx
push ecx
xor ecx, ecx
xor edx, edx
mov cx, word [esp + eax*8 + 0xc6]
mov dl, byte [esp + eax*8 + 0xc8]
add ecx, edi
push ecx
push edx
call fcn.005b7090
mov eax, dword [0x665e78]
xor edx, edx
add esp, 0x14
mov edi, dword [eax + esi]
mov eax, dword [esi + 0x14]
cmp eax, edx
mov dword [esp + 0x24], edi
mov ecx, dword [edi + 0x18]
je 0x56f617
dec eax
mov dword [esp + 0x10], eax
fld dword [ecx]
fcomp dword [0x6222d4]
fnstsw ax
and eax, 0x100
jne 0x56f5fb
mov dword [ecx], 0x3f800000
mov dword [ecx + 4], edx
jmp 0x56f606
fld dword [0x6222d4]
fsub dword [ecx]
fstp dword [ecx + 4]
mov dword [ecx + 8], edx
mov dword [ecx + 0xc], edx
mov eax, dword [esp + 0x10]
add ecx, 0x10
cmp eax, edx
jne 0x56f5da
dec eax
mov dword [esp + 0x10], eax
xor eax, eax
cmp byte [esp + eax*8 + 0xbe], 1
jne 0x56f633
mov cl, byte [esp + eax*8 + 0xbf]
test cl, cl
je 0x56f636
inc eax
jmp 0x56f61e
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x14]
mov esi, dword [esp + 0x1c]
push ecx
mov ecx, dword [edx + 0x14]
mov edx, dword [edi + 0x18]
push ecx
xor ecx, ecx
mov cx, word [esp + eax*8 + 0xc2]
push edx
xor edx, edx
add ecx, esi
mov dl, byte [esp + eax*8 + 0xc8]
push ecx
push edx
call fcn.005b68e0
add esp, 0x14
xor esi, esi
cmp byte [esp + esi*8 + 0xbe], 2
jne 0x56f681
mov al, byte [esp + esi*8 + 0xbf]
test al, al
je 0x56f684
inc esi
jmp 0x56f66c
mov eax, dword [ebp + 0x10]
mov ecx, dword [0x6660b8]
cmp eax, ecx
ja 0x56f6ee
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x1c]
mov edi, dword [edi + 0x14]
xor eax, eax
mov ax, word [esp + esi*8 + 0xba]
mov esi, eax
mov eax, dword [ecx + 0x14]
add esi, edx
test eax, eax
je 0x56f7ab
mov edx, dword [esp + 0xc]
dec eax
add edi, 4
mov dword [esp + 0x10], eax
mov eax, dword [edi - 4]
mov cl, al
and ecx, 0xff
lea ecx, [ecx + ecx*2]
mov word [esi], cx
xor ecx, ecx
mov cl, ah
mov eax, ecx
lea eax, [eax + eax*2]
mov word [esi + 2], ax
mov eax, dword [esp + 0x10]
add esi, edx
test eax, eax
jne 0x56f6b9
jmp 0x56f7ab
mov ecx, dword [edi + 4]
cmp eax, 1
mov dword [esp + 0x18], ecx
mov ecx, dword [edi + 8]
mov dword [esp + 0x10], ecx
mov byte [0x665fb8], 0
jbe 0x56f729
lea ecx, [eax - 1]
or eax, 0xffffffff
mov edx, ecx
mov edi, 0x665fb9
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x10]
mov edi, dword [esp + 0x24]
mov edx, dword [esp + 0x18]
xor eax, eax
test edx, edx
mov dword [esp + 0x10], eax
jbe 0x56f74f
xor edx, edx
mov dl, byte [ecx + eax]
mov byte [edx + 0x665fb8], al
mov edx, dword [esp + 0x18]
inc eax
cmp eax, edx
mov dword [esp + 0x10], eax
jb 0x56f737
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x1c]
mov edi, dword [edi + 0x14]
xor eax, eax
mov ax, word [esp + esi*8 + 0xba]
mov esi, eax
mov eax, dword [ecx + 0x14]
add esi, edx
test eax, eax
je 0x56f7ab
dec eax
xor edx, edx
mov dword [esp + 0x10], eax
mov eax, dword [edi]
mov dl, ah
and eax, 0xff
add edi, 4
movsx eax, byte [eax + 0x665fb8]
movsx ecx, byte [edx + 0x665fb8]
lea eax, [eax + eax*2]
mov word [esi], ax
mov eax, dword [esp + 0xc]
lea ecx, [ecx + ecx*2]
mov word [esi + 2], cx
add esi, eax
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x56f76f
mov edx, dword [esp + 0x14]
dec eax
mov dword [esp + 0x10], eax
mov eax, dword [edx + 0x5c]
mov ecx, dword [eax + 0x18]
xor eax, eax
cmp byte [esp + eax*8 + 0xbe], 3
jne 0x56f7d1
mov dl, byte [esp + eax*8 + 0xbf]
test dl, dl
je 0x56f7d4
inc eax
jmp 0x56f7bc
mov edx, dword [esp + 0xc]
push edx
mov edx, dword [esp + 0x18]
mov edx, dword [edx + 0x14]
push edx
mov edx, dword [esp + 0x24]
push ecx
xor ecx, ecx
mov cx, word [esp + eax*8 + 0xc6]
add ecx, edx
xor edx, edx
mov dl, byte [esp + eax*8 + 0xc8]
push ecx
push edx
call fcn.005b7090
mov eax, dword [esp + 0x34]
add esp, 0x14
test eax, eax
je 0x56f875
xor esi, esi
test eax, eax
jbe 0x56f875
mov eax, dword [esp + 0x14]
lea edi, [eax + 0x34]
mov ecx, dword [edi]
xor eax, eax
cmp byte [esp + eax*8 + 0xbe], 5
jne 0x56f835
xor edx, edx
mov dl, byte [esp + eax*8 + 0xbf]
cmp edx, esi
je 0x56f838
inc eax
jmp 0x56f81e
mov edx, dword [esp + 0xc]
push edx
mov edx, dword [esp + 0x18]
mov edx, dword [edx + 0x14]
push edx
mov edx, dword [esp + 0x24]
push ecx
xor ecx, ecx
mov cx, word [esp + eax*8 + 0xc6]
add ecx, edx
xor edx, edx
mov dl, byte [esp + eax*8 + 0xc8]
push ecx
push edx
call fcn.005b8aa0
mov eax, dword [esp + 0x34]
add esp, 0x14
inc esi
add edi, 4
cmp esi, eax
jb 0x56f81a
mov ebx, dword [ebx]
push ebx
mov eax, dword [ebx]
call dword [eax + 0x30]
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret