Function at 0x4d5400
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x180
mov eax, dword [0x5a6008]
xor eax, esp
mov dword [esp + 0x17c], eax
push esi
push edi
mov eax, edx
mov dword [esp + 0x20], eax
mov esi, ecx
mov dword [esp + 0x28], esi
mov dword [esp + 0x48], 3
mov ecx, dword [ebp + 8]
mov dword [esp + 0x34], ecx
mov ecx, dword [ebp + 0xc]
mov edx, dword [esi + 0xc]
mov dword [esp + 0x6c], ecx
mov ecx, dword [esi + 0x5c]
mov dword [esp + 0x3c], ecx
mov ecx, dword [esi + 0x28]
mov dword [esp + 0x1c], ecx
mov ecx, dword [esi + 0x24]
mov dword [esp + 0xc], ecx
mov ecx, dword [esi + 4]
mov edi, eax
mov dword [esp + 0x50], edx
add edx, ecx
mov dword [esp + 0x14], ecx
sub edi, ecx
mov dword [esp + 0x7c], edx
mov ecx, dword [esi + 0xb8]
mov eax, edi
mov dword [esp + 0x10], edi
mov edx, 1
shl edx, cl
mov ecx, dword [esi + 0x10]
sub edi, edx
sub eax, ecx
cmp eax, edx
mov dword [esp + 0x24], 0xf
mov eax, dword [esi + 0xc4]
cmovbe edi, ecx
cmp dword [esi + 0x18], 0
cmovne edi, ecx
mov ecx, 4
cmp eax, ecx
mov dword [esp + 0x44], edi
cmovb ecx, eax
mov eax, dword [esi + 0x50]
mov dword [esp + 0x38], eax
mov eax, 1
shl eax, cl
mov ecx, 0x18
mov dword [esp + 0x4c], eax
mov eax, dword [esi + 0xb4]
mov dword [esp + 0x40], eax
mov edi, dword [esp + 0x40]
mov esi, dword [eax + 0x5c]
mov edx, dword [eax + 0x28]
mov eax, dword [esp + 0x20]
sub ecx, dword [edi + 0x24]
mov edi, 3
imul eax, dword [eax], 0x9e3779b1
mov dword [esp + 8], eax
shr eax, cl
mov dword [esp + 0x58], eax
shr eax, 4
and eax, 0xffffff0
lea ecx, [eax + edx]
lea eax, [esi + eax*4]
mov dword [esp + 0x54], ecx
mov esi, dword [esp + 0x28]
mov dword [esp + 0x70], eax
cmp dword [esi + 0xdc], 0
jne 0x4d5735
mov edx, dword [esp + 0x10]
mov ecx, edx
mov eax, dword [esi + 0x1c]
sub ecx, eax
mov edi, dword [esp + 0xc]
cmp ecx, 0x180
jbe 0x4d5669
lea edx, [eax + 0x60]
mov dword [esp + 0x18], edi
mov dword [esp + 0x5c], edx
mov dword [esp + 8], edi
cmp eax, edx
jae 0x4d55e2
mov edx, dword [esp + 0x14]
mov edi, 0x18
sub edi, dword [esp + 0xc]
add edx, 8
mov dword [esp + 0x18], edi
mov dword [esp + 8], edx
nop word [eax + eax]
imul edx, dword [edx + eax], 0x9e3779b1
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 + 0x1c]
mov dword [esp + 0x2c], edi
shr edi, 4
and edi, 0xffffff0
add esi, edi
movzx edx, byte [esi]
dec edx
and edx, 0xf
cmove ecx, dword [esp + 0x24]
add edx, ecx
mov ecx, dword [esp + 0x2c]
mov byte [esi], dl
mov byte [edx + esi], cl
lea ecx, [edx + edi]
mov edx, dword [esp + 0x3c]
mov esi, dword [esp + 0x28]
mov edi, dword [esp + 0x18]
mov dword [edx + ecx*4], eax
inc eax
mov edx, dword [esp + 8]
cmp eax, dword [esp + 0x5c]
jb 0x4d5570
mov eax, dword [esi + 0x24]
mov dword [esp + 8], eax
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x20]
add eax, 0xffffffe0
mov ecx, dword [esp + 0x14]
inc edx
add ecx, eax
mov dword [esp + 0x64], eax
mov edi, eax
cmp ecx, edx
jbe 0x4d5602
xor edx, edx
jmp 0x4d5609
sub edx, dword [esp + 0x14]
sub edx, eax
inc edx
mov ecx, 8
cmp edx, ecx
cmova edx, ecx
add edx, eax
mov dword [esp + 0x5c], edx
cmp eax, edx
jae 0x4d565f
mov eax, 0x18
sub eax, dword [esp + 0x18]
mov dword [esp + 0x2c], eax
mov eax, edx
nop dword [eax]
mov ecx, dword [esp + 0x14]
imul edx, dword [edi + ecx], 0x9e3779b1
mov ecx, dword [esp + 0x2c]
xor edx, dword [esi + 0x50]
shr edx, cl
mov ecx, edi
and ecx, 7
inc edi
mov dword [esi + ecx*4 + 0x2c], edx
cmp edi, eax
jb 0x4d5630
mov ecx, dword [esi + 0x24]
mov eax, dword [esp + 0x64]
mov edx, dword [esp + 0x10]
jmp 0x4d566b
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 8]
jmp 0x4d566b
mov ecx, edi
mov edi, dword [esi + 0x5c]
mov dword [esp + 0x18], edi
mov edi, dword [esi + 0x28]
mov dword [esp + 0x5c], edi
mov edi, dword [esi + 4]
mov dword [esp + 0x64], edi
cmp eax, edx
jae 0x4d56f8
mov edi, 0x18
sub edi, ecx
mov dword [esp + 8], edi
nop
mov ecx, dword [esp + 0x64]
imul edx, dword [ecx + eax + 8], 0x9e3779b1
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 + 0x5c]
mov dword [esp + 0x2c], edi
shr edi, 4
and edi, 0xffffff0
add esi, edi
movzx edx, byte [esi]
dec edx
and edx, 0xf
cmove ecx, dword [esp + 0x24]
add edx, ecx
mov ecx, dword [esp + 0x2c]
mov byte [esi], dl
mov byte [edx + esi], cl
lea ecx, [edx + edi]
mov edx, dword [esp + 0x18]
mov esi, dword [esp + 0x28]
mov edi, dword [esp + 8]
mov dword [edx + ecx*4], eax
inc eax
cmp eax, dword [esp + 0x10]
jb 0x4d5690
mov eax, dword [esp + 0x10]
mov ecx, 0x18
sub ecx, dword [esp + 0xc]
mov edi, 3
mov dword [esi + 0x1c], eax
mov eax, dword [esp + 0x20]
imul edx, dword [eax + 8], 0x9e3779b1
mov eax, dword [esp + 0x10]
xor edx, dword [esp + 0x38]
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 + 8], ecx
jmp 0x4d5753
mov edx, dword [esp + 8]
mov ecx, 0x18
xor edx, dword [esp + 0x38]
sub ecx, dword [esp + 0xc]
mov eax, dword [esp + 0x10]
shr edx, cl
mov dword [esp + 8], edx
mov dword [esi + 0x1c], eax
mov ecx, dword [esp + 0x3c]
mov eax, edx
add dword [esi + 0x58], edx
shr eax, 4
and eax, 0xffffff0
mov dword [esp + 0xc], 0
mov dword [esp + 0x2c], 0
lea ecx, [ecx + eax*4]
add eax, dword [esp + 0x1c]
mov dword [esp + 0x38], eax
mov dword [esp + 0x18], ecx
movzx ecx, byte [eax]
movsx eax, dl
and ecx, 0xf
mov dword [esp + 0x1c], ecx
neg ecx
and ecx, 0xf
movd xmm0, eax
mov eax, dword [esp + 0x38]
punpcklbw xmm0, xmm0
punpcklwd xmm0, xmm0
pshufd xmm1, xmm0, 0
movups xmm0, xmmword [eax]
pcmpeqb xmm0, xmm1
pmovmskb edx, xmm0
mov ax, dx
shl ax, cl
mov cx, word [esp + 0x1c]
shr dx, cl
or ax, dx
movzx eax, ax
cdq
mov dword [esp + 0x64], eax
mov dword [esp + 0x3c], edx
test edx, edx
jne 0x4d57da
test eax, eax
je 0x4d5842
mov edi, dword [esp + 0x64]
mov esi, dword [esp + 0x4c]
test esi, esi
je 0x4d5835
push edx
push edi
call fcn.004ce160
add eax, dword [esp + 0x24]
add esp, 8
and eax, 0xf
je 0x4d5817
mov ecx, dword [esp + 0x18]
mov ecx, dword [ecx + eax*4]
cmp ecx, dword [esp + 0x44]
jb 0x4d5835
mov eax, dword [esp + 0xc]
mov dword [esp + eax*4 + 0x80], ecx
inc eax
mov dword [esp + 0xc], eax
dec esi
mov edx, dword [esp + 0x3c]
mov ecx, edi
add ecx, 0xffffffff
mov eax, edx
adc eax, 0xffffffff
and edi, ecx
and edx, eax
mov dword [esp + 0x3c], edx
ja 0x4d57e2
jb 0x4d5835
test edi, edi
jne 0x4d57e2
mov dword [esp + 0x4c], esi
mov edi, 3
mov esi, dword [esp + 0x28]
mov edx, dword [esp + 0x38]
mov eax, 0
movzx ecx, byte [edx]
dec ecx
and ecx, 0xf
cmove eax, dword [esp + 0x24]
add ecx, eax
mov eax, dword [esp + 8]
mov byte [edx], cl
mov byte [ecx + edx], al
mov edx, dword [esp + 0x18]
mov eax, dword [esi + 0x1c]
mov dword [edx + ecx*4], eax
inc dword [esi + 0x1c]
cmp dword [esp + 0xc], 0
jbe 0x4d58dd
mov esi, dword [esp + 0x20]
xor eax, eax
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + eax*4 + 0x80]
mov edx, dword [esp + 0x14]
add edx, eax
mov dword [esp + 0x44], eax
mov eax, dword [edx + edi - 3]
cmp eax, dword [edi + esi - 3]
jne 0x4d58cc
push dword [esp + 0x34]
mov ecx, esi
call fcn.004ce1f0
add esp, 4
cmp eax, edi
jbe 0x4d58c8
mov ecx, dword [esp + 0x10]
mov edi, eax
sub ecx, dword [esp + 0x44]
add eax, esi
mov edx, dword [esp + 0x6c]
add ecx, 3
mov dword [edx], ecx
cmp eax, dword [esp + 0x34]
je 0x4d58d9
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + 0x2c]
inc eax
mov dword [esp + 0x2c], eax
cmp eax, ecx
jb 0x4d5880
mov dword [esp + 0x48], edi
mov edx, dword [esp + 0x40]
mov dword [esp + 0x14], 0
mov dword [esp + 0x1c], 0
mov eax, dword [edx + 0xc]
mov ecx, dword [edx + 4]
mov dword [esp + 0x44], eax
mov eax, dword [edx]
mov dword [esp + 0x24], ecx
sub ecx, eax
add dword [esp + 0x50], ecx
mov ecx, dword [esp + 0x54]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x58]
movsx eax, al
movzx esi, byte [ecx]
and esi, 0xf
mov dword [esp + 0x54], esi
movd xmm0, eax
punpcklbw xmm0, xmm0
punpcklwd xmm0, xmm0
pshufd xmm1, xmm0, 0
movups xmm0, xmmword [ecx]
mov ecx, 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 + 0x40], edx
mov esi, eax
test edx, edx
jne 0x4d5968
test esi, esi
je 0x4d5aa7
mov edi, dword [esp + 0x4c]
nop dword [eax]
test edi, edi
je 0x4d59c3
push edx
push esi
call fcn.004ce160
add eax, dword [esp + 0x5c]
add esp, 8
and eax, 0xf
je 0x4d59a5
mov ecx, dword [esp + 0x70]
mov ecx, dword [ecx + eax*4]
cmp ecx, dword [esp + 0x44]
jb 0x4d59c3
mov eax, dword [esp + 0x14]
mov dword [esp + eax*4 + 0x80], ecx
inc eax
mov dword [esp + 0x14], eax
dec edi
mov edx, dword [esp + 0x40]
mov ecx, esi
add ecx, 0xffffffff
mov eax, edx
adc eax, 0xffffffff
and esi, ecx
and edx, eax
mov dword [esp + 0x40], edx
ja 0x4d5970
jb 0x4d59c3
test esi, esi
jne 0x4d5970
cmp dword [esp + 0x14], 0
mov edi, dword [esp + 0x48]
jbe 0x4d5aa7
mov ecx, dword [esp + 0x20]
xor eax, eax
mov edx, dword [esp + 0x24]
nop dword [eax]
mov eax, dword [esp + eax*4 + 0x80]
mov dword [esp + 0x58], eax
lea esi, [eax + edx]
mov eax, dword [esi]
cmp eax, dword [ecx]
jne 0x4d5a94
lea edi, [ecx + 4]
add esi, 4
mov ecx, dword [esp + 0x34]
mov eax, edi
sub eax, esi
mov dword [esp + 0x70], edi
add eax, dword [esp + 0x2c]
mov edx, esi
cmp eax, ecx
cmovb ecx, eax
push ecx
mov ecx, edi
call fcn.004ce1f0
mov edi, eax
add esp, 4
lea ecx, [esi + edi]
mov esi, dword [esp + 0x34]
cmp ecx, dword [esp + 0x2c]
jne 0x4d5a45
mov ecx, dword [esp + 0x70]
mov edx, dword [esp + 0x7c]
push esi
lea ecx, [ecx + edi]
call fcn.004ce1f0
add esp, 4
add edi, eax
lea edx, [edi + 4]
mov edi, dword [esp + 0x48]
cmp edx, edi
jbe 0x4d5a8c
mov eax, dword [esp + 0x10]
mov edi, edx
sub eax, dword [esp + 0x58]
sub eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x6c]
add eax, 3
mov dword [esp + 0x48], edi
mov dword [ecx], eax
mov ecx, dword [esp + 0x20]
lea eax, [edx + ecx]
cmp eax, esi
jne 0x4d5a90
mov eax, edi
pop edi
pop esi
mov ecx, dword [esp + 0x17c]
xor ecx, esp
call fcn.00511339
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x1c]
inc eax
mov dword [esp + 0x1c], eax
cmp eax, dword [esp + 0x14]
jb 0x4d59e0
mov ecx, dword [esp + 0x184]
mov eax, edi
pop edi
pop esi
xor ecx, esp
call fcn.00511339
mov esp, ebp
pop ebp
ret