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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov al, byte [0x101a8754]
test al, al
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x20], esi
jne 0x1007ecac
call fcn.10084580
mov al, byte [0x101a8758]
test al, al
je 0x1007f0a8
mov ecx, dword [esi + 0xc]
mov eax, dword [esi + 0x18]
shl ecx, 4
add ecx, eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], ecx
mov edx, dword [0x101957dc]
mov edi, dword [ebp + 8]
mov esi, dword [ebp - 0x10]
movd mm5, dword [ebp - 0x14]
push ebp
lea ebp, [0x101483f0]
mov eax, dword [esi]
xor eax, dword [edi]
movd mm0, eax
mov ebx, dword [esi + 4]
xor ebx, dword [edi + 4]
movd mm1, ebx
and ebx, eax
mov eax, dword [esi + 8]
xor eax, dword [edi + 8]
movd mm2, eax
and ebx, eax
mov ecx, dword [esi + 0xc]
xor ecx, dword [edi + 0xc]
and ebx, ecx
and ebx, 0
mov edi, ebx
and ebx, dword [ebp + edi]
add edi, edx
and ebx, dword [ebp + edi]
add edi, edx
and ebx, dword [ebp + edi]
add edi, edx
and ebx, dword [ebp + edi]
add edi, edx
cmp edi, 0x400
jl 0x1007ed0b
and ebx, dword [ebp + 0x3fc]
movd mm6, ebx
pxor mm2, mm6
pxor mm1, mm6
pxor mm0, mm6
xor ecx, ebx
mov edi, dword [esi + 0x10]
mov eax, dword [esi + 0x14]
mov ebx, dword [esi + 0x18]
mov edx, dword [esi + 0x1c]
add esi, 0x20
movd mm4, esi
movzx esi, cl
xor edx, dword [ebp + esi*4]
movzx esi, ch
xor ebx, dword [ebp + esi*4 + 0x400]
shr ecx, 0x10
movzx esi, cl
xor eax, dword [ebp + esi*4 + 0x800]
movzx esi, ch
xor edi, dword [ebp + esi*4 + 0xc00]
movd ecx, mm2
movzx esi, cl
xor ebx, dword [ebp + esi*4]
movzx esi, ch
xor eax, dword [ebp + esi*4 + 0x400]
shr ecx, 0x10
movzx esi, cl
xor edi, dword [ebp + esi*4 + 0x800]
movzx esi, ch
xor edx, dword [ebp + esi*4 + 0xc00]
movd ecx, mm1
movzx esi, cl
xor eax, dword [ebp + esi*4]
movzx esi, ch
xor edi, dword [ebp + esi*4 + 0x400]
shr ecx, 0x10
movzx esi, cl
xor edx, dword [ebp + esi*4 + 0x800]
movzx esi, ch
xor ebx, dword [ebp + esi*4 + 0xc00]
movd ecx, mm0
movzx esi, cl
xor edi, dword [ebp + esi*4]
movzx esi, ch
xor edx, dword [ebp + esi*4 + 0x400]
shr ecx, 0x10
movzx esi, cl
xor ebx, dword [ebp + esi*4 + 0x800]
movzx esi, ch
xor eax, dword [ebp + esi*4 + 0xc00]
movd mm2, ebx
movd mm1, eax
movd mm0, edi
movd esi, mm4
mov edi, dword [esi]
mov eax, dword [esi + 4]
mov ebx, dword [esi + 8]
mov ecx, dword [esi + 0xc]
movzx esi, dl
xor edi, dword [ebp + esi*4 + 0xc00]
movzx esi, dh
xor eax, dword [ebp + esi*4 + 0x800]
shr edx, 0x10
movzx esi, dl
xor ebx, dword [ebp + esi*4 + 0x400]
movzx esi, dh
xor ecx, dword [ebp + esi*4]
movd edx, mm2
movzx esi, dl
xor ecx, dword [ebp + esi*4 + 0xc00]
movzx esi, dh
xor edi, dword [ebp + esi*4 + 0x800]
shr edx, 0x10
movzx esi, dl
xor eax, dword [ebp + esi*4 + 0x400]
movzx esi, dh
xor ebx, dword [ebp + esi*4]
movd edx, mm1
movzx esi, dl
xor ebx, dword [ebp + esi*4 + 0xc00]
movzx esi, dh
xor ecx, dword [ebp + esi*4 + 0x800]
shr edx, 0x10
movzx esi, dl
xor edi, dword [ebp + esi*4 + 0x400]
movzx esi, dh
xor eax, dword [ebp + esi*4]
movd edx, mm0
movzx esi, dl
xor eax, dword [ebp + esi*4 + 0xc00]
movzx esi, dh
xor ebx, dword [ebp + esi*4 + 0x800]
shr edx, 0x10
movzx esi, dl
xor ecx, dword [ebp + esi*4 + 0x400]
movzx esi, dh
xor edi, dword [ebp + esi*4]
movd esi, mm4
movd mm2, ebx
movd mm1, eax
movd mm0, edi
mov edi, dword [esi + 0x10]
mov eax, dword [esi + 0x14]
mov ebx, dword [esi + 0x18]
mov edx, dword [esi + 0x1c]
movzx esi, cl
xor edi, dword [ebp + esi*4 + 0xc00]
movzx esi, ch
xor eax, dword [ebp + esi*4 + 0x800]
shr ecx, 0x10
movzx esi, cl
xor ebx, dword [ebp + esi*4 + 0x400]
movzx esi, ch
xor edx, dword [ebp + esi*4]
movd ecx, mm2
movzx esi, cl
xor edx, dword [ebp + esi*4 + 0xc00]
movzx esi, ch
xor edi, dword [ebp + esi*4 + 0x800]
shr ecx, 0x10
movzx esi, cl
xor eax, dword [ebp + esi*4 + 0x400]
movzx esi, ch
xor ebx, dword [ebp + esi*4]
movd ecx, mm1
movzx esi, cl
xor ebx, dword [ebp + esi*4 + 0xc00]
movzx esi, ch
xor edx, dword [ebp + esi*4 + 0x800]
shr ecx, 0x10
movzx esi, cl
xor edi, dword [ebp + esi*4 + 0x400]
movzx esi, ch
xor eax, dword [ebp + esi*4]
movd ecx, mm0
movzx esi, cl
xor eax, dword [ebp + esi*4 + 0xc00]
movzx esi, ch
xor ebx, dword [ebp + esi*4 + 0x800]
shr ecx, 0x10
movzx esi, cl
xor edx, dword [ebp + esi*4 + 0x400]
movzx esi, ch
xor edi, dword [ebp + esi*4]
movd mm2, ebx
movd mm1, eax
movd mm0, edi
movd esi, mm4
movd edi, mm5
add esi, 0x20
movd mm4, esi
cmp edi, esi
jne 0x1007ee06
mov eax, dword [edi]
mov ecx, dword [edi + 4]
mov esi, dword [edi + 8]
mov edi, dword [edi + 0xc]
movzx ebx, dl
movzx ebx, byte [ebp + ebx*4 + 1]
shl ebx, 0x18
xor eax, ebx
movzx ebx, dh
movzx ebx, byte [ebp + ebx*4 + 1]
shl ebx, 0x10
xor ecx, ebx
shr edx, 0x10
movzx ebx, dl
shr edx, 8
movzx ebx, byte [ebp + ebx*4 + 1]
shl ebx, 8
xor esi, ebx
movzx ebx, byte [ebp + edx*4 + 1]
xor edi, ebx
movd edx, mm2
movzx ebx, dl
movzx ebx, byte [ebp + ebx*4 + 1]
shl ebx, 0x18
xor edi, ebx
movzx ebx, dh
movzx ebx, byte [ebp + ebx*4 + 1]
shl ebx, 0x10
xor eax, ebx
shr edx, 0x10
movzx ebx, dl
shr edx, 8
movzx ebx, byte [ebp + ebx*4 + 1]
shl ebx, 8
xor ecx, ebx
movzx ebx, byte [ebp + edx*4 + 1]
xor esi, ebx
movd edx, mm1
movzx ebx, dl
movzx ebx, byte [ebp + ebx*4 + 1]
shl ebx, 0x18
xor esi, ebx
movzx ebx, dh
movzx ebx, byte [ebp + ebx*4 + 1]
shl ebx, 0x10
xor edi, ebx
shr edx, 0x10
movzx ebx, dl
shr edx, 8
movzx ebx, byte [ebp + ebx*4 + 1]
shl ebx, 8
xor eax, ebx
movzx ebx, byte [ebp + edx*4 + 1]
xor ecx, ebx
movd edx, mm0
movzx ebx, dl
movzx ebx, byte [ebp + ebx*4 + 1]
shl ebx, 0x18
xor ecx, ebx
movzx ebx, dh
movzx ebx, byte [ebp + ebx*4 + 1]
shl ebx, 0x10
xor esi, ebx
shr edx, 0x10
movzx ebx, dl
shr edx, 8
movzx ebx, byte [ebp + ebx*4 + 1]
shl ebx, 8
xor edi, ebx
movzx ebx, byte [ebp + edx*4 + 1]
xor eax, ebx
emms
pop ebp
mov ebx, dword [ebp + 0xc]
test ebx, ebx
je 0x1007f091
xor eax, dword [ebx]
xor ecx, dword [ebx + 4]
xor esi, dword [ebx + 8]
xor edi, dword [ebx + 0xc]
mov ebx, dword [ebp + 0x10]
mov dword [ebx], eax
mov dword [ebx + 4], ecx
mov dword [ebx + 8], esi
mov dword [ebx + 0xc], edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov esi, dword [esi + 0x18]
mov edx, dword [ebp + 8]
mov edi, dword [edx + 4]
mov eax, dword [edx]
mov ebx, dword [esi]
mov ecx, dword [esi + 4]
xor ecx, edi
mov edi, dword [esi + 8]
xor eax, ebx
xor edi, dword [edx + 8]
mov ebx, dword [edx + 0xc]
mov edx, dword [esi + 0x10]
mov dword [ebp - 4], edx
mov edx, dword [esi + 0x14]
mov dword [ebp - 0xc], edi
mov edi, dword [esi + 0xc]
mov dword [ebp - 8], edx
mov edx, dword [esi + 0x18]
xor edi, ebx
mov ebx, dword [esi + 0x1c]
mov dword [ebp + 8], edx
mov dl, byte [0x101a8754]
add esi, 0x20
test dl, dl
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x18], edi
jne 0x1007f103
call fcn.10084580
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x10]
xor edi, edi
xor edx, edx
jmp 0x1007f110
mov edi, dword [ebp - 0x10]
lea esp, [esp]
and edi, dword [edx + 0x101483f0]
mov dword [ebp - 0x10], edi
add edx, dword [0x101957dc]
cmp edx, 0x400
jb 0x1007f109
mov edx, dword [ebp - 0x10]
and edx, dword [0x101487ec]
or ecx, edx
mov edi, dword [ebp - 0xc]
or edi, edx
or eax, edx
mov dword [ebp - 0x10], edx
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0xc], edi
or edx, dword [ebp - 0x10]
movzx edi, dl
xor ebx, dword [edi*4 + 0x101483f0]
shr edx, 8
movzx edi, dl
mov edi, dword [edi*4 + 0x101483f0]
shr edx, 8
ror edi, 8
mov dword [ebp - 0x18], edi
movzx edi, dl
mov edi, dword [edi*4 + 0x101483f0]
shr edx, 8
mov edx, dword [edx*4 + 0x101483f0]
ror edi, 0x10
ror edx, 0x18
mov dword [ebp - 0x1c], edx
movzx edx, byte [ebp - 0xc]
mov edx, dword [edx*4 + 0x101483f0]
mov dword [ebp - 0x14], edi
xor edx, dword [ebp - 0x18]
mov edi, dword [ebp + 8]
xor edi, edx
mov edx, dword [ebp - 0xc]
shr edx, 8
mov dword [ebp + 8], edi
movzx edi, dl
mov edi, dword [edi*4 + 0x101483f0]
shr edx, 8
ror edi, 8
mov dword [ebp - 0x18], edi
movzx edi, dl
mov edi, dword [edi*4 + 0x101483f0]
shr edx, 8
mov edx, dword [edx*4 + 0x101483f0]
ror edi, 0x10
ror edx, 0x18
mov dword [ebp - 0xc], edx
movzx edx, cl
mov edx, dword [edx*4 + 0x101483f0]
mov dword [ebp - 0x10], edi
xor edx, dword [ebp - 0x18]
xor edx, dword [ebp - 0x14]
mov edi, dword [ebp - 8]
shr ecx, 8
xor edi, edx
movzx edx, cl
mov edx, dword [edx*4 + 0x101483f0]
shr ecx, 8
mov dword [ebp - 8], edi
movzx edi, cl
mov edi, dword [edi*4 + 0x101483f0]
shr ecx, 8
mov ecx, dword [ecx*4 + 0x101483f0]
ror edx, 8
ror edi, 0x10
ror ecx, 0x18
mov dword [ebp - 0x18], ecx
movzx ecx, al
mov ecx, dword [ecx*4 + 0x101483f0]
xor ecx, edx
xor ecx, dword [ebp - 0x10]
xor ecx, dword [ebp - 0x1c]
xor dword [ebp - 4], ecx
shr eax, 8
movzx edx, al
mov ecx, dword [edx*4 + 0x101483f0]
ror ecx, 8
xor ecx, edi
mov edi, dword [ebp - 0xc]
shr eax, 8
xor ecx, edi
mov edi, dword [ebp - 0x18]
movzx edx, al
xor ebx, ecx
mov ecx, dword [edx*4 + 0x101483f0]
mov edx, dword [ebp + 8]
ror ecx, 0x10
xor ecx, edi
mov edi, dword [ebp - 8]
shr eax, 8
xor edx, ecx
mov dword [ebp + 8], edx
mov edx, dword [eax*4 + 0x101483f0]
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0xc]
ror edx, 0x18
xor edi, edx
shr eax, 1
dec eax
mov dword [ebp - 8], edi
mov dword [ebp - 0x14], eax
jmp 0x1007f290
mov edi, dword [esi]
movzx ecx, bl
mov eax, dword [ecx*4 + 0x10148ff0]
mov ecx, dword [esi + 4]
shr ebx, 8
movzx edx, bl
xor eax, edi
mov edi, dword [edx*4 + 0x10148bf0]
xor edi, ecx
shr ebx, 8
movzx ecx, bl
mov edx, dword [ecx*4 + 0x101487f0]
mov ecx, dword [esi + 8]
shr ebx, 8
xor edx, ecx
movzx ecx, byte [ebp + 8]
mov dword [ebp - 0x20], ecx
mov ecx, dword [ebx*4 + 0x101483f0]
mov ebx, dword [ebp - 0x20]
xor ecx, dword [ebx*4 + 0x10148ff0]
xor ecx, dword [esi + 0xc]
mov ebx, dword [ebp + 8]
shr ebx, 8
mov dword [ebp + 8], ebx
movzx ebx, bl
xor eax, dword [ebx*4 + 0x10148bf0]
mov ebx, dword [ebp + 8]
shr ebx, 8
mov dword [ebp + 8], ebx
movzx ebx, bl
xor edi, dword [ebx*4 + 0x101487f0]
movzx ebx, byte [ebp - 8]
mov dword [ebp - 0x10], edi
mov edi, dword [ebp + 8]
shr edi, 8
mov edi, dword [edi*4 + 0x101483f0]
xor edi, dword [ebx*4 + 0x10148ff0]
mov ebx, dword [ebp - 8]
xor edx, edi
shr ebx, 8
movzx edi, bl
xor ecx, dword [edi*4 + 0x10148bf0]
shr ebx, 8
movzx edi, bl
xor eax, dword [edi*4 + 0x101487f0]
movzx edi, byte [ebp - 4]
shr ebx, 8
mov ebx, dword [ebx*4 + 0x101483f0]
xor ebx, dword [edi*4 + 0x10148ff0]
mov edi, dword [ebp - 0x10]
xor edi, ebx
mov ebx, dword [ebp - 4]
mov dword [ebp - 0x10], edi
shr ebx, 8
movzx edi, bl
xor edx, dword [edi*4 + 0x10148bf0]
shr ebx, 8
movzx edi, bl
xor ecx, dword [edi*4 + 0x101487f0]
shr ebx, 8
mov edi, dword [ebx*4 + 0x101483f0]
mov ebx, dword [esi + 0x10]
xor eax, edi
movzx edi, cl
mov edi, dword [edi*4 + 0x10148ff0]
xor edi, ebx
mov ebx, dword [esi + 0x14]
mov dword [ebp - 4], edi
shr ecx, 8
movzx edi, cl
mov edi, dword [edi*4 + 0x10148bf0]
xor edi, ebx
mov dword [ebp - 8], edi
shr ecx, 8
mov edi, ecx
shr edi, 8
mov edi, dword [edi*4 + 0x101483f0]
movzx ebx, dl
xor edi, dword [ebx*4 + 0x10148ff0]
mov ebx, dword [esi + 0x1c]
shr edx, 8
xor ebx, edi
mov edi, dword [ebp - 4]
mov dword [ebp - 0xc], edx
movzx edx, dl
mov edx, dword [edx*4 + 0x10148bf0]
xor edi, edx
movzx edx, byte [ebp - 0x10]
mov dword [ebp - 4], edi
mov edi, dword [ebp - 0xc]
shr edi, 8
mov dword [ebp - 0xc], edi
shr edi, 8
mov edi, dword [edi*4 + 0x101483f0]
xor edi, dword [edx*4 + 0x10148ff0]
movzx ecx, cl
mov edx, dword [ecx*4 + 0x101487f0]
mov ecx, dword [esi + 0x18]
xor edi, edx
xor edi, ecx
mov ecx, dword [ebp - 0x10]
mov dword [ebp + 8], edi
shr ecx, 8
movzx edx, cl
xor ebx, dword [edx*4 + 0x10148bf0]
movzx edi, al
shr ecx, 8
mov edx, ecx
shr edx, 8
mov edx, dword [edx*4 + 0x101483f0]
xor edx, dword [edi*4 + 0x10148ff0]
movzx edi, byte [ebp - 0xc]
xor edx, dword [edi*4 + 0x101487f0]
mov edi, dword [ebp - 8]
xor edi, edx
shr eax, 8
movzx edx, al
mov edx, dword [edx*4 + 0x10148bf0]
mov dword [ebp - 8], edi
mov edi, dword [ebp + 8]
xor edi, edx
shr eax, 8
movzx edx, al
shr eax, 8
mov dword [ebp + 8], edi
mov edi, dword [edx*4 + 0x101487f0]
mov edx, dword [eax*4 + 0x101483f0]
movzx ecx, cl
mov eax, dword [ecx*4 + 0x101487f0]
xor ebx, edi
mov edi, dword [ebp - 4]
xor edx, eax
mov eax, dword [ebp - 0x14]
xor edi, edx
add esi, 0x20
dec eax
mov dword [ebp - 4], edi
mov dword [ebp - 0x14], eax
jne 0x1007f290
xor edx, edx
xor eax, eax
jmp 0x1007f4b0
mov ecx, dword [eax + str.cw]
add eax, dword [0x101957dc]
and edx, ecx
cmp eax, 0x100
jb 0x1007f4b0
mov edi, dword [0x101482ec]
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 8]
and edx, edi
or ecx, edx
or eax, edx
mov dword [ebp - 0x10], edx
mov edx, dword [ebp + 8]
mov edi, dword [ebp - 0x10]
or edx, edi
mov dword [ebp + 8], edx
movzx edx, dl
mov dl, byte [edx + str.cw]
mov byte [ebp - 0x21], dl
mov edx, dword [ebp + 8]
shr edx, 8
mov dword [ebp + 8], edx
movzx edx, dl
mov dl, byte [edx + str.cw]
mov byte [ebp - 0x2e], dl
mov edx, dword [ebp + 8]
shr edx, 8
mov dword [ebp + 8], edx
movzx edx, dl
mov dl, byte [edx + str.cw]
mov byte [ebp - 0x2b], dl
or ebx, edi
mov edi, dword [ebp + 8]
shr edi, 8
mov dl, byte [edi + str.cw]
mov byte [ebp - 0x28], dl
movzx edx, cl
mov dl, byte [edx + str.cw]
shr ecx, 8
mov byte [ebp - 0x25], dl
movzx edx, cl
mov dl, byte [edx + str.cw]
shr ecx, 8
mov byte [ebp - 0x22], dl
movzx edx, cl
mov dl, byte [edx + str.cw]
shr ecx, 8
mov cl, byte [ecx + str.cw]
mov byte [ebp - 0x2f], dl
movzx edx, al
shr eax, 8
mov byte [ebp - 0x2c], cl
mov cl, byte [edx + str.cw]
movzx edx, al
shr eax, 8
mov byte [ebp - 0x29], cl
mov cl, byte [edx + str.cw]
movzx edx, al
shr eax, 8
mov byte [ebp - 0x26], cl
mov cl, byte [edx + str.cw]
mov dl, byte [eax + str.cw]
movzx eax, bl
shr ebx, 8
mov byte [ebp - 0x30], dl
movzx edx, bl
mov byte [ebp - 0x23], cl
mov cl, byte [eax + str.cw]
mov al, byte [edx + str.cw]
shr ebx, 8
mov byte [ebp - 0x2d], cl
movzx ecx, bl
mov dl, byte [ecx + str.cw]
shr ebx, 8
mov byte [ebp - 0x2a], al
mov al, byte [ebx + str.cw]
mov byte [ebp - 0x24], al
mov eax, dword [ebp + 0xc]
test eax, eax
mov byte [ebp - 0x27], dl
je 0x1007f61a
mov edx, dword [eax]
mov ecx, dword [esi]
xor edx, dword [ebp - 0x30]
mov edi, dword [ebp - 0x2c]
xor edx, ecx
mov ecx, dword [ebp + 0x10]
mov dword [ecx], edx
mov ebx, dword [eax + 4]
mov edx, dword [esi + 4]
xor edx, ebx
xor edx, edi
mov edi, dword [ebp - 0x28]
mov dword [ecx + 4], edx
mov edx, dword [esi + 8]
xor edx, dword [eax + 8]
xor edx, edi
mov dword [ecx + 8], edx
mov edx, dword [esi + 0xc]
mov esi, dword [eax + 0xc]
mov eax, dword [ebp - 0x24]
xor edx, esi
xor edx, eax
mov dword [ecx + 0xc], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [esi]
mov ebx, dword [ebp - 0x30]
mov eax, dword [ebp + 0x10]
mov edi, dword [ebp - 0x2c]
xor ecx, ebx
mov dword [eax], ecx
mov edx, dword [esi + 4]
xor edx, edi
mov dword [eax + 4], edx
mov ecx, dword [esi + 8]
xor ecx, dword [ebp - 0x28]
mov dword [eax + 8], ecx
mov edx, dword [esi + 0xc]
mov ecx, dword [ebp - 0x24]
pop edi
xor edx, ecx
pop esi
mov dword [eax + 0xc], edx
pop ebx
mov esp, ebp
pop ebp
ret 0xc