Function at 0x40e942
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x2c
push ebx
mov bl, byte [esp + 0x34]
push ebp
and cl, 0x1f
push esi
mov esi, edx
mov al, cl
mov dl, 0xf5
imul dl
mov ebp, dword [esi + 0xfc]
add bl, 6
mov byte [esp + 0x3c], bl
mov bl, al
movzx eax, cl
mov dword [esp + 0x2c], eax
imul eax, eax, 0x38
xor bl, 5
and bl, 0x1f
mov dword [esp + 0x14], eax
add eax, 0x91
push edi
mov byte [esp + 0x14], cl
mov dword [esp + 0x1c], eax
mov edi, 4
add eax, 0
mov edx, dword [esp + 0x1c]
mov ecx, ebp
call fcn.0040ec7a
mov dl, al
shr eax, 3
mov al, byte [eax + esi]
and dl, 7
mov cl, 7
sub cl, dl
mov edx, dword [esp + 0x1c]
shr al, cl
mov ecx, edi
and al, 1
shl al, cl
xor bl, al
inc edx
dec edi
cmp edi, 0xffffffff
mov dword [esp + 0x1c], edx
jg 0x40e990
mov edx, dword [esp + 0x18]
add edx, 0x90
mov ecx, ebp
call fcn.0040ec7a
mov dl, al
shr eax, 3
mov al, byte [eax + esi]
and dl, 7
mov cl, 7
sub cl, dl
shr al, cl
and al, 1
cmp bl, 0x1f
mov byte [esp + 0x13], al
je 0x40ea61
add bl, byte [esp + 0x40]
mov eax, dword [esp + 0x18]
movzx edi, bl
lea edx, [edi + eax + 0x90]
mov ecx, ebp
call fcn.0040ec7a
mov ecx, dword [esp + 0x30]
add edi, ecx
and edi, 0x80000007
mov ebx, eax
jns 0x40ea1e
dec edi
or edi, 0xfffffff8
inc edi
mov edx, dword [esp + 0x18]
lea edx, [edi + edx + 0xc0]
mov ecx, ebp
call fcn.0040ec7a
mov dl, bl
and dl, 7
shr ebx, 3
mov cl, 7
sub cl, dl
mov dl, byte [ebx + esi]
mov bl, al
shr dl, cl
shr eax, 3
mov al, byte [eax + esi]
and bl, 7
mov cl, 7
sub cl, bl
shr al, cl
xor dl, al
mov al, byte [esp + 0x13]
and dl, 1
xor al, dl
mov byte [esp + 0x13], al
movzx eax, byte [esp + 0x40]
mov ecx, 0x30
sub ecx, eax
xor edi, edi
test ecx, ecx
mov dword [esp + 0x2c], edi
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], ecx
jle 0x40ec02
mov cl, byte [esp + 0x14]
and cl, 1
add eax, 0x90
mov byte [esp + 0x40], cl
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], 0x8f
xor bl, bl
test cl, cl
je 0x40eaf9
mov eax, edi
cdq
mov ecx, 0x26
idiv ecx
mov ebp, dword [esi + 0xfc]
mov eax, 0x7df
mov ecx, ebp
sub eax, edx
mov edx, eax
call fcn.0040ec7a
mov edx, dword [esp + 0x20]
mov ecx, ebp
mov ebx, eax
call fcn.0040ec7a
mov dl, bl
and dl, 7
shr ebx, 3
mov bl, byte [ebx + esi]
mov cl, 7
sub cl, dl
mov dl, al
shr bl, cl
shr eax, 3
mov al, byte [eax + esi]
and dl, 7
mov cl, 7
sub cl, dl
shr al, cl
xor bl, al
and bl, 1
mov al, byte [esp + 0x13]
test al, al
je 0x40eb61
mov eax, edi
cdq
mov ecx, 0x26
idiv ecx
mov ebp, dword [esi + 0xfc]
mov ecx, ebp
add edx, 0x40
call fcn.0040ec7a
lea edx, [edi + 0x790]
mov ecx, ebp
mov dword [esp + 0x28], eax
call fcn.0040ec7a
mov edx, dword [esp + 0x28]
mov dword [esp + 0x1c], eax
mov ebp, dword [esp + 0x1c]
mov al, dl
and al, 7
shr edx, 3
mov dl, byte [edx + esi]
mov cl, 7
sub cl, al
mov al, byte [esp + 0x1c]
shr dl, cl
and al, 7
mov cl, 7
sub cl, al
shr ebp, 3
mov al, byte [esi + ebp]
shr al, cl
xor dl, al
and dl, 1
xor bl, dl
test bl, bl
je 0x40ebdf
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x28], 0x20
mov edx, dword [esp + 0x1c]
mov ecx, dword [esi + 0xfc]
call fcn.0040ec7a
mov dl, al
and dl, 7
mov cl, 7
sub cl, dl
mov edx, eax
shr edx, 3
mov dl, byte [edx + esi]
shr dl, cl
mov ecx, eax
and ecx, 7
shr eax, 3
lea ebp, [eax + esi]
and dl, 1
mov edi, 7
sub edi, ecx
mov ecx, edi
xor dl, bl
mov al, 1
shl al, cl
and dl, 1
shl dl, cl
mov cl, byte [ebp]
not al
and al, cl
mov ecx, dword [esp + 0x1c]
or dl, al
mov eax, dword [esp + 0x28]
add ecx, 0x38
dec eax
mov byte [ebp], dl
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x28], eax
jne 0x40eb75
mov edi, dword [esp + 0x2c]
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x38]
inc edi
dec edx
inc ecx
cmp edi, eax
mov dword [esp + 0x2c], edi
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], ecx
jl 0x40ec71
mov eax, dword [esp + 0x34]
mov edi, dword [esi + 0xfc]
mov ebp, dword [esp + 0x18]
lea edx, [eax + ebp + 0x90]
mov ecx, edi
call fcn.0040ec7a
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x34]
add edx, ecx
and edx, 0x80000007
mov ebx, eax
jns 0x40ec33
dec edx
or edx, 0xfffffff8
inc edx
lea edx, [edx + ebp + 0xc0]
mov ecx, edi
call fcn.0040ec7a
mov dl, al
and dl, 7
shr eax, 3
mov al, byte [eax + esi]
mov cl, 7
sub cl, dl
shr al, cl
mov dl, bl
and dl, 7
shr ebx, 3
mov cl, 7
sub cl, dl
mov dl, byte [ebx + esi]
shr dl, cl
pop edi
pop esi
pop ebp
xor al, dl
and al, 1
pop ebx
add esp, 0x2c
ret 4
mov cl, byte [esp + 0x40]
jmp 0x40ea9f