Function at 0x440160
Capabilities:
Encode data using xor
Encrypt data using rc4 ksa

Disassembly:
test dword [0x4b63ec], 0xffffff80
jne 0x440188
test dword [0x4b63ec], 0xffffffff
jne 0x44042c
call fcn.00490ee4
jmp fcn.00440160
push edi
push esi
push ebp
push ebx
sub esp, 0x434
mov ebp, ecx
mov ebx, dword [esp + 0x448]
mov edi, dword [esp + 0x44c]
movzx eax, byte [ebp + 0x22]
xor edx, edx
cmp eax, 0
mov esi, 1
cmove esi, edx
lea eax, [esp]
push 0x400
push edx
push eax
call fcn.004910c4
add esp, 0xc
test edi, edi
jle 0x440425
xor ecx, ecx
xor edx, edx
xor eax, eax
mov dword [esp + 0x42c], ecx
mov ebp, dword [ebp + 0x197c]
add ebp, esi
mov dword [esp + 0x408], ebp
mov ecx, eax
mov ebp, edx
cmp ecx, ebx
jge 0x440419
mov esi, edi
sub esi, ebp
test esi, esi
mov dword [esp + 0x40c], esi
jle 0x440349
mov dword [esp + 0x410], ebx
xor eax, eax
mov esi, ebx
mov dword [esp + 0x404], ecx
sub esi, ecx
add esi, 0xfffffff9
mov dword [esp + 0x428], esi
mov edx, ebx
imul edx, ebp
mov dword [esp + 0x400], ebp
add edx, ecx
xor esi, esi
mov dword [esp + 0x414], edx
mov ecx, dword [esp + 0x428]
cmp eax, ecx
jge 0x4403f8
mov dword [esp + 0x420], edx
lea edi, [eax + esi]
mov ecx, dword [esp + 0x408]
add edi, dword [esp + 0x414]
movzx ebp, byte [ecx + edi*4]
movzx ebx, byte [ecx + edi*4 + 1]
mov dword [esp + 0x41c], esi
movzx edi, byte [ecx + edi*4 + 2]
mov dword [esp + 0x424], edi
mov edi, 1
mov esi, dword [esp + 0x424]
mov dword [esp + 0x430], edi
lea edi, [eax + edx]
lea ecx, [ecx + edi*4 + 4]
mov dword [esp + 0x418], eax
inc dword [esp + 0x42c]
movzx edi, byte [ecx]
neg ebp
add ebp, edi
mov eax, ebp
neg ebx
cdq
xor ebp, edx
sub ebp, edx
neg esi
inc dword [esp + ebp*4]
mov ebp, edi
movzx edi, byte [ecx + 1]
add ebx, edi
mov eax, ebx
cdq
xor ebx, edx
sub ebx, edx
inc dword [esp + ebx*4]
mov ebx, edi
movzx edi, byte [ecx + 2]
add esi, edi
mov eax, esi
add ecx, 4
cdq
xor esi, edx
sub esi, edx
mov edx, dword [esp + 0x430]
inc edx
inc dword [esp + esi*4]
mov esi, edi
cmp edx, 7
mov dword [esp + 0x430], edx
jle 0x4402a1
mov edx, dword [esp + 0x420]
mov esi, dword [esp + 0x41c]
mov eax, dword [esp + 0x418]
add esi, dword [esp + 0x448]
inc eax
mov ecx, dword [esp + 0x40c]
add edx, dword [esp + 0x410]
cmp eax, ecx
jl 0x44023d
mov ecx, dword [esp + 0x404]
mov ebp, dword [esp + 0x400]
mov edi, dword [esp + 0x44c]
mov ebx, dword [esp + 0x448]
cmp ebx, edi
jle 0x440353
add ecx, edi
xor ebp, ebp
jmp 0x440357
add ebp, ebx
xor ecx, ecx
cmp ebp, edi
jl 0x4401ed
mov ecx, dword [esp + 0x42c]
mov ebx, dword [esp]
lea eax, [ebx + ebx]
add eax, eax
add eax, eax
add eax, eax
add eax, eax
add eax, ebx
cdq
idiv ecx
cmp eax, 0x5f
jl 0x44038d
xor eax, eax
add esp, 0x434
pop ebx
pop ebp
pop esi
pop edi
ret 8
xor edx, edx
mov eax, 1
mov esi, dword [esp + eax*4]
mov ebp, eax
imul ebp, esi
imul ebp, eax
add edx, ebp
test esi, esi
je 0x4403e9
mov ebp, dword [esp + eax*4 - 4]
add ebp, ebp
cmp esi, ebp
jg 0x4403e9
inc eax
cmp eax, 8
jl 0x440394
cmp eax, 0x100
jge 0x4403cf
mov ebp, dword [esp + eax*4]
imul ebp, eax
imul ebp, eax
add edx, ebp
inc eax
cmp eax, 0x100
jl 0x4403bc
lea ebp, [ecx + ecx]
add ebp, ecx
sub ebp, ebx
mov eax, edx
xor edx, edx
div ebp
add esp, 0x434
pop ebx
pop ebp
pop esi
pop edi
ret 8
xor eax, eax
add esp, 0x434
pop ebx
pop ebp
pop esi
pop edi
ret 8
mov ecx, dword [esp + 0x404]
mov ebp, dword [esp + 0x400]
mov edi, dword [esp + 0x44c]
mov ebx, dword [esp + 0x448]
jmp 0x440349
mov ecx, dword [esp + 0x42c]
jmp 0x440366
xor ecx, ecx
jmp 0x440366
push edi
push esi
push ebp
push ebx
sub esp, 0x434
mov ebp, ecx
mov ebx, dword [esp + 0x448]
mov edi, dword [esp + 0x44c]
movzx eax, byte [ebp + 0x22]
test eax, eax
je 0x440455
mov esi, 1
jmp 0x440457
xor esi, esi
lea eax, [esp]
push 0x400
push 0
push eax
call fcn.004910c4
add esp, 0xc
test edi, edi
jle 0x4406c8
xor ecx, ecx
xor edx, edx
xor eax, eax
add esi, dword [ebp + 0x197c]
mov dword [esp + 0x42c], ecx
mov dword [esp + 0x408], esi
mov ecx, eax
mov ebp, edx
cmp ecx, ebx
jge 0x4406bc
mov esi, edi
sub esi, ebp
mov dword [esp + 0x40c], esi
test esi, esi
jle 0x4405ec
xor eax, eax
mov esi, ebx
sub esi, ecx
add esi, 0xfffffff9
mov dword [esp + 0x428], esi
mov edx, ebx
imul edx, ebp
add edx, ecx
mov dword [esp + 0x414], edx
xor esi, esi
mov dword [esp + 0x410], ebx
mov dword [esp + 0x404], ecx
mov dword [esp + 0x400], ebp
mov ecx, dword [esp + 0x428]
cmp eax, ecx
jge 0x44069b
lea edi, [eax + esi]
add edi, dword [esp + 0x414]
mov ecx, dword [esp + 0x408]
movzx ebp, byte [ecx + edi*4]
movzx ebx, byte [ecx + edi*4 + 1]
movzx edi, byte [ecx + edi*4 + 2]
mov dword [esp + 0x424], edi
mov edi, 1
mov dword [esp + 0x430], edi
lea edi, [eax + edx]
lea ecx, [ecx + edi*4 + 4]
mov dword [esp + 0x420], edx
mov dword [esp + 0x41c], esi
mov dword [esp + 0x418], eax
mov esi, dword [esp + 0x424]
movzx edi, byte [ecx]
neg ebp
add ebp, edi
mov eax, ebp
cdq
xor ebp, edx
sub ebp, edx
inc dword [esp + ebp*4]
mov ebp, edi
movzx edi, byte [ecx + 1]
neg ebx
add ebx, edi
mov eax, ebx
cdq
xor ebx, edx
sub ebx, edx
inc dword [esp + ebx*4]
mov ebx, edi
movzx edi, byte [ecx + 2]
neg esi
add esi, edi
mov eax, esi
cdq
xor esi, edx
sub esi, edx
inc dword [esp + esi*4]
mov esi, edi
inc dword [esp + 0x42c]
add ecx, 4
mov edx, dword [esp + 0x430]
inc edx
mov dword [esp + 0x430], edx
cmp edx, 7
jle 0x440544
mov edx, dword [esp + 0x420]
mov esi, dword [esp + 0x41c]
mov eax, dword [esp + 0x418]
add esi, dword [esp + 0x448]
add edx, dword [esp + 0x410]
inc eax
mov ecx, dword [esp + 0x40c]
cmp eax, ecx
jl 0x4404e0
mov ecx, dword [esp + 0x404]
mov ebp, dword [esp + 0x400]
mov edi, dword [esp + 0x44c]
mov ebx, dword [esp + 0x448]
cmp ebx, edi
jle 0x4405f6
add ecx, edi
xor ebp, ebp
jmp 0x4405fa
add ebp, ebx
xor ecx, ecx
cmp ebp, edi
jl 0x440490
mov ecx, dword [esp + 0x42c]
mov ebx, dword [esp]
lea eax, [ebx + ebx]
add eax, eax
add eax, eax
add eax, eax
add eax, eax
add eax, ebx
cdq
idiv ecx
cmp eax, 0x5f
jl 0x440630
xor eax, eax
add esp, 0x434
pop ebx
pop ebp
pop esi
pop edi
ret 8
xor edx, edx
mov eax, 1
mov esi, dword [esp + eax*4]
mov ebp, eax
imul ebp, esi
imul ebp, eax
add edx, ebp
test esi, esi
je 0x44068c
mov ebp, dword [esp + eax*4 - 4]
add ebp, ebp
cmp esi, ebp
jg 0x44068c
inc eax
cmp eax, 8
jl 0x440637
cmp eax, 0x100
jge 0x440672
mov ebp, dword [esp + eax*4]
imul ebp, eax
imul ebp, eax
add edx, ebp
inc eax
cmp eax, 0x100
jl 0x44065f
lea ebp, [ecx + ecx]
add ebp, ecx
sub ebp, ebx
mov eax, edx
xor edx, edx
div ebp
add esp, 0x434
pop ebx
pop ebp
pop esi
pop edi
ret 8
xor eax, eax
add esp, 0x434
pop ebx
pop ebp
pop esi
pop edi
ret 8
mov ecx, dword [esp + 0x404]
mov ebp, dword [esp + 0x400]
mov edi, dword [esp + 0x44c]
mov ebx, dword [esp + 0x448]
jmp 0x4405ec
mov ecx, dword [esp + 0x42c]
jmp 0x440609
xor ecx, ecx
jmp 0x440609