Function at 0x10031490
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x68
mov ecx, dword [esp + 0x70]
mov edx, dword [esp + 0x6c]
push ebx
push ebp
push esi
mov ebp, 1
xor esi, esi
shl ebp, cl
push edi
mov dword [esp + 0x18], ebp
lea edi, [esi + 1]
lea eax, [ebp - 1]
cmp eax, edi
jle 0x100314f9
mov ebx, ebp
mov ebp, eax
sar ebx, 1
nop dword [eax]
mov eax, ebx
xor esi, eax
test esi, eax
jne 0x100314d0
sar eax, 1
xor esi, eax
test esi, eax
je 0x100314c8
cmp esi, edi
jle 0x100314f0
mov ecx, dword [edx + edi*8]
mov eax, dword [edx + esi*8]
mov dword [edx + edi*8], eax
mov eax, dword [edx + esi*8 + 4]
mov dword [edx + esi*8], ecx
mov ecx, dword [edx + edi*8 + 4]
mov dword [edx + edi*8 + 4], eax
mov dword [edx + esi*8 + 4], ecx
inc edi
cmp edi, ebp
jl 0x100314c0
mov ebp, dword [esp + 0x18]
lea eax, [ebp*2]
test eax, eax
jle 0x100315c0
dec eax
add edx, 4
shr eax, 3
inc eax
mov dword [esp + 0x14], edx
mov dword [esp + 0x4c], eax
nop dword [eax + eax]
mov ebp, dword [edx + 4]
mov eax, dword [edx - 4]
mov edi, dword [edx + 0x14]
add eax, ebp
mov esi, dword [edx + 8]
mov ebx, dword [edx]
mov ecx, dword [edx + 0x18]
add ebx, esi
sar eax, 1
mov dword [esp + 0x1c], eax
mov eax, dword [edx + 0xc]
mov edx, dword [edx + 0x10]
add eax, edi
sar eax, 1
add edx, ecx
mov dword [esp + 0x50], eax
add eax, dword [esp + 0x1c]
mov dword [esp + 0x64], ebp
mov ebp, dword [esp + 0x14]
sar edx, 1
sar ebx, 1
mov dword [ebp - 4], eax
mov eax, dword [esp + 0x1c]
sub eax, dword [esp + 0x50]
mov dword [ebp + 0xc], eax
lea eax, [edx + ebx]
mov dword [ebp], eax
mov eax, ebx
sub eax, edx
sub ebx, esi
mov esi, dword [esp + 0x14]
sub edx, ecx
mov dword [ebp + 0x10], eax
mov ebp, dword [esp + 0x64]
sub dword [esp + 0x1c], ebp
mov ecx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x50]
sub ebp, edi
lea eax, [edx + ecx]
sub ecx, edx
mov edx, esi
mov dword [esi + 4], eax
mov eax, ebx
sub eax, ebp
mov dword [edx + 8], eax
lea eax, [ebx + ebp]
mov dword [edx + 0x14], ecx
mov dword [edx + 0x18], eax
add edx, 0x20
sub dword [esp + 0x4c], 1
mov dword [esp + 0x14], edx
jne 0x10031520
mov ebp, dword [esp + 0x18]
mov ecx, 3
mov dword [esp + 0x64], ecx
cmp dword [esp + 0x80], ecx
jl 0x10031b91
mov eax, dword [esp + 0x88]
mov ebx, 8
shl eax, 2
mov dword [esp + 0x14], ebx
mov dword [esp + 0x6c], eax
nop dword [eax]
mov edi, ebx
mov dword [esp + 0x50], 0
mov esi, eax
sar edi, 1
sar esi, cl
test ebp, ebp
mov ebp, dword [esp + 0x7c]
mov dword [esp + 0x54], edi
mov dword [esp + 0x4c], esi
jle 0x100316e6
lea eax, [edi*4]
shl ebx, 3
add eax, ebp
mov dword [esp + 0x58], ebx
mov dword [esp + 0x5c], eax
lea ecx, [edi*8]
lea eax, [edi + edi*2]
add ecx, ebp
mov edi, dword [esp + 0x5c]
lea eax, [eax*4]
add eax, ebp
mov dword [esp + 0x34], ecx
mov dword [esp + 0x30], eax
nop dword [eax]
mov esi, dword [ecx]
mov ebx, dword [ecx + 4]
mov edx, dword [ebp]
mov ecx, dword [ebp + 4]
sar edx, 1
sar esi, 1
sar ebx, 1
sar ecx, 1
lea eax, [edx + esi]
sub edx, esi
mov dword [ebp], eax
lea eax, [ecx + ebx]
sub ecx, ebx
mov dword [ebp + 4], eax
mov eax, dword [esp + 0x34]
mov dword [eax], edx
mov dword [eax + 4], ecx
mov eax, dword [esp + 0x30]
mov edx, dword [edi]
mov ecx, dword [edi + 4]
sar edx, 1
mov ebx, dword [eax + 4]
mov esi, dword [eax]
sar ebx, 1
sar ecx, 1
sar esi, 1
lea eax, [edx + ebx]
sub edx, ebx
mov ebx, dword [esp + 0x30]
mov dword [edi], eax
mov eax, ecx
sub eax, esi
mov dword [edi + 4], eax
lea eax, [ecx + esi]
mov ecx, dword [esp + 0x34]
mov dword [ebx], edx
mov edx, dword [esp + 0x50]
add edx, dword [esp + 0x14]
mov dword [ebx + 4], eax
mov eax, dword [esp + 0x58]
add ecx, eax
add ebx, eax
mov dword [esp + 0x50], edx
add ebp, eax
mov dword [esp + 0x34], ecx
add edi, eax
mov dword [esp + 0x30], ebx
cmp edx, dword [esp + 0x18]
jl 0x10031650
mov edi, dword [esp + 0x54]
mov ebp, dword [esp + 0x7c]
mov esi, dword [esp + 0x4c]
mov eax, edi
mov ecx, 1
cdq
and edx, 3
mov dword [esp + 0x58], ecx
add edx, eax
sar edx, 2
mov dword [esp + 0x60], edx
cmp edx, ecx
jle 0x100319b2
lea eax, [ebp + 8]
mov dword [esp + 0x44], eax
lea edx, [esi*4]
lea eax, [edi*8 + 8]
mov dword [esp + 0x68], edx
add edx, dword [esp + 0x84]
add eax, ebp
mov dword [esp + 0x48], eax
lea eax, [edi*4 + 8]
add eax, ebp
mov dword [esp + 0x5c], edx
mov dword [esp + 0x4c], eax
lea eax, [edi + 1]
lea eax, [edi + eax*2]
lea eax, [eax*4]
add eax, ebp
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x18]
nop dword [eax]
nop dword [eax + eax]
mov esi, dword [edx]
mov dword [esp + 0x70], esi
mov dword [esp + 0x40], 0
test eax, eax
jle 0x10031983
mov ebx, dword [esp + 0x44]
mov eax, edi
cdq
sub eax, edx
mov dword [esp + 0x20], ebx
sar eax, 1
sub eax, ecx
lea ecx, [eax*8]
add ecx, ebp
mov dword [esp + 0x28], ecx
lea ecx, [edi + eax*2]
add eax, edi
lea ecx, [ecx*4]
add ecx, ebp
mov dword [esp + 0x34], ecx
mov ecx, dword [esp + 0x4c]
lea edx, [eax*8]
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x48]
lea eax, [edi + eax*2]
mov edi, dword [esp + 0x14]
lea eax, [eax*4]
add edx, ebp
mov dword [esp + 0x38], ecx
add eax, ebp
mov dword [esp + 0x24], edx
mov ebp, dword [esp + 0x50]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x2c], ebp
nop
push dword [esp + 0x72]
lea eax, [esp + 0x14]
push esi
push dword [ecx]
push dword [ecx + 4]
push eax
lea eax, [esp + 0x30]
push eax
call fcn.1001b8f0
mov ebp, dword [ebx]
mov ebx, dword [ebx + 4]
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x38]
push dword [esp + 0x8a]
sar ebp, 1
add eax, ebp
sar ebx, 1
sub ebp, dword [esp + 0x2c]
mov dword [edx], eax
mov edx, dword [esp + 0x38]
push esi
lea eax, [ebx + edx]
sub ebx, edx
mov dword [ecx + 4], eax
mov eax, dword [esp + 0x58]
mov dword [eax], ebp
mov dword [eax + 4], ebx
mov eax, dword [esp + 0x4c]
push dword [eax]
push dword [eax + 4]
lea eax, [esp + 0x44]
push eax
lea eax, [esp + 0x3c]
push eax
call fcn.1001b8f0
mov ecx, dword [esp + 0x60]
mov eax, dword [esp + 0x40]
mov edx, dword [esp + 0x60]
push dword [esp + 0xa2]
mov ebp, dword [ecx]
mov ebx, dword [ecx + 4]
sar ebp, 1
add eax, ebp
sar ebx, 1
sub ebp, dword [esp + 0x44]
mov dword [ecx], eax
mov eax, ebx
mov ecx, dword [esp + 0x50]
sub eax, ecx
mov dword [edx + 4], eax
mov edx, dword [esp + 0x60]
push esi
lea eax, [ebx + ecx]
mov dword [edx + 4], eax
mov eax, dword [esp + 0x5c]
mov dword [edx], ebp
push dword [eax + 4]
push dword [eax]
lea eax, [esp + 0x50]
push eax
lea eax, [esp + 0x60]
push eax
call fcn.1001b8f0
mov ecx, dword [esp + 0x70]
add esp, 0x48
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x28]
mov ebp, dword [ecx]
mov ebx, dword [ecx + 4]
sar ebp, 1
add eax, ebp
sar ebx, 1
mov dword [ecx], eax
mov eax, ebx
mov ecx, dword [esp + 0x1c]
sub eax, ecx
sub ebp, dword [esp + 0x10]
mov dword [edx + 4], eax
mov edx, dword [esp + 0x24]
mov dword [edx], ebp
push dword [esp + 0x72]
lea eax, [ebx + ecx]
mov dword [edx + 4], eax
mov eax, dword [esp + 0x40]
push esi
push dword [eax + 4]
push dword [eax]
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x24]
push eax
call fcn.1001b8f0
mov ecx, dword [esp + 0x4c]
add esp, 0x18
mov edx, dword [esp + 0x34]
add dword [esp + 0x40], edi
mov ebp, dword [ecx]
mov ebx, dword [ecx + 4]
sar ebp, 1
sar ebx, 1
mov eax, ebp
sub eax, dword [esp + 0x10]
mov dword [ecx], eax
mov eax, ebx
mov ecx, dword [esp + 0x1c]
sub eax, ecx
mov dword [edx + 4], eax
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x10]
add eax, ebp
mov dword [edx], eax
lea eax, [ebx + ecx]
mov ecx, dword [esp + 0x38]
mov ebx, dword [esp + 0x20]
mov dword [edx + 4], eax
lea eax, [edi*8]
add dword [esp + 0x24], eax
add ecx, eax
add dword [esp + 0x28], eax
add ebx, eax
add dword [esp + 0x2c], eax
add edx, eax
add dword [esp + 0x30], eax
add dword [esp + 0x34], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x38], ecx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x3c], edx
cmp dword [esp + 0x40], eax
jl 0x100317e0
mov edi, dword [esp + 0x54]
mov ebp, dword [esp + 0x7c]
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x5c]
add edx, dword [esp + 0x68]
inc ecx
add dword [esp + 0x44], 8
add dword [esp + 0x48], 8
add dword [esp + 0x4c], 8
add dword [esp + 0x50], 8
mov dword [esp + 0x58], ecx
mov dword [esp + 0x5c], edx
cmp ecx, dword [esp + 0x60]
jl 0x10031760
mov edx, dword [esp + 0x60]
cmp dword [esp + 0x18], 0
mov dword [esp + 0x58], 0
jle 0x10031b69
lea eax, [edx*8]
add eax, ebp
mov dword [esp + 0x68], eax
lea eax, [edi + edx*2]
lea eax, [eax*4]
add eax, ebp
mov dword [esp + 0x34], eax
lea eax, [edx + edi]
lea ecx, [eax*8]
lea eax, [edi + eax*2]
add ecx, ebp
lea eax, [eax*4]
mov dword [esp + 0x48], ecx
add eax, ebp
mov ebp, dword [esp + 0x68]
mov dword [esp + 0x44], eax
mov eax, dword [ecx]
mov dword [esp + 0x5c], eax
mov eax, dword [ecx + 4]
mov dword [esp + 0x60], eax
mov dword [esp + 0x50], 0x5a820000
mov eax, dword [esp + 0x50]
imul dword [esp + 0x60]
mov dword [esp + 0x50], edx
mov dword [esp + 0x4c], 0x5a820000
mov eax, dword [esp + 0x4c]
imul dword [esp + 0x5c]
mov dword [esp + 0x4c], edx
mov edi, dword [esp + 0x50]
sub edi, dword [esp + 0x4c]
mov dword [esp + 0x50], 0x5a820000
mov eax, dword [esp + 0x50]
imul dword [esp + 0x60]
mov dword [esp + 0x50], edx
mov dword [esp + 0x4c], 0x5a820000
mov eax, dword [esp + 0x4c]
imul dword [esp + 0x5c]
mov dword [esp + 0x4c], edx
mov edx, dword [ebp]
mov esi, dword [esp + 0x4c]
add esi, dword [esp + 0x50]
mov ecx, dword [ebp + 4]
sar edx, 1
sar ecx, 1
mov dword [esp + 0x50], 0x5a820000
lea eax, [edx + esi]
sub edx, esi
mov dword [ebp], eax
lea eax, [ecx + edi]
mov dword [ebp + 4], eax
sub ecx, edi
mov eax, dword [esp + 0x48]
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x44]
mov dword [eax], edx
mov eax, dword [ecx]
mov dword [esp + 0x5c], eax
mov eax, dword [ecx + 4]
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x50]
imul dword [esp + 0x60]
mov dword [esp + 0x50], edx
mov dword [esp + 0x4c], 0x5a820000
mov eax, dword [esp + 0x4c]
imul dword [esp + 0x5c]
mov dword [esp + 0x4c], edx
mov edi, dword [esp + 0x50]
sub edi, dword [esp + 0x4c]
mov dword [esp + 0x50], 0x5a820000
mov eax, dword [esp + 0x50]
imul dword [esp + 0x60]
mov dword [esp + 0x50], edx
mov dword [esp + 0x4c], 0x5a820000
mov eax, dword [esp + 0x4c]
imul dword [esp + 0x5c]
mov dword [esp + 0x4c], edx
mov eax, dword [esp + 0x34]
mov ebx, dword [esp + 0x34]
mov esi, dword [esp + 0x4c]
add esi, dword [esp + 0x50]
mov edx, dword [eax]
mov ecx, dword [eax + 4]
sar edx, 1
sar ecx, 1
lea eax, [edx + edi]
sub edx, edi
mov edi, dword [esp + 0x44]
mov dword [ebx], eax
mov eax, ecx
sub eax, esi
mov dword [ebx + 4], eax
lea eax, [ecx + esi]
mov ebx, dword [esp + 0x14]
mov ecx, dword [esp + 0x48]
mov dword [edi], edx
mov edx, dword [esp + 0x58]
mov dword [edi + 4], eax
add edx, ebx
lea eax, [ebx*8]
mov dword [esp + 0x58], edx
add dword [esp + 0x34], eax
add ecx, eax
add edi, eax
mov dword [esp + 0x48], ecx
add ebp, eax
mov dword [esp + 0x44], edi
cmp edx, dword [esp + 0x18]
jl 0x10031a06
jmp 0x10031b6d
mov ebx, dword [esp + 0x14]
mov ecx, dword [esp + 0x64]
mov ebp, dword [esp + 0x18]
inc ecx
mov eax, dword [esp + 0x6c]
rol ebx, 1
mov dword [esp + 0x64], ecx
mov dword [esp + 0x14], ebx
cmp ecx, dword [esp + 0x80]
jle 0x100315f0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x68
ret