Function at 0x674c60
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x54
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
mov edx, dword [ebp + 0xc]
xor eax, eax
push ebx
mov ebx, dword [edx]
mov dword [esp + 0x18], ecx
mov ecx, dword [ebp + 0x20]
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov eax, dword [ebp + 0x30]
mov dword [esp + 0x50], eax
lea edx, [ecx + 6]
push esi
mov esi, dword [ebp + 0x34]
mov eax, 0xfffffffe
mov dword [esp + 0x58], ebx
mov dword [esp + 0x10], edx
cmp byte [ebx], 0x7e
push edi
mov dword [esp + 0x18], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0x28], eax
jne 0x674ce1
movzx eax, byte [ebx + 3]
movzx edx, byte [ebx + 4]
shl eax, 8
or eax, edx
mov dword [esp + 0x3c], eax
mov word [esp + 0x54], ax
mov eax, dword [esi + 0x20]
mov dword [esp + 0x50], eax
xor edx, edx
lea eax, [esp + 0x50]
mov word [esp + 0x56], dx
mov dword [esi + 0x20], eax
mov byte [ebx + 1], 0
lea eax, [ebx + 1]
mov dword [esp + 0x48], eax
lea eax, [ebx + 2]
mov byte [eax], 0
mov edi, dword [esi + 0x34]
mov dword [esp + 0x4c], eax
mov eax, dword [ebp + 0x38]
neg eax
lea ebx, [ebx + ecx + 3]
sbb eax, eax
lea ecx, [esp + 0x14]
and eax, ecx
mov dword [esp + 0x30], edi
mov dword [esp + 0x40], edi
mov dword [esp + 0x44], eax
cmp dword [ebp + 0x1c], 0
mov dword [esp + 0x1c], ebx
je 0x674d27
mov edx, dword [esp + 0x40]
mov dword [esi + 0x34], edx
cmp dword [ebp + 0x18], 0
je 0x674d46
mov byte [ebx], 0x76
inc ebx
mov word [ebx], 0
mov dword [esp + 0x38], ebx
add ebx, 2
add dword [esp + 0x14], 3
mov dword [esp + 0x1c], ebx
push eax
mov eax, dword [ebp + 0x24]
push esi
push eax
lea ecx, [esp + 0x64]
push ecx
mov ecx, dword [ebp + 0x14]
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x48]
push eax
push ecx
lea edx, [esp + 0x3c]
push edx
lea eax, [esp + 0x3c]
push eax
lea ecx, [ebp + 8]
push ecx
call fcn.00670d80
add esp, 0x28
test eax, eax
je 0x674ec5
mov eax, dword [esi + 0x34]
cmp eax, edi
jle 0x674d88
mov dword [esp + 0x30], eax
cmp dword [ebp + 0x38], 0
mov ebx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
jne 0x674e47
cmp byte [eax], 0x71
mov edx, dword [esp + 0x34]
je 0x674db1
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x28], edx
mov dword [esp + 0x10], ecx
jmp 0x674e04
mov ecx, dword [esp + 0x28]
test ecx, ecx
js 0x674dd0
cmp ecx, edx
je 0x674de4
cmp dword [esp + 0x10], 0
jge 0x674dc8
mov dword [esp + 0x10], ecx
mov dword [esp + 0x28], 0xffffffff
test edx, edx
js 0x674de4
mov ecx, dword [esp + 0x24]
test ecx, ecx
jns 0x674de8
mov ecx, edx
mov dword [esp + 0x24], ecx
jmp 0x674de8
mov ecx, dword [esp + 0x24]
mov edx, ecx
xor edx, dword [esp + 0x10]
test edx, 0xfffffdff
je 0x674e00
mov dword [esp + 0x10], 0xffffffff
jmp 0x674e04
or dword [esp + 0x10], ecx
cmp dword [ebp + 0x18], 0
je 0x674e47
mov ecx, dword [ebp + 8]
push esi
shr ecx, 0xb
push 0
and ecx, 1
push ecx
push eax
mov byte [ebx], 0
call fcn.0066f210
add esp, 0x10
cmp eax, 0xfffffffd
jne 0x674e31
mov dword [esi + 0x58], 1
jmp 0x674e43
test eax, eax
js 0x674eb3
mov edi, dword [esp + 0x38]
mov edx, eax
sar edx, 8
mov byte [edi], dl
mov byte [edi + 1], al
mov eax, dword [esp + 0x18]
mov edi, dword [esp + 0x20]
cmp word [edi], 0x7c
jne 0x674ed7
cmp dword [ebp + 0x38], 0
je 0x674e80
mov eax, dword [ebp + 0xc]
add dword [esp + 0x14], 3
mov ecx, dword [eax]
mov edx, dword [ebp + 0x20]
mov eax, dword [esp + 0x44]
add edi, 2
mov dword [esp + 0x20], edi
mov edi, dword [esp + 0x30]
lea ebx, [ecx + edx + 3]
jmp 0x674d16
mov ecx, ebx
sub ecx, eax
mov byte [ebx], 0x71
mov dl, bl
sar ecx, 8
sub dl, al
mov eax, dword [esp + 0x44]
mov byte [ebx + 1], cl
mov byte [ebx + 2], dl
mov dword [esp + 0x18], ebx
mov dword [esp + 0x5c], ebx
add ebx, 3
add edi, 2
mov dword [esp + 0x20], edi
mov edi, dword [esp + 0x30]
jmp 0x674d16
mov edx, dword [ebp + 0x14]
sub eax, 0xfffffffe
neg eax
sbb eax, eax
and eax, 0xfffffff5
add eax, 0x24
mov dword [edx], eax
mov eax, dword [esp + 0x20]
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0x38]
test ecx, ecx
jne 0x674f08
mov ecx, ebx
sub ecx, eax
movzx esi, byte [eax + 1]
movzx edx, byte [eax + 2]
shl esi, 8
or esi, edx
mov edx, ecx
sar edx, 8
mov byte [eax + 2], cl
mov byte [eax + 1], dl
sub eax, esi
mov ecx, esi
test esi, esi
jg 0x674ee2
mov esi, dword [ebp + 0x34]
mov ecx, dword [ebp + 0x38]
mov eax, dword [esp + 0x2c]
mov edx, ebx
sub edx, eax
sar edx, 8
mov byte [ebx], 0x72
mov byte [ebx + 1], dl
mov dl, bl
sub dl, al
mov byte [ebx + 2], dl
add ebx, 3
cmp dword [esp + 0x3c], 0
jle 0x674f85
mov edx, dword [esi + 0x20]
cmp word [edx + 6], 0
je 0x674f7d
mov ecx, ebx
sub ecx, eax
push ecx
push eax
add eax, 3
push eax
call fcn.006820b0
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x54]
add ebx, 3
mov byte [ecx], 0x7b
mov eax, ebx
sub eax, ecx
sar eax, 8
mov byte [edx], al
mov edx, dword [esp + 0x58]
mov cl, bl
sub cl, byte [esp + 0x38]
add esp, 0xc
mov byte [edx], cl
mov byte [ebx], 0x72
mov byte [ebx + 1], al
mov byte [ebx + 2], cl
mov ecx, dword [ebp + 0x38]
add ebx, 3
add dword [esp + 0x14], 6
mov eax, dword [esi + 0x20]
mov edx, dword [eax]
mov dword [esi + 0x20], edx
mov eax, dword [esp + 0x30]
mov edx, dword [ebp + 0xc]
mov dword [esi + 0x34], eax
mov eax, dword [ebp + 0x10]
mov dword [edx], ebx
mov edx, dword [ebp + 0x28]
mov dword [eax], edi
mov eax, dword [esp + 0x28]
mov dword [edx], eax
mov edx, dword [ebp + 0x2c]
mov eax, dword [esp + 0x10]
mov dword [edx], eax
test ecx, ecx
je 0x674fd3
mov eax, dword [ecx]
mov edx, dword [esp + 0x14]
mov esi, 0x7fffffeb
sub esi, eax
cmp esi, edx
jge 0x674fcf
mov ecx, dword [ebp + 0x14]
mov dword [ecx], 0x14
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
add eax, edx
mov dword [ecx], eax
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret