Function at 0x4fd120
Capabilities:
Encrypt data using rc4 prga

Disassembly:
cmp dword [esi + 0x48], 0
jne 0x4cc273
cmp dword [esi + 0x20], 0
je 0x4cdc2c
mov edx, dword [ebp + 0x14]
xchg di, bx
shr si, 0x57
pop edi
pop esi
mov dword [edx], 2
shl ebx, 0x6f
xadd bh, bh
bt ebx, esp
xor eax, eax
pop ebx
mov esp, ebp
not bp
pop ebp
ret
mov ecx, dword [ebp + 0x14]
pop edi
pop esi
shl bx, cl
mov dword [ecx], 4
ror bh, 0x5e
sub eax, eax
setbe bl
mov bx, 0x6bbe
pop ebx
mov esp, ebp
movsx ebp, di
pop ebp
ret
push ebx
mov eax, edi
xchg ecx, ecx
bswap cx
mov ecx, esi
call fcn.004cecbb
lea esp, [esp + 4]
test dh, dh
test eax, eax
mov eax, ebx
je 0x4ff2fc
mov ebx, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
push eax
cmovs eax, esi
setg ah
mov eax, esi
mov dword [esi + 0x18], ebx
call fcn.00503fca
test eax, eax
jne 0x505cc8
mov eax, dword [esi + 0x18]
btr cx, bp
neg cl
xchg ecx, ecx
mov ecx, dword [ebp + 0x10]
stc
sub eax, ebx
cmp ebp, edx
cmc
test bx, 0x204b
add dword [ecx], eax
cmc
add ebx, eax
mov dword [ebp + 0xc], ebx
jmp 0x4ff2db
mov eax, dword [ebp + 0x10]
shl ch, 0xf6
rol bl, 0x56
add dword [eax], edi
adc ebx, 0x72910c04
cmc
shl si, 0xd2
mov ecx, dword [ebp + 0x14]
rcl esi, 0x71
cmc
mov di, 0x68a6
pop edi
mov bx, 0x7fac
pop esi
sub bx, sp
and bl, 0x42
shr bx, cl
mov dword [ecx], 3
adc bx, dx
sbb bl, cl
cmc
sub eax, eax
pop ebx
mov esp, ebp
bswap bp
pop ebp
ret
push ebp
mov ebp, esp
stc
cmp si, 0x441e
sub esp, 8
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
movzx edi, sp
mov edi, dword [ebx]
not esi
cmovge esi, ebp
mov esi, eax
mov eax, dword [ebp + 8]
push eax
mov dword [ebp - 4], edi
mov dword [ebx], 0
call fcn.00546472
mov ecx, dword [ebp + 0x14]
mov dword [ecx], 0
test dl, dh
cmp dword [esi + 0x48], 0x112
je 0x546294
cmp dword [esi + 0x4c], 0
je 0x4fd22b
test edi, edi
jbe 0x4fd1af
mov ecx, dword [esi + 0x58]
cmp eax, ebp
cmp ecx, 5
jae 0x4fd1a8
mov eax, dword [ebp + 0xc]
setnp dl
mov dl, byte [eax]
mov byte [ecx + esi + 0x5c], dl
inc dword [esi + 0x58]
inc dword [ebx]
inc eax
cmp edx, eax
sub edi, 1
mov dword [ebp + 0xc], eax
jne 0x4fd17a
mov dword [ebp - 4], edi
cmc
test si, bx
cmp dword [esi + 0x58], 5
jb 0x4ff333
cmp byte [esi + 0x5c], 0
jne 0x505cc8
movzx eax, byte [esi + 0x5d]
btc edx, 0x44
movzx ecx, byte [esi + 0x5e]
btr edx, eax
sal edx, cl
cwd
movzx edx, byte [esi + 0x5f]
test ebx, 0x5ff008e0
clc
test esp, eax
shl eax, 8
or eax, ecx
dec ecx
movzx ecx, byte [esi + 0x60]
cmp bx, di
test edx, ebp
stc
shl eax, 8
test eax, esi
or eax, edx
bts edx, esi
shl eax, 8
shl edx, 0x97
or eax, ecx
mov dword [esi + 0x20], eax
bts edx, esp
or dx, 0x6495
mov dword [esi + 0x1c], 0xffffffff
sbb dx, sp
and dh, 0xa5
mov dword [esi + 0x4c], 0
mov dword [esi + 0x58], 0
mov edx, dword [ebp + 8]
cmp dword [esi + 0x24], edx
jae 0x4cc25f
cmp dword [esi + 0x50], 0
je 0x56d15e
mov ecx, dword [esi + 4]
cmp ch, 0x7c
add ecx, dword [esi]
mov edx, dword [esi + 0x10]
adc al, al
xor al, 0x2b
mov eax, 0x300
cmc
shl eax, cl
stc
cmc
add eax, 0x736
je 0x4fd2ab
mov ecx, eax
shrd ax, bp, 0x44
or ah, 0xe7
mov eax, 0x400
mov edi, edx
cmp ecx, esi
btc edx, 0xae
or edx, edi
movzx edx, ax
shrd ax, ax, 0x6e
cwde
mov eax, edx
clc
cmc
shl edx, 0x10
cmc
or eax, edx
test ch, 0x2d
clc
shr ecx, 1
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
sar ch, 1
sub cx, 0x2c77
mov edi, dword [ebp - 4]
neg cx
mov ecx, 1
cmc
test ebx, esp
sub eax, eax
mov dword [esi + 0x44], ecx
mov dword [esi + 0x40], ecx
mov dword [esi + 0x3c], ecx
mov dword [esi + 0x38], ecx
mov dword [esi + 0x34], eax
mov dword [esi + 0x50], eax
jmp 0x56d167
sub edi, edi
mov dword [ebp - 8], edi
stc
test bp, 0x7952
cmp ebx, 0x14
jae 0x4ff249
cmp edi, dword [ebp - 4]
jae 0x4ff246
mov eax, dword [ebp + 0xc]
sbb dl, al
mov dl, byte [edi + eax]
mov byte [ebx + esi + 0x5c], dl
test ebp, 0x3df558b9
add ebx, ecx
test cx, 0x2179
lea edi, [edi + ecx]
cmc
cmp ebx, 0x14
jb 0x4ff217
mov dword [ebp - 8], edi
mov dword [esi + 0x58], ebx
test bl, 0xcb
cmp ebx, 0x14
jae 0x4ff279
lea eax, [esi + 0x5c]
setbe cl
cmova ecx, esp
push eax
mov eax, ebx
mov ch, ch
mov ecx, esi
call fcn.004cecbb
lea esp, [esp + 4]
test eax, eax
je 0x4fccad
mov edi, dword [ebp + 8]
nop
lahf
lea eax, [esi + 0x5c]
mov dword [esi + 0x18], eax
push eax
mov eax, esi
call fcn.00503fca
test eax, eax
jne 0x505cc8
mov ecx, dword [esi + 0x18]
movsx eax, dx
btr eax, 0x10
or dh, dl
mov edx, dword [ebp - 8]
inc ax
bt eax, ebx
sub ecx, ebx
movsx eax, bx
sub ecx, esi
bts ax, bx
lea eax, [edx + ecx - 0x5c]
mov ecx, dword [ebp + 0x10]
cmp bl, 2
clc
test esp, 0x19982eb6
add dword [ecx], eax
cmp ebp, 0x200a6188
cmc
add dword [ebp + 0xc], eax
mov dword [esi + 0x58], 0
test ebx, eax
sub dword [ebp - 4], eax
stc
cmp dword [esi + 0x48], 0x112
je 0x546294
mov edi, dword [ebp - 4]
xchg bl, bh
bswap bx
mov ebx, dword [ebp + 0x10]
jmp 0x4fd168
lea ecx, [edi + ebx]
add dh, cl
movzx dx, bl
shrd edx, edx, 0xa
lea edx, [esi + 0x5c]
cmp ebx, ecx
je 0x4ff325
sub edx, ebx
mov bl, byte [eax]
mov byte [edx + eax], bl
inc eax
clc
cmp eax, ecx
jne 0x4ff316
mov eax, dword [ebp + 0x10]
movzx ebx, cx
mov dword [esi + 0x58], edi
rcl esi, 0xa0
add dword [eax], edi
mov eax, dword [ebp + 0x14]
add esi, edx
pop edi
sar esi, 0xc
pop esi
cmp esi, esp
mov dword [eax], 3
not bx
neg ebx
ror bh, cl
sub eax, eax
pop ebx
mov esp, ebp
xchg bp, bp
mov ebp, 0x15e84547
pop ebp
ret
pop edi
not bh
mov ax, 0xc7d
lahf
pop esi
cwde
mov eax, 1
movzx ebx, bp
movsx ebx, dx
movsx bx, cl
pop ebx
mov esp, ebp
mov ebp, 0x57583766
pop ebp
ret
cmp dword [esi + 0x20], 0
jne 0x5462b6
mov edx, dword [ebp + 0x14]
cmp dl, 0x84
mov dword [edx], 1
sub di, 0x883
bts di, bx
shl edi, 0x29
xor eax, eax
cmp dword [esi + 0x20], eax
pop edi
mov bh, 0xd4
not si
pop esi
setne al
xchg bl, bl
pop ebx
mov esp, ebp
bswap bp
mov bp, 0x62ed
pop ebp
ret
mov ecx, 1
neg bh
not ebx
mov ebx, dword [esi + 0x58]
test sp, 0x1546
cmc
stc
test ebx, ebx
jne 0x4ff203
mov ebx, dword [ebp + 0xc]
cmp edi, 0x14
jb 0x4d0b37
lea eax, [edi + ebx - 0x14]
jmp 0x4d0b59