Function at 0x4c6740
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x80
mov ebx, dword [ebp + 0x10]
mov esi, dword [ebp + 8]
test ebx, ebx
je 0x4c6817
mov ecx, dword [ebp + 0xc]
xor edi, edi
mov eax, 0x811c9dc5
nop word [eax + eax]
movzx esi, byte [ecx]
mov edx, 0x1b3
imul edi, edi, 0x1b3
inc ecx
xor esi, eax
mov eax, esi
shl esi, 8
mul edx
add esi, edx
add edi, esi
dec ebx
jne 0x4c6770
xor eax, 0xff
mov ecx, 0x1b3
mov ebx, dword [ebp + 0x10]
mov esi, eax
mul ecx
imul ecx, edi, 0x1b3
xor edi, edi
shl esi, 8
mov dword [esp + 0x18], eax
add esi, edx
mov edx, dword [ebp + 0xc]
add ecx, esi
mov dword [esp + 0x1c], ecx
mov ecx, 0x811c9dc5
nop
movzx esi, byte [edx]
imul edi, edi, 0x1b3
xor esi, ecx
mov ecx, edx
mov edx, 0x1b3
mov eax, esi
shl esi, 8
mul edx
add esi, edx
mov edx, ecx
mov ecx, eax
add edi, esi
inc edx
dec ebx
jne 0x4c67c0
xor ecx, 0xff
mov esi, dword [ebp + 8]
mov edx, 0x1b3
mov eax, ecx
shl ecx, 8
mul edx
add ecx, edx
imul edx, edi, 0x1b3
mov dword [esp + 8], eax
add edx, ecx
mov dword [esp + 4], edx
cmp dword [esi + 0x1c], 0
jne 0x4c6841
jmp 0x4c6a24
mov dword [esp + 0x1c], 0x1c9d3adb
mov dword [esp + 0x18], 0x639f298e
mov dword [esp + 4], 0x1c9d3adb
mov dword [esp + 8], 0x639f298e
cmp dword [esi + 0x1c], 0
je 0x4c6a24
mov ecx, dword [esi]
mov edx, dword [esi + 4]
push dword [esp + 4]
push dword [esp + 0xc]
push dword [esi + 0xc]
push dword [esi + 8]
call fcn.004b3320
add esp, 0x10
mov ecx, dword [esi + 0x20]
mov edx, dword [esi + 0x28]
mov ebx, dword [esi + 0x14]
pcmpeqd xmm1, xmm1
mov dword [esp + 0xc], 0
mov dword [esp + 0x14], ecx
mov ecx, eax
mov dword [esp + 0x10], edx
shr ecx, 0x19
movd xmm0, ecx
mov ecx, dword [esi + 0x10]
punpcklbw xmm0, xmm0
pshuflw xmm0, xmm0, 0
pshufd xmm0, xmm0, 0
and eax, ebx
movdqa xmm3, xmm0
movdqu xmm2, xmmword [ecx + eax]
mov dword [esp + 0x38], eax
pcmpeqb xmm3, xmm2
pmovmskb edi, xmm3
nop word [eax + eax]
test di, di
je 0x4c6900
tzcnt edx, edi
mov esi, ecx
add edx, eax
and edx, ebx
shl edx, 2
sub esi, edx
mov edx, dword [esi - 4]
cmp dword [esp + 0x10], edx
jbe 0x4c6a30
mov eax, ebx
mov ebx, dword [esp + 0x14]
lea edx, [edx + edx*4]
lea esi, [edi - 1]
shl edx, 4
and esi, edi
mov edi, dword [ebx + edx + 0x44]
mov ebx, dword [ebx + edx + 0x40]
xor edi, dword [esp + 4]
xor ebx, dword [esp + 8]
or ebx, edi
mov ebx, eax
mov eax, dword [esp + 0x38]
mov edi, esi
jne 0x4c68b0
jmp 0x4c6924
pcmpeqb xmm2, xmm1
pmovmskb edx, xmm2
test edx, edx
jne 0x4c6a24
mov edx, dword [esp + 0xc]
lea eax, [eax + edx + 0x10]
add edx, 0x10
mov dword [esp + 0xc], edx
jmp 0x4c6893
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x24], 0x4d5c788c
mov dword [esp + 0x20], 0x2aa46bdb
mov eax, dword [ecx + edx]
lea esi, [ecx + edx]
or eax, dword [ecx + edx + 4]
je 0x4c694e
mov edi, dword [ecx + edx + 0xc]
mov eax, dword [ecx + edx + 8]
jmp 0x4c69a2
mov ecx, dword [esi + 0x2c]
mov eax, dword [esi + 0x24]
lea edx, [esp + 0x68]
lea ecx, [ecx + ecx*2]
mov dword [esp + 0x40], eax
lea ecx, [eax + ecx*4]
lea eax, [esp + 0x20]
mov dword [esp + 0x44], ecx
mov dword [esp + 0x48], 0
mov dword [esp + 0x50], 0
lea ecx, [esp + 0x40]
push eax
push ecx
push edx
call fcn.004de460
add esp, 0xc
cmp dword [esp + 0x68], 0
jne 0x4c699a
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x24]
jmp 0x4c69a2
mov eax, dword [esp + 0x70]
mov edi, dword [esp + 0x74]
mov ecx, edi
mov edx, eax
xor ecx, 0x4d5c788c
xor edx, 0x2aa46bdb
or edx, ecx
jne 0x4c6a44
mov ecx, dword [esi + 0x2c]
mov eax, dword [esi + 0x24]
shl ecx, 2
add eax, 0xfffffff4
lea ecx, [ecx + ecx*2]
nop dword [eax]
test ecx, ecx
je 0x4c6a24
add ecx, 0xfffffff4
cmp dword [eax + 0x14], 0
lea edx, [eax + 0xc]
mov eax, edx
je 0x4c69d0
mov eax, dword [edx]
mov ecx, dword [eax]
mov eax, dword [eax + 4]
mov edx, dword [eax + 8]
dec edx
and edx, 0xfffffff8
lea esi, [edx + ecx + 8]
push esi
call dword [eax + 0xc]
add esp, 4
xor edx, 0x4d5c788c
xor eax, 0x2aa46bdb
or eax, edx
jne 0x4c6a0e
test esi, esi
jne 0x4c6a26
push 0x604fec
push 0x63
push 0x604f86
call fcn.005b1610
add esp, 0xc
ud2
xor esi, esi
mov eax, esi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x604a1c
push dword [esp + 0x14]
push edx
call fcn.005b17d0
add esp, 0xc
ud2
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x28], eax
lea eax, [esp + 0x3c]
lea ecx, [esp + 0x18]
mov dword [esp + 0x2c], edi
mov dword [esp + 0x40], 0x603bc4
mov dword [esp + 0x44], 2
mov dword [esp + 0x34], 0x4d5c788c
mov dword [esp + 0x30], 0x2aa46bdb
mov dword [esp + 0x50], 0
mov dword [esp + 0x58], eax
lea eax, [esp + 0x20]
mov dword [esp + 0x5c], 0x4b22d0
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x60], eax
lea eax, [esp + 0x58]
mov dword [esp + 0x64], 0x4b5b20
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], 2
lea eax, [esp + 0x40]
push dword [ebp + 0x14]
push eax
call fcn.005b1670
add esp, 8
ud2