Function at 0x423ac0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc8
mov eax, dword [0x5095c0]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 0x18], 4
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 0xc0], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0xc4], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0xc8], eax
mov eax, dword [ebx]
push edi
mov dword [ebp - 0xbc], ebx
mov dword [eax + 8], 0
ja 0x424429
push ebx
call fcn.00427d00
add esp, 4
test eax, eax
jne 0x423b3a
push eax
mov eax, dword [ebx]
push dword [eax + 8]
push ebx
call fcn.00427fc0
add esp, 0xc
xor eax, eax
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a818a
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0x18]
test ecx, ecx
jne 0x423b54
mov eax, dword [ebx]
cmp dword [eax + 8], 3
setge cl
lea ecx, [ecx*2 + 1]
mov dword [ebp + 0x18], ecx
mov eax, dword [ebx]
mov eax, dword [eax + 8]
mov dword [ebp - 0xb4], eax
cmp eax, 3
jne 0x423b8b
cmp dword [ebx + 0x47ec], eax
je 0x423b7e
cmp dword [ebx + 0x47e8], 0
jne 0x423b8b
cmp dword [ebx + 0x47e4], 0
jne 0x423b8b
mov edx, 1
mov dword [ebp - 0xb8], edx
jmp 0x423b9c
xor edx, edx
mov dword [ebp - 0xb8], edx
cmp eax, 3
jne 0x423c60
cmp ecx, 3
jge 0x423c60
test edx, edx
jne 0x423c60
mov dword [ebp - 0xb4], 1
push esi
xorps xmm0, xmm0
mov dword [ebp - 0x98], 0
lea esi, [ebx + 0x46a0]
movups xmmword [ebp - 0x14], xmm0
lea edi, [ebp - 0x84]
mov dword [ebp - 0xa8], esi
nop dword [eax + eax]
mov eax, dword [ebx]
mov eax, dword [eax]
add eax, 3
push eax
call fcn.004b25dd
add esp, 4
mov dword [esi + 0x34], eax
test eax, eax
je 0x4243ed
mov eax, dword [ebx + 0x4684]
cdq
idiv dword [esi]
mov dword [edi + 0xc], 0
mov dword [ebp - 0x9c], eax
mov dword [edi - 4], eax
mov eax, dword [ebx + 0x4688]
cdq
idiv dword [esi + 4]
xor edx, edx
mov esi, eax
mov eax, dword [ebp - 0x9c]
mov ecx, esi
mov dword [edi], esi
sar ecx, 1
dec eax
mov dword [edi + 8], ecx
mov ecx, dword [ebx]
add eax, dword [ecx]
mov ecx, dword [ebp - 0x9c]
div ecx
mov dword [edi + 4], eax
mov eax, dword [ebp - 0xa8]
mov eax, dword [eax + 0x28]
mov dword [edi - 8], eax
mov dword [edi - 0xc], eax
cmp ecx, 1
jne 0x423c92
cmp esi, ecx
jne 0x423c86
mov eax, 0x424460
jmp 0x423cb5
test eax, eax
jg 0x423bb7
push 0
push eax
push ebx
call fcn.00427fc0
add esp, 0xc
xor eax, eax
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a818a
mov esp, ebp
pop ebp
ret
cmp esi, 2
jne 0x423c92
mov eax, 0x4310a0
jmp 0x423cb5
cmp ecx, 2
jne 0x423cb0
cmp esi, 1
jne 0x423ca3
mov eax, 0x430d90
jmp 0x423cb5
cmp esi, 2
jne 0x423cb0
mov eax, dword [ebx + 0x4814]
jmp 0x423cb5
mov eax, 0x430d40
mov esi, dword [ebp - 0xa8]
mov dword [edi - 0x10], eax
add esi, 0x48
mov eax, dword [ebp - 0x98]
add edi, 0x20
inc eax
mov dword [ebp - 0xa8], esi
mov dword [ebp - 0x98], eax
cmp eax, dword [ebp - 0xb4]
jl 0x423be0
mov eax, dword [ebx]
mov edi, dword [ebp + 0x18]
mov esi, dword [eax + 4]
mov ecx, dword [eax]
test edi, edi
js 0x4243ed
test ecx, ecx
js 0x4243ed
je 0x423d0f
mov eax, 0x7fffffff
cdq
idiv ecx
cmp edi, eax
jg 0x4243ed
mov eax, ecx
imul eax, edi
mov dword [ebp - 0xa0], eax
test eax, eax
js 0x4243ed
test esi, esi
js 0x4243ed
je 0x423d40
mov eax, 0x7fffffff
cdq
idiv esi
cmp dword [ebp - 0xa0], eax
jg 0x4243ed
mov eax, ecx
imul eax, esi
imul eax, edi
cmp eax, 0x7ffffffe
jg 0x4243ed
imul ecx, esi
imul ecx, edi
inc ecx
push ecx
call fcn.004b25dd
mov edi, eax
add esp, 4
mov eax, dword [ebx]
test edi, edi
je 0x4243ef
xor ecx, ecx
mov dword [ebp - 0x98], ecx
cmp dword [eax + 4], ecx
jbe 0x424395
mov edx, dword [ebp + 0x18]
mov dword [ebp - 0xa8], edi
nop dword [eax]
mov esi, dword [eax]
imul esi, ecx
mov dword [ebp - 0xa0], 0
imul esi, edx
add esi, edi
cmp dword [ebp - 0xb4], 0
mov dword [ebp - 0xa4], esi
jbe 0x423e94
mov esi, dword [ebp - 0xa8]
lea eax, [ebx + 0x46bc]
mov dword [ebp - 0xb0], eax
lea edi, [ebp - 0x7c]
mov ebx, eax
nop
mov eax, dword [edi - 8]
lea ecx, [edi - 0x10]
sar eax, 1
lea edx, [edi - 0x14]
mov dword [ebp - 0xb0], ecx
mov dword [ebp - 0xa8], edx
cmp dword [edi], eax
jl 0x423df7
mov eax, dword [edx]
mov edx, ecx
mov dword [ebp - 0x9c], ecx
jmp 0x423e0d
mov eax, ecx
mov dword [ebp - 0xa8], edx
mov dword [ebp - 0x9c], eax
mov dword [ebp - 0xb0], eax
mov eax, dword [ecx]
push dword [edi - 0xc]
push dword [edi - 4]
push eax
push dword [edx]
push dword [ebx + 0x18]
call dword [edi - 0x18]
mov ecx, dword [ebp - 0xa0]
add esp, 0x14
mov dword [ebp + ecx*4 - 0x14], eax
mov eax, dword [edi]
inc eax
mov dword [edi], eax
cmp eax, dword [edi - 8]
jl 0x423e60
mov edx, dword [ebp - 0x9c]
mov eax, dword [ebp - 0xa8]
inc dword [edi + 4]
mov dword [edi], 0
mov edx, dword [edx]
mov dword [eax], edx
mov eax, dword [edi + 4]
cmp eax, dword [ebx]
jge 0x423e60
mov eax, dword [ebx + 4]
add eax, edx
mov edx, dword [ebp - 0xb0]
mov dword [edx], eax
inc ecx
add edi, 0x20
add ebx, 0x48
mov dword [ebp - 0xa0], ecx
cmp ecx, dword [ebp - 0xb4]
jl 0x423dd0
mov ebx, dword [ebp - 0xbc]
mov edx, dword [ebp + 0x18]
mov ecx, dword [ebp - 0x98]
mov dword [ebp - 0xa8], esi
mov esi, dword [ebp - 0xa4]
mov eax, dword [ebx]
cmp edx, 3
jl 0x4240d0
mov ecx, dword [eax + 8]
cmp ecx, 3
jne 0x423f37
cmp dword [ebp - 0xb8], 0
je 0x423f1a
xor edi, edi
cmp dword [eax], edi
jbe 0x424377
mov ecx, dword [ebp - 0x10]
add esi, 2
mov eax, dword [ebp - 0x14]
mov ebx, dword [ebp - 0xc]
sub eax, ecx
mov dword [ebp - 0x9c], ebx
sub dword [ebp - 0x9c], ecx
mov ebx, dword [ebp - 0xbc]
mov dword [ebp - 0xa4], eax
movzx eax, byte [eax + ecx]
lea ecx, [ecx + 1]
mov byte [esi - 2], al
inc edi
movzx eax, byte [ecx - 1]
mov byte [esi - 1], al
mov eax, dword [ebp - 0x9c]
movzx eax, byte [eax + ecx - 1]
mov byte [esi], al
mov byte [esi + 1], 0xff
add esi, edx
mov eax, dword [ebx]
cmp edi, dword [eax]
mov eax, dword [ebp - 0xa4]
jb 0x423ee4
jmp 0x424377
push edx
push dword [eax]
mov eax, dword [ebx + 0x4810]
push dword [ebp - 0xc]
push dword [ebp - 0x10]
push dword [ebp - 0x14]
push esi
call eax
add esp, 0x18
jmp 0x424374
cmp ecx, 4
jne 0x4240a4
mov ecx, dword [ebx + 0x47e8]
test ecx, ecx
jne 0x424003
mov dword [ebp - 0xa0], ecx
cmp dword [eax], ecx
jbe 0x424377
mov ecx, dword [ebp - 0x10]
lea edi, [esi + 2]
mov esi, dword [ebp - 8]
sub ecx, esi
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0xa4], ecx
sub eax, esi
mov ecx, dword [ebp - 0xc]
sub ecx, esi
mov dword [ebp - 0xb0], eax
mov dword [ebp - 0xac], ecx
movzx ecx, byte [eax + esi]
lea esi, [esi + 1]
movzx edx, byte [esi - 1]
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [edi - 2], al
mov eax, dword [ebp - 0xa4]
movzx ecx, byte [eax + esi - 1]
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [edi - 1], al
mov eax, dword [ebp - 0xac]
movzx ecx, byte [eax + esi - 1]
imul ecx, edx
mov edx, dword [ebp + 0x18]
mov byte [edi + 1], 0xff
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
mov ecx, dword [ebp - 0xa0]
shr eax, 8
inc ecx
mov byte [edi], al
add edi, edx
mov eax, dword [ebx]
mov dword [ebp - 0xa0], ecx
cmp ecx, dword [eax]
mov eax, dword [ebp - 0xb0]
jb 0x423f83
jmp 0x424377
mov eax, dword [eax]
mov edi, dword [ebx + 0x4810]
push edx
push eax
push dword [ebp - 0xc]
push dword [ebp - 0x10]
push dword [ebp - 0x14]
push esi
cmp ecx, 2
jne 0x42409a
call edi
mov eax, dword [ebx]
xor edi, edi
add esp, 0x18
cmp dword [eax], edi
jbe 0x424374
add esi, 2
mov eax, dword [ebp - 8]
movzx edx, byte [edi + eax]
inc edi
movzx eax, byte [esi - 2]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [esi - 2], al
movzx eax, byte [esi - 1]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [esi - 1], al
movzx eax, byte [esi]
not al
movzx ecx, al
imul ecx, edx
mov edx, dword [ebp + 0x18]
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [esi], al
add esi, edx
mov eax, dword [ebx]
cmp edi, dword [eax]
jb 0x424030
jmp 0x424377
call edi
add esp, 0x18
jmp 0x424374
xor ecx, ecx
cmp dword [eax], ecx
jbe 0x424377
inc esi
nop
mov eax, dword [ebp - 0x14]
mov al, byte [ecx + eax]
inc ecx
mov byte [esi + 1], al
mov byte [esi], al
mov byte [esi - 1], al
mov byte [esi + 2], 0xff
add esi, edx
mov eax, dword [ebx]
cmp ecx, dword [eax]
jb 0x4240b0
jmp 0x424377
cmp dword [ebp - 0xb8], 0
je 0x4241b5
mov eax, dword [eax]
xor edi, edi
cmp edx, 1
jne 0x42414f
test eax, eax
je 0x42437d
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x10]
sub eax, edx
mov dword [ebp - 0xa4], eax
mov eax, dword [ebp - 0xc]
sub eax, edx
sub esi, edx
mov dword [ebp - 0xac], eax
nop dword [eax]
movzx eax, byte [eax + edx]
lea edx, [edx + 1]
imul ecx, eax, 0x1d
inc edi
mov eax, dword [ebp - 0xa4]
movzx eax, byte [edx + eax - 1]
imul eax, eax, 0x96
add ecx, eax
movzx eax, byte [edx - 1]
imul eax, eax, 0x4d
add ecx, eax
shr ecx, 8
mov byte [esi + edx - 1], cl
mov eax, dword [ebx]
cmp edi, dword [eax]
mov eax, dword [ebp - 0xac]
jb 0x424110
jmp 0x424374
test eax, eax
je 0x42437d
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x10]
sub eax, edx
mov dword [ebp - 0xa4], eax
mov eax, dword [ebp - 0xc]
sub eax, edx
mov dword [ebp - 0xac], eax
movzx eax, byte [eax + edx]
lea edx, [edx + 1]
imul ecx, eax, 0x1d
lea esi, [esi + 2]
mov eax, dword [ebp - 0xa4]
inc edi
movzx eax, byte [edx + eax - 1]
imul eax, eax, 0x96
add ecx, eax
movzx eax, byte [edx - 1]
imul eax, eax, 0x4d
mov byte [esi - 1], 0xff
add ecx, eax
shr ecx, 8
mov byte [esi - 2], cl
mov eax, dword [ebx]
cmp edi, dword [eax]
mov eax, dword [ebp - 0xac]
jb 0x424170
jmp 0x424374
cmp dword [eax + 8], 4
jne 0x424328
mov ecx, dword [ebx + 0x47e8]
test ecx, ecx
jne 0x4242bd
mov dword [ebp - 0xa0], ecx
cmp dword [eax], ecx
jbe 0x424377
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x10]
mov edi, dword [ebp - 0x14]
sub eax, ecx
mov dword [ebp - 0xa4], eax
sub edi, ecx
mov eax, dword [ebp - 0xc]
sub eax, ecx
mov dword [ebp - 0x9c], ecx
mov dword [ebp - 0xb0], edi
mov dword [ebp - 0xac], eax
nop word [eax + eax]
movzx edi, byte [ecx + edi]
movzx eax, byte [ecx]
mov edx, dword [ebp - 0xa4]
mov ebx, dword [ebp - 0xac]
imul edi, eax
movzx ecx, byte [edx + ecx]
mov edx, dword [ebp - 0x9c]
imul ecx, eax
sub edi, 0xffffff80
movzx edx, byte [ebx + edx]
imul edx, eax
sub ecx, 0xffffff80
mov ebx, dword [ebp - 0xbc]
mov eax, ecx
mov byte [esi + 1], 0xff
shr eax, 8
add eax, ecx
shr eax, 8
sub edx, 0xffffff80
movzx eax, al
imul ecx, eax, 0x96
mov eax, edx
shr eax, 8
add eax, edx
mov edx, dword [ebp + 0x18]
shr eax, 8
movzx eax, al
imul eax, eax, 0x1d
add ecx, eax
mov eax, edi
shr eax, 8
add eax, edi
mov edi, dword [ebp - 0xa0]
shr eax, 8
inc edi
movzx eax, al
imul eax, eax, 0x4d
mov dword [ebp - 0xa0], edi
add ecx, eax
shr ecx, 8
mov byte [esi], cl
add esi, edx
mov eax, dword [ebx]
mov ecx, dword [ebp - 0x9c]
inc ecx
mov dword [ebp - 0x9c], ecx
cmp edi, dword [eax]
mov edi, dword [ebp - 0xb0]
jb 0x424210
jmp 0x424377
cmp ecx, 2
jne 0x424328
cmp dword [eax], 0
mov dword [ebp - 0xa0], 0
jbe 0x424377
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 8]
sub eax, edx
mov edi, dword [ebp + 0x18]
mov dword [ebp - 0xa4], eax
mov al, byte [edx + eax]
lea edx, [edx + 1]
not al
movzx ecx, al
movzx eax, byte [edx - 1]
imul ecx, eax
mov byte [esi + 1], 0xff
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
mov ecx, dword [ebp - 0xa0]
shr eax, 8
inc ecx
mov byte [esi], al
add esi, edi
mov eax, dword [ebx]
mov dword [ebp - 0xa0], ecx
cmp ecx, dword [eax]
mov eax, dword [ebp - 0xa4]
jb 0x4242e6
jmp 0x424374
mov eax, dword [eax]
xor ecx, ecx
cmp edx, 1
jne 0x424352
test eax, eax
je 0x424377
mov edi, dword [ebp - 0x14]
sub edi, esi
nop word [eax + eax]
mov al, byte [esi + edi]
lea esi, [esi + 1]
mov byte [esi - 1], al
inc ecx
mov eax, dword [ebx]
cmp ecx, dword [eax]
jb 0x424340
jmp 0x424377
test eax, eax
je 0x424377
mov edx, dword [ebp - 0x14]
nop dword [eax]
mov al, byte [ecx + edx]
lea esi, [esi + 2]
mov byte [esi - 2], al
inc ecx
mov byte [esi - 1], 0xff
mov eax, dword [ebx]
cmp ecx, dword [eax]
jb 0x424360
mov edx, dword [ebp + 0x18]
mov ecx, dword [ebp - 0x98]
mov eax, dword [ebx]
inc ecx
mov edi, dword [ebp - 0xa8]
mov dword [ebp - 0x98], ecx
cmp ecx, dword [eax + 4]
jb 0x423d90
push 0
push dword [eax + 8]
push ebx
call fcn.00427fc0
mov eax, dword [ebx]
add esp, 0xc
mov ecx, dword [ebp - 0xc0]
mov eax, dword [eax]
mov dword [ecx], eax
mov eax, dword [ebx]
mov ecx, dword [ebp - 0xc4]
mov eax, dword [eax + 4]
mov dword [ecx], eax
mov eax, dword [ebp - 0xc8]
test eax, eax
je 0x4243da
mov ecx, dword [ebx]
xor edx, edx
cmp dword [ecx + 8], 3
setge dl
lea edx, [edx*2 + 1]
mov dword [eax], edx
pop esi
mov eax, edi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a818a
mov esp, ebp
pop ebp
ret
mov eax, dword [ebx]
push 0
push dword [eax + 8]
push ebx
call fcn.00427fc0
mov ecx, dword [0x519374]
add esp, 0xc
mov eax, dword fs:[0x2c]
pop esi
mov eax, dword [eax + ecx*4]
pop edi
pop ebx
mov dword [eax + 0xc], str.Out_of_memory
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a818a
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x519374]
mov eax, dword fs:[0x2c]
pop edi
pop ebx
mov eax, dword [eax + ecx*4]
mov ecx, dword [ebp - 4]
xor ecx, ebp
mov dword [eax + 0xc], str.Internal_error
xor eax, eax
call fcn.004a818a
mov esp, ebp
pop ebp
ret