Function at 0x180023498
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov rax, rsp
mov dword [rax + 0x18], r8d
mov qword [rax + 0x10], rdx
mov qword [rax + 8], rcx
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x258]
sub rsp, 0x318
movaps xmmword [rax - 0x58], xmm6
movaps xmmword [rax - 0x68], xmm7
movaps xmmword [rax - 0x78], xmm8
movaps xmmword [rax - 0x88], xmm9
movaps xmmword [rax - 0x98], xmm10
movaps xmmword [rax - 0xa8], xmm11
mov rdi, rdx
mov rdx, qword [rdx + 0x80]
movsxd rax, dword [rdi + 0x78]
imul r9, rax, 0x88
add r9, rdx
jmp 0x180023518
cvttss2si eax, dword [rdx + 0x14]
movd xmm0, eax
cvtdq2ps xmm0, xmm0
movss dword [rdx + 0x14], xmm0
add rdx, 0x88
cmp rdx, r9
jne 0x180023500
xor r13d, r13d
cmp dword [rdi + 0x494], r13d
jge 0x18002354d
lea edx, [r13 + 2]
mov rcx, rdi
test byte [rdi], dl
jne 0x18002353f
mov edx, 0xf5
lea r8d, [r13 + 0x1b]
jmp 0x180023542
mov r8d, edx
call fcn.1800205d8
mov dword [rdi + 0x494], eax
cmp dword [rdi + 0x498], r13d
jge 0x180023572
test byte [rdi], 4
jne 0x180023572
mov edx, 0x41
lea r8d, [rdx - 1]
mov rcx, rdi
call fcn.1800205d8
mov dword [rdi + 0x498], eax
cmp dword [rdi + 0x49c], r13d
jge 0x1800235d9
mov ecx, dword [rdi + 0x548]
mov edx, dword [rdi + 0x544]
add ecx, 4
add edx, ecx
mov r8d, edx
mov rcx, rdi
call fcn.1800205d8
mov dword [rdi + 0x49c], eax
movd xmm6, dword [rdi + 0x544]
cvtdq2ps xmm6, xmm6
movss xmm0, dword [0x1800bba40]
call sub.api_ms_win_crt_math_l1_1_0.dll_cosf
divss xmm6, xmm0
addss xmm6, dword [0x1800bbab8]
cvttss2si edx, xmm6
add edx, 8
mov r8d, edx
mov rcx, rdi
call fcn.1800205d8
mov dword [rdi + 0x4a0], eax
mov qword [rdi + 8], r13
mov qword [rdi + 0x40], r13
mov qword [rdi + 0x48], r13
mov qword [rdi + 0x50], r13
mov rcx, rdi
call fcn.18001fb24
mov byte [rbp + 0x278], r13b
mov qword [rbp + 8], r13
mov r15, r13
mov qword [rbp - 0x40], r13
mov qword [rbp + 0x10], r13
mov qword [rbp - 0x18], r13
mov rsi, r13
mov qword [rbp - 0x70], r13
mov qword [rbp - 0x10], r13
mov r12d, dword [rdi + 0x78]
mov dword [rsp + 0x78], r12d
mov eax, 8
test r12d, r12d
jle 0x180023655
mov ebx, r12d
cmp r12d, eax
cmovl ebx, eax
test ebx, ebx
jle 0x180023655
movsxd rax, ebx
imul rcx, rax, 0x70
call fcn.180009ec4
mov r15, rax
mov qword [rbp - 0x40], rax
mov qword [rbp + 0x10], rax
mov dword [rbp + 0xc], ebx
mov eax, 8
mov dword [rbp + 8], r12d
mov r14d, dword [rdi + 0x58]
mov dword [rsp + 0x60], r14d
test r14d, r14d
jle 0x18002368e
mov ebx, r14d
cmp r14d, eax
cmovl ebx, eax
test ebx, ebx
jle 0x18002368e
movsxd rcx, ebx
shl rcx, 5
call fcn.180009ec4
mov rsi, rax
mov qword [rbp - 0x70], rax
mov qword [rbp - 0x10], rax
mov dword [rbp - 0x14], ebx
mov dword [rbp - 0x18], r14d
imul ecx, r12d, 0x70
movsxd r8, ecx
xor edx, edx
mov rcx, r15
call sub.VCRUNTIME140.dll_memset
mov ecx, r14d
shl ecx, 5
movsxd r8, ecx
xor edx, edx
mov rcx, rsi
call sub.VCRUNTIME140.dll_memset
xor r10d, r10d
mov dword [rsp + 0x6c], r10d
or r11d, 0xffffffff
lea esi, [r10 + 1]
cmp dword [rdi + 0x78], r10d
jle 0x1800237fd
mov ecx, r10d
mov qword [rsp + 0x70], rcx
lea rbx, [r15 + 0x44]
mov r13, qword [rdi + 0x80]
add r13, rcx
mov dword [rbx - 4], r11d
mov r8d, r10d
cmp dword [rdi + 0x58], r10d
jle 0x1800237f5
mov edx, r11d
mov r9, r10
mov r12d, 8
mov eax, edx
cmp edx, r11d
jne 0x180023733
mov edx, r11d
mov rax, qword [rdi + 0x60]
mov rcx, qword [r9 + rax]
cmp qword [r13 + 0x80], rcx
jne 0x180023725
mov dword [rbx - 4], r8d
mov edx, r8d
add r8d, esi
add r9, r12
mov eax, edx
cmp r8d, dword [rdi + 0x58]
jl 0x180023703
cmp eax, r11d
mov r12d, dword [rsp + 0x78]
je 0x1800237f5
lea rcx, [rbx - 0x44]
mov r9d, dword [rbp + 0x270]
mov r8, r13
mov rdx, qword [rbp + 0x260]
call fcn.180022d64
xor r10d, r10d
test al, al
je 0x1800237f5
mov eax, dword [r13 + 0x4c]
shr eax, 8
and al, sil
or byte [rbp + 0x278], al
movsxd rdx, dword [rbx - 4]
shl rdx, 5
mov r8, qword [rbp - 0x70]
add rdx, r8
lea rcx, [0x1800b8a2c]
cmp qword [r13 + 0x38], r10
cmovne rcx, qword [r13 + 0x38]
mov qword [rbx - 0xc], rcx
jmp 0x1800237b1
cmp word [rcx + 2], r10w
je 0x1800237b7
movzx eax, word [rcx + 2]
cmp dword [rbx], eax
cmovge eax, dword [rbx]
mov dword [rbx], eax
add rcx, 4
cmp word [rcx], r10w
jne 0x18002379b
add dword [rdx], esi
mov eax, dword [rbx]
cmp dword [rdx + 4], eax
cmovge eax, dword [rdx + 4]
mov dword [rdx + 4], eax
mov edx, dword [rsp + 0x6c]
add edx, esi
mov dword [rsp + 0x6c], edx
add rbx, 0x70
mov rcx, qword [rsp + 0x70]
add rcx, 0x88
mov qword [rsp + 0x70], rcx
cmp edx, dword [rdi + 0x78]
mov r11d, 0xffffffff
jl 0x1800236dc
jmp 0x180023801
mov sil, r10b
jmp 0x180024712
mov r8, qword [rbp - 0x70]
mov r13d, r10d
test r12d, r12d
jle 0x180023b5c
lea r14, [r15 + 0x48]
mov qword [rsp + 0x70], r12
movsxd r15, dword [r14 - 8]
shl r15, 5
add r15, r8
mov edx, dword [r14 - 4]
add edx, 0x20
sar edx, 5
lea rcx, [r14 + 8]
call fcn.18001acbc
movsxd r8, dword [r14 + 8]
shl r8, 2
xor edx, edx
mov rcx, qword [r14 + 0x10]
call sub.VCRUNTIME140.dll_memset
lea rbx, [r15 + 0x10]
xor r10d, r10d
cmp dword [rbx], r10d
jne 0x18002387a
mov edx, dword [r15 + 4]
add edx, 0x20
sar edx, 5
mov rcx, rbx
call fcn.18001acbc
movsxd r8, dword [rbx]
shl r8, 2
xor edx, edx
mov rcx, qword [rbx + 8]
call sub.VCRUNTIME140.dll_memset
xor r10d, r10d
mov rbx, qword [r14 - 0x10]
cmp word [rbx], r10w
je 0x180023918
cmp word [rbx + 2], r10w
je 0x180023913
movzx r12d, word [rbx]
movzx eax, word [rbx + 2]
cmp r12d, eax
ja 0x180023905
movsxd rdx, r12d
sar rdx, 5
mov qword [rbp - 0x80], rdx
mov ecx, r12d
and ecx, 0x1f
mov r8d, esi
shl r8d, cl
mov dword [rsp + 0x64], r8d
mov rax, qword [r15 + 0x18]
test dword [rax + rdx*4], r8d
jne 0x1800238f9
mov edx, r12d
mov rcx, qword [r14 - 0x30]
call fcn.1800383c8
xor r10d, r10d
test eax, eax
je 0x1800238f9
add dword [r14], esi
add dword [r15 + 8], esi
mov rax, qword [r14 + 0x10]
mov rcx, qword [rbp - 0x80]
mov edx, dword [rsp + 0x64]
or dword [rax + rcx*4], edx
mov rax, qword [r15 + 0x18]
or dword [rax + rcx*4], edx
add r13d, esi
add r12d, esi
movzx eax, word [rbx + 2]
cmp r12d, eax
jle 0x1800238a0
add rbx, 4
cmp word [rbx], r10w
jne 0x180023888
mov r12, qword [rsp + 0x70]
add r14, 0x70
sub r12, rsi
mov qword [rsp + 0x70], r12
mov r8, qword [rbp - 0x70]
jne 0x180023816
mov rbx, qword [rbp - 0x40]
add rbx, 0x64
mov edi, dword [rsp + 0x78]
mov qword [rbp - 0x60], rdi
movsxd r15, dword [rbx - 0x1c]
lea r14, [rbx + 4]
cmp r15d, dword [rbx]
jle 0x1800239a3
lea rcx, [r15 + r15*4]
shl rcx, 3
call fcn.180009ec4
mov r12, rax
mov rdx, qword [r14]
xor r10d, r10d
test rdx, rdx
je 0x18002399d
movsxd rcx, dword [rbx - 4]
lea r8, [rcx + rcx*4]
shl r8, 3
mov rcx, rax
call sub.VCRUNTIME140.dll_memcpy
mov rcx, qword [r14]
test rcx, rcx
je 0x180023994
mov rax, qword [0x1800ccc90]
test rax, rax
je 0x180023994
dec dword [rax + 0xf0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
xor r10d, r10d
mov qword [r14], r12
mov dword [rbx], r15d
mov rdx, qword [rbx - 0xc]
mov qword [rbp - 0x48], rdx
movsxd rcx, dword [rbx - 0x14]
mov rax, qword [r14 - 0x10]
lea rax, [rax + rcx*4]
mov qword [rsp + 0x70], rax
mov r15, rdx
cmp rdx, rax
jae 0x180023b09
mov rdi, rax
mov eax, dword [r15]
mov dword [rsp + 0x64], eax
test eax, eax
je 0x180023af8
mov r12d, r10d
mov edi, 8
bt eax, r12d
jae 0x180023ae6
xorps xmm6, xmm6
xor eax, eax
movups xmmword [rbp + 0x90], xmm6
mov qword [rbp + 0xa0], rax
lea rcx, [r15*8]
lea rax, [rdx*8]
sub ecx, eax
and ecx, 0xffffffe0
add ecx, r12d
movzx eax, cx
mov dword [rbp + 0x98], eax
mov r14d, dword [rbx - 4]
cmp r14d, dword [rbx]
jne 0x180023ab1
inc r14d
cmp dword [rbx], r10d
je 0x180023a40
mov eax, dword [rbx]
cdq
sub eax, edx
sar eax, 1
add eax, dword [rbx]
jmp 0x180023a42
mov eax, edi
cmp eax, r14d
cmovg r14d, eax
cmp r14d, dword [rbx]
jle 0x180023ab1
movsxd rax, r14d
lea rcx, [rax + rax*4]
shl rcx, 3
call fcn.180009ec4
mov qword [rbp - 0x80], rax
mov rdx, qword [rbx + 4]
xor r10d, r10d
test rdx, rdx
je 0x180023aaa
movsxd rcx, dword [rbx - 4]
lea r8, [rcx + rcx*4]
shl r8, 3
mov rcx, rax
call sub.VCRUNTIME140.dll_memcpy
mov rcx, qword [rbx + 4]
test rcx, rcx
je 0x180023a9d
mov rax, qword [0x1800ccc90]
test rax, rax
je 0x180023a9d
dec dword [rax + 0xf0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rax, qword [rbp - 0x80]
xor r10d, r10d
mov qword [rbx + 4], rax
mov dword [rbx], r14d
movsxd rax, dword [rbx - 4]
lea rcx, [rax + rax*4]
mov rax, qword [rbx + 4]
movups xmmword [rax + rcx*8], xmm6
movups xmm0, xmmword [rbp + 0x90]
movups xmmword [rax + rcx*8 + 0x10], xmm0
movsd xmm1, qword [rbp + 0xa0]
movsd qword [rax + rcx*8 + 0x20], xmm1
add dword [rbx - 4], esi
mov rdx, qword [rbp - 0x48]
mov eax, dword [rsp + 0x64]
add r12d, esi
cmp r12d, 0x20
jb 0x1800239e2
mov rdi, qword [rsp + 0x70]
add r15, 4
cmp r15, rdi
jb 0x1800239cb
mov rdi, qword [rbp - 0x60]
mov rcx, qword [rbx - 0xc]
test rcx, rcx
je 0x180023b36
and qword [rbx - 0x14], 0
mov rax, qword [0x1800ccc90]
test rax, rax
je 0x180023b29
dec dword [rax + 0xf0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
xor r10d, r10d
mov qword [rbx - 0xc], r10
add rbx, 0x70
sub rdi, rsi
mov qword [rbp - 0x60], rdi
jne 0x18002393e
mov rdi, qword [rbp + 0x268]
mov r15, qword [rbp - 0x40]
mov r14d, dword [rsp + 0x60]
mov r12d, dword [rsp + 0x78]
test r14d, r14d
jle 0x180023b9d
mov rbx, qword [rbp - 0x70]
add rbx, 0x18
mov rcx, qword [rbx]
test rcx, rcx
je 0x180023b94
and qword [rbx - 8], 0
mov rax, qword [0x1800ccc90]
test rax, rax
je 0x180023b88
dec dword [rax + 0xf0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
xor r10d, r10d
mov qword [rbx], r10
add rbx, 0x20
sub r14, rsi
jne 0x180023b69
mov rcx, qword [rbp - 0x70]
test rcx, rcx
je 0x180023bd1
and qword [rbp - 0x18], 0
mov rax, qword [0x1800ccc90]
test rax, rax
je 0x180023bbd
dec dword [rax + 0xf0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
xor r10d, r10d
mov ecx, r10d
mov qword [rbp - 0x70], rcx
mov qword [rbp - 0x10], rcx
and qword [rbp + 0x18], 0
mov r14, r10
mov qword [rsp + 0x70], r10
mov qword [rbp + 0x20], r10
test r13d, r13d
jle 0x180023c18
mov ebx, r13d
mov eax, 8
cmp r13d, eax
cmovl ebx, eax
test ebx, ebx
jle 0x180023c18
movsxd rax, ebx
lea rcx, [rax + rax*2]
shl rcx, 3
call fcn.180009ec4
mov r14, rax
mov qword [rsp + 0x70], rax
mov qword [rbp + 0x20], rax
mov dword [rbp + 0x1c], ebx
mov dword [rbp + 0x18], r13d
lea ecx, [r13*2]
add ecx, r13d
shl ecx, 3
movsxd r8, ecx
xor edx, edx
mov rcx, r14
call sub.VCRUNTIME140.dll_memset
xor r13d, r13d
mov dword [rsp + 0x64], r13d
mov qword [rbp - 8], r13
mov qword [rbp], r13
mov ecx, 0x40000
call fcn.180009ec4
mov rbx, rax
lea ecx, [r13 + 0x40]
call fcn.180009ec4
mov qword [rbp - 0x60], rax
mov qword [rbp], rax
mov dword [rbp - 4], 8
mov qword [rax], rbx
mov eax, esi
mov dword [rsp + 0x6c], eax
mov dword [rbp - 8], eax
mov ecx, r13d
mov dword [rsp + 0x60], ecx
mov r9d, r13d
movss xmm6, dword [0x1800bba58]
test r12d, r12d
jle 0x180023fb8
mov r8d, r13d
mov qword [rbp - 0x78], r13
lea rbx, [r15 + 0x60]
mov r10d, r12d
mov qword [rbp - 0x58], r10
mov r11d, 0xff
mov rdx, qword [rdi + 0x80]
cmp dword [rbx - 0x18], r13d
je 0x180023f93
movsxd rax, r9d
lea rcx, [rax + rax*2]
lea rax, [r14 + rcx*8]
mov qword [rbx - 0x30], rax
add r9d, dword [rbx - 0x18]
mov dword [rbp - 0x50], r9d
movss xmm1, dword [r8 + rdx + 0x50]
ucomiss xmm1, xmm6
jp 0x180023ce8
jne 0x180023ce8
mov byte [rsp + 0x68], r13b
jmp 0x180023d28
mov byte [rsp + 0x68], sil
mov edx, r13d
lea r8, [rbp + 0xb0]
mov eax, edx
xorps xmm0, xmm0
cvtsi2ss xmm0, rax
mulss xmm0, xmm1
cvttss2si rax, xmm0
movzx ecx, al
cmp eax, r11d
cmova ecx, r11d
mov byte [r8], cl
add edx, esi
add r8, rsi
cmp edx, 0x100
jb 0x180023cf7
mov r8, qword [rbp - 0x78]
mov eax, dword [rdi + 0x14]
mov dword [rbp - 0x68], eax
mov r12d, r13d
cmp dword [rbx], r13d
jle 0x180023f8f
mov r15, r13
mov r14, r13
mov edi, dword [rsp + 0x64]
mov rdx, qword [rbx + 8]
mov qword [rbp - 0x80], rdx
mov edx, dword [r14 + rdx + 0x18]
mov rcx, qword [rbx - 0x48]
call fcn.1800383c8
test eax, eax
je 0x180023dce
mov r8d, dword [rbx - 0x3c]
mov edx, eax
mov rcx, qword [rbx - 0x48]
call fcn.180035bf0
test eax, eax
jne 0x180023dce
mov rax, qword [rbx - 0x48]
mov r13, qword [rax + 0x78]
test byte [rbx - 0x40], 0x20
je 0x180023d87
mov rcx, r13
call fcn.18003b204
test byte [rbx - 0x40], 0x40
je 0x180023dc2
test r13, r13
je 0x180023e0d
lea rcx, [r13 + 0x98]
cmp dword [r13 + 0x60], 0x6f75746c
jne 0x180023dc2
mov eax, 0x10000
mov dword [rbp - 0x38], eax
and dword [rbp - 0x30], 0
mov dword [rbp - 0x34], 0x366a
mov dword [rbp - 0x2c], eax
lea rdx, [rbp - 0x38]
call fcn.1800391d0
lea rax, [r13 + 0x30]
xor r13d, r13d
test rax, rax
jne 0x180023e0d
mov ecx, dword [rsp + 0x60]
add r12d, esi
add r14, 0x28
add r15, 0x18
cmp r12d, dword [rbx]
jl 0x180023d44
mov dword [rsp + 0x64], edi
mov rdi, qword [rbp + 0x268]
mov r8, qword [rbp - 0x78]
mov r9d, dword [rbp - 0x50]
mov r10, qword [rbp - 0x58]
mov r14, qword [rsp + 0x70]
mov r11d, 0xff
jmp 0x180023f93
mov rax, qword [rbx - 0x48]
mov rcx, qword [rax + 0x78]
mov qword [rbp - 0x48], rcx
test rcx, rcx
je 0x180023dce
mov rax, qword [rcx + 8]
test rax, rax
je 0x180023dce
mov rax, qword [rax + 0x90]
mov r8d, dword [rbx - 0x38]
mov rdx, rcx
mov rcx, qword [rax + 8]
call fcn.1800384b0
test eax, eax
jne 0x180023dce
mov rax, qword [rbx - 0x48]
mov r10, qword [rax + 0x78]
add r10, 0x68
mov qword [rbp - 0x28], r10
mov r8d, dword [r10 + 4]
mov r13, qword [rbp - 0x80]
mov dword [r14 + r13], r8d
mov r9d, dword [r10]
mov dword [r14 + r13 + 4], r9d
mov rax, qword [rbx - 0x48]
mov rcx, qword [rax + 0x78]
mov eax, dword [rcx + 0x90]
mov dword [r14 + r13 + 8], eax
mov rax, qword [rbx - 0x48]
mov rcx, qword [rax + 0x78]
mov eax, dword [rcx + 0x94]
neg eax
mov dword [r14 + r13 + 0xc], eax
mov rax, qword [rbp - 0x48]
mov eax, dword [rax + 0x58]
add eax, 0x3f
and eax, 0xffffffc0
cdq
and edx, 0x3f
add eax, edx
sar eax, 6
movd xmm0, eax
cvtdq2ps xmm0, xmm0
movss dword [r14 + r13 + 0x10], xmm0
cmp byte [r10 + 0x1a], 7
sete al
mov byte [r14 + r13 + 0x14], al
imul r9d, r8d
shl r9d, 2
mov dword [rsp + 0x64], r9d
lea eax, [r9 + rdi]
mov ecx, 0x40000
cmp eax, ecx
jle 0x180023f0b
xor edi, edi
call fcn.180009ec4
mov qword [rbp - 0x80], rax
lea rdx, [rbp - 0x80]
lea rcx, [rbp - 8]
call fcn.18001ac04
mov rax, qword [rbp]
mov qword [rbp - 0x60], rax
mov eax, dword [rbp - 8]
mov dword [rsp + 0x6c], eax
mov r9d, dword [rsp + 0x64]
mov r10, qword [rbp - 0x28]
jmp 0x180023f0f
mov eax, dword [rsp + 0x6c]
dec eax
cdqe
movsxd rcx, edi
mov rdx, qword [rbp - 0x60]
mov r8, qword [rdx + rax*8]
add r8, rcx
mov qword [r14 + r13 + 0x20], r8
add edi, r9d
mov al, byte [rsp + 0x68]
neg al
sbb rcx, rcx
lea rax, [rbp + 0xb0]
and rcx, rax
mov qword [rsp + 0x20], rcx
mov r9d, dword [r14 + r13]
mov rdx, r10
call fcn.180022f74
mov ecx, dword [r14 + r13]
add ecx, dword [rbp - 0x68]
mov rax, qword [rbx - 0x30]
mov dword [r15 + rax + 4], ecx
mov ecx, dword [r14 + r13 + 4]
add ecx, dword [rbp - 0x68]
mov rax, qword [rbx - 0x30]
mov dword [r15 + rax + 8], ecx
mov rcx, qword [rbx - 0x30]
mov eax, dword [r15 + rcx + 8]
imul eax, dword [r15 + rcx + 4]
mov ecx, dword [rsp + 0x60]
add ecx, eax
mov dword [rsp + 0x60], ecx
xor r13d, r13d
jmp 0x180023dd2
mov ecx, dword [rsp + 0x60]
add rbx, 0x70
add r8, 0x88
mov qword [rbp - 0x78], r8
sub r10, rsi
mov qword [rbp - 0x58], r10
jne 0x180023cab
mov r15, qword [rbp - 0x40]
mov r12d, dword [rsp + 0x78]
movd xmm0, ecx
cvtdq2ps xmm0, xmm0
call sub.api_ms_win_crt_math_l1_1_0.dll_sqrtf
cvttss2si eax, xmm0
add eax, esi
mov dword [rdi + 0x44], r13d
mov ebx, dword [rdi + 0x10]
test ebx, ebx
jg 0x18002400e
movd xmm0, eax
cvtdq2ps xmm0, xmm0
mov ebx, 0x200
mov eax, 0x400
comiss xmm0, dword [0x1800bbb9c]
cmovae ebx, eax
mov eax, 0x800
comiss xmm0, dword [0x1800bbba8]
cmovae ebx, eax
mov eax, 0x1000
comiss xmm0, dword [0x1800bbbac]
cmovae ebx, eax
mov dword [rdi + 0x40], ebx
sub ebx, dword [rdi + 0x14]
and qword [rbp - 0x38], 0
mov qword [rbp - 0x30], r13
xor r8d, r8d
test ebx, ebx
jle 0x180024050
mov r14d, ebx
lea eax, [r8 + 8]
cmp ebx, eax
cmovl r14d, eax
test r14d, r14d
jle 0x180024050
movsxd rcx, r14d
shl rcx, 4
call fcn.180009ec4
mov r13, rax
mov qword [rbp - 0x30], rax
mov dword [rbp - 0x34], r14d
xor r8d, r8d
mov dword [rbp - 0x38], ebx
mov r10d, 0x8000
sub r10d, dword [rdi + 0x14]
mov ecx, dword [rdi + 0x40]
sub ecx, dword [rdi + 0x14]
lea eax, [rbx - 1]
mov r11d, r8d
movsxd r9, eax
test eax, eax
jle 0x180024094
mov edx, esi
lea r8, [r13 + 8]
mov r11d, eax
movsxd rax, edx
shl rax, 4
add rax, r13
mov qword [r8], rax
add edx, esi
lea r8, [r8 + 0x10]
sub r9, rsi
jne 0x180024079
xor r8d, r8d
movsxd rax, r11d
add rax, rax
mov qword [r13 + rax*8 + 8], r8
mov qword [rbp + 0x3c], 1
mov qword [rbp + 0x50], r13
lea rax, [rbp + 0x58]
mov qword [rbp + 0x48], rax
mov dword [rbp + 0x30], ecx
mov dword [rbp + 0x34], r10d
mov dword [rbp + 0x44], ebx
lea eax, [rbx - 1]
add eax, ecx
cdq
idiv ebx
mov dword [rbp + 0x38], eax
and qword [rbp + 0x58], 0
lea rax, [rbp + 0x68]
mov qword [rbp + 0x60], rax
mov dword [rbp + 0x68], ecx
mov dword [rbp + 0x6c], 0x40000000
mov qword [rbp + 0x70], r8
and qword [rbp - 0x28], 0
mov r14, r8
mov qword [rbp - 0x20], r8
mov ebx, dword [rdi + 0x68]
test ebx, ebx
jle 0x180024118
mov eax, ebx
mov ecx, 8
cmp ebx, ecx
cmovl eax, ecx
test eax, eax
jle 0x180024118
cdqe
lea rcx, [rax + rax*2]
shl rcx, 3
call fcn.180009ec4
mov r14, rax
lea ecx, [rbx + rbx*2]
shl ecx, 3
movsxd r8, ecx
xor edx, edx
mov rcx, r14
call sub.VCRUNTIME140.dll_memset
xor r9d, r9d
cmp dword [rdi + 0x68], r9d
jle 0x180024163
xor edx, edx
lea r8, [r14 + 8]
mov rax, qword [rdi + 0x70]
movzx ecx, word [rdx + rax]
mov dword [r8 - 4], ecx
mov rax, qword [rdi + 0x70]
movzx ecx, word [rdx + rax + 2]
mov dword [r8], ecx
add r9d, esi
lea rdx, [rdx + 0x20]
lea r8, [r8 + 0x18]
cmp r9d, dword [rdi + 0x68]
jl 0x18002413a
mov r8d, ebx
mov rdx, r14
lea rcx, [rbp + 0x30]
call fcn.18001b4dc
test ebx, ebx
jle 0x1800241bd
xor r8d, r8d
lea rdx, [r14 + 0x10]
mov r9, rbx
cmp dword [rdx + 4], 0
je 0x1800241b0
movzx ecx, word [rdx - 4]
mov rax, qword [rdi + 0x70]
mov word [r8 + rax + 4], cx
movzx ecx, word [rdx]
mov rax, qword [rdi + 0x70]
mov word [r8 + rax + 6], cx
mov eax, dword [rdx - 8]
add eax, dword [rdx]
cmp dword [rdi + 0x44], eax
cmovge eax, dword [rdi + 0x44]
mov dword [rdi + 0x44], eax
add r8, 0x20
add rdx, 0x18
sub r9, rsi
jne 0x180024180
test r14, r14
je 0x1800241de
mov rax, qword [0x1800ccc90]
test rax, rax
je 0x1800241d4
dec dword [rax + 0xf0]
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
test r12d, r12d
jle 0x18002423a
lea rbx, [r15 + 0x48]
mov r14d, r12d
mov r8d, dword [rbx]
test r8d, r8d
je 0x180024231
mov rdx, qword [rbx - 0x18]
lea rcx, [rbp + 0x30]
call fcn.1800232d4
xor edx, edx
cmp dword [rbx], edx
jle 0x180024231
xor ecx, ecx
mov r8, qword [rbx - 0x18]
cmp dword [rcx + r8 + 0x14], 0
je 0x180024227
mov eax, dword [rcx + r8 + 0x10]
add eax, dword [rcx + r8 + 8]
cmp dword [rdi + 0x44], eax
cmovge eax, dword [rdi + 0x44]
mov dword [rdi + 0x44], eax
add edx, esi
add rcx, 0x18
cmp edx, dword [rbx]
jl 0x180024207
add rbx, 0x70
sub r14, rsi
jne 0x1800241ea
mov eax, dword [rdi + 0x44]
test byte [rdi], sil
jne 0x180024267
lea ecx, [rax - 1]
mov eax, ecx
sar eax, 1
or ecx, eax
mov eax, ecx
sar eax, 2
or ecx, eax
mov eax, ecx
sar eax, 4
or ecx, eax
mov eax, ecx
sar eax, 8
or ecx, eax
mov eax, ecx
sar eax, 0x10
or eax, ecx
inc eax
mov dword [rdi + 0x44], eax
movd xmm0, eax
cvtdq2ps xmm0, xmm0
movaps xmm1, xmm6
divss xmm1, xmm0
movd xmm0, dword [rdi + 0x40]
cvtdq2ps xmm0, xmm0
divss xmm6, xmm0
movss dword [rdi + 0x48], xmm6
movss dword [rdi + 0x4c], xmm1
movsxd rbx, eax
movsxd rax, dword [rdi + 0x40]
imul rbx, rax
cmp byte [rbp + 0x278], 0
je 0x1800242b6
shl rbx, 2
mov rcx, rbx
call fcn.180009ec4
mov qword [rdi + 0x38], rax
jmp 0x1800242c2
mov rcx, rbx
call fcn.180009ec4
mov qword [rdi + 0x30], rax
mov r8, rbx
xor edx, edx
mov rcx, rax
call sub.VCRUNTIME140.dll_memset
xor cl, cl
mov byte [rbp + 0x268], cl
test r12d, r12d
jle 0x18002461d
xor r13d, r13d
mov qword [rbp - 0x48], r13
lea rbx, [r15 + 8]
mov eax, r12d
mov qword [rbp - 0x80], rax
cmp dword [rbx + 0x40], 0
je 0x1800245ee
mov r12, qword [rdi + 0x80]
add r12, r13
mov r15, qword [r12 + 0x80]
movss xmm6, dword [rbx - 4]
movss xmm7, dword [rbx]
cmp byte [r12 + 0x48], 0
jne 0x180024340
mov rcx, r15
call fcn.1800214a0
mov eax, dword [r12 + 0x14]
mov dword [r15 + 0x14], eax
mov qword [r15 + 0x40], rdi
movss dword [r15 + 0x68], xmm6
movss dword [r15 + 0x6c], xmm7
movss xmm11, dword [r12 + 0x2c]
movss xmm0, dword [r15 + 0x68]
addss xmm0, dword [0x1800bba24]
cvttss2si eax, xmm0
movd xmm10, eax
cvtdq2ps xmm10, xmm10
addss xmm10, dword [r12 + 0x30]
mov r9d, dword [rdi + 0x14]
mov dword [rbp + 0x278], r9d
and dword [rsp + 0x60], 0
cmp dword [rbx + 0x40], 0
jle 0x1800245e5
xor edx, edx
mov qword [rbp - 0x78], rdx
xor r14d, r14d
mov r13, r12
mov r12, qword [rbx + 0x60]
mov rcx, qword [rbx + 0x28]
cmp dword [rdx + rcx + 4], 0
jne 0x1800243a9
cmp dword [rdx + rcx + 8], 0
je 0x1800245c2
mov r8d, dword [rdx + rcx + 0xc]
add r8d, r9d
mov dword [rbp - 0x68], r8d
mov edx, dword [rdx + rcx + 0x10]
add edx, r9d
mov dword [rbp - 0x50], edx
movd xmm3, dword [r14 + r12 + 8]
cvtdq2ps xmm3, xmm3
addss xmm3, xmm11
movd xmm9, dword [r14 + r12 + 0xc]
cvtdq2ps xmm9, xmm9
addss xmm9, xmm10
mov eax, dword [r14 + r12]
movd xmm8, eax
cvtdq2ps xmm8, xmm8
addss xmm8, xmm3
mov ecx, dword [r14 + r12 + 4]
movd xmm7, ecx
cvtdq2ps xmm7, xmm7
addss xmm7, xmm9
movd xmm0, dword [rdi + 0x40]
cvtdq2ps xmm0, xmm0
movd xmm6, r8d
cvtdq2ps xmm6, xmm6
divss xmm6, xmm0
movd xmm2, dword [rdi + 0x44]
cvtdq2ps xmm2, xmm2
movd xmm5, edx
cvtdq2ps xmm5, xmm5
divss xmm5, xmm2
add eax, r8d
movd xmm4, eax
cvtdq2ps xmm4, xmm4
divss xmm4, xmm0
lea eax, [rcx + rdx]
movd xmm1, eax
cvtdq2ps xmm1, xmm1
divss xmm1, xmm2
movss xmm0, dword [r14 + r12 + 0x10]
movss dword [rsp + 0x58], xmm0
movss dword [rsp + 0x50], xmm1
movss dword [rsp + 0x48], xmm4
movss dword [rsp + 0x40], xmm5
movss dword [rsp + 0x38], xmm6
movss dword [rsp + 0x30], xmm7
movss dword [rsp + 0x28], xmm8
movss dword [rsp + 0x20], xmm9
movzx r8d, word [r14 + r12 + 0x18]
mov rdx, r13
mov rcx, r15
call fcn.180021964
movsxd rax, dword [r15 + 0x28]
lea rcx, [rax + rax*4]
mov rax, qword [r15 + 0x30]
cmp byte [r14 + r12 + 0x14], 0
je 0x1800244ad
mov byte [rbp + 0x268], sil
or dword [rax + rcx*8 - 0x28], esi
movsxd rcx, dword [r14 + r12]
mov r10, rcx
movsxd r11, dword [rdi + 0x40]
mov qword [rbp - 0x58], r11
mov r8, qword [r14 + r12 + 0x20]
mov r9, qword [rdi + 0x30]
movsxd rdx, dword [rbp - 0x50]
imul rdx, r11
movsxd rax, dword [rbp - 0x68]
add rdx, rax
test r9, r9
je 0x180024549
lea r11, [r9 + rdx]
xor eax, eax
mov dword [rsp + 0x64], eax
cmp dword [r14 + r12 + 4], eax
jle 0x1800245b7
lea rdx, [rcx*4]
mov qword [rbp - 0x50], rdx
mov rdx, qword [rbp - 0x58]
mov r9, qword [rbp - 0x50]
xor r10d, r10d
test ecx, ecx
jle 0x180024534
mov rdx, r11
lea r9, [r8 + 3]
mov al, byte [r9]
mov byte [rdx], al
add r10d, esi
lea r9, [r9 + 4]
add rdx, rsi
mov ecx, dword [r14 + r12]
cmp r10d, ecx
jl 0x180024510
mov eax, dword [rsp + 0x64]
mov rdx, qword [rbp - 0x58]
mov r9, qword [rbp - 0x50]
add eax, esi
mov dword [rsp + 0x64], eax
add r11, rdx
add r8, r9
cmp eax, dword [r14 + r12 + 4]
jl 0x180024502
jmp 0x1800245b7
mov rax, qword [rdi + 0x38]
lea r9, [rax + rdx*4]
xor eax, eax
mov dword [rsp + 0x64], eax
cmp dword [r14 + r12 + 4], eax
jle 0x1800245b7
lea rdx, [r11*4]
mov qword [rbp - 0x28], rdx
shl r10, 2
mov qword [rbp - 0x58], r10
xor r11d, r11d
test ecx, ecx
jle 0x1800245a4
mov rdx, r9
mov r10, r8
sub r10, r9
mov eax, dword [r10 + rdx]
mov dword [rdx], eax
add r11d, esi
lea rdx, [rdx + 4]
mov ecx, dword [r14 + r12]
cmp r11d, ecx
jl 0x180024582
mov eax, dword [rsp + 0x64]
mov rdx, qword [rbp - 0x28]
mov r10, qword [rbp - 0x58]
add eax, esi
mov dword [rsp + 0x64], eax
add r9, rdx
add r8, r10
cmp eax, dword [r14 + r12 + 4]
jl 0x180024572
mov r9d, dword [rbp + 0x278]
mov rdx, qword [rbp - 0x78]
mov ecx, dword [rsp + 0x60]
add ecx, esi
mov dword [rsp + 0x60], ecx
add r14, 0x28
add rdx, 0x18
mov qword [rbp - 0x78], rdx
cmp ecx, dword [rbx + 0x40]
jl 0x18002438f
mov r13, qword [rbp - 0x48]
and qword [rbx + 0x28], 0
mov rax, qword [rbp - 0x80]
add rbx, 0x70
add r13, 0x88
mov qword [rbp - 0x48], r13
sub rax, rsi
mov qword [rbp - 0x80], rax
jne 0x1800242f2
mov r15, qword [rbp - 0x40]
mov r12d, dword [rsp + 0x78]
mov r13, qword [rbp - 0x30]
mov cl, byte [rbp + 0x268]
mov byte [rdi + 0x29], cl
mov eax, dword [rsp + 0x6c]
test eax, eax
jle 0x180024658
mov rbx, qword [rbp - 0x60]
mov r14d, eax
mov rcx, qword [rbx]
test rcx, rcx
je 0x180024649
mov rax, qword [0x1800ccc90]
test rax, rax
je 0x180024649
dec dword [rax + 0xf0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add rbx, 8
sub r14, rsi
jne 0x18002462f
test r12d, r12d
jle 0x180024674
mov rbx, r15
mov r14d, r12d
mov rcx, rbx
call fcn.1800248a8
add rbx, 0x70
sub r14, rsi
jne 0x180024663
test r15, r15
je 0x1800246a3
and dword [rbp + 0xc], 0
and dword [rbp + 8], 0
mov rax, qword [0x1800ccc90]
test rax, rax
je 0x180024693
dec dword [rax + 0xf0]
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
xor r15d, r15d
mov qword [rbp + 0x10], r15
mov rcx, rdi
call fcn.1800211a0
nop
test r13, r13
je 0x1800246cd
mov rax, qword [0x1800ccc90]
test rax, rax
je 0x1800246c3
dec dword [rax + 0xf0]
mov rcx, r13
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
mov rcx, qword [rbp - 0x60]
test rcx, rcx
je 0x1800246ef
mov rax, qword [0x1800ccc90]
test rax, rax
je 0x1800246e8
dec dword [rax + 0xf0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
mov rcx, qword [rsp + 0x70]
test rcx, rcx
je 0x180024712
mov rax, qword [0x1800ccc90]
test rax, rax
je 0x18002470b
dec dword [rax + 0xf0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
mov rcx, qword [rbp - 0x70]
test rcx, rcx
je 0x180024734
mov rax, qword [0x1800ccc90]
test rax, rax
je 0x18002472d
dec dword [rax + 0xf0]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
test r15, r15
je 0x180024755
mov rax, qword [0x1800ccc90]
test rax, rax
je 0x18002474b
dec dword [rax + 0xf0]
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
mov al, sil
lea r11, [rsp + 0x318]
movaps xmm6, xmmword [r11 - 0x18]
movaps xmm7, xmmword [r11 - 0x28]
movaps xmm8, xmmword [r11 - 0x38]
movaps xmm9, xmmword [r11 - 0x48]
movaps xmm10, xmmword [r11 - 0x58]
movaps xmm11, xmmword [r11 - 0x68]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret