Function at 0x4cfa60
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x168
mov eax, dword [0x5a6008]
xor eax, esp
mov dword [esp + 0x164], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x40], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x44], eax
push esi
mov esi, ecx
mov dword [esp + 0x40], 0x3f
push edi
mov edi, edx
mov dword [esp + 0x24], esi
mov dword [esp + 0x10], edi
mov edx, 1
mov eax, dword [esi + 0x5c]
mov ecx, dword [esi + 4]
mov dword [esp + 0x2c], eax
mov eax, dword [esi + 0x28]
mov dword [esp + 0x30], eax
mov eax, dword [esi + 0x24]
mov dword [esp + 8], eax
mov eax, edi
sub eax, ecx
mov dword [esp + 0x38], ecx
mov ecx, dword [esi + 0xb8]
mov dword [esp + 0xc], eax
mov edi, dword [esp + 0xc]
shl edx, cl
mov ecx, dword [esi + 0x10]
sub edi, edx
sub eax, ecx
cmp eax, edx
mov eax, edi
mov edi, dword [esp + 0x10]
cmovbe eax, ecx
cmp dword [esi + 0x18], 0
cmovne eax, ecx
mov ecx, 6
mov dword [esp + 0x3c], eax
mov eax, dword [esi + 0xc4]
cmp eax, ecx
cmovb ecx, eax
mov eax, dword [esi + 0x50]
mov dword [esp + 0x28], eax
mov eax, dword [esi + 0x54]
mov dword [esp + 0x54], eax
mov eax, 1
shl eax, cl
cmp dword [esi + 0xdc], 0
mov dword [esp + 0x40], eax
jne 0x4cfd2a
mov ecx, dword [esp + 0xc]
mov eax, dword [esi + 0x1c]
sub ecx, eax
mov edx, dword [esp + 8]
cmp ecx, 0x180
jbe 0x4cfc66
lea ecx, [eax + 0x60]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x34], ecx
cmp eax, ecx
jae 0x4cfbe9
mov edi, 0x18
sub edi, edx
mov edx, dword [esp + 0x38]
add edx, 8
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], edx
nop dword [eax + eax]
imul edx, dword [edx + eax], 0x9e3779b1
mov ecx, dword [esi + 0x54]
mov dword [esp + 0x54], ecx
mov ecx, edi
xor edx, dword [esi + 0x50]
shr edx, cl
mov ecx, eax
and ecx, 7
mov edi, dword [esi + ecx*4 + 0x2c]
mov dword [esi + ecx*4 + 0x2c], edx
mov ecx, 0
mov esi, dword [esp + 0x30]
mov dword [esp + 0x1c], edi
shr edi, 2
and edi, 0x3fffffc0
add esi, edi
movzx edx, byte [esi]
dec edx
and edx, 0x3f
cmove ecx, dword [esp + 0x44]
add edx, ecx
mov ecx, dword [esp + 0x1c]
mov byte [esi], dl
mov byte [edx + esi], cl
lea ecx, [edx + edi]
mov edx, dword [esp + 0x2c]
mov esi, dword [esp + 0x24]
mov edi, dword [esp + 0x14]
mov dword [edx + ecx*4], eax
inc eax
mov edx, dword [esp + 0x18]
cmp eax, dword [esp + 0x34]
jb 0x4cfb70
mov eax, dword [esi + 0x24]
mov edi, dword [esp + 0x10]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0xc]
inc edi
mov edx, dword [esp + 0x38]
add eax, 0xffffffe0
mov dword [esp + 0x34], eax
mov dword [esp + 0x18], eax
lea ecx, [edx + eax]
cmp ecx, edi
jbe 0x4cfc08
xor edi, edi
jmp 0x4cfc0d
sub edi, edx
sub edi, eax
inc edi
mov ecx, 8
cmp edi, ecx
cmova edi, ecx
add edi, eax
cmp eax, edi
jae 0x4cfc62
mov eax, 0x18
sub eax, dword [esp + 0x1c]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x18]
nop
imul edx, dword [eax + edx], 0x9e3779b1
mov ecx, dword [esi + 0x54]
mov dword [esp + 0x54], ecx
mov ecx, dword [esp + 0x14]
xor edx, dword [esi + 0x50]
shr edx, cl
mov ecx, eax
and ecx, 7
inc eax
mov dword [esi + ecx*4 + 0x2c], edx
mov edx, dword [esp + 0x38]
cmp eax, edi
jb 0x4cfc30
mov edx, dword [esi + 0x24]
mov eax, dword [esp + 0x34]
jmp 0x4cfc66
mov edx, dword [esp + 0x1c]
mov ecx, dword [esi + 0x5c]
mov edi, dword [esp + 0xc]
mov dword [esp + 0x50], ecx
mov ecx, dword [esi + 0x28]
mov dword [esp + 0x34], ecx
mov ecx, dword [esi + 4]
mov dword [esp + 0x18], ecx
cmp eax, edi
jae 0x4cfcf8
mov ecx, 0x18
sub ecx, edx
mov dword [esp + 0x14], ecx
nop
mov ecx, dword [esp + 0x18]
imul edx, dword [eax + ecx + 8], 0x9e3779b1
mov ecx, dword [esp + 0x14]
xor edx, dword [esi + 0x50]
shr edx, cl
mov ecx, eax
and ecx, 7
mov edi, dword [esi + ecx*4 + 0x2c]
mov dword [esi + ecx*4 + 0x2c], edx
mov ecx, 0
mov esi, dword [esp + 0x34]
mov dword [esp + 0x1c], edi
shr edi, 2
and edi, 0x3fffffc0
add esi, edi
movzx edx, byte [esi]
dec edx
and edx, 0x3f
cmove ecx, dword [esp + 0x44]
add edx, ecx
mov ecx, dword [esp + 0x1c]
mov byte [esi], dl
mov byte [edx + esi], cl
lea ecx, [edx + edi]
mov edx, dword [esp + 0x50]
mov edi, dword [esp + 0xc]
mov esi, dword [esp + 0x24]
mov dword [edx + ecx*4], eax
inc eax
cmp eax, edi
jb 0x4cfc90
mov eax, dword [esp + 0x10]
mov ecx, 0x18
sub ecx, dword [esp + 8]
mov dword [esi + 0x1c], edi
imul edx, dword [eax + 8], 0x9e3779b1
mov eax, edi
xor edx, dword [esp + 0x28]
shr edx, cl
and eax, 7
mov ecx, dword [esi + eax*4 + 0x2c]
mov dword [esi + eax*4 + 0x2c], edx
mov edx, ecx
mov dword [esp + 0x1c], ecx
jmp 0x4cfd4a
imul edx, dword [edi], 0x9e3779b1
mov ecx, 0x18
sub ecx, dword [esp + 8]
mov eax, dword [esp + 0xc]
mov dword [esi + 0x1c], eax
xor edx, dword [esp + 0x28]
shr edx, cl
mov dword [esp + 0x1c], edx
add dword [esi + 0x58], edx
mov eax, edx
mov ecx, dword [esp + 0x2c]
mov esi, dword [esp + 0x30]
shr eax, 2
and eax, 0x3fffffc0
mov dword [esp + 8], 0
add esi, eax
mov dword [esp + 0x14], esi
lea ecx, [ecx + eax*4]
movzx eax, byte [esi]
mov dword [esp + 0x2c], eax
movsx eax, dl
mov edx, esi
mov dword [esp + 0x28], ecx
xor ecx, ecx
movd xmm0, eax
punpcklbw xmm0, xmm0
punpcklwd xmm0, xmm0
pshufd xmm1, xmm0, 0
xorps xmm0, xmm0
movaps xmmword [esp + 0x50], xmm0
nop dword [eax + eax]
movups xmm0, xmmword [edx]
lea edx, [edx + 0x10]
pcmpeqb xmm0, xmm1
pmovmskb eax, xmm0
mov dword [esp + ecx*4 + 0x50], eax
inc ecx
cmp ecx, 4
jl 0x4cfda0
mov eax, dword [esp + 0x5c]
mov esi, dword [esp + 0x2c]
cdq
and esi, 0x3f
mov edi, eax
mov ecx, edx
mov eax, dword [esp + 0x58]
shld ecx, edi, 0x10
cdq
or ecx, edx
shl edi, 0x10
or edi, eax
mov eax, dword [esp + 0x54]
shld ecx, edi, 0x10
cdq
or ecx, edx
shl edi, 0x10
or edi, eax
mov eax, dword [esp + 0x50]
shld ecx, edi, 0x10
cdq
or ecx, edx
shl edi, 0x10
mov dword [esp + 0x30], ecx
or edi, eax
mov edx, dword [esp + 0x30]
mov ecx, esi
neg ecx
mov eax, edi
and ecx, 0x3f
call fcn.00511c00
mov dword [esp + 0x50], eax
mov ecx, esi
mov dword [esp + 0x18], edx
mov eax, edi
mov edx, dword [esp + 0x30]
call fcn.00511be0
mov esi, dword [esp + 0x50]
mov edi, dword [esp + 0x18]
or esi, eax
or edi, edx
ja 0x4cfe35
test esi, esi
je 0x4cfe83
cmp dword [esp + 0x40], 0
jbe 0x4cfe83
push edi
push esi
call fcn.004ce160
add eax, dword [esp + 0x34]
add esp, 8
and eax, 0x3f
je 0x4cfe6d
mov ecx, dword [esp + 0x28]
mov ecx, dword [ecx + eax*4]
cmp ecx, dword [esp + 0x3c]
jb 0x4cfe83
mov eax, dword [esp + 8]
mov dword [esp + eax*4 + 0x68], ecx
inc eax
dec dword [esp + 0x40]
mov dword [esp + 8], eax
mov ecx, esi
mov eax, edi
add ecx, 0xffffffff
adc eax, 0xffffffff
and esi, ecx
and edi, eax
ja 0x4cfe35
jb 0x4cfe83
test esi, esi
jne 0x4cfe35
mov edx, dword [esp + 0x14]
mov esi, 0x3f
mov eax, 0
movzx ecx, byte [edx]
dec ecx
and ecx, 0x3f
cmove eax, esi
mov esi, dword [esp + 0x28]
add ecx, eax
mov eax, dword [esp + 0x1c]
mov byte [edx], cl
mov byte [ecx + edx], al
mov edx, dword [esp + 0x24]
mov eax, dword [edx + 0x1c]
mov dword [esi + ecx*4], eax
inc dword [edx + 0x1c]
cmp dword [esp + 8], 0
jbe 0x4cff34
mov ecx, dword [esp + 0x10]
xor esi, esi
mov edi, 3
nop dword [eax]
mov edx, dword [esp + 0x38]
add edx, dword [esp + esi*4 + 0x68]
mov eax, dword [edx + edi - 3]
cmp eax, dword [edi + ecx - 3]
jne 0x4cff17
push dword [esp + 0x48]
call fcn.004ce1f0
mov ecx, eax
add esp, 4
cmp ecx, edi
jbe 0x4cff13
mov eax, dword [esp + 0xc]
mov edi, ecx
sub eax, dword [esp + esi*4 + 0x68]
mov edx, dword [esp + 0x4c]
add eax, 3
mov dword [edx], eax
mov eax, dword [esp + 0x10]
add eax, ecx
cmp eax, dword [esp + 0x48]
je 0x4cff1e
mov ecx, dword [esp + 0x10]
inc esi
cmp esi, dword [esp + 8]
jb 0x4cfed0
mov eax, edi
pop edi
pop esi
mov ecx, dword [esp + 0x164]
xor ecx, esp
call fcn.00511339
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x16c]
mov eax, 3
pop edi
pop esi
xor ecx, esp
call fcn.00511339
mov esp, ebp
pop ebp
ret