Function at 0x40a960
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x74
mov eax, dword [esp + 0x94]
mov ebx, dword [esp + 0x8c]
mov esi, dword [esp + 0x88]
mov edi, dword [esi]
mov ecx, dword [esi + 8]
cmp ebx, edi
mov dword [esp + 0x50], edi
cmovg edi, ebx
cmp eax, ecx
mov dword [esp + 0x4c], ecx
cmovg ecx, eax
mov edx, dword [esp + 0x90]
mov eax, dword [esi + 4]
cmp edx, eax
mov dword [esp + 0x48], eax
cmovl eax, edx
mov edx, dword [esp + 0x98]
mov ebp, dword [esi + 0xc]
cmp edx, ebp
mov dword [esp + 0x44], ebp
cmovl ebp, edx
mov dword [esi], edi
mov dword [esi + 4], eax
mov dword [esi + 8], ecx
mov dword [esi + 0xc], ebp
cmp eax, edi
jle 0x40b07e
cmp ebp, ecx
jle 0x40b07e
mov eax, dword [esp + 0xa0]
mov esi, dword [esp + 0x9c]
cmp eax, 0xffffffff
jne 0x40aa00
test esi, esi
je 0x40a9fe
mov ecx, 0xffffffff
lea eax, [ecx + 1]
cmp byte [esi + ecx + 1], 0
mov ecx, eax
jne 0x40a9f0
jmp 0x40aa00
xor eax, eax
mov dword [esp + 0x20], eax
mov eax, dword [0x43d3c4]
mov ecx, dword [eax]
mov dword [esp + 0x58], eax
mov eax, dword [eax + 4]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x20]
mov ebp, ecx
imul ecx, eax
mov edi, dword [esp + 0x90]
cmp dword [esp + 0xa8], 3
jne 0x40aa3f
add edi, ebx
sub edi, ecx
mov ebx, edi
shr ebx, 0x1f
add ebx, edi
sar ebx, 1
jmp 0x40aa4c
sub edi, ecx
cmp dword [esp + 0xa8], 2
cmove ebx, edi
add edx, dword [esp + 0x94]
sub edx, dword [esp + 0x10]
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
mov edx, dword [esp + 0xac]
test edx, edx
je 0x40af38
mov eax, dword [edx]
mov edi, dword [edx + 4]
cmp eax, edi
mov edx, edi
cmovg edx, eax
mov dword [esp + 0x30], edx
cmovl edi, eax
mov dword [esp + 0x38], edi
mov eax, dword [esp + 0x20]
sar ecx, 1
test eax, eax
mov dword [esp + 0xc], ecx
jle 0x40af56
mov eax, dword [esp + 0x10]
add eax, ecx
mov dword [esp + 0x34], eax
lea eax, [ecx + 0x10]
mov dword [esp + 0x54], eax
xor eax, eax
movdqa xmm0, xmmword [0x42d5e0]
xor ecx, ecx
jmp 0x40aad4
mov esi, dword [esp + 0x3c]
inc esi
mov ecx, dword [esp + 0x40]
inc ecx
cmp ecx, dword [esp + 0x20]
je 0x40af20
mov dword [esp + 0x5c], eax
mov dword [esp + 0x14], ebx
mov dword [esp + 0x3c], esi
movsx eax, byte [esi]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0xa4]
cmp ecx, dword [esp + 0x38]
mov dword [esp + 0x40], ecx
jl 0x40ac2a
cmp ecx, dword [esp + 0x30]
jge 0x40ac2a
mov esi, dword [esp + 0x14]
add ebp, esi
mov edx, dword [esp + 0x88]
mov ebx, ebp
mov edi, dword [edx]
mov ecx, dword [edx + 4]
cmp edi, esi
cmovle edi, esi
mov eax, dword [edx + 8]
mov esi, dword [esp + 0xc]
cmp eax, esi
cmovle eax, esi
cmp ecx, ebp
cmovl ebx, ecx
mov edx, dword [edx + 0xc]
mov ecx, dword [esp + 0x34]
cmp edx, ecx
cmovge edx, ecx
mov dword [esp + 8], edx
sub ebx, edi
mov dword [esp], ebx
jle 0x40ac20
cmp dword [esp + 8], eax
jle 0x40ac20
mov ecx, dword [esp + 0xac]
mov esi, dword [ecx + 0xc]
mov ecx, dword [esp + 0x88]
mov ecx, dword [ecx + 0x10]
lea edx, [ecx + edi*4]
mov dword [esp + 4], edx
mov edx, dword [esp]
mov ebx, edx
and ebx, 0xfffffff8
and edx, 7
mov dword [esp + 0x1c], edx
lea edx, [ebx*4]
mov dword [esp + 0x18], edx
movd xmm1, esi
pshufd xmm1, xmm1, 0
lea ecx, [ecx + edi*4]
add ecx, 0x10
mov dword [esp + 0x2c], ecx
lea ebp, [eax*4]
jmp 0x40abba
inc eax
add ebp, 4
cmp eax, dword [esp + 8]
je 0x40ac20
mov ecx, dword [esp + 0x88]
mov ecx, dword [ecx + 0x14]
mov edx, ecx
imul edx, eax
mov edi, dword [esp + 4]
lea edi, [edi + edx*4]
mov edx, dword [esp]
cmp edx, 8
jae 0x40abe0
mov ecx, edx
jmp 0x40ac0b
add edi, dword [esp + 0x18]
imul ecx, ebp
add ecx, dword [esp + 0x2c]
xor edx, edx
nop dword [eax]
movdqu xmmword [ecx + edx*4 - 0x10], xmm1
movdqu xmmword [ecx + edx*4], xmm1
add edx, 8
cmp ebx, edx
jne 0x40abf0
mov ecx, dword [esp + 0x1c]
cmp dword [esp], ebx
je 0x40abb0
xor edx, edx
nop dword [eax]
mov dword [edi + edx*4], esi
inc edx
cmp ecx, edx
jne 0x40ac10
jmp 0x40abb0
mov eax, dword [esp + 0xac]
mov eax, dword [eax + 8]
mov dword [esp], eax
cmp byte [esp + 0x28], 9
je 0x40ada0
mov ebx, dword [esp + 0x28]
mov esi, ebx
shl esi, 4
mov edx, dword [esp + 0x14]
lea edi, [edx + 8]
mov ecx, dword [esp + 0x88]
mov eax, dword [ecx]
cmp eax, edx
cmovle eax, edx
mov dword [esp + 0x24], eax
mov ebp, dword [ecx + 8]
mov eax, dword [esp + 0xc]
cmp ebp, eax
cmovle ebp, eax
mov eax, dword [ecx + 4]
cmp eax, edi
cmovl edi, eax
mov dword [esp + 4], edi
mov ecx, dword [ecx + 0xc]
mov eax, dword [esp + 0x54]
cmp ecx, eax
cmovge ecx, eax
test bl, bl
mov eax, 0x3f0
cmovs esi, eax
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], ecx
cmp ebp, ecx
jge 0x40ada0
mov eax, dword [esp + 4]
sub eax, dword [esp + 0x24]
mov dword [esp + 0x2c], eax
jle 0x40ada0
mov ecx, dword [esp + 0x24]
lea edx, [ecx*4]
mov eax, dword [esp + 0x88]
add edx, dword [eax + 0x10]
mov dword [esp + 0x70], edx
lea esi, [ecx + 1]
mov eax, dword [esp + 0x14]
sub ecx, eax
mov edx, 1
shl edx, cl
mov dword [esp + 0x68], edx
mov ecx, 1
sub ecx, eax
mov dword [esp + 0x64], ecx
neg eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x6c], esi
jmp 0x40ad03
mov ebp, dword [esp + 8]
inc ebp
cmp ebp, dword [esp + 0x18]
mov esi, dword [esp + 0x6c]
je 0x40ada0
mov eax, dword [esp + 0x88]
mov eax, dword [eax + 0x14]
imul eax, ebp
mov edx, ebp
sub edx, dword [esp + 0xc]
mov ecx, dword [esp + 0x70]
lea ecx, [ecx + eax*4]
mov eax, dword [esp + 0x1c]
movzx edi, byte [eax + edx + 0x42e1c0]
test byte [esp + 0x2c], 1
mov dword [esp + 8], ebp
jne 0x40ad40
mov eax, dword [esp + 0x24]
cmp dword [esp + 4], esi
je 0x40acf0
jmp 0x40ad56
test dword [esp + 0x68], edi
je 0x40ad4b
mov eax, dword [esp]
mov dword [ecx], eax
add ecx, 4
mov eax, esi
cmp dword [esp + 4], esi
je 0x40acf0
mov edx, dword [esp + 4]
sub edx, eax
mov esi, dword [esp + 0x64]
lea ebp, [esi + eax]
add eax, dword [esp + 0x60]
xor esi, esi
jmp 0x40ad7b
add esi, 2
cmp edx, esi
je 0x40acf0
lea ebx, [eax + esi]
bt edi, ebx
jae 0x40ad89
mov ebx, dword [esp]
mov dword [ecx + esi*4], ebx
lea ebx, [esi + ebp]
bt edi, ebx
jae 0x40ad70
mov ebx, dword [esp]
mov dword [ecx + esi*4 + 4], ebx
jmp 0x40ad70
cmp dword [esp + 0xac], 0
je 0x40aed0
mov eax, dword [esp + 0xac]
mov ecx, dword [esp + 0x40]
cmp dword [eax], ecx
jne 0x40aed0
mov edi, dword [esp + 0x14]
lea eax, [edi + 1]
mov esi, dword [esp + 0x88]
mov ebx, dword [esi]
mov edx, dword [esi + 4]
cmp ebx, edi
cmovle ebx, edi
mov ecx, dword [esi + 8]
mov edi, dword [esp + 0xc]
cmp ecx, edi
cmovle ecx, edi
cmp edx, eax
cmovl eax, edx
mov esi, dword [esi + 0xc]
mov edx, dword [esp + 0x34]
cmp esi, edx
cmovge esi, edx
mov dword [esp], esi
sub eax, ebx
jle 0x40aed0
cmp dword [esp], ecx
jle 0x40aed0
mov edx, dword [esp + 0x88]
mov edx, dword [edx + 0x10]
lea esi, [edx + ebx*4]
mov dword [esp + 8], esi
mov edi, eax
and edi, 0xfffffff8
mov esi, eax
and esi, 7
mov dword [esp + 4], esi
lea esi, [edi*4]
mov dword [esp + 0x1c], esi
lea edx, [edx + ebx*4]
add edx, 0x10
mov dword [esp + 0x18], edx
lea ebp, [ecx*4]
jmp 0x40ae59
inc ecx
add ebp, 4
cmp ecx, dword [esp]
je 0x40aed0
mov edx, dword [esp + 0x88]
mov esi, dword [edx + 0x14]
mov edx, esi
imul edx, ecx
mov ebx, dword [esp + 8]
lea ebx, [ebx + edx*4]
cmp eax, 8
jae 0x40ae80
mov esi, eax
jmp 0x40aebd
add ebx, dword [esp + 0x1c]
imul esi, ebp
add esi, dword [esp + 0x18]
xor edx, edx
nop dword [eax]
movdqu xmm1, xmmword [esi + edx*4 - 0x10]
movdqu xmm2, xmmword [esi + edx*4]
pxor xmm1, xmm0
pxor xmm2, xmm0
movdqu xmmword [esi + edx*4 - 0x10], xmm1
movdqu xmmword [esi + edx*4], xmm2
add edx, 8
cmp edi, edx
jne 0x40ae90
mov esi, dword [esp + 4]
cmp eax, edi
je 0x40ae50
xor edx, edx
nop
xor dword [ebx + edx*4], 0xffffff
inc edx
cmp esi, edx
jne 0x40aec0
jmp 0x40ae50
mov eax, dword [esp + 0x58]
mov ecx, dword [eax]
mov eax, dword [esp + 0x14]
mov ebp, ecx
lea ebx, [ecx + eax]
mov edx, dword [esp + 0x5c]
lea eax, [edx + 1]
cmp byte [esp + 0x28], 9
jne 0x40aac0
mov ecx, eax
and ecx, 3
mov esi, dword [esp + 0x3c]
je 0x40aac4
mov eax, 2
sub eax, edx
and eax, 3
lea ecx, [eax + 2]
imul ecx, ebp
mov ebx, dword [esp + 0x14]
add ebx, ecx
add eax, edx
add eax, 2
jmp 0x40aac4
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0xac]
test ecx, ecx
mov edi, dword [esp + 0xc]
jne 0x40af6b
jmp 0x40b07e
mov dword [esp + 0x30], 0xffffffff
mov dword [esp + 0x38], 0xffffffff
sar ecx, 1
test eax, eax
mov dword [esp + 0xc], ecx
jg 0x40aa96
xor eax, eax
mov ecx, dword [esp + 0xac]
test ecx, ecx
mov edi, dword [esp + 0xc]
je 0x40b07e
cmp dword [ecx], eax
jne 0x40b07e
lea eax, [ebx + 1]
mov esi, dword [esp + 0x10]
add esi, edi
mov edx, dword [esp + 0x88]
mov ecx, dword [edx]
cmp ecx, ebx
cmovg ebx, ecx
mov ecx, dword [edx + 8]
cmp ecx, edi
cmovg edi, ecx
mov ecx, dword [edx + 4]
cmp ecx, eax
cmovl eax, ecx
mov ecx, dword [edx + 0xc]
cmp ecx, esi
cmovl esi, ecx
mov dword [esp + 0x10], esi
sub eax, ebx
jle 0x40b07e
cmp dword [esp + 0x10], edi
jle 0x40b07e
mov ecx, dword [esp + 0x88]
mov esi, dword [ecx + 0x10]
lea ecx, [esi + ebx*4]
mov dword [esp], ecx
mov edx, eax
and edx, 0xfffffff8
mov ecx, eax
and ecx, 7
mov dword [esp + 8], ecx
lea ecx, [edx*4]
mov dword [esp + 4], ecx
lea ecx, [esi + ebx*4]
add ecx, 0x10
mov dword [esp + 0xc], ecx
lea ebp, [edi*4]
movdqa xmm0, xmmword [0x42d5e0]
jmp 0x40b00c
mov edi, ecx
inc edi
add ebp, 4
cmp edi, dword [esp + 0x10]
je 0x40b07e
mov esi, dword [esp + 0x88]
mov ebx, dword [esi + 0x14]
mov esi, ebx
mov ecx, edi
imul esi, edi
mov edi, dword [esp]
lea edi, [edi + esi*4]
cmp eax, 8
jae 0x40b030
mov ebx, eax
jmp 0x40b06d
add edi, dword [esp + 4]
imul ebx, ebp
add ebx, dword [esp + 0xc]
xor esi, esi
nop dword [eax]
movdqu xmm1, xmmword [ebx + esi*4 - 0x10]
movdqu xmm2, xmmword [ebx + esi*4]
pxor xmm1, xmm0
pxor xmm2, xmm0
movdqu xmmword [ebx + esi*4 - 0x10], xmm1
movdqu xmmword [ebx + esi*4], xmm2
add esi, 8
cmp edx, esi
jne 0x40b040
mov ebx, dword [esp + 8]
cmp eax, edx
je 0x40b000
xor esi, esi
nop
xor dword [edi + esi*4], 0xffffff
inc esi
cmp ebx, esi
jne 0x40b070
jmp 0x40b000
mov eax, dword [esp + 0x88]
mov ecx, dword [esp + 0x50]
mov dword [eax], ecx
mov ecx, dword [esp + 0x48]
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x4c]
mov dword [eax + 8], ecx
mov ecx, dword [esp + 0x44]
mov dword [eax + 0xc], ecx
add esp, 0x74
pop esi
pop edi
pop ebx
pop ebp
ret