Function at 0x517723
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x12c
mov eax, dword [0x66f3a4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ecx + 0x5c]
push ebx
movzx ebx, byte [ecx + 0x58]
mov dword [ebp - 0x120], eax
inc ebx
mov eax, dword [ecx + 0x60]
mov dword [ebp - 0x124], eax
mov eax, dword [ecx + 4]
mov ecx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0x10]
mov eax, dword [eax + 0x38]
test eax, eax
push edi
push 0x40
mov dword [ebp - 0x11c], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x118], esi
mov dword [ebp - 0x128], ebx
pop edx
mov dword [ebp - 0x108], ecx
jne 0x5178b2
mov dword [ebp - 0x110], eax
cmp eax, edx
mov edi, eax
cmovg edi, edx
mov edx, dword [ebp - 0x120]
push edi
push esi
push dword [ebp + 0xc]
mov eax, dword [edx]
push ecx
mov ecx, edx
mov dword [ebp - 0x10c], edi
call dword [eax + 0xc]
mov ecx, dword [ebp - 0x124]
lea edx, [ebp - 0x104]
push edi
push edx
push dword [ebp + 0xc]
mov eax, dword [ecx]
push dword [ebp - 0x108]
call dword [eax + 0xc]
cmp ebx, 0x100
jne 0x517806
test edi, edi
jle 0x51787d
lea eax, [ebp - 0x104]
mov ebx, esi
sub eax, esi
mov esi, edi
mov dword [ebp - 0x114], eax
mov edi, eax
push dword [ebx]
push dword [edi + ebx]
call fcn.004e6fad
mov dword [ebx], eax
lea ebx, [ebx + 4]
pop ecx
pop ecx
sub esi, 1
jne 0x5177e8
mov ebx, dword [ebp - 0x128]
jmp 0x517871
test edi, edi
jle 0x51787d
lea eax, [ebp - 0x104]
mov dword [ebp - 0x114], edi
sub eax, esi
mov dword [ebp - 0x12c], esi
mov edi, esi
mov dword [ebp - 0x11c], eax
mov esi, eax
push dword [edi]
push dword [esi + edi]
call fcn.004e6fad
pop ecx
mov edx, eax
and edx, 0xff00ff
pop ecx
mov ecx, eax
imul edx, ebx
shr ecx, 8
and ecx, 0xffff00ff
shr eax, 8
imul ecx, ebx
shr edx, 8
xor edx, ecx
mov ecx, 0xff00ff
and eax, ecx
and edx, ecx
imul eax, ebx
xor edx, eax
sub dword [ebp - 0x114], 1
mov dword [edi], edx
lea edi, [edi + 4]
jne 0x517828
mov edi, dword [ebp - 0x10c]
mov esi, dword [ebp - 0x118]
mov eax, dword [ebp - 0x110]
lea esi, [esi + edi*4]
mov ecx, dword [ebp - 0x108]
sub eax, edi
add ecx, edi
mov dword [ebp - 0x118], esi
mov dword [ebp - 0x108], ecx
mov dword [ebp - 0x110], eax
push 0x40
pop edx
test eax, eax
jg 0x517788
jmp 0x517987
mov dword [ebp - 0x10c], eax
cmp eax, edx
mov edi, eax
cmovg edi, edx
mov edx, dword [ebp - 0x120]
push edi
push esi
push dword [ebp + 0xc]
mov eax, dword [edx]
push ecx
mov ecx, edx
call dword [eax + 0xc]
mov ecx, dword [ebp - 0x124]
lea edx, [ebp - 0x104]
push edi
push edx
push dword [ebp + 0xc]
mov eax, dword [ecx]
push dword [ebp - 0x108]
call dword [eax + 0xc]
mov ecx, dword [ebp - 0x11c]
lea edx, [ebp - 0x104]
push 0
push edi
push edx
mov eax, dword [ecx]
push esi
call dword [eax + 0x10]
cmp ebx, 0x100
je 0x51795d
xor eax, eax
mov dword [ebp - 0x110], eax
test edi, edi
jle 0x51795d
mov ecx, dword [esi + eax*4]
mov edx, ecx
and edx, 0xff00ff
mov eax, ecx
shr eax, 8
imul edx, ebx
and eax, 0xffff00ff
imul eax, ebx
shr ecx, 8
shr edx, 8
xor edx, eax
mov eax, 0xff00ff
and ecx, eax
and edx, eax
mov eax, dword [ebp - 0x110]
imul ecx, ebx
xor edx, ecx
mov dword [esi + eax*4], edx
inc eax
mov dword [ebp - 0x110], eax
cmp eax, edi
jl 0x517918
mov eax, dword [ebp - 0x10c]
lea esi, [esi + edi*4]
mov ecx, dword [ebp - 0x108]
sub eax, edi
add ecx, edi
mov dword [ebp - 0x10c], eax
mov dword [ebp - 0x108], ecx
push 0x40
pop edx
test eax, eax
jg 0x5178b8
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00422909
mov esp, ebp
pop ebp
ret 0x10