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

Disassembly:
sub esp, 0xc
push ebp
push esi
push edi
mov edi, ecx
push 0x120c
mov dword [esp + 0x18], edi
lea ecx, [edi + 0x20]
call fcn.10010554
mov ebp, dword [esp + 0x20]
lea ecx, [edi + 0x10]
and dword [edi + 0x24], 0
shr ebp, 2
lea eax, [ebp + 6]
mov dword [edi + 0xc], eax
lea eax, [eax*4 + 4]
push eax
call fcn.10010726
mov esi, dword [edi + 0x1c]
call fcn.10019167
test al, al
je 0x10019429
cmp byte [0x10166886], 0
jne 0x100193f1
call fcn.1001cf92
cmp byte [0x10166888], 0
je 0x10019429
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
push esi
call fcn.1001fdfa
pop ecx
lea ecx, [edi + 4]
mov eax, dword [ecx]
call dword [eax + 0x20]
test al, al
jne 0x10019b26
mov edx, dword [edi + 0xc]
mov ecx, dword [edi + 0x1c]
call fcn.1001ff10
jmp 0x10019b26
push ebx
push dword [esp + 0x24]
mov edx, esi
push dword [esp + 0x24]
push ebp
call fcn.1001a942
lea ebx, [esi + ebp*4]
mov dword [esp + 0x1c], 0x10123ef4
mov ecx, dword [ebx - 4]
add esp, 0xc
mov eax, ecx
mov dword [esp + 0x20], ebx
shr eax, 0x10
movzx eax, al
movzx edx, byte [eax + 0x10124018]
mov eax, ecx
shr eax, 8
xor edx, 1
movzx eax, al
shl edx, 8
movzx eax, byte [eax + 0x10124018]
xor edx, eax
movzx eax, cl
shr ecx, 0x18
shl edx, 8
movzx eax, byte [eax + 0x10124018]
xor edx, eax
movzx eax, byte [ecx + 0x10124018]
shl edx, 8
xor edx, eax
xor edx, dword [esi]
mov dword [ebx], edx
mov eax, dword [esi + 4]
xor eax, edx
mov dword [ebx + 4], eax
mov ecx, dword [esi + 8]
xor ecx, eax
mov dword [esi + ebp*4 + 8], ecx
mov eax, dword [esi + 0xc]
xor eax, ecx
mov dword [esi + ebp*4 + 0xc], eax
mov eax, dword [edi + 0x18]
mov ebx, dword [edi + 0x1c]
lea ecx, [ebx + eax*4]
lea eax, [ebp + 4]
lea eax, [esi + eax*4]
jmp 0x100195d3
cmp dword [esp + 0x24], 0x18
jne 0x100194df
mov ecx, dword [esi + 0x24]
xor ecx, dword [esi + 0x10]
mov eax, dword [esi + 0x14]
xor eax, ecx
mov dword [esi + 0x28], ecx
mov dword [esi + 0x2c], eax
jmp 0x1001954a
cmp dword [esp + 0x24], 0x20
jne 0x1001954a
mov ecx, dword [esi + 0x2c]
mov eax, ecx
shr eax, 0x18
movzx edx, byte [eax + 0x10124018]
mov eax, ecx
shr eax, 0x10
movzx eax, al
shl edx, 8
movzx eax, byte [eax + 0x10124018]
xor edx, eax
mov eax, ecx
shr eax, 8
movzx eax, al
shl edx, 8
movzx eax, byte [eax + 0x10124018]
xor edx, eax
movzx eax, cl
mov ecx, dword [esi + 0x18]
shl edx, 8
movzx eax, byte [eax + 0x10124018]
xor edx, eax
mov eax, dword [esi + 0x14]
xor edx, dword [esi + 0x10]
xor eax, edx
mov dword [esi + 0x30], edx
xor ecx, eax
mov dword [esi + 0x34], eax
mov eax, dword [esi + 0x1c]
xor eax, ecx
mov dword [esi + 0x38], ecx
mov dword [esi + 0x3c], eax
mov esi, dword [esp + 0x20]
lea ebx, [esi + ebp*4]
mov ecx, dword [ebx - 4]
mov eax, ecx
shr eax, 0x10
movzx eax, al
mov dword [esp + 0x20], ebx
movzx edx, byte [eax + 0x10124018]
mov eax, ecx
shr eax, 8
movzx eax, al
shl edx, 8
movzx eax, byte [eax + 0x10124018]
xor edx, eax
movzx eax, cl
shl edx, 8
shr ecx, 0x18
movzx eax, byte [eax + 0x10124018]
xor edx, eax
movzx eax, byte [ecx + 0x10124018]
shl edx, 8
xor edx, eax
mov eax, dword [esp + 0x10]
xor edx, dword [eax]
add eax, 4
xor edx, dword [esi]
mov dword [ebx], edx
mov dword [esp + 0x10], eax
mov eax, dword [esi + 4]
xor eax, edx
mov dword [ebx + 4], eax
mov ecx, dword [esi + 8]
xor ecx, eax
mov dword [esi + ebp*4 + 8], ecx
mov eax, dword [esi + 0xc]
xor eax, ecx
mov dword [esi + ebp*4 + 0xc], eax
mov eax, dword [edi + 0x18]
mov ebx, dword [edi + 0x1c]
lea ecx, [ebx + eax*4]
lea eax, [esi + 0x10]
lea eax, [eax + ebp*4]
mov dword [esp + 0x14], ebx
cmp eax, ecx
jne 0x100194c5
lea ecx, [edi + 4]
mov eax, dword [ecx]
call dword [eax + 0x20]
test al, al
je 0x1001961c
cmp byte [0x10166892], 0
jne 0x100195f9
call fcn.1001918e
push 0x10
mov edx, ebx
mov ecx, ebx
call fcn.1001a9f6
mov ecx, dword [edi + 0xc]
shl ecx, 4
add ecx, ebx
push 0x10
mov edx, ecx
call fcn.1001a9f6
pop ecx
pop ecx
jmp 0x10019b07
cmp byte [0x10166893], 0
jne 0x1001962a
call fcn.100191fe
mov eax, dword [edi + 0xc]
push 4
pop ebp
lea eax, [eax*4 - 4]
mov dword [esp + 0x20], eax
cmp eax, ebp
jbe 0x1001993e
mov edi, dword [esp + 0x20]
add eax, 2
lea eax, [ebx + eax*4]
mov dword [esp + 0x10], eax
lea eax, [ebx + 0x18]
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x24], eax
mov edx, dword [eax - 8]
mov eax, edx
shr eax, 0x10
movzx eax, al
movzx ecx, byte [eax + 0x10124018]
mov eax, edx
shr eax, 8
movzx eax, al
shr edx, 0x18
mov esi, dword [ecx*8 + 0x101669f1]
movzx eax, byte [eax + 0x10124018]
xor esi, dword [eax*8 + 0x101669f2]
movzx eax, byte [edx + 0x10124018]
mov edx, dword [ebx - 8]
xor esi, dword [eax*8 + 0x101669f4]
mov eax, dword [esp + 0x24]
movzx eax, byte [eax - 8]
movzx eax, byte [eax + 0x10124018]
xor esi, dword [eax*8 + 0x101669f3]
mov eax, edx
shr eax, 0x10
movzx eax, al
movzx ecx, byte [eax + 0x10124018]
mov eax, edx
shr eax, 8
movzx eax, al
shr edx, 0x18
mov ecx, dword [ecx*8 + 0x101669f1]
movzx eax, byte [eax + 0x10124018]
xor ecx, dword [eax*8 + 0x101669f2]
movzx eax, byte [edx + 0x10124018]
xor ecx, dword [eax*8 + 0x101669f4]
movzx eax, byte [ebx - 8]
movzx eax, byte [eax + 0x10124018]
xor ecx, dword [eax*8 + 0x101669f3]
mov eax, dword [esp + 0x24]
mov dword [eax - 8], ecx
mov dword [ebx - 8], esi
mov edx, dword [eax - 4]
mov eax, edx
shr eax, 0x10
movzx eax, al
movzx ecx, byte [eax + 0x10124018]
mov eax, edx
shr eax, 8
movzx eax, al
shr edx, 0x18
mov esi, dword [ecx*8 + 0x101669f1]
movzx eax, byte [eax + 0x10124018]
xor esi, dword [eax*8 + 0x101669f2]
movzx eax, byte [edx + 0x10124018]
mov edx, dword [ebx - 4]
xor esi, dword [eax*8 + 0x101669f4]
mov eax, dword [esp + 0x24]
movzx eax, byte [eax - 4]
movzx eax, byte [eax + 0x10124018]
xor esi, dword [eax*8 + 0x101669f3]
mov eax, edx
shr eax, 0x10
movzx eax, al
movzx ecx, byte [eax + 0x10124018]
mov eax, edx
shr eax, 8
movzx eax, al
shr edx, 0x18
mov ecx, dword [ecx*8 + 0x101669f1]
movzx eax, byte [eax + 0x10124018]
xor ecx, dword [eax*8 + 0x101669f2]
movzx eax, byte [edx + 0x10124018]
xor ecx, dword [eax*8 + 0x101669f4]
movzx eax, byte [ebx - 4]
movzx eax, byte [eax + 0x10124018]
xor ecx, dword [eax*8 + 0x101669f3]
mov eax, dword [esp + 0x24]
mov dword [eax - 4], ecx
mov dword [ebx - 4], esi
mov edx, dword [eax]
mov eax, edx
shr eax, 0x10
movzx eax, al
movzx ecx, byte [eax + 0x10124018]
mov esi, dword [ecx*8 + 0x101669f1]
mov eax, edx
shr eax, 8
add ebp, 4
movzx eax, al
sub edi, 4
shr edx, 0x18
movzx eax, byte [eax + 0x10124018]
xor esi, dword [eax*8 + 0x101669f2]
movzx eax, byte [edx + 0x10124018]
mov edx, dword [ebx]
xor esi, dword [eax*8 + 0x101669f4]
mov eax, dword [esp + 0x24]
movzx eax, byte [eax]
movzx eax, byte [eax + 0x10124018]
xor esi, dword [eax*8 + 0x101669f3]
mov eax, edx
shr eax, 0x10
movzx eax, al
movzx ecx, byte [eax + 0x10124018]
mov eax, edx
shr eax, 8
movzx eax, al
shr edx, 0x18
mov ecx, dword [ecx*8 + 0x101669f1]
movzx eax, byte [eax + 0x10124018]
xor ecx, dword [eax*8 + 0x101669f2]
movzx eax, byte [edx + 0x10124018]
xor ecx, dword [eax*8 + 0x101669f4]
movzx eax, byte [ebx]
movzx eax, byte [eax + 0x10124018]
xor ecx, dword [eax*8 + 0x101669f3]
mov eax, dword [esp + 0x24]
mov dword [eax], ecx
mov dword [ebx], esi
lea ebx, [ebx - 0x10]
mov edx, dword [eax + 4]
mov eax, edx
shr eax, 0x10
movzx eax, al
movzx ecx, byte [eax + 0x10124018]
mov eax, edx
shr eax, 8
movzx eax, al
shr edx, 0x18
mov esi, dword [ecx*8 + 0x101669f1]
movzx eax, byte [eax + 0x10124018]
xor esi, dword [eax*8 + 0x101669f2]
movzx eax, byte [edx + 0x10124018]
mov edx, dword [ebx + 0x14]
xor esi, dword [eax*8 + 0x101669f4]
mov eax, dword [esp + 0x24]
movzx eax, byte [eax + 4]
movzx eax, byte [eax + 0x10124018]
xor esi, dword [eax*8 + 0x101669f3]
mov eax, edx
shr eax, 0x10
movzx eax, al
movzx ecx, byte [eax + 0x10124018]
mov eax, edx
shr eax, 8
movzx eax, al
shr edx, 0x18
mov ecx, dword [ecx*8 + 0x101669f1]
movzx eax, byte [eax + 0x10124018]
xor ecx, dword [eax*8 + 0x101669f2]
movzx eax, byte [edx + 0x10124018]
xor ecx, dword [eax*8 + 0x101669f4]
movzx eax, byte [ebx + 0x14]
movzx eax, byte [eax + 0x10124018]
xor ecx, dword [eax*8 + 0x101669f3]
mov eax, dword [esp + 0x24]
mov dword [eax + 4], ecx
add eax, 0x10
mov dword [ebx + 0x14], esi
mov dword [esp + 0x24], eax
cmp ebp, edi
jb 0x1001965c
mov edi, dword [esp + 0x18]
mov ebx, dword [esp + 0x14]
mov edx, dword [ebx + ebp*4]
mov eax, edx
shr eax, 0x10
movzx eax, al
movzx ecx, byte [eax + 0x10124018]
mov eax, edx
shr eax, 8
movzx eax, al
shr edx, 0x18
mov ecx, dword [ecx*8 + 0x101669f1]
movzx eax, byte [eax + 0x10124018]
xor ecx, dword [eax*8 + 0x101669f2]
movzx eax, byte [edx + 0x10124018]
mov edx, dword [ebx + ebp*4 + 4]
xor ecx, dword [eax*8 + 0x101669f4]
movzx eax, byte [ebx + ebp*4]
movzx eax, byte [eax + 0x10124018]
xor ecx, dword [eax*8 + 0x101669f3]
mov eax, edx
shr eax, 0x10
movzx eax, al
mov dword [ebx + ebp*4], ecx
movzx ecx, byte [eax + 0x10124018]
mov eax, edx
shr eax, 8
movzx eax, al
shr edx, 0x18
mov ecx, dword [ecx*8 + 0x101669f1]
movzx eax, byte [eax + 0x10124018]
xor ecx, dword [eax*8 + 0x101669f2]
movzx eax, byte [edx + 0x10124018]
mov edx, dword [ebx + ebp*4 + 8]
xor ecx, dword [eax*8 + 0x101669f4]
movzx eax, byte [ebx + ebp*4 + 4]
movzx eax, byte [eax + 0x10124018]
xor ecx, dword [eax*8 + 0x101669f3]
mov eax, edx
shr eax, 0x10
movzx eax, al
mov dword [ebx + ebp*4 + 4], ecx
movzx ecx, byte [eax + 0x10124018]
mov eax, edx
shr eax, 8
movzx eax, al
shr edx, 0x18
mov ecx, dword [ecx*8 + 0x101669f1]
movzx eax, byte [eax + 0x10124018]
xor ecx, dword [eax*8 + 0x101669f2]
movzx eax, byte [edx + 0x10124018]
mov edx, dword [ebx + ebp*4 + 0xc]
xor ecx, dword [eax*8 + 0x101669f4]
movzx eax, byte [ebx + ebp*4 + 8]
movzx eax, byte [eax + 0x10124018]
xor ecx, dword [eax*8 + 0x101669f3]
mov eax, edx
shr eax, 0x10
movzx eax, al
mov dword [ebx + ebp*4 + 8], ecx
movzx ecx, byte [eax + 0x10124018]
mov eax, edx
shr eax, 8
movzx eax, al
shr edx, 0x18
mov ecx, dword [ecx*8 + 0x101669f1]
movzx eax, byte [eax + 0x10124018]
xor ecx, dword [eax*8 + 0x101669f2]
movzx eax, byte [edx + 0x10124018]
xor ecx, dword [eax*8 + 0x101669f4]
movzx eax, byte [ebx + ebp*4 + 0xc]
movzx eax, byte [eax + 0x10124018]
xor ecx, dword [eax*8 + 0x101669f3]
mov dword [ebx + ebp*4 + 0xc], ecx
mov eax, dword [edi + 0xc]
mov ecx, dword [ebx]
add eax, eax
bswap ecx
mov eax, dword [ebx + eax*8]
bswap eax
mov dword [ebx], eax
mov eax, dword [edi + 0xc]
add eax, eax
mov dword [ebx + eax*8], ecx
mov eax, dword [edi + 0xc]
mov ecx, dword [ebx + 4]
add eax, eax
bswap ecx
mov eax, dword [ebx + eax*8 + 4]
bswap eax
mov dword [ebx + 4], eax
mov eax, dword [edi + 0xc]
add eax, eax
mov dword [ebx + eax*8 + 4], ecx
mov eax, dword [edi + 0xc]
mov ecx, dword [ebx + 8]
add eax, eax
bswap ecx
mov eax, dword [ebx + eax*8 + 8]
bswap eax
mov dword [ebx + 8], eax
mov eax, dword [edi + 0xc]
add eax, eax
mov dword [ebx + eax*8 + 8], ecx
mov eax, dword [edi + 0xc]
mov ecx, dword [ebx + 0xc]
add eax, eax
bswap ecx
mov eax, dword [ebx + eax*8 + 0xc]
bswap eax
mov dword [ebx + 0xc], eax
mov eax, dword [edi + 0xc]
add eax, eax
mov dword [ebx + eax*8 + 0xc], ecx
call fcn.10019167
test al, al
je 0x10019b25
mov eax, dword [edi + 0xc]
lea ecx, [ebx + 0x10]
shl eax, 4
mov edx, ecx
sub eax, 0x10
push eax
call fcn.1001a9f6
pop ecx
pop ebx
pop edi
pop esi
pop ebp
add esp, 0xc
ret 0xc