Function at 0x405619
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x30
movzx eax, byte [0x7bb5d0]
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x34]
push ebx
push ebp
movzx ebp, cx
add ecx, 0xffff
push esi
mov esi, 0x1d5a
mov dword [esp + 0x28], ebp
push edi
movzx edx, word [eax + ebp*4]
movzx eax, word [eax + 0xc7c]
mov dword [esp + 0x24], edx
xor edx, edx
div esi
mov eax, dword [0x7bb5c4]
mov bl, al
mov esi, dword [0x7bb5e8]
dec eax
mov dword [0x7bb5c4], eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x38], edx
mov edx, 0x1982
movzx edi, byte [0x7bb5d1]
push 0xfffffffffffffffc
sub edx, dword [eax + ebp*4]
or ebp, 0xc56
inc dword [0x7bb5e4]
movzx eax, cx
mov ecx, dword [0x7bb5cc]
mov dword [esp + 0x40], eax
mov dword [esp + 0x38], edx
cdq
idiv dword [esi + ecx*4 + 0x24]
mov eax, edi
mov byte [esp + 0x4c], 0xcc
mov edi, dword [esp + 0x50]
shl eax, 2
mov dword [esp + 0x18], eax
mov byte [esp + 0x17], dl
movzx edx, bl
mov ebx, dword [esp + 0x48]
imul eax, edx, 0xc
mov dword [esp + 0x1c], edx
add eax, edi
mov dword [esp + 0x24], eax
lea eax, [edx*4 + 0x10]
mov dword [esp + 0x20], eax
lea eax, [edx*2 + 4]
add eax, ebp
mov dword [esp + 0x50], eax
pop eax
sub eax, ebp
mov ebp, dword [esp + 0x2c]
mov dword [esp + 0x30], eax
mov esi, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov eax, dword [esi]
add esi, 4
mov dword [esp + 0x24], esi
movzx esi, byte [esp + 0x48]
movzx ecx, word [ecx + eax*2]
movzx eax, word [ebx + eax*2]
add ecx, edx
xor ecx, eax
mov edx, dword [esp + 0x28]
movzx eax, word [0x7bb60c]
xor ecx, eax
mov ebx, dword [esp + 0x14]
mov eax, dword [0x7bb5e0]
xor eax, ecx
add dword [esp + 0x14], 4
mov dword [0x7bb5e0], eax
lea ecx, [edi + eax*8]
movzx eax, byte [ebp]
movzx eax, word [edx + eax*2 + 0xe]
xor edx, edx
neg eax
div dword [ecx]
mov dword [ecx], edx
xor edx, edx
inc dword [0x7bb5e0]
mov al, byte [edi + esi*4]
xor byte [0x7bb5d0], al
mov eax, dword [0x7bb5dc]
mov ecx, dword [esp + 0x1c]
xor dword [ecx + eax], 0x115f
movzx eax, byte [0x7bb5d1]
mov ecx, dword [esp + 0x18]
mov eax, dword [edi + eax*4]
and eax, dword [0x7bb608]
movzx ecx, byte [ecx + 0xc97]
sub eax, ecx
mov ecx, dword [0x7bb5d4]
div dword [ebx + ecx]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x4c]
add ecx, dword [esp + 0x30]
add dword [esp + 0x20], 0xc
sub edx, dword [eax]
mov dword [eax], edx
xor edx, edx
dec byte [0x7bb5d1]
mov eax, dword [0x7bb5f8]
mov ebx, dword [esp + 0x44]
movzx ecx, word [ecx + eax]
mov eax, dword [esp + 0x34]
mov eax, dword [eax + 0x6148]
and eax, 0x1b14
div ecx
mov ecx, dword [esp + 0x4c]
xor eax, dword [0x7bb5d8]
add dword [esp + 0x4c], 2
add word [ecx], ax
mov eax, dword [0x7bb5f8]
movzx ecx, byte [esp + 0x13]
movzx eax, word [eax + 0x2514]
and eax, ecx
mov ecx, dword [esp + 0x38]
cdq
idiv dword [ecx + esi*4]
mov edx, dword [esp + 0x18]
imul eax, dword [0x7bb5c4]
inc byte [esp + 0x48]
dec byte [esp + 0x13]
inc edx
mov dword [esp + 0x18], edx
mov dword [0x7bb5c4], eax
mov eax, dword [esp + 0x1c]
add eax, 4
mov dword [esp + 0x1c], eax
cmp eax, 0x1334
jne 0x4056f3
mov esi, dword [esp + 0x3c]
xor edx, edx
mov ecx, 0x1a6e
mov eax, dword [edi + esi*8 + 8]
div dword [0x7bb5d8]
mov dword [0x7bb5d8], edx
xor cx, word [edi + esi*4 + 0x20]
movzx eax, byte [ebp]
inc eax
movzx ecx, cx
imul edx, eax, 6
movzx eax, byte [0x7bb5c2]
imul ecx, eax
mov eax, 0x17f3
pop edi
xor cx, ax
add word [edx + ebx], cx
xor edx, edx
mov al, byte [0x7bb5d2]
inc al
movzx esi, al
mov byte [0x7bb5d2], al
movzx eax, byte [0x7bb5c2]
movzx ecx, word [ebx + esi*4]
div ecx
mov word [ebx + esi*4], ax
imul eax, dword [0x7bb5fc], 0x15a4
pop esi
pop ebp
pop ebx
add esp, 0x30
ret