Function at 0x405f63
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x20
mov eax, dword [0x529cb4]
imul eax, dword [0x529c80]
mov cx, word [0x529c6c]
push ebx
mov ebx, dword [0x529cdc]
push ebp
mov dword [esp + 0x24], eax
mov ebp, 0x1e35
movzx eax, byte [0x529c6f]
or eax, 0x1271
sub ebp, dword [0x529cb4]
mov dword [esp + 0x1c], eax
movzx eax, byte [0x529c6e]
mov dword [esp + 0x20], eax
push esi
mov esi, dword [0x529cd4]
movzx eax, cx
push edi
mov edi, dword [esp + 0x3c]
mov dword [esp + 0x20], ebp
sub ebx, dword [edi + eax*4 + 0x7c]
mov eax, 0xffff
add cx, ax
mov dword [esp + 0x1c], ebx
mov eax, dword [0x529c88]
mov ebx, 0xbac
mov dword [esp + 0x18], eax
mov eax, esi
cdq
idiv ebx
mov ebx, dword [esp + 0x48]
dec esi
mov dword [esp + 0x14], eax
xor edx, edx
mov word [0x529c6c], cx
movzx eax, cx
imul ecx, eax, 0xc
mov eax, dword [0x529c94]
mov dword [0x529cd4], esi
div dword [ecx + ebx]
mov ebx, dword [esp + 0x14]
mov byte [esp + 0x3c], al
mov eax, dword [esp + 0x40]
movzx ecx, byte [esi + eax]
movzx eax, byte [esp + 0x5c]
add ecx, eax
mov dword [esp + 0x10], ecx
mov ecx, 0x137f
mov eax, dword [ecx]
mov esi, dword [edi + eax*4]
mov edi, dword [esp + 0x18]
cmp esi, dword [edi + eax*4]
je 0x40606d
mov ecx, 0x299d
mov ebp, 0x137f
mov eax, esi
xor eax, 0x43
cdq
idiv esi
or eax, 0x89e
inc esi
mov dword [0x529ce0], eax
mov eax, dword [ebp]
movzx ecx, byte [ecx]
mov dword [ebx + eax*4 + 4], ecx
mov ecx, 0x299d
mov eax, dword [ebp]
cmp esi, dword [edi + eax*4]
jne 0x40603f
mov ebp, dword [esp + 0x20]
mov ecx, dword [ebp]
mov esi, dword [esp + 0x4c]
mov eax, dword [0x529c78]
mov edi, dword [esp + 0x54]
cmp eax, dword [esi + ecx*4 + 0x44]
jae 0x4060e8
movzx eax, byte [ecx + 0x159e]
xor edx, edx
mov esi, dword [edi]
mov ecx, dword [0x529ca0]
div dword [ecx + esi*4]
mov ecx, dword [0x529c70]
xor edx, edx
sub eax, dword [0x529cb4]
add eax, dword [0x529ce0]
and word [0x529cd8], ax
movzx eax, byte [esp + 0x3c]
sub eax, dword [ebx + ecx*4]
mov dword [ebx + ecx*4], eax
mov ecx, dword [esp + 0x40]
movzx eax, word [0x529cb8]
mov esi, dword [edi]
movzx eax, byte [eax + ecx]
mov ecx, 0x95e
div ecx
mov ecx, dword [0x529c98]
mov eax, edx
xor edx, edx
div dword [ecx + esi*4]
or dword [0x529cdc], edx
mov esi, dword [esp + 0x48]
mov eax, 0x137f
inc dword [eax]
mov edx, dword [eax]
imul ecx, dword [edi], 3
mov eax, dword [0x529c84]
movzx ecx, byte [ecx + eax]
movzx eax, word [0x529cb8]
imul eax, eax, 0xc
xor ecx, dword [eax + esi]
imul ecx, dword [ebp + edx*4 + 8]
mov dword [ebp + edx*4 + 8], ecx
mov ecx, 0x137f
mov al, byte [0x529ce8]
mov ecx, dword [ecx]
or byte [ecx + 0x15b5], al
mov eax, dword [0x529cbc]
mov ecx, dword [0x529c9c]
dec dword [edi]
push eax
push 0x1733
push ecx
call fcn.00413dbc
mov ecx, dword [edi]
add esp, 0xc
inc ecx
mov esi, dword [esp + 0x4c]
imul edx, ecx, 0xc
mov ecx, dword [esp + 0x44]
mov dword [edx + ecx], eax
mov eax, dword [0x529c94]
dec eax
mov dword [0x529c94], eax
mov edx, dword [edi]
mov ecx, dword [ebx + edx*4]
mov ebx, dword [0x529cbc]
add ecx, eax
mov eax, dword [0x529cc0]
or ecx, dword [0x529c80]
sub ecx, dword [eax + edx*4]
or dword [0x529c60], ecx
cmp ebx, dword [esp + 0x10]
jae 0x406346
mov ecx, dword [esp + 0x34]
lea eax, [ecx + ebx*4]
mov dword [esp + 0x4c], eax
mov eax, ebx
shl eax, 4
add eax, dword [esp + 0x24]
mov dword [esp + 0x3c], eax
imul eax, ebx, 0xc
add eax, dword [esp + 0x50]
mov dword [esp + 0x5c], eax
lea eax, [ebx + 3]
lea eax, [esi + eax*4]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x14]
lea eax, [eax + ebx*4]
add eax, 0x14
mov dword [esp + 0x40], eax
mov eax, ebp
sub eax, ecx
mov dword [esp + 0x54], eax
mov ecx, dword [0x529cdc]
xor edx, edx
mov eax, 0x137f
mov esi, dword [eax]
mov eax, 0x1b7f
div ecx
mov eax, dword [esp + 0x28]
add esi, 9
add esi, esi
sub edx, dword [eax + esi*8]
mov eax, dword [esp + 0x34]
mov esi, dword [esp + 0x1c]
or edx, dword [eax + 0x2f04]
add dword [0x529cc4], edx
inc ecx
mov eax, dword [esp + 0x40]
mov dword [0x529cdc], ecx
inc dword [edi - 4]
mov edx, dword [edi - 4]
mov eax, dword [eax]
mov ecx, dword [0x529c98]
add dword [ecx + edx*4 + 0xc], eax
movzx eax, byte [0x529c90]
mov ecx, dword [ebp]
push eax
movzx eax, word [0x529cb8]
add ecx, ecx
cdq
idiv dword [esi + ecx*8 + 0x8c]
mov ecx, dword [esp + 0x50]
push eax
movzx eax, byte [ebx + 0xf8]
push eax
mov eax, dword [esp + 0x60]
mov esi, dword [esp + 0x48]
push dword [ecx + eax]
mov eax, dword [esp + 0x6c]
mov ecx, dword [esp + 0x68]
push 0xcd
mov eax, dword [eax]
xor eax, dword [ecx + 0x26fc]
imul ecx, dword [edi - 4], 0xc
push eax
mov eax, dword [esp + 0x30]
push dword [eax + 0x3b20]
movzx eax, word [0x529cb0]
push eax
mov eax, dword [0x529c64]
mov eax, dword [eax + 0x5590]
or eax, dword [esi]
push eax
mov eax, dword [0x529c74]
push dword [ecx + eax]
push ebx
push dword [esp + 0x3c]
call fcn.00413945
mov ecx, dword [0x529c9c]
add esp, 0x30
mov eax, dword [0x529c84]
mov dword [esp + 0x3c], 0x1ab3
movzx ecx, byte [ecx + eax + 7]
movzx eax, byte [0x529c6e]
or eax, ecx
mov ecx, dword [esp + 0x48]
cdq
idiv dword [ecx]
mov dword [ecx], eax
mov eax, dword [esp + 0x2c]
inc dword [0x529c9c]
movzx ecx, byte [0x529c6f]
mov eax, dword [eax + 0x7f8]
cdq
idiv dword [esp + 0x3c]
mov eax, dword [esp + 0x34]
xor edx, ecx
add edx, dword [eax + 0x1508]
mov eax, edx
xor edx, edx
div ecx
mov eax, dword [0x529cac]
mov byte [0x529c6f], dl
xor edx, edx
mov ecx, dword [esp + 0x4c]
div ebx
add dword [esp + 0x5c], 0xc
add esi, 0x10
mov eax, edx
add dword [esp + 0x40], 4
xor edx, edx
add dword [esp + 0x48], 4
div ebx
mov dword [esp + 0x3c], esi
mov eax, edx
xor edx, edx
div dword [ecx]
inc ebx
mov dword [ecx], eax
add ecx, 4
mov dword [esp + 0x4c], ecx
cmp ebx, dword [esp + 0x10]
jb 0x4061cf
mov ecx, dword [esp + 0x1c]
mov eax, 0x137f
pop edi
pop esi
pop ebp
mov eax, dword [eax]
pop ebx
mov eax, dword [ecx + eax*4 + 0x20]
add esp, 0x20
ret