Function at 0x409f61
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x18
mov eax, dword [esp + 0x30]
xor edx, edx
push ebx
mov ebx, dword [esp + 0x2c]
push ebp
push esi
mov esi, dword [0x972ed4]
mov eax, dword [eax + ebx*4]
xor eax, 0x72c
dec esi
mov dword [esp + 0x14], eax
movzx eax, word [0x972ed8]
mov dword [esp + 0x10], eax
mov eax, dword [0x972eb8]
imul ecx, esi, 0xc
mov dword [0x972ed4], esi
push edi
mov edi, dword [0x972ecc]
mov eax, dword [ecx + eax]
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x10], eax
mov eax, dword [ecx + esi*4]
div ebx
movzx eax, word [0x972edc]
mov ebp, dword [ecx + ebx*8]
mov dword [esp + 0x24], eax
imul eax, dword [0x972ed0], 0xc
mov dword [esp + 0x20], edx
mov eax, dword [eax + ecx + 0x88]
mov ecx, dword [0x972eec]
inc dword [0x972f00]
mov dword [esp + 0x1c], eax
mov eax, dword [0x972ef4]
movzx eax, byte [eax + ecx]
mov dword [esp + 0x30], eax
cmp edi, esi
jbe 0x40a0a5
lea eax, [edi*4 + 0x10f0]
mov dword [esp + 0x38], eax
movzx eax, byte [ebp]
mov ecx, dword [esp + 0x14]
movzx ecx, word [ecx + eax*2]
mov eax, edi
imul eax, edi
cdq
idiv ecx
mov ecx, dword [esp + 0x1c]
xor edx, edx
xor byte [edi + ecx], al
dec ebx
movzx eax, byte [ebp]
movzx ecx, word [eax + eax + 0x10b8]
mov eax, ebx
div ecx
xor edx, edx
add eax, edi
div dword [0x972ef4]
xor edx, edx
mov dword [0x972ef4], eax
movzx esi, byte [ebp]
mov eax, dword [esp + 0x20]
movzx ecx, byte [eax + esi*4]
mov eax, dword [esp + 0x30]
movzx eax, byte [eax + 0xcc7]
div ecx
mov edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x14]
and al, 0xbf
xor byte [esi + ebp], al
mov esi, dword [esp + 0x38]
or dword [edx + edi*8], edi
movzx eax, byte [ebp]
mov ax, word [ecx + eax*2]
mov word [esi], ax
add esi, 4
mov eax, dword [edx + 0x3e18]
movzx ecx, word [0x972ed8]
mov edx, dword [esp + 0x34]
mov dword [esp + 0x38], esi
xor dword [edx + ecx*8], eax
inc edi
cmp edi, dword [0x972ed4]
ja 0x40a004
jmp 0x40a0a9
mov edx, dword [esp + 0x34]
movzx eax, byte [ebp + 0xe5a]
mov ecx, dword [esp + 0x40]
or dword [ecx + ebx*4], eax
inc ebx
mov ecx, dword [0x972ed0]
mov eax, dword [esp + 0x18]
dec ecx
mov dword [0x972ed0], ecx
movzx esi, byte [ebp]
mov dword [esp + 0x38], ebx
movzx eax, word [eax + esi*8]
lea edi, [edx + esi*4]
sub eax, ecx
xor edx, edx
div dword [ebx*4 + 0x17b8]
movzx eax, word [esi + esi + 0x10b8]
add eax, edx
xor edx, edx
div dword [edi]
mov edx, dword [esp + 0x14]
inc ebp
mov dword [edi], eax
mov dword [esp + 0x18], ebp
movzx esi, word [0x972edc]
movzx ecx, byte [ebp]
imul eax, ecx, 6
movzx eax, word [eax + edx]
xor edx, edx
imul eax, dword [0x972ee4]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x10]
movzx ebp, word [eax + ecx*2]
mov eax, dword [0x972ee0]
mov ecx, dword [0x972ec4]
dec eax
mov dword [0x972ee0], eax
imul eax, dword [0x972ed8]
movzx ebx, ax
mov eax, dword [0x972eb0]
movzx edi, word [ecx + eax*2 + 0x38]
mov eax, dword [0x972ef4]
mov ecx, dword [esp + 0x34]
mov eax, dword [ecx + eax*4]
mov ecx, dword [0x972ec0]
div dword [ecx*4 + 0x1718]
mov byte [esp + 0x40], al
push dword [esp + 0x40]
imul eax, dword [esp + 0x3c], 0x189f
push esi
push eax
push edi
push ebx
push ebp
push dword [esp + 0x34]
call fcn.00407cbc
mov ebp, dword [esp + 0x34]
add esp, 0x1c
mov edx, dword [esp + 0x3c]
movzx ecx, byte [ebp]
mov dword [edx + ecx*8], eax
movzx eax, byte [ebp]
mov edi, dword [0x972ebc]
mov dword [esp + 0x40], edi
cmp edi, dword [edx + eax*4]
jge 0x40a2f8
mov ebx, dword [esp + 0x38]
lea eax, [edi + 4]
lea eax, [edx + eax*4]
imul ecx, ebx, 0xc
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x24]
add ecx, edx
lea eax, [eax + edi*4]
add eax, 8
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x30]
sub ecx, 0xc
xor edx, edx
mov dword [esp + 0x1c], ecx
movzx eax, byte [eax + 0x18a5]
add dword [0x972ecc], eax
dec ebx
mov eax, dword [ecx]
div ebx
mov eax, dword [0x972ee4]
mov ecx, dword [esp + 0x30]
dec eax
mov dword [0x972ec0], edx
mov dword [0x972ee4], eax
movzx esi, byte [ebp]
cdq
movzx ecx, byte [esi + ecx]
idiv ecx
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x20]
mov byte [esi + ecx], al
movzx eax, byte [ebp]
imul eax, eax, 3
movzx eax, byte [eax + edx]
cmp eax, edi
jge 0x40a24a
mov eax, dword [0x972ee8]
mov edx, dword [esp + 0x10]
movzx eax, word [edx + eax*4]
cmp eax, dword [0x972ee4]
jg 0x40a24a
mov eax, dword [esp + 0x38]
movzx eax, word [eax]
cmp eax, dword [0x972ef0]
jl 0x40a2ce
mov eax, dword [esp + 0x40]
dec ebx
cdq
mov edi, dword [0x972eb0]
sub dword [esp + 0x1c], 0xc
movzx ecx, byte [ecx + ebx*2]
idiv ecx
lea ecx, [edi + 6]
imul esi, ecx, 0xc
mov ecx, dword [0x972eb8]
cdq
idiv dword [esi + ecx]
mov esi, dword [esp + 0x30]
mov eax, edx
cdq
movzx ecx, byte [edi + esi]
idiv ecx
mov byte [edi + esi], dl
mov ecx, dword [0x972ee8]
mov eax, dword [0x972ec8]
mov edx, dword [esp + 0x10]
mov edi, dword [esp + 0x40]
imul esi, dword [0x972eb0], 0xc
mov eax, dword [eax + ecx*4 + 0x20]
movzx ecx, byte [ebp]
sub eax, edi
movzx ecx, word [edx + ecx*2]
cdq
idiv ecx
mov ecx, dword [esp + 0x34]
add dword [esi + 0x1768], eax
imul eax, dword [0x972ed4], 0xc
dec dword [0x972eb0]
mov eax, dword [eax + ecx]
mov ecx, dword [esp + 0x18]
or dword [ecx], eax
jmp 0x40a2d2
mov ecx, dword [esp + 0x18]
movzx eax, byte [ebp]
add ecx, 4
add dword [esp + 0x38], 4
inc edi
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x40], edi
cmp edi, dword [ecx + eax*4]
mov ecx, dword [esp + 0x1c]
jl 0x40a1c9
movzx eax, byte [ebp]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
pop edi
pop esi
movzx eax, word [ecx + eax*4]
imul ecx, dword [0x972ec0], 6
pop ebp
pop ebx
movzx ecx, word [ecx + edx]
add eax, ecx
add esp, 0x18
ret