Function at 0x409b30
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push esi
push edi
mov ecx, dword [esp + 0x1c]
cmp ecx, 0
je 0x409d15
call 0x409b46
pop ebp
lea eax, [0x4a4a1c]
cmp dword [esp + 0x28], 0
lea ebp, [ebp - 0x2346]
jne 0x409b64
lea ebp, [ebp + 0x1680]
pushfd
cld
cmp ecx, 0x200
jb 0x409e60
test ecx, 0xf
jne 0x409e60
bt dword [eax], 0x1c
jb 0x409e60
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 0x409bc0
sub edx, ebx
sub esi, edx
jmp 0x409bd0
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 0x409c3c
cmp ebx, 0xf0c
jb 0x409c44
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 0x409c4c
sub ebp, 0x800
mov esi, dword [esp + 0x20]
mov edi, dword [esp + 0x30]
cmp edx, 0
je 0x409d20
mov eax, dword [edi]
mov ebx, dword [edi + 4]
nop
nop
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.004075a0
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 0x409c90
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 0x409d10
mov ecx, 0x3c
xor eax, eax
nop
nop
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 0x409db0
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.00408c40
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 0x409d30
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 0x409e30
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.00408c40
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 0x409db0
nop
nop
cmp dword [esp + 0x13c], 0
mov edi, dword [esp + 0x2c]
je 0x409e50
mov ecx, 0x3c
xor eax, eax
nop
nop
nop
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 0x40a040
cmp ecx, 0x10
mov edx, ebx
jb 0x40a000
bt dword [esp + 0x34], 0x19
jae 0x409f70
movq mm0, qword [edi]
movq mm4, qword [edi + 8]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
pxor mm0, qword [esi]
pxor mm4, qword [esi + 8]
mov edi, dword [esp + 0x2c]
call fcn.004073a0
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 0x409f00
test ecx, 0xf
jne 0x40a000
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.00407040
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 0x409f78
test ecx, 0xf
jne 0x40a000
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 0x40a01d
nop
mov esi, esi
rep movsb byte es:[edi], byte [esi]
jmp 0x40a020
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 0x409f78
bt dword [esp + 0x34], 0x19
jae 0x40a0e0
movq mm0, qword [esi]
movq mm4, qword [esi + 8]
mov edi, dword [esp + 0x2c]
call fcn.00408980
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 0x40a0c0
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 0x40a04c
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
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.004084f0
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 0x40a170
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 0x40a0e0
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