Function at 0x18008be14
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 - 0x208]
sub rsp, 0x2c8
movaps xmmword [rax - 0x58], xmm6
xor r12d, r12d
mov rdi, rdx
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 eax, 2
cmp dword [rdx + 0x494], r12d
jge 0x18008be98
mov rcx, rdx
test byte [rdx], al
jne 0x18008be88
mov edx, 0xf5
lea r8d, [rax + 0x19]
jmp 0x18008be8d
mov r8d, eax
mov edx, eax
call fcn.180075700
mov dword [rdi + 0x494], eax
cmp dword [rdi + 0x498], r12d
jge 0x18008bebd
test byte [rdi], 4
jne 0x18008bebd
mov edx, 0x41
mov rcx, rdi
lea r8d, [rdx - 1]
call fcn.180075700
mov dword [rdi + 0x498], eax
mov rcx, rdi
mov qword [rdi + 8], r12
mov qword [rdi + 0x40], r12
mov qword [rdi + 0x48], r12
mov qword [rdi + 0x50], r12
call fcn.180074dd0
mov r15d, dword [rdi + 0x78]
mov edx, 8
mov byte [rbp + 0x228], r12b
mov rbx, r12
mov qword [rbp - 0x80], rbx
mov r14, r12
mov qword [rbp - 0x70], r12
mov dword [rsp + 0x70], r15d
lea esi, [rdx - 7]
test r15d, r15d
jle 0x18008bf37
cmp r15d, edx
mov eax, r15d
cmovl eax, edx
test eax, eax
jle 0x18008bf37
mov rcx, qword [0x1802ce2d0]
test rcx, rcx
je 0x18008bf1f
add dword [rcx + 0xf4], esi
cdqe
imul rcx, rax, 0x70
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rbx, rax
mov qword [rbp - 0x80], rax
mov edx, 8
mov r13d, dword [rdi + 0x58]
mov dword [rsp + 0x78], r13d
test r13d, r13d
jle 0x18008bf78
cmp r13d, edx
mov ecx, r13d
cmovl ecx, edx
test ecx, ecx
jle 0x18008bf78
mov rax, qword [0x1802ce2d0]
test rax, rax
je 0x18008bf64
add dword [rax + 0xf4], esi
movsxd rcx, ecx
shl rcx, 5
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r14, rax
mov qword [rbp - 0x70], rax
imul ecx, r15d, 0x70
xor edx, edx
movsxd r8, ecx
mov rcx, rbx
call sub.VCRUNTIME140.dll_memset
mov ecx, r13d
xor edx, edx
shl ecx, 5
movsxd r8, ecx
mov rcx, r14
call sub.VCRUNTIME140.dll_memset
or r10d, 0xffffffff
mov dword [rsp + 0x6c], r12d
cmp dword [rdi + 0x78], r12d
jle 0x18008c17b
mov r15, r12
lea r14, [rbx + 0x24]
mov r12, qword [rdi + 0x80]
xor ebx, ebx
mov dword [r14 + 0x1c], r10d
mov r8d, ebx
cmp dword [rdi + 0x58], ebx
jle 0x18008c168
mov edx, r10d
lea r11d, [rbx + 8]
mov r9d, ebx
mov eax, edx
cmp edx, r10d
jne 0x18008c00a
mov rax, qword [rdi + 0x60]
mov edx, r10d
mov rcx, qword [r9 + rax]
cmp qword [r15 + r12 + 0x80], rcx
jne 0x18008bffc
mov dword [r14 + 0x1c], r8d
mov edx, r8d
add r8d, esi
add r9, r11
mov eax, edx
cmp r8d, dword [rdi + 0x58]
jl 0x18008bfd9
cmp eax, r10d
je 0x18008c168
mov r9d, dword [r15 + r12 + 0x10]
lea rbx, [r14 - 0xc]
mov r8d, dword [r15 + r12 + 8]
mov rdx, qword [r15 + r12]
mov rcx, qword [rbp + 0x210]
mov qword [rsp + 0x20], rbx
call fcn.180093150
test eax, eax
jne 0x18008c166
mov rcx, qword [rbx]
mov edx, 0x756e6963
call fcn.1800951f0
xor edx, edx
test eax, eax
jne 0x18008c166
mov ecx, dword [rbp + 0x220]
mov eax, edx
or ecx, dword [r15 + r12 + 0x4c]
mov edx, 8
bt ecx, 9
mov dword [rbx + 8], ecx
cmovae eax, edx
test sil, cl
je 0x18008c079
or eax, 2
test cl, 2
je 0x18008c082
bts eax, 0xf
test cl, 4
je 0x18008c08a
or eax, 0x20
test dl, cl
je 0x18008c094
bts eax, 0x10
jmp 0x18008c09d
test cl, 0x10
je 0x18008c09d
bts eax, 0x11
shr ecx, 6
and ecx, 2
mov dword [r14], eax
mov dword [rbx + 0x10], ecx
test dword [rbx + 8], 0x100
je 0x18008c0b7
bts dword [r14], 0x14
xorps xmm0, xmm0
lea rcx, [r14 - 0x24]
movups xmmword [r14 - 0x24], xmm0
xor eax, eax
mov qword [r14 - 0x14], rax
cvttss2si rdx, dword [r15 + r12 + 0x14]
call fcn.18008b7b0
mov eax, dword [r15 + r12 + 0x4c]
lea rcx, [0x18018311c]
movsxd rdx, dword [r14 + 0x1c]
mov r8, qword [rbp - 0x70]
shr eax, 8
and al, sil
shl rdx, 5
or byte [rbp + 0x228], al
add rdx, r8
mov rax, qword [r15 + r12 + 0x38]
xor r12d, r12d
test rax, rax
cmovne rcx, rax
mov qword [r14 + 0x14], rcx
jmp 0x18008c12d
cmp word [rcx + 2], r12w
je 0x18008c133
movzx eax, word [rcx + 2]
cmp dword [r14 + 0x20], eax
cmovge eax, dword [r14 + 0x20]
add rcx, 4
mov dword [r14 + 0x20], eax
cmp word [rcx], r12w
jne 0x18008c111
add dword [rdx], esi
mov eax, dword [r14 + 0x20]
cmp dword [rdx + 4], eax
cmovge eax, dword [rdx + 4]
add r14, 0x70
mov dword [rdx + 4], eax
add r15, 0x88
mov eax, dword [rsp + 0x6c]
add eax, esi
mov dword [rsp + 0x6c], eax
cmp eax, dword [rdi + 0x78]
jge 0x18008c170
or r10d, 0xffffffff
jmp 0x18008bfb6
xor ebx, ebx
mov sil, bl
jmp 0x18008d00c
mov rbx, qword [rbp - 0x80]
mov r15d, dword [rsp + 0x70]
jmp 0x18008c17f
mov r8, qword [rbp - 0x70]
mov eax, r15d
mov r14d, r12d
mov dword [rsp + 0x60], r12d
mov qword [rbp - 0x50], rax
mov r12d, r15d
test r15d, r15d
jle 0x18008c417
mov edi, dword [rsp + 0x60]
lea r14, [rbx + 0x48]
mov qword [rbp - 0x78], r12
xor r13d, r13d
mov edx, dword [r14 - 4]
lea rcx, [r14 + 8]
movsxd r15, dword [r14 - 8]
add edx, 0x20
shl r15, 5
sar edx, 5
add r15, r8
call fcn.18006ebc0
movsxd r8, dword [r14 + 8]
xor edx, edx
mov rcx, qword [r14 + 0x10]
shl r8, 2
call sub.VCRUNTIME140.dll_memset
lea rbx, [r15 + 0x10]
cmp dword [rbx], r13d
jne 0x18008c207
mov edx, dword [r15 + 4]
mov rcx, rbx
add edx, 0x20
sar edx, 5
call fcn.18006ebc0
movsxd r8, dword [rbx]
xor edx, edx
mov rcx, qword [rbx + 8]
shl r8, 2
call sub.VCRUNTIME140.dll_memset
mov rbx, qword [r14 - 0x10]
cmp word [rbx], r13w
je 0x18008c2a7
cmp word [rbx + 2], r13w
je 0x18008c2a3
movzx r12d, word [rbx]
movzx eax, word [rbx + 2]
cmp r12d, eax
ja 0x18008c295
mov rax, qword [r15 + 0x18]
mov ecx, r12d
and ecx, 0x1f
movsxd r13, r12d
sar r13, 5
mov dword [rsp + 0x68], ecx
mov eax, dword [rax + r13*4]
bt eax, ecx
jb 0x18008c286
mov rcx, qword [r14 - 0x30]
mov edx, r12d
call fcn.180090f10
test eax, eax
je 0x18008c286
add dword [r14], esi
add dword [r15 + 8], esi
mov rcx, qword [r14 + 0x10]
mov edx, dword [rsp + 0x68]
mov eax, dword [rcx + r13*4]
bts eax, edx
mov dword [rcx + r13*4], eax
mov rcx, qword [r15 + 0x18]
mov eax, dword [rcx + r13*4]
bts eax, edx
mov dword [rcx + r13*4], eax
add edi, esi
movzx eax, word [rbx + 2]
add r12d, esi
cmp r12d, eax
jle 0x18008c22d
xor r13d, r13d
add rbx, 4
cmp word [rbx], r13w
jne 0x18008c215
mov r12, qword [rbp - 0x78]
mov r8, qword [rbp - 0x70]
add r14, 0x70
sub r12, rsi
mov qword [rbp - 0x78], r12
jne 0x18008c1a9
mov r12, qword [rbp - 0x50]
mov rbx, qword [rbp - 0x80]
mov r14, r12
mov dword [rsp + 0x60], edi
add rbx, 0x60
mov rdi, qword [rbp + 0x218]
mov qword [rbp - 0x78], r12
mov edx, dword [rbx - 0x18]
mov rcx, rbx
call fcn.18008d17c
mov r12, qword [rbx - 8]
movsxd rax, dword [rbx - 0x10]
mov r15, r12
lea rax, [r12 + rax*4]
mov qword [rbp - 0x48], rax
cmp r12, rax
jae 0x18008c3ce
xor edx, edx
lea edi, [rdx + 8]
mov r13d, dword [r15]
test r13d, r13d
je 0x18008c3b3
mov r14d, edx
bt r13d, r14d
jae 0x18008c3a2
mov r8d, dword [rbx]
lea rcx, [r15*8]
xor eax, eax
xorps xmm6, xmm6
mov qword [rbp + 0x50], rax
lea rax, [r12*8]
sub ecx, eax
and ecx, 0xffffffe0
add ecx, r14d
movzx eax, cx
mov ecx, dword [rbx + 4]
movups xmmword [rbp + 0x40], xmm6
mov dword [rbp + 0x48], eax
cmp r8d, ecx
jne 0x18008c37d
inc r8d
test ecx, ecx
je 0x18008c367
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
add eax, ecx
jmp 0x18008c369
mov eax, edi
cmp eax, r8d
mov rcx, rbx
cmovg r8d, eax
mov edx, r8d
call fcn.18008d17c
xor edx, edx
movsxd rax, dword [rbx]
movups xmm0, xmmword [rbp + 0x40]
movsd xmm1, qword [rbp + 0x50]
lea rcx, [rax + rax*4]
mov rax, qword [rbx + 8]
movups xmmword [rax + rcx*8], xmm6
movups xmmword [rax + rcx*8 + 0x10], xmm0
movsd qword [rax + rcx*8 + 0x20], xmm1
add dword [rbx], esi
add r14d, esi
cmp r14d, 0x20
jb 0x18008c315
mov rax, qword [rbp - 0x48]
add r15, 4
cmp r15, rax
jb 0x18008c306
mov rdi, qword [rbp + 0x218]
xor r13d, r13d
mov r14, qword [rbp - 0x78]
mov rcx, qword [rbx - 8]
test rcx, rcx
je 0x18008c3f8
and qword [rbx - 0x10], 0
mov rax, qword [0x1802ce2d0]
test rax, rax
je 0x18008c3ee
dec dword [rax + 0xf4]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx - 8], r13
add rbx, 0x70
sub r14, rsi
mov qword [rbp - 0x78], r14
jne 0x18008c2da
mov r14d, dword [rsp + 0x60]
mov r13d, dword [rsp + 0x78]
mov r12, qword [rbp - 0x50]
test r13d, r13d
jle 0x18008c45c
mov rbx, qword [rbp - 0x70]
add rbx, 0x18
mov r15d, r13d
xor r13d, r13d
mov rcx, qword [rbx]
test rcx, rcx
je 0x18008c451
mov rax, qword [0x1802ce2d0]
mov qword [rbx - 8], r13
test rax, rax
je 0x18008c448
dec dword [rax + 0xf4]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbx], r13
add rbx, 0x20
sub r15, rsi
jne 0x18008c42a
jmp 0x18008c45f
xor r13d, r13d
mov rcx, qword [rbp - 0x70]
test rcx, rcx
je 0x18008c484
mov rax, qword [0x1802ce2d0]
test rax, rax
je 0x18008c47a
dec dword [rax + 0xf4]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rbp - 0x70], r13
mov qword [rbp - 0x78], r13
mov r15, r13
test r14d, r14d
jle 0x18008c4cb
mov ecx, 8
mov eax, r14d
cmp r14d, ecx
cmovl eax, ecx
test eax, eax
jle 0x18008c4cb
mov rcx, qword [0x1802ce2d0]
test rcx, rcx
je 0x18008c4b4
add dword [rcx + 0xf4], esi
cdqe
lea rcx, [rax + rax*2]
shl rcx, 3
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r15, rax
mov qword [rbp - 0x78], rax
lea ecx, [r14 + r14*2]
xor edx, edx
shl ecx, 3
movsxd r8, ecx
mov rcx, r15
call sub.VCRUNTIME140.dll_memset
mov rcx, qword [0x1802ce2d0]
mov dword [rsp + 0x68], r13d
test rcx, rcx
je 0x18008c4f6
add dword [rcx + 0xf4], esi
mov ecx, 0x40000
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rcx, qword [0x1802ce2d0]
mov rbx, rax
test rcx, rcx
je 0x18008c516
add dword [rcx + 0xf4], esi
mov ecx, 0x40
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r11d, 8
movss xmm11, dword [0x180183e74]
mov ecx, r13d
mov qword [rbp - 0x40], rax
mov r9d, r13d
mov qword [rbp - 0x28], rax
mov qword [rax], rbx
mov eax, esi
mov dword [rsp + 0x6c], eax
mov dword [rbp - 0x30], eax
mov dword [rbp - 0x2c], r11d
mov dword [rsp + 0x60], ecx
cmp dword [rsp + 0x70], r13d
jle 0x18008c84a
mov rbx, qword [rbp - 0x80]
mov r8, r13
add rbx, 0x60
mov qword [rbp - 0x68], r13
mov r10, r12
mov qword [rbp - 0x58], r12
mov r11d, 0xff
mov rdx, qword [rdi + 0x80]
cmp dword [rbx - 0x18], r13d
je 0x18008c82e
movsxd rax, r9d
add r9d, dword [rbx - 0x18]
mov dword [rbp - 0x5c], r9d
lea rcx, [rax + rax*2]
lea rax, [r15 + rcx*8]
mov qword [rbx - 0x30], rax
movss xmm1, dword [r8 + rdx + 0x50]
ucomiss xmm1, xmm11
je 0x18008c5ed
mov byte [rsp + 0x64], sil
lea r8, [rbp + 0x60]
mov edx, r13d
mov eax, edx
xorps xmm0, xmm0
cvtsi2ss xmm0, rax
mulss xmm0, xmm1
cvttss2si rax, xmm0
cmp eax, r11d
movzx ecx, al
cmova ecx, r11d
add edx, esi
mov byte [r8], cl
add r8, rsi
cmp edx, 0x100
jb 0x18008c5ba
mov r8, qword [rbp - 0x68]
jmp 0x18008c5f2
mov byte [rsp + 0x64], r13b
mov eax, dword [rdi + 0x14]
mov dword [rbp - 0x60], eax
cmp dword [rbx], r13d
jle 0x18008c82a
xor r14d, r14d
mov edi, r13d
mov r15d, r14d
mov r12, qword [rbx + 8]
mov rcx, qword [rbx - 0x48]
mov edx, dword [r15 + r12 + 0x18]
call fcn.180090f10
test eax, eax
je 0x18008c7e9
mov r8d, dword [rbx - 0x3c]
mov edx, eax
mov rcx, qword [rbx - 0x48]
call fcn.180091f10
test eax, eax
jne 0x18008c7ef
test byte [rbx - 0x40], 0x20
mov rcx, qword [rbx - 0x48]
mov r14, qword [rcx + 0x78]
je 0x18008c655
mov rcx, r14
call fcn.18009a650
mov rcx, qword [rbx - 0x48]
test byte [rbx - 0x40], 0x40
je 0x18008c667
mov rcx, r14
call fcn.18009a750
mov rcx, qword [rbx - 0x48]
lea rax, [r14 + 0x30]
test rax, rax
je 0x18008c7ef
mov r14, qword [rcx + 0x78]
mov edx, dword [rbx - 0x38]
mov rcx, r14
call fcn.180094950
xor r11d, r11d
test eax, eax
jne 0x18008c7ef
mov rax, qword [rbx - 0x48]
mov r10, qword [rax + 0x78]
add r10, 0x68
mov qword [rbp - 0x38], r10
mov r8d, dword [r10 + 4]
mov dword [r15 + r12], r8d
mov r9d, dword [r10]
mov dword [r15 + r12 + 4], r9d
mov rax, qword [rbx - 0x48]
mov rcx, qword [rax + 0x78]
mov eax, dword [rcx + 0x90]
mov dword [r15 + r12 + 8], eax
mov rax, qword [rbx - 0x48]
mov rcx, qword [rax + 0x78]
mov eax, dword [rcx + 0x94]
mov ecx, 0x40000
neg eax
mov dword [r15 + r12 + 0xc], eax
mov eax, dword [r14 + 0x58]
mov r14d, dword [rsp + 0x68]
add eax, 0x3f
and eax, 0xffffffc0
cdq
and edx, 0x3f
add eax, edx
sar eax, 6
movd xmm0, eax
cvtdq2ps xmm0, xmm0
movss dword [r15 + r12 + 0x10], xmm0
cmp byte [r10 + 0x1a], 7
sete al
imul r9d, r8d
mov byte [r15 + r12 + 0x14], al
shl r9d, 2
mov dword [rsp + 0x78], r9d
lea eax, [r9 + r14]
cmp eax, ecx
jle 0x18008c769
mov rax, qword [0x1802ce2d0]
mov r14d, r11d
test rax, rax
je 0x18008c738
add dword [rax + 0xf4], esi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
lea rdx, [rbp - 0x48]
mov qword [rbp - 0x48], rax
lea rcx, [rbp - 0x30]
call fcn.18006eaf0
mov rax, qword [rbp - 0x28]
mov r9d, dword [rsp + 0x78]
mov r10, qword [rbp - 0x38]
mov qword [rbp - 0x40], rax
mov eax, dword [rbp - 0x30]
mov dword [rsp + 0x6c], eax
jmp 0x18008c76d
mov eax, dword [rsp + 0x6c]
mov rdx, qword [rbp - 0x40]
dec eax
cdqe
movsxd rcx, r14d
add r14d, r9d
mov r9d, dword [r15 + r12]
mov dword [rsp + 0x68], r14d
mov r8, qword [rdx + rax*8]
mov rdx, r10
mov al, byte [rsp + 0x64]
add r8, rcx
neg al
mov qword [r15 + r12 + 0x20], r8
lea rax, [rbp + 0x60]
sbb rcx, rcx
and rcx, rax
mov qword [rsp + 0x20], rcx
call fcn.18008b8c8
mov ecx, dword [r15 + r12]
add ecx, dword [rbp - 0x60]
mov rax, qword [rbx - 0x30]
mov dword [rax + r13 + 4], ecx
mov ecx, dword [r15 + r12 + 4]
add ecx, dword [rbp - 0x60]
mov rax, qword [rbx - 0x30]
mov dword [rax + r13 + 8], ecx
mov rcx, qword [rbx - 0x30]
mov eax, dword [rcx + r13 + 8]
imul eax, dword [rcx + r13 + 4]
mov ecx, dword [rsp + 0x60]
add ecx, eax
mov dword [rsp + 0x60], ecx
jmp 0x18008c7f3
mov ecx, dword [rsp + 0x60]
jmp 0x18008c7f6
mov ecx, dword [rsp + 0x60]
xor r14d, r14d
add edi, esi
add r15, 0x28
add r13, 0x18
cmp edi, dword [rbx]
jl 0x18008c60a
mov rdi, qword [rbp + 0x218]
xor r13d, r13d
mov r8, qword [rbp - 0x68]
mov r11d, 0xff
mov r9d, dword [rbp - 0x5c]
mov r10, qword [rbp - 0x58]
mov r15, qword [rbp - 0x78]
jmp 0x18008c82e
mov ecx, dword [rsp + 0x60]
add r8, 0x88
add rbx, 0x70
sub r10, rsi
mov qword [rbp - 0x68], r8
mov qword [rbp - 0x58], r10
jne 0x18008c579
mov ebx, dword [rdi + 0x10]
mov dword [rdi + 0x44], r13d
test ebx, ebx
jg 0x18008c8a2
movd xmm0, ecx
xorps xmm1, xmm1
cvtdq2ps xmm0, xmm0
mov ebx, 0x200
sqrtss xmm1, xmm0
cvttss2si eax, xmm1
add eax, esi
movd xmm0, eax
mov eax, 0x400
cvtdq2ps xmm0, xmm0
comiss xmm0, dword [0x18018403c]
cmovae ebx, eax
mov eax, 0x800
comiss xmm0, dword [0x180184054]
cmovae ebx, eax
mov eax, 0x1000
comiss xmm0, dword [0x180184068]
cmovae ebx, eax
mov dword [rdi + 0x40], ebx
mov r15, r13
sub ebx, dword [rdi + 0x14]
mov r12d, 8
mov qword [rbp - 0x48], r13
test ebx, ebx
jle 0x18008c8ec
cmp ebx, r12d
mov eax, ebx
cmovl eax, r12d
test eax, eax
jle 0x18008c8ec
mov rcx, qword [0x1802ce2d0]
test rcx, rcx
je 0x18008c8d8
add dword [rcx + 0xf4], esi
movsxd rcx, eax
shl rcx, 4
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r15, rax
mov qword [rbp - 0x48], rax
mov ecx, dword [rdi + 0x40]
lea r10d, [rbx - 1]
sub ecx, dword [rdi + 0x14]
mov r14d, 0x8000
sub r14d, dword [rdi + 0x14]
mov r11d, r13d
movsxd r9, r10d
test r10d, r10d
jle 0x18008c92c
mov edx, esi
lea r8, [r15 + 8]
mov r11d, r10d
movsxd rax, edx
add edx, esi
shl rax, 4
add rax, r15
mov qword [r8], rax
lea r8, [r8 + 0x10]
sub r9, rsi
jne 0x18008c914
movsxd rax, r11d
add rax, rax
mov qword [r15 + rax*8 + 8], r13
lea rax, [rbp + 8]
and qword [rbp + 8], 0
mov qword [rbp - 8], rax
lea eax, [rbx - 1]
add eax, ecx
mov dword [rbp - 0xc], ebx
cdq
mov dword [rbp - 0x1c], r14d
idiv ebx
mov ebx, dword [rdi + 0x68]
mov r14, r13
mov dword [rbp - 0x18], eax
lea rax, [rbp + 0x18]
mov qword [rbp + 0x10], rax
mov qword [rbp - 0x14], rsi
mov qword [rbp], r15
mov dword [rbp - 0x20], ecx
mov dword [rbp + 0x18], ecx
mov dword [rbp + 0x1c], 0x40000000
mov qword [rbp + 0x20], r13
test ebx, ebx
jle 0x18008c9b3
cmp ebx, r12d
mov eax, ebx
cmovl eax, r12d
test eax, eax
jle 0x18008c9b3
mov rcx, qword [0x1802ce2d0]
test rcx, rcx
je 0x18008c9a0
add dword [rcx + 0xf4], esi
cdqe
lea rcx, [rax + rax*2]
shl rcx, 3
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r14, rax
lea ecx, [rbx + rbx*2]
xor edx, edx
shl ecx, 3
movsxd r8, ecx
mov rcx, r14
call sub.VCRUNTIME140.dll_memset
mov r9d, r13d
cmp dword [rdi + 0x68], r13d
jle 0x18008c9ff
mov rdx, r13
lea r8, [r14 + 8]
mov rax, qword [rdi + 0x70]
add r9d, esi
movzx ecx, word [rdx + rax]
lea rdx, [rdx + 0x20]
mov dword [r8 - 4], ecx
mov rax, qword [rdi + 0x70]
movzx ecx, word [rdx + rax - 0x1e]
mov dword [r8], ecx
lea r8, [r8 + 0x18]
cmp r9d, dword [rdi + 0x68]
jl 0x18008c9d6
mov r8d, ebx
lea rcx, [rbp - 0x20]
mov rdx, r14
call fcn.18006f670
test ebx, ebx
jle 0x18008ca59
mov r8, r13
lea rdx, [r14 + 0x10]
mov r9, rbx
cmp dword [rdx + 4], r13d
je 0x18008ca4c
movzx eax, word [rdx - 4]
mov rcx, qword [rdi + 0x70]
mov word [r8 + rcx + 4], ax
movzx eax, word [rdx]
mov rcx, qword [rdi + 0x70]
mov word [r8 + rcx + 6], ax
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 0x18008ca1c
test r14, r14
je 0x18008ca79
mov rax, qword [0x1802ce2d0]
test rax, rax
je 0x18008ca70
dec dword [rax + 0xf4]
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov r14d, dword [rsp + 0x70]
mov r13, qword [rbp - 0x80]
mov r12, qword [rbp - 0x50]
test r14d, r14d
jle 0x18008caec
lea rbx, [r13 + 0x48]
mov r14, r12
xor eax, eax
mov r8d, dword [rbx]
test r8d, r8d
je 0x18008cade
mov rdx, qword [rbx - 0x18]
lea rcx, [rbp - 0x20]
call fcn.18008bc40
xor eax, eax
mov r8d, eax
cmp dword [rbx], eax
jle 0x18008cade
mov ecx, eax
mov rdx, qword [rbx - 0x18]
cmp dword [rcx + rdx + 0x14], eax
je 0x18008cad2
mov eax, dword [rcx + rdx + 0x10]
add eax, dword [rcx + rdx + 8]
cmp dword [rdi + 0x44], eax
cmovge eax, dword [rdi + 0x44]
mov dword [rdi + 0x44], eax
xor eax, eax
add r8d, esi
add rcx, 0x18
cmp r8d, dword [rbx]
jl 0x18008cab4
add rbx, 0x70
sub r14, rsi
jne 0x18008ca94
mov r14d, dword [rsp + 0x70]
mov eax, dword [rdi + 0x44]
test byte [rdi], sil
jne 0x18008cb19
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
movd xmm0, dword [rdi + 0x40]
inc eax
movsxd rbx, dword [rdi + 0x40]
movaps xmm2, xmm11
cvtdq2ps xmm0, xmm0
mov dword [rdi + 0x44], eax
xor ecx, ecx
movd xmm1, eax
divss xmm2, xmm0
cdqe
cvtdq2ps xmm1, xmm1
movaps xmm0, xmm11
movss dword [rdi + 0x48], xmm2
divss xmm0, xmm1
imul rbx, rax
movss dword [rdi + 0x4c], xmm0
mov rax, qword [0x1802ce2d0]
cmp byte [rbp + 0x228], cl
je 0x18008cb80
shl rbx, 2
test rax, rax
je 0x18008cb71
add dword [rax + 0xf4], esi
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rdi + 0x38], rax
jmp 0x18008cb98
test rax, rax
je 0x18008cb8b
add dword [rax + 0xf4], esi
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rdi + 0x30], rax
mov r8, rbx
xor edx, edx
mov rcx, rax
call sub.VCRUNTIME140.dll_memset
xor r8d, r8d
mov dl, r8b
mov byte [rbp + 0x218], dl
test r14d, r14d
jle 0x18008cf11
mov ecx, r8d
lea rbx, [r13 + 8]
mov rax, r12
mov qword [rbp - 0x30], rcx
mov qword [rbp - 0x38], rax
cmp dword [rbx + 0x40], r8d
je 0x18008ceeb
mov r12, qword [rdi + 0x80]
movss xmm6, dword [rbx - 4]
add r12, rcx
movss xmm7, dword [rbx]
mov r13, qword [r12 + 0x80]
cmp byte [r12 + 0x48], r8b
jne 0x18008cc25
mov rcx, r13
call fcn.180075c7c
mov eax, dword [r12 + 0x14]
xor r8d, r8d
mov word [r13 + 0x50], r8w
movss dword [r13 + 0x68], xmm6
movss dword [r13 + 0x6c], xmm7
mov dword [r13 + 0x14], eax
mov qword [r13 + 0x48], r12
mov qword [r13 + 0x40], rdi
add word [r13 + 0x50], si
movss xmm0, dword [r13 + 0x68]
addss xmm0, dword [0x180183e14]
mov r9d, dword [rdi + 0x14]
movss xmm10, dword [r12 + 0x2c]
mov dword [rbp + 0x228], r9d
mov dword [rsp + 0x60], r8d
cvttss2si eax, xmm0
movd xmm9, eax
cvtdq2ps xmm9, xmm9
addss xmm9, dword [r12 + 0x30]
cmp dword [rbx + 0x40], r8d
jle 0x18008cedf
mov rdx, r8
mov r14, r8
mov qword [rsp + 0x78], rdx
mov rcx, qword [rbx + 0x28]
mov r15, qword [rbx + 0x60]
cmp dword [rdx + rcx + 4], r8d
jne 0x18008cc92
cmp dword [rdx + rcx + 8], r8d
je 0x18008cebf
mov r8d, dword [rdx + rcx + 0xc]
movaps xmm2, xmm11
movd xmm0, dword [rdi + 0x44]
add r8d, r9d
add r9d, dword [rdx + rcx + 0x10]
movaps xmm1, xmm11
mov edx, dword [r14 + r15 + 4]
mov ecx, dword [r14 + r15]
movd xmm8, dword [r14 + r15 + 0xc]
movd xmm3, dword [r14 + r15 + 8]
cvtdq2ps xmm0, xmm0
lea eax, [rdx + r9]
mov dword [rbp - 0x60], r8d
mov dword [rbp - 0x5c], r9d
movd xmm4, r8d
divss xmm2, xmm0
movd xmm0, dword [rdi + 0x40]
cvtdq2ps xmm0, xmm0
movd xmm7, eax
lea eax, [rcx + r8]
movzx r8d, word [r14 + r15 + 0x18]
divss xmm1, xmm0
movss xmm0, dword [r14 + r15 + 0x10]
movss dword [rsp + 0x58], xmm0
movd xmm5, r9d
movd xmm6, eax
cvtdq2ps xmm7, xmm7
cvtdq2ps xmm5, xmm5
mulss xmm7, xmm2
mulss xmm5, xmm2
movd xmm2, edx
mov rdx, r12
movss dword [rsp + 0x50], xmm7
cvtdq2ps xmm6, xmm6
cvtdq2ps xmm4, xmm4
mulss xmm6, xmm1
mulss xmm4, xmm1
movd xmm1, ecx
mov rcx, r13
movss dword [rsp + 0x48], xmm6
movss dword [rsp + 0x40], xmm5
movss dword [rsp + 0x38], xmm4
cvtdq2ps xmm8, xmm8
cvtdq2ps xmm3, xmm3
addss xmm8, xmm9
cvtdq2ps xmm2, xmm2
cvtdq2ps xmm1, xmm1
addss xmm3, xmm10
addss xmm2, xmm8
addss xmm1, xmm3
movss dword [rsp + 0x30], xmm2
movss dword [rsp + 0x28], xmm1
movss dword [rsp + 0x20], xmm8
call fcn.1800761bc
cmp byte [r14 + r15 + 0x14], 0
movsxd rax, dword [r13 + 0x28]
lea rcx, [rax + rax*4]
mov rax, qword [r13 + 0x30]
je 0x18008cda4
or dword [rax + rcx*8 - 0x28], esi
mov byte [rbp + 0x218], sil
movsxd r11, dword [rdi + 0x40]
movsxd rax, dword [rbp - 0x60]
movsxd rdx, dword [rbp - 0x5c]
mov r9, qword [rdi + 0x30]
movsxd rcx, dword [r14 + r15]
mov r8, qword [r14 + r15 + 0x20]
mov r10, rcx
imul rdx, r11
mov qword [rbp - 0x58], r11
add rdx, rax
xor eax, eax
test r9, r9
je 0x18008ce40
lea r11, [rdx + r9]
mov dword [rsp + 0x68], eax
cmp dword [r14 + r15 + 4], eax
jle 0x18008ceb0
lea rdx, [rcx*4]
mov qword [rbp - 0x68], rdx
mov r9, qword [rbp - 0x68]
mov rdx, qword [rbp - 0x58]
xor r10d, r10d
test ecx, ecx
jle 0x18008ce2b
mov rdx, r11
lea r9, [r8 + 3]
mov al, byte [r9]
add r10d, esi
mov byte [rdx], al
lea r9, [r9 + 4]
mov ecx, dword [r14 + r15]
add rdx, rsi
cmp r10d, ecx
jl 0x18008ce07
mov eax, dword [rsp + 0x68]
mov rdx, qword [rbp - 0x58]
mov r9, qword [rbp - 0x68]
add eax, esi
add r11, rdx
add r8, r9
mov dword [rsp + 0x68], eax
cmp eax, dword [r14 + r15 + 4]
jl 0x18008cdf9
jmp 0x18008ceb0
mov rax, qword [rdi + 0x38]
lea r9, [rax + rdx*4]
xor edx, edx
mov eax, edx
mov dword [rsp + 0x68], edx
cmp dword [r14 + r15 + 4], edx
jle 0x18008ceb0
lea rdx, [r11*4]
shl r10, 2
mov qword [rbp - 0x58], rdx
mov qword [rbp - 0x68], r10
xor r11d, r11d
test ecx, ecx
jle 0x18008ce9d
mov r10, r8
mov rdx, r9
sub r10, r9
mov eax, dword [r10 + rdx]
add r11d, esi
mov dword [rdx], eax
lea rdx, [rdx + 4]
mov ecx, dword [r14 + r15]
cmp r11d, ecx
jl 0x18008ce7b
mov eax, dword [rsp + 0x68]
mov rdx, qword [rbp - 0x58]
mov r10, qword [rbp - 0x68]
add eax, esi
add r9, rdx
add r8, r10
mov dword [rsp + 0x68], eax
cmp eax, dword [r14 + r15 + 4]
jl 0x18008ce6b
mov r9d, dword [rbp + 0x228]
xor r8d, r8d
mov rdx, qword [rsp + 0x78]
mov ecx, dword [rsp + 0x60]
add rdx, 0x18
add ecx, esi
mov qword [rsp + 0x78], rdx
add r14, 0x28
mov dword [rsp + 0x60], ecx
cmp ecx, dword [rbx + 0x40]
jl 0x18008cc78
mov rcx, qword [rbp - 0x30]
mov rax, qword [rbp - 0x38]
mov qword [rbx + 0x28], r8
add rcx, 0x88
add rbx, 0x70
sub rax, rsi
mov qword [rbp - 0x30], rcx
mov qword [rbp - 0x38], rax
jne 0x18008cbcc
mov r15, qword [rbp - 0x48]
mov dl, byte [rbp + 0x218]
mov eax, dword [rsp + 0x6c]
mov r12, qword [rbp - 0x40]
mov byte [rdi + 0x29], dl
test eax, eax
jle 0x18008cf55
mov rbx, r12
mov r14d, eax
mov rcx, qword [rbx]
test rcx, rcx
je 0x18008cf40
mov rax, qword [0x1802ce2d0]
test rax, rax
je 0x18008cf40
dec dword [rax + 0xf4]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add rbx, 8
mov r8d, 0
sub r14, rsi
jne 0x18008cf26
cmp dword [rsp + 0x70], r8d
jle 0x18008cf79
mov rbx, qword [rbp - 0x80]
mov r12, qword [rbp - 0x50]
mov rcx, rbx
call fcn.18008d210
add rbx, 0x70
sub r12, rsi
jne 0x18008cf64
mov r12, qword [rbp - 0x40]
mov rbx, qword [rbp - 0x80]
test rbx, rbx
je 0x18008cfa3
mov rax, qword [0x1802ce2d0]
test rax, rax
je 0x18008cf94
dec dword [rax + 0xf4]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
xor ebx, ebx
mov qword [rbp - 0x80], rbx
mov rcx, rdi
call fcn.1800759f4
test r15, r15
je 0x18008cfcb
mov rax, qword [0x1802ce2d0]
test rax, rax
je 0x18008cfc2
dec dword [rax + 0xf4]
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
test r12, r12
je 0x18008cfeb
mov rax, qword [0x1802ce2d0]
test rax, rax
je 0x18008cfe2
dec dword [rax + 0xf4]
mov rcx, r12
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [rbp - 0x78]
test rcx, rcx
je 0x18008d00c
mov rax, qword [0x1802ce2d0]
test rax, rax
je 0x18008d006
dec dword [rax + 0xf4]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [rbp - 0x70]
test rcx, rcx
je 0x18008d02d
mov rax, qword [0x1802ce2d0]
test rax, rax
je 0x18008d027
dec dword [rax + 0xf4]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [rbp - 0x80]
test rcx, rcx
je 0x18008d04e
mov rax, qword [0x1802ce2d0]
test rax, rax
je 0x18008d048
dec dword [rax + 0xf4]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea r11, [rsp + 0x2c8]
mov al, sil
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