Function at 0x46d17b
Capabilities:
Encode data using xor
Encrypt data using aes
Reference aes constants

Disassembly:
push 0x24
mov eax, 0x49f39b
call fcn.0042db66
mov ebx, ecx
mov dword [ebp - 0x24], ebx
mov esi, dword [ebp + 8]
test esi, esi
je 0x46d54d
push 0x20
pop edi
push edi
push dword [ebp + 0xc]
lea eax, [ebx + 0x3d4]
mov dword [ebx + 0x3c8], edi
push eax
mov dword [ebx + 0x3cc], edi
call sub.VCRUNTIME140.dll_memcpy
push dword [ebx + 0x3cc]
lea eax, [ebx + 0x3f4]
push dword [ebp + 0xc]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebx + 0x3c8]
add esp, 0x18
mov ecx, dword [ebx + 0x3cc]
cmp eax, 0x10
je 0x46d1fd
cmp eax, 0x18
je 0x46d1f0
mov dword [ebx + 0x3d0], 0xe
jmp 0x46d219
push 0xe
pop eax
push 0xc
cmp ecx, edi
pop edx
cmovne eax, edx
jmp 0x46d213
cmp ecx, 0x10
jne 0x46d207
push 0xa
pop eax
jmp 0x46d213
push 0xe
pop eax
push 0xc
cmp ecx, 0x18
pop edx
cmove eax, edx
mov dword [ebx + 0x3d0], eax
mov eax, ecx
lea ecx, [ebx + 8]
cdq
and edx, 3
mov dword [ebp + 0xc], ecx
lea edi, [edx + eax]
sar edi, 2
xor edx, edx
mov dword [ebp + 8], edi
test edi, edi
jle 0x46d243
mov ecx, edi
xor eax, eax
mov edi, dword [ebp + 0xc]
rep stosd dword es:[edi], eax
mov edi, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebx + 0x3d0]
inc edx
add ecx, 0x20
mov dword [ebp + 0xc], ecx
cmp edx, eax
jle 0x46d230
xor ecx, ecx
mov dword [ebp + 0xc], ecx
test eax, eax
js 0x46d286
lea edx, [ebx + 0x1e8]
test edi, edi
jle 0x46d275
mov ecx, edi
xor eax, eax
mov edi, edx
rep stosd dword es:[edi], eax
mov edi, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebx + 0x3d0]
inc ecx
add edx, 0x20
mov dword [ebp + 0xc], ecx
cmp ecx, eax
jle 0x46d263
inc eax
imul eax, edi
mov dword [ebp - 0x14], eax
mov eax, dword [ebx + 0x3c8]
cdq
and edx, 3
lea ecx, [edx + eax]
sar ecx, 2
lea eax, [ebx + 0x414]
mov dword [ebp + 0xc], ecx
mov dword [ebp - 0x1c], eax
test ecx, ecx
jle 0x46d2ee
mov ebx, ecx
mov edi, eax
movzx eax, byte [esi]
lea esi, [esi + 4]
shl eax, 0x18
mov dword [edi], eax
movzx edx, byte [esi - 3]
shl edx, 0x10
or edx, eax
mov dword [edi], edx
movzx ecx, byte [esi - 2]
shl ecx, 8
or ecx, edx
mov dword [edi], ecx
movzx eax, byte [esi - 1]
or eax, ecx
mov dword [edi], eax
lea edi, [edi + 4]
sub ebx, 1
jne 0x46d2b1
mov ebx, dword [ebp - 0x24]
mov edi, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x1c]
xor esi, esi
mov dword [ebp - 0x10], esi
test ecx, ecx
jle 0x46d343
mov ecx, eax
mov dword [ebp - 0x18], ecx
jmp 0x46d301
mov ecx, dword [ebp - 0x18]
cmp esi, dword [ebp - 0x14]
jge 0x46d4c7
mov eax, esi
mov ecx, dword [ecx]
cdq
idiv edi
lea esi, [edx + eax*8]
mov dword [ebx + esi*4 + 8], ecx
mov ecx, dword [ebx + 0x3d0]
mov esi, dword [ebp - 0x10]
sub ecx, eax
inc esi
mov dword [ebp - 0x10], esi
lea ecx, [edx + ecx*8]
mov edx, dword [ebp - 0x18]
mov eax, dword [edx]
add edx, 4
mov dword [ebx + ecx*4 + 0x1e8], eax
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x18], edx
cmp esi, ecx
jl 0x46d2fe
cmp esi, dword [ebp - 0x14]
jge 0x46d4c7
mov dword [ebp - 0x18], 0x4afec0
mov edx, dword [ebx + ecx*4 + 0x410]
mov eax, edx
sar eax, 0x10
movzx eax, al
movsx ecx, byte [eax + 0x4b2fe0]
mov eax, dword [ebp - 0x18]
movsx eax, byte [eax]
xor ecx, eax
mov eax, edx
sar eax, 8
movzx eax, al
shl ecx, 8
movzx eax, byte [eax + 0x4b2fe0]
xor ecx, eax
movzx eax, dl
shl ecx, 8
sar edx, 0x18
movzx eax, byte [eax + 0x4b2fe0]
xor ecx, eax
movzx eax, dl
shl ecx, 8
movzx eax, byte [eax + 0x4b2fe0]
xor ecx, eax
lea eax, [ebx + 0x414]
xor dword [eax], ecx
inc dword [ebp - 0x18]
mov ecx, dword [ebp + 0xc]
cmp ecx, 8
je 0x46d3e0
cmp ecx, 1
jle 0x46d467
lea edx, [ebx + 0x418]
lea edi, [ecx - 1]
mov eax, dword [edx - 4]
xor dword [edx], eax
lea edx, [edx + 4]
sub edi, 1
jne 0x46d3cb
mov edi, dword [ebp + 8]
jmp 0x46d461
push 3
lea ecx, [ebx + 0x418]
pop edx
mov eax, dword [ecx - 4]
xor dword [ecx], eax
lea ecx, [ecx + 4]
sub edx, 1
jne 0x46d3e9
mov edx, dword [ebx + 0x420]
mov eax, edx
sar eax, 0x18
movzx eax, al
push 3
movsx ecx, byte [eax + 0x4b2fe0]
mov eax, edx
sar eax, 0x10
movzx eax, al
shl ecx, 8
movzx eax, byte [eax + 0x4b2fe0]
xor ecx, eax
mov eax, edx
sar eax, 8
movzx eax, al
shl ecx, 8
movzx eax, byte [eax + 0x4b2fe0]
xor ecx, eax
movzx eax, dl
shl ecx, 8
pop edx
movzx eax, byte [eax + 0x4b2fe0]
xor ecx, eax
xor dword [ebx + 0x424], ecx
lea ecx, [ebx + 0x428]
mov eax, dword [ecx - 4]
xor dword [ecx], eax
lea ecx, [ecx + 4]
sub edx, 1
jne 0x46d451
mov ecx, dword [ebp + 0xc]
lea eax, [ebx + 0x414]
and dword [ebp - 0x20], 0
test ecx, ecx
jle 0x46d4be
mov ecx, eax
mov dword [ebp - 0x1c], ecx
jmp 0x46d479
mov ecx, dword [ebp - 0x1c]
cmp esi, dword [ebp - 0x14]
jge 0x46d4c7
mov eax, esi
mov ecx, dword [ecx]
cdq
idiv edi
lea esi, [edx + eax*8]
mov dword [ebx + esi*4 + 8], ecx
mov ecx, dword [ebx + 0x3d0]
mov esi, dword [ebp - 0x10]
sub ecx, eax
lea ecx, [edx + ecx*8]
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx]
add edx, 4
mov dword [ebx + ecx*4 + 0x1e8], eax
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp + 0xc]
inc eax
inc esi
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x10], esi
cmp eax, ecx
jl 0x46d476
cmp esi, dword [ebp - 0x14]
jl 0x46d353
xor esi, esi
inc esi
cmp dword [ebx + 0x3d0], esi
jle 0x46d541
lea eax, [ebx + 0x208]
mov dword [ebp + 0xc], eax
test edi, edi
jle 0x46d532
mov ebx, edi
mov dword [ebp - 0x20], eax
mov edi, eax
mov edx, dword [edi]
mov eax, edx
sar eax, 0x18
movzx ecx, al
mov eax, edx
sar eax, 0x10
movzx eax, al
mov ecx, dword [ecx*4 + 0x4b0ae0]
xor ecx, dword [eax*4 + 0x4b06e0]
mov eax, edx
sar eax, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x4b02e0]
movzx eax, dl
xor ecx, dword [eax*4 + 0x4afee0]
mov dword [edi], ecx
lea edi, [edi + 4]
sub ebx, 1
jne 0x46d4e6
mov ebx, dword [ebp - 0x24]
mov edi, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
inc esi
add eax, 0x20
mov dword [ebp + 0xc], eax
cmp esi, dword [ebx + 0x3d0]
jl 0x46d4db
mov byte [ebx + 4], 1
call fcn.0042db2f
ret 0x10
mov edx, 0x4afe40
lea ecx, [ebp + 0xc]
call fcn.0049d3da
and dword [ebp - 4], 0
mov ecx, eax
call dword [sym.imp.mfc140u.dll_Ordinal_1665]
push eax
lea ecx, [ebp - 0x30]
call fcn.0041ed98
push 0x4d2244
lea eax, [ebp - 0x30]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
int3