Function at 0x421170
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x24
mov eax, dword [esp + 0x34]
push ebx
mov ebx, ecx
push ebp
mov dword [eax], 0
push esi
mov eax, dword [ebx + 0x2c]
push edi
test eax, eax
mov dword [esp + 0x10], ebx
je 0x4211a8
mov ecx, dword [esp + 0x48]
push str.AES_not_initialized.
mov edx, dword [ecx]
call dword [edx + 0x14]
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x24
ret 0x14
mov eax, dword [ebx + 0x30]
cmp eax, 2
je 0x4211d1
mov ecx, dword [ebx + 0x34]
test ecx, ecx
jne 0x4211d1
mov ecx, dword [esp + 0x48]
push str.AES_direction_should_be_for_encryption.
mov eax, dword [ecx]
call dword [eax + 0x14]
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x24
ret 0x14
mov edi, dword [esp + 0x38]
test edi, edi
je 0x4214c0
mov esi, dword [esp + 0x3c]
test esi, esi
jbe 0x4214c0
shr esi, 7
sub eax, 0
mov dword [esp + 0x38], esi
je 0x421491
dec eax
je 0x4213f1
dec eax
je 0x42122f
mov esi, dword [esp + 0x48]
push str.AES_invalid_mode
mov ecx, esi
mov edx, dword [esi]
call dword [edx + 0x14]
mov eax, dword [ebx + 0x30]
mov ecx, esi
push eax
push str.mode
call fcn.0041e100
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x24
ret 0x14
mov ecx, dword [ebx + 0x38]
mov edx, dword [ebx + 0x3c]
mov eax, dword [ebx + 0x40]
mov dword [esp + 0x14], ecx
mov ecx, dword [ebx + 0x44]
mov dword [esp + 0x18], edx
test esi, esi
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], ecx
jbe 0x4214b7
mov ebp, dword [esp + 0x40]
mov dword [esp + 0x48], esi
mov bl, byte [esp + 0x15]
xor esi, esi
jmp 0x421267
mov bl, byte [esp + 0x15]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x14]
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ecx
lea eax, [esp + 0x24]
lea ecx, [esp + 0x24]
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0x20]
push eax
push ecx
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x38], edx
call fcn.004219e0
mov al, byte [esp + 0x14]
mov dl, bl
shr dl, 7
shl al, 1
or dl, al
mov al, byte [esp + 0x16]
mov cl, al
mov byte [esp + 0x14], dl
shr cl, 7
shl bl, 1
or cl, bl
mov byte [esp + 0x15], cl
mov cl, byte [esp + 0x17]
mov dl, cl
shr dl, 7
shl al, 1
or dl, al
mov al, byte [esp + 0x18]
mov byte [esp + 0x16], dl
mov dl, al
shr dl, 7
shl cl, 1
or dl, cl
mov cl, byte [esp + 0x19]
mov byte [esp + 0x17], dl
mov dl, cl
shr dl, 7
shl al, 1
or dl, al
mov al, byte [esp + 0x1a]
mov byte [esp + 0x18], dl
mov dl, al
shr dl, 7
shl cl, 1
or dl, cl
mov cl, byte [esp + 0x1b]
mov byte [esp + 0x19], dl
mov dl, cl
shr dl, 7
shl al, 1
or dl, al
mov al, byte [esp + 0x1c]
mov byte [esp + 0x1a], dl
mov dl, al
shr dl, 7
shl cl, 1
or dl, cl
mov cl, byte [esp + 0x1d]
mov byte [esp + 0x1b], dl
mov dl, cl
shr dl, 7
shl al, 1
or dl, al
mov al, byte [esp + 0x1e]
mov byte [esp + 0x1c], dl
mov dl, al
shr dl, 7
shl cl, 1
or dl, cl
mov cl, byte [esp + 0x1f]
mov byte [esp + 0x1d], dl
mov dl, cl
shr dl, 7
shl al, 1
or dl, al
mov al, byte [esp + 0x20]
mov byte [esp + 0x1e], dl
mov dl, al
shr dl, 7
shl cl, 1
or dl, cl
mov cl, byte [esp + 0x21]
mov byte [esp + 0x1f], dl
mov dl, cl
shr dl, 7
shl al, 1
or dl, al
mov al, byte [esp + 0x22]
mov byte [esp + 0x20], dl
mov dl, al
shr dl, 7
shl cl, 1
or dl, cl
mov cl, byte [esp + 0x23]
shr cl, 7
shl al, 1
or cl, al
mov byte [esp + 0x21], dl
mov eax, esi
mov edx, esi
mov byte [esp + 0x22], cl
and edx, 7
shr eax, 3
mov cl, 7
mov bl, byte [eax + edi]
sub cl, dl
shr bl, cl
mov cl, byte [esp + 0x23]
shl cl, 1
and bl, 1
or bl, cl
mov cl, dl
mov byte [esp + 0x23], bl
mov bl, byte [esp + 0x24]
mov dl, byte [eax + ebp]
and bl, 0x80
shr bl, cl
xor dl, bl
inc esi
cmp esi, 0x80
mov byte [eax + ebp], dl
jb 0x421263
mov eax, dword [esp + 0x48]
dec eax
mov dword [esp + 0x48], eax
jne 0x42125b
mov esi, dword [esp + 0x38]
jmp 0x4214b7
mov edx, dword [ebx + 0x3c]
mov eax, dword [ebx + 0x40]
mov ecx, dword [ebx + 0x44]
mov ebp, dword [ebx + 0x38]
test esi, esi
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], ecx
jbe 0x4214b7
mov dword [esp + 0x48], esi
mov esi, dword [esp + 0x40]
lea edx, [esp + 0x24]
mov ecx, ebx
push edx
push edi
call fcn.00421e90
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x18]
xor eax, ebp
mov ebp, dword [esp + 0x1c]
xor ecx, edx
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x24], eax
xor edx, ebp
mov ebp, dword [esp + 0x20]
xor dword [esp + 0x30], ebp
mov ebp, dword [edi]
mov dword [esi], eax
mov eax, dword [edi + 4]
mov dword [esp + 0x28], ecx
mov dword [esi + 4], ecx
mov ecx, dword [edi + 8]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x2c], edx
mov dword [esi + 8], edx
mov edx, dword [edi + 0xc]
mov dword [esi + 0xc], eax
mov eax, dword [esp + 0x48]
add edi, 0x10
add esi, 0x10
dec eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], edx
mov dword [esp + 0x48], eax
jne 0x421419
mov esi, dword [esp + 0x38]
jmp 0x4214b7
test esi, esi
jbe 0x4214b7
mov ebp, dword [esp + 0x40]
mov dword [esp + 0x48], esi
push ebp
push edi
mov ecx, ebx
call fcn.00421e90
mov eax, dword [esp + 0x48]
add edi, 0x10
add ebp, 0x10
dec eax
mov dword [esp + 0x48], eax
jne 0x42149d
mov ecx, dword [esp + 0x44]
shl esi, 4
mov dword [ecx], esi
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x24
ret 0x14