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

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffd0
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [esp + 4]
mov eax, dword [eax]
call fcn.0041b4f8
mov eax, dword [esp]
mov edx, dword [eax]
call dword [edx]
cmp edx, 0
jne 0x4a0434
cmp eax, 1
jae 0x4a043d
jmp 0x4a0436
jge 0x4a043d
mov al, 1
jmp 0x4a0761
call fcn.0040a4a4
add esp, 0xfffffff8
fstp qword [esp]
wait
call fcn.0049eeac
mov ecx, eax
mov eax, ecx
mov ecx, 5
cdq
idiv ecx
mov ecx, edx
mov esi, ecx
test esi, esi
jl 0x4a046b
inc esi
call fcn.00402bfc
dec esi
jne 0x4a0463
xor edi, edi
call fcn.00402bfc
mov eax, 0xf6
call fcn.00402eac
mov ecx, eax
and ecx, 0x80000007
jns 0x4a048b
dec ecx
or ecx, 0xfffffff8
inc ecx
mov esi, ecx
test esi, esi
jl 0x4a049a
inc esi
call fcn.00402bfc
dec esi
jne 0x4a0492
mov eax, pe_nt_image_headers32
call fcn.00402eac
mov byte [esp + edi + 0x18], al
inc edi
cmp edi, 0xf
jle 0x4a046d
call fcn.00402bfc
mov eax, 0xf6
call fcn.00402eac
mov eax, pe_nt_image_headers32
call fcn.00402eac
mov ecx, eax
cmp ecx, 0x80
jge 0x4a04bd
mov eax, pe_nt_image_headers32
call fcn.00402eac
mov byte [esp + 0x18], al
mov eax, dword [esp]
mov edx, dword [eax]
call dword [edx]
mov esi, eax
mov bl, 0xf6
xor edi, edi
mov eax, esi
and eax, 0x800000ff
jns 0x4a04fc
dec eax
or eax, 0xffffff00
inc eax
mov byte [esp + 0xc], al
test esi, esi
jns 0x4a050a
add esi, 0xff
sar esi, 8
xor edx, edx
mov dl, byte [esp + 0xc]
xor eax, eax
mov al, bl
add edx, eax
lea ecx, [edi + 8]
movzx ecx, byte [esp + ecx + 0x18]
add edx, ecx
and edx, 0xff
mov byte [esp + 0xc], dl
mov edx, 7
sub edx, edi
mov dl, byte [esp + edx + 0x18]
xor byte [esp + 0xc], dl
lea edx, [edi + 0x10]
mov cl, byte [esp + 0xc]
mov byte [esp + edx + 0x18], cl
xor edx, edx
mov dl, byte [esp + 0xc]
add eax, edx
and eax, 0xff
mov ebx, eax
inc edi
cmp edi, 8
jne 0x4a04ec
xor eax, eax
mov al, byte [esp + 0x1d]
xor edx, edx
mov dl, byte [esp + 0x20]
add eax, edx
xor edx, edx
mov dl, byte [esp + 0x19]
add eax, edx
and eax, 7
mov byte [esp + 8], al
xor eax, eax
mov al, byte [esp + 0x2a]
xor edx, edx
mov dl, byte [esp + 0x27]
add eax, edx
xor edx, edx
mov dl, byte [esp + 0x2e]
add eax, edx
mov ecx, 5
xor edx, edx
div ecx
mov byte [esp + 9], dl
mov al, byte [esp + 8]
inc eax
add al, 8
mov byte [esp + 8], al
mov al, byte [esp + 9]
inc eax
add al, 0x10
mov byte [esp + 9], al
mov al, byte [esp + 8]
mov byte [esp + 0xa], al
mov al, byte [esp + 9]
mov byte [esp + 0xb], al
lea edx, [esp + 0x18]
mov eax, dword [esp + 4]
mov eax, dword [eax]
mov ecx, 0x18
mov esi, dword [eax]
call dword [esi + 0x10]
push 0
push 0
mov eax, dword [esp + 8]
call fcn.0041ad98
mov eax, dword [esp]
mov edx, dword [eax]
call dword [edx]
mov esi, eax
xor edi, edi
mov dword [esp + 0x10], 0xf6
mov dword [esp + 0x14], 0
cmp esi, edi
jle 0x4a06dd
lea edx, [esp + 0xc]
mov ecx, 1
mov eax, dword [esp]
mov ebp, dword [eax]
call dword [ebp + 0xc]
xor eax, eax
mov al, byte [esp + 0xa]
inc eax
xor edx, edx
mov dl, byte [esp + 8]
mov ecx, edx
xor edx, edx
div ecx
mov byte [esp + 0xa], dl
xor eax, eax
mov al, byte [esp + 0xb]
dec eax
xor ecx, ecx
mov cl, byte [esp + 9]
add eax, ecx
cdq
idiv ecx
mov byte [esp + 0xb], dl
xor eax, eax
mov al, byte [esp + 0xb]
mov edx, 0x17
sub edx, eax
xor eax, eax
mov al, byte [esp + edx + 0x18]
xor edx, edx
mov dl, byte [esp + 0xc]
add eax, edx
xor edx, edx
mov dl, bl
add eax, edx
and eax, 0xff
mov byte [esp + 0xc], al
xor eax, eax
mov al, byte [esp + 0xa]
mov al, byte [esp + eax + 0x18]
xor byte [esp + 0xc], al
lea edx, [esp + 0xc]
mov eax, dword [esp + 4]
mov eax, dword [eax]
mov ecx, 1
mov ebp, dword [eax]
call dword [ebp + 0x10]
xor eax, eax
mov al, bl
xor edx, edx
mov dl, byte [esp + 0xc]
add eax, edx
and eax, 0xff
mov ebx, eax
push 0
push 0x3b9ac9ff
xor eax, eax
mov al, bl
xor edx, edx
add eax, dword [esp + 0x18]
adc edx, dword [esp + 0x1c]
push edx
push eax
mov eax, edi
cdq
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
call fcn.00405214
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
inc edi
cmp esi, edi
jg 0x4a0606
mov esi, dword [esp + 0x10]
xor edi, edi
mov eax, esi
and eax, 0x800000ff
jns 0x4a06f3
dec eax
or eax, 0xffffff00
inc eax
mov byte [esp + 0xc], al
test esi, esi
jns 0x4a0701
add esi, 0xff
sar esi, 8
xor eax, eax
mov al, byte [esp + 0xc]
xor edx, edx
mov dl, bl
add eax, edx
lea edx, [edi + 8]
movzx edx, byte [esp + edx + 0x18]
add eax, edx
and eax, 0xff
mov byte [esp + 0xc], al
mov eax, 7
sub eax, edi
mov al, byte [esp + eax + 0x18]
xor byte [esp + 0xc], al
lea edx, [esp + 0xc]
mov eax, dword [esp + 4]
mov eax, dword [eax]
mov ecx, 1
mov ebp, dword [eax]
call dword [ebp + 0x10]
xor eax, eax
mov al, bl
xor edx, edx
mov dl, byte [esp + 0xc]
add eax, edx
and eax, 0xff
mov ebx, eax
inc edi
cmp edi, 8
jne 0x4a06e3
mov al, 1
add esp, 0x30
pop ebp
pop edi
pop esi
pop ebx
ret