Function at 0x413dc8
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x1c
mov ecx, dword [0x52b510]
mov edx, dword [0x52b55c]
inc ecx
mov eax, dword [0x52b534]
mov dword [0x52b510], ecx
push ebx
mov ebx, dword [esp + 0x2c]
movzx eax, byte [edx + eax]
xor edx, edx
sub ecx, eax
push ebp
mov al, byte [ebx + 0xf52]
mov byte [esp + 0x30], al
mov eax, dword [0x52b594]
push esi
movzx esi, byte [ebx]
push edi
mov edi, dword [0x52b540]
mov dword [esp + 0x10], ecx
mov ecx, dword [0x52b554]
movzx eax, word [eax + edi*2]
mov dword [esp + 0x28], eax
movzx eax, byte [ebx + 0x65a]
xor eax, 0xe99
mov dword [esp + 0x14], eax
mov eax, 0xda6
div dword [ecx + esi*4]
movzx ecx, byte [ebx + 0x1ce6]
xor edx, edx
mov dword [esp + 0x18], eax
movzx eax, byte [ebx + 0xbbc]
div ecx
mov esi, dword [0x52b530]
mov eax, 0x18b4
mov dword [esp + 0x24], edx
xor edx, edx
div esi
mov edx, dword [esp + 0x34]
mov dword [esp + 0x20], eax
lea ebp, [eax - 1]
cmp edi, dword [edx + ebp*4 + 8]
mov edi, dword [esp + 0x10]
jl 0x413ec7
mov eax, dword [esp + 0x30]
mov ecx, 0x1c3b
mov esi, dword [0x52b584]
or cx, word [eax + 0x2c80]
mov word [0x52b568], cx
mov ecx, dword [edx + esi*8 + 0x1c]
xor edx, edx
or ecx, dword [eax + ebp*8]
mov eax, dword [0x52b594]
movzx eax, word [eax + ebp*8 + 0xc]
sub ecx, eax
xor dword [0x52b528], ecx
movzx eax, byte [edi + ebp]
div dword [0x52b56c]
xor al, byte [ebx + ebp]
mov ebp, dword [esp + 0x20]
xor al, 0x39
mov byte [edi + esi*4], al
mov esi, dword [0x52b530]
mov eax, dword [0x52b57c]
xor edx, edx
mov dword [0x52b56c], eax
dec ebp
mov eax, dword [0x52b55c]
movzx ecx, byte [eax + edi]
mov eax, dword [0x52b54c]
imul eax, ebp
div ecx
movzx ecx, byte [esp + 0x38]
mov eax, edx
imul ecx, ecx, 0x199f
xor edx, edx
movzx ecx, cx
div ecx
mov ecx, dword [0x52b584]
movzx eax, dx
mov edx, ebp
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x34]
shl edx, 2
mov dword [esp + 0x38], edx
mov eax, dword [edx + eax]
xor edx, edx
div esi
movzx eax, byte [ebx]
mov esi, dword [esp + 0x30]
add eax, eax
add dl, byte [esi + eax*8]
mov eax, dword [0x52b55c]
add dl, byte [esi + eax*4]
mov eax, ebp
sub dl, byte [ecx + ebx + 4]
xor eax, 0x17f
mov byte [ecx + ebx + 4], dl
movzx ecx, byte [ebx + ebp]
cdq
idiv ecx
mov ecx, dword [esp + 0x24]
mov edx, 0x97
mov byte [ebx + ebp], al
movzx eax, word [0x52b51c]
mov dword [esp + 0x34], edx
cmp dword [ecx + eax*4 + 0x2c], edx
jle 0x414081
lea eax, [edi + ebp]
mov dword [esp + 0x20], 0x1c5
mov ebp, dword [esp + 0x14]
add dword [esp + 0x38], 4
inc eax
mov edi, dword [esp + 0x38]
mov dword [esp + 0x14], eax
mov eax, dword [0x52b53c]
mov ecx, dword [0x52b54c]
mov al, byte [edi + eax]
or al, byte [0x52b590]
sub al, byte [edi + esi]
mov edi, dword [esp + 0x18]
add byte [ecx + edi], al
imul eax, dword [0x52b584], 0xc
movzx ecx, byte [0x52b51f]
and ecx, edx
mov edi, dword [esp + 0x1c]
add esi, eax
mov eax, dword [0x52b55c]
movzx eax, byte [ebx + eax*2 + 3]
xor eax, ecx
mov ecx, dword [esp + 0x34]
cdq
idiv dword [esi]
mov dword [esi], edx
xor edx, edx
inc byte [0x52b51f]
movzx eax, byte [ebx + 0xf00]
movzx ecx, byte [ebp + ecx*2]
add eax, 0x1310
movzx esi, di
imul eax, esi
div ecx
mov eax, dword [esp + 0x14]
add byte [eax], dl
movzx eax, word [0x52b51c]
movzx ecx, byte [eax + ebp + 3]
mov eax, dword [esp + 0x34]
sub eax, ecx
mov ecx, dword [esp + 0x18]
cdq
idiv dword [0x52b510]
mov eax, dword [0x52b540]
mov dword [0x52b590], edx
movzx ecx, byte [eax + ecx]
mov eax, dword [esp + 0x14]
movzx eax, byte [eax]
sub eax, ecx
add eax, esi
mov esi, dword [esp + 0x20]
cdq
movzx ecx, byte [esi + ebx + 4]
idiv ecx
inc edi
mov byte [esi + ebx + 4], dl
add esi, 3
dec byte [ebx]
mov edx, dword [esp + 0x34]
movzx eax, byte [ebx]
mov dword [esp + 0x1c], edi
mov edi, dword [esp + 0x10]
mov dword [esp + 0x20], esi
mov esi, dword [esp + 0x30]
mov cl, byte [edi + edx + 3]
and cl, byte [esp + 0x28]
inc edx
mov byte [eax + edi], cl
movzx eax, word [0x52b51c]
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x34], edx
cmp edx, dword [ecx + eax*4 + 0x2c]
mov eax, dword [esp + 0x14]
jl 0x413f76
movzx eax, byte [ebx]
pop edi
pop esi
pop ebp
movzx eax, byte [eax + ebx]
add eax, dword [0x52b574]
pop ebx
add esp, 0x1c
ret