Function at 0x4c3222
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov eax, 0x5b4630
call fcn.00576dcc
sub esp, 0x198
mov eax, dword [ebp + 0x18]
push ebx
and eax, 2
push esi
cmp al, 2
mov eax, dword [ebp + 0x10]
push edi
mov ebx, ecx
sete byte [ebp - 0x24]
xor edi, edi
mov esi, dword [ebp + 8]
mov dword [ebx], edi
mov dword [eax], edi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x74], edi
mov dword [eax], edi
lea eax, [ebp - 0x60]
push eax
push 0x102
push esi
mov dword [ebp - 0x7e], edi
mov dword [ebp - 0x60], edi
mov dword [ebp - 0x70], edi
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x54], edi
call fcn.004d9a6e
add esp, 0xc
cmp word [ebp - 0x60], 1
je 0x4c3290
mov dword [ebx], 0x1c
jmp 0x4c37e3
lea eax, [ebp - 0x70]
push eax
push 0x115
push esi
call fcn.004d9a6e
lea eax, [ebp - 0x94]
push eax
lea eax, [ebp - 0x78]
push eax
push 0x152
push esi
call fcn.004d9a6e
movzx eax, word [ebp - 0x70]
movzx ecx, word [ebp - 0x78]
sub eax, ecx
mov dword [ebp + 0x18], eax
lea eax, [ebp - 0x7e]
push eax
push 0x103
push esi
call fcn.004d9a6e
lea eax, [ebp - 0x74]
push eax
push 0x11c
push esi
call fcn.004d9a6e
lea eax, [ebp - 0x54]
push eax
push 0x106
push esi
call fcn.004d7bd7
add esp, 0x40
test eax, eax
jne 0x4c331f
mov eax, dword [ebp + 0x18]
dec eax
je 0x4c330f
push 0x60b4b0
push 3
call fcn.0053314e
pop ecx
pop ecx
jmp 0x4c3285
push esi
mov ecx, ebx
call fcn.004c3967
neg eax
sbb eax, eax
inc eax
mov dword [ebp - 0x54], eax
lea eax, [ebp - 0x14]
push eax
push 0x100
push esi
call fcn.004d7bd7
lea eax, [ebp - 0x10]
push eax
push 0x101
push esi
call fcn.004d7bd7
lea eax, [ebp - 0x40]
push eax
push 0x112
push esi
call fcn.004d9a6e
add esp, 0x24
lea eax, [ebp - 0x5c]
mov ecx, ebx
push eax
lea eax, [ebp - 0x55]
push eax
lea eax, [ebp - 0x56]
push eax
movzx eax, word [ebp - 0x40]
push eax
call fcn.004c28a3
lea eax, [ebp - 0x7a]
push eax
push 0x128
push esi
call fcn.004d7bd7
lea eax, [ebp - 0x98]
push eax
push 0x11a
push esi
call fcn.004d7bd7
lea eax, [ebp - 0x90]
push eax
push 0x11b
push esi
call fcn.004d7bd7
add esp, 0x24
cmp word [ebp - 0x74], 2
jne 0x4c33ae
cmp dword [ebp + 0x18], 1
jg 0x4c3285
and byte [ebp + 0x1b], 0
push esi
call fcn.004dab41
test eax, eax
pop ecx
je 0x4c33c1
mov byte [ebp + 0x1b], 1
lea ecx, [ebp - 0x1a4]
call fcn.004b62a1
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x34], edi
lea esi, [eax + 7]
shr esi, 3
cmp byte [ebp - 0x24], 0
je 0x4c33ee
lea esi, [eax + 0x1f]
mov dword [ebp - 0x34], 0x30
shr esi, 5
shl esi, 2
mov eax, esi
mov dword [ebp - 0x38], esi
imul eax, dword [ebp - 0x10]
add eax, dword [ebp - 0x34]
cmp dword [ebp - 0x5c], 0xffffffff
mov ecx, eax
je 0x4c342e
mov edx, dword [ebp - 0x10]
lea ecx, [edx + 7]
shr ecx, 3
cmp byte [ebp - 0x24], 0
mov dword [ebp - 0x38], ecx
je 0x4c3420
lea ecx, [edx + 0x1f]
shr ecx, 5
shl ecx, 2
mov dword [ebp - 0x38], ecx
imul ecx, dword [ebp - 0x14]
add ecx, dword [ebp - 0x34]
mov dword [ebp - 0x50], eax
cmp eax, ecx
ja 0x4c3431
mov dword [ebp - 0x50], ecx
lea ecx, [ebp - 0x6c]
call fcn.004c3a7c
push dword [ebp - 0x50]
lea ecx, [ebp - 0x6c]
call fcn.004c3a88
mov eax, dword [ebp - 0x64]
cmp eax, edi
jne 0x4c3456
mov dword [ebx], 1
jmp 0x4c37e3
cmp byte [ebp - 0x24], 0
mov dword [ebp - 0x1c], eax
je 0x4c3467
mov ecx, dword [ebp - 0x34]
add eax, ecx
mov dword [ebp - 0x1c], eax
push dword [ebp - 0x10]
mov ecx, ebx
push 1
call fcn.004c3943
cmp byte [ebp + 0x1b], 0
mov dword [ebp - 0x30], eax
jne 0x4c35c0
mov eax, dword [ebp - 0x14]
push dword [ebp + 8]
mov dword [ebp + 0x18], eax
mov eax, esi
neg eax
add eax, eax
mov dword [ebp - 0x44], eax
call fcn.004da68d
push eax
call fcn.004dfde3
pop ecx
cmp eax, edi
pop ecx
mov dword [ebp - 0x2c], eax
je 0x4c3602
lea eax, [ebp - 0x20]
push eax
push 0x116
push dword [ebp + 8]
call fcn.004d9a6e
push dword [ebp + 8]
call fcn.004da6d4
mov ecx, dword [ebp + 0x18]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x14]
add esp, 0x10
sub ecx, eax
cmp eax, dword [ebp + 0x18]
mov eax, dword [ebp - 0x10]
sbb edi, edi
and dword [ebp + 0x18], 0
and edi, ecx
test eax, eax
jbe 0x4c3717
mov ebx, 0x62cf44
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp - 0x20]
add edx, ecx
cmp edx, eax
jbe 0x4c34fc
sub eax, ecx
jmp 0x4c34ff
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x28], eax
imul eax, dword [ebp - 0x3c]
push eax
push dword [ebp - 0x2c]
push 0
push ecx
push dword [ebp + 8]
call fcn.004da578
add esp, 0xc
push eax
push dword [ebp + 8]
call fcn.004d9d49
add esp, 0x10
test eax, eax
jl 0x4c35b2
push dword [ebp - 0x2c]
mov eax, dword [ebp - 0x30]
imul eax, esi
push dword [ebp - 0x44]
add eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x18]
push edi
push dword [ebp - 0x28]
push esi
push dword [ebp - 0x3c]
push eax
call fcn.004c38ee
mov eax, dword [ebp - 0x28]
mov ecx, ebx
sub dword [ebp - 0x30], eax
call fcn.004b1763
cmp dword [eax + 4], 1
jne 0x4c3591
mov ecx, ebx
call fcn.004b1763
cmp dword [eax], 0
je 0x4c3591
mov ecx, ebx
call fcn.004b1763
mov ecx, ebx
mov dword [ebp - 0x28], eax
call fcn.004b1763
push dword [eax + 8]
mov eax, dword [ebp - 0x28]
push dword [ebp - 0x10]
push dword [ebp + 0x18]
call dword [eax]
neg eax
sbb eax, eax
inc eax
jmp 0x4c3593
xor eax, eax
test eax, eax
jne 0x4c370b
mov eax, dword [ebp - 0x20]
add dword [ebp + 0x18], eax
mov eax, dword [ebp - 0x10]
cmp dword [ebp + 0x18], eax
jb 0x4c34ec
jmp 0x4c3714
mov eax, dword [ebp - 0x18]
mov dword [eax], 3
jmp 0x4c3714
lea ecx, [ebp - 0x4c]
call fcn.004c77c4
lea eax, [ebp - 0x3c]
push eax
push 0x142
push dword [ebp + 8]
call fcn.004d7bd7
lea eax, [ebp - 0x20]
push eax
push 0x143
push dword [ebp + 8]
call fcn.004d7bd7
push dword [ebp + 8]
call fcn.004d9cfa
push eax
call fcn.004dfde3
add esp, 0x20
cmp eax, edi
mov dword [ebp - 0x2c], eax
jne 0x4c361d
push 0x60b494
push dword [ebp + 8]
call fcn.004dab3a
pop ecx
push eax
call fcn.004dfe42
pop ecx
pop ecx
jmp 0x4c344b
mov ecx, dword [ebp - 0x10]
mov dword [ebp + 0x18], edi
cmp ecx, edi
jbe 0x4c3719
mov ebx, 0x62cf44
mov eax, dword [ebp + 0x18]
mov edi, dword [ebp - 0x20]
xor edx, edx
div edi
mov eax, dword [ebp + 0x18]
sub edi, edx
lea edx, [edi + eax]
cmp edx, ecx
jbe 0x4c364d
sub ecx, eax
mov dword [ebp - 0x30], ecx
jmp 0x4c3650
mov dword [ebp - 0x30], edi
xor edi, edi
cmp dword [ebp - 0x14], edi
jbe 0x4c36b4
push 0
push 0
push dword [ebp + 0x18]
push edi
push dword [ebp - 0x2c]
push dword [ebp + 8]
call fcn.004da04c
add esp, 0x18
test eax, eax
jl 0x4c36ab
mov eax, dword [ebp - 0x10]
push 8
sub eax, dword [ebp + 0x18]
sub eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x3c]
push edi
lea ecx, [eax + 7]
shr ecx, 3
push ecx
lea ecx, [ebp - 0x4c]
push dword [ebp - 0x20]
push eax
push dword [ebp - 0x2c]
push esi
push dword [ebp - 0x10]
push dword [ebp - 0x14]
push dword [ebp - 0x1c]
call fcn.004c7ac2
add edi, dword [ebp - 0x3c]
cmp edi, dword [ebp - 0x14]
jb 0x4c3657
jmp 0x4c36b4
mov eax, dword [ebp - 0x18]
mov dword [eax], 3
mov ecx, ebx
call fcn.004b1763
cmp dword [eax + 4], 1
jne 0x4c36ef
mov ecx, ebx
call fcn.004b1763
cmp dword [eax], 0
je 0x4c36ef
mov ecx, ebx
call fcn.004b1763
mov ecx, ebx
mov edi, eax
call fcn.004b1763
push dword [eax + 8]
push dword [ebp - 0x10]
push dword [ebp + 0x18]
call dword [edi]
neg eax
sbb eax, eax
inc eax
jmp 0x4c36f1
xor eax, eax
test eax, eax
jne 0x4c370b
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp - 0x10]
add eax, dword [ebp - 0x30]
cmp eax, ecx
mov dword [ebp + 0x18], eax
jb 0x4c3630
jmp 0x4c3714
mov eax, dword [ebp - 0x18]
mov dword [eax], 0xe
mov ebx, dword [ebp - 0x18]
xor edi, edi
push dword [ebp - 0x2c]
call fcn.004dfde8
cmp dword [ebx], edi
pop ecx
je 0x4c3733
lea ecx, [ebp - 0x6c]
call fcn.004c3b85
jmp 0x4c38d5
cmp dword [ebp - 0x5c], 0xffffffff
jne 0x4c3758
push dword [ebp - 0x24]
lea eax, [ebp - 0x10]
mov ecx, ebx
push esi
push 1
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x1c]
push dword [ebp - 0x40]
call fcn.004c293c
mov dword [ebx], eax
jmp 0x4c37d7
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x48], edi
mov eax, dword [ebp - 0x50]
lea ecx, [ebp - 0x48]
sub eax, dword [ebp - 0x34]
mov dword [ebp - 4], edi
push eax
mov dword [ebp + 0x18], eax
call fcn.004d00a4
xor eax, eax
cmp dword [ebp - 0x48], edi
jle 0x4c3787
mov ecx, dword [ebp - 0x44]
and byte [ecx + eax], 0
inc eax
cmp eax, dword [ebp - 0x48]
jl 0x4c377a
cmp dword [ebp - 0x44], edi
jne 0x4c3794
mov dword [ebx], 1
jmp 0x4c37cb
push dword [ebp - 0x24]
lea eax, [ebp - 0x10]
mov ecx, ebx
push dword [ebp - 0x38]
push esi
push 1
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x44]
push dword [ebp - 0x1c]
push dword [ebp - 0x40]
call fcn.004c2a78
push dword [ebp + 0x18]
mov dword [ebx], eax
push dword [ebp - 0x44]
push dword [ebp - 0x1c]
call fcn.00576e70
mov esi, dword [ebp - 0x38]
add esp, 0xc
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x48]
call fcn.004c7789
cmp dword [ebx], edi
je 0x4c37ea
lea ecx, [ebp - 0x6c]
call fcn.004c3b85
xor eax, eax
jmp 0x4c38dd
cmp word [ebp - 0x54], 1
jne 0x4c3816
mov eax, esi
xor ecx, ecx
imul eax, dword [ebp - 0x10]
test eax, eax
jbe 0x4c3816
mov eax, dword [ebp - 0x1c]
or dl, 0xff
sub dl, byte [eax]
mov byte [eax], dl
inc eax
mov dword [ebp - 0x1c], eax
mov eax, esi
imul eax, dword [ebp - 0x10]
inc ecx
cmp ecx, eax
jb 0x4c37fd
cmp byte [ebp - 0x24], 0
je 0x4c38ab
lea eax, [ebp - 0x8c]
mov ecx, ebx
push eax
push dword [ebp + 8]
call fcn.004c2b97
push 4
lea eax, [ebp - 0x8c]
push 1
push eax
lea ecx, [ebp - 0x1a4]
call fcn.004b62f8
mov eax, dword [ebp - 0x64]
mov dword [eax], 0x28
mov ecx, dword [ebp - 0x14]
mov dword [eax + 4], ecx
mov ecx, dword [ebp - 0x10]
mov dword [eax + 8], ecx
mov word [eax + 0xc], 1
mov word [eax + 0xe], 1
mov dword [eax + 0x10], edi
imul esi, dword [ebp - 0x10]
mov dword [eax + 0x14], esi
mov ecx, dword [ebp - 0x8c]
mov dword [eax + 0x18], ecx
mov ecx, dword [ebp - 0x88]
mov dword [eax + 0x1c], ecx
mov dword [eax + 0x20], 2
mov dword [eax + 0x24], edi
mov eax, dword [ebp - 0x64]
or byte [eax + 0x28], 0xff
or byte [eax + 0x29], 0xff
or byte [eax + 0x2a], 0xff
and byte [eax + 0x2c], 0
and byte [eax + 0x2d], 0
and byte [eax + 0x2e], 0
jmp 0x4c38c5
mov eax, dword [ebp + 0x14]
or byte [eax], 0xff
or byte [eax + 1], 0xff
or byte [eax + 2], 0xff
and byte [eax + 4], 0
and byte [eax + 5], 0
and byte [eax + 6], 0
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x14]
mov dword [ecx], eax
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x10]
mov dword [eax], ecx
lea ecx, [ebp - 0x6c]
call fcn.004c3be9
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0x14