Function at 0x1003d180
Capabilities:
Encode data using xor
Encrypt data using aes
Encrypt data using aes via x86 extensions
Reference aes constants

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x24
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, ecx
shr ebx, 2
lea eax, [ebx + 6]
mov dword [edi + 0x10], eax
lea eax, [eax*4 + 4]
lea esi, [edi + 0x18]
push eax
mov dword [esp + 0x18], edi
call fcn.1003f5e0
cmp byte [0x1009dfeb], 0
mov edi, dword [edi + 0x11c]
jne 0x1003d1c2
call fcn.10044360
cmp byte [0x1009dffc], 0
je 0x1003d374
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
movdqu xmm0, xmmword [eax + ecx - 0x10]
push ecx
push eax
push edi
movdqa xmmword [esp + 0x2c], xmm0
call fcn.1005e620
movdqa xmm0, xmmword [esp + 0x2c]
aeskeygenassist xmm1, xmm0, 0
pextrd eax, xmm1, 3
xor eax, dword [edi]
add esp, 0xc
xor eax, 1
mov dword [edi + ebx*4], eax
mov ecx, dword [edi + 4]
xor ecx, eax
mov dword [edi + ebx*4 + 4], ecx
mov eax, dword [edi + 8]
xor eax, ecx
mov dword [edi + ebx*4 + 8], eax
mov ecx, dword [edi + 0xc]
xor ecx, eax
mov dword [edi + ebx*4 + 0xc], ecx
mov ecx, dword [esi + 0x104]
mov eax, dword [esi + 0x100]
lea eax, [ecx + eax*4]
lea ecx, [edi + ebx*4 + 0x10]
mov edx, 0x100871bc
cmp ecx, eax
je 0x1003d2ef
mov eax, dword [ebp + 0xc]
cmp eax, 0x18
jne 0x1003d25c
mov eax, dword [edi + 0x24]
xor eax, dword [edi + 0x10]
mov ecx, dword [edi + 0x14]
xor ecx, eax
mov dword [edi + 0x28], eax
mov dword [edi + 0x2c], ecx
jmp 0x1003d299
cmp eax, 0x20
jne 0x1003d296
mov eax, dword [edi + 0x2c]
mov ecx, dword [edi + 0x14]
pinsrd xmm0, eax, 3
aeskeygenassist xmm1, xmm0, 0
pextrd eax, xmm1, 2
xor eax, dword [edi + 0x10]
xor ecx, eax
mov dword [edi + 0x30], eax
mov eax, dword [edi + 0x18]
xor eax, ecx
mov dword [edi + 0x34], ecx
mov ecx, dword [edi + 0x1c]
xor ecx, eax
mov dword [edi + 0x38], eax
mov dword [edi + 0x3c], ecx
jmp 0x1003d299
mov ecx, dword [edi + 0x1c]
lea edi, [edi + ebx*4]
pinsrd xmm0, ecx, 3
aeskeygenassist xmm1, xmm0, 0
pextrd eax, xmm1, 3
xor eax, dword [edx]
add edx, 4
xor eax, dword [edi]
mov dword [edi + ebx*4], eax
mov eax, dword [edi + 4]
xor eax, dword [edi + ebx*4]
mov dword [edi + ebx*4 + 4], eax
mov ecx, dword [edi + 8]
xor ecx, eax
mov dword [edi + ebx*4 + 8], ecx
mov eax, dword [edi + 0xc]
xor eax, ecx
mov dword [edi + ebx*4 + 0xc], eax
mov eax, dword [esi + 0x104]
mov ecx, dword [esi + 0x100]
lea ecx, [eax + ecx*4]
lea eax, [edi + ebx*4 + 0x10]
cmp eax, ecx
jne 0x1003d241
mov esi, dword [esp + 0x14]
mov edx, dword [esi + 4]
mov eax, dword [edx + 0x1c]
lea ecx, [esi + 4]
call eax
test al, al
jne 0x1003db40
mov ecx, dword [esi + 0x10]
mov eax, dword [esi + 0x11c]
movdqa xmm0, xmmword [eax]
add ecx, ecx
movdqa xmm1, xmmword [eax + ecx*8]
movdqa xmmword [eax], xmm1
movdqa xmmword [eax + ecx*8], xmm0
mov ecx, dword [esi + 0x10]
mov edx, 4
lea ecx, [ecx*4 - 4]
cmp ecx, edx
jbe 0x1003d360
jmp 0x1003d340
aesimc xmm0, xmmword [eax + edx*4]
aesimc xmm1, xmmword [eax + ecx*4]
movdqa xmmword [eax + edx*4], xmm1
movdqa xmmword [eax + ecx*4], xmm0
add edx, 4
sub ecx, 4
cmp edx, ecx
jb 0x1003d340
aesimc xmm0, xmmword [eax + edx*4]
movdqa xmmword [eax + edx*4], xmm0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [ebp + 8]
push ecx
mov ecx, dword [ebp + 0xc]
push edi
mov edx, ebx
call fcn.1003f670
mov ecx, dword [edi + ebx*4 - 4]
mov edx, ecx
shr edx, 0x10
movzx eax, dl
movzx eax, byte [eax + 0x1007d728]
mov edx, ecx
shr edx, 8
xor eax, 1
movzx edx, dl
movzx edx, byte [edx + 0x1007d728]
shl eax, 8
xor eax, edx
movzx edx, cl
movzx edx, byte [edx + 0x1007d728]
shl eax, 8
xor eax, edx
shr ecx, 0x18
movzx ecx, byte [ecx + 0x1007d728]
shl eax, 8
xor eax, ecx
xor eax, dword [edi]
add esp, 8
mov dword [edi + ebx*4], eax
mov ecx, dword [edi + 4]
xor ecx, eax
mov dword [edi + ebx*4 + 4], ecx
mov eax, dword [edi + 8]
xor eax, ecx
mov dword [edi + ebx*4 + 8], eax
mov edx, dword [edi + 0xc]
xor edx, eax
mov dword [edi + ebx*4 + 0xc], edx
mov eax, dword [esi + 0x100]
mov ecx, dword [esi + 0x104]
lea edx, [ecx + eax*4]
lea eax, [edi + ebx*4 + 0x10]
mov dword [esp + 0x18], 0x1007d92c
cmp eax, edx
je 0x1003d525
mov eax, dword [ebp + 0xc]
cmp eax, 0x18
jne 0x1003d42c
mov eax, dword [edi + 0x24]
xor eax, dword [edi + 0x10]
mov ecx, dword [edi + 0x14]
xor ecx, eax
mov dword [edi + 0x28], eax
mov dword [edi + 0x2c], ecx
jmp 0x1003d495
cmp eax, 0x20
jne 0x1003d495
mov ecx, dword [edi + 0x2c]
mov edx, ecx
shr edx, 0x18
movzx eax, byte [edx + 0x1007d728]
mov edx, ecx
shr edx, 0x10
movzx edx, dl
movzx edx, byte [edx + 0x1007d728]
shl eax, 8
xor eax, edx
mov edx, ecx
shr edx, 8
movzx edx, dl
movzx edx, byte [edx + 0x1007d728]
shl eax, 8
movzx ecx, cl
xor eax, edx
movzx edx, byte [ecx + 0x1007d728]
mov ecx, dword [edi + 0x14]
shl eax, 8
xor eax, edx
xor eax, dword [edi + 0x10]
xor ecx, eax
mov dword [edi + 0x30], eax
mov eax, dword [edi + 0x18]
xor eax, ecx
mov dword [edi + 0x34], ecx
mov ecx, dword [edi + 0x1c]
xor ecx, eax
mov dword [edi + 0x38], eax
mov dword [edi + 0x3c], ecx
lea edi, [edi + ebx*4]
mov eax, dword [edi + ebx*4 - 4]
mov edx, eax
shr edx, 0x10
movzx ecx, dl
movzx edx, byte [ecx + 0x1007d728]
mov ecx, eax
shr ecx, 8
movzx ecx, cl
movzx ecx, byte [ecx + 0x1007d728]
shl edx, 8
xor edx, ecx
movzx ecx, al
movzx ecx, byte [ecx + 0x1007d728]
shl edx, 8
xor edx, ecx
shr eax, 0x18
movzx eax, byte [eax + 0x1007d728]
shl edx, 8
xor edx, eax
xor edx, dword [edi]
mov eax, dword [esp + 0x18]
xor edx, dword [eax]
add eax, 4
mov dword [edi + ebx*4], edx
mov dword [esp + 0x18], eax
mov eax, dword [edi + 4]
xor eax, edx
mov dword [edi + ebx*4 + 4], eax
mov ecx, dword [edi + 8]
xor ecx, eax
mov dword [edi + ebx*4 + 8], ecx
mov edx, dword [edi + 0xc]
xor edx, ecx
mov dword [edi + ebx*4 + 0xc], edx
mov eax, dword [esi + 0x100]
mov ecx, dword [esi + 0x104]
lea edx, [ecx + eax*4]
lea eax, [edi + ebx*4 + 0x10]
cmp eax, edx
jne 0x1003d411
mov ebx, dword [esp + 0x14]
mov edx, dword [ebx + 4]
mov eax, dword [edx + 0x1c]
mov edi, dword [ebx + 0x11c]
lea ecx, [ebx + 4]
call eax
test al, al
je 0x1003d5bd
mov cl, byte [0x1009dfe9]
test cl, cl
jne 0x1003d54d
call fcn.1003cf80
call fcn.1004cc60
cmp eax, 1
je 0x1003d56e
xor eax, eax
lea esp, [esp]
mov edx, dword [edi + eax*4]
bswap edx
mov dword [edi + eax*4], edx
inc eax
cmp eax, 4
jb 0x1003d560
mov esi, dword [ebx + 0x10]
shl esi, 4
add esi, edi
call fcn.1004cc60
cmp eax, 1
je 0x1003d5a2
mov eax, esi
sub esi, esi
mov ecx, 4
lea esp, [esp]
mov edx, dword [esi + eax]
bswap edx
mov dword [eax], edx
add eax, 4
dec ecx
jne 0x1003d590
jmp 0x1003db00
cmp esi, esi
je 0x1003db00
push 0x10
push esi
push 0x10
push esi
call fcn.10054b98
add esp, 0x10
jmp 0x1003db00
mov al, byte [0x1009dfea]
test al, al
jne 0x1003d5cb
call fcn.1003d010
mov eax, dword [ebx + 0x10]
mov edx, 4
lea eax, [eax*4 - 4]
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], eax
cmp eax, edx
jbe 0x1003d8bf
lea ecx, [edi + eax*4 + 8]
lea eax, [edi + 0x18]
mov edx, dword [eax - 8]
mov ebx, edx
mov esi, edx
shr edx, 8
movzx edx, dl
movzx edx, byte [edx + 0x1007d728]
shr ebx, 0x10
movzx ebx, bl
movzx ebx, byte [ebx + 0x1007d728]
shr esi, 0x18
movzx esi, byte [esi + 0x1007d728]
mov esi, dword [esi*8 + 0x1009cfd4]
xor esi, dword [ebx*8 + 0x1009cfd1]
xor esi, dword [edx*8 + 0x1009cfd2]
movzx edx, byte [eax - 8]
movzx edx, byte [edx + 0x1007d728]
xor esi, dword [edx*8 + 0x1009cfd3]
mov edx, dword [ecx - 8]
mov ebx, edx
shr edx, 0x10
movzx edx, dl
movzx edx, byte [edx + 0x1007d728]
shr ebx, 0x18
movzx ebx, byte [ebx + 0x1007d728]
mov ebx, dword [ebx*8 + 0x1009cfd4]
xor ebx, dword [edx*8 + 0x1009cfd1]
mov edx, dword [ecx - 8]
shr edx, 8
movzx edx, dl
movzx edx, byte [edx + 0x1007d728]
xor ebx, dword [edx*8 + 0x1009cfd2]
movzx edx, byte [ecx - 8]
movzx edx, byte [edx + 0x1007d728]
xor ebx, dword [edx*8 + 0x1009cfd3]
mov dword [eax - 8], ebx
mov dword [ecx - 8], esi
mov edx, dword [eax - 4]
mov ebx, edx
mov esi, edx
shr ebx, 0x10
shr edx, 8
movzx ebx, bl
movzx ebx, byte [ebx + 0x1007d728]
movzx edx, dl
movzx edx, byte [edx + 0x1007d728]
shr esi, 0x18
movzx esi, byte [esi + 0x1007d728]
mov esi, dword [esi*8 + 0x1009cfd4]
xor esi, dword [ebx*8 + 0x1009cfd1]
xor esi, dword [edx*8 + 0x1009cfd2]
movzx edx, byte [eax - 4]
movzx edx, byte [edx + 0x1007d728]
xor esi, dword [edx*8 + 0x1009cfd3]
mov edx, dword [ecx - 4]
mov ebx, edx
shr edx, 0x10
shr ebx, 0x18
movzx ebx, byte [ebx + 0x1007d728]
mov ebx, dword [ebx*8 + 0x1009cfd4]
movzx edx, dl
movzx edx, byte [edx + 0x1007d728]
xor ebx, dword [edx*8 + 0x1009cfd1]
mov edx, dword [ecx - 4]
shr edx, 8
movzx edx, dl
movzx edx, byte [edx + 0x1007d728]
xor ebx, dword [edx*8 + 0x1009cfd2]
movzx edx, byte [ecx - 4]
movzx edx, byte [edx + 0x1007d728]
xor ebx, dword [edx*8 + 0x1009cfd3]
mov dword [eax - 4], ebx
mov dword [ecx - 4], esi
mov edx, dword [eax]
mov esi, edx
shr esi, 0x18
movzx esi, byte [esi + 0x1007d728]
mov esi, dword [esi*8 + 0x1009cfd4]
mov ebx, edx
shr ebx, 0x10
movzx ebx, bl
movzx ebx, byte [ebx + 0x1007d728]
xor esi, dword [ebx*8 + 0x1009cfd1]
shr edx, 8
movzx edx, dl
movzx edx, byte [edx + 0x1007d728]
xor esi, dword [edx*8 + 0x1009cfd2]
movzx edx, byte [eax]
movzx edx, byte [edx + 0x1007d728]
xor esi, dword [edx*8 + 0x1009cfd3]
mov edx, dword [ecx]
mov ebx, edx
shr edx, 0x10
movzx edx, dl
movzx edx, byte [edx + 0x1007d728]
shr ebx, 0x18
movzx ebx, byte [ebx + 0x1007d728]
mov ebx, dword [ebx*8 + 0x1009cfd4]
xor ebx, dword [edx*8 + 0x1009cfd1]
mov edx, dword [ecx]
shr edx, 8
movzx edx, dl
movzx edx, byte [edx + 0x1007d728]
xor ebx, dword [edx*8 + 0x1009cfd2]
movzx edx, byte [ecx]
movzx edx, byte [edx + 0x1007d728]
xor ebx, dword [edx*8 + 0x1009cfd3]
add eax, 0x10
mov dword [eax - 0x10], ebx
mov dword [ecx], esi
mov edx, dword [eax - 0xc]
mov ebx, edx
mov esi, edx
shr edx, 8
shr ebx, 0x10
movzx edx, dl
movzx edx, byte [edx + 0x1007d728]
shr esi, 0x18
movzx esi, byte [esi + 0x1007d728]
mov esi, dword [esi*8 + 0x1009cfd4]
movzx ebx, bl
movzx ebx, byte [ebx + 0x1007d728]
xor esi, dword [ebx*8 + 0x1009cfd1]
sub ecx, 0x10
xor esi, dword [edx*8 + 0x1009cfd2]
movzx edx, byte [eax - 0xc]
movzx edx, byte [edx + 0x1007d728]
xor esi, dword [edx*8 + 0x1009cfd3]
mov edx, dword [ecx + 0x14]
mov ebx, edx
shr edx, 0x10
movzx edx, dl
movzx edx, byte [edx + 0x1007d728]
shr ebx, 0x18
movzx ebx, byte [ebx + 0x1007d728]
mov ebx, dword [ebx*8 + 0x1009cfd4]
xor ebx, dword [edx*8 + 0x1009cfd1]
mov edx, dword [ecx + 0x14]
shr edx, 8
movzx edx, dl
movzx edx, byte [edx + 0x1007d728]
xor ebx, dword [edx*8 + 0x1009cfd2]
movzx edx, byte [ecx + 0x14]
movzx edx, byte [edx + 0x1007d728]
xor ebx, dword [edx*8 + 0x1009cfd3]
mov edx, dword [esp + 0x18]
mov dword [eax - 0xc], ebx
mov dword [ecx + 0x14], esi
mov esi, dword [esp + 0x1c]
add edx, 4
sub esi, 4
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], esi
cmp edx, esi
jb 0x1003d5f1
mov ebx, dword [esp + 0x14]
mov eax, dword [edi + edx*4]
mov ecx, eax
shr ecx, 0x18
movzx ecx, byte [ecx + 0x1007d728]
mov ecx, dword [ecx*8 + 0x1009cfd4]
mov dword [esp + 0x1c], ebx
mov ebx, eax
shr eax, 8
movzx eax, al
movzx eax, byte [eax + 0x1007d728]
shr ebx, 0x10
movzx esi, bl
movzx esi, byte [esi + 0x1007d728]
xor ecx, dword [esi*8 + 0x1009cfd1]
xor ecx, dword [eax*8 + 0x1009cfd2]
movzx eax, byte [edi + edx*4]
movzx eax, byte [eax + 0x1007d728]
xor ecx, dword [eax*8 + 0x1009cfd3]
mov eax, dword [edi + edx*4 + 4]
mov dword [edi + edx*4], ecx
mov ebx, eax
mov ecx, eax
shr ecx, 0x18
movzx ecx, byte [ecx + 0x1007d728]
mov ecx, dword [ecx*8 + 0x1009cfd4]
shr eax, 8
movzx eax, al
movzx eax, byte [eax + 0x1007d728]
shr ebx, 0x10
movzx esi, bl
movzx esi, byte [esi + 0x1007d728]
xor ecx, dword [esi*8 + 0x1009cfd1]
xor ecx, dword [eax*8 + 0x1009cfd2]
movzx eax, byte [edi + edx*4 + 4]
movzx eax, byte [eax + 0x1007d728]
xor ecx, dword [eax*8 + 0x1009cfd3]
mov eax, dword [edi + edx*4 + 8]
mov dword [edi + edx*4 + 4], ecx
mov ebx, eax
mov ecx, eax
shr ecx, 0x18
movzx ecx, byte [ecx + 0x1007d728]
mov ecx, dword [ecx*8 + 0x1009cfd4]
shr eax, 8
movzx eax, al
movzx eax, byte [eax + 0x1007d728]
shr ebx, 0x10
movzx esi, bl
movzx esi, byte [esi + 0x1007d728]
xor ecx, dword [esi*8 + 0x1009cfd1]
xor ecx, dword [eax*8 + 0x1009cfd2]
movzx eax, byte [edi + edx*4 + 8]
movzx eax, byte [eax + 0x1007d728]
xor ecx, dword [eax*8 + 0x1009cfd3]
mov eax, dword [edi + edx*4 + 0xc]
mov dword [edi + edx*4 + 8], ecx
mov ebx, eax
mov ecx, eax
shr ecx, 0x18
movzx ecx, byte [ecx + 0x1007d728]
mov ecx, dword [ecx*8 + 0x1009cfd4]
shr eax, 8
shr ebx, 0x10
movzx esi, bl
movzx esi, byte [esi + 0x1007d728]
xor ecx, dword [esi*8 + 0x1009cfd1]
movzx eax, al
movzx eax, byte [eax + 0x1007d728]
xor ecx, dword [eax*8 + 0x1009cfd2]
movzx eax, byte [edi + edx*4 + 0xc]
movzx eax, byte [eax + 0x1007d728]
xor ecx, dword [eax*8 + 0x1009cfd3]
mov dword [edi + edx*4 + 0xc], ecx
mov esi, dword [edi]
call fcn.1004cc60
mov ebx, dword [esp + 0x1c]
cmp eax, 1
je 0x1003da32
bswap esi
mov ecx, dword [ebx + 0x10]
add ecx, ecx
mov dword [esp + 0x14], esi
mov esi, dword [edi + ecx*8]
call fcn.1004cc60
cmp eax, 1
je 0x1003da4a
bswap esi
mov eax, dword [esp + 0x14]
mov dword [edi], esi
mov edx, dword [ebx + 0x10]
add edx, edx
mov dword [edi + edx*8], eax
mov esi, dword [edi + 4]
call fcn.1004cc60
cmp eax, 1
je 0x1003da67
bswap esi
mov ecx, dword [ebx + 0x10]
add ecx, ecx
mov dword [esp + 0x14], esi
mov esi, dword [edi + ecx*8 + 4]
call fcn.1004cc60
cmp eax, 1
je 0x1003da80
bswap esi
mov eax, dword [esp + 0x14]
mov dword [edi + 4], esi
mov edx, dword [ebx + 0x10]
add edx, edx
mov dword [edi + edx*8 + 4], eax
mov esi, dword [edi + 8]
call fcn.1004cc60
cmp eax, 1
je 0x1003da9f
bswap esi
mov ecx, dword [ebx + 0x10]
add ecx, ecx
mov dword [esp + 0x14], esi
mov esi, dword [edi + ecx*8 + 8]
call fcn.1004cc60
cmp eax, 1
je 0x1003dab8
bswap esi
mov eax, dword [esp + 0x14]
mov dword [edi + 8], esi
mov edx, dword [ebx + 0x10]
add edx, edx
mov dword [edi + edx*8 + 8], eax
mov esi, dword [edi + 0xc]
call fcn.1004cc60
cmp eax, 1
je 0x1003dad7
bswap esi
mov ecx, dword [ebx + 0x10]
add ecx, ecx
mov dword [esp + 0x14], esi
mov esi, dword [edi + ecx*8 + 0xc]
call fcn.1004cc60
cmp eax, 1
je 0x1003daf0
bswap esi
mov eax, dword [esp + 0x14]
mov dword [edi + 0xc], esi
mov edx, dword [ebx + 0x10]
add edx, edx
mov dword [edi + edx*8 + 0xc], eax
cmp byte [0x1009dfeb], 0
jne 0x1003db0e
call fcn.10044360
cmp byte [0x1009dffc], 0
je 0x1003db40
mov esi, dword [ebx + 0x10]
dec esi
shl esi, 4
call fcn.1004cc60
cmp eax, 1
je 0x1003db40
shr esi, 2
test esi, esi
je 0x1003db40
lea eax, [edi + 0x10]
mov ecx, esi
mov edx, dword [eax]
bswap edx
mov dword [eax], edx
add eax, 4
dec ecx
jne 0x1003db34
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc