Function at 0x4083ca
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x20
mov eax, dword [0x972efc]
xor edx, edx
mov ecx, dword [esp + 0x40]
push ebx
push ebp
mov eax, dword [eax + 0x36b0]
mov ebp, dword [esp + 0x34]
push esi
mov esi, ebp
mov ebx, dword [esp + 0x30]
push edi
div dword [ecx + esi*4]
dec dword [0x972ee4]
mov cx, word [0x972ed8]
movzx edi, ax
movzx eax, cx
mov edx, dword [0x972eb0]
mov dword [esp + 0x3c], edx
mov dword [esp + 0x10], edi
movzx eax, byte [eax + ebx + 1]
mov dword [esp + 0x2c], eax
mov eax, 0xffff
add cx, ax
mov eax, dword [esp + 0x34]
mov word [0x972ed8], cx
mov ecx, dword [esp + 0x40]
movzx eax, byte [eax + esi*4]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x34]
mov ebx, dword [ecx + 0x4a14]
or ebx, dword [0x972ecc]
movzx eax, byte [eax + ebp + 0x13]
add eax, dword [esp + 0x58]
inc ebp
mov dword [esp + 0x1c], eax
mov eax, dword [0x972eb8]
mov eax, dword [eax + 0x12dc]
add eax, 0x1c38
mov dword [esp + 0x24], eax
mov eax, dword [0x972eec]
movzx eax, byte [eax + ebp + 0x1d]
mov dword [esp + 0x14], eax
mov eax, dword [0x972ee8]
lea esi, [ecx + eax*4]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
mov eax, dword [eax + ebx*4 + 8]
movzx ecx, byte [edx + ecx]
xor edx, edx
or eax, dword [0x972ed4]
div ecx
xor edx, edx
div dword [esi]
mov dword [esi], edx
mov eax, dword [0x972ec8]
movzx ecx, word [0x221a]
imul ecx, dword [0x972ee8]
push dword [0x972ebc]
mov ax, word [eax + 0x5344]
xor ax, di
movzx eax, ax
push eax
push ecx
call fcn.0040bad6
mov ecx, dword [esp + 0x28]
mov word [ecx + ebx*8 + 8], ax
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x58]
movzx eax, byte [eax]
movzx ecx, byte [eax + ecx]
mov eax, 0x118e
movzx eax, word [eax]
movzx eax, word [eax*4 + 0x118e]
imul ecx, eax
mov eax, dword [0x972efc]
mov eax, dword [eax + ebx*8]
or eax, 0x2ec
dec ebx
push eax
push 0x1377
push ecx
call fcn.0040bad6
mov esi, dword [esp + 0x54]
add esp, 0x18
mov edi, dword [esp + 0x40]
mov dword [0x972ee8], eax
mov eax, dword [0x972eec]
movzx eax, byte [eax + 0x1b44]
xor ax, word [0x972ee0]
add word [esi + ebx*8 + 0xc], ax
or ebx, 0x1d32
mov eax, dword [0x972eb4]
mov dword [esp + 0x20], ebx
mov edi, dword [edi + eax*4]
cmp edi, dword [0x972ed4]
jb 0x408606
mov esi, dword [esp + 0x4c]
imul eax, ebx, 6
mov ebx, dword [esp + 0x48]
mov dword [esp + 0x28], eax
lea eax, [edi*4 + 0x6c]
mov dword [esp + 0x50], eax
movzx eax, byte [esi + ebp*2]
mov ecx, 0x1c89
sub eax, dword [esp + 0x58]
xor eax, edi
cdq
idiv ecx
movzx ecx, byte [esi + ebp]
cdq
idiv ecx
mov ecx, dword [esp + 0x44]
mov byte [esi + ebp], dl
movzx eax, word [0x972ed8]
mov esi, dword [esp + 0x50]
mov edx, dword [0x972ec0]
add dword [esp + 0x50], 4
movzx ecx, byte [ecx + eax*4]
mov eax, dword [0x972efc]
xor cx, word [esi + eax]
mov eax, 0x110a
xor cx, word [esp + 0x20]
xor cx, ax
mov esi, dword [esp + 0x28]
add word [ebx + edx*2 + 0xa], cx
mov eax, edi
xor edx, edx
div dword [0x972ef4]
movzx ecx, word [esi + ebx]
mov eax, edx
xor edx, edx
div edi
mov eax, edx
xor edx, edx
div dword [0x972ecc]
xor edx, edx
div ecx
inc edi
mov word [esi + ebx], ax
mov esi, dword [esp + 0x4c]
cmp edi, dword [0x972ed4]
jae 0x408572
mov esi, dword [esp + 0x3c]
mov eax, 0x118e
movzx eax, word [eax]
movzx ebx, word [eax*8 + 0x1190]
cmp ebx, 0x1541
jae 0x4086a2
xor edx, edx
mov eax, 0xbbb
div esi
movzx eax, word [0x972ed8]
mov dword [esp + 0x3c], edx
mov edx, dword [esp + 0x14]
movzx ecx, byte [edx + eax*2]
mov eax, 0x2866
and ecx, ebx
movzx eax, word [eax]
imul ecx, eax
mov eax, dword [esp + 0x40]
or dword [eax + ebp*4], ecx
mov eax, 0xffff
add word [0x972ed8], ax
dec ebp
mov eax, dword [esp + 0x44]
mov edi, dword [0x972ee8]
movzx eax, byte [eax]
movzx esi, byte [eax + edx]
mov eax, dword [esp + 0x10]
movzx ecx, ax
mov eax, edi
sub eax, ecx
cdq
idiv esi
mov esi, dword [esp + 0x3c]
xor edx, edx
imul eax, esi
div dword [0x972ecc]
inc esi
inc dword [esp + 0x10]
inc ebx
mov dword [0x972ecc], eax
cmp ebx, 0x1541
jl 0x408622
jmp 0x4086a8
mov edi, dword [0x972ee8]
mov eax, dword [0x972eb0]
mov ebx, dword [esp + 0x4c]
dec eax
mov ecx, dword [0x972ec0]
mov dword [0x972eb0], eax
movzx eax, byte [eax + ebx]
cmp eax, ecx
jae 0x4086d9
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x1c]
movzx eax, word [edx + eax*4]
cmp ecx, eax
je 0x408784
mov eax, dword [esp + 0x14]
xor edx, edx
mov edi, dword [esp + 0x34]
movzx ecx, byte [eax]
mov al, byte [0x972ef0]
mov byte [edi + ecx*2], al
mov eax, dword [0x972ee0]
add eax, esi
mov ecx, dword [esp + 0x20]
div esi
movzx ecx, byte [ecx + edi]
movzx edx, ax
mov eax, dword [0x972ec0]
imul edx, ecx
mov word [eax*8 + 0x118e], dx
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x2c]
mov ecx, dword [0x972ee8]
mov esi, dword [0x972ef4]
movzx eax, byte [eax + ebx + 1]
mov edx, dword [edx + 0x21d4]
sub edx, eax
mov ebx, dword [esp + 0x34]
mov eax, dword [esp + 0x18]
inc esi
mov dword [0x972ee4], edx
mov dword [0x972ef4], esi
lea edi, [eax + ecx*4]
mov eax, dword [esp + 0x40]
movzx ecx, byte [esi + ebx + 0x11]
mov ebx, dword [esp + 0x44]
sub edx, dword [eax + 0x70]
mov eax, edx
cdq
idiv dword [0x972ee0]
cdq
idiv ecx
cdq
idiv dword [edi]
xor edx, edx
mov dword [edi], eax
movzx ecx, byte [ebx + ebp + 1]
mov eax, dword [0x972ec0]
div ecx
mov byte [ebx + ebp + 1], dl
mov edi, dword [0x972ee8]
mov eax, dword [esp + 0x18]
mov eax, dword [eax + edi*4]
dec edi
mov dword [0x972ee8], edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret