Function at 0x403b70
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x1c
imul eax, dword [0x52b584], 6
xor edx, edx
mov ecx, dword [esp + 0x2c]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x48]
push edi
movzx eax, word [eax + ecx + 0x16]
mov ecx, 0x1ef2
div ecx
xor edx, edx
mov byte [esp + 0x13], al
mov al, byte [esp + 0x54]
or al, 0x93
mov byte [esp + 0x12], al
mov al, byte [esp + 0x5c]
movzx ecx, al
dec al
mov byte [esp + 0x5c], al
mov eax, dword [0x52b55c]
mov dword [esp + 0x18], ecx
mov ecx, 0x8c1
div ecx
mov eax, dword [0x52b518]
dec dword [esi]
mov ecx, dword [esi]
mov dword [esp + 0x1c], eax
mov eax, dword [0x52b524]
movzx edi, word [0x52b568]
mov dword [esp + 0x28], edx
mov edx, dword [0x52b55c]
mov eax, dword [eax + ecx*4 + 0x8c]
imul ecx, dword [0x52b52c], 6
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x44]
movzx ebp, word [ecx + eax]
movzx eax, word [0x52b588]
sub ebp, dword [esi + edx*8]
inc edx
mov cl, byte [esp + 0x12]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x40]
mov dword [0x52b55c], edx
mov dword [esp + 0x20], ebp
mov ebx, dword [eax + 0x674c]
mov eax, dword [0x52b53c]
xor ebx, dword [eax + 0x494c]
movzx eax, cl
mov dword [esp + 0x44], ebx
cmp edi, eax
jbe 0x403c84
movzx ebp, byte [esp + 0x5c]
mov ebx, dword [esp + 0x34]
mov eax, dword [esp + 0x1c]
dec cl
mov esi, dword [esp + 0x14]
mov eax, dword [eax + ebp*4]
cdq
idiv edi
mov eax, dword [esi]
mov esi, dword [esp + 0x4c]
mov dword [ebx + eax*8], edx
dec dword [esi]
mov eax, dword [esi]
mov al, byte [esi + eax*4]
or byte [0x52b562], al
inc edi
movzx eax, cl
cmp edi, eax
jg 0x403c44
mov edx, dword [0x52b55c]
mov ebx, dword [esp + 0x44]
mov ebp, dword [esp + 0x20]
mov byte [esp + 0x12], cl
or byte [edx + 0x14ac], bl
mov eax, 0xf1a
xor edx, edx
mov ecx, dword [0x52b540]
div dword [esi + 0x6cf8]
mov eax, dword [0x52b524]
mov esi, dword [esp + 0x18]
or edx, dword [eax + ecx*4]
mov eax, dword [esp + 0x14]
sub edx, ecx
mov ecx, dword [0x52b514]
mov dword [0x52b540], edx
movzx edx, byte [esp + 0x5c]
mov eax, dword [eax]
movzx eax, word [esi + eax*2]
imul eax, eax, 0x6b9
mov dword [0x52b598], eax
mov eax, dword [0x52b590]
add dword [ecx + edx*8], eax
mov al, 0xb9
sub al, byte [0x52b562]
movzx edx, byte [esp + 0x13]
mov ecx, dword [0x52b540]
mov byte [0x52b562], al
movzx eax, byte [edx*4 + 0x14ac]
movzx ecx, byte [ecx + 0x14ac]
sub eax, ecx
movzx ecx, word [esi + edx*2]
add eax, 0x19c8
cdq
idiv ecx
cdq
idiv dword [esp + 0x24]
mov al, byte [esp + 0x12]
dec al
mov dword [esp + 0x5c], edx
movzx edi, al
cmp edi, dword [0x52b518]
jle 0x403dc1
mov ebx, dword [esp + 0x50]
mov esi, edi
sub esi, edi
add esi, ebp
mov ebp, dword [esp + 0x30]
add ebp, 0x1e
lea ebp, [ebp + edi*2]
movzx eax, word [0x52b51c]
mov ecx, dword [esp + 0x18]
mov ax, word [ecx + eax*8 + 6]
mov ecx, dword [esp + 0x28]
xor word [ecx + edi*4], ax
mov eax, dword [esp + 0x3c]
movzx ecx, word [eax + edi*2]
mov eax, esi
cdq
idiv ecx
mov ecx, dword [esp + 0x58]
mov word [ebp], dx
xor edx, edx
mov eax, dword [0x52b55c]
lea ebp, [ebp + 2]
shl eax, 4
add ecx, eax
mov eax, dword [0x52b520]
sub eax, dword [esp + 0x5c]
div dword [0x52b574]
xor edx, edx
div dword [ecx + 0x48]
mov eax, 0x1511
inc dword [esp + 0x5c]
mov dword [ecx + 0x48], edx
cdq
idiv ebx
movzx ecx, byte [0x52b51f]
sub eax, edi
cdq
idiv ecx
xor dword [0x52b57c], eax
dec ebx
inc edi
inc esi
cmp edi, dword [0x52b518]
jg 0x403d41
mov ebx, dword [esp + 0x44]
xor ebx, dword [esp + 0x54]
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x1c
ret