Function at 0x41e470
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 al, byte [ebx + 0x34]
push edi
test al, al
mov dword [esp + 0x10], ebx
jne 0x41e4a8
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 ecx, dword [ebx]
cmp ecx, 2
je 0x41e4d0
mov al, byte [ebx + 0x35]
test al, al
je 0x41e4d0
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 0x41e7b3
mov eax, dword [esp + 0x3c]
test eax, eax
jbe 0x41e7b3
shr eax, 7
sub ecx, 0
mov dword [esp + 0x38], eax
je 0x41e710
dec ecx
je 0x41e6eb
dec ecx
je 0x41e52d
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]
mov ecx, esi
push eax
push str.mode
call fcn.0041c2d0
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 dword [esp + 0x14], ecx
mov ecx, dword [ebx + 0x40]
mov dword [esp + 0x18], edx
mov edx, dword [ebx + 0x44]
test eax, eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], edx
jbe 0x41e7aa
mov ebp, dword [esp + 0x40]
mov dword [esp + 0x48], eax
mov bl, byte [esp + 0x15]
xor esi, esi
jmp 0x41e565
mov bl, byte [esp + 0x15]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], edx
lea ecx, [esp + 0x24]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x14]
push edx
mov dword [esp + 0x38], eax
call fcn.0041eb00
mov cl, byte [esp + 0x14]
mov al, bl
shr al, 7
shl cl, 1
or al, cl
mov cl, byte [esp + 0x17]
mov byte [esp + 0x14], al
mov al, byte [esp + 0x16]
mov dl, al
shr dl, 7
shl bl, 1
or dl, bl
mov byte [esp + 0x15], dl
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 0x41e561
mov eax, dword [esp + 0x48]
dec eax
mov dword [esp + 0x48], eax
jne 0x41e559
jmp 0x41e7a6
test eax, eax
jbe 0x41e7aa
mov esi, dword [esp + 0x40]
mov ebp, eax
push esi
push edi
mov ecx, ebx
call fcn.0041efb0
add edi, 0x10
add esi, 0x10
dec ebp
jne 0x41e6f9
jmp 0x41e7a6
mov edx, dword [ebx + 0x3c]
mov ecx, dword [ebx + 0x40]
mov ebp, dword [ebx + 0x38]
mov dword [esp + 0x18], edx
mov edx, dword [ebx + 0x44]
mov dword [esp + 0x1c], ecx
test eax, eax
mov dword [esp + 0x20], edx
jbe 0x41e7aa
mov esi, dword [esp + 0x40]
mov dword [esp + 0x48], eax
lea eax, [esp + 0x24]
mov ecx, ebx
push eax
push edi
call fcn.0041efb0
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 0x41e734
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x44]
shl eax, 4
mov dword [ecx], eax
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x24
ret 0x14