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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push esi
mov esi, ecx
cmp byte [esi + 4], 0
push edi
mov dword [ebp - 0x18], esi
jne 0x4018a6
push section..data
lea ecx, [ebp - 0x24]
call fcn.00403363
push 0x412ed0
lea eax, [ebp - 0x24]
push eax
call fcn.00403416
mov eax, dword [ebp + 8]
movzx ecx, byte [eax]
movzx edx, byte [eax + 1]
shl ecx, 0x18
movzx edi, byte [eax + 4]
shl edx, 0x10
or ecx, edx
movzx edx, byte [eax + 2]
shl edx, 8
or ecx, edx
movzx edx, byte [eax + 3]
or ecx, edx
xor ecx, dword [esi + 0x1e8]
movzx edx, byte [eax + 8]
mov dword [ebp - 4], ecx
movzx ecx, byte [eax + 5]
shl ecx, 0x10
shl edi, 0x18
or edi, ecx
movzx ecx, byte [eax + 6]
shl ecx, 8
or edi, ecx
movzx ecx, byte [eax + 7]
movzx ebx, byte [eax + 0xd]
or edi, ecx
movzx ecx, byte [eax + 9]
shl ecx, 0x10
shl edx, 0x18
or edx, ecx
movzx ecx, byte [eax + 0xa]
xor edi, dword [esi + 0x1ec]
shl ecx, 8
or edx, ecx
movzx ecx, byte [eax + 0xb]
or edx, ecx
movzx ecx, byte [eax + 0xc]
xor edx, dword [esi + 0x1f0]
shl ebx, 0x10
shl ecx, 0x18
or ecx, ebx
movzx ebx, byte [eax + 0xe]
movzx eax, byte [eax + 0xf]
shl ebx, 8
or ebx, eax
or ebx, ecx
xor ebx, dword [esi + 0x1f4]
mov ecx, dword [esi + 0x3d0]
mov dword [ebp - 8], ebx
mov dword [ebp - 0x14], ecx
mov eax, 0xff
cmp ecx, 1
jle 0x401a75
add esi, 0x210
dec ecx
mov dword [ebp + 8], esi
mov dword [ebp - 0xc], ecx
sar ebx, 8
and ebx, eax
mov esi, dword [ebx*4 + 0x40f3e0]
mov ecx, edi
sar ecx, 0x18
and ecx, eax
xor esi, dword [ecx*4 + 0x40ebe0]
mov ecx, dword [ebp - 4]
sar ecx, 0x10
and ecx, eax
xor esi, dword [ecx*4 + 0x40efe0]
mov ecx, edx
and ecx, eax
xor esi, dword [ecx*4 + 0x40f7e0]
mov ecx, dword [ebp + 8]
xor esi, dword [ecx - 4]
mov ecx, edx
sar ecx, 0x18
and ecx, eax
mov ecx, dword [ecx*4 + 0x40ebe0]
mov ebx, edi
sar ebx, 0x10
and ebx, eax
xor ecx, dword [ebx*4 + 0x40efe0]
mov ebx, dword [ebp - 4]
sar ebx, 8
and ebx, eax
xor ecx, dword [ebx*4 + 0x40f3e0]
mov ebx, dword [ebp - 8]
and ebx, eax
xor ecx, dword [ebx*4 + 0x40f7e0]
mov ebx, dword [ebp + 8]
xor ecx, dword [ebx]
mov ebx, edx
sar ebx, 0x10
and ebx, eax
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebp - 8]
sar ecx, 0x18
and ecx, eax
mov ecx, dword [ecx*4 + 0x40ebe0]
xor ecx, dword [ebx*4 + 0x40efe0]
mov ebx, edi
sar ebx, 8
and ebx, eax
xor ecx, dword [ebx*4 + 0x40f3e0]
mov ebx, dword [ebp - 4]
and ebx, eax
xor ecx, dword [ebx*4 + 0x40f7e0]
mov ebx, dword [ebp + 8]
xor ecx, dword [ebx + 4]
mov ebx, dword [ebp - 8]
sar ebx, 0x10
and ebx, eax
mov ebx, dword [ebx*4 + 0x40efe0]
sar edx, 8
and edx, eax
xor ebx, dword [edx*4 + 0x40f3e0]
mov edx, dword [ebp - 4]
sar edx, 0x18
and edx, eax
xor ebx, dword [edx*4 + 0x40ebe0]
mov edx, dword [ebp + 8]
add dword [ebp + 8], 0x20
and edi, eax
xor ebx, dword [edi*4 + 0x40f7e0]
mov edi, esi
xor ebx, dword [edx - 8]
dec dword [ebp - 0xc]
mov edx, dword [ebp - 0x10]
mov dword [ebp - 4], ebx
mov ebx, ecx
mov dword [ebp - 8], ebx
jne 0x401966
mov ecx, dword [ebp - 0x14]
mov esi, dword [ebp - 0x18]
shl ecx, 5
lea esi, [ecx + esi + 0x1e8]
mov ecx, dword [ebp - 4]
sar ecx, 0x18
and ecx, eax
sar ebx, 0x10
and ebx, eax
mov dword [ebp - 0xc], esi
mov esi, dword [esi]
mov dword [ebp - 0x18], edx
mov dword [ebp + 8], esi
mov edx, esi
mov esi, dword [ebp + 0xc]
sar edx, 0x18
xor dl, byte [ecx + 0x40dae0]
mov ecx, dword [ebp + 8]
sar ecx, 0x10
mov byte [esi], dl
xor cl, byte [ebx + 0x40dae0]
mov edx, dword [ebp - 0x18]
mov byte [esi + 1], cl
mov ebx, dword [ebp + 8]
sar ebx, 8
mov ecx, edx
sar ecx, 8
and ecx, eax
xor bl, byte [ecx + 0x40dae0]
mov ecx, edi
and ecx, eax
mov byte [esi + 2], bl
mov cl, byte [ecx + 0x40dae0]
xor cl, byte [ebp + 8]
mov ebx, edi
mov byte [esi + 3], cl
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 4]
mov dword [ebp + 8], ecx
sar ecx, 0x18
sar ebx, 0x18
and ebx, eax
xor cl, byte [ebx + 0x40dae0]
mov ebx, dword [ebp + 8]
mov byte [esi + 4], cl
mov ecx, dword [ebp - 4]
sar ecx, 0x10
and ecx, eax
sar ebx, 0x10
xor bl, byte [ecx + 0x40dae0]
mov ecx, dword [ebp - 8]
sar ecx, 8
mov byte [esi + 5], bl
mov ebx, dword [ebp + 8]
and ecx, eax
sar ebx, 8
xor bl, byte [ecx + 0x40dae0]
mov ecx, edx
and ecx, eax
mov byte [esi + 6], bl
mov cl, byte [ecx + 0x40dae0]
xor cl, byte [ebp + 8]
mov ebx, edx
mov byte [esi + 7], cl
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 8]
mov dword [ebp + 8], ecx
sar ebx, 0x18
sar ecx, 0x18
and ebx, eax
xor cl, byte [ebx + 0x40dae0]
mov ebx, dword [ebp + 8]
mov byte [esi + 8], cl
mov ecx, edi
sar ecx, 0x10
and ecx, eax
sar ebx, 0x10
xor bl, byte [ecx + 0x40dae0]
mov ecx, dword [ebp - 4]
sar ecx, 8
mov byte [esi + 9], bl
mov ebx, dword [ebp + 8]
and ecx, eax
sar ebx, 8
xor bl, byte [ecx + 0x40dae0]
mov ecx, dword [ebp - 8]
and ecx, eax
mov byte [esi + 0xa], bl
mov cl, byte [ecx + 0x40dae0]
xor cl, byte [ebp + 8]
sar edx, 0x10
mov byte [esi + 0xb], cl
mov ecx, dword [ebp - 0xc]
mov ebx, dword [ecx + 0xc]
mov ecx, dword [ebp - 8]
sar ecx, 0x18
and ecx, eax
mov dword [ebp + 8], ebx
sar ebx, 0x18
xor bl, byte [ecx + 0x40dae0]
mov ecx, dword [ebp + 8]
sar ecx, 0x10
mov byte [esi + 0xc], bl
and edx, eax
xor cl, byte [edx + 0x40dae0]
sar edi, 8
mov byte [esi + 0xd], cl
mov ecx, dword [ebp + 8]
and edi, eax
sar ecx, 8
xor cl, byte [edi + 0x40dae0]
pop edi
mov byte [esi + 0xe], cl
mov ecx, dword [ebp - 4]
and ecx, eax
mov al, byte [ecx + 0x40dae0]
xor al, byte [ebp + 8]
mov byte [esi + 0xf], al
pop esi
pop ebx
leave
ret 8