Function at 0x417114
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x2c
mov ebp, ecx
mov edi, dword [esp + 0x40]
add dword [ecx + 0x38], edi
mov ecx, dword [ecx + 0x3c]
test ecx, ecx
mov dword [esp + 0x18], edx
je 0x417156
mov esi, 8
sub esi, ecx
cmp edi, esi
mov eax, esi
cmovb eax, edi
cmp eax, 4
mov dword [esp + 0xc], ecx
jb 0x41715d
mov edi, dword [edx]
mov dword [esp], 0
mov ebx, 4
jmp 0x417168
xor esi, esi
jmp 0x4172da
xor edi, edi
mov dword [esp], 0
xor ebx, ebx
mov ecx, ebx
or ecx, 1
cmp ecx, eax
mov dword [esp + 8], esi
jae 0x4171a1
movzx edx, word [edx + ebx]
lea ecx, [ebx*8]
xor esi, esi
shld esi, edx, cl
shl edx, cl
test cl, 0x20
cmovne esi, edx
mov ecx, 0
cmovne edx, ecx
or dword [esp], esi
mov esi, dword [esp + 8]
or edi, edx
or ebx, 2
cmp ebx, eax
jae 0x4171d3
mov eax, dword [esp + 0x18]
movzx eax, byte [eax + ebx]
shl ebx, 3
xor edx, edx
mov ecx, ebx
shld edx, eax, cl
shl eax, cl
xor ecx, ecx
test bl, 0x20
cmovne edx, eax
cmovne eax, ecx
mov ecx, dword [esp]
or ecx, edx
mov edx, ecx
or edi, eax
mov eax, dword [esp + 0xc]
jmp 0x4171da
mov eax, dword [esp + 0xc]
mov edx, dword [esp]
lea ecx, [eax*8]
shld edx, edi, cl
shl edi, cl
xor ebx, ebx
test cl, 0x20
cmovne edx, edi
cmove ebx, edi
or edx, dword [ebp + 0x34]
or ebx, dword [ebp + 0x30]
mov dword [ebp + 0x30], ebx
mov dword [ebp + 0x34], edx
mov ecx, dword [esp + 0x40]
cmp esi, ecx
jbe 0x41720e
add eax, ecx
mov ecx, eax
jmp 0x4174b2
mov eax, dword [ebp + 0x1c]
xor eax, edx
mov dword [esp], eax
mov ecx, dword [ebp + 0x18]
xor ecx, ebx
mov eax, dword [ebp + 0x10]
mov esi, dword [ebp + 0x14]
mov edi, dword [ebp]
add edi, eax
mov dword [esp + 4], edi
mov edi, dword [ebp + 4]
adc edi, esi
mov dword [esp + 0x14], edi
mov edi, eax
shld edi, esi, 0xd
shld esi, eax, 0xd
xor esi, dword [esp + 0x14]
xor edi, dword [esp + 4]
mov eax, dword [ebp + 8]
add eax, ecx
mov dword [esp + 0x20], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x24], ebx
mov ebx, dword [esp]
adc eax, ebx
mov dword [esp + 0x10], eax
mov eax, ecx
shld eax, ebx, 0x10
shrd ecx, ebx, 0x10
xor ecx, dword [esp + 0x10]
mov ebx, dword [esp + 0x20]
xor eax, ebx
add dword [esp + 0x14], eax
adc dword [esp + 4], ecx
mov dword [esp], edx
mov edx, eax
shld edx, ecx, 0x15
shrd eax, ecx, 0xb
xor edx, dword [esp + 0x14]
mov dword [ebp + 0x18], edx
xor eax, dword [esp + 4]
mov edx, ebx
add edx, edi
mov ecx, dword [esp + 0x10]
adc ecx, esi
mov dword [ebp + 0x1c], eax
mov eax, edi
shld eax, esi, 0x11
shrd edi, esi, 0xf
mov esi, dword [esp + 8]
xor eax, edx
mov dword [ebp + 0x10], eax
xor edi, ecx
mov dword [ebp + 0x14], edi
mov edi, dword [esp + 0x40]
mov dword [ebp + 0xc], edx
mov dword [ebp + 8], ecx
mov eax, dword [esp + 4]
xor eax, dword [esp]
mov ecx, dword [esp + 0x14]
xor ecx, dword [esp + 0x24]
mov dword [ebp], ecx
mov dword [ebp + 4], eax
mov edx, dword [esp + 0x18]
sub edi, esi
mov eax, edi
and eax, 7
and edi, 0xfffffff8
cmp esi, edi
mov dword [esp + 0xc], eax
jae 0x417416
mov ecx, dword [ebp]
mov dword [esp + 0x1c], ebp
mov dword [esp + 8], esi
mov esi, dword [ebp + 4]
mov ebx, dword [ebp + 0x1c]
mov eax, dword [ebp + 0x18]
mov dword [esp + 0x28], edi
mov edi, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
mov ebp, dword [esp + 0x1c]
mov ebp, dword [ebp + 0xc]
mov dword [esp], ebp
mov ebp, dword [esp + 0x1c]
mov ebp, dword [ebp + 8]
mov dword [esp + 4], ebp
mov dword [esp + 0x10], esi
mov ebp, dword [esp + 0x18]
mov esi, dword [esp + 8]
mov ebp, dword [ebp + esi + 4]
mov dword [esp + 0x14], ebp
xor ebx, dword [esp + 0x14]
mov ebp, dword [esp + 0x18]
mov esi, dword [esp + 8]
mov ebp, dword [ebp + esi]
mov dword [esp + 0x24], ebp
xor eax, ebp
add ecx, edx
mov esi, dword [esp + 0x10]
adc esi, edi
mov ebp, edx
shld ebp, edi, 0xd
shld edi, edx, 0xd
xor edi, esi
xor ebp, ecx
mov dword [esp + 0x20], ebp
mov edx, dword [esp + 4]
add edx, eax
mov ebp, dword [esp]
adc ebp, ebx
mov dword [esp + 0x10], ebp
mov ebp, eax
shld ebp, ebx, 0x10
shrd eax, ebx, 0x10
xor eax, dword [esp + 0x10]
xor ebp, edx
add esi, ebp
mov dword [esp + 4], esi
adc ecx, eax
mov esi, ebp
shld esi, eax, 0x15
shrd ebp, eax, 0xb
mov ebx, ebp
xor ebx, ecx
mov eax, esi
xor eax, dword [esp + 4]
mov esi, dword [esp + 0x20]
add edx, esi
mov dword [esp], edx
mov ebp, dword [esp + 0x10]
adc ebp, edi
mov edx, esi
shld edx, edi, 0x11
shld edi, esi, 0x11
mov esi, ecx
xor esi, dword [esp + 0x14]
mov ecx, dword [esp + 4]
xor ecx, dword [esp + 0x24]
mov dword [esp + 4], ebp
xor edi, ebp
xor edx, dword [esp]
mov ebp, dword [esp + 8]
add ebp, 8
mov dword [esp + 8], ebp
cmp ebp, dword [esp + 0x28]
jb 0x417323
mov ebp, dword [esp + 0x1c]
mov dword [ebp + 0x18], eax
mov dword [ebp + 0x1c], ebx
mov dword [ebp + 0x10], edx
mov dword [ebp + 0x14], edi
mov eax, dword [esp + 4]
mov dword [ebp + 8], eax
mov eax, dword [esp]
mov dword [ebp + 0xc], eax
mov dword [ebp], ecx
mov dword [ebp + 4], esi
mov edx, dword [esp + 0x18]
mov esi, dword [esp + 8]
mov eax, dword [esp + 0xc]
cmp eax, 4
jb 0x41742a
mov eax, dword [edx + esi]
mov dword [esp], eax
xor edi, edi
mov ebx, 4
jmp 0x417435
mov dword [esp], 0
xor edi, edi
xor ebx, ebx
mov ecx, ebx
or ecx, 1
mov eax, dword [esp + 0xc]
cmp ecx, eax
mov dword [esp + 8], esi
jae 0x417476
lea ecx, [edx + ebx]
movzx edx, word [esi + ecx]
lea ecx, [ebx*8]
xor esi, esi
shld esi, edx, cl
xor eax, eax
shl edx, cl
test cl, 0x20
mov ecx, dword [esp + 0xc]
cmovne esi, edx
cmovne edx, eax
or edi, esi
mov eax, dword [esp]
or eax, edx
or ebx, 2
jmp 0x41747b
mov ecx, eax
mov eax, dword [esp]
cmp ebx, ecx
jae 0x4174ac
mov edx, dword [esp + 8]
add edx, ebx
mov ecx, dword [esp + 0x18]
movzx edx, byte [ecx + edx]
shl ebx, 3
xor esi, esi
mov ecx, ebx
shld esi, edx, cl
shl edx, cl
xor ecx, ecx
test bl, 0x20
cmovne esi, edx
cmovne edx, ecx
mov ecx, dword [esp + 0xc]
or edi, esi
or eax, edx
mov dword [ebp + 0x30], eax
mov dword [ebp + 0x34], edi
mov dword [ebp + 0x3c], ecx
add esp, 0x2c
pop esi
pop edi
pop ebx
pop ebp
ret