Function at 0x1004a370
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0xc
push ebx
mov ebx, dword [esp + 0x1c]
push ebp
mov ebp, dword [esp + 0x18]
push esi
mov esi, dword [ebp + 0xf4]
lea eax, [ebp + 0xf4]
push edi
mov dword [esp + 0x10], eax
lea ecx, [ebp + 0xf0]
lea eax, [ebx*4]
mov dword [esp + 0x14], ecx
inc esi
lea edi, [ebp - 4]
imul esi, dword [ecx]
add edi, eax
push eax
push dword [esp + 0x28]
push ebp
mov dword [esp + 0x24], esi
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
cmp ebx, 7
jne 0x1004a4c3
mov eax, dword [esp + 0x10]
mov esi, ebx
mov ecx, dword [esp + 0x14]
mov eax, dword [eax]
inc eax
imul eax, dword [ecx]
cmp eax, ebx
jbe 0x1004a724
mov ebx, dword [edi]
mov dword [esp + 0x28], esi
xor edx, edx
lea edi, [edi + 4]
mov eax, esi
mov ecx, ebx
div dword [esp + 0x28]
mov dword [esp + 0x20], eax
test edx, edx
jne 0x1004a44e
ror ebx, 8
mov eax, ebx
shr eax, 0x10
movzx eax, al
movzx ecx, byte [eax*4 + 0x100825f8]
mov eax, ebx
shr eax, 0x18
movzx eax, byte [eax*4 + 0x100825f8]
shl eax, 8
or ecx, eax
mov eax, ebx
shr eax, 8
movzx eax, al
shl ecx, 8
movzx eax, byte [eax*4 + 0x100825f8]
or ecx, eax
movzx eax, bl
shl ecx, 8
movzx eax, byte [eax*4 + 0x100825f8]
or ecx, eax
mov eax, dword [esp + 0x20]
xor ecx, dword [eax*4 + 0x100849f4]
jmp 0x1004a49a
cmp edx, 4
jne 0x1004a49a
mov eax, ebx
shr eax, 0x10
movzx eax, al
movzx ecx, byte [eax*4 + 0x100825f8]
mov eax, ebx
shr eax, 0x18
movzx eax, byte [eax*4 + 0x100825f8]
shl eax, 8
or ecx, eax
mov eax, ebx
shr eax, 8
movzx eax, al
shl ecx, 8
movzx eax, byte [eax*4 + 0x100825f8]
or ecx, eax
movzx eax, bl
shl ecx, 8
movzx eax, byte [eax*4 + 0x100825f8]
or ecx, eax
mov ebx, dword [ebp]
inc esi
mov eax, dword [esp + 0x10]
xor ebx, ecx
mov ecx, dword [esp + 0x14]
add ebp, 4
mov dword [edi], ebx
mov eax, dword [eax]
inc eax
imul eax, dword [ecx]
cmp esi, eax
jb 0x1004a3e2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
mov eax, esi
mov ebp, ebx
sub eax, ebx
mov dword [esp + 0x14], eax
cmp ebx, eax
jae 0x1004a60d
mov ebx, dword [esp + 0x20]
nop dword [eax]
mov ecx, dword [edi]
xor edx, edx
ror ecx, 8
mov eax, ecx
shr eax, 0x10
movzx eax, al
movzx esi, byte [eax*4 + 0x100825f8]
mov eax, ecx
shr eax, 0x18
movzx eax, byte [eax*4 + 0x100825f8]
shl eax, 8
or esi, eax
mov eax, ecx
shr eax, 8
movzx eax, al
shl esi, 8
movzx eax, byte [eax*4 + 0x100825f8]
or esi, eax
movzx eax, cl
shl esi, 8
movzx eax, byte [eax*4 + 0x100825f8]
or esi, eax
mov eax, ebp
div dword [esp + 0x28]
add ebp, 4
xor esi, dword [eax*4 + 0x100849f4]
xor esi, dword [ebx]
mov dword [edi + 4], esi
mov eax, dword [ebx + 4]
xor eax, esi
mov dword [edi + 8], eax
mov ecx, dword [ebx + 8]
xor ecx, eax
mov eax, dword [esp + 0x28]
mov dword [edi + 0xc], ecx
add edi, 0x10
mov edx, dword [ebx + 0xc]
add ebx, 0x10
xor edx, ecx
mov dword [edi], edx
cmp eax, 4
je case.default.0x1004a579
add eax, 0xfffffffb
cmp eax, 3
ja case.default.0x1004a579
jmp dword [eax*4 + 0x1004a72c]
mov ecx, edx
add edi, 4
mov eax, ecx
inc ebp
shr eax, 0x10
movzx eax, al
movzx edx, byte [eax*4 + 0x100825f8]
mov eax, ecx
shr eax, 0x18
movzx eax, byte [eax*4 + 0x100825f8]
shl eax, 8
or edx, eax
mov eax, ecx
shr eax, 8
movzx eax, al
shl edx, 8
movzx eax, byte [eax*4 + 0x100825f8]
or edx, eax
movzx eax, cl
shl edx, 8
movzx eax, byte [eax*4 + 0x100825f8]
or edx, eax
xor edx, dword [ebx]
add ebx, 4
mov dword [edi], edx
mov eax, dword [ebx]
add edi, 4
xor eax, edx
inc ebp
add ebx, 4
mov edx, eax
mov dword [edi], eax
mov eax, dword [ebx]
add edi, 4
xor eax, edx
inc ebp
add ebx, 4
mov edx, eax
mov dword [edi], eax
mov eax, dword [ebx]
add edi, 4
xor eax, edx
inc ebp
add ebx, 4
mov dword [edi], eax
cmp ebp, dword [esp + 0x14]
jb 0x1004a4e0
mov esi, dword [esp + 0x18]
mov ecx, dword [edi]
xor edx, edx
ror ecx, 8
add edi, 4
mov eax, ecx
shr eax, 0x10
movzx eax, al
movzx ebx, byte [eax*4 + 0x100825f8]
mov eax, ecx
shr eax, 0x18
movzx eax, byte [eax*4 + 0x100825f8]
shl eax, 8
or ebx, eax
mov eax, ecx
shr eax, 8
movzx eax, al
shl ebx, 8
movzx eax, byte [eax*4 + 0x100825f8]
or ebx, eax
movzx eax, cl
shl ebx, 8
mov ecx, dword [esp + 0x20]
movzx eax, byte [eax*4 + 0x100825f8]
or ebx, eax
mov eax, ebp
div dword [esp + 0x28]
mov edx, dword [esp + 0x28]
xor ebx, dword [eax*4 + 0x100849f4]
mov eax, ebp
sub eax, edx
inc ebp
xor ebx, dword [ecx + eax*4]
mov dword [edi], ebx
cmp ebp, esi
jae 0x1004a724
mov eax, ebp
sub eax, edx
cmp edx, 8
jae 0x1004a6ae
lea ecx, [ecx + eax*4]
sub esi, ebp
mov eax, dword [ecx]
lea edi, [edi + 4]
xor eax, ebx
lea ecx, [ecx + 4]
mov dword [edi], eax
mov ebx, eax
sub esi, 1
jne 0x1004a693
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
lea eax, [ecx + eax*4]
mov dword [esp + 0x20], eax
xor edx, edx
lea edi, [edi + 4]
mov eax, ebp
mov ecx, ebx
div dword [esp + 0x28]
cmp edx, 4
jne 0x1004a70e
mov eax, ebx
shr eax, 0x10
movzx eax, al
movzx ecx, byte [eax*4 + 0x100825f8]
mov eax, ebx
shr eax, 0x18
movzx eax, byte [eax*4 + 0x100825f8]
shl eax, 8
or ecx, eax
mov eax, ebx
shr eax, 8
movzx eax, al
shl ecx, 8
movzx eax, byte [eax*4 + 0x100825f8]
or ecx, eax
movzx eax, bl
shl ecx, 8
movzx eax, byte [eax*4 + 0x100825f8]
or ecx, eax
mov eax, dword [esp + 0x20]
inc ebp
mov ebx, dword [eax]
add eax, 4
xor ebx, ecx
mov dword [esp + 0x20], eax
mov dword [edi], ebx
cmp ebp, esi
jb 0x1004a6b5
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret