Function at 0x654040
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x88
mov esi, esp
mov dword [esi + 0x70], ebp
mov dword [esi + 0x74], esp
mov dword [esi + 0x80], 0xffffffff
mov dword [esi + 0x7c], 0x7063b0
mov dword [esi + 0x14], ecx
mov ecx, dword [ebp + 0xc]
mov dword [esi + 0x10], edx
mov eax, dword fs:[0]
mov dword [esi + 0x78], eax
lea eax, [esi + 0x78]
mov dword fs:[0], eax
mov edx, dword [ecx + 8]
mov eax, dword [ecx]
test edx, edx
mov dword [esi + 8], eax
mov dword [esi + 0xc], edx
je 0x654250
lea edi, [eax + 5]
lea edx, [edx*8]
mov ecx, 0xcbf29ce4
mov eax, 0x84222325
nop word [eax + eax]
mov dword [esi + 4], edi
mov dword [esi + 0x18], edx
imul ebx, ecx, 0x1b3
mov edx, dword [esi + 4]
mov ecx, dword [esi + 4]
movzx edi, byte [edx - 1]
movzx ecx, byte [ecx]
mov edx, 0x1b3
xor edi, eax
mov eax, edi
shl edi, 8
mul edx
xor ecx, eax
add edi, edx
mov edx, 0x1b3
mov eax, ecx
add ebx, edi
shl ecx, 8
mul edx
imul edi, ebx, 0x1b3
add ecx, edx
mov edx, 0x1b3
add edi, ecx
mov ecx, eax
mov eax, dword [esi + 4]
xor ecx, dword [eax - 5]
mov eax, ecx
shl ecx, 8
mul edx
add ecx, edx
imul edx, edi, 0x1b3
mov edi, dword [esi + 4]
add ecx, edx
mov edx, dword [esi + 0x18]
add edi, 8
add edx, 0xfffffff8
jne 0x6540b0
mov ebx, dword [ebp + 8]
mov edi, dword [ebx + 8]
test edi, edi
je 0x654268
push 0
push edi
push ecx
push eax
call fcn.00708340
mov ecx, eax
cmp edi, eax
jbe 0x654407
mov eax, dword [ebx]
lea edi, [ecx + ecx*4]
mov dword [esi + 0x18], ecx
mov edx, dword [esi + 0xc]
mov dword [esi + 4], edi
movzx ecx, word [eax + edi*4 + 0x10]
cmp cx, word [ebx + 0x10]
jne 0x6541c8
cmp dword [eax + edi*4 + 8], edx
jne 0x6541c8
mov edi, dword [esi + 8]
test edx, edx
je 0x6543df
mov ecx, dword [esi + 4]
lea ecx, [eax + ecx*4]
mov edx, dword [ecx]
xor ecx, ecx
nop word cs:[eax + eax]
nop
movd xmm0, dword [edx + ecx*8 + 4]
movd xmm1, dword [edi + ecx*8 + 4]
pcmpeqb xmm1, xmm0
punpcklbw xmm0, xmm1
pshuflw xmm0, xmm0, 0x60
pshufd xmm0, xmm0, 0x50
movmskpd ebx, xmm0
cmp bl, 3
jne 0x6543d2
mov edi, dword [edx + ecx*8]
mov ebx, dword [esi + 8]
cmp edi, dword [ebx + ecx*8]
mov edi, dword [esi + 8]
jne 0x6543d2
inc ecx
cmp dword [esi + 0xc], ecx
jne 0x654180
jmp 0x6543e9
test edx, edx
je 0x654292
xor ebx, ebx
cmp edx, 0x10000000
setb al
jae 0x65443f
mov bl, al
lea edi, [edx*8]
shl ebx, 2
test edi, edi
js 0x654454
mov dword [esi + 0x1c], ebx
je 0x654225
movzx eax, byte [0x919aa5]
mov eax, dword [0x919820]
test eax, eax
jne 0x654219
call dword [sym.imp.kernel32.dll_GetProcessHeap]
test eax, eax
je 0x654233
mov dword [0x919820], eax
push edi
push 0
push eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
mov dword [esi + 0x80], 0
jne 0x6542a8
mov ecx, dword [esi + 0x1c]
mov edx, edi
mov byte [esi + 3], 1
mov dword [esi + 0x80], 0
call fcn.00709d20
jmp 0x654467
mov ecx, 0xcbf29ce4
mov eax, 0x84222325
mov ebx, dword [ebp + 8]
mov edi, dword [ebx + 8]
test edi, edi
jne 0x65412d
mov byte [esi + 3], 1
mov dword [esi + 0x80], 0
mov ecx, str.attempt_to_calculate_the_remainder_with_a_divisor_of_zero
mov edx, 0x39
push 0x8be0b0
call fcn.0070a0f0
add esp, 4
jmp 0x654467
lea edi, [edx*8]
mov ebx, 4
mov dword [esi + 0x80], 0
push edi
push dword [esi + 8]
push ebx
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov eax, dword [esi + 0xc]
mov edx, dword [esi + 0x10]
mov dword [esi + 0x24], ebx
mov byte [esi + 3], 1
lea ecx, [esi + 0x30]
mov dword [esi + 0x28], eax
mov dword [esi + 0x2c], eax
lea eax, [esi + 0x20]
mov word [esi + 0x20], 2
push eax
call fcn.00658ff0
add esp, 4
mov eax, dword [esi + 0x30]
mov edi, dword [ebp + 8]
cmp eax, 0x27
jne 0x654355
mov eax, dword [ebp + 0xc]
mov edx, dword [edi + 8]
mov ecx, dword [esi + 0x18]
mov eax, dword [eax + 4]
cmp edx, ecx
mov dword [esi + 0x10], eax
jbe 0x654426
mov eax, dword [edi]
mov edx, dword [esi + 4]
mov ecx, edi
mov edi, dword [esi + 0x34]
movzx ecx, word [ecx + 0x10]
cmp dword [eax + edx*4 + 4], 0
lea ebx, [eax + edx*4]
je 0x65432f
push dword [ebx]
push 0
push dword [0x919820]
mov word [esi + 4], cx
call dword [sym.imp.kernel32.dll_HeapFree]
movzx ecx, word [esi + 4]
mov eax, dword [esi + 8]
mov edx, dword [esi + 0xc]
mov dword [ebx], eax
mov eax, dword [esi + 0x10]
mov dword [ebx + 4], eax
mov dword [ebx + 8], edx
mov dword [ebx + 0xc], edi
mov word [ebx + 0x10], cx
mov ecx, dword [esi + 0x14]
mov dword [ecx + 4], edi
mov dword [ecx], 0x27
jmp 0x6543c1
mov edx, dword [esi + 0x14]
movsd xmm2, qword [esi + 0x60]
movsd xmm1, qword [esi + 0x58]
movsd xmm0, qword [esi + 0x68]
mov ecx, dword [esi + 0x34]
mov edi, dword [esi + 8]
movsd qword [edx + 0x30], xmm2
movsd qword [edx + 0x28], xmm1
movsd xmm2, qword [esi + 0x50]
movsd xmm1, qword [esi + 0x48]
movsd qword [edx + 0x38], xmm0
movsd qword [edx + 0x20], xmm2
movsd qword [edx + 0x18], xmm1
movsd xmm2, qword [esi + 0x40]
movq xmm1, qword [esi + 0x38]
movsd qword [edx + 0x10], xmm2
movq qword [edx + 8], xmm1
mov dword [edx], eax
mov dword [edx + 4], ecx
mov eax, dword [ebp + 0xc]
cmp dword [eax + 4], 0
je 0x6543c1
push edi
push 0
push dword [0x919820]
call dword [sym.imp.kernel32.dll_HeapFree]
mov eax, dword [esi + 0x78]
mov dword fs:[0], eax
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov edx, dword [esi + 0xc]
cmp ecx, edx
jb 0x6541d0
jmp 0x6543e9
xor ecx, ecx
cmp ecx, edx
jb 0x6541d0
mov ecx, dword [esi + 4]
mov edx, dword [esi + 0x14]
mov eax, dword [eax + ecx*4 + 0xc]
mov dword [edx + 4], eax
mov dword [edx], 0x27
mov eax, dword [ebp + 0xc]
cmp dword [eax + 4], 0
jne 0x6543b2
jmp 0x6543c1
mov byte [esi + 3], 1
mov dword [esi + 0x80], 0
mov edx, edi
push 0x8be0fc
call fcn.00709fa0
add esp, 4
jmp 0x654467
mov dword [esi + 0x80], 1
push 0x8be10c
call fcn.00709fa0
add esp, 4
jmp 0x654467
mov byte [esi + 3], 1
mov dword [esi + 0x80], 0
call fcn.00425040
jmp 0x654467
mov byte [esi + 3], 1
mov dword [esi + 0x80], 0
call fcn.00425040
ud2