Function at 0x1004c254
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x54
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x14], 0x10004b20
lea eax, [ebp - 0x18]
mov esi, dword fs:[0]
mov dword [ebp - 0x18], esi
mov dword fs:[0], eax
mov eax, dword [ecx + 0xc]
add edx, eax
jae 0x1004bf93
push 1
call fcn.10035770
add esp, 4
jmp 0x1004c416
mov esi, dword [ecx + 4]
mov edi, ecx
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x24], edi
lea ebx, [esi + 1]
mov dword [ebp - 0x34], esi
mov eax, ebx
mov ecx, ebx
shr eax, 3
and ecx, 0xfffffff8
sub ecx, eax
cmp esi, 8
cmovb ecx, esi
mov eax, ecx
shr eax, 1
cmp edx, eax
jbe 0x1004bfec
inc ecx
cmp edx, ecx
cmova ecx, edx
cmp ecx, 8
jae 0x1004c065
xor eax, eax
cmp ecx, 4
setae al
lea esi, [eax*4 + 4]
mov ecx, 0x18
mov eax, esi
mul ecx
jo 0x1004bf84
jmp 0x1004c0a3
mov edx, ebx
mov eax, dword [edi]
xor ecx, ecx
shr edx, 4
test bl, 0xf
setne cl
add ecx, edx
je 0x1004c026
movdqa xmm0, xmmword [0x1004f590]
mov edx, eax
nop dword [eax]
pxor xmm1, xmm1
dec ecx
pcmpgtb xmm1, xmmword [edx]
por xmm1, xmm0
movdqa xmmword [edx], xmm1
lea edx, [edx + 0x10]
jne 0x1004c010
mov esi, dword [ebp - 0x20]
cmp ebx, 0x10
jae 0x1004c101
push ebx
push eax
add eax, 0x10
push eax
call fcn.1003eb30
add esp, 0xc
mov eax, dword [ebp - 0x24]
test ebx, ebx
mov dword [ebp - 0x54], 0x10004930
mov dword [ebp - 0x50], 0x18
mov ebx, eax
mov dword [ebp - 0x58], eax
jne 0x1004c129
xor eax, eax
jmp 0x1004c40c
cmp ecx, 0x1fffffff
ja 0x1004bf84
shl ecx, 3
mov edx, 0x24924925
mov esi, 0xffffffff
mov eax, ecx
mul edx
sub ecx, edx
shr ecx, 1
add ecx, edx
shr ecx, 2
dec ecx
bsr ecx, ecx
not ecx
shr esi, cl
inc esi
mov ecx, 0x18
mov eax, esi
mul ecx
jo 0x1004bf84
add eax, 0xf
lea ebx, [esi + 0x10]
and eax, 0xfffffff0
mov edi, eax
add edi, ebx
jb 0x1004bf84
cmp edi, 0x7ffffff1
jae 0x1004bf84
test edi, edi
mov dword [ebp - 0x28], eax
je 0x1004c428
movzx ecx, byte [0x100da049]
push 0x10
push edi
call fcn.1000c280
add esp, 8
mov ecx, eax
mov eax, dword [ebp - 0x28]
test ecx, ecx
mov dword [ebp - 0x20], ecx
jne 0x1004c42f
push edi
push 0x10
push 1
call fcn.100357c0
add esp, 0xc
jmp 0x1004c416
movq xmm0, qword [eax]
movq xmm1, qword [eax + 8]
movq qword [eax + ebx + 8], xmm1
movq qword [eax + ebx], xmm0
mov ebx, dword [ebp - 0x24]
mov dword [ebp - 0x54], 0x10004930
mov dword [ebp - 0x50], 0x18
mov dword [ebp - 0x58], ebx
xor edi, edi
jmp 0x1004c158
mov ebx, dword [ebp - 0x20]
mov edi, dword [ebp - 0x28]
mov esi, dword [ebp - 0x24]
shr ebx, 0x19
lea eax, [edi - 0x10]
mov byte [ecx + edi], bl
and edx, eax
mov eax, dword [esi]
mov byte [eax + edx + 0x10], bl
mov ebx, esi
cmp edi, dword [ebp - 0x34]
lea edi, [edi + 1]
je 0x1004c3f3
mov eax, dword [ebx]
cmp byte [eax + edi], 0x80
jne 0x1004c14c
lea ecx, [edi*8]
mov edx, eax
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x10], 1
lea ecx, [ecx + ecx*2]
sub edx, ecx
lea ecx, [edx - 0x18]
mov dword [ebp - 0x38], edx
mov dword [ebp - 0x2c], ecx
mov ecx, edi
neg ecx
lea ecx, [ecx + ecx*2]
mov dword [ebp - 0x30], ecx
nop dword [eax + eax]
mov ecx, dword [ebp - 0x30]
lea eax, [eax + ecx*8 - 0x18]
push eax
push dword [ebp + 8]
call fcn.10008870
add esp, 8
mov edx, dword [ebp - 0x24]
mov dword [ebp - 0x20], eax
mov ecx, dword [edx]
mov edx, dword [edx + 4]
mov esi, edx
and esi, eax
movdqu xmm0, xmmword [ecx + esi]
mov eax, esi
mov ebx, esi
pmovmskb edi, xmm0
test edi, edi
jne 0x1004c1e4
mov esi, 0x10
mov ebx, eax
nop word [eax + eax]
add ebx, esi
add esi, 0x10
and ebx, edx
movdqu xmm0, xmmword [ecx + ebx]
pmovmskb edi, xmm0
test edi, edi
je 0x1004c1d0
tzcnt edi, edi
add edi, ebx
and edi, edx
cmp byte [ecx + edi], 0
js 0x1004c1fe
movdqa xmm0, xmmword [ecx]
pmovmskb esi, xmm0
tzcnt edi, esi
mov esi, dword [ebp - 0x28]
mov ebx, edi
sub ebx, eax
sub esi, eax
xor ebx, esi
and ebx, edx
cmp ebx, 0x10
jb 0x1004c130
mov ebx, dword [ebp - 0x20]
lea esi, [edi - 0x10]
movzx eax, byte [ecx + edi]
and esi, edx
mov edx, dword [ebp - 0x24]
shr ebx, 0x19
cmp al, 0xff
lea eax, [edi*8]
mov byte [ecx + edi], bl
lea eax, [eax + eax*2]
mov edx, dword [edx]
mov byte [edx + esi + 0x10], bl
je 0x1004c3b0
mov esi, dword [ebp - 0x38]
sub ecx, eax
movzx edx, byte [ecx - 0x18]
movzx eax, byte [esi - 0x18]
mov byte [esi - 0x18], dl
mov byte [ecx - 0x18], al
movzx eax, byte [esi - 0x17]
movzx edx, byte [ecx - 0x17]
mov byte [esi - 0x17], dl
mov byte [ecx - 0x17], al
movzx eax, byte [esi - 0x16]
movzx edx, byte [ecx - 0x16]
mov byte [esi - 0x16], dl
mov byte [ecx - 0x16], al
movzx eax, byte [esi - 0x15]
movzx edx, byte [ecx - 0x15]
mov byte [esi - 0x15], dl
mov byte [ecx - 0x15], al
movzx eax, byte [esi - 0x14]
movzx edx, byte [ecx - 0x14]
mov byte [esi - 0x14], dl
mov byte [ecx - 0x14], al
movzx eax, byte [esi - 0x13]
movzx edx, byte [ecx - 0x13]
mov byte [esi - 0x13], dl
mov byte [ecx - 0x13], al
movzx eax, byte [esi - 0x12]
movzx edx, byte [ecx - 0x12]
mov byte [esi - 0x12], dl
mov byte [ecx - 0x12], al
movzx eax, byte [esi - 0x11]
movzx edx, byte [ecx - 0x11]
mov byte [esi - 0x11], dl
mov byte [ecx - 0x11], al
movzx eax, byte [esi - 0x10]
movzx edx, byte [ecx - 0x10]
mov byte [esi - 0x10], dl
mov byte [ecx - 0x10], al
movzx eax, byte [esi - 0xf]
movzx edx, byte [ecx - 0xf]
mov byte [esi - 0xf], dl
mov byte [ecx - 0xf], al
movzx eax, byte [esi - 0xe]
movzx edx, byte [ecx - 0xe]
mov byte [esi - 0xe], dl
mov byte [ecx - 0xe], al
movzx eax, byte [esi - 0xd]
movzx edx, byte [ecx - 0xd]
mov byte [esi - 0xd], dl
mov byte [ecx - 0xd], al
movzx eax, byte [esi - 0xc]
movzx edx, byte [ecx - 0xc]
mov byte [esi - 0xc], dl
mov byte [ecx - 0xc], al
movzx eax, byte [esi - 0xb]
movzx edx, byte [ecx - 0xb]
mov byte [esi - 0xb], dl
mov byte [ecx - 0xb], al
movzx eax, byte [esi - 0xa]
movzx edx, byte [ecx - 0xa]
mov byte [esi - 0xa], dl
mov byte [ecx - 0xa], al
movzx eax, byte [esi - 9]
movzx edx, byte [ecx - 9]
mov byte [esi - 9], dl
mov byte [ecx - 9], al
movzx eax, byte [esi - 8]
movzx edx, byte [ecx - 8]
mov byte [esi - 8], dl
mov byte [ecx - 8], al
movzx eax, byte [esi - 7]
movzx edx, byte [ecx - 7]
mov byte [esi - 7], dl
mov byte [ecx - 7], al
movzx eax, byte [esi - 6]
movzx edx, byte [ecx - 6]
mov byte [esi - 6], dl
mov byte [ecx - 6], al
movzx eax, byte [esi - 5]
movzx edx, byte [ecx - 5]
mov byte [esi - 5], dl
mov byte [ecx - 5], al
movzx eax, byte [esi - 4]
movzx edx, byte [ecx - 4]
mov byte [esi - 4], dl
mov byte [ecx - 4], al
movzx eax, byte [esi - 3]
movzx edx, byte [ecx - 3]
mov byte [esi - 3], dl
mov byte [ecx - 3], al
movzx eax, byte [esi - 2]
movzx edx, byte [ecx - 2]
mov byte [esi - 2], dl
mov byte [ecx - 2], al
movzx eax, byte [esi - 1]
movzx edx, byte [ecx - 1]
mov byte [esi - 1], dl
mov byte [ecx - 1], al
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x10], 1
mov eax, dword [eax]
jmp 0x1004c190
mov ebx, dword [ebp - 0x24]
mov edi, dword [ebp - 0x28]
neg eax
lea eax, [ecx + eax - 0x18]
mov ecx, dword [ebp - 0x2c]
mov esi, dword [ebx]
lea edx, [edi - 0x10]
and edx, dword [ebx + 4]
mov byte [esi + edi], 0xff
mov esi, dword [ebx]
mov byte [esi + edx + 0x10], 0xff
movsd xmm0, qword [ecx + 0x10]
movsd qword [eax + 0x10], xmm0
movq xmm0, qword [ecx]
movq xmm1, qword [ecx + 8]
movq qword [eax + 8], xmm1
movq qword [eax], xmm0
jmp 0x1004c14c
mov ecx, dword [ebx + 4]
mov esi, dword [ebx + 0xc]
lea eax, [ecx + 1]
mov edx, eax
and eax, 0xfffffff8
shr edx, 3
sub eax, edx
cmp ecx, 8
cmovb eax, ecx
sub eax, esi
mov dword [ebx + 8], eax
mov eax, bind
mov ecx, dword [ebp - 0x18]
mov dword fs:[0], ecx
add esp, 0x54
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [ebp - 0x20], 0x10
mov edx, dword [ebp - 0x24]
mov edi, esi
and edi, 0xfffffff8
lea ecx, [edx + 0x10]
mov dword [ebp - 0x30], ecx
mov ecx, esi
shr ecx, 3
sub edi, ecx
lea ecx, [esi - 1]
cmp esi, 9
mov esi, dword [ebp - 0x20]
mov dword [ebp - 0x2c], ecx
cmovb edi, ecx
add esi, eax
push ebx
mov ebx, edx
push 0xff
push esi
call fcn.1003f460
add esp, 0xc
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x5c], edi
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x54], 0x18
mov dword [ebp - 0x50], 0x10
mov dword [ebp - 0x4c], esi
mov dword [ebp - 0x48], ecx
mov ecx, dword [ebx + 0xc]
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x40], 0
test ecx, ecx
je 0x1004c5f1
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x20]
lea eax, [edx + eax - 0x18]
xor edx, edx
mov dword [ebp - 0x60], eax
mov eax, dword [ebx]
movdqa xmm0, xmmword [eax]
pmovmskb esi, xmm0
not esi
jmp 0x1004c525
lea edx, [ecx - 0x10]
shr eax, 0x19
and edx, edi
mov byte [esi + ecx], al
shl ecx, 3
mov byte [esi + edx + 0x10], al
mov eax, dword [ebp - 0x34]
lea ecx, [ecx + ecx*2]
mov edx, dword [ebx]
shl eax, 3
lea esi, [eax + eax*2]
mov eax, edx
sub eax, esi
neg esi
movsd xmm0, qword [edx + esi - 0x10]
mov esi, dword [ebp - 0x38]
lea edx, [esi - 1]
and edx, esi
mov esi, dword [ebp - 0x60]
sub esi, ecx
mov ecx, dword [ebp - 0x28]
movsd qword [esi + 8], xmm0
movq xmm0, qword [eax - 0x18]
movq xmm1, qword [eax - 8]
mov eax, dword [ebp - 0x20]
dec ecx
test ecx, ecx
movq qword [esi + 0x10], xmm1
movq qword [esi], xmm0
mov esi, edx
mov edx, dword [ebp - 0x30]
je 0x1004c5ec
test si, si
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x28], ecx
jne 0x1004c563
mov eax, dword [ebp - 0x20]
nop word cs:[eax + eax]
nop dword [eax]
movdqa xmm0, xmmword [eax + 0x10]
add eax, 0x10
add edx, 0x10
pmovmskb esi, xmm0
cmp esi, 0xffff
je 0x1004c540
not esi
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x10], 0
tzcnt ecx, esi
mov eax, dword [ebx]
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x10], 0
add ecx, edx
mov dword [ebp - 0x34], ecx
neg ecx
lea ecx, [ecx + ecx*2]
lea eax, [eax + ecx*8 - 0x18]
push eax
push dword [ebp + 8]
call fcn.10008870
add esp, 8
mov edi, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x3c]
mov edx, edi
and edx, eax
movdqu xmm0, xmmword [esi + edx]
pmovmskb ecx, xmm0
test ecx, ecx
jne 0x1004c5c6
mov ebx, esi
mov esi, 0x10
nop
add edx, esi
add esi, 0x10
and edx, edi
movdqu xmm0, xmmword [ebx + edx]
pmovmskb ecx, xmm0
test ecx, ecx
je 0x1004c5b0
mov esi, ebx
tzcnt ecx, ecx
mov ebx, dword [ebp - 0x24]
add ecx, edx
and ecx, edi
cmp byte [esi + ecx], 0
js 0x1004c4c0
movdqa xmm0, xmmword [esi]
pmovmskb ecx, xmm0
tzcnt ecx, ecx
jmp 0x1004c4c0
mov eax, dword [ebx + 0xc]
jmp 0x1004c5f6
mov edi, dword [ebp - 0x2c]
xor eax, eax
mov edx, dword [ebp - 0x3c]
mov ecx, dword [ebx]
mov esi, dword [ebx + 4]
mov dword [ebx], edx
mov dword [ebx + 4], edi
mov edi, dword [ebp - 0x5c]
sub edi, eax
test esi, esi
mov dword [ebx + 8], edi
mov dword [ebx + 0xc], eax
je 0x1004c411
lea eax, [esi + 1]
mov edx, 0x18
mul edx
add eax, 0xf
and eax, 0xfffffff0
add esi, eax
add esi, 0x11
je 0x1004c411
sub ecx, eax
push 0x10
push esi
push ecx
call fcn.1000c290
add esp, 0xc
jmp 0x1004c411