Function at 0x4016a0
Capabilities:
Encode data using xor

Disassembly:
push ebp
lea ebp, [eax + 0x28]
push edi
mov edi, eax
push esi
push ebx
sub esp, 0x44
mov ebx, dword [edi]
mov esi, dword [edi + 4]
mov dword [esp + 0x2c], eax
mov eax, dword [eax + 0x48]
mov edx, dword [edi + 0x1c]
mov dword [esp + 0x38], ebx
add eax, ebp
mov dword [esp + 0x3c], esi
mov dword [esp + 0x28], eax
mov eax, dword [edi + 0x18]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, 0x1f
cmp eax, ebx
mov eax, 0
sbb eax, esi
jae 0x401b30
mov ebx, edi
mov esi, dword [edi + 8]
mov edi, dword [edi + 0xc]
mov ecx, dword [ebx + 0x14]
mov edx, dword [ebx + 0x10]
imul eax, esi, 0xc2b2ae3d
mov dword [esp + 0x1c], ecx
mov ecx, dword [ebx + 0x20]
mov dword [esp + 0x18], edx
mov ebx, dword [ebx + 0x24]
mov dword [esp + 0x20], ecx
imul ecx, edi, 0x27d4eb4f
mov dword [esp + 0x24], ebx
mov ebx, dword [esp + 0x1c]
add ecx, eax
mov eax, 0x27d4eb4f
mul esi
add edx, ecx
mov ecx, edx
mov edx, eax
shld edx, ecx, 0x1f
shld ecx, eax, 0x1f
mov dword [esp + 0x34], ecx
mov ecx, esi
shld esi, edi, 1
shld edi, ecx, 1
mov ecx, dword [esp + 0x18]
mov eax, esi
mov dword [esp + 0x30], edx
mov edx, dword [esp + 4]
mov esi, ecx
shld ecx, ebx, 7
shld ebx, esi, 7
add ecx, eax
mov eax, dword [esp]
adc ebx, edi
mov esi, eax
shld eax, edx, 0xc
shld edx, esi, 0xc
add eax, ecx
mov ecx, dword [esp + 0x20]
adc edx, ebx
mov ebx, dword [esp + 0x24]
mov esi, ecx
mov edi, edx
mov edx, dword [esp + 0x34]
shld ecx, ebx, 0x12
shld ebx, esi, 0x12
mov esi, eax
add esi, ecx
adc edi, ebx
imul eax, dword [esp + 0x30], 0x9e3779b1
imul ecx, edx, 0x85ebca87
add ecx, eax
mov eax, 0x85ebca87
mul dword [esp + 0x30]
mov ebx, eax
add edx, ecx
xor ebx, esi
mov dword [esp + 0x30], ebx
mov ebx, edi
xor ebx, edx
imul ecx, ebx, 0x85ebca87
mov ebx, dword [esp + 0x30]
imul edx, ebx, 0x9e3779b1
mov eax, ebx
mov ebx, 0x85ebca87
add ecx, edx
mul ebx
mov edi, edx
mov edx, dword [esp + 0x1c]
mov esi, eax
add edi, ecx
imul eax, dword [esp + 0x18], 0xc2b2ae3d
imul ecx, edx, 0x27d4eb4f
add ecx, eax
mov eax, 0x27d4eb4f
mul dword [esp + 0x18]
add edx, ecx
mov ecx, eax
shld eax, edx, 0x1f
shld edx, ecx, 0x1f
mov dword [esp + 0x18], eax
imul ecx, edx, 0x85ebca87
mov eax, dword [esp + 0x18]
mov dword [esp + 0x1c], edx
imul edx, dword [esp + 0x18], 0x9e3779b1
add ecx, edx
mul ebx
add edx, ecx
add esi, 0xc2b2ae63
mov ecx, eax
adc edi, 0x85ebca77
xor ecx, esi
xor edx, edi
mov dword [esp + 0x18], ecx
mov edi, dword [esp + 0x18]
imul ecx, edx, 0x85ebca87
imul edx, edi, 0x9e3779b1
mov eax, edi
add ecx, edx
mul ebx
mov edi, edx
mov edx, dword [esp + 4]
mov esi, eax
add edi, ecx
imul eax, dword [esp], 0xc2b2ae3d
imul ecx, edx, 0x27d4eb4f
add ecx, eax
mov eax, 0x27d4eb4f
mul dword [esp]
add edx, ecx
mov ecx, eax
shld eax, edx, 0x1f
shld edx, ecx, 0x1f
mov dword [esp], eax
imul ecx, edx, 0x85ebca87
mov eax, dword [esp]
imul edx, dword [esp], 0x9e3779b1
add ecx, edx
mul ebx
add edx, ecx
add esi, 0xc2b2ae63
mov ecx, eax
adc edi, 0x85ebca77
xor ecx, esi
mov dword [esp], ecx
xor edx, edi
mov edi, dword [esp]
imul ecx, edx, 0x85ebca87
imul edx, edi, 0x9e3779b1
mov eax, edi
add ecx, edx
mul ebx
mov edi, edx
mov edx, dword [esp + 0x24]
mov esi, eax
add edi, ecx
imul eax, dword [esp + 0x20], 0xc2b2ae3d
imul ecx, edx, 0x27d4eb4f
add ecx, eax
mov eax, 0x27d4eb4f
mul dword [esp + 0x20]
add edx, ecx
mov ecx, eax
shld eax, edx, 0x1f
shld edx, ecx, 0x1f
imul ecx, edx, 0x85ebca87
mov dword [esp], eax
mov eax, dword [esp]
mov dword [esp + 4], edx
imul edx, dword [esp], 0x9e3779b1
add ecx, edx
mul ebx
add edx, ecx
add esi, 0xc2b2ae63
adc edi, 0x85ebca77
mov ecx, edx
xor eax, esi
xor ecx, edi
imul edx, eax, 0x9e3779b1
mov edi, 0x85ebca87
imul ebx, ecx, 0x85ebca87
add ebx, edx
mul edi
add edx, ebx
add eax, 0xc2b2ae63
adc edx, 0x85ebca77
mov ecx, eax
mov ebx, edx
mov eax, dword [esp + 0x2c]
add ecx, dword [esp + 0x38]
adc ebx, dword [esp + 0x3c]
add eax, 0x30
mov dword [esp + 0x18], eax
cmp dword [esp + 0x28], eax
jb 0x401a0c
mov ebp, 0x85ebca87
mov edi, eax
imul eax, dword [edi - 8], 0xc2b2ae3d
imul esi, dword [edi - 4], 0x27d4eb4f
add esi, eax
mov eax, 0x27d4eb4f
mul dword [edi - 8]
add edx, esi
mov esi, eax
shld eax, edx, 0x1f
shld edx, esi, 0x1f
mov dword [esp], eax
imul esi, edx, 0x85ebca87
mov eax, dword [esp]
imul edx, dword [esp], 0x9e3779b1
add esi, edx
mul ebp
add edx, esi
mov esi, eax
mov eax, edx
xor esi, ecx
xor eax, ebx
mov dword [esp + 8], esi
mov dword [esp + 0xc], eax
mov eax, dword [esp + 8]
mov edx, dword [esp + 0xc]
mov ecx, eax
shld eax, edx, 0x1b
shld edx, ecx, 0x1b
imul ebx, edx, 0x85ebca87
mov dword [esp], eax
mov eax, dword [esp]
mov dword [esp + 4], edx
imul edx, dword [esp], 0x9e3779b1
add ebx, edx
mul ebp
add edx, ebx
add eax, 0xc2b2ae63
adc edx, 0x85ebca77
mov ecx, eax
add edi, 8
mov ebx, edx
cmp dword [esp + 0x28], edi
jae 0x401960
mov eax, dword [esp + 0x28]
sub eax, dword [esp + 0x2c]
mov ebp, dword [esp + 0x18]
sub eax, 0x30
and eax, 0xfffffff8
add ebp, eax
lea eax, [ebp + 4]
mov dword [esp], eax
cmp dword [esp + 0x28], eax
jb 0x401a68
mov eax, 0x85ebca87
mul dword [ebp]
imul esi, dword [ebp], 0x9e3779b1
mov ebp, edx
add ebp, esi
mov esi, eax
mov edi, ebp
xor esi, ecx
mov ebp, dword [esp]
xor edi, ebx
mov eax, esi
mov ebx, 0x27d4eb4f
mov edx, edi
shld eax, edi, 0x17
shld edx, esi, 0x17
imul ecx, edx, 0x27d4eb4f
imul edx, eax, 0xc2b2ae3d
add ecx, edx
mul ebx
add edx, ecx
add eax, 0x9e3779f9
adc edx, 0x165667b1
mov ecx, eax
mov ebx, edx
cmp dword [esp + 0x28], ebp
jbe 0x401acc
mov edi, 0x85ebca87
lea esi, [esi]
nop
movzx eax, byte [ebp]
mov edx, 0x165667c5
add ebp, 1
imul esi, eax, 0x27d4eb2f
mul edx
add edx, esi
mov esi, eax
mov eax, edx
xor esi, ecx
xor eax, ebx
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov ecx, eax
shld eax, edx, 0xb
shld edx, ecx, 0xb
imul esi, edx, 0x85ebca87
imul edx, eax, 0x9e3779b1
add esi, edx
mul edi
mov ebx, edx
mov ecx, eax
add ebx, esi
cmp dword [esp + 0x28], ebp
jne 0x401a78
mov eax, ebx
add esp, 0x44
shr eax, 1
xor eax, ecx
imul ecx, ebx, 0x27d4eb4f
mov ebx, 0x27d4eb4f
imul edx, eax, 0xc2b2ae3d
add ecx, edx
mul ebx
mov ebp, edx
mov edi, eax
add ebp, ecx
mov edx, ebp
shrd eax, ebp, 0x1d
shr edx, 0x1d
mov ecx, eax
mov eax, edi
mov ebx, edx
mov edx, ebp
xor eax, ecx
xor edx, ebx
imul ecx, eax, 0x165667b1
mov ebx, 0x9e3779f9
imul edx, edx, 0x9e3779f9
add ecx, edx
mul ebx
pop ebx
pop esi
mov edi, eax
lea edx, [edx + ecx]
mov eax, edi
pop edi
pop ebp
xor eax, edx
ret
mov ecx, dword [esp]
mov ebx, dword [esp + 4]
add ecx, 0x165667c5
adc ebx, 0x27d4eb2f
jmp 0x40193c