Function at 0x416867
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x2c
mov edi, dword [esp + 0x40]
mov ebp, ecx
mov dword [esp + 0x1c], edx
mov dword [esp + 0xc], ebp
add dword [ecx + 0x38], edi
mov ecx, dword [ecx + 0x3c]
test ecx, ecx
je 0x4168ae
mov esi, 8
mov dword [esp + 0x14], ecx
sub esi, ecx
cmp edi, esi
mov eax, esi
cmovb eax, edi
cmp eax, 3
jbe 0x4168b5
mov edi, dword [edx]
mov dword [esp + 4], 0
mov ebx, 4
jmp 0x4168c1
xor esi, esi
jmp 0x416a36
xor edi, edi
xor ebx, ebx
mov dword [esp + 4], 0
mov ecx, ebx
mov dword [esp + 8], esi
or ecx, 1
cmp ecx, eax
jae 0x4168f8
movzx edx, word [edx + ebx]
lea ecx, [ebx*8]
xor ebp, ebp
xor esi, esi
shld ebp, edx, cl
shl edx, cl
test cl, 0x20
cmovne ebp, edx
cmovne edx, esi
or ebx, 2
or dword [esp + 4], ebp
mov ebp, dword [esp + 0xc]
or edi, edx
cmp ebx, eax
jae 0x41692d
mov eax, dword [esp + 0x1c]
xor esi, esi
xor edx, edx
movzx eax, byte [eax + ebx]
shl ebx, 3
mov ecx, ebx
shld esi, eax, cl
shl eax, cl
test bl, 0x20
mov ebx, dword [esp + 4]
cmovne esi, eax
cmovne eax, edx
or edi, eax
mov eax, dword [esp + 8]
or ebx, esi
mov esi, dword [esp + 0x14]
jmp 0x416939
mov eax, dword [esp + 8]
mov esi, dword [esp + 0x14]
mov ebx, dword [esp + 4]
lea ecx, [esi*8]
xor edx, edx
shld ebx, edi, cl
shl edi, cl
test cl, 0x20
mov ecx, dword [esp + 0x40]
cmovne ebx, edi
cmove edx, edi
or ebx, dword [ebp + 0x34]
or edx, dword [ebp + 0x30]
cmp eax, ecx
mov dword [ebp + 0x30], edx
mov dword [ebp + 0x34], ebx
jbe 0x41696d
add esi, ecx
mov ecx, esi
jmp 0x416c01
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0x10]
mov edi, dword [ebp]
mov esi, dword [ebp + 0x14]
mov dword [esp + 4], ebx
xor eax, ebx
mov ebx, dword [ebp + 0xc]
mov dword [esp + 0x20], eax
mov eax, dword [ebp + 0x18]
xor eax, edx
add edi, ecx
mov dword [esp], edi
mov edi, dword [ebp + 4]
adc edi, esi
mov dword [esp + 0x18], edi
mov edi, ecx
shld edi, esi, 0xd
shld esi, ecx, 0xd
mov ecx, dword [ebp + 8]
mov ebp, eax
xor esi, dword [esp + 0x18]
xor edi, dword [esp]
mov dword [esp + 0x10], ecx
add dword [esp + 0x10], eax
mov ecx, dword [esp + 0x20]
adc ebx, ecx
shld ebp, ecx, 0x10
shrd eax, ecx, 0x10
xor ebp, dword [esp + 0x10]
xor eax, ebx
add dword [esp + 0x18], ebp
mov ecx, ebp
adc dword [esp], eax
shld ecx, eax, 0x15
shrd ebp, eax, 0xb
mov eax, dword [esp + 0xc]
xor ecx, dword [esp + 0x18]
xor ebp, dword [esp]
mov dword [eax + 0x18], ecx
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
mov dword [eax + 0x1c], ebp
mov ebp, dword [esp + 0xc]
add ecx, edi
mov eax, edi
adc ebx, esi
shld eax, esi, 0x11
shrd edi, esi, 0xf
mov esi, dword [esp + 8]
xor eax, ecx
xor edi, ebx
mov dword [ebp + 0x14], edi
mov dword [ebp + 0x10], eax
mov dword [ebp + 8], ebx
mov ebx, dword [esp]
mov dword [ebp + 0xc], ecx
mov ecx, dword [esp + 0x18]
mov edi, dword [esp + 0x40]
xor ebx, dword [esp + 4]
xor ecx, edx
mov edx, dword [esp + 0x1c]
mov dword [ebp], ecx
mov dword [ebp + 4], ebx
sub edi, esi
mov eax, edi
and edi, 0xfffffff8
and eax, 7
cmp esi, edi
mov dword [esp + 0x14], eax
jae 0x416b6c
mov dword [esp + 8], esi
mov dword [esp + 0x24], edi
mov ecx, dword [ebp]
mov esi, dword [ebp + 4]
mov ebx, dword [ebp + 0x1c]
mov eax, dword [ebp + 0x18]
mov edi, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
mov ebp, dword [esp + 0xc]
mov ebp, dword [ebp + 0xc]
mov dword [esp + 4], ebp
mov ebp, dword [esp + 0xc]
mov ebp, dword [ebp + 8]
mov dword [esp], ebp
mov dword [esp + 0x10], esi
mov ebp, dword [esp + 0x1c]
mov esi, dword [esp + 8]
mov ebp, dword [ebp + esi + 4]
mov esi, dword [esp + 8]
mov dword [esp + 0x18], ebp
mov ebp, dword [esp + 0x1c]
xor ebx, dword [esp + 0x18]
mov ebp, dword [ebp + esi]
mov esi, dword [esp + 0x10]
xor eax, ebp
add ecx, edx
mov dword [esp + 0x20], ebp
mov ebp, edx
adc esi, edi
shld ebp, edi, 0xd
shld edi, edx, 0xd
mov edx, dword [esp]
xor ebp, ecx
xor edi, esi
mov dword [esp + 0x28], ebp
mov ebp, dword [esp + 4]
add edx, eax
adc ebp, ebx
mov dword [esp + 0x10], ebp
mov ebp, eax
shrd eax, ebx, 0x10
shld ebp, ebx, 0x10
xor eax, dword [esp + 0x10]
xor ebp, edx
add esi, ebp
mov dword [esp], esi
mov esi, ebp
adc ecx, eax
shld esi, eax, 0x15
shrd ebp, eax, 0xb
mov eax, esi
mov esi, dword [esp + 0x28]
mov ebx, ebp
mov ebp, dword [esp + 0x10]
xor ebx, ecx
xor eax, dword [esp]
add edx, esi
mov dword [esp + 4], edx
mov edx, esi
adc ebp, edi
shld edx, edi, 0x11
shld edi, esi, 0x11
mov esi, ecx
mov ecx, dword [esp]
mov dword [esp], ebp
xor edi, ebp
mov ebp, dword [esp + 8]
xor esi, dword [esp + 0x18]
xor edx, dword [esp + 4]
xor ecx, dword [esp + 0x20]
add ebp, 8
cmp ebp, dword [esp + 0x24]
mov dword [esp + 8], ebp
jb 0x416a7b
mov ebp, dword [esp + 0xc]
mov dword [ebp + 0x18], eax
mov eax, dword [esp]
mov dword [ebp + 0x1c], ebx
mov dword [ebp + 0x10], edx
mov dword [ebp + 0x14], edi
mov edx, dword [esp + 0x1c]
mov dword [ebp + 8], eax
mov eax, dword [esp + 4]
mov dword [ebp + 0xc], eax
mov dword [ebp + 4], esi
mov esi, dword [esp + 8]
mov eax, dword [esp + 0x14]
mov dword [ebp], ecx
cmp eax, 3
jbe 0x416b7d
mov eax, dword [edx + esi]
xor edi, edi
mov ebx, 4
jmp 0x416b83
xor eax, eax
xor edi, edi
xor ebx, ebx
mov ebp, dword [esp + 0x14]
mov ecx, ebx
mov dword [esp + 8], esi
or ecx, 1
cmp ecx, ebp
jae 0x416bc4
lea ecx, [ebx + esi]
xor ebp, ebp
mov esi, 0
movzx edx, word [edx + ecx]
lea ecx, [ebx*8]
shld ebp, edx, cl
shl edx, cl
test cl, 0x20
mov ecx, dword [esp + 0x14]
cmovne ebp, edx
cmovne edx, esi
or ebx, 2
or edi, ebp
or eax, edx
jmp 0x416bc6
mov ecx, ebp
cmp ebx, ecx
jae 0x416bf7
mov ecx, dword [esp + 8]
mov edx, dword [esp + 0x1c]
xor ebp, ebp
xor esi, esi
add ecx, ebx
shl ebx, 3
movzx edx, byte [edx + ecx]
mov ecx, ebx
shld ebp, edx, cl
shl edx, cl
mov ecx, dword [esp + 0x14]
test bl, 0x20
cmovne ebp, edx
cmovne edx, esi
or edi, ebp
or eax, edx
mov ebp, dword [esp + 0xc]
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