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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov ecx, dword [ebp + 0xc]
mov ah, 0x10
push ebx
push esi
mov esi, dword [ebp + 8]
add ecx, 0x10
push edi
lea ebx, [esi + 0x40]
mov edi, ebx
lea edx, [esi + 0x20]
sub edi, esi
mov dword [ebp - 0xc], edi
mov edi, dword [ebp + 0xc]
sub ebx, edi
mov dword [ebp - 0x10], ebx
mov esi, dword [ebp - 0x10]
lea ebx, [edi + 0x10]
nop
mov al, byte [esi + ecx - 1]
lea ecx, [ecx - 1]
mov edi, dword [ebp - 0xc]
lea edx, [edx - 1]
mov byte [edx - 0x10], al
xor byte [ecx], al
mov al, byte [edi + edx]
mov edi, dword [ebp + 0xc]
mov byte [edx], al
add ah, 0xff
jne 0x10021010
mov cl, byte [edi + 1]
lea edx, [edi + 2]
mov al, byte [edi + 0xd]
mov esi, dword [ebp + 8]
mov byte [edi + 1], al
mov al, byte [edi + 9]
mov byte [edi + 0xd], al
mov al, byte [edi + 5]
mov byte [edi + 9], al
mov al, byte [edi + 0xa]
mov byte [edi + 5], cl
mov cl, byte [edx]
mov byte [edx], al
mov al, byte [edi + 7]
mov byte [edi + 0xa], cl
mov cl, byte [edi + 3]
mov byte [edi + 3], al
mov al, byte [edi + 0xb]
mov byte [edi + 7], al
mov al, byte [edi + 0xf]
mov byte [edi + 0xf], cl
mov cl, byte [edi + 6]
mov byte [edi + 0xb], al
mov al, byte [edi + 0xe]
mov dword [ebp - 0x14], edx
mov dl, 0x10
mov byte [edi + 0xe], cl
mov ecx, ebx
mov byte [edi + 6], al
movzx eax, byte [ecx - 1]
lea ecx, [ecx - 1]
mov al, byte [eax + 0x10041748]
mov byte [ecx], al
add dl, 0xff
jne 0x10021082
mov al, 0xd
mov byte [ebp - 3], 0x80
mov byte [ebp - 5], al
nop
test al, 1
je 0x10021193
lea eax, [esi + 0x1d]
mov edx, 3
mov cl, byte [eax - 5]
lea eax, [eax - 4]
xor byte [eax + 3], cl
mov cl, byte [eax]
xor byte [eax + 4], cl
mov cl, byte [eax + 1]
xor byte [eax + 5], cl
mov cl, byte [eax + 2]
xor byte [eax + 6], cl
sub edx, 1
jne 0x100210b0
movzx eax, byte [esi + 0xc]
mov dl, 0xc
mov al, byte [eax + str.cw]
xor byte [esi + 0x10], al
movzx eax, byte [esi + 0xd]
mov al, byte [eax + str.cw]
xor byte [esi + 0x11], al
movzx eax, byte [esi + 0xe]
mov al, byte [eax + str.cw]
xor byte [esi + 0x12], al
movzx eax, byte [esi + 0xf]
mov al, byte [eax + str.cw]
xor byte [esi + 0x13], al
movzx ecx, dl
add ecx, esi
mov al, byte [ecx - 4]
xor byte [ecx], al
mov al, byte [ecx - 3]
xor byte [ecx + 1], al
mov al, byte [ecx - 2]
xor byte [ecx + 2], al
mov al, byte [ecx - 1]
xor byte [ecx + 3], al
add dl, 0xfc
jne 0x10021105
mov dh, byte [ebp - 3]
mov ecx, ebx
mov al, dh
lea ebx, [esi + 0x20]
and al, 1
mov dl, 0x10
neg al
sbb al, al
shr dh, 1
and al, 0x8d
xor dh, al
movzx eax, byte [esi + 0x1d]
mov byte [ebp - 3], dh
mov al, byte [eax + str.cw]
xor al, byte [esi]
xor al, dh
mov byte [esi], al
movzx eax, byte [esi + 0x1e]
mov al, byte [eax + str.cw]
xor byte [esi + 1], al
movzx eax, byte [esi + 0x1f]
mov al, byte [eax + str.cw]
xor byte [esi + 2], al
movzx eax, byte [esi + 0x1c]
mov al, byte [eax + str.cw]
xor byte [esi + 3], al
nop dword [eax + eax]
mov al, byte [ebx - 1]
lea ebx, [ebx - 1]
xor byte [ecx - 1], al
lea ecx, [ecx - 1]
add dl, 0xff
jne 0x10021180
jmp 0x100211ae
mov ecx, ebx
mov dl, 0x10
mov ebx, esi
sub ebx, edi
nop dword [eax + eax]
mov al, byte [ebx + ecx - 1]
lea ecx, [ecx - 1]
xor byte [ecx], al
add dl, 0xff
jne 0x100211a0
mov esi, dword [ebp - 0x14]
mov edi, 4
mov ch, byte [esi]
mov al, byte [esi + 1]
mov dh, byte [esi - 1]
mov cl, byte [esi - 2]
mov byte [ebp - 4], al
xor al, ch
mov dl, al
mov byte [ebp - 2], cl
xor dl, dh
mov byte [ebp - 8], al
xor dl, cl
mov byte [ebp - 7], ch
mov cl, dl
mov byte [ebp - 1], dl
add cl, cl
mov byte [ebp - 6], dh
mov al, cl
xor al, 0x1b
test dl, dl
movzx ebx, al
movzx eax, cl
cmovns ebx, eax
mov dl, bl
xor dl, ch
xor dl, byte [ebp - 2]
mov cl, dl
add cl, cl
mov al, cl
xor al, 0x1b
test dl, dl
movzx eax, al
mov dword [ebp - 0x10], eax
movzx eax, cl
mov ecx, dword [ebp - 0x10]
cmovns ecx, eax
xor bl, byte [ebp - 4]
xor bl, dh
mov dword [ebp - 0x10], ecx
movzx eax, cl
mov cl, bl
add eax, eax
add cl, cl
mov dword [ebp - 0xc], eax
mov al, cl
xor al, 0x1b
test bl, bl
movzx edx, al
movzx eax, cl
mov ecx, dword [ebp - 0xc]
cmovns edx, eax
movzx eax, dl
add eax, eax
mov dword [ebp - 0x1c], edx
mov dh, byte [ebp - 6]
mov dword [ebp - 0x18], eax
mov bl, dh
xor bl, byte [ebp - 2]
mov al, cl
xor al, 0x1b
mov dl, bl
movzx eax, al
add dl, dl
cmp byte [ebp - 0x10], 0
mov dword [ebp - 0xc], eax
movzx eax, cl
mov ecx, dword [ebp - 0xc]
cmovge ecx, eax
mov al, dl
mov dword [ebp - 0xc], ecx
xor al, 0x1b
test bl, bl
movzx ecx, al
mov bl, byte [ebp - 7]
movzx eax, dl
cmovns ecx, eax
xor cl, byte [ebp - 0xc]
xor cl, byte [ebp - 1]
xor cl, byte [ebp - 2]
xor bl, dh
mov byte [esi - 2], cl
mov dl, bl
mov ecx, dword [ebp - 0x18]
lea esi, [esi + 4]
mov al, cl
add dl, dl
xor al, 0x1b
cmp byte [ebp - 0x1c], 0
movzx eax, al
mov dword [ebp - 0x10], eax
movzx eax, cl
mov ecx, dword [ebp - 0x10]
cmovge ecx, eax
mov al, dl
xor al, 0x1b
mov dword [ebp - 0x10], ecx
movzx ecx, al
test bl, bl
mov bl, byte [ebp - 8]
movzx eax, dl
cmovns ecx, eax
xor cl, byte [ebp - 0x10]
xor cl, byte [ebp - 1]
xor cl, dh
mov byte [esi - 5], cl
mov cl, bl
add cl, cl
mov al, cl
xor al, 0x1b
test bl, bl
mov bl, byte [ebp - 4]
movzx edx, al
movzx eax, cl
cmovns edx, eax
xor bl, byte [ebp - 2]
xor dl, byte [ebp - 0xc]
mov cl, bl
xor dl, byte [ebp - 1]
add cl, cl
xor dl, byte [ebp - 7]
mov al, cl
mov byte [esi - 4], dl
xor al, 0x1b
movzx edx, al
test bl, bl
movzx eax, cl
cmovns edx, eax
xor dl, byte [ebp - 0x10]
xor dl, byte [ebp - 4]
xor dl, byte [ebp - 1]
mov byte [esi - 3], dl
sub edi, 1
jne 0x100211b6
mov edi, dword [ebp + 0xc]
mov dl, 0x10
mov esi, dword [ebp + 8]
mov cl, byte [edi + 1]
lea ebx, [edi + 0x10]
mov al, byte [edi + 0xd]
mov byte [edi + 1], al
mov al, byte [edi + 9]
mov byte [edi + 0xd], al
mov al, byte [edi + 5]
mov byte [edi + 9], al
mov al, byte [edi + 0xa]
mov byte [edi + 5], cl
mov cl, byte [edi + 2]
mov byte [edi + 2], al
mov al, byte [edi + 7]
mov byte [edi + 0xa], cl
mov cl, byte [edi + 3]
mov byte [edi + 3], al
mov al, byte [edi + 0xb]
mov byte [edi + 7], al
mov al, byte [edi + 0xf]
mov byte [edi + 0xf], cl
mov cl, byte [edi + 6]
mov byte [edi + 0xb], al
mov al, byte [edi + 0xe]
mov byte [edi + 0xe], cl
mov ecx, ebx
mov byte [edi + 6], al
nop dword [eax + eax]
movzx eax, byte [ecx - 1]
lea ecx, [ecx - 1]
mov al, byte [eax + 0x10041748]
mov byte [ecx], al
add dl, 0xff
jne 0x10021370
mov al, byte [ebp - 5]
add al, 0xff
mov byte [ebp - 5], al
jne 0x100210a0
mov cl, 0x10
sub esi, edi
mov al, byte [esi + ebx - 1]
lea ebx, [ebx - 1]
xor byte [ebx], al
add cl, 0xff
jne 0x10021396
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret