Function at 0x409f6c
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 [0x9769a4]
mov eax, dword [eax + ebx*4]
xor eax, 0x72c
dec esi
mov dword [esp + 0x14], eax
movzx eax, word [0x9769a8]
mov dword [esp + 0x10], eax
mov eax, dword [0x976988]
imul ecx, esi, 0xc
mov dword [0x9769a4], esi
push edi
mov edi, dword [0x97699c]
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 [0x9769ac]
mov ebp, dword [ecx + ebx*8]
mov dword [esp + 0x24], eax
imul eax, dword [0x9769a0], 0xc
mov dword [esp + 0x20], edx
mov eax, dword [eax + ecx + 0x88]
mov ecx, dword [0x9769bc]
inc dword [0x9769d0]
mov dword [esp + 0x1c], eax
mov eax, dword [0x9769c4]
movzx eax, byte [eax + ecx]
mov dword [esp + 0x30], eax
cmp edi, esi
jbe 0x40a0b0
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 [0x9769c4]
xor edx, edx
mov dword [0x9769c4], 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 [0x9769a8]
mov edx, dword [esp + 0x34]
mov dword [esp + 0x38], esi
xor dword [edx + ecx*8], eax
inc edi
cmp edi, dword [0x9769a4]
ja 0x40a00f
jmp 0x40a0b4
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 [0x9769a0]
mov eax, dword [esp + 0x18]
dec ecx
mov dword [0x9769a0], 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 + 0x1f06]
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 [0x9769ac]
movzx ecx, byte [ebp]
imul eax, ecx, 6
movzx eax, word [eax + edx]
xor edx, edx
imul eax, dword [0x9769b4]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x10]
movzx ebp, word [eax + ecx*2]
mov eax, dword [0x9769b0]
mov ecx, dword [0x976994]
dec eax
mov dword [0x9769b0], eax
imul eax, dword [0x9769a8]
movzx ebx, ax
mov eax, dword [0x976980]
movzx edi, word [ecx + eax*2 + 0x38]
mov eax, dword [0x9769c4]
mov ecx, dword [esp + 0x34]
mov eax, dword [ecx + eax*4]
mov ecx, dword [0x976990]
div dword [ecx*4 + 0x1e66]
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.00407ce4
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 [0x97698c]
mov dword [esp + 0x40], edi
cmp edi, dword [edx + eax*4]
jge 0x40a303
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 [0x97699c], eax
dec ebx
mov eax, dword [ecx]
div ebx
mov eax, dword [0x9769b4]
mov ecx, dword [esp + 0x30]
dec eax
mov dword [0x976990], edx
mov dword [0x9769b4], 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 0x40a255
mov eax, dword [0x9769b8]
mov edx, dword [esp + 0x10]
movzx eax, word [edx + eax*4]
cmp eax, dword [0x9769b4]
jg 0x40a255
mov eax, dword [esp + 0x38]
movzx eax, word [eax]
cmp eax, dword [0x9769c0]
jl 0x40a2d9
mov eax, dword [esp + 0x40]
dec ebx
cdq
mov edi, dword [0x976980]
sub dword [esp + 0x1c], 0xc
movzx ecx, byte [ecx + ebx*2]
idiv ecx
lea ecx, [edi + 6]
imul esi, ecx, 0xc
mov ecx, dword [0x976988]
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 [0x9769b8]
mov eax, dword [0x976998]
mov edx, dword [esp + 0x10]
mov edi, dword [esp + 0x40]
imul esi, dword [0x976980], 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 + 0x1eb6], eax
imul eax, dword [0x9769a4], 0xc
dec dword [0x976980]
mov eax, dword [eax + ecx]
mov ecx, dword [esp + 0x18]
or dword [ecx], eax
jmp 0x40a2dd
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 0x40a1d4
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 [0x976990], 6
pop ebp
pop ebx
movzx ecx, word [ecx + edx]
add eax, ecx
add esp, 0x18
ret