Function at 0x4cce30
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0x54
push ebx
mov ebx, ecx
mov dword [esp + 0x10], ebx
test byte [ebx + 0x10], 8
je 0x4cce58
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x5c]
push eax
push ecx
mov ecx, ebx
call fcn.004cd550
pop ebx
add esp, 0x54
ret 8
push ebp
mov ebp, dword [ebx + 4]
lea eax, [esp + 0x20]
mov ecx, 4
mov dword [esp + 0x10], eax
xor edx, edx
movsx eax, bp
push esi
push edi
test cl, ah
mov dword [esp + 0x10], ebp
mov dword [esp + 0x24], edx
mov dword [esp + 0x20], edx
mov dword [esp + 0x14], edx
je 0x4cce88
mov dword [esp + 0x24], ecx
test ah, 2
je 0x4cce91
mov dword [esp + 0x20], ecx
mov eax, ebp
mov esi, 1
and eax, 0xff
cmp ax, si
jl 0x4ccef5
cmp ax, 0x1f
jg 0x4ccef5
mov eax, dword [ebx + 8]
mov ebp, 9
mov ecx, dword [eax + 8]
mov dword [esp + 0x28], ecx
mov edx, dword [eax + 4]
mov dword [esp + 0x2c], edx
mov byte [esp + 0x30], 0
cmp dword [eax + 0xc], esi
jne 0x4ccecd
mov byte [esp + 0x30], 0x10
cmp dword [eax + 0xc], 0xffffffff
jne 0x4cced8
or byte [esp + 0x30], 8
cmp dword [eax + 0x10], esi
jne 0x4ccee2
or byte [esp + 0x30], 4
cmp dword [eax + 0x14], esi
jne 0x4cd35e
or byte [esp + 0x30], 2
jmp 0x4cd35e
cmp ax, 0x20
jl 0x4ccf1e
cmp ax, 0x23
jg 0x4ccf1e
mov edx, dword [ebx + 8]
lea ecx, [esp + 0x2c]
mov ebp, 0xd
mov eax, dword [edx + 0x18]
mov dword [esp + 0x28], eax
call fcn.004cd4c0
jmp 0x4cd35e
cmp ax, 0x24
jl 0x4ccf4e
cmp ax, 0x2c
jg 0x4ccf4e
mov edx, dword [ebx + 8]
mov ebp, 0x11
mov ecx, dword [edx + 0x1c]
mov dword [esp + 0x28], ecx
mov eax, dword [edx + 0x18]
lea ecx, [esp + 0x30]
mov dword [esp + 0x2c], eax
call fcn.004cd4c0
jmp 0x4cd35e
cmp ax, 0x2d
jl 0x4ccf7e
cmp ax, 0x2f
jg 0x4ccf7e
mov edx, dword [ebx + 8]
mov ebp, 0x19
mov ecx, dword [edx + 0x28]
mov dword [esp + 0x28], ecx
mov eax, dword [edx + 0x24]
lea ecx, [esp + 0x30]
mov dword [esp + 0x2c], eax
call fcn.004cd500
jmp 0x4cd35e
cmp ax, 0x30
jl 0x4ccf9f
cmp ax, 0x37
jg 0x4ccf9f
mov ecx, dword [ebx + 8]
mov ebp, 2
mov dx, word [ecx]
mov word [esp + 0x28], dx
jmp 0x4cd35e
cmp ax, 0x38
jl 0x4ccfbb
cmp ax, 0x47
jg 0x4ccfbb
mov eax, dword [ebx + 8]
mov ebp, ecx
mov ecx, dword [eax]
mov dword [esp + 0x28], ecx
jmp 0x4cd35e
cmp ax, 0xb4
jl 0x4ccfe3
cmp ax, 0xb7
jg 0x4ccfe3
mov eax, dword [ebx + 8]
mov ebp, 6
mov dx, word [eax + 4]
mov word [esp + 0x28], dx
mov eax, dword [eax]
mov dword [esp + 0x2a], eax
jmp 0x4cd35e
cmp ax, 0x48
jl 0x4cd009
cmp ax, 0x4f
jg 0x4cd009
mov eax, dword [ebx + 8]
mov ebp, 8
mov ecx, dword [eax + 4]
mov dword [esp + 0x28], ecx
mov edx, dword [eax]
mov dword [esp + 0x2c], edx
jmp 0x4cd35e
cmp ax, 0x50
jl 0x4cd0e0
cmp ax, 0x5f
jg 0x4cd0e0
mov edi, dword [ebx + 8]
mov esi, dword [edi + 0xc]
cmp esi, edx
je 0x4cd04d
mov eax, esi
cmp eax, edx
je 0x4cd03f
mov eax, dword [edi + 4]
mov ecx, dword [edi + 8]
neg eax
adc ecx, edx
mov dword [edi + 4], eax
neg ecx
mov dword [edi + 8], ecx
push edx
lea ecx, [edi + 0x18]
mov dword [edi + 0xc], edx
call fcn.0043f210
xor edx, edx
cmp dword [edi + 0x10], edx
jg 0x4cd06c
cmp dword [edi + 0x14], edx
jg 0x4cd06c
mov edx, dword [edi + 8]
mov ebp, 8
mov dword [esp + 0x28], edx
mov eax, dword [edi + 4]
mov dword [esp + 0x2c], eax
jmp 0x4cd0a8
mov ecx, dword [edi + 8]
or ebp, 0x2000
mov dword [esp + 0x28], ecx
mov edx, dword [edi + 4]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x10], ebp
lea edx, [edi + 0x18]
lea ecx, [esp + 0x30]
mov ebp, 0x29
call fcn.004cd430
mov eax, dword [edi + 0x10]
lea edx, [edi + 0x24]
lea ecx, [esp + 0x3c]
mov dword [esp + 0x38], eax
call fcn.004cd440
test esi, esi
je 0x4cd35e
mov ecx, dword [edi + 0xc]
mov eax, 1
cmp ecx, eax
je 0x4cd0cf
mov ecx, dword [edi + 4]
mov edx, dword [edi + 8]
neg ecx
adc edx, 0
mov dword [edi + 4], ecx
neg edx
mov dword [edi + 8], edx
push eax
lea ecx, [edi + 0x18]
mov dword [edi + 0xc], eax
call fcn.0043f210
jmp 0x4cd35e
cmp ax, 0x60
jl 0x4cd1de
cmp ax, 0x6f
jg 0x4cd1de
mov edi, dword [ebx + 8]
mov al, byte [edi + 0x24]
mov esi, dword [edi + 0x10]
shr eax, 3
and eax, 1
mov dword [esp + 0x1c], eax
je 0x4cd110
mov ecx, edi
call fcn.004d0980
test esi, esi
je 0x4cd13f
mov eax, dword [edi + 0x10]
test eax, eax
je 0x4cd12e
mov ecx, dword [edi + 8]
mov edx, dword [edi + 0xc]
neg ecx
adc edx, 0
mov dword [edi + 8], ecx
neg edx
mov dword [edi + 0xc], edx
push 0
lea ecx, [edi + 0x18]
mov dword [edi + 0x10], 0
call fcn.0043f210
test byte [edi + 0x24], 2
je 0x4cd161
mov eax, dword [edi + 0xc]
mov ebp, 0xc
mov dword [esp + 0x28], eax
mov ecx, dword [edi + 8]
mov dword [esp + 0x2c], ecx
mov edx, dword [edi + 4]
mov dword [esp + 0x30], edx
jmp 0x4cd198
mov eax, dword [edi + 0xc]
or ebp, 0x2000
mov dword [esp + 0x28], eax
mov ecx, dword [edi + 8]
mov dword [esp + 0x2c], ecx
mov edx, dword [edi + 4]
mov dword [esp + 0x30], edx
mov dword [esp + 0x10], ebp
lea edx, [edi + 0x18]
lea ecx, [esp + 0x34]
mov ebp, 0x18
call fcn.004cd430
mov eax, dword [edi + 0x14]
mov dword [esp + 0x3c], eax
test esi, esi
je 0x4cd1c6
cmp dword [edi + 0x10], 1
je 0x4cd1b5
mov ecx, dword [edi + 8]
mov edx, dword [edi + 0xc]
neg ecx
adc edx, 0
mov dword [edi + 8], ecx
neg edx
mov dword [edi + 0xc], edx
push 1
lea ecx, [edi + 0x18]
mov dword [edi + 0x10], 1
call fcn.0043f210
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x4cd35e
mov ecx, edi
call fcn.004d0890
jmp 0x4cd35e
cmp ax, 0x70
jl 0x4cd25d
cmp ax, 0x77
jg 0x4cd25d
mov edi, dword [ebx + 8]
cmp dword [edi + 0x10], edx
jg 0x4cd229
cmp dword [edi + 0x14], edx
jg 0x4cd229
mov eax, dword [edi + 8]
mov ebp, 0x18
mov dword [esp + 0x28], eax
mov ecx, dword [edi + 4]
mov dword [esp + 0x2c], ecx
mov edx, dword [edi + 0x14]
mov dword [esp + 0x30], edx
lea edx, [edi + 0x51]
lea ecx, [esp + 0x34]
call fcn.004cd430
mov eax, dword [edi + 0x4d]
mov dword [esp + 0x3c], eax
jmp 0x4cd35e
or ebp, 0x2000
mov edx, edi
mov dword [esp + 0x10], ebp
lea ecx, [esp + 0x28]
mov ebp, 0x35
call fcn.004cd470
mov ecx, dword [edi + 0x55]
mov dword [esp + 0x51], ecx
mov edx, dword [edi + 0x51]
mov dword [esp + 0x55], edx
mov eax, dword [edi + 0x4d]
mov dword [esp + 0x59], eax
jmp 0x4cd35e
cmp ax, 0x78
jl 0x4cd29e
cmp ax, 0x7f
jg 0x4cd29e
mov edi, dword [ebx + 8]
mov ebp, 0x15
mov ecx, dword [edi + 0x18]
mov dword [esp + 0x28], ecx
mov edx, dword [edi + 0x14]
mov dword [esp + 0x2c], edx
lea edx, [edi + 8]
lea ecx, [esp + 0x30]
call fcn.004cd430
mov eax, dword [edi + 4]
mov dword [esp + 0x38], eax
mov cl, byte [edi + 0x20]
mov byte [esp + 0x3c], cl
jmp 0x4cd35e
cmp ax, 0xa4
jl 0x4cd2c4
cmp ax, 0xb3
jg 0x4cd2c4
mov eax, dword [ebx + 8]
mov ebp, 8
mov edx, dword [eax]
mov dword [esp + 0x28], edx
mov eax, dword [eax + 4]
mov dword [esp + 0x2c], eax
jmp 0x4cd35e
cmp ax, 0xc0
jl 0x4cd318
cmp ax, 0xdf
jg 0x4cd318
mov ecx, dword [esp + 0x1c]
xor eax, eax
mov esi, 1
mov ebx, dword [ecx + 8]
or ecx, 0xffffffff
mov edi, ebx
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
cmp ebp, 0x7f
jle 0x4cd30a
mov eax, 0x81020409
imul ecx
add edx, ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
inc esi
mov ecx, edx
cmp ecx, 0x7f
jg 0x4cd2ef
mov dword [esp + 0x18], ebx
mov ebx, dword [esp + 0x1c]
mov dword [esp + 0x14], esi
jmp 0x4cd35e
cmp ax, 0xf0
jl 0x4cd35c
cmp ax, 0xfe
jg 0x4cd35c
movsx ebp, word [ebx + 0x17]
cmp ebp, 0x7f
mov ecx, ebp
mov esi, 1
jle 0x4cd34f
mov eax, 0x81020409
imul ecx
add edx, ecx
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
inc esi
mov ecx, edx
cmp ecx, 0x7f
jg 0x4cd334
mov edx, dword [ebx + 8]
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], edx
jmp 0x4cd35e
xor ebp, ebp
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
mov edi, dword [esp + 0x6c]
lea esi, [edx + ebp]
add edi, 2
add esi, ecx
test eax, eax
lea esi, [esi + eax + 2]
mov dword [esp + 0x24], esi
mov si, word [esp + 0x10]
mov word [edi - 2], si
je 0x4cd393
mov eax, dword [ebx + 0x1b]
mov dword [edi], eax
add edi, 4
test ecx, ecx
je 0x4cd39f
mov ecx, dword [ebx + 0x1f]
mov dword [edi], ecx
add edi, 4
test edx, edx
je 0x4cd3d7
cmp ebp, 0x7f
mov ecx, ebp
jle 0x4cd3d4
mov eax, ecx
mov esi, 0x7f
cdq
idiv esi
or al, 0xff
sub al, dl
mov byte [edi], al
mov eax, 0x81020409
imul ecx
add edx, ecx
inc edi
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
mov ecx, edx
cmp ecx, esi
jg 0x4cd3aa
mov byte [edi], cl
inc edi
test ebp, ebp
je 0x4cd3ef
mov esi, dword [esp + 0x18]
mov ecx, ebp
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x6c]
mov dword [eax], ebp
call fcn.004b6f20
pop edi
pop esi
test eax, eax
pop ebp
jge 0x4cd416
push str.Improper_Field_Encoding._nContact_Peutronics.
push 3
push 0x64
call fcn.004b0d80
add esp, 0xc
mov eax, dword [esp + 0x18]
pop ebx
add esp, 0x54
ret 8