Function at 0x401922
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x3c
mov edx, dword [esp + 0x50]
mov eax, dword [esp + 0x48]
push ebx
push ebp
mov ebp, dword [0x84845c]
mov cl, byte [eax + edx*4]
mov eax, dword [0x848430]
mov dl, byte [0x84840a]
movzx ebx, dl
mov byte [esp + 0xb], cl
mov eax, dword [eax + 0x144]
mov ecx, dword [0x848440]
mov dword [esp + 0xc], eax
mov eax, dword [0x848478]
push esi
mov esi, dword [0x848438]
push edi
add ebx, dword [ecx + eax*4]
inc dl
mov eax, dword [0x84847c]
movzx ecx, word [0x848468]
mov byte [0x84840a], dl
mov edx, dword [esp + 0x68]
mov eax, dword [eax + ebp*4]
add eax, dword [0x848420]
mov dword [esp + 0x48], eax
mov dword [esp + 0x2c], ebx
mov ebx, dword [esp + 0x54]
mov edi, dword [esp + 0x5c]
mov eax, dword [ebx]
mov eax, dword [edx + eax*4]
xor edx, edx
div ecx
mov eax, dword [0x848400]
movzx ecx, byte [0x84843f]
mov dword [esp + 0x28], edx
xor edx, edx
mov eax, dword [eax + esi*4]
div ecx
inc esi
movzx ecx, byte [0x84840b]
mov dword [esp + 0x24], edx
mov eax, esi
xor edx, edx
mov dword [0x848438], esi
div dword [0x848420]
xor edx, edx
mov dword [esp + 0x20], eax
mov eax, dword [ebx + esi*4 + 0xc]
mov ebx, dword [esp + 0x60]
mov esi, dword [0x848404]
imul eax, ecx
inc ebp
dec ebx
mov dword [0x84845c], ebp
mov dword [esp + 0x44], ebp
mov dword [esp + 0x60], ebx
mov dword [esp + 0x30], eax
mov eax, dword [edi + ebx*4]
mov dword [esp + 0x3c], eax
mov eax, dword [0x848410]
div dword [edi + esi*4]
mov edx, dword [0x848450]
mov dword [esp + 0x18], edx
mov ebp, eax
movzx eax, word [0x848408]
mov dword [esp + 0x34], eax
cmp edx, ecx
jle 0x401b7d
sub dword [esp + 0x64], edi
mov eax, ebx
mov esi, dword [esp + 0x24]
shl eax, 4
add eax, edi
mov dword [esp + 0x38], eax
lea eax, [edi + edx*4]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x68]
sub eax, edi
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x20]
sub eax, edi
mov edi, dword [esp + 0x38]
mov dword [esp + 0x44], eax
mov eax, dword [0x84847c]
mov ebx, dword [esp + 0x3c]
mov eax, dword [eax + edx*4]
movzx ecx, byte [ebx + esi + 4]
imul eax, edx
xor edx, edx
imul eax, eax, 0x3f1
div ecx
mov edx, dword [esp + 0x18]
mov byte [ebx + esi + 4], al
mov al, byte [0x84840b]
mov ebx, dword [esp + 0x68]
inc al
mov byte [0x84840b], al
movzx ecx, al
mov eax, dword [esp + 0x68]
mov eax, dword [eax + ecx*4 + 4]
imul eax, edx
mov dword [ebx + ecx*4 + 4], eax
mov eax, edx
xor eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x64]
mov ebx, dword [esp + 0x1c]
mov dword [ecx + ebx], eax
mov cx, word [0x848464]
mov al, byte [0x848450]
inc cx
mov word [0x848464], cx
sub al, byte [ebx]
or dword [0x84840c], 0x1930
sub al, cl
or byte [0x84840b], al
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x20]
push dword [eax + ebx]
mov eax, dword [0x848434]
mov eax, dword [eax + edx*4]
imul eax, dword [ecx + ebp*4]
push eax
mov eax, dword [esp + 0x3c]
push 0x2b0
push 0x1ee7
movzx eax, byte [eax + esi]
imul eax, edx
push eax
call fcn.00418e78
mov eax, dword [0x848420]
add esp, 0x14
imul eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x44]
add dword [esp + 0x1c], 4
add eax, edx
xor eax, dword [0x848470]
or dword [ecx + ebx], eax
mov cl, byte [edi]
lea edi, [edi - 0x10]
movzx eax, byte [0x84840b]
or cl, 0x7c
movzx ecx, cl
imul ecx, eax
dec dword [esp + 0x60]
inc edx
mov dword [esp + 0x18], edx
movzx eax, cl
mov byte [0x84840b], cl
cmp edx, eax
jg 0x401a62
mov ecx, dword [0x84845c]
mov esi, dword [0x848404]
mov edi, dword [esp + 0x5c]
jmp 0x401b81
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x2c]
add eax, esi
mov ebx, dword [esp + 0x30]
mov dword [edx + ecx*4], eax
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x54]
movzx esi, byte [0x84840a]
mov eax, dword [eax + 0x6be0]
cdq
idiv dword [ecx + ebp*4]
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x48]
movzx eax, al
movzx ecx, cl
imul eax, ecx
movzx ecx, byte [esp + 0x13]
mov dword [esp + 0x44], ecx
and al, byte [0x84840a]
add byte [esi + ebx], al
mov eax, dword [0x848448]
mov esi, dword [esp + 0x14]
dec eax
mov dword [0x848448], eax
mov eax, dword [esi + eax*4]
and eax, dword [edx + ecx*4]
or dword [0x8483fc], eax
mov edx, dword [esp + 0x60]
mov ecx, edx
mov eax, dword [0x84841c]
add dword [0x84845c], eax
movzx eax, byte [0x84840a]
mov dword [esp + 0x48], eax
movzx eax, byte [ebx + edx]
dec edx
mov ebx, dword [esp + 0x24]
mov dword [esp + 0x60], edx
cmp dword [edi + ecx*4], eax
jl 0x401c27
mov eax, dword [0x848430]
mov ecx, ebx
inc ebx
mov eax, dword [eax + edx*4]
cmp dword [esi + ecx*4], eax
jle 0x401c5e
mov edx, dword [esp + 0x54]
mov ecx, dword [esp + 0x44]
mov edi, dword [esp + 0x58]
mov eax, dword [0x848420]
mov ecx, dword [edx + ecx*4]
cmp ecx, dword [edi + eax*4]
mov edi, dword [esp + 0x5c]
jl 0x401c62
mov eax, dword [0x848438]
mov ecx, dword [esp + 0x30]
movzx eax, byte [eax + ecx]
cmp eax, 0x1a7d
jb 0x401cf4
jmp 0x401c62
mov edx, dword [esp + 0x54]
mov eax, dword [esp + 0x68]
mov ecx, dword [0x8483f8]
mov eax, dword [eax + ebx*4]
xor eax, dword [0x848428]
sub eax, dword [0x848444]
imul eax, dword [edx + ecx*4 + 0x1c]
mov ebx, dword [esp + 0x14]
mov dword [edx + ecx*4 + 0x1c], eax
dec dword [0x8483f8]
inc dword [0x848444]
dec ebp
inc dword [edx]
mov eax, dword [edx]
mov ecx, dword [0x848404]
mov edx, dword [esp + 0x60]
mov dword [esp + 0x68], ebp
mov edi, dword [edi + eax*4]
mov eax, dword [esp + 0x34]
xor edi, ebp
dec ebp
movzx esi, byte [ecx + eax]
mov cl, byte [0x84843e]
mov eax, dword [esp + 0x5c]
inc cl
mov byte [0x84843e], cl
movzx ecx, cl
mov eax, dword [eax + edx*4 + 0x18]
cdq
idiv dword [ebx + ecx*4]
mov ebx, dword [esp + 0x68]
push eax
mov eax, dword [esp + 0x4c]
push esi
inc eax
push edi
movzx eax, ax
xor eax, 0x1764
push ebx
push eax
call fcn.00418e78
mov esi, dword [esp + 0x28]
add esp, 0x14
mov eax, dword [esi + ebp*4]
and eax, dword [esp + 0x28]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret