Function at 0x52d700
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 0x63bd1d
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x28
push esi
push edi
mov eax, dword [0x6a6040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
call fcn.00409430
mov eax, dword [esi + 4]
lea ecx, [ebp - 0x14]
xor edi, edi
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 4], edi
mov eax, dword [esi + 0x18]
test al, 1
jne 0x52d929
mov dword [ebp - 0x18], edi
test al, 2
jne 0x52d7a5
mov eax, dword [ebx + 8]
xor edx, edx
mov ecx, dword [eax + 4]
mov eax, dword [eax]
mov dword [ebp - 0x24], eax
xor eax, ecx
div dword [esi + 0x10]
mov eax, dword [esi + 0x14]
lea edx, [eax + edx*4]
mov dword [ebp - 0x28], ecx
mov ecx, dword [edx]
mov dword [ebp - 0x18], edx
test ecx, ecx
je 0x52d7a5
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x24]
cmp dword [ecx + 4], edx
jne 0x52d79f
cmp dword [ecx + 8], eax
je 0x52d7d2
mov ecx, dword [ecx]
test ecx, ecx
jne 0x52d795
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 8]
cmp edx, eax
jb 0x52d8d6
cmp eax, 2
mov dword [ebp - 0x28], 2
lea ecx, [eax + eax]
cmovb ecx, dword [ebp - 0x28]
cmp ecx, edx
jae 0x52d7ee
mov esi, 3
jmp 0x52d92e
mov eax, dword [ebx + 0xc]
xor esi, esi
movups xmm0, xmmword [eax]
movups xmmword [ecx + 0xc], xmm0
movups xmm0, xmmword [eax + 0x10]
movups xmmword [ecx + 0x1c], xmm0
mov edi, dword [ebp - 0x14]
jmp 0x52d92e
push dword [esi + 0x18]
mov eax, dword [esi]
push esi
push ecx
mov ecx, esi
mov eax, dword [eax + 8]
call eax
mov edx, eax
mov dword [ebp - 0x18], edx
test edx, edx
je 0x52d926
mov cl, byte [edx + 0x18]
not cl
test cl, 1
je 0x52d926
cmp dword [esi + 0x14], 0
je 0x52d8ae
cmp dword [esi + 0x10], 0
mov dword [ebp - 0x20], 0
jbe 0x52d8ae
xor ecx, ecx
xor edi, edi
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x28], edi
nop dword [eax]
mov eax, dword [esi + 0x14]
mov ecx, dword [ecx + eax]
mov dword [ebp - 0x1c], ecx
test ecx, ecx
je 0x52d889
lea eax, [edx + 0x10]
mov dword [ebp - 0x2c], eax
mov edi, dword [ecx]
xor edx, edx
dec dword [esi + 0xc]
mov eax, dword [ecx + 8]
xor eax, dword [ecx + 4]
mov ecx, dword [ebp - 0x2c]
div dword [ecx]
mov ecx, dword [ebp - 0x18]
mov eax, dword [ecx + 0x14]
lea ecx, [eax + edx*4]
mov edx, dword [ebp - 0x1c]
mov eax, dword [ecx]
mov dword [ebp - 0x1c], edi
mov dword [edx], eax
mov dword [ecx], edx
mov ecx, edi
mov edx, dword [ebp - 0x18]
inc dword [edx + 0xc]
test edi, edi
jne 0x52d853
mov edi, dword [ebp - 0x28]
mov eax, dword [esi + 0x14]
mov ecx, dword [ebp - 0x24]
add ecx, 4
mov dword [ebp - 0x24], ecx
mov dword [edi + eax], 0
add edi, 4
mov eax, dword [ebp - 0x20]
inc eax
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x20], eax
cmp eax, dword [esi + 0x10]
jb 0x52d840
mov eax, dword [esi]
mov ecx, esi
push edx
call dword [eax + 4]
mov ecx, dword [ebp - 0x18]
push 1
mov eax, dword [ecx]
call dword [eax + 0xc]
mov ecx, dword [ebx + 8]
xor edx, edx
mov eax, dword [ecx + 4]
xor eax, dword [ecx]
div dword [esi + 0x10]
mov eax, dword [esi + 0x14]
lea eax, [eax + edx*4]
mov dword [ebp - 0x18], eax
push ecx
lea ecx, [esi + 4]
push ecx
mov ecx, dword [ecx]
call fcn.00530af0
mov edi, eax
mov dword [ebp - 0x14], edi
test edi, edi
je 0x52d929
mov ecx, dword [ebx + 8]
mov edx, dword [ebp - 0x18]
mov eax, dword [ecx]
mov dword [edi + 4], eax
mov eax, dword [ecx + 4]
mov dword [edi + 8], eax
mov eax, dword [ebx + 0xc]
movups xmm0, xmmword [eax]
movups xmmword [edi + 0xc], xmm0
movups xmm0, xmmword [eax + 0x10]
movups xmmword [edi + 0x1c], xmm0
mov eax, dword [ebp - 0x14]
xor edi, edi
mov ecx, dword [edx]
mov dword [eax], ecx
mov eax, dword [ebp - 0x14]
mov dword [edx], eax
inc dword [esi + 0xc]
xor esi, esi
mov dword [ebp - 0x14], edi
jmp 0x52d92e
mov edi, dword [ebp - 0x14]
mov esi, 2
test edi, edi
je 0x52d940
push ecx
mov ecx, dword [ebp - 0x30]
lea eax, [ebp - 0x34]
push eax
push edi
call fcn.0052d310
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