Function at 0x401142
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x2c
mov ecx, dword [esp + 0x50]
mov edx, dword [0x4a4e50]
mov al, byte [0x4a4df9]
push ebx
push ebp
push esi
mov esi, dword [0x4a4e54]
dec esi
mov ebp, dword [esp + 0x40]
mov dword [0x4a4e54], esi
mov bl, byte [ecx + edx*4]
or bl, 0x86
inc al
mov byte [0x4a4df9], al
movzx eax, al
push edi
mov edi, dword [esp + 0x54]
mov byte [esp + 0x13], bl
movzx eax, word [ecx + eax*2]
mov dword [esp + 0x38], eax
movzx eax, byte [0x4a4dfa]
movzx eax, word [ecx + eax*2 + 2]
mov cx, word [0x4a4e04]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x48]
mov eax, dword [eax + edx*8]
mov dword [esp + 0x18], eax
movzx eax, cx
inc cx
mov eax, dword [edi + eax*8]
mov dword [esp + 0x20], eax
mov word [0x4a4e04], cx
movzx eax, word [ebp]
mov ecx, dword [esp + 0x64]
mov ebp, dword [esp + 0x5c]
mov eax, dword [ecx + eax*4]
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0x28], eax
mov eax, 0x25d
sub eax, dword [ecx + 0xec8]
dec edx
mov ecx, dword [0x4a4e5c]
mov edi, ecx
mov dword [esp + 0x34], eax
mov eax, dword [0x4a4e20]
mov dword [esp + 0x24], eax
imul eax, edx, 0xc
mov dword [0x4a4e50], edx
sub edi, dword [eax + ebp]
mov ebp, dword [esp + 0x44]
mov dword [esp + 0x14], edi
mov edi, dword [esp + 0x64]
movzx eax, word [ebp]
sub ebp, 2
mov dword [esp + 0x44], ebp
mov al, byte [edi + eax*8 + 0x18]
lea edi, [ecx + 0x49]
or al, 0x2c
cmp edi, dword [0x4a4e18]
jbe 0x401318
movzx eax, al
lea ecx, [edi + 5]
lea ecx, [esi + ecx*2]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x18]
mov esi, dword [esp + 0x20]
movzx ecx, word [esi + ecx*2 + 0xa]
mov esi, 0x1318
or ecx, eax
movzx eax, word [0x4a4e34]
movzx eax, word [ebp + eax*2]
xor ecx, eax
add edx, ecx
mov ecx, dword [esp + 0x50]
mov dword [0x4a4e50], edx
xor edx, edx
movzx eax, word [ebp]
lea ecx, [ecx + eax*4]
mov eax, dword [esp + 0x2c]
sub eax, edi
add eax, 0x116d
div dword [ecx]
xor edx, edx
mov dword [ecx], eax
mov eax, dword [esp + 0x50]
movzx ecx, word [0x4a4e04]
add ecx, ecx
mov eax, dword [eax]
div esi
mov eax, dword [esp + 0x50]
mov esi, dword [esp + 0x58]
xor dx, word [eax + ecx*8]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x5c]
add dword [esp + 0x1c], 2
xor word [eax], dx
xor edx, edx
mov eax, dword [esp + 0x14]
mov dword [ecx + edi*4], eax
mov eax, dword [0x4a4df0]
lea ecx, [eax + edi*8]
mov eax, dword [esi + 0x5eb0]
div dword [ecx]
mov edx, dword [esp + 0x24]
mov dword [ecx], eax
mov eax, dword [esp + 0x30]
movzx ecx, byte [eax + 0x415]
mov eax, dword [esp + 0x14]
mov eax, dword [edx + eax*4]
xor edx, edx
div ecx
mov eax, dword [esp + 0x14]
add edx, edi
dec eax
inc edi
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], eax
cmp edi, dword [0x4a4e18]
jbe 0x401310
mov edx, dword [0x4a4e50]
jmp 0x401243
mov ecx, dword [0x4a4e5c]
jmp 0x40131c
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x58]
movzx ebx, bl
shl ebx, 2
mov dword [esp + 0x5c], ebx
add dword [eax + edx*4], ecx
mov eax, 0xffff
add word [ebp], ax
movzx ecx, word [ebp]
mov eax, dword [0x4a4e00]
lea esi, [eax + ecx*8]
mov eax, dword [0x4a4e1c]
movzx ecx, word [0x4a4e08]
mov edx, dword [eax + 0xe58]
add edx, ecx
mov ecx, dword [esp + 0x20]
movzx eax, word [ebx + ecx]
or eax, edx
xor edx, edx
div dword [esi]
mov dword [esi], edx
mov edx, dword [esp + 0x34]
movzx ecx, word [ebx + ecx]
mov edi, dword [0x4a4e48]
mov esi, dword [0x4a4e14]
mov eax, dword [edx]
mov eax, dword [edx + eax*4]
cdq
idiv ecx
mov edx, dword [esp + 0x54]
add word [edi + esi*2], ax
mov al, byte [ebx + edx]
add al, byte [0x4a4e40]
and al, byte [0x16b7]
mov ebx, dword [esp + 0x48]
mov byte [0x16b7], al
movzx eax, byte [0x4a4dfa]
imul eax, eax, 0xc
mov ebx, dword [eax + ebx]
cmp ebx, 0xfb3
jl 0x40149b
mov edi, dword [esp + 0x28]
mov eax, ebx
mov esi, dword [esp + 0x64]
add edi, 0xc
mov ebp, dword [esp + 0x5c]
add esi, 0x1c
shl eax, 4
add esi, eax
lea edi, [edi + ebx*4]
mov eax, dword [0x4a4e24]
lea ecx, [eax + ebx*2]
mov ax, word [0x4a4e14]
sub ax, word [ecx]
mov word [ecx], ax
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
mov eax, dword [edx + eax*8]
xor dword [esi], eax
lea esi, [esi + 0x10]
mov eax, dword [esp + 0x38]
lea eax, [eax + ebx*2]
and word [eax], cx
mov al, byte [0x4a4dfa]
mov ecx, dword [0x4a4df4]
inc al
movzx edx, al
mov byte [0x4a4dfa], al
mov al, byte [edi]
lea edi, [edi + 4]
xor al, byte [edx + ecx]
xor al, bl
mov byte [edx + ecx], al
mov ecx, dword [0x4a4e5c]
mov edx, dword [esp + 0x24]
inc ecx
movzx eax, word [0x4a4e34]
mov dword [0x4a4e5c], ecx
xor eax, dword [edx + ebp]
xor edx, edx
xor eax, dword [0x4a4e10]
div dword [0x4a4e38]
mov eax, dword [esp + 0x60]
xor word [eax + ecx*2], dx
mov al, byte [esp + 0x13]
mov ecx, dword [esp + 0x18]
inc al
mov edx, dword [esp + 0x54]
movzx ebp, al
mov byte [esp + 0x13], al
mov eax, dword [0x4a4df0]
shl ebp, 2
movzx eax, byte [eax + ecx*8]
mov ecx, dword [esp + 0x28]
movzx ecx, byte [ecx + ebp]
imul ecx, eax
inc ebx
mov byte [0x4a4df8], cl
cmp ebx, 0xfb3
jge 0x4013d7
mov ebp, dword [esp + 0x44]
movzx eax, word [ebp]
xor edx, edx
mov esi, dword [esp + 0x58]
mov ecx, 0x5cb
pop edi
mov eax, dword [esi + eax*4 + 4]
div ecx
pop esi
pop ebp
mov eax, edx
pop ebx
add esp, 0x2c
ret