Function at 0x4ad310
Capabilities:
Encode data using xor

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x631e0d
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x20
push esi
push edi
mov eax, dword [0x6a6040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ecx, 0x6ae1f0
call fcn.00409430
mov eax, dword [0x6ae1f4]
lea ecx, [ebp - 0x14]
xor edi, edi
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x2c], eax
mov dword [ebp - 4], edi
mov eax, dword [0x6ae208]
test al, 1
je 0x4ad37f
lea esi, [edi + 2]
jmp 0x4ad597
xor esi, esi
test al, 2
jne 0x4ad3f7
mov ecx, dword [ebx + 8]
xor eax, eax
mov edx, 3
nop
ror eax, 0x19
lea ecx, [ecx + 4]
xor eax, dword [ecx - 4]
sub edx, 1
jne 0x4ad390
div dword [0x6ae200]
mov eax, dword [0x6ae204]
mov ecx, dword [eax + edx*4]
lea esi, [eax + edx*4]
test ecx, ecx
je 0x4ad3f7
mov eax, dword [ebx + 8]
mov edx, dword [eax]
cmp dword [ecx + 4], edx
jne 0x4ad3f1
mov edi, dword [ebx + 8]
mov eax, dword [ecx + 8]
cmp eax, dword [edi + 4]
mov edi, 0
jne 0x4ad3f1
mov edi, dword [ebx + 8]
mov ax, word [ecx + 0xc]
cmp ax, word [edi + 8]
mov edi, 0
jne 0x4ad3f1
mov edi, dword [ebx + 8]
mov ax, word [ecx + 0xe]
cmp ax, word [edi + 0xa]
mov edi, 0
je 0x4ad425
mov ecx, dword [ecx]
test ecx, ecx
jne 0x4ad3b8
mov edx, dword [0x6ae1fc]
mov eax, dword [0x6ae1f8]
cmp edx, eax
jb 0x4ad540
mov esi, 2
lea ecx, [eax + eax]
cmp eax, esi
cmovb ecx, esi
cmp ecx, edx
jae 0x4ad42f
mov esi, 3
jmp 0x4ad597
mov esi, 1
jmp 0x4ad597
push dword [0x6ae208]
mov eax, dword [0x6ae1f0]
push 0x6ae1f0
push ecx
mov ecx, 0x6ae1f0
mov eax, dword [eax + 8]
call eax
mov edi, eax
test edi, edi
je 0x4ad55f
mov al, byte [edi + 0x18]
not al
test al, 1
je 0x4ad55f
mov ecx, dword [0x6ae204]
test ecx, ecx
je 0x4ad504
xor edx, edx
mov dword [ebp - 0x18], edx
cmp dword [0x6ae200], edx
jbe 0x4ad504
xor eax, eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], eax
mov esi, dword [eax + ecx]
test esi, esi
je 0x4ad4da
nop
mov eax, dword [esi]
lea ecx, [esi + 4]
dec dword [0x6ae1fc]
mov edx, 3
mov dword [ebp - 0x24], eax
xor eax, eax
ror eax, 0x19
lea ecx, [ecx + 4]
xor eax, dword [ecx - 4]
sub edx, 1
jne 0x4ad4a5
div dword [edi + 0x10]
mov eax, dword [edi + 0x14]
lea ecx, [eax + edx*4]
mov eax, dword [ecx]
mov dword [esi], eax
mov eax, dword [ebp - 0x24]
mov dword [ecx], esi
mov esi, eax
inc dword [edi + 0xc]
test eax, eax
jne 0x4ad490
mov ecx, dword [0x6ae204]
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
mov esi, dword [ebp - 0x20]
inc edx
add eax, 4
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x1c], eax
mov dword [esi + ecx], 0
add esi, 4
mov dword [ebp - 0x20], esi
cmp edx, dword [0x6ae200]
jae 0x4ad504
mov ecx, dword [0x6ae204]
jmp 0x4ad488
mov eax, dword [0x6ae1f0]
mov ecx, 0x6ae1f0
push edi
call dword [eax + 4]
mov eax, dword [edi]
mov ecx, edi
push 1
call dword [eax + 0xc]
mov ecx, dword [ebx + 8]
xor eax, eax
mov edx, 3
ror eax, 0x19
xor eax, dword [ecx]
add ecx, 4
sub edx, 1
jne 0x4ad525
div dword [0x6ae200]
mov eax, dword [0x6ae204]
lea esi, [eax + edx*4]
push ecx
mov ecx, dword [0x6ae1f4]
push 0x6ae1f4
call fcn.004b32e0
mov edi, eax
mov dword [ebp - 0x14], edi
test edi, edi
jne 0x4ad564
lea esi, [eax + 2]
jmp 0x4ad597
mov edi, dword [ebp - 0x14]
jmp 0x4ad597
mov eax, dword [ebx + 8]
movq xmm0, qword [eax]
movq qword [edi + 4], xmm0
mov eax, dword [eax + 8]
mov dword [edi + 0xc], eax
mov eax, dword [ebx + 0xc]
mov eax, dword [eax]
mov dword [edi + 0x10], eax
xor edi, edi
mov eax, dword [ebp - 0x14]
mov ecx, dword [esi]
mov dword [eax], ecx
mov eax, dword [ebp - 0x14]
mov dword [esi], eax
inc dword [0x6ae1fc]
xor esi, esi
mov dword [ebp - 0x14], edi
test edi, edi
je 0x4ad5a9
push ecx
mov ecx, dword [ebp - 0x28]
lea eax, [ebp - 0x2c]
push eax
push edi
call fcn.004b31d0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0xc