Function at 0x4cb470
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push esi
push edi
mov ecx, dword [esp + 0x1c]
cmp ecx, 0
je 0x4cb62d
call 0x4cb486
pop ebp
lea eax, [0x512704]
cmp dword [esp + 0x28], 0
lea ebp, [ebp - 0x2346]
jne 0x4cb4a0
lea ebp, [ebp + 0x1680]
pushfd
cld
cmp ecx, 0x200
jb 0x4cb780
test ecx, 0xf
jne 0x4cb780
bt dword [eax], 0x1c
jb 0x4cb780
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 0x4cb4f4
sub edx, ebx
sub esi, edx
jmp 0x4cb504
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 0x4cb568
cmp ebx, 0xf0c
jb 0x4cb570
nop
mov dword [esp + 0x2c], edi
mov esi, esi
rep movsd dword es:[edi], dword [esi]
mov edi, 0x10
lea ecx, [ecx]
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 0x4cb578
sub ebp, 0x800
mov esi, dword [esp + 0x20]
mov edi, dword [esp + 0x30]
cmp edx, 0
je 0x4cb640
mov eax, dword [edi]
mov ebx, dword [edi + 4]
add eax, 0
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.004c8ee0
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 0x4cb5b0
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 0x4cb628
mov ecx, 0x3c
xor eax, eax
mov edi, edi
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 0x4cb6d0
mov dword [esp + 0x34], edi
mov edi, edi
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.004ca580
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 0x4cb650
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 0x4cb74c
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.004ca580
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 0x4cb6d0
mov edi, edi
cmp dword [esp + 0x13c], 0
mov edi, dword [esp + 0x2c]
je 0x4cb768
mov ecx, 0x3c
xor eax, eax
lea ecx, [ecx]
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 0x4cb950
cmp ecx, 0x10
mov edx, ebx
jb 0x4cb910
bt dword [esp + 0x34], 0x19
jae 0x4cb890
movq mm0, qword [edi]
movq mm4, qword [edi + 8]
lea esp, [esp]
lea ebx, [ebx]
pxor mm0, qword [esi]
pxor mm4, qword [esi + 8]
mov edi, dword [esp + 0x2c]
call fcn.004c8ce0
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 0x4cb820
test ecx, 0xf
jne 0x4cb910
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]
lea ecx, [ecx]
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.004c8980
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 0x4cb898
test ecx, 0xf
jne 0x4cb910
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 0x4cb926
nop
mov esi, esi
rep movsb byte es:[edi], byte [esi]
jmp 0x4cb929
lea edi, [edi + ecx]
mov ecx, ebx
xor eax, eax
lea ecx, [ecx]
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 0x4cb898
bt dword [esp + 0x34], 0x19
jae 0x4cb9f0
movq mm0, qword [esi]
movq mm4, qword [esi + 8]
mov edi, dword [esp + 0x2c]
call fcn.004ca2c0
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 0x4cb9d0
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 0x4cb95c
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.004c9e30
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 0x4cba80
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 0x4cb9f0
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]
lea ecx, [ecx]
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