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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x1c]
push ebx
mov ebx, dword [ecx]
xor edx, edx
div ebx
mov dword [ebp - 0x3c], ebx
test edx, edx
jne 0x40f637
mov eax, dword [ecx + 4]
push esi
push edi
mov dword [ebp - 4], eax
cmp byte [ebp + 8], dl
je 0x40efcf
mov edi, dword [ebp + 0x14]
add ecx, 8
mov dword [ebp + 0xc], ecx
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x28], 0x427238
mov dword [ebp - 0x24], 0x427638
mov dword [ebp - 0x20], 0x427a38
mov dword [ebp - 0x2c], 0x427e38
mov esi, str.cw
mov dword [ebp - 0x1c], 4
jmp 0x40f01d
mov ecx, dword [ebp + 0x14]
lea edi, [ecx + ebx - 4]
mov ecx, dword [ebp + 0x18]
lea ecx, [ecx + ebx - 4]
mov dword [ebp + 0x18], ecx
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x28], 0x428238
mov dword [ebp - 0x24], 0x428638
mov dword [ebp - 0x20], 0x428a38
mov dword [ebp - 0x2c], 0x428e38
mov esi, 0x427138
mov dword [ebp - 0x1c], 0xfffffffc
test ecx, ecx
je 0x40f013
lea ecx, [ecx + ebx - 4]
mov edx, dword [ebp + 0xc]
lea eax, [edx + eax*4 + 8]
mov dword [ebp + 0xc], eax
test ecx, ecx
je 0x40f0b7
movzx ebx, byte [ecx]
movzx eax, byte [ecx + 1]
shl ebx, 8
or ebx, eax
movzx eax, byte [ecx + 2]
shl ebx, 8
or ebx, eax
movzx eax, byte [ecx + 3]
add ecx, dword [ebp - 0x1c]
shl ebx, 8
movzx edx, byte [ecx + 1]
or ebx, eax
movzx eax, byte [ecx]
shl eax, 8
or eax, edx
movzx edx, byte [ecx + 2]
shl eax, 8
or eax, edx
movzx edx, byte [ecx + 3]
add ecx, dword [ebp - 0x1c]
shl eax, 8
or eax, edx
movzx edx, byte [ecx + 1]
mov dword [ebp - 0x38], eax
movzx eax, byte [ecx]
shl eax, 8
or eax, edx
movzx edx, byte [ecx + 2]
shl eax, 8
or eax, edx
movzx edx, byte [ecx + 3]
add ecx, dword [ebp - 0x1c]
shl eax, 8
or eax, edx
movzx edx, byte [ecx + 1]
mov dword [ebp - 0x34], eax
movzx eax, byte [ecx]
shl eax, 8
or eax, edx
movzx edx, byte [ecx + 2]
shl eax, 8
or eax, edx
movzx edx, byte [ecx + 3]
shl eax, 8
or eax, edx
add ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x30], eax
jmp 0x40f0ba
mov ebx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x3c]
cdq
and edx, 3
add edx, eax
mov eax, dword [ebp - 4]
sar edx, 2
sub eax, edx
mov edx, dword [ebp + 0xc]
lea eax, [edx + eax*4]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp + 0x1c]
add eax, edi
mov dword [ebp - 0x58], eax
cmp edi, eax
jae 0x40f5bd
lea eax, [edi + 5]
mov edi, dword [ebp + 0x18]
add edi, 6
mov dword [ebp - 0x44], edi
movzx edx, byte [eax - 5]
movzx ebx, byte [eax - 4]
shl edx, 8
or edx, ebx
movzx ebx, byte [eax - 3]
shl edx, 8
or edx, ebx
movzx ebx, byte [eax - 2]
shl edx, 8
or edx, ebx
cmp byte [ebp + 8], 0
mov dword [ebp - 4], edx
je 0x40f1a6
movzx edx, byte [eax - 1]
movzx ebx, byte [eax]
shl edx, 8
or edx, ebx
movzx ebx, byte [eax + 1]
shl edx, 8
or edx, ebx
movzx ebx, byte [eax + 2]
shl edx, 8
or edx, ebx
movzx ebx, byte [eax + 4]
mov dword [ebp + 0x18], edx
movzx edx, byte [eax + 3]
shl edx, 8
or edx, ebx
movzx ebx, byte [eax + 5]
shl edx, 8
or edx, ebx
movzx ebx, byte [eax + 6]
shl edx, 8
or edx, ebx
movzx ebx, byte [eax + 8]
mov dword [ebp + 0x14], edx
movzx edx, byte [eax + 7]
shl edx, 8
or edx, ebx
movzx ebx, byte [eax + 9]
shl edx, 8
or edx, ebx
movzx ebx, byte [eax + 0xa]
shl edx, 8
or edx, ebx
mov dword [ebp - 0x10], edx
test ecx, ecx
je 0x40f23d
mov edx, dword [ebp - 0x18]
xor dword [ebp - 4], edx
mov edx, dword [ebp - 0x38]
xor dword [ebp + 0x18], edx
mov edx, dword [ebp - 0x34]
xor dword [ebp + 0x14], edx
mov edx, dword [ebp - 0x30]
xor dword [ebp - 0x10], edx
jmp 0x40f23d
movzx edx, byte [eax - 9]
movzx ebx, byte [eax - 8]
shl edx, 8
or edx, ebx
movzx ebx, byte [eax - 7]
shl edx, 8
or edx, ebx
movzx ebx, byte [eax - 6]
shl edx, 8
or edx, ebx
movzx ebx, byte [eax - 0xc]
mov dword [ebp + 0x18], edx
movzx edx, byte [eax - 0xd]
shl edx, 8
or edx, ebx
movzx ebx, byte [eax - 0xb]
shl edx, 8
or edx, ebx
movzx ebx, byte [eax - 0xa]
shl edx, 8
or edx, ebx
movzx ebx, byte [eax - 0x10]
mov dword [ebp + 0x14], edx
movzx edx, byte [eax - 0x11]
shl edx, 8
or edx, ebx
movzx ebx, byte [eax - 0xf]
shl edx, 8
or edx, ebx
movzx ebx, byte [eax - 0xe]
shl edx, 8
or edx, ebx
mov dword [ebp - 0x10], edx
test ecx, ecx
je 0x40f23d
mov ebx, dword [ebp - 0x18]
mov dword [ebp - 0x48], ebx
mov ebx, dword [ebp - 0x38]
mov dword [ebp - 0x4c], ebx
mov ebx, dword [ebp - 0x34]
mov dword [ebp - 0x50], ebx
mov ebx, dword [ebp - 0x30]
mov dword [ebp - 0x54], ebx
mov ebx, dword [ebp - 4]
mov dword [ebp - 0x18], ebx
mov ebx, dword [ebp + 0x18]
mov dword [ebp - 0x38], ebx
mov ebx, dword [ebp + 0x14]
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], edx
mov edx, dword [ebp + 0xc]
mov edx, dword [edx]
xor edx, dword [ebp - 4]
add eax, dword [ebp - 0x3c]
mov dword [ebp + 0x1c], edx
mov edx, dword [ebp + 0xc]
mov edx, dword [edx + 4]
xor edx, dword [ebp + 0x18]
mov dword [ebp - 8], edx
mov edx, dword [ebp + 0xc]
mov edx, dword [edx + 8]
xor edx, dword [ebp + 0x14]
mov dword [ebp - 0xc], edx
mov edx, dword [ebp + 0xc]
mov edx, dword [edx + 0xc]
xor edx, dword [ebp - 0x10]
mov dword [ebp + 0x10], edx
mov edx, dword [ebp + 0xc]
add edx, 0x10
mov dword [ebp - 0x14], edx
cmp edx, dword [ebp - 0x40]
je 0x40f38f
mov edx, dword [ebp + 0x10]
mov ebx, dword [ebp - 0xc]
shr edx, 8
shr ebx, 0x10
movzx edx, dl
movzx edi, bl
mov ebx, dword [ebp - 0x20]
mov edx, dword [ebx + edx*4]
mov ebx, dword [ebp - 0x24]
xor edx, dword [ebx + edi*4]
mov edi, dword [ebp - 8]
mov ebx, dword [ebp - 0x28]
shr edi, 0x18
xor edx, dword [ebx + edi*4]
movzx edi, byte [ebp + 0x1c]
mov ebx, dword [ebp - 0x2c]
xor edx, dword [ebx + edi*4]
mov ebx, dword [ebp + 0x1c]
mov dword [ebp + 0x18], edx
mov edx, dword [ebp + 0x10]
shr edx, 0x10
shr ebx, 8
movzx edx, dl
movzx edi, bl
mov ebx, dword [ebp - 0x24]
mov edx, dword [ebx + edx*4]
mov ebx, dword [ebp - 0x20]
xor edx, dword [ebx + edi*4]
mov edi, dword [ebp - 0xc]
mov ebx, dword [ebp - 0x28]
shr edi, 0x18
xor edx, dword [ebx + edi*4]
movzx edi, byte [ebp - 8]
mov ebx, dword [ebp - 0x2c]
xor edx, dword [ebx + edi*4]
mov ebx, dword [ebp + 0x1c]
mov dword [ebp + 0x14], edx
mov edx, dword [ebp - 8]
shr edx, 8
shr ebx, 0x10
movzx edi, bl
mov ebx, dword [ebp - 0x20]
movzx edx, dl
mov edx, dword [ebx + edx*4]
mov ebx, dword [ebp - 0x24]
xor edx, dword [ebx + edi*4]
mov edi, dword [ebp + 0x10]
mov ebx, dword [ebp - 0x28]
shr edi, 0x18
xor edx, dword [ebx + edi*4]
movzx edi, byte [ebp - 0xc]
mov ebx, dword [ebp - 0x2c]
xor edx, dword [ebx + edi*4]
mov ebx, dword [ebp - 8]
mov dword [ebp - 0x10], edx
mov edx, dword [ebp - 0xc]
shr edx, 8
shr ebx, 0x10
movzx edx, dl
movzx edi, bl
mov ebx, dword [ebp - 0x20]
mov ebx, dword [ebx + edx*4]
mov edx, dword [ebp - 0x24]
xor ebx, dword [edx + edi*4]
mov edx, dword [ebp + 0x1c]
mov edi, dword [ebp - 0x28]
shr edx, 0x18
xor ebx, dword [edi + edx*4]
movzx edx, byte [ebp + 0x10]
mov edi, dword [ebp - 0x2c]
xor ebx, dword [edi + edx*4]
mov edx, dword [ebp - 0x14]
mov edi, dword [edx + 4]
xor edi, dword [ebp + 0x18]
xor ebx, dword [edx]
mov dword [ebp - 8], edi
mov edi, dword [edx + 8]
xor edi, dword [ebp + 0x14]
mov dword [ebp + 0x1c], ebx
mov dword [ebp - 0xc], edi
mov edi, dword [edx + 0xc]
xor edi, dword [ebp - 0x10]
add edx, 0x10
mov dword [ebp + 0x10], edi
mov dword [ebp - 0x14], edx
cmp edx, dword [ebp - 0x40]
jne 0x40f281
mov edi, dword [ebp - 0x44]
mov ebx, dword [ebp - 8]
shr ebx, 0x10
movzx ebx, bl
movzx ebx, byte [ebx + esi]
mov edx, dword [ebp + 0x1c]
shr edx, 0x18
movzx edx, byte [edx + esi]
shl edx, 8
xor edx, ebx
mov ebx, dword [ebp - 0xc]
shr ebx, 8
movzx ebx, bl
movzx ebx, byte [ebx + esi]
shl edx, 8
xor edx, ebx
movzx ebx, byte [ebp + 0x10]
movzx ebx, byte [ebx + esi]
shl edx, 8
xor edx, ebx
mov ebx, dword [ebp - 0x14]
xor edx, dword [ebx]
mov ebx, dword [ebp - 8]
mov dword [ebp - 4], edx
mov edx, dword [ebp - 0xc]
shr ebx, 0x18
movzx ebx, byte [ebx + esi]
shr edx, 0x10
movzx edx, dl
movzx edx, byte [edx + esi]
shl ebx, 8
xor edx, ebx
mov ebx, dword [ebp + 0x10]
shr ebx, 8
movzx ebx, bl
movzx ebx, byte [ebx + esi]
shl edx, 8
xor edx, ebx
movzx ebx, byte [ebp + 0x1c]
movzx ebx, byte [ebx + esi]
shl edx, 8
xor edx, ebx
mov ebx, dword [ebp - 0x14]
xor edx, dword [ebx + 4]
mov ebx, dword [ebp + 0x10]
mov dword [ebp + 0x18], edx
mov edx, dword [ebp - 0xc]
shr ebx, 0x10
movzx ebx, bl
movzx ebx, byte [ebx + esi]
shr edx, 0x18
movzx edx, byte [edx + esi]
shl edx, 8
xor edx, ebx
mov ebx, dword [ebp + 0x1c]
shr ebx, 8
movzx ebx, bl
movzx ebx, byte [ebx + esi]
shl edx, 8
xor edx, ebx
movzx ebx, byte [ebp - 8]
movzx ebx, byte [ebx + esi]
shl edx, 8
xor edx, ebx
mov ebx, dword [ebp - 0x14]
xor edx, dword [ebx + 8]
mov ebx, dword [ebp + 0x1c]
mov dword [ebp + 0x14], edx
mov edx, dword [ebp + 0x10]
shr ebx, 0x10
shr edx, 0x18
movzx edx, byte [edx + esi]
movzx ebx, bl
movzx ebx, byte [ebx + esi]
shl edx, 8
xor edx, ebx
mov ebx, dword [ebp - 8]
shr ebx, 8
movzx ebx, bl
movzx ebx, byte [ebx + esi]
shl edx, 8
xor edx, ebx
movzx ebx, byte [ebp - 0xc]
movzx ebx, byte [ebx + esi]
shl edx, 8
xor edx, ebx
mov ebx, dword [ebp - 0x14]
xor edx, dword [ebx + 0xc]
test ecx, ecx
je 0x40f4d1
cmp byte [ebp + 8], 0
je 0x40f4bc
mov ebx, dword [ebp - 4]
mov dword [ebp - 0x18], ebx
mov ebx, dword [ebp + 0x18]
mov dword [ebp - 0x38], ebx
mov ebx, dword [ebp + 0x14]
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], edx
jmp 0x40f4d1
mov ebx, dword [ebp - 0x48]
xor dword [ebp - 4], ebx
mov ebx, dword [ebp - 0x4c]
xor dword [ebp + 0x18], ebx
mov ebx, dword [ebp - 0x50]
xor dword [ebp + 0x14], ebx
xor edx, dword [ebp - 0x54]
lea ebx, [edi - 6]
test ebx, ebx
je 0x40f5ae
mov ebx, dword [ebp - 4]
mov byte [edi - 3], bl
shr ebx, 8
mov byte [edi - 4], bl
mov ebx, dword [ebp - 4]
shr ebx, 0x10
mov byte [edi - 5], bl
mov ebx, dword [ebp - 4]
shr ebx, 0x18
cmp byte [ebp + 8], 0
mov byte [edi - 6], bl
mov ebx, dword [ebp + 0x18]
je 0x40f556
mov byte [edi + 1], bl
shr ebx, 8
mov byte [edi], bl
mov ebx, dword [ebp + 0x18]
shr ebx, 0x10
mov byte [edi - 1], bl
mov ebx, dword [ebp + 0x18]
shr ebx, 0x18
mov byte [edi - 2], bl
mov ebx, dword [ebp + 0x14]
mov byte [edi + 5], bl
shr ebx, 8
mov byte [edi + 4], bl
mov ebx, dword [ebp + 0x14]
shr ebx, 0x10
mov byte [edi + 3], bl
mov ebx, dword [ebp + 0x14]
shr ebx, 0x18
mov byte [edi + 2], bl
mov ebx, edx
shr ebx, 8
mov byte [edi + 8], bl
mov ebx, edx
shr ebx, 0x10
mov byte [edi + 9], dl
shr edx, 0x18
mov byte [edi + 7], bl
mov byte [edi + 6], dl
jmp 0x40f5a8
mov byte [edi - 7], bl
shr ebx, 8
mov byte [edi - 8], bl
mov ebx, dword [ebp + 0x18]
shr ebx, 0x10
mov byte [edi - 9], bl
mov ebx, dword [ebp + 0x18]
shr ebx, 0x18
mov byte [edi - 0xa], bl
mov ebx, dword [ebp + 0x14]
mov byte [edi - 0xb], bl
shr ebx, 8
mov byte [edi - 0xc], bl
mov ebx, dword [ebp + 0x14]
shr ebx, 0x10
mov byte [edi - 0xd], bl
mov ebx, dword [ebp + 0x14]
shr ebx, 0x18
mov byte [edi - 0xe], bl
mov ebx, edx
shr ebx, 8
mov byte [edi - 0x10], bl
mov ebx, edx
shr ebx, 0x10
mov byte [edi - 0xf], dl
shr edx, 0x18
mov byte [edi - 0x11], bl
mov byte [edi - 0x12], dl
add edi, dword [ebp - 0x3c]
mov dword [ebp - 0x44], edi
lea edx, [eax - 5]
cmp edx, dword [ebp - 0x58]
jb 0x40f0f0
mov ebx, dword [ebp - 0x18]
test ecx, ecx
je 0x40f635
mov eax, dword [ebp - 0x30]
mov esi, dword [ebp - 0x1c]
mov edx, eax
shr edx, 8
sub ecx, esi
mov byte [ecx + 2], dl
mov byte [ecx + 3], al
mov edx, eax
shr eax, 0x18
mov byte [ecx], al
mov eax, dword [ebp - 0x34]
shr edx, 0x10
mov byte [ecx + 1], dl
mov edx, eax
shr edx, 8
sub ecx, esi
mov byte [ecx + 3], al
mov byte [ecx + 2], dl
mov edx, eax
shr eax, 0x18
mov byte [ecx], al
mov eax, dword [ebp - 0x38]
shr edx, 0x10
mov byte [ecx + 1], dl
mov edx, eax
sub ecx, esi
mov byte [ecx + 3], al
shr edx, 8
mov byte [ecx + 2], dl
mov edx, eax
shr eax, 0x18
mov byte [ecx], al
shr edx, 0x10
mov byte [ecx + 1], dl
sub ecx, esi
mov eax, ebx
shr eax, 8
mov byte [ecx + 2], al
mov eax, ebx
shr eax, 0x10
mov byte [ecx + 3], bl
shr ebx, 0x18
mov byte [ecx + 1], al
mov byte [ecx], bl
pop edi
pop esi
pop ebx
leave
ret 0x18