Function at 0x4178e0
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0xa8
mov ebx, dword [ebp + 0xc]
mov dword [esp + 0x10], 0x9bce993c
mov dword [esp + 0x14], 0xe745e553
mov dword [esp + 0x18], 0xe356e141
mov dword [esp + 0x1c], 0xefa3ed8c
mov dword [esp + 0x20], 0xeb56e950
mov dword [esp + 0x24], 0xf740f559
mov dword [esp + 0x28], 0xf35bf143
mov dword [esp + 0x2c], 0xff48fd4b
mov dword [esp + 0x30], 0xfba9f998
mov dword [esp + 0x34], 0xc77ac569
mov dword [esp + 0x38], 0xc36bc17c
mov dword [esp + 0x3c], 0xcf61cd7a
mov dword [esp + 0x40], 0xcb6ec97b
lea eax, [esp + 0x44]
mov word [esp + 0x44], 0xd5d4
mov dword [esp + 0x4a], 0
mov dword [esp + 0x46], 0
mov dword [esp + 0x50], 0
mov ecx, dword [esp + 0x50]
cmp ecx, 0x3d
ja 0x4179d7
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ecx, dword [esp + 0x50]
mov edx, dword [esp + 0x50]
movzx edx, byte [esp + edx + 0x10]
mov esi, ecx
and esi, 0x216a7b3c
xor ecx, 0x216a7b3c
lea ecx, [ecx + esi*2]
lea esi, [ecx + edx]
and ecx, edx
add ecx, ecx
sub esi, ecx
mov dword [esp + 0x6c], esi
mov ecx, dword [esp + 0x6c]
add cl, 0x5c
mov edx, dword [esp + 0x50]
mov byte [esp + edx + 0x10], cl
inc dword [esp + 0x50]
mov ecx, dword [esp + 0x50]
cmp ecx, 0x3e
jb 0x417990
lea edi, [esp + 0x6c]
lea edx, [esp + 0x10]
mov ecx, 0xd
xchg esi, edx
rep movsd dword es:[edi], dword [esi]
xchg esi, edx
lea edi, [esp + 0xa0]
mov ecx, 1
xchg esi, eax
rep movsw word es:[edi], word [esi]
xchg esi, eax
mov esi, dword [ebx + 4]
mov eax, 0xfffffffe
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp word [esi + eax + 2], 0
lea eax, [eax + 2]
jne 0x417a10
sar eax, 1
mov ecx, dword [ebp + 0x10]
mov edi, dword [ecx + 4]
mov ecx, 0xfffffffe
nop
nop
nop
nop
nop
nop
nop
nop
cmp word [edi + ecx + 2], 0
lea ecx, [ecx + 2]
jne 0x417a30
sar ecx, 1
lea edx, [eax + ecx]
add edx, 0x1b
test edx, edx
jns 0x417a4e
mov eax, 0xffffffff
jmp 0x417a55
add eax, ecx
add eax, eax
add eax, 0x36
push eax
call fcn.00409020
add esp, 4
movzx ecx, word [esi]
mov dword [esp + 8], eax
test cx, cx
je 0x417a91
add esi, 2
mov eax, dword [esp + 8]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [eax], cx
add eax, 2
movzx ecx, word [esi]
add esi, 2
test cx, cx
jne 0x417a80
mov word [eax], 0
movzx ecx, word [esp + 0x6c]
test cx, cx
je 0x417ac1
lea edx, [esp + 0x6e]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [eax], cx
add eax, 2
movzx ecx, word [edx]
add edx, 2
test cx, cx
jne 0x417ab0
mov word [eax], 0
movzx ecx, word [edi]
test cx, cx
je 0x417af1
add edi, 2
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [eax], cx
add eax, 2
movzx ecx, word [edi]
add edi, 2
test cx, cx
jne 0x417ae0
mov word [eax], 0
mov dword [esp + 0x10], 0xfbbff997
mov dword [esp + 0x14], 0xff68fd72
mov dword [esp + 0x18], 0xf36ef199
mov dword [esp + 0x1c], 0xf76ff567
mov dword [esp + 0x20], 0xeb76e967
mov dword [esp + 0x24], 0xefbded7f
lea eax, [esp + 0x28]
mov word [esp + 0x28], 0xe1ee
mov dword [esp + 0x2a], 0
mov dword [esp + 0x2e], 0
mov dword [esp + 0x32], 0
mov word [esp + 0x36], 0
mov dword [esp], 0
mov ecx, dword [esp]
cmp ecx, 0x27
ja 0x417b9d
nop
mov ecx, dword [esp]
mov edx, dword [esp]
movzx edx, byte [esp + edx + 0x10]
lea esi, [ecx + edx]
add esi, 0xd284965f
add ecx, 0xd284965f
and ecx, edx
add ecx, ecx
sub esi, ecx
mov dword [esp + 0x50], esi
mov ecx, dword [esp + 0x50]
add cl, 0x67
mov edx, dword [esp]
mov byte [esp + edx + 0x10], cl
inc dword [esp]
mov ecx, dword [esp]
cmp ecx, 0x28
jb 0x417b60
lea edi, [esp + 0x50]
lea edx, [esp + 0x10]
mov ecx, 6
xchg esi, edx
rep movsd dword es:[edi], dword [esi]
xchg esi, edx
lea edi, [esp + 0x68]
mov ecx, 1
xchg esi, eax
rep movsw word es:[edi], word [esi]
xchg esi, eax
mov edi, dword [ebx]
mov eax, 0xfffffffe
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp word [edi + eax + 2], 0
lea eax, [eax + 2]
jne 0x417bd0
mov esi, dword [ebx + 8]
mov ecx, 0xfffffffe
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp word [esi + ecx + 2], 0
lea ecx, [ecx + 2]
jne 0x417bf0
mov edx, dword [ebp + 0x10]
mov ebx, dword [edx]
mov edx, 0xfffffffe
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp word [ebx + edx + 2], 0
lea edx, [edx + 2]
jne 0x417c10
sar eax, 1
sar ecx, 1
sar edx, 1
add ecx, eax
lea eax, [edx + ecx]
add eax, 0xe
test eax, eax
jns 0x417c34
mov eax, 0xffffffff
jmp 0x417c3c
add ecx, edx
lea eax, [ecx + ecx]
add eax, 0x1c
push eax
call fcn.00409020
add esp, 4
movzx ecx, word [edi]
mov dword [esp + 0xc], eax
test cx, cx
je 0x417c71
add edi, 2
mov eax, dword [esp + 0xc]
nop
nop
nop
nop
nop
nop
nop
nop
mov word [eax], cx
add eax, 2
movzx ecx, word [edi]
add edi, 2
test cx, cx
jne 0x417c60
mov word [eax], 0x2f
add eax, 2
movzx ecx, word [esi]
test cx, cx
je 0x417ca1
add esi, 2
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [eax], cx
add eax, 2
movzx ecx, word [esi]
add esi, 2
test cx, cx
jne 0x417c90
mov word [eax], 0
movzx ecx, word [esp + 0x50]
test cx, cx
je 0x417cd3
lea edx, [esp + 0x52]
mov esi, dword [esp + 8]
nop
nop
nop
nop
nop
nop
nop
nop
mov word [eax], cx
add eax, 2
movzx ecx, word [edx]
add edx, 2
test cx, cx
jne 0x417cc0
jmp 0x417cd7
mov esi, dword [esp + 8]
mov word [eax], 0
movzx ecx, word [ebx]
test cx, cx
je 0x417d01
add ebx, 2
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov word [eax], cx
add eax, 2
movzx ecx, word [ebx]
add ebx, 2
test cx, cx
jne 0x417cf0
mov word [eax], 0
mov dword [esp + 0x10], 0x4b4445a8
mov dword [esp + 0x14], 0
mov word [esp + 0x18], 0
mov dword [esp + 4], 0
mov eax, dword [esp + 4]
cmp eax, 9
ja 0x417d78
nop
nop
mov eax, dword [esp + 4]
mov ecx, dword [esp + 4]
movzx edx, byte [esp + ecx + 0x10]
lea ecx, [eax + edx]
add ecx, 0xb1b16035
add eax, 0xb1b16035
and eax, edx
add eax, eax
mov edx, ecx
not edx
and edx, eax
not eax
and eax, ecx
sub eax, edx
mov dword [esp], eax
mov eax, dword [esp]
add al, 0x8d
mov ecx, dword [esp + 4]
mov byte [esp + ecx + 0x10], al
inc dword [esp + 4]
mov eax, dword [esp + 4]
cmp eax, 0xa
jb 0x417d30
push 0
push 0
push 0xc00000
lea eax, [esp + 0x1c]
push eax
push esi
push dword [esp + 0x20]
push dword [ebp + 8]
call fcn.0041b0e0
add esp, 0x1c
mov ebx, eax
jmp dword [0x440d30]