Function at 0x1400221c0
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x2f]
sub rsp, 0x90
mov rdi, rdx
mov r13d, 1
mov edx, r13d
mov r15, r9
mov rsi, r8
mov rbx, rcx
call qword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x14002259f
mov ecx, dword [rbx]
test cl, 8
je 0x140022217
lea eax, [r13 + 0xc]
jmp 0x1400225b8
mov r14d, dword [rbp + 0x7f]
xor r12d, r12d
and ecx, 0xffffff0f
mov qword [rbx + 0xa0], r12
mov eax, r14d
mov qword [rbx + 0x78], r12
and eax, 0xffffffcf
mov qword [rbx + 0x20], r12
mov dword [rbx + 0x80], r12d
mov dword [rbx], ecx
mov dword [rbp + 0x13], r14d
sub eax, r13d
je 0x1400223c5
sub eax, r13d
je 0x1400222b0
cmp eax, 6
je 0x140022295
test rsi, rsi
je 0x14002259f
test r15, r15
je 0x14002259f
mov r13d, dword [rbp + 7]
or ecx, 0xa0
mov dword [rbx], ecx
mov qword [rbx + 0x88], rsi
mov qword [rbx + 0x90], r15
mov qword [rbx + 0x70], r15
mov qword [rbx + 0x98], r12
jmp 0x140022373
mov r13d, dword [rbp + 7]
mov qword [rbx + 0x88], r12
mov qword [rbx + 0x70], r12
mov dword [rbp + 0xf], 0x41c00010
jmp 0x140022432
test rsi, rsi
je 0x14002259f
xor r9d, r9d
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], r12d
mov edx, 0x80000000
mov rcx, rsi
lea r8d, [r9 + 3]
mov dword [rsp + 0x20], r8d
test r14b, 0x10
je 0x1400222e5
call qword [sym.imp.KERNEL32.dll_CreateFileW]
jmp 0x1400222eb
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rbx + 0x88], rax
cmp rax, 0xffffffffffffffff
je 0x1400223f4
mov rcx, qword [rbx + 0x88]
lea r8, [rbp + 7]
mov r9d, r13d
mov qword [rbp + 7], r12
mov rdx, r12
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x14002234e
mov rax, qword [rbp + 7]
lea rdx, [rbp + 0x17]
or dword [rbx], 0x20
mov rcx, rbx
mov qword [rbx + 0x20], rax
call fcn.14001e240
test eax, eax
je 0x14002235a
mov rcx, qword [rbx + 0x88]
mov r13d, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, r13d
jmp 0x1400225b8
mov qword [rbx + 0x20], r12
mov qword [rbx + 0x70], 0xffffffffffffffff
or dword [rbx], 0x40
mov r13d, r12d
test rdi, rdi
cmovne rsi, rdi
mov rdi, rsi
test byte [rbx], 0x20
jne 0x1400224ba
mov dword [rbp + 0xf], 0x81800000
mov rcx, rdi
test r14b, 0x10
je 0x1400223fc
call qword [sym.imp.KERNEL32.dll_lstrlenW]
dec eax
cdqe
lea rcx, [rdi + rax*2]
movzx eax, word [rdi + rax*2]
cmp ax, 0x2e
je 0x140022432
nop
cmp rcx, rdi
jbe 0x14002242b
cmp ax, 0x2f
je 0x14002242b
cmp ax, 0x5c
je 0x14002242b
movzx eax, word [rcx - 2]
sub rcx, 2
cmp ax, 0x2e
jne 0x1400223a0
jmp 0x140022432
lea rax, [rsi - 1]
mov qword [rbx + 0x88], rsi
cmp rax, 0xfffffffffffffffd
ja 0x14002259f
lea r8, [rbp + 0x17]
mov rdx, r15
mov rcx, rbx
call fcn.140021d90
mov r13d, eax
test eax, eax
je 0x14002236a
mov eax, r13d
jmp 0x1400225b8
call qword [sym.imp.KERNEL32.dll_lstrlenA]
dec eax
movsxd rcx, eax
add rcx, rdi
movzx eax, byte [rcx]
cmp al, 0x2e
je 0x140022432
cmp rcx, rdi
jbe 0x14002242b
cmp al, 0x2f
je 0x14002242b
cmp al, 0x5c
je 0x14002242b
movzx eax, byte [rcx - 1]
dec rcx
cmp al, 0x2e
jne 0x140022411
jmp 0x140022432
mov dword [rbp + 0xf], 0x81c00000
test r14b, 0x20
jne 0x1400224ac
lea rcx, [rbp - 0x19]
call qword [sym.imp.KERNEL32.dll_GetLocalTime]
lea rdx, [rbp + 7]
lea rcx, [rbp - 0x19]
call qword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
lea r8, [rbp - 1]
lea rdx, [rbp - 0x21]
lea rcx, [rbp + 7]
call qword [sym.imp.KERNEL32.dll_FileTimeToDosDateTime]
movzx r14d, word [rbp - 0x21]
movabs rcx, 0xfe624e212ac18000
add rcx, qword [rbp + 7]
movabs rax, 0xd6bf94d5e57a42bd
imul rcx
shl r14d, 0x10
lea rsi, [rcx + rdx]
sar rsi, 0x17
mov rax, rsi
shr rax, 0x3f
add rsi, rax
movzx eax, word [rbp - 1]
or r14d, eax
mov dword [rbp + 0x1b], esi
mov dword [rbp - 1], r14d
mov r14d, dword [rbp + 0x13]
jmp 0x1400224c9
mov r14d, dword [rbp + 0x23]
mov dword [rbp - 1], r14d
mov r14d, dword [rbp + 0x13]
jmp 0x1400224c6
mov eax, dword [rbp + 0x27]
mov dword [rbp + 0xf], eax
mov eax, dword [rbp + 0x23]
mov dword [rbp - 1], eax
mov esi, dword [rbp + 0x1b]
mov edx, 0x169
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov r15, rax
test rax, rax
jne 0x1400224e6
lea edi, [rax + 2]
jmp 0x1400225a4
xor edx, edx
mov r8d, 0x160
mov rcx, r15
call sub.VCRUNTIME140.dll_memset
and r14d, 0x20
mov dword [rbp + 7], r14d
je 0x140022532
mov eax, 8
mov dil, 8
mov word [r15 + 2], ax
mov rax, qword [rbx + 0x70]
mov qword [r15 + 0x10], rax
mov qword [r15 + 0x18], rax
mov rax, qword [rbx + 0x18]
mov qword [r15 + 0x38], rax
or dword [rbx], 0x80000000
mov edx, dword [rbx]
mov byte [rbp - 0x21], dil
jmp 0x140022b01
test byte [rbp + 0x13], 0x10
lea r14, [r15 + 0x50]
je 0x140022579
mov qword [rsp + 0x38], r12
mov r9d, 0xffffffff
mov qword [rsp + 0x30], r12
mov r8, rdi
mov dword [rsp + 0x28], 0x104
xor edx, edx
mov ecx, 0xfde9
mov qword [rsp + 0x20], r14
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [r15 + 0x20], eax
test eax, eax
je 0x140022596
dec eax
mov dword [r15 + 0x20], eax
jmp 0x140022592
mov rdx, rdi
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_lstrcpyA]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_lstrlenA]
mov dword [r15 + 0x20], eax
test eax, eax
jne 0x1400225d9
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_GlobalFree]
mov edi, 9
test byte [rbx], 0x40
je 0x1400225b6
mov rcx, qword [rbx + 0x88]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
lea r11, [rsp + 0x90]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
movzx ecx, byte [r14]
mov rax, r14
test cl, cl
je 0x1400225f7
cmp cl, 0x5c
jne 0x1400225ec
mov byte [rax], 0x2f
movzx ecx, byte [rax + 1]
inc rax
test cl, cl
jne 0x1400225e4
mov dword [rbp - 0x19], 0xd5455
lea rcx, [r15 + 0x160]
mov qword [r15 + 0x48], rcx
mov eax, 8
mov word [r15], ax
xor dil, dil
mov eax, dword [rbp - 1]
mov edx, 9
mov dword [r15 + 4], eax
mov r13d, r12d
mov eax, dword [rbp + 0xf]
mov dword [r15 + 0x34], eax
lea rax, [rbp - 0x19]
mov qword [r15 + 0x40], rax
movzx eax, byte [rbp + 0x1b]
mov byte [rbp - 0x14], al
mov eax, esi
shr eax, 8
mov byte [rbp - 0x13], al
mov eax, esi
shr eax, 0x10
mov byte [rbp - 0x12], al
mov byte [rbp - 0x15], 7
movsd xmm0, qword [rbp - 0x19]
mov dword [r15 + 0x24], reloc.OLEAUT32.dll_SafeArrayGetElemsize
mov dword [r15 + 0x28], edx
shr esi, 0x18
mov byte [rbp - 0x11], sil
movsd qword [rcx], xmm0
movzx eax, byte [rbp - 0x11]
mov byte [rcx + 8], al
mov rax, qword [r15 + 0x48]
mov byte [rbp - 0x21], dil
mov byte [rax + 2], 5
mov rax, qword [r15 + 0x48]
mov byte [rax + 4], 1
cmp dword [rbx], r12d
jge 0x14002269a
mov dil, 8
mov dword [r15 + 0x24], r12d
mov byte [rbp - 0x21], dil
jmp 0x140022732
test byte [rbp + 0x13], 8
je 0x1400226bf
mov edx, dword [r15 + 0x20]
lea eax, [rdx - 1]
cmp byte [rax + r15 + 0x50], 0x2f
je 0x140022732
mov byte [rdx + r15 + 0x50], gethostbyname
inc dword [r15 + 0x20]
jmp 0x140022732
cmp qword [rbx + 0x10], r12
je 0x1400226cf
mov r13d, reloc.OLEAUT32.dll_VariantTimeToDosDateTime
mov word [r15], dx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_lstrlenA]
movsxd rdi, eax
add rdi, r14
cmp rdi, r14
jbe 0x1400226f3
cmp byte [rdi], 0x2e
je 0x1400226f0
dec rdi
cmp rdi, r14
ja 0x1400226e3
cmp rdi, r14
jne 0x1400226fa
cmp byte [rdi], 0x2e
jne 0x140022726
lea rsi, [0x1400cdbb0]
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x14002272f
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
cdqe
add rsi, rax
cmp byte [rsi], r12b
jne 0x140022701
mov dil, 8
mov byte [rbp - 0x21], dil
jmp 0x140022732
xor dil, dil
movzx eax, word [r15]
mov word [r15 + 0x30], ax
movzx eax, dil
mov word [r15 + 2], ax
test dil, dil
jne 0x14002275d
mov rcx, qword [rbx + 0x70]
cmp rcx, 0xffffffffffffffff
je 0x14002275d
mov eax, r13d
add rax, rcx
mov qword [r15 + 0x10], rax
mov rax, qword [rbx + 0x70]
mov rdx, rbx
mov qword [r15 + 0x18], rax
mov rcx, r15
mov rax, qword [rbx + 0x18]
add rax, qword [rbx + 0x20]
mov qword [r15 + 0x38], rax
mov dword [rbx + 0x28], r12d
call fcn.140020f80
mov eax, dword [rbx + 0x28]
test eax, eax
jne 0x140022c4c
mov edx, dword [rbx]
mov ecx, dword [r15 + 0x20]
test edx, edx
jns 0x1400227a1
add ecx, 0xb
mov qword [rbx + 0x18], rcx
jmp 0x140022afd
mov eax, dword [r15 + 0x24]
add eax, 0x32
add eax, ecx
add qword [rbx + 0x18], rax
test r13d, r13d
je 0x140022afd
mov dword [rbx + 0x48], 0x12345678
lea r14, [0x1400cf5d0]
mov dword [rbx + 0x4c], 0x23456789
mov dword [rbx + 0x50], 0x34567890
mov r8, qword [rbx + 0x10]
test r8, r8
je 0x14002282d
nop dword [rax]
movzx eax, byte [r8]
test al, al
je 0x14002282d
mov edx, dword [rbx + 0x48]
xor rax, rdx
movzx ecx, al
shr edx, 8
mov eax, dword [r14 + rcx*4]
mov ecx, dword [rbx + 0x50]
xor eax, edx
mov dword [rbx + 0x48], eax
movzx eax, al
add eax, dword [rbx + 0x4c]
imul edx, eax, 0x8088405
movzx eax, cl
shr ecx, 8
inc edx
mov dword [rbx + 0x4c], edx
shr rdx, 0x18
xor rdx, rax
mov eax, dword [r14 + rdx*4]
xor eax, ecx
mov dword [rbx + 0x50], eax
add r8, 1
jne 0x1400227e0
mov rdi, r12
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
sar eax, 7
mov byte [rbp + rdi - 0x19], al
inc rdi
cmp rdi, 0xc
jl 0x140022830
movzx eax, byte [r15 + 5]
mov byte [rbp - 0xe], al
nop
movsx rsi, byte [rbp + r12 - 0x19]
mov edx, dword [rbx + 0x48]
mov rax, rsi
xor rax, rdx
mov r8d, dword [rbx + 0x50]
movzx ecx, al
mov r11d, r8d
shr edx, 8
and r11d, 0xfffd
or r11d, 2
mov r10d, dword [r14 + rcx*4]
xor r10d, edx
movzx ecx, r8b
movzx eax, r10b
mov edx, r10d
add eax, dword [rbx + 0x4c]
imul edi, eax, 0x8088405
shr r8d, 8
inc edi
mov eax, edi
shr rax, 0x18
xor rcx, rax
mov eax, r11d
xor eax, 1
imul eax, r11d
mov r9d, dword [r14 + rcx*4]
xor r9d, r8d
mov r11d, r9d
shr eax, 8
and r11d, 0xfffd
xor al, sil
or r11d, 2
movsx rsi, byte [rbp + r12 - 0x18]
mov byte [rbp + r12 - 0x19], al
mov rax, rsi
xor rax, rdx
shr edx, 8
movzx ecx, al
mov r10d, dword [r14 + rcx*4]
xor r10d, edx
mov edx, r9d
shr edx, 8
movzx eax, r10b
add eax, edi
imul edi, eax, 0x8088405
movzx eax, r9b
inc edi
mov ecx, edi
shr rcx, 0x18
xor rcx, rax
mov eax, r11d
xor eax, 1
imul eax, r11d
movsx r11, byte [rbp + r12 - 0x17]
mov r8d, dword [r14 + rcx*4]
xor r8d, edx
mov edx, r10d
mov ecx, edx
mov r9d, r8d
shr eax, 8
xor rcx, r11
xor al, sil
shr edx, 8
mov byte [rbp + r12 - 0x18], al
and r9d, 0xfffd
movzx eax, cl
or r9d, 2
movzx ecx, r8b
mov r10d, dword [r14 + rax*4]
xor r10d, edx
mov edx, r8d
movzx eax, r10b
add eax, edi
shr edx, 8
imul edi, eax, 0x8088405
inc edi
mov eax, edi
shr rax, 0x18
xor rcx, rax
mov r14d, dword [r14 + rcx*4]
xor r14d, edx
movsx r8, byte [rbp + r12 - 0x15]
mov eax, r9d
xor eax, 1
mov edx, r10d
imul eax, r9d
mov ecx, edx
shr edx, 8
mov r9d, r14d
and r9d, 0xfffd
or r9d, 2
shr eax, 8
xor al, r11b
movsx r11, byte [rbp + r12 - 0x16]
mov byte [rbp + r12 - 0x17], al
xor rcx, r11
movzx eax, cl
lea rcx, [0x1400cf5d0]
mov ecx, dword [rcx + rax*4]
xor ecx, edx
movzx eax, cl
mov esi, ecx
add eax, edi
imul ecx, eax, 0x8088405
movzx eax, r14b
shr r14d, 8
inc ecx
mov r10d, ecx
shr rcx, 0x18
xor rcx, rax
lea rax, [0x1400cf5d0]
mov edi, dword [rax + rcx*4]
mov ecx, esi
xor rcx, r8
shr esi, 8
xor edi, r14d
mov eax, r9d
xor eax, 1
lea r14, [0x1400cf5d0]
imul eax, r9d
mov edx, edi
movsx r9, byte [rbp + r12 - 0x14]
and edx, 0xfffd
or edx, 2
shr eax, 8
xor al, r11b
mov byte [rbp + r12 - 0x16], al
movzx eax, cl
mov ecx, dword [r14 + rax*4]
xor ecx, esi
movzx eax, cl
mov r11d, ecx
add eax, r10d
imul r10d, eax, 0x8088405
movzx eax, dil
shr edi, 8
inc r10d
mov ecx, r10d
shr rcx, 0x18
xor rcx, rax
mov eax, edx
xor eax, 1
imul eax, edx
mov esi, dword [r14 + rcx*4]
xor esi, edi
mov edx, esi
mov dword [rbx + 0x50], esi
shr eax, 8
and edx, 0xfffd
xor al, r8b
or edx, 2
mov byte [rbp + r12 - 0x15], al
mov rax, r9
xor rax, r11
shr r11d, 8
movzx ecx, al
mov eax, dword [r14 + rcx*4]
xor eax, r11d
mov dword [rbx + 0x48], eax
movzx eax, al
add eax, r10d
imul ecx, eax, 0x8088405
inc ecx
mov dword [rbx + 0x4c], ecx
movzx eax, byte [rbx + 0x4f]
movzx ecx, sil
xor rcx, rax
shr esi, 8
mov eax, dword [r14 + rcx*4]
xor eax, esi
mov dword [rbx + 0x50], eax
mov eax, edx
xor eax, 1
imul eax, edx
shr eax, 8
xor al, r9b
mov byte [rbp + r12 - 0x14], al
add r12, 6
cmp r12, 0xc
jl 0x140022850
mov r8d, reloc.OLEAUT32.dll_VariantTimeToDosDateTime
lea rdx, [rbp - 0x19]
mov rcx, rbx
call fcn.140021b40
mov eax, dword [rbx + 0x28]
test eax, eax
jne 0x140022c4c
add qword [rbx + 0x18], 0xc
or dword [rbx], 0x10
mov edx, dword [rbx]
movzx edi, byte [rbp - 0x21]
mov r14d, dword [rbp + 7]
mov rax, qword [rbx + 0x88]
test rax, rax
je 0x140022bf7
mov rcx, rbx
cmp dil, 8
jne 0x140022b27
mov rdx, r15
call fcn.140021f30
jmp 0x140022bb9
test dl, dl
jns 0x140022b66
mov esi, dword [rbx + 0x90]
mov rdx, rax
mov r8d, esi
call fcn.140021b40
mov rdx, qword [rbx + 0x88]
mov r8d, esi
mov ecx, dword [rbx + 0x80]
mov edi, esi
add qword [rbx + 0x78], rsi
call fcn.140021860
add qword [rbx + 0x98], rsi
mov dword [rbx + 0x80], eax
jmp 0x140022bac
lea rdi, [rbx + 0xb0]
mov r8d, 0x4000
mov rdx, rdi
call fcn.140021e30
mov esi, eax
test eax, eax
je 0x140022bac
cmp dword [rbx + 0x28], 0
jne 0x140022bac
mov r8d, esi
mov rdx, rdi
mov rcx, rbx
call fcn.140021b40
mov r8d, 0x4000
mov rdx, rdi
mov rcx, rbx
call fcn.140021e30
mov esi, eax
test eax, eax
jne 0x140022b81
movzx edi, byte [rbp - 0x21]
mov eax, esi
add qword [rbx + 0xa0], rax
mov eax, dword [rbx + 0x28]
test eax, eax
jne 0x140022c4c
mov edx, dword [rbx]
and edx, 0xffffffef
mov dword [rbx], edx
test dl, 0x40
je 0x140022bdf
mov rcx, qword [rbx + 0x88]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [rbx]
mov rax, qword [rbx + 0x78]
and edx, 0xffffffbf
mov qword [rbx + 0x70], rax
mov rax, qword [rbx + 0xa0]
add qword [rbx + 0x18], rax
mov dword [rbx], edx
test edx, edx
jns 0x140022c5c
or edx, 8
mov dword [rbx], edx
test r14d, r14d
jne 0x140022e16
mov edx, dword [rbx + 0x80]
mov rcx, rbx
call fcn.1400219a0
movzx edx, word [rbx + 0x82]
mov rcx, rbx
call fcn.1400219a0
mov edx, dword [rbx + 0x78]
mov rcx, rbx
call fcn.1400219a0
mov rdx, qword [rbx + 0x78]
mov rcx, rbx
shr rdx, 0x10
call fcn.1400219a0
mov eax, dword [rbx + 0x28]
test eax, eax
je 0x140022e16
mov edi, eax
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x1400225a4
mov rdx, qword [rbx + 0xa0]
mov eax, dword [rbx + 0x80]
mov r8, qword [r15 + 0x10]
mov dword [r15 + 8], eax
mov ecx, r13d
add rdx, rcx
add rcx, qword [rbx + 0xa0]
mov qword [r15 + 0x10], rcx
mov rax, qword [rbx + 0x70]
mov qword [r15 + 0x18], rax
test byte [rbx], 4
je 0x140022d07
test r13d, r13d
jne 0x140022d07
movzx eax, dil
mov word [r15 + 2], ax
movzx eax, word [r15]
test al, 1
jne 0x140022cb1
mov ecx, 0xfff7
and ax, cx
mov word [r15], ax
mov rdx, qword [r15 + 0x38]
mov rcx, rbx
mov word [r15 + 0x30], ax
sub rdx, qword [rbx + 0x20]
call fcn.140021d00
test eax, eax
je 0x140022cf4
mov rdx, rbx
mov rcx, r15
call fcn.140020f80
mov eax, dword [rbx + 0x28]
test eax, eax
jne 0x140022c4c
mov rdx, qword [rbx + 0x18]
mov rcx, rbx
call fcn.140021d00
test eax, eax
jne 0x140022dd3
mov rcx, r15
mov edi, reloc.OLEAUT32.dll_SafeArrayGetDim
call qword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x1400225a4
movzx eax, dil
cmp word [r15 + 2], ax
jne 0x140022e1d
test dil, dil
jne 0x140022d24
cmp r8, rdx
jne 0x140022e1d
mov edx, 0x8074b50
mov rcx, rbx
call fcn.1400219a0
mov edx, 0x807
mov rcx, rbx
call fcn.1400219a0
mov edx, dword [r15 + 8]
mov rcx, rbx
call fcn.1400219a0
movzx edx, word [r15 + 0xa]
mov rcx, rbx
call fcn.1400219a0
mov rax, qword [r15 + 0x10]
mov edi, 0xffffffff
mov rcx, rbx
cmp rax, rdi
jb 0x140022d73
mov edx, edi
call fcn.1400219a0
mov eax, edi
jmp 0x140022d82
mov edx, eax
call fcn.1400219a0
mov rax, qword [r15 + 0x10]
shr rax, 0x10
mov edx, eax
mov rcx, rbx
call fcn.1400219a0
mov rax, qword [r15 + 0x18]
mov rcx, rbx
cmp rax, rdi
jb 0x140022da1
mov edx, edi
call fcn.1400219a0
jmp 0x140022db0
mov edx, eax
call fcn.1400219a0
mov rdi, qword [r15 + 0x18]
shr rdi, 0x10
mov edx, edi
mov rcx, rbx
call fcn.1400219a0
mov eax, dword [rbx + 0x28]
test eax, eax
jne 0x140022c4c
add qword [rbx + 0x18], 0x10
movzx eax, word [r15 + 0x30]
mov word [r15], ax
mov rcx, qword [rbx + 0x68]
test rcx, rcx
jne 0x140022de7
mov qword [rbx + 0x68], r15
xor eax, eax
jmp 0x1400225b8
mov rax, qword [rcx + 0x158]
test rax, rax
je 0x140022e0f
nop dword [rax]
nop word [rax + rax]
mov rcx, rax
mov rax, qword [rax + 0x158]
test rax, rax
jne 0x140022e00
mov qword [rcx + 0x158], r15
xor eax, eax
jmp 0x1400225b8
mov rcx, r15
mov edi, reloc.OLEAUT32.dll_SafeArrayGetElemsize
call qword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x1400225a4