Function at 0x4d5ac0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x198
mov eax, dword [0x5a6008]
xor eax, esp
mov dword [esp + 0x194], eax
push esi
push edi
mov eax, edx
mov dword [esp + 0x20], eax
mov esi, ecx
mov dword [esp + 0x24], esi
mov dword [esp + 0x48], 3
mov ecx, dword [ebp + 8]
mov dword [esp + 0x38], 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 + 0x68], ecx
mov ecx, dword [esi + 0x24]
mov dword [esp + 0x14], ecx
mov ecx, dword [esi + 4]
mov edi, eax
mov dword [esp + 0x54], edx
add edx, ecx
mov dword [esp + 0x30], ecx
sub edi, ecx
mov dword [esp + 0x7c], edx
mov ecx, dword [esi + 0xb8]
mov eax, edi
mov edx, 1
mov dword [esp + 0x1c], edi
shl edx, cl
mov ecx, dword [esi + 0x10]
sub edi, edx
sub eax, ecx
cmp eax, edx
mov dword [esp + 0x2c], 0x1f
mov eax, dword [esi + 0xc4]
cmovbe edi, ecx
cmp dword [esi + 0x18], 0
cmovne edi, ecx
mov ecx, 5
cmp eax, ecx
mov dword [esp + 0x44], edi
cmovb ecx, eax
mov eax, dword [esi + 0x50]
mov dword [esp + 0x28], eax
mov eax, 1
shl eax, cl
mov ecx, 0x18
mov dword [esp + 0x34], 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]
imul eax, dword [eax], 0x9e3779b1
mov dword [esp + 0x10], eax
shr eax, cl
mov dword [esp + 0x5c], eax
shr eax, 3
and eax, 0x1fffffe0
lea ecx, [eax + edx]
lea eax, [esi + eax*4]
mov dword [esp + 0x58], ecx
mov esi, dword [esp + 0x24]
mov dword [esp + 0x70], eax
cmp dword [esi + 0xdc], 0
jne 0x4d5e03
mov edx, dword [esp + 0x1c]
mov ecx, edx
mov eax, dword [esi + 0x1c]
sub ecx, eax
mov edi, dword [esp + 0x14]
cmp ecx, 0x180
jbe 0x4d5d33
lea edx, [eax + 0x60]
mov dword [esp + 0x18], edi
mov dword [esp + 0x60], edx
mov dword [esp + 0x10], edi
cmp eax, edx
jae 0x4d5c98
mov edx, dword [esp + 0x30]
mov edi, 0x18
sub edi, dword [esp + 0x14]
add edx, 8
mov dword [esp + 0x10], edi
mov dword [esp + 0x80], edx
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 + 0x68]
mov dword [esp + 0x18], edi
shr edi, 3
and edi, 0x1fffffe0
add esi, edi
movzx edx, byte [esi]
dec edx
and edx, 0x1f
cmove ecx, dword [esp + 0x2c]
add edx, ecx
mov ecx, dword [esp + 0x18]
mov byte [esi], dl
mov byte [edx + esi], cl
lea ecx, [edx + edi]
mov edx, dword [esp + 0x3c]
mov esi, dword [esp + 0x24]
mov edi, dword [esp + 0x10]
mov dword [edx + ecx*4], eax
inc eax
mov edx, dword [esp + 0x80]
cmp eax, dword [esp + 0x60]
jb 0x4d5c23
mov eax, dword [esi + 0x24]
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
add eax, 0xffffffe0
mov ecx, dword [esp + 0x30]
inc edx
add ecx, eax
mov dword [esp + 0x4c], eax
mov edi, eax
cmp ecx, edx
jbe 0x4d5cb8
xor edx, edx
jmp 0x4d5cbf
sub edx, dword [esp + 0x30]
sub edx, eax
inc edx
mov ecx, 8
cmp edx, ecx
cmova edx, ecx
add edx, eax
mov dword [esp + 0x80], edx
cmp eax, edx
jae 0x4d5d29
mov eax, 0x18
sub eax, dword [esp + 0x18]
mov dword [esp + 0x60], eax
mov eax, edx
nop word [eax + eax]
mov ecx, dword [esi + 0x54]
mov dword [esp + 0x84], ecx
mov ecx, dword [esp + 0x30]
imul edx, dword [edi + ecx], 0x9e3779b1
mov ecx, dword [esp + 0x60]
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 0x4d5cf0
mov ecx, dword [esi + 0x24]
mov eax, dword [esp + 0x4c]
mov edx, dword [esp + 0x1c]
jmp 0x4d5d35
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x10]
jmp 0x4d5d35
mov ecx, edi
mov edi, dword [esi + 0x5c]
mov dword [esp + 0x18], edi
mov edi, dword [esi + 0x28]
mov dword [esp + 0x80], edi
mov edi, dword [esi + 4]
mov dword [esp + 0x4c], edi
cmp eax, edx
jae 0x4d5dcb
mov edi, 0x18
sub edi, ecx
mov dword [esp + 0x10], edi
nop dword [eax]
mov ecx, dword [esp + 0x4c]
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 + 0x80]
mov dword [esp + 0x60], edi
shr edi, 3
and edi, 0x1fffffe0
add esi, edi
movzx edx, byte [esi]
dec edx
and edx, 0x1f
cmove ecx, dword [esp + 0x2c]
add edx, ecx
mov ecx, dword [esp + 0x60]
mov byte [esi], dl
mov byte [edx + esi], cl
lea ecx, [edx + edi]
mov edx, dword [esp + 0x18]
mov esi, dword [esp + 0x24]
mov edi, dword [esp + 0x10]
mov dword [edx + ecx*4], eax
inc eax
cmp eax, dword [esp + 0x1c]
jb 0x4d5d60
mov eax, dword [esp + 0x1c]
mov ecx, 0x18
sub ecx, dword [esp + 0x14]
mov dword [esi + 0x1c], eax
mov eax, dword [esp + 0x20]
imul edx, dword [eax + 8], 0x9e3779b1
mov eax, dword [esp + 0x1c]
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 + 0x10], ecx
jmp 0x4d5e21
mov edx, dword [esp + 0x10]
mov ecx, 0x18
xor edx, dword [esp + 0x28]
sub ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
shr edx, cl
mov dword [esp + 0x10], edx
mov dword [esi + 0x1c], eax
add dword [esi + 0x58], edx
mov eax, edx
mov ecx, dword [esp + 0x3c]
xor edx, edx
mov esi, dword [esp + 0x68]
shr eax, 3
and eax, 0x1fffffe0
mov dword [esp + 0x14], 0
add esi, eax
mov dword [esp + 0x18], edx
mov dword [esp + 0x4c], esi
lea ecx, [ecx + eax*4]
movzx eax, byte [esi]
and eax, 0x1f
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x28], eax
xor ecx, ecx
mov eax, dword [esp + 0x10]
movsx eax, al
movd xmm0, eax
punpcklbw xmm0, xmm0
punpcklwd xmm0, xmm0
pshufd xmm1, xmm0, 0
xorps xmm0, xmm0
movaps xmmword [esp + 0x80], xmm0
movups xmm0, xmmword [esi]
lea esi, [esi + 0x10]
pcmpeqb xmm0, xmm1
pmovmskb eax, xmm0
mov dword [esp + ecx*4 + 0x80], eax
inc ecx
cmp ecx, 2
jl 0x4d5e80
mov eax, dword [esp + 0x84]
mov ecx, dword [esp + 0x28]
shl eax, 0x10
neg ecx
or eax, dword [esp + 0x80]
and ecx, 0x1f
mov esi, eax
shl esi, cl
mov ecx, dword [esp + 0x28]
shr eax, cl
xor ecx, ecx
or esi, eax
mov dword [esp + 0x2c], ecx
je 0x4d5f2b
mov edi, dword [esp + 0x34]
nop dword [eax]
test edi, edi
je 0x4d5f25
push ecx
push esi
call fcn.004ce160
add eax, dword [esp + 0x30]
add esp, 8
and eax, 0x1f
je 0x4d5f05
mov ecx, dword [esp + 0x3c]
mov ecx, dword [ecx + eax*4]
cmp ecx, dword [esp + 0x44]
jb 0x4d5f25
mov eax, dword [esp + 0x14]
mov dword [esp + eax*4 + 0x98], ecx
inc eax
mov dword [esp + 0x14], eax
dec edi
mov eax, dword [esp + 0x2c]
mov ecx, esi
add ecx, 0xffffffff
adc eax, 0xffffffff
and esi, ecx
mov ecx, dword [esp + 0x2c]
and ecx, eax
mov dword [esp + 0x2c], ecx
ja 0x4d5ed0
jb 0x4d5f25
test esi, esi
jne 0x4d5ed0
mov dword [esp + 0x34], edi
xor edx, edx
mov esi, dword [esp + 0x4c]
mov edi, 0x1f
mov eax, 0
movzx ecx, byte [esi]
dec ecx
and ecx, 0x1f
cmove eax, edi
mov edi, dword [esp + 0x3c]
add ecx, eax
mov eax, dword [esp + 0x10]
mov byte [esi], cl
mov byte [ecx + esi], al
mov esi, dword [esp + 0x24]
mov eax, dword [esi + 0x1c]
mov dword [edi + ecx*4], eax
mov edi, 3
inc dword [esi + 0x1c]
cmp dword [esp + 0x14], 0
jbe 0x4d5fd0
mov esi, dword [esp + 0x20]
nop
mov eax, dword [esp + edx*4 + 0x98]
mov ecx, dword [esp + 0x30]
add ecx, eax
mov dword [esp + 0x44], eax
mov eax, dword [ecx + edi - 3]
cmp eax, dword [edi + esi - 3]
jne 0x4d5fc1
push dword [esp + 0x38]
mov edx, ecx
mov ecx, esi
call fcn.004ce1f0
mov ecx, eax
add esp, 4
cmp ecx, edi
jbe 0x4d5fbd
mov eax, dword [esp + 0x1c]
mov edi, ecx
sub eax, dword [esp + 0x44]
mov edx, dword [esp + 0x6c]
add eax, 3
mov dword [edx], eax
lea eax, [ecx + esi]
cmp eax, dword [esp + 0x38]
je 0x4d5fcc
mov edx, dword [esp + 0x18]
inc edx
mov dword [esp + 0x18], edx
cmp edx, dword [esp + 0x14]
jb 0x4d5f70
mov dword [esp + 0x48], edi
mov edx, dword [esp + 0x40]
mov esi, dword [esp + 0x58]
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
mov eax, dword [edx + 0xc]
mov ecx, dword [edx + 4]
mov dword [esp + 0x44], eax
mov eax, dword [edx]
movzx edx, byte [esi]
mov dword [esp + 0x4c], ecx
and edx, 0x1f
sub ecx, eax
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x5c]
add dword [esp + 0x54], ecx
xor ecx, ecx
movsx eax, al
mov dword [esp + 0x58], edx
movd xmm0, eax
punpcklbw xmm0, xmm0
punpcklwd xmm0, xmm0
pshufd xmm1, xmm0, 0
xorps xmm0, xmm0
movaps xmmword [esp + 0x80], xmm0
movups xmm0, xmmword [esi]
lea esi, [esi + 0x10]
pcmpeqb xmm0, xmm1
pmovmskb eax, xmm0
mov dword [esp + ecx*4 + 0x80], eax
inc ecx
cmp ecx, 2
jl 0x4d6031
mov eax, dword [esp + 0x84]
mov ecx, edx
shl eax, 0x10
neg ecx
or eax, dword [esp + 0x80]
and ecx, 0x1f
mov esi, eax
shl esi, cl
mov ecx, edx
shr eax, cl
or esi, eax
je 0x4d61a6
xor edi, edi
cmp dword [esp + 0x34], 0
jbe 0x4d60c7
push edi
push esi
call fcn.004ce160
add eax, dword [esp + 0x60]
add esp, 8
and eax, 0x1f
je 0x4d60b1
mov ecx, dword [esp + 0x70]
mov ecx, dword [ecx + eax*4]
cmp ecx, dword [esp + 0x44]
jb 0x4d60c7
mov eax, dword [esp + 0x14]
mov dword [esp + eax*4 + 0x98], ecx
inc eax
dec dword [esp + 0x34]
mov dword [esp + 0x14], eax
mov ecx, esi
mov eax, edi
add ecx, 0xffffffff
adc eax, 0xffffffff
and esi, ecx
and edi, eax
ja 0x4d6076
jb 0x4d60c7
test esi, esi
jne 0x4d6076
cmp dword [esp + 0x14], 0
mov edi, dword [esp + 0x48]
jbe 0x4d61a6
mov ecx, dword [esp + 0x20]
xor edx, edx
nop dword [eax]
mov eax, dword [esp + edx*4 + 0x98]
mov esi, dword [esp + 0x4c]
add esi, eax
mov dword [esp + 0x5c], eax
mov eax, dword [esi]
cmp eax, dword [ecx]
jne 0x4d6197
lea edi, [ecx + 4]
add esi, 4
mov ecx, dword [esp + 0x38]
mov eax, edi
sub eax, esi
mov dword [esp + 0x70], edi
add eax, dword [esp + 0x40]
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 + 0x38]
cmp ecx, dword [esp + 0x40]
jne 0x4d6148
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 0x4d618f
mov eax, dword [esp + 0x1c]
mov edi, edx
sub eax, dword [esp + 0x5c]
sub eax, dword [esp + 0x54]
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 0x4d6193
mov eax, edi
pop edi
pop esi
mov ecx, dword [esp + 0x194]
xor ecx, esp
call fcn.00511339
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x18]
inc edx
mov dword [esp + 0x18], edx
cmp edx, dword [esp + 0x14]
jb 0x4d60e0
mov ecx, dword [esp + 0x19c]
mov eax, edi
pop edi
pop esi
xor ecx, esp
call fcn.00511339
mov esp, ebp
pop ebp
ret