Function at 0x4083f7
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x20
mov eax, dword [0x9769cc]
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 [0x9769b4]
mov cx, word [0x9769a8]
movzx edi, ax
movzx eax, cx
mov edx, dword [0x976980]
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 [0x9769a8], 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 [0x97699c]
movzx eax, byte [eax + ebp + 0x1f]
add eax, dword [esp + 0x58]
inc ebp
mov dword [esp + 0x1c], eax
mov eax, dword [0x976988]
mov eax, dword [eax + 0x12dc]
add eax, 0x1c38
mov dword [esp + 0x24], eax
mov eax, dword [0x9769bc]
movzx eax, byte [eax + ebp + 0x1d]
mov dword [esp + 0x14], eax
mov eax, dword [0x9769b8]
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 [0x9769a4]
div ecx
xor edx, edx
div dword [esi]
mov dword [esi], edx
mov eax, dword [0x976998]
movzx ecx, word [0x20b2]
imul ecx, dword [0x9769b8]
push dword [0x97698c]
mov ax, word [eax + 0x5344]
xor ax, di
movzx eax, ax
push eax
push ecx
call fcn.0040ba9f
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, 0x1026
movzx eax, word [eax]
movzx eax, word [eax*4 + 0x1026]
imul ecx, eax
mov eax, dword [0x9769cc]
mov eax, dword [eax + ebx*8]
or eax, 0x2ec
dec ebx
push eax
push 0x1377
push ecx
call fcn.0040ba9f
mov esi, dword [esp + 0x54]
add esp, 0x18
mov edi, dword [esp + 0x40]
mov dword [0x9769b8], eax
mov eax, dword [0x9769bc]
movzx eax, byte [eax + 0x1b44]
xor ax, word [0x9769b0]
add word [esi + ebx*8 + 0xc], ax
or ebx, 0x1d32
mov eax, dword [0x976984]
mov dword [esp + 0x20], ebx
mov edi, dword [edi + eax*4]
cmp edi, dword [0x9769a4]
jb 0x408633
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 [0x9769a8]
mov esi, dword [esp + 0x50]
mov edx, dword [0x976990]
add dword [esp + 0x50], 4
movzx ecx, byte [ecx + eax*4]
mov eax, dword [0x9769cc]
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 [0x9769c4]
movzx ecx, word [esi + ebx]
mov eax, edx
xor edx, edx
div edi
mov eax, edx
xor edx, edx
div dword [0x97699c]
xor edx, edx
div ecx
inc edi
mov word [esi + ebx], ax
mov esi, dword [esp + 0x4c]
cmp edi, dword [0x9769a4]
jae 0x40859f
mov esi, dword [esp + 0x3c]
mov eax, 0x1026
movzx eax, word [eax]
movzx ebx, word [eax*8 + 0x1028]
cmp ebx, 0x1541
jae 0x4086cf
xor edx, edx
mov eax, 0xbbb
div esi
movzx eax, word [0x9769a8]
mov dword [esp + 0x3c], edx
mov edx, dword [esp + 0x14]
movzx ecx, byte [edx + eax*2]
mov eax, 0x26fe
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 [0x9769a8], ax
dec ebp
mov eax, dword [esp + 0x44]
mov edi, dword [0x9769b8]
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 [0x97699c]
inc esi
inc dword [esp + 0x10]
inc ebx
mov dword [0x97699c], eax
cmp ebx, 0x1541
jl 0x40864f
jmp 0x4086d5
mov edi, dword [0x9769b8]
mov eax, dword [0x976980]
mov ebx, dword [esp + 0x4c]
dec eax
mov ecx, dword [0x976990]
mov dword [0x976980], eax
movzx eax, byte [eax + ebx]
cmp eax, ecx
jae 0x408706
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x1c]
movzx eax, word [edx + eax*4]
cmp ecx, eax
je 0x4087b1
mov eax, dword [esp + 0x14]
xor edx, edx
mov edi, dword [esp + 0x34]
movzx ecx, byte [eax]
mov al, byte [0x9769c0]
mov byte [edi + ecx*2], al
mov eax, dword [0x9769b0]
add eax, esi
mov ecx, dword [esp + 0x20]
div esi
movzx ecx, byte [ecx + edi]
movzx edx, ax
mov eax, dword [0x976990]
imul edx, ecx
mov word [eax*8 + 0x1026], dx
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x2c]
mov ecx, dword [0x9769b8]
mov esi, dword [0x9769c4]
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 [0x9769b4], edx
mov dword [0x9769c4], 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 [0x9769b0]
cdq
idiv ecx
cdq
idiv dword [edi]
xor edx, edx
mov dword [edi], eax
movzx ecx, byte [ebx + ebp + 1]
mov eax, dword [0x976990]
div ecx
mov byte [ebx + ebp + 1], dl
mov edi, dword [0x9769b8]
mov eax, dword [esp + 0x18]
mov eax, dword [eax + edi*4]
dec edi
mov dword [0x9769b8], edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret