Function at 0x415ea7
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x30
mov dword [esp + 0x2c], edx
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x48]
mov eax, dword [esp + 0x4c]
mov ebp, dword [eax]
mov eax, dword [ecx]
mov esi, ecx
cmp eax, ebp
cmova ebp, eax
xor eax, eax
inc eax
test ebp, ebp
mov dword [esp + 0x18], eax
cmove ebp, eax
push ebp
call fcn.00413a58
add esp, 4
mov edi, eax
push ebp
call fcn.00413a58
add esp, 4
mov dword [esp], eax
mov eax, dword [edi]
mov ecx, esi
mov ebx, dword [esi]
cmp eax, ebx
cmovb ebx, eax
lea esi, [ebx*4]
push esi
push dword [ecx + 4]
push dword [edi + 4]
call fcn.004785a0
add esp, 0xc
mov eax, dword [edi]
sub eax, ebx
shl eax, 2
mov dword [esp + 8], edi
add esi, dword [edi + 4]
push eax
push esi
call fcn.0046d0f4
add esp, 8
mov ebx, dword [esp]
mov eax, dword [ebx]
mov ecx, dword [esp + 0x4c]
mov esi, dword [ecx]
cmp eax, esi
cmovb esi, eax
lea edi, [esi*4]
push edi
push dword [ecx + 4]
push dword [ebx + 4]
call fcn.004785a0
add esp, 0xc
mov eax, dword [ebx]
sub eax, esi
shl eax, 2
add edi, dword [ebx + 4]
push eax
push edi
call fcn.0046d0f4
add esp, 8
lea esi, [ebp + 1]
push esi
call fcn.00413a58
add esp, 4
mov dword [esp + 0xc], eax
push esi
call fcn.00413a58
add esp, 4
mov dword [esp + 4], eax
push ebp
call fcn.00413a58
add esp, 4
mov dword [esp + 0x24], eax
mov esi, ebp
shl esi, 6
mov dword [esp + 0x1c], ebp
lea eax, [ebp*4]
and eax, 0x7fffffc
push eax
call fcn.00413a58
add esp, 4
mov edi, eax
mov dword [esp + 0x14], esi
test esi, esi
mov dword [esp + 0x20], eax
je 0x416053
mov eax, dword [esp + 0x14]
mov dword [esp + 0x10], eax
mov ebx, dword [esp + 8]
push ebx
mov edi, dword [esp + 4]
push edi
call fcn.004147bf
add esp, 8
mov esi, eax
mov eax, dword [ebx + 4]
mov eax, dword [eax]
xor esi, eax
and eax, 1
mov edx, edi
mov ecx, dword [edi + 4]
mov edi, dword [ecx]
and edi, eax
and esi, edi
xor esi, eax
push esi
push edx
push ebx
call fcn.00413c02
add esp, 0xc
mov eax, edi
neg eax
mov ebp, eax
and ebp, 1
mov edx, dword [ebx]
mov ecx, dword [ebx + 4]
push ebp
push eax
push eax
push dword [esp + 0xc]
push ebx
call fcn.00414731
add esp, 0x14
push 1
push ebx
push ebx
call fcn.00414322
add esp, 0xc
mov ebp, dword [esp + 0x18]
lea eax, [ebp - 1]
push edi
mov edi, dword [esp + 0x24]
push eax
push edi
call fcn.00413fbf
add esp, 0xc
push esi
push ebp
push edi
call fcn.00413fbf
add esp, 0xc
add ebp, 2
mov dword [esp + 0x18], ebp
dec dword [esp + 0x10]
jne 0x415fc5
mov eax, dword [esp + 0x44]
test eax, eax
mov esi, dword [esp]
je 0x416076
mov edx, dword [eax]
mov ecx, dword [eax + 4]
xor eax, eax
push eax
push eax
push 0xffffffffffffffff
push esi
push dword [esp + 0x18]
call fcn.00414731
add esp, 0x14
mov eax, dword [esp + 0x28]
or eax, dword [esp + 0x2c]
mov ebp, dword [esp + 0xc]
je 0x416336
xor eax, eax
mov ebx, dword [esp + 8]
cmp dword [ebx], 0
mov ecx, 0
je 0x4160a0
mov ecx, dword [ebx + 4]
mov ecx, dword [ecx]
and ecx, 1
mov edx, dword [ebp + 4]
mov dword [edx], ecx
cmp dword [esi], 0
je 0x4160b2
mov eax, dword [esi + 4]
mov eax, dword [eax]
and eax, 1
mov ecx, dword [esp + 4]
mov ecx, dword [ecx + 4]
mov dword [ecx], eax
mov eax, dword [ebx]
mov ebp, esi
mov ecx, dword [esp + 0xc]
mov esi, dword [ecx]
cmp eax, esi
cmovb esi, eax
lea edi, [esi*4]
push edi
push dword [ecx + 4]
push dword [ebx + 4]
call fcn.004785a0
add esp, 0xc
mov eax, dword [ebx]
sub eax, esi
shl eax, 2
add edi, dword [ebx + 4]
push eax
push edi
call fcn.0046d0f4
add esp, 8
mov eax, dword [ebp]
mov ecx, dword [esp + 4]
mov esi, dword [ecx]
cmp eax, esi
cmovb esi, eax
lea edi, [esi*4]
push edi
push dword [ecx + 4]
push dword [ebp + 4]
call fcn.004785a0
add esp, 0xc
mov eax, dword [ebp]
sub eax, esi
shl eax, 2
add edi, dword [ebp + 4]
push eax
push edi
call fcn.0046d0f4
add esp, 8
mov eax, dword [ebp + 4]
mov eax, dword [eax]
mov dword [esp + 0x10], eax
mov esi, dword [esp + 0x14]
test esi, esi
je 0x416256
dec esi
mov edx, dword [esp + 0x1c]
shl edx, 7
add edx, 0xfffffffe
mov eax, esi
shr eax, 4
and eax, 0x7ffffff
mov ecx, dword [esp + 0x20]
cmp dword [ecx], eax
mov dword [esp + 0x14], esi
mov dword [esp + 0x1c], edx
jbe 0x41617b
mov ecx, dword [ecx + 4]
mov eax, dword [ecx + eax*4]
mov ecx, edx
and ecx, 0x1e
mov ebx, eax
shr ebx, cl
and ebx, 1
jmp 0x416184
mov ecx, edx
and ecx, 0x1e
xor ebx, ebx
xor eax, eax
or cl, 1
shr eax, cl
mov ecx, eax
xor ebp, ebp
inc ebp
and ecx, ebp
mov dword [esp + 0x18], ecx
mov esi, dword [esp + 0xc]
mov edx, dword [esi]
mov ecx, dword [esi + 4]
mov edi, dword [ecx]
and edi, ebp
neg edi
xor eax, eax
push eax
push eax
push edi
push dword [esp + 0xc]
push esi
call fcn.00414731
add esp, 0x14
mov ebp, dword [esp + 4]
mov edx, dword [ebp]
mov ecx, dword [ebp + 4]
xor eax, eax
push eax
push eax
push edi
mov edi, dword [esp + 0x14]
push edi
push ebp
call fcn.00414731
add esp, 0x14
xor eax, eax
inc eax
push eax
push esi
push esi
call fcn.00414322
add esp, 0xc
neg ebx
mov edx, dword [ebp]
mov ecx, dword [ebp + 4]
xor eax, eax
push eax
push eax
push ebx
push esi
push ebp
call fcn.00414731
add esp, 0x14
xor eax, eax
inc eax
push eax
push edi
push edi
call fcn.00414f50
add esp, 0xc
mov edx, dword [edi]
mov ecx, dword [edi + 4]
xor eax, eax
push eax
push eax
push ebx
mov esi, edi
mov ebx, dword [esp + 0xc]
push ebx
push edi
call fcn.00414731
add esp, 0x14
mov edi, dword [esp + 0x18]
push edi
push ebx
mov ebx, esi
push esi
call fcn.00413c02
add esp, 0xc
push edi
push ebp
push dword [esp + 0x14]
call fcn.00413c02
add esp, 0xc
xor dword [esp + 0x10], edi
mov edx, dword [esp + 0x1c]
add edx, 0xfffffffe
mov esi, dword [esp + 0x14]
add esi, 0xffffffff
jb 0x41614d
mov ebp, dword [esp + 0x24]
mov edx, dword [ebp]
mov ecx, dword [ebp + 4]
xor eax, eax
inc eax
xor edi, edi
dec edi
push eax
push edi
push edi
mov esi, dword [esp + 0x18]
push esi
push dword [esp + 0x10]
call fcn.00414731
add esp, 0x14
mov ebx, dword [esp + 0x10]
push ebx
push ebp
push esi
push esi
call fcn.00413bb0
add esp, 0x10
mov edx, dword [ebp]
mov ecx, dword [ebp + 4]
xor eax, eax
inc eax
push eax
push edi
push edi
mov edi, dword [esp + 0x10]
push edi
push dword [esp + 0x18]
call fcn.00414731
add esp, 0x14
push ebx
push ebp
mov ebp, esi
push edi
push edi
call fcn.00413bb0
add esp, 0x10
mov ebx, dword [esp + 0x28]
test ebx, ebx
je 0x4162f1
mov eax, dword [ebx]
mov esi, dword [ebp]
cmp eax, esi
cmovb esi, eax
lea edi, [esi*4]
push edi
push dword [ebp + 4]
push dword [ebx + 4]
call fcn.004785a0
add esp, 0xc
mov eax, dword [ebx]
sub eax, esi
shl eax, 2
add edi, dword [ebx + 4]
push eax
push edi
call fcn.0046d0f4
add esp, 8
mov ebx, dword [esp + 0x2c]
test ebx, ebx
mov esi, dword [esp]
je 0x416336
mov eax, dword [ebx]
mov ecx, dword [esp + 4]
mov esi, dword [ecx]
cmp eax, esi
cmovb esi, eax
lea edi, [esi*4]
push edi
push dword [ecx + 4]
push dword [ebx + 4]
call fcn.004785a0
add esp, 0xc
mov eax, dword [ebx]
sub eax, esi
mov esi, dword [esp]
shl eax, 2
add edi, dword [ebx + 4]
push eax
push edi
call fcn.0046d0f4
add esp, 8
push dword [esp + 8]
call fcn.00413b26
add esp, 4
push esi
call fcn.00413b26
add esp, 4
push ebp
call fcn.00413b26
add esp, 4
push dword [esp + 4]
call fcn.00413b26
add esp, 4
push dword [esp + 0x24]
call fcn.00413b26
add esp, 4
push dword [esp + 0x20]
call fcn.00413b26
add esp, 0x34
pop esi
pop edi
pop ebx
pop ebp
ret