Function at 0x1047dda8
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0xa8
mov eax, dword [0x105e0c00]
xor eax, esp
mov dword [esp + 0xa4], eax
mov eax, dword [ebp + 8]
xorps xmm0, xmm0
mov ecx, dword [ebp + 0x10]
mov dword [esp + 0x24], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [esp + 0x14], eax
mov esi, dword [eax + 0x18]
mov dword [esp + 0x20], ecx
movaps xmmword [esp + 0x30], xmm0
movaps xmmword [esp + 0x40], xmm0
movaps xmmword [esp + 0x50], xmm0
movaps xmmword [esp + 0x60], xmm0
movaps xmmword [esp + 0x70], xmm0
movaps xmmword [esp + 0x80], xmm0
movaps xmmword [esp + 0x90], xmm0
mov dword [esp + 0xc], esi
test esi, esi
jne 0x1047dbee
mov dword [esp + 0x10], esi
jmp 0x1047dc5d
xor edi, edi
xor eax, eax
xor ecx, ecx
mov dword [esp + 0x10], ecx
nop dword [eax + eax]
mov edx, 2
mov ecx, edi
shl edx, cl
cmp edx, esi
jb 0x1047dc14
lea edx, [esi - 1]
cmp eax, edx
ja 0x1047dc59
mov ecx, dword [esp + 0x14]
mov esi, dword [ecx + 8]
xor ecx, ecx
cmp eax, edx
ja 0x1047dc47
sub edx, eax
lea esi, [esi + eax*8]
inc edx
add esi, 4
add eax, edx
mov dword [esp + 0x18], eax
cmp dword [esi], 0xffffffff
lea eax, [ecx + 1]
lea esi, [esi + 8]
cmove eax, ecx
mov ecx, eax
sub edx, 1
jne 0x1047dc30
mov eax, dword [esp + 0x18]
add dword [esp + edi*4 + 0x30], ecx
inc edi
add dword [esp + 0x10], ecx
mov esi, dword [esp + 0xc]
cmp edi, 0x1c
jb 0x1047dc00
mov eax, dword [esp + 0x14]
mov edx, dword [eax + 0x14]
xor edi, edi
mov esi, dword [eax + 0x1c]
add edx, 4
movsd xmm2, qword [0x1055bbe8]
inc esi
mov dword [esp + 0xc], edi
cmp dword [edx], 0xffffffff
je 0x1047dcf8
cmp dword [edx + 8], 0xfffffff2
jae 0x1047dce9
movsd xmm1, qword [edx + 4]
movaps xmm0, xmm1
addsd xmm0, xmm2
movsd qword [esp + 0x18], xmm0
mov ecx, dword [esp + 0x18]
cmp ecx, 0x8000001
jae 0x1047dce9
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
ucomisd xmm1, xmm0
lahf
test ah, 0x44
jp 0x1047dce9
cmp ecx, 2
jle 0x1047dcd1
lea eax, [ecx - 1]
bsr eax, eax
inc dword [esp + eax*4 + 0x30]
mov eax, 1
add edi, eax
mov eax, dword [esp + 0xc]
inc eax
mov dword [esp + 0xc], eax
jmp 0x1047dcfc
xor eax, eax
inc dword [esp + eax*4 + 0x30]
mov eax, 1
add edi, eax
mov eax, dword [esp + 0xc]
inc eax
mov dword [esp + 0xc], eax
jmp 0x1047dcfc
xor eax, eax
add edi, eax
mov eax, dword [esp + 0xc]
inc eax
mov dword [esp + 0xc], eax
jmp 0x1047dcfc
mov eax, dword [esp + 0xc]
add edx, 0x18
sub esi, 1
jne 0x1047dc75
mov ecx, dword [esp + 0x10]
add edi, ecx
lea edx, [ecx + 1]
add edx, eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x10], edx
cmp dword [eax + 4], 0xfffffff2
jae 0x1047dd71
movsd xmm1, qword [eax]
movaps xmm0, xmm1
addsd xmm0, xmm2
movsd qword [esp + 0x20], xmm0
mov ecx, dword [esp + 0x20]
cmp ecx, 0x8000001
jae 0x1047dd71
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
ucomisd xmm1, xmm0
lahf
test ah, 0x44
jp 0x1047dd71
cmp ecx, 2
jle 0x1047dd64
lea eax, [ecx - 1]
bsr eax, eax
inc dword [esp + eax*4 + 0x30]
lea eax, [esi + 1]
jmp 0x1047dd73
xor eax, eax
inc dword [esp + eax*4 + 0x30]
mov eax, 1
jmp 0x1047dd73
xor eax, eax
add eax, edi
mov dword [esp + 0x18], 0
xor esi, esi
mov dword [esp + 0x20], eax
xor ecx, ecx
xor edi, edi
lea edx, [eax + eax]
mov dword [esp + 0xc], edx
cmp edx, 1
mov edx, dword [esp + 0x10]
jbe 0x1047dde0
lea edx, [eax + eax]
nop word [eax + eax]
cmp edi, eax
je 0x1047dddc
mov eax, dword [esp + ecx*4 + 0x30]
test eax, eax
je 0x1047ddcc
add edi, eax
mov edx, 1
shl edx, cl
lea eax, [edi + edi]
cmp eax, edx
mov edx, dword [esp + 0xc]
jbe 0x1047ddcc
mov esi, 2
mov dword [esp + 0x18], edi
shl esi, cl
inc esi
inc ecx
mov eax, 1
shl eax, cl
cmp edx, eax
mov eax, dword [esp + 0x20]
ja 0x1047dda0
mov edx, dword [esp + 0x10]
sub edx, dword [esp + 0x18]
je 0x1047ddf8
cmp edx, 1
jne 0x1047ddef
mov eax, edx
jmp 0x1047ddfa
lea eax, [edx - 1]
bsr eax, eax
inc eax
jmp 0x1047ddfa
xor eax, eax
push eax
push esi
push dword [esp + 0x1c]
push dword [esp + 0x38]
call fcn.1047de20
mov ecx, dword [esp + 0xbc]
add esp, 0x10
pop edi
pop esi
xor ecx, esp
call fcn.104b547f
mov esp, ebp
pop ebp
ret