Function at 0xd05220
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x5c
movzx eax, word [ebp + 0x10]
movzx ecx, word [ebp + 0x20]
movzx esi, word [ebp + 0x24]
movzx edx, word [ebp + 0x18]
mov word [ebp - 0x3a], ax
movzx eax, word [ebp + 0x2c]
mov word [ebp - 0x3e], cx
mov ecx, dword [ebp + 0x30]
mov word [ebp - 0x40], si
mov esi, dword [ebp + 0x30]
mov ebx, dword [ebp + 0x28]
mov word [ebp - 0x42], ax
mov eax, dword [ebp + 0x30]
add ecx, 0x140
mov dword [ebp - 0x30], ecx
mov ecx, dword [ebp + 0x28]
add esi, 0x1c0
mov word [ebp - 0x3c], dx
add ebx, 0x2c0
mov edx, dword [ebp + 0x30]
add eax, 0x260
mov dword [ebp - 0x2c], esi
mov esi, dword [ebp + 0x30]
mov dword [ebp - 0x28], eax
mov eax, dword [ecx + 0x2c0]
add edx, 0xa0
mov dword [esi], eax
mov eax, dword [ebx + 4]
mov dword [esi + 4], eax
mov eax, dword [ebx + 8]
mov dword [esi + 8], eax
mov eax, dword [ebx + 0xc]
mov dword [esi + 0xc], eax
mov eax, dword [ebx + 0x10]
mov dword [esi + 0x10], eax
mov eax, dword [ebx + 0x14]
mov dword [esi + 0x14], eax
mov eax, dword [ebx + 0x18]
mov dword [esi + 0x18], eax
mov eax, dword [ebx + 0x1c]
mov dword [esi + 0x1c], eax
mov esi, ecx
mov eax, dword [ecx + 0x2e0]
mov ecx, dword [ebp + 0x30]
add esi, 0x2e0
mov dword [ecx + 0xa0], eax
mov eax, dword [esi + 4]
mov edi, ecx
add edi, 0xc0
add ecx, 0x20
mov dword [edx + 4], eax
mov eax, dword [esi + 8]
mov dword [edx + 8], eax
mov eax, dword [esi + 0xc]
mov dword [edx + 0xc], eax
mov eax, dword [esi + 0x10]
mov dword [edx + 0x10], eax
mov eax, dword [esi + 0x14]
mov dword [edx + 0x14], eax
mov eax, dword [esi + 0x18]
mov dword [edx + 0x18], eax
mov eax, dword [esi + 0x1c]
mov dword [edx + 0x1c], eax
movsx eax, word [ebp - 0x3a]
mov edx, dword [ebp + 8]
mov dword [ebp - 0x38], ecx
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x18], 0x40
mov dword [esp + 0x14], edi
mov dword [esp + 4], 0x10
mov dword [esp + 8], eax
mov dword [esp], edx
call fcn.00d09290
mov ecx, dword [ebp + 0x30]
mov edx, dword [ebp + 0x30]
mov eax, dword [ecx + 0x80]
mov ecx, dword [ebp + 0x28]
sub edx, 0xffffff80
mov dword [ecx + 0x2c0], eax
mov eax, dword [edx + 4]
mov dword [ebx + 4], eax
mov eax, dword [edx + 8]
mov dword [ebx + 8], eax
mov eax, dword [edx + 0xc]
mov dword [ebx + 0xc], eax
mov eax, dword [edx + 0x10]
mov dword [ebx + 0x10], eax
mov eax, dword [edx + 0x14]
mov dword [ebx + 0x14], eax
mov eax, dword [edx + 0x18]
mov dword [ebx + 0x18], eax
mov eax, dword [edx + 0x1c]
mov dword [ebx + 0x1c], eax
mov ecx, dword [ebp + 0x30]
xor ebx, ebx
mov edx, dword [ebp + 0x30]
mov eax, dword [ecx + 0x120]
mov ecx, dword [ebp + 0x28]
add edx, 0x120
mov dword [ecx + 0x2e0], eax
mov eax, dword [edx + 4]
mov dword [esi + 4], eax
mov eax, dword [edx + 8]
mov dword [esi + 8], eax
mov eax, dword [edx + 0xc]
mov dword [esi + 0xc], eax
mov eax, dword [edx + 0x10]
mov dword [esi + 0x10], eax
mov eax, dword [edx + 0x14]
mov dword [esi + 0x14], eax
mov eax, dword [edx + 0x18]
mov dword [esi + 0x18], eax
mov eax, dword [edx + 0x1c]
mov dword [esi + 0x1c], eax
mov eax, ecx
mov esi, dword [ebp - 0x30]
add eax, 0x300
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x38]
mov dword [esp + 0x10], 0x40
mov dword [esp + 8], esi
mov dword [esp + 0xc], 0x570a
mov dword [esp], eax
mov dword [esp + 4], edi
call fcn.00d09560
mov eax, dword [ebp + 0x28]
mov dword [esp], esi
mov dword [esp + 4], 0x40
add eax, 0x302
mov dword [esp + 8], eax
call fcn.00cfdaf0
mov eax, dword [ebp + 0x28]
mov edx, dword [ebp + 0x30]
mov ecx, dword [ebp + 0x14]
mov dword [esp], esi
add eax, 0x30e
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], edx
mov dword [esp + 8], ecx
mov dword [esp + 4], 0x40
call fcn.00cfc3b0
mov eax, dword [ebp + 0x28]
lea esi, [eax + 0x41c]
mov dword [esp], esi
call fcn.00d03f50
mov edx, dword [ebp + 0x30]
sar ax, 3
mov word [edx + ebx*8 + 0x1c0], ax
mov dword [esp], esi
call fcn.00d03f50
mov ecx, dword [ebp + 0x30]
sar ax, 3
mov word [ecx + ebx*8 + 0x1c2], ax
mov dword [esp], esi
call fcn.00d03f50
mov edx, dword [ebp + 0x30]
sar ax, 3
mov word [edx + ebx*8 + 0x1c4], ax
mov dword [esp], esi
call fcn.00d03f50
mov ecx, dword [ebp + 0x30]
sar ax, 3
mov word [ecx + ebx*8 + 0x1c6], ax
add ebx, 1
cmp ebx, 0x14
jne 0xd05448
mov esi, dword [ebp + 0xc]
mov edi, 0x10
jmp 0xd054b9
add esi, 8
movsx eax, word [esi]
add eax, 4
mov edx, eax
mov ecx, eax
sar edx, 0x1f
sar ecx, 0xf
mov ebx, edx
xor ebx, 0x7fff
cmp ecx, edx
cmovne eax, ebx
sar ax, 3
mov word [esi], ax
movsx eax, word [esi + 2]
add eax, 4
mov edx, eax
mov ecx, eax
sar edx, 0x1f
sar ecx, 0xf
mov ebx, edx
xor ebx, 0x7fff
cmp ecx, edx
cmovne eax, ebx
sar ax, 3
mov word [esi + 2], ax
movsx eax, word [esi + 4]
add eax, 4
mov edx, eax
mov ecx, eax
sar edx, 0x1f
sar ecx, 0xf
mov ebx, edx
xor ebx, 0x7fff
cmp ecx, edx
cmovne eax, ebx
sar ax, 3
mov word [esi + 4], ax
movsx eax, word [esi + 6]
add eax, 4
mov edx, eax
mov ecx, eax
sar edx, 0x1f
sar ecx, 0xf
mov ebx, edx
xor ebx, 0x7fff
cmp ecx, edx
cmovne eax, ebx
sar ax, 3
sub di, 1
mov word [esi + 6], ax
jne 0xd054b6
mov esi, dword [ebp + 0xc]
lea eax, [ebp - 0x10]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x40
mov dword [esp + 4], esi
mov dword [esp], esi
lea esi, [ebp - 0xe]
call fcn.00d060c0
movzx edx, word [ebp - 0x3a]
mov ecx, dword [ebp - 0x2c]
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x50
mov dword [esp + 4], ecx
mov ebx, eax
mov dword [esp], ecx
lea eax, [edx + edx - 6]
sub word [ebp - 0x10], ax
call fcn.00d060c0
shr ebx, 0x10
mov edx, eax
shr edx, 0x10
cmp bx, dx
jge 0xd055b8
add word [ebp - 0xe], 1
sar dx, 1
movsx eax, bx
mov dword [esp + 4], eax
movsx eax, dx
mov dword [esp], eax
call fcn.00d05dc0
mov dword [esp + 4], esi
shl eax, 0x10
mov dword [ebp - 0x14], eax
movzx eax, word [ebp - 0x10]
sub word [ebp - 0xe], ax
lea eax, [ebp - 0x14]
mov dword [esp], eax
call fcn.00d05ef0
movzx eax, word [ebp - 0xe]
mov edx, dword [ebp - 0x14]
add eax, 1
test ax, ax
jle 0xd05bf8
movsx ecx, ax
mov ebx, edx
shl ebx, cl
mov eax, ebx
sar eax, cl
cmp edx, eax
je 0xd05614
mov ebx, edx
sar ebx, 0x1f
xor ebx, 0x7fffffff
mov esi, dword [ebp + 0x30]
mov ecx, ebx
xor edx, edx
sar ecx, 0x10
nop
movsx eax, word [esi + edx*8 + 0x1c0]
imul eax, ecx
sar eax, 0xf
mov word [esi + edx*8 + 0x1c0], ax
movsx eax, word [esi + edx*8 + 0x1c2]
imul eax, ecx
sar eax, 0xf
mov word [esi + edx*8 + 0x1c2], ax
movsx eax, word [esi + edx*8 + 0x1c4]
imul eax, ecx
sar eax, 0xf
mov word [esi + edx*8 + 0x1c4], ax
movsx eax, word [esi + edx*8 + 0x1c6]
imul eax, ecx
sar eax, 0xf
mov word [esi + edx*8 + 0x1c6], ax
add edx, 1
cmp edx, 0x14
jne 0xd05620
mov eax, dword [ebp + 0x28]
mov dword [ebp - 0x14], ebx
mov dword [esp + 4], 0x40
add eax, 0x46c
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call fcn.00cfdcc0
mov edx, dword [ebp - 0x30]
movsx eax, word [edx]
imul eax, eax
cmp eax, 0x40000000
je 0xd05bee
add eax, eax
test eax, eax
lea edx, [eax + 1]
js 0xd056c7
test edx, edx
js 0xd05bee
mov ebx, edx
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x20], 1
mov dword [ebp - 0x24], 0
jmp 0xd05722
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp + 0x30]
mov dword [ebp - 0x14], edi
movsx eax, word [edx + ecx*2 + 0x140]
mov edx, 0x7fffffff
imul eax, esi
lea ecx, [eax + eax]
cmp eax, 0x40000000
cmovne edx, ecx
mov ecx, dword [ebp - 0x20]
lea ebx, [edx + ecx]
xor edx, ecx
js 0xd05712
xor ecx, ebx
js 0xd05760
add dword [ebp - 0x24], 1
cmp dword [ebp - 0x24], 0x3f
je 0xd05776
mov dword [ebp - 0x20], ebx
mov ebx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x24]
mov edx, 0x7fffffff
mov eax, dword [ebp + 0x30]
movsx esi, word [eax + ecx*2 + 0x142]
mov eax, esi
imul eax, esi
cmp eax, 0x40000000
lea ecx, [eax + eax]
cmovne edx, ecx
lea edi, [edx + ebx]
xor edx, ebx
js 0xd056e0
mov edx, edi
xor edx, ebx
jns 0xd056e0
mov edi, ebx
sar edi, 0x1f
xor edi, 0x7fffffff
jmp 0xd056e0
mov ebx, dword [ebp - 0x20]
add dword [ebp - 0x24], 1
sar ebx, 0x1f
xor ebx, 0x7fffffff
cmp dword [ebp - 0x24], 0x3f
jne 0xd0571c
mov dword [esp], edi
mov edi, 0x7fff
call fcn.00d04bc0
mov edx, dword [ebp - 0x14]
movsx esi, ax
mov ecx, esi
shl ebx, cl
mov ecx, 0x7fff
mov word [ebp - 0xe], ax
mov eax, ebx
shr eax, 0x10
test ax, ax
jle 0xd057f4
mov ecx, esi
cwde
shl edx, cl
sar edx, 0x10
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.00d05dc0
sub di, ax
movsx eax, di
lea eax, [eax + eax*4]
shl eax, 0xc
mov edx, eax
mov ebx, eax
sar edx, 0x1f
sar eax, 0x1e
mov ecx, edx
xor ecx, 0x7fff
sar ebx, 0xf
cmp eax, edx
cmovne ebx, ecx
movsx edx, bx
lea ecx, [edx + edx]
movsx eax, cx
sar eax, 1
cmp edx, eax
je 0xd057f4
mov ecx, ebx
sar cx, 0xf
xor cx, 0x7fff
mov esi, dword [ebp + 0x28]
lea edx, [ecx - 1]
lea eax, [edi - 1]
cmp word [esi + 0x5ee], 0
cmovle edx, eax
test dx, dx
je 0xd05a45
lea eax, [edx + 1]
cmp ax, 0xccc
jle 0xd05a45
cmp word [ebp - 0x3e], 0x1dc
setg byte [ebp - 0x31]
jle 0xd05a5a
cmp word [ebp - 0x42], 0
jne 0xd05a5a
movsx eax, word [ebp - 0x3c]
xor esi, esi
movsx edi, word [eax + eax + 0x12e2d60]
mov edx, dword [ebp + 0x30]
movsx eax, word [edx + esi*8 + 0x1c0]
imul eax, edi
mov ecx, eax
mov edx, eax
sar ecx, 0x1f
sar eax, 0x1e
mov ebx, ecx
xor ebx, 0x7fff
sar edx, 0xf
cmp eax, ecx
mov ecx, dword [ebp + 0x30]
cmovne edx, ebx
movsx edx, dx
add edx, edx
movsx eax, word [ecx + esi*8 + 0x1c2]
mov word [ecx + esi*8 + 0x1c0], dx
imul eax, edi
mov ecx, eax
mov edx, eax
sar ecx, 0x1f
sar eax, 0x1e
mov ebx, ecx
xor ebx, 0x7fff
sar edx, 0xf
cmp eax, ecx
mov eax, dword [ebp + 0x30]
cmovne edx, ebx
movsx edx, dx
add edx, edx
mov word [eax + esi*8 + 0x1c2], dx
movsx eax, word [eax + esi*8 + 0x1c4]
imul eax, edi
mov ecx, eax
mov edx, eax
sar ecx, 0x1f
sar eax, 0x1e
mov ebx, ecx
xor ebx, 0x7fff
sar edx, 0xf
cmp eax, ecx
mov ecx, dword [ebp + 0x30]
cmovne edx, ebx
movsx edx, dx
add edx, edx
movsx eax, word [ecx + esi*8 + 0x1c6]
mov word [ecx + esi*8 + 0x1c4], dx
imul eax, edi
mov ecx, eax
mov edx, eax
sar ecx, 0x1f
sar eax, 0x1e
mov ebx, ecx
sar edx, 0xf
xor ebx, 0x7fff
cmp eax, ecx
mov eax, dword [ebp + 0x30]
cmovne edx, ebx
movsx edx, dx
add edx, edx
mov word [eax + esi*8 + 0x1c6], dx
add esi, 1
cmp esi, 0x14
jne 0xd05847
cmp word [ebp - 0x3e], 0x84
jg 0xd0593d
cmp word [ebp - 0x40], 0
je 0xd05b34
mov ecx, dword [ebp - 0x28]
mov esi, dword [ebp + 8]
mov dword [esp + 0xc], 0x10
mov dword [esp + 8], 0x4ccd
mov dword [esp + 4], ecx
mov dword [esp], esi
call fcn.00d0b650
mov eax, dword [ebp + 0x30]
mov edx, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x28]
mov dword [esp + 0x18], 1
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 0x28]
mov dword [esp + 0x10], 0x50
mov dword [esp + 0xc], edx
mov dword [esp + 8], edx
add eax, 0x346
mov dword [esp + 0x14], eax
mov dword [esp + 4], 0x10
mov dword [esp], ecx
call fcn.00d08d60
mov eax, dword [ebp + 0x28]
mov esi, dword [ebp + 0x30]
mov dword [esp + 4], 0x50
add eax, 0x366
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp + 0xc], esi
mov dword [esp], eax
call fcn.00cfc540
cmp byte [ebp - 0x31], 0
jne 0xd05bc6
xor esi, esi
mov ecx, dword [ebp + 0x14]
movsx eax, word [ecx + esi*4]
mov ecx, dword [ebp + 0x30]
movsx edx, word [ecx + esi*4 + 0x1c0]
add eax, edx
mov edx, eax
mov ecx, eax
sar edx, 0x1f
sar ecx, 0xf
mov ebx, edx
xor ebx, 0x7fff
cmp ecx, edx
mov edx, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x30]
cmovne eax, ebx
mov word [edx + esi*4], ax
movsx eax, word [edx + esi*4 + 2]
movsx edx, word [ecx + esi*4 + 0x1c2]
add eax, edx
mov edx, eax
mov ecx, eax
sar edx, 0x1f
mov ebx, edx
sar ecx, 0xf
xor ebx, 0x7fff
cmp ecx, edx
mov edx, dword [ebp + 0x14]
cmovne eax, ebx
mov word [edx + esi*4 + 2], ax
add esi, 1
cmp esi, 0x28
jne 0xd059d2
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
cmp word [ebp - 0x3e], 0x1dc
mov eax, 0xccd
setg byte [ebp - 0x31]
jg 0xd0582e
movsx edi, ax
xor esi, esi
nop
mov edx, dword [ebp + 0x30]
movsx eax, word [edx + esi*8 + 0x1c0]
imul eax, edi
mov ecx, eax
mov edx, eax
sar ecx, 0x1f
sar eax, 0x1e
mov ebx, ecx
xor ebx, 0x7fff
sar edx, 0xf
cmp eax, ecx
mov ecx, dword [ebp + 0x30]
cmovne edx, ebx
movsx eax, word [ecx + esi*8 + 0x1c2]
mov word [ecx + esi*8 + 0x1c0], dx
imul eax, edi
mov ecx, eax
mov edx, eax
sar ecx, 0x1f
sar eax, 0x1e
mov ebx, ecx
xor ebx, 0x7fff
sar edx, 0xf
cmp eax, ecx
mov eax, dword [ebp + 0x30]
cmovne edx, ebx
mov word [eax + esi*8 + 0x1c2], dx
movsx eax, word [eax + esi*8 + 0x1c4]
imul eax, edi
mov ecx, eax
mov edx, eax
sar ecx, 0x1f
sar eax, 0x1e
mov ebx, ecx
xor ebx, 0x7fff
sar edx, 0xf
cmp eax, ecx
mov ecx, dword [ebp + 0x30]
cmovne edx, ebx
movsx eax, word [ecx + esi*8 + 0x1c6]
mov word [ecx + esi*8 + 0x1c4], dx
imul eax, edi
mov ecx, eax
mov edx, eax
sar ecx, 0x1f
sar eax, 0x1e
mov ebx, ecx
sar edx, 0xf
xor ebx, 0x7fff
cmp eax, ecx
mov eax, dword [ebp + 0x30]
cmovne edx, ebx
mov word [eax + esi*8 + 0x1c6], dx
add esi, 1
cmp esi, 0x14
jne 0xd05a60
jmp 0xd0592a
mov edx, dword [ebp + 0x1c]
mov ebx, dword [ebp - 0x28]
mov dword [esp], edx
call fcn.00d09730
mov ecx, dword [ebp + 0x1c]
add ebx, 0x2a
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x14
mov dword [esp + 4], ebx
mov dword [esp], ecx
call fcn.00d01000
mov esi, dword [ebp - 0x28]
mov dword [esp + 0xc], 0x14
mov dword [esp + 8], 0x7333
mov dword [esp], ebx
mov dword [esp + 4], esi
call fcn.00d0b650
mov eax, dword [ebp + 0x30]
mov edx, dword [ebp - 0x2c]
mov dword [esp + 0x18], 1
mov dword [esp + 0x10], 0x50
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 0x28]
mov dword [esp + 0xc], edx
mov dword [esp + 8], edx
mov dword [esp + 4], 0x14
add eax, 0x33e
mov dword [esp + 0x14], eax
mov dword [esp], esi
call fcn.00d08d60
jmp 0xd059a0
mov eax, dword [ebp + 0x28]
mov edx, dword [ebp - 0x2c]
mov dword [esp + 0xc], esi
mov dword [esp + 4], 0x50
add eax, 0x3de
mov dword [esp + 8], eax
mov dword [esp], edx
call fcn.00cfd020
jmp 0xd059d0
mov edx, 0x7fffffff
jmp 0xd056c7
neg eax
mov ebx, edx
mov ecx, eax
and ecx, 0xf
sar ebx, cl
jmp 0xd05614