Function at 0x409c00
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push esi
push edi
mov ecx, dword [esp + 0x1c]
cmp ecx, 0
je 0x409df9
call 0x409c19
pop ebp
lea eax, [0x498818]
cmp dword [esp + 0x28], 0
lea ebp, [ebp - 0x2399]
jne 0x409c3a
lea ebp, [ebp + 0x16c0]
pushfd
cld
cmp ecx, 0x200
jb 0x409f50
test ecx, 0xf
jne 0x409f50
bt dword [eax], 0x1c
jb 0x409f50
lea esi, [esp - 0x144]
and esi, 0xffffffc0
mov eax, ebp
lea ebx, [ebp + 0x900]
mov edx, esi
and eax, 0xfff
and ebx, 0xfff
and edx, 0xfff
cmp edx, ebx
jb 0x409c98
sub edx, ebx
sub esi, edx
jmp 0x409ca8
sub edx, eax
and edx, 0xfff
add edx, 0x180
sub esi, edx
lea edx, [esp + 0x18]
xchg esi, esp
add esp, 4
mov dword [esp + 0x18], ebp
mov dword [esp + 0x1c], esi
mov eax, dword [edx]
mov ebx, dword [edx + 4]
mov edi, dword [edx + 0xc]
mov esi, dword [edx + 0x10]
mov edx, dword [edx + 0x14]
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], esi
mov dword [esp + 0x13c], 0
mov ebx, edi
mov ecx, 0x3d
sub ebx, ebp
mov esi, edi
and ebx, 0xfff
lea edi, [esp + 0x4c]
cmp ebx, 0x900
jb 0x409d18
cmp ebx, 0xf0c
jb 0x409d20
nop
nop
mov dword [esp + 0x2c], edi
mov esi, esi
rep movsd dword es:[edi], dword [esi]
mov edi, 0x10
nop
nop
nop
mov eax, dword [ebp]
mov ebx, dword [ebp + 0x20]
mov ecx, dword [ebp + 0x40]
mov esi, dword [ebp + 0x60]
lea ebp, [ebp + 0x80]
sub edi, 1
jne 0x409d28
sub ebp, 0x800
mov esi, dword [esp + 0x20]
mov edi, dword [esp + 0x30]
cmp edx, 0
je 0x409e00
mov eax, dword [edi]
mov ebx, dword [edi + 4]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ecx, dword [edi + 8]
mov edx, dword [edi + 0xc]
xor eax, dword [esi]
xor ebx, dword [esi + 4]
xor ecx, dword [esi + 8]
xor edx, dword [esi + 0xc]
mov edi, dword [esp + 0x2c]
call fcn.00407630
mov esi, dword [esp + 0x20]
mov edi, dword [esp + 0x24]
mov dword [edi], eax
mov dword [edi + 4], ebx
mov dword [edi + 8], ecx
mov dword [edi + 0xc], edx
lea esi, [esi + 0x10]
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x20], esi
lea edx, [edi + 0x10]
mov dword [esp + 0x24], edx
sub ecx, 0x10
mov dword [esp + 0x28], ecx
jne 0x409d70
mov esi, dword [esp + 0x30]
mov ecx, dword [edi + 8]
mov edx, dword [edi + 0xc]
mov dword [esi], eax
mov dword [esi + 4], ebx
mov dword [esi + 8], ecx
mov dword [esi + 0xc], edx
cmp dword [esp + 0x13c], 0
mov edi, dword [esp + 0x2c]
je 0x409df4
mov ecx, 0x3c
xor eax, eax
mov esi, esi
rep stosd dword es:[edi], eax
mov esp, dword [esp + 0x1c]
popfd
pop edi
pop esi
pop ebx
pop ebp
ret
cmp esi, dword [esp + 0x24]
je 0x409ea0
mov dword [esp + 0x34], edi
nop
nop
mov eax, dword [esi]
mov ebx, dword [esi + 4]
mov ecx, dword [esi + 8]
mov edx, dword [esi + 0xc]
mov edi, dword [esp + 0x2c]
call fcn.00408ce0
mov edi, dword [esp + 0x34]
mov esi, dword [esp + 0x28]
xor eax, dword [edi]
xor ebx, dword [edi + 4]
xor ecx, dword [edi + 8]
xor edx, dword [edi + 0xc]
mov edi, dword [esp + 0x24]
mov esi, dword [esp + 0x20]
mov dword [edi], eax
mov dword [edi + 4], ebx
mov dword [edi + 8], ecx
mov dword [edi + 0xc], edx
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x34], esi
lea esi, [esi + 0x10]
mov dword [esp + 0x20], esi
lea edi, [edi + 0x10]
mov dword [esp + 0x24], edi
sub ecx, 0x10
mov dword [esp + 0x28], ecx
jne 0x409e10
mov edi, dword [esp + 0x34]
mov esi, dword [esp + 0x30]
mov eax, dword [edi]
mov ebx, dword [edi + 4]
mov ecx, dword [edi + 8]
mov edx, dword [edi + 0xc]
mov dword [esi], eax
mov dword [esi + 4], ebx
mov dword [esi + 8], ecx
mov dword [esi + 0xc], edx
jmp 0x409f24
mov eax, dword [esi]
mov ebx, dword [esi + 4]
mov ecx, dword [esi + 8]
mov edx, dword [esi + 0xc]
lea edi, [esp + 0x3c]
mov dword [edi], eax
mov dword [edi + 4], ebx
mov dword [edi + 8], ecx
mov dword [edi + 0xc], edx
mov edi, dword [esp + 0x2c]
call fcn.00408ce0
mov edi, dword [esp + 0x30]
mov esi, dword [esp + 0x24]
xor eax, dword [edi]
xor ebx, dword [edi + 4]
xor ecx, dword [edi + 8]
xor edx, dword [edi + 0xc]
mov dword [esi], eax
mov dword [esi + 4], ebx
mov dword [esi + 8], ecx
mov dword [esi + 0xc], edx
lea esi, [esi + 0x10]
mov dword [esp + 0x24], esi
lea esi, [esp + 0x3c]
mov eax, dword [esi]
mov ebx, dword [esi + 4]
mov ecx, dword [esi + 8]
mov edx, dword [esi + 0xc]
mov dword [edi], eax
mov dword [edi + 4], ebx
mov dword [edi + 8], ecx
mov dword [edi + 0xc], edx
mov esi, dword [esp + 0x20]
mov ecx, dword [esp + 0x28]
lea esi, [esi + 0x10]
mov dword [esp + 0x20], esi
sub ecx, 0x10
mov dword [esp + 0x28], ecx
jne 0x409ea0
nop
nop
nop
cmp dword [esp + 0x13c], 0
mov edi, dword [esp + 0x2c]
je 0x409f44
mov ecx, 0x3c
xor eax, eax
mov esi, esi
rep stosd dword es:[edi], eax
mov esp, dword [esp + 0x1c]
popfd
pop edi
pop esi
pop ebx
pop ebp
ret
mov eax, dword [eax]
mov edi, dword [esp + 0x24]
lea esi, [esp - 0x50]
and esi, 0xffffffc0
lea ebx, [edi - 0x8f]
sub ebx, esi
neg ebx
and ebx, 0x3c0
sub esi, ebx
lea ebx, [esi + 0x300]
sub ebx, ebp
and ebx, 0x300
lea ebp, [ebp + ebx + 0x880]
lea edx, [esp + 0x18]
xchg esi, esp
add esp, 4
mov dword [esp + 0x18], ebp
mov dword [esp + 0x1c], esi
mov dword [esp + 0x34], eax
mov eax, dword [edx]
mov ebx, dword [edx + 4]
mov esi, dword [edx + 0x10]
mov edx, dword [edx + 0x14]
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], esi
mov edi, esi
mov esi, eax
cmp edx, 0
je 0x40a130
cmp ecx, 0x10
mov edx, ebx
jb 0x40a0f0
bt dword [esp + 0x34], 0x19
jae 0x40a060
movq mm0, qword [edi]
movq mm4, qword [edi + 8]
nop
pxor mm0, qword [esi]
pxor mm4, qword [esi + 8]
mov edi, dword [esp + 0x2c]
call fcn.00407420
mov esi, dword [esp + 0x20]
mov edi, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
movq qword [edi], mm0
movq qword [edi + 8], mm4
lea esi, [esi + 0x10]
mov dword [esp + 0x20], esi
lea edx, [edi + 0x10]
mov dword [esp + 0x24], edx
sub ecx, 0x10
cmp ecx, 0x10
mov dword [esp + 0x28], ecx
jae 0x409ff0
test ecx, 0xf
jne 0x40a0f0
mov esi, dword [esp + 0x30]
movq qword [esi], mm0
movq qword [esi + 8], mm4
emms
mov esp, dword [esp + 0x1c]
popfd
pop edi
pop esi
pop ebx
pop ebp
ret
mov eax, dword [edi]
mov ebx, dword [edi + 4]
nop
nop
nop
mov ecx, dword [edi + 8]
mov edx, dword [edi + 0xc]
xor eax, dword [esi]
xor ebx, dword [esi + 4]
xor ecx, dword [esi + 8]
xor edx, dword [esi + 0xc]
mov edi, dword [esp + 0x2c]
call fcn.004070c0
mov esi, dword [esp + 0x20]
mov edi, dword [esp + 0x24]
mov dword [edi], eax
mov dword [edi + 4], ebx
mov dword [edi + 8], ecx
mov dword [edi + 0xc], edx
mov ecx, dword [esp + 0x28]
lea esi, [esi + 0x10]
mov dword [esp + 0x20], esi
lea edx, [edi + 0x10]
mov dword [esp + 0x24], edx
sub ecx, 0x10
cmp ecx, 0x10
mov dword [esp + 0x28], ecx
jae 0x40a068
test ecx, 0xf
jne 0x40a0f0
mov esi, dword [esp + 0x30]
mov ecx, dword [edi + 8]
mov edx, dword [edi + 0xc]
mov dword [esi], eax
mov dword [esi + 4], ebx
mov dword [esi + 8], ecx
mov dword [esi + 0xc], edx
mov esp, dword [esp + 0x1c]
popfd
pop edi
pop esi
pop ebx
pop ebp
ret
emms
mov edi, edx
mov ebx, 0x10
sub ebx, ecx
cmp edi, esi
je 0x40a10d
nop
mov esi, esi
rep movsb byte es:[edi], byte [esi]
jmp 0x40a110
lea edi, [edi + ecx]
mov ecx, ebx
xor eax, eax
mov esi, esi
rep stosb byte es:[edi], al
mov edi, dword [esp + 0x30]
mov esi, edx
mov eax, dword [edi]
mov ebx, dword [edi + 4]
mov dword [esp + 0x28], 0x10
jmp 0x40a068
bt dword [esp + 0x34], 0x19
jae 0x40a1e0
movq mm0, qword [esi]
movq mm4, qword [esi + 8]
mov edi, dword [esp + 0x2c]
call fcn.00408a10
mov esi, dword [esp + 0x20]
lea eax, [esp + 0x3c]
mov ebx, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov edi, dword [esp + 0x30]
movq mm1, qword [esi]
movq mm5, qword [esi + 8]
pxor mm0, qword [edi]
pxor mm4, qword [edi + 8]
movq qword [edi], mm1
movq qword [edi + 8], mm5
sub ecx, 0x10
jb 0x40a1b0
movq qword [ebx], mm0
movq qword [ebx + 8], mm4
lea ebx, [ebx + 0x10]
mov dword [esp + 0x24], ebx
lea esi, [esi + 0x10]
mov dword [esp + 0x20], esi
mov dword [esp + 0x28], ecx
jne 0x40a13c
emms
mov esp, dword [esp + 0x1c]
popfd
pop edi
pop esi
pop ebx
pop ebp
ret
movq qword [eax], mm0
movq qword [eax + 8], mm4
emms
add ecx, 0x10
mov edi, ebx
mov esi, eax
nop
mov esi, esi
rep movsb byte es:[edi], byte [esi]
mov esp, dword [esp + 0x1c]
popfd
pop edi
pop esi
pop ebx
pop ebp
ret
mov eax, dword [esi]
mov ebx, dword [esi + 4]
mov ecx, dword [esi + 8]
mov edx, dword [esi + 0xc]
lea edi, [esp + 0x3c]
mov dword [edi], eax
mov dword [edi + 4], ebx
mov dword [edi + 8], ecx
mov dword [edi + 0xc], edx
mov edi, dword [esp + 0x2c]
call fcn.00408580
mov edi, dword [esp + 0x30]
mov esi, dword [esp + 0x28]
xor eax, dword [edi]
xor ebx, dword [edi + 4]
xor ecx, dword [edi + 8]
xor edx, dword [edi + 0xc]
sub esi, 0x10
jb 0x40a280
mov dword [esp + 0x28], esi
mov esi, dword [esp + 0x24]
mov dword [esi], eax
mov dword [esi + 4], ebx
mov dword [esi + 8], ecx
mov dword [esi + 0xc], edx
lea esi, [esi + 0x10]
mov dword [esp + 0x24], esi
lea esi, [esp + 0x3c]
mov eax, dword [esi]
mov ebx, dword [esi + 4]
mov ecx, dword [esi + 8]
mov edx, dword [esi + 0xc]
mov dword [edi], eax
mov dword [edi + 4], ebx
mov dword [edi + 8], ecx
mov dword [edi + 0xc], edx
mov esi, dword [esp + 0x20]
lea esi, [esi + 0x10]
mov dword [esp + 0x20], esi
jne 0x40a1e0
mov esp, dword [esp + 0x1c]
popfd
pop edi
pop esi
pop ebx
pop ebp
ret
lea esi, [esp + 0x3c]
mov dword [esi], eax
mov dword [esi + 4], ebx
mov dword [esi + 8], ecx
mov dword [esi + 0xc], edx
mov esi, dword [esp + 0x20]
mov eax, dword [esi]
mov ebx, dword [esi + 4]
mov ecx, dword [esi + 8]
mov edx, dword [esi + 0xc]
mov dword [edi], eax
mov dword [edi + 4], ebx
mov dword [edi + 8], ecx
mov dword [edi + 0xc], edx
mov ecx, dword [esp + 0x28]
mov edi, dword [esp + 0x24]
lea esi, [esp + 0x3c]
nop
nop
nop
mov esi, esi
rep movsb byte es:[edi], byte [esi]
mov esp, dword [esp + 0x1c]
popfd
pop edi
pop esi
pop ebx
pop ebp
ret