Function at 0x4a078b
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
and dword [ebp - 0x14], 0
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
push edi
call fcn.0049e9e3
push edi
mov bl, al
call fcn.0049e9e3
push edi
mov byte [ebp + 0xf], al
call fcn.0049e9e3
push edi
mov byte [ebp - 1], al
call fcn.0049e9e3
add esp, 0x10
mov byte [ebp - 2], al
cmp bl, 0xff
jne 0x4a07cc
cmp byte [ebp + 0xf], 0xd8
je 0x4a07f9
cmp bl, 0x4b
jne 0x4a07e3
cmp byte [ebp + 0xf], 0x45
jne 0x4a07e3
cmp byte [ebp - 1], 0x59
jne 0x4a07e3
cmp byte [ebp - 2], 0
je 0x4a07f9
mov eax, dword [edi + 0x30]
push 0xffffffffffffffff
push edi
mov dword [eax + 0xc], 0xfffffc10
call fcn.004a304d
pop ecx
pop ecx
jmp 0x4a07c1
mov esi, dword [ebp + 8]
or dword [esi + 0x748], 0x20
cmp bl, 0x4b
mov dword [esi + 0x24], 0x4745504a
jne 0x4a085a
push edi
call fcn.0049e9e3
push edi
call fcn.0049e9e3
movzx ebx, al
pop ecx
sub ebx, 2
pop ecx
jns 0x4a083b
mov eax, dword [edi + 0x30]
push 0xffffffffffffffff
push edi
mov dword [eax + 0xc], 0xfffffc10
call fcn.004a304d
pop ecx
pop ecx
jmp 0x4a0825
cmp ebx, 0xe
jb 0x4a0935
push 7
push edi
call fcn.0049eb23
push edi
call fcn.0049e9e3
add esp, 0xc
sub ebx, 8
jmp 0x4a08d5
cmp byte [ebp - 1], 0xff
jne 0x4a093b
cmp byte [ebp - 2], 0xe0
jne 0x4a093b
push edi
call fcn.004a049e
movzx ebx, ax
sub ebx, 2
pop ecx
jns 0x4a0893
mov eax, dword [edi + 0x30]
push 0xffffffffffffffff
push edi
mov dword [eax + 0xc], 0xfffffc10
call fcn.004a304d
pop ecx
pop ecx
jmp 0x4a087d
cmp ebx, 0xe
jb 0x4a0935
push edi
call fcn.0049ea5c
push edi
mov dword [ebp + 0xc], eax
call fcn.0049e9e3
pop ecx
sub ebx, 5
cmp dword [ebp + 0xc], 0x4649464a
pop ecx
jne 0x4a0935
test al, al
jne 0x4a0935
push edi
call fcn.0049e9e3
push edi
call fcn.0049e9e3
push edi
call fcn.0049e9e3
add esp, 0xc
sub ebx, 3
cmp al, 1
jne 0x4a090e
push edi
call fcn.004a049e
movzx eax, ax
imul eax, eax, 0x2710
cdq
mov ecx, 0xfe
push edi
idiv ecx
mov dword [esi + 0x2c], eax
call fcn.004a049e
movzx eax, ax
imul eax, eax, 0x2710
pop ecx
pop ecx
cdq
mov ecx, 0xfe
idiv ecx
jmp 0x4a092f
cmp al, 2
jne 0x4a0935
push edi
call fcn.004a049e
movzx eax, ax
imul eax, eax, 0x64
push edi
mov dword [esi + 0x2c], eax
call fcn.004a049e
movzx eax, ax
pop ecx
imul eax, eax, 0x64
pop ecx
mov dword [esi + 0x30], eax
sub ebx, 4
push ebx
jmp 0x4a0eca
push 2
push edi
call fcn.0049f3ce
pop ecx
pop ecx
push edi
call fcn.0049e9e3
cmp al, 0xff
pop ecx
jne 0x4a0945
push edi
call fcn.0049e9e3
mov bl, al
pop ecx
cmp bl, 0xff
je 0x4a0950
cmp bl, 0xda
je 0x4a0f2d
test bl, bl
je 0x4a0945
push edi
call fcn.004a049e
movzx eax, ax
sub eax, 2
pop ecx
mov dword [ebp - 8], eax
js 0x4a0ed5
cmp bl, 0xc0
je 0x4a0bb1
cmp bl, 0xc1
je 0x4a0bb1
cmp bl, 0xc2
je 0x4a0bb6
cmp bl, 0xc3
je 0x4a0bb1
cmp bl, 0xb9
je 0x4a0bb1
cmp bl, 0xe1
jne 0x4a0b57
cmp eax, 4
jb 0x4a0ec7
push 4
lea eax, [ebp - 0x18]
pop ebx
push ebx
push eax
push edi
call fcn.0049ea7e
sub dword [ebp - 8], ebx
lea eax, [ebp - 0x18]
push 0x428c80
push eax
call fcn.004a31a6
add esp, 0x14
test eax, eax
jne 0x4a0b03
cmp dword [ebp - 8], ebx
jb 0x4a0ec7
push edi
call fcn.0049e9e3
movzx eax, al
push edi
mov dword [esi + 0x47c], eax
call fcn.0049e9e3
push edi
mov byte [esi + 0x774], al
call fcn.0049e9e3
push edi
mov byte [esi + 0x775], al
call fcn.0049e9e3
sub dword [ebp - 8], ebx
or byte [esi + 0x74a], 2
movzx eax, al
add esp, 0x10
xor eax, 1
cmp dword [esi + 0x47c], 2
mov dword [esi + 0x480], eax
jl 0x4a0ec7
cmp dword [ebp - 8], 0xc
jb 0x4a0ec7
push 8
push edi
call fcn.0049eb23
push edi
call fcn.0049ea39
movzx eax, ax
push edi
mov dword [esi + 0x34], eax
call fcn.0049ea39
sub dword [ebp - 8], 0xc
or byte [esi + 0x749], 6
movzx eax, ax
add esp, 0x10
mov dword [esi + 0x38], eax
test byte [esi + 0x745], 0x80
je 0x4a0ec7
mov eax, dword [esi + 0x34]
test eax, eax
je 0x4a0ec7
lea eax, [eax + eax*2]
cmp dword [ebp - 8], eax
jae 0x4a0ab7
mov eax, dword [edi + 0x30]
push 0xffffffffffffffff
push edi
mov dword [eax + 0xc], 0xfffffc10
call fcn.004a304d
mov eax, dword [esi + 0x34]
pop ecx
pop ecx
jmp 0x4a0a96
and dword [ebp + 0xc], 0
cmp dword [esi + 0x34], 0
jbe 0x4a0af7
lea ebx, [esi + 0x3d]
push edi
call fcn.0049e9e3
push edi
mov byte [ebx - 1], al
call fcn.0049e9e3
push edi
mov byte [ebx], al
call fcn.0049e9e3
sub dword [ebp - 8], 3
mov byte [ebx + 1], al
and byte [ebx + 2], 0
add esp, 0xc
inc dword [ebp + 0xc]
add ebx, 4
mov eax, dword [ebp + 0xc]
cmp eax, dword [esi + 0x34]
jb 0x4a0ac4
or byte [esi + 0x749], 0x80
jmp 0x4a0ec7
push ebx
lea eax, [ebp - 0x18]
push 0x428c78
push eax
call fcn.004a310e
add esp, 0xc
test eax, eax
jne 0x4a0ec7
cmp dword [ebp - 8], 2
jb 0x4a0ec7
dec dword [ebp - 8]
push edi
call fcn.0049e9e3
test al, al
pop ecx
jne 0x4a0ec7
dec dword [ebp - 8]
push edi
call fcn.0049e9e3
test al, al
pop ecx
jne 0x4a0ec7
or dword [esi + 0x738], 1
jmp 0x4a0ec7
cmp bl, 0xfe
jne 0x4a0ec7
mov ecx, dword [esi + 0x48c]
test ecx, ecx
je 0x4a0ec7
mov eax, dword [esi + 0x484]
test eax, eax
jle 0x4a0ec7
lea ebx, [eax - 1]
cmp ebx, dword [ebp - 8]
jb 0x4a0b87
mov ebx, dword [ebp - 8]
push ebx
push ecx
push edi
call fcn.0049ea7e
mov eax, dword [esi + 0x48c]
add esp, 0xc
and byte [ebx + eax], 0
or byte [esi + 0x749], 0x40
sub dword [ebp - 8], ebx
mov dword [esi + 0x488], ebx
jmp 0x4a0ec7
cmp bl, 0xc2
jne 0x4a0bbf
mov dword [esi + 0x24], 0x47504a50
jmp 0x4a0be0
cmp bl, 0xb9
jne 0x4a0bcd
mov dword [esi + 0x24], 0x4547504a
jmp 0x4a0be0
cmp bl, 0xc3
jne 0x4a0be0
mov dword [ebp - 0x14], 1
mov dword [esi + 0x24], 0x4c47504a
sub dword [ebp - 8], 6
js 0x4a0eeb
push edi
call fcn.0049e9e3
push edi
mov byte [ebp + 0xb], al
call fcn.004a049e
push edi
mov ebx, eax
call fcn.004a049e
push edi
mov dword [ebp - 0x10], eax
call fcn.0049e9e3
movzx ecx, word [ebp - 0x10]
mov dword [esi + 0x18], ecx
or dword [esi + 0x748], 0x16
movzx ecx, bx
mov bl, byte [ebp + 0xb]
add esp, 0x10
neg ecx
mov dword [esi + 0x1c], ecx
mov byte [ebp + 0xf], al
movzx cx, al
movzx dx, bl
imul ecx, edx
cmp dword [ebp - 0x14], 0
mov word [esi + 0x22], cx
je 0x4a0c8f
cmp al, 1
je 0x4a0c5f
mov al, byte [ebp + 0xf]
cmp al, 3
je 0x4a0c5f
mov eax, dword [edi + 0x30]
push 0xffffffffffffffff
push edi
mov dword [eax + 0xc], 0xfffffc10
call fcn.004a304d
pop ecx
pop ecx
jmp 0x4a0c42
cmp bl, 0x10
ja 0x4a0f01
cmp al, 3
jne 0x4a0cf5
cmp bl, 8
je 0x4a0d0d
mov eax, dword [edi + 0x30]
push 0xffffffffffffffff
push edi
mov dword [eax + 0xc], 0xfffffc10
call fcn.004a304d
pop ecx
pop ecx
jmp 0x4a0c70
cmp bl, 8
je 0x4a0caf
cmp bl, 0xc
je 0x4a0cb4
mov eax, dword [edi + 0x30]
push 0xffffffffffffffff
push edi
mov dword [eax + 0xc], 0xfffffc10
call fcn.004a304d
pop ecx
pop ecx
jmp 0x4a0c94
cmp bl, 0xc
jne 0x4a0cd0
cmp byte [ebp + 0xf], 1
je 0x4a0cf9
mov eax, dword [edi + 0x30]
push 0xffffffffffffffff
push edi
mov dword [eax + 0xc], 0xfffffc10
call fcn.004a304d
pop ecx
pop ecx
jmp 0x4a0cb4
cmp al, 1
je 0x4a0cf9
mov al, byte [ebp + 0xf]
cmp al, 3
je 0x4a0cf5
cmp al, 4
je 0x4a0cf5
mov eax, dword [edi + 0x30]
push 0xffffffffffffffff
push edi
mov dword [eax + 0xc], 0xfffffc10
call fcn.004a304d
pop ecx
pop ecx
jmp 0x4a0cd4
cmp al, 1
jne 0x4a0d05
and dword [esi + 0x760], 0
jmp 0x4a0ec7
cmp al, 3
jb 0x4a0ec7
sub dword [ebp - 8], 8
js 0x4a0f17
push edi
call fcn.0049e9e3
push edi
call fcn.0049e9e3
push edi
mov byte [ebp + 0xb], al
call fcn.0049e9e3
push edi
call fcn.0049e9e3
push edi
call fcn.0049e9e3
mov bl, al
push edi
mov byte [ebp - 2], bl
call fcn.0049e9e3
push edi
call fcn.0049e9e3
push edi
call fcn.0049e9e3
add esp, 0x20
mov byte [ebp + 0xf], al
movzx eax, byte [ebp + 0xb]
push 0xfffffffffffffff0
mov edx, eax
pop ecx
mov dword [ebp - 0x20], eax
and edx, ecx
cmp edx, 0x10
mov dword [ebp - 0x1c], edx
jne 0x4a0d9a
mov al, bl
and eax, ecx
cmp al, dl
jne 0x4a0d9a
mov al, byte [ebp + 0xf]
and eax, ecx
cmp al, dl
jne 0x4a0d9a
mov al, byte [ebp + 0xb]
and al, 0xf
cmp al, 1
jne 0x4a0d9a
mov al, bl
and al, 0xf
cmp al, 1
jne 0x4a0d9a
mov al, byte [ebp + 0xf]
and al, 0xf
cmp al, 1
je 0x4a0cf9
cmp edx, 0x20
jne 0x4a0dd9
mov al, bl
and eax, ecx
cmp al, 0x10
jne 0x4a0dd9
mov al, byte [ebp + 0xf]
and eax, ecx
cmp al, 0x10
jne 0x4a0dd9
mov al, byte [ebp + 0xb]
and al, 0xf
cmp al, 1
jne 0x4a0dd9
mov al, bl
and al, 0xf
cmp al, 1
jne 0x4a0dd9
mov al, byte [ebp + 0xf]
and al, 0xf
cmp al, 1
jne 0x4a0dd9
mov dword [esi + 0x760], 1
jmp 0x4a0ec7
cmp edx, 0x10
jne 0x4a0e18
mov al, bl
and eax, ecx
cmp al, dl
jne 0x4a0e18
mov al, byte [ebp + 0xf]
and eax, ecx
cmp al, dl
jne 0x4a0e18
mov al, byte [ebp + 0xb]
and al, 0xf
cmp al, 2
jne 0x4a0e18
mov al, bl
and al, 0xf
cmp al, 1
jne 0x4a0e18
mov al, byte [ebp + 0xf]
and al, 0xf
cmp al, 1
jne 0x4a0e18
mov dword [esi + 0x760], 3
jmp 0x4a0ec7
cmp edx, 0x20
jne 0x4a0e54
mov al, bl
and eax, ecx
cmp al, 0x10
jne 0x4a0e54
mov al, byte [ebp + 0xf]
and eax, ecx
cmp al, 0x10
jne 0x4a0e54
mov al, byte [ebp + 0xb]
and al, 0xf
cmp al, 2
jne 0x4a0e54
mov al, bl
and al, 0xf
cmp al, 1
jne 0x4a0e54
mov al, byte [ebp + 0xf]
and al, 0xf
cmp al, 1
jne 0x4a0e54
mov dword [esi + 0x760], 2
jmp 0x4a0ec7
mov eax, 0x200
cmp edx, eax
jge 0x4a0ec7
movzx edx, bl
mov dword [ebp - 0xc], edx
and dword [ebp - 0xc], ecx
cmp dword [ebp - 0xc], eax
jge 0x4a0ec7
movzx ecx, byte [ebp + 0xf]
mov dword [ebp - 0x10], ecx
and dword [ebp - 0x10], 0xfffffff0
cmp dword [ebp - 0x10], eax
jge 0x4a0ec7
mov al, byte [ebp + 0xb]
and al, 0xf
cmp al, 0x20
jae 0x4a0ec7
mov al, byte [ebp - 2]
and al, 0xf
cmp al, 0x20
jae 0x4a0ec7
mov al, byte [ebp + 0xf]
and al, 0xf
cmp al, 0x20
jae 0x4a0ec7
mov eax, dword [ebp - 0x1c]
and edx, 0xf
and ecx, 0xf
lea ebx, [eax + eax]
mov eax, dword [ebp - 0x20]
and eax, 0xf
or ebx, eax
shl ebx, 9
or ebx, dword [ebp - 0xc]
shl ebx, 1
or ebx, edx
shl ebx, 9
or ebx, dword [ebp - 0x10]
shl ebx, 1
or ebx, ecx
shl ebx, 2
mov dword [esi + 0x760], ebx
push dword [ebp - 8]
push edi
call fcn.0049eb23
jmp 0x4a0943
mov eax, dword [edi + 0x30]
push 0xffffffffffffffff
push edi
mov dword [eax + 0xc], 0xfffffc10
call fcn.004a304d
pop ecx
pop ecx
jmp 0x4a0ed5
mov eax, dword [edi + 0x30]
push 0xffffffffffffffff
push edi
mov dword [eax + 0xc], 0xfffffc10
call fcn.004a304d
pop ecx
pop ecx
jmp 0x4a0eeb
mov eax, dword [edi + 0x30]
push 0xffffffffffffffff
push edi
mov dword [eax + 0xc], 0xfffffc10
call fcn.004a304d
pop ecx
pop ecx
jmp 0x4a0f01
mov eax, dword [edi + 0x30]
push 0xffffffffffffffff
push edi
mov dword [eax + 0xc], 0xfffffc10
call fcn.004a304d
pop ecx
pop ecx
jmp 0x4a0f17
cmp dword [ebp - 0x14], 0
je 0x4a0fbe
push edi
call fcn.004a049e
movzx ebx, ax
dec ebx
pop ecx
dec ebx
cmp ebx, 1
jge 0x4a0f5e
mov eax, dword [edi + 0x30]
push 0xffffffffffffffff
push edi
mov dword [eax + 0xc], 0xfffffc10
call fcn.004a304d
pop ecx
pop ecx
jmp 0x4a0f48
push edi
call fcn.0049e9e3
pop ecx
movzx ecx, al
lea ecx, [ecx + ecx + 4]
cmp ebx, ecx
jae 0x4a0f86
mov eax, dword [edi + 0x30]
push 0xffffffffffffffff
push edi
mov dword [eax + 0xc], 0xfffffc10
call fcn.004a304d
pop ecx
pop ecx
jmp 0x4a0f70
mov cl, al
dec al
test cl, cl
je 0x4a0fa3
movzx ebx, al
inc ebx
push edi
call fcn.0049e9e3
push edi
call fcn.0049e9e3
pop ecx
dec ebx
pop ecx
jne 0x4a0f92
push edi
call fcn.0049e9e3
push edi
call fcn.0049e9e3
push edi
call fcn.0049e9e3
add esp, 0xc
mov byte [esi + 0x776], al
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret