Function at 0x4d7c30
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x160
mov eax, dword [0x5b0008]
xor eax, esp
mov dword [esp + 0x15c], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x4c], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x54], eax
push esi
push edi
mov edi, ecx
mov dword [esp + 0x4c], 0xf
mov esi, edx
mov dword [esp + 0x58], edi
mov dword [esp + 0x1c], esi
mov edx, 1
mov eax, dword [edi + 0x5c]
mov ecx, dword [edi + 4]
mov dword [esp + 0x2c], eax
mov eax, dword [edi + 0x28]
mov dword [esp + 0x30], eax
mov eax, dword [edi + 0x24]
mov dword [esp + 0x10], eax
mov eax, esi
sub eax, ecx
mov dword [esp + 0x28], ecx
mov ecx, dword [edi + 0xb8]
mov dword [esp + 8], eax
mov esi, dword [esp + 8]
shl edx, cl
mov ecx, dword [edi + 0x10]
sub esi, edx
sub eax, ecx
cmp eax, edx
mov eax, esi
mov esi, dword [esp + 0x1c]
cmovbe eax, ecx
cmp dword [edi + 0x18], 0
cmovne eax, ecx
mov ecx, 4
mov dword [esp + 0x34], eax
mov eax, dword [edi + 0xc4]
cmp eax, ecx
cmovb ecx, eax
mov eax, dword [edi + 0x50]
mov dword [esp + 0x50], eax
mov eax, 1
shl eax, cl
cmp dword [edi + 0xdc], 0
mov dword [esp + 0x38], eax
mov eax, dword [esp + 8]
jne 0x4d7f00
mov esi, dword [edi + 0x1c]
sub eax, esi
mov edx, dword [esp + 0x10]
mov ecx, edx
mov dword [esp + 0x18], esi
cmp eax, 0x180
jbe 0x4d7e35
lea eax, [esi + 0x60]
mov dword [esp + 0x20], edx
mov dword [esp + 0xc], eax
cmp esi, eax
jae 0x4d7db0
mov ecx, 0x18
sub ecx, edx
mov edx, dword [esp + 0x28]
add edx, 8
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x14], edx
nop word [eax + eax]
imul edx, dword [edx + esi], 0x9e3779b1
mov eax, 0
and esi, 7
xor edx, dword [edi + 0x50]
shr edx, cl
mov ecx, dword [edi + esi*4 + 0x2c]
mov dword [edi + esi*4 + 0x2c], edx
mov esi, ecx
mov edx, dword [esp + 0x30]
shr esi, 4
and esi, 0xffffff0
mov dword [esp + 0x20], ecx
add edx, esi
movzx ecx, byte [edx]
dec ecx
and ecx, 0xf
cmove eax, dword [esp + 0x4c]
add ecx, eax
mov eax, dword [esp + 0x20]
mov byte [edx], cl
mov byte [ecx + edx], al
lea eax, [ecx + esi]
mov ecx, dword [esp + 0x2c]
mov esi, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
mov dword [ecx + eax*4], esi
inc esi
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x18], esi
cmp esi, dword [esp + 0xc]
jb 0x4d7d40
mov eax, dword [edi + 0x24]
mov dword [esp + 0x20], eax
mov esi, dword [esp + 8]
mov ecx, dword [esp + 0x1c]
add esi, 0xffffffe0
mov eax, dword [esp + 0x28]
inc ecx
add eax, esi
mov dword [esp + 0x18], esi
mov edx, esi
mov dword [esp + 0xc], edx
cmp eax, ecx
jbe 0x4d7dd4
xor ecx, ecx
jmp 0x4d7ddb
sub ecx, dword [esp + 0x28]
sub ecx, esi
inc ecx
mov eax, 8
cmp ecx, eax
cmova ecx, eax
add ecx, esi
mov dword [esp + 0x14], ecx
cmp esi, ecx
jae 0x4d7e31
mov esi, dword [esp + 0x14]
mov ecx, 0x18
sub ecx, dword [esp + 0x20]
nop dword [eax]
mov eax, dword [esp + 0x28]
imul edx, dword [edx + eax], 0x9e3779b1
mov eax, dword [esp + 0xc]
and eax, 7
xor edx, dword [edi + 0x50]
shr edx, cl
mov dword [edi + eax*4 + 0x2c], edx
mov edx, dword [esp + 0xc]
inc edx
mov dword [esp + 0xc], edx
cmp edx, esi
jb 0x4d7e00
mov ecx, dword [edi + 0x24]
mov esi, dword [esp + 0x18]
jmp 0x4d7e35
mov ecx, dword [esp + 0x20]
mov eax, dword [edi + 0x5c]
mov edx, dword [edi + 4]
mov dword [esp + 0xc], eax
mov eax, dword [edi + 0x28]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], edx
cmp esi, dword [esp + 8]
jae 0x4d7eca
mov eax, 0x18
sub eax, ecx
mov dword [esp + 0x14], eax
nop dword [eax + eax]
imul edx, dword [esi + edx + 8], 0x9e3779b1
mov eax, 0
mov ecx, dword [esp + 0x14]
and esi, 7
xor edx, dword [edi + 0x50]
shr edx, cl
mov ecx, dword [edi + esi*4 + 0x2c]
mov dword [edi + esi*4 + 0x2c], edx
mov esi, ecx
mov edx, dword [esp + 0x3c]
shr esi, 4
and esi, 0xffffff0
mov dword [esp + 0x20], ecx
add edx, esi
movzx ecx, byte [edx]
dec ecx
and ecx, 0xf
cmove eax, dword [esp + 0x4c]
add ecx, eax
mov eax, dword [esp + 0x20]
mov byte [edx], cl
mov byte [ecx + edx], al
lea eax, [ecx + esi]
mov ecx, dword [esp + 0xc]
mov esi, dword [esp + 0x18]
mov edx, dword [esp + 0x40]
mov dword [ecx + eax*4], esi
inc esi
mov dword [esp + 0x18], esi
cmp esi, dword [esp + 8]
jb 0x4d7e60
mov eax, dword [esp + 0x1c]
mov ecx, 0x18
mov esi, dword [esp + 8]
sub ecx, dword [esp + 0x10]
mov dword [edi + 0x1c], esi
imul edx, dword [eax + 8], 0x9e3779b1
mov eax, esi
xor edx, dword [esp + 0x50]
shr edx, cl
and eax, 7
mov ecx, dword [edi + eax*4 + 0x2c]
mov dword [edi + eax*4 + 0x2c], edx
mov edx, ecx
mov dword [esp + 0x10], ecx
jmp 0x4d7f1c
imul edx, dword [esi], 0x9e3779b1
mov ecx, 0x18
sub ecx, dword [esp + 0x10]
mov dword [edi + 0x1c], eax
xor edx, dword [esp + 0x50]
shr edx, cl
mov dword [esp + 0x10], edx
mov ecx, dword [esp + 0x2c]
mov eax, edx
add dword [edi + 0x58], edx
shr eax, 4
and eax, 0xffffff0
mov dword [esp + 0x20], 0
lea ecx, [ecx + eax*4]
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x30]
add ecx, eax
movsx eax, dl
mov dword [esp + 0x14], ecx
movzx esi, byte [ecx]
movd xmm0, eax
and esi, 0xf
punpcklbw xmm0, xmm0
punpcklwd xmm0, xmm0
pshufd xmm1, xmm0, 0
movups xmm0, xmmword [ecx]
mov ecx, esi
mov dword [esp + 0x40], esi
neg ecx
pcmpeqb xmm0, xmm1
and ecx, 0xf
pmovmskb edx, xmm0
mov ax, dx
shl ax, cl
mov cx, si
shr dx, cl
or ax, dx
movzx eax, ax
cdq
mov dword [esp + 0x30], edx
mov esi, eax
test edx, edx
jne 0x4d7f97
test esi, esi
je 0x4d7ff6
xor edi, edi
nop dword [eax]
cmp dword [esp + 0x38], 0
jbe 0x4d7fee
push edx
push esi
call fcn.004d6c70
add eax, dword [esp + 0x48]
add esp, 8
and eax, 0xf
je 0x4d7fd0
mov ecx, dword [esp + 0x2c]
mov eax, dword [ecx + eax*4]
cmp eax, dword [esp + 0x34]
jb 0x4d7fee
mov dword [esp + edi*4 + 0x60], eax
inc edi
dec dword [esp + 0x38]
mov edx, dword [esp + 0x30]
mov ecx, esi
add ecx, 0xffffffff
mov eax, edx
adc eax, 0xffffffff
and esi, ecx
and edx, eax
mov dword [esp + 0x30], edx
ja 0x4d7fa0
jb 0x4d7fee
test esi, esi
jne 0x4d7fa0
mov dword [esp + 0x20], edi
mov edi, dword [esp + 0x58]
mov edx, dword [esp + 0x14]
mov eax, 0
mov esi, 0xf
movzx ecx, byte [edx]
dec ecx
and ecx, 0xf
cmove eax, esi
add ecx, eax
mov eax, dword [esp + 0x10]
mov byte [edx], cl
mov byte [ecx + edx], al
mov edx, dword [esp + 0x2c]
mov eax, dword [edi + 0x1c]
mov dword [edx + ecx*4], eax
inc dword [edi + 0x1c]
cmp dword [esp + 0x20], 0
jbe 0x4d80a4
mov ecx, dword [esp + 0x1c]
xor esi, esi
mov edi, 3
nop dword [eax + eax]
mov edx, dword [esp + 0x28]
add edx, dword [esp + esi*4 + 0x60]
mov eax, dword [edx + edi - 3]
cmp eax, dword [edi + ecx - 3]
jne 0x4d8087
push dword [esp + 0x54]
call fcn.004d6d00
add esp, 4
cmp eax, edi
jbe 0x4d8083
mov ecx, dword [esp + 8]
mov edi, eax
sub ecx, dword [esp + esi*4 + 0x60]
mov edx, dword [esp + 0x5c]
add ecx, 3
mov dword [edx], ecx
mov ecx, dword [esp + 0x1c]
add eax, ecx
cmp eax, dword [esp + 0x54]
je 0x4d808e
jmp 0x4d8087
mov ecx, dword [esp + 0x1c]
inc esi
cmp esi, dword [esp + 0x20]
jb 0x4d8040
mov eax, edi
pop edi
pop esi
mov ecx, dword [esp + 0x15c]
xor ecx, esp
call fcn.00519459
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x164]
mov eax, 3
pop edi
pop esi
xor ecx, esp
call fcn.00519459
mov esp, ebp
pop ebp
ret