Function at 0x640a8920
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x34
push ebx
push ebp
push esi
mov esi, dword [esp + 0x48]
push edi
push esi
call dword [0x640b0c74]
mov ebp, dword [esp + 0x60]
mov ebx, 0xfffffffe
cdq
add esp, 4
mov ecx, eax
mov eax, edx
mul ebx
mov edi, eax
mov eax, ecx
mul ebx
add edi, edx
mov ebx, eax
mov eax, dword [esp + 0x60]
cmp eax, edi
jb 0x640a8a2c
ja 0x640a8965
cmp ebp, ebx
jbe 0x640a8a2c
push 0
push 0
push 0
lea ecx, [esp + 0x3c]
call dword [0x640b0d14]
lea ecx, [esp + 0x28]
push ecx
mov ecx, eax
call dword [0x640b06d0]
push str.Derived_key_too_long:_n
mov ecx, dword [eax]
mov byte [ecx + 0x14], 0
mov ecx, eax
call dword [0x640b0404]
push str.Algorithm
mov eax, dword [eax]
mov dword [esp + 0x1c], eax
inc dword [eax + 0xc]
lea eax, [esp + 0x1c]
push dword [0x640b0c80]
push esi
push eax
lea eax, [esp + 0x24]
push eax
call dword [0x640b0a7c]
mov esi, dword [0x640b03f8]
lea ecx, [esp + 0x2c]
add esp, 0x14
call esi
push str._was_chosen_which_produces_output_of_length
lea ecx, [esp + 0x18]
call dword [0x640b0404]
push edi
push ebx
mov ecx, eax
call dword [0x640b0c78]
push str._but
mov ecx, eax
call dword [0x640b0404]
mov ecx, dword [esp + 0x60]
push ecx
push ebp
mov ecx, eax
call dword [0x640b0c78]
push str._was_requested.
mov ecx, eax
call dword [0x640b0404]
lea ecx, [esp + 0x14]
call esi
lea ecx, [esp + 0x28]
call esi
mov ecx, dword [esp + 0x48]
call dword [0x640b0df8]
mov eax, dword [esp + 0x48]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret
cmp dword [esp + 0x58], 1
jl 0x640a8a16
test eax, eax
jne 0x640a8a3c
cmp ebp, 1
jb 0x640a8a16
lea ecx, [esp + 0x1c]
call dword [0x640b0df8]
push dword [esp + 0x50]
mov edi, 1
lea ecx, [esp + 0x14]
push esi
mov dword [esp + 0x30], edi
call dword [0x640b0c54]
push 0
push 4
lea ecx, [esp + 0x28]
call dword [0x640b0df4]
mov eax, dword [esp + 0x1c]
mov eax, dword [eax + 4]
cdq
cmp edx, dword [esp + 0x60]
ja 0x640a8c62
jb 0x640a8a88
cmp eax, ebp
jae 0x640a8c62
mov ebx, dword [0x640b0c5c]
mov ebp, dword [0x640b0c60]
mov esi, dword [0x640b0c7c]
nop word [eax + eax]
push dword [esp + 0x54]
lea ecx, [esp + 0x14]
call ebx
lea ecx, [esp + 0x20]
call dword [0x640b0d00]
mov ecx, edi
bswap ecx
mov dword [eax], ecx
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x14]
call ebx
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x14]
call ebp
lea ecx, [esp + 0x10]
call esi
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x18]
call dword [0x640b0d08]
mov eax, dword [esp + 0x58]
cmp eax, 1
jle 0x640a8c18
dec eax
mov dword [esp + 0x24], eax
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x14]
call ebx
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x14]
call ebp
push eax
lea ecx, [esp + 0x1c]
call dword [0x640b034c]
lea ecx, [esp + 0x2c]
call dword [0x640b0df0]
lea ecx, [esp + 0x10]
call esi
lea ecx, [esp + 0x14]
call dword [0x640b0c68]
lea ecx, [esp + 0x18]
mov edi, eax
call dword [0x640b0c6c]
lea ecx, [esp + 0x14]
mov esi, eax
call dword [0x640b0c70]
lea ecx, [esp + 0x14]
mov ebp, eax
call dword [0x640b0c6c]
mov ebx, ebp
xor ecx, ecx
sub ebx, eax
xor edx, edx
cmp eax, ebp
cmova ebx, ecx
test ebx, ebx
je 0x640a8be0
cmp ebx, 0x40
jb 0x640a8be0
lea ecx, [esi - 1]
add ecx, ebx
cmp edi, ecx
ja 0x640a8b7e
lea ecx, [edi - 1]
add ecx, ebx
cmp ecx, esi
jae 0x640a8be0
lea ecx, [eax - 1]
add ecx, ebx
cmp edi, ecx
ja 0x640a8b90
lea ecx, [edi - 1]
add ecx, ebx
cmp ecx, eax
jae 0x640a8be0
and ebx, 0xffffffc0
movups xmm0, xmmword [esi]
add edx, 0x40
movups xmm1, xmmword [eax]
pxor xmm1, xmm0
movups xmm0, xmmword [esi + 0x10]
movups xmmword [edi], xmm1
movups xmm1, xmmword [eax + 0x10]
pxor xmm1, xmm0
movups xmm0, xmmword [esi + 0x20]
movups xmmword [edi + 0x10], xmm1
movups xmm1, xmmword [eax + 0x20]
pxor xmm1, xmm0
movups xmm0, xmmword [esi + 0x30]
add esi, 0x40
movups xmmword [edi + 0x20], xmm1
movups xmm1, xmmword [eax + 0x30]
add eax, 0x40
pxor xmm1, xmm0
movups xmmword [edi + 0x30], xmm1
add edi, 0x40
cmp edx, ebx
jne 0x640a8b93
cmp eax, ebp
je 0x640a8bf7
sub edi, esi
mov cl, byte [eax]
lea esi, [esi + 1]
xor cl, byte [esi - 1]
inc eax
mov byte [esi + edi - 1], cl
cmp eax, ebp
jne 0x640a8be6
sub dword [esp + 0x24], 1
mov ebx, dword [0x640b0c5c]
mov ebp, dword [0x640b0c60]
mov esi, dword [0x640b0c7c]
jne 0x640a8af7
mov edi, dword [esp + 0x28]
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x20]
call dword [0x640b0368]
inc edi
lea ecx, [esp + 0x14]
mov dword [esp + 0x28], edi
call dword [0x640b0df0]
lea ecx, [esp + 0x18]
call dword [0x640b0df0]
mov eax, dword [esp + 0x1c]
mov eax, dword [eax + 4]
cdq
cmp edx, dword [esp + 0x60]
jb 0x640a8aa0
ja 0x640a8c5e
cmp eax, dword [esp + 0x5c]
jb 0x640a8aa0
mov ebp, dword [esp + 0x5c]
mov esi, dword [esp + 0x48]
lea ecx, [esp + 0x1c]
push ebp
push esi
call dword [0x640b06d4]
lea ecx, [esp + 0x20]
call dword [0x640b0df0]
lea ecx, [esp + 0x10]
call dword [0x640b0c58]
lea ecx, [esp + 0x1c]
call dword [0x640b0df0]
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret