Function at 0x140015328
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub rsp, 0x28
cmp edx, 0x1d
je 0x14001535d
cmp edx, 0x32
jne 0x14001536e
cmp dword [rcx + 0x30], 1
jbe 0x140015351
cmp byte [rcx + 0x4db0], 0
jne 0x140015351
mov dl, r8b
add rsp, 0x28
jmp 0x140019f48
mov dl, r8b
add rsp, 0x28
jmp 0x1400192b0
cmp byte [rcx + 0x4db0], 0
jne 0x14001536e
mov dl, r8b
call fcn.1400181ac
add rsp, 0x28
ret
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x40
cmp byte [rcx + 0x4dc0], 0
mov rbx, rcx
mov byte [rcx + 0x4dd0], 1
jne 0x14001933e
call fcn.1400177bc
mov rcx, rbx
call fcn.140017950
test al, al
je 0x140019b20
lea rdi, [rbx + 0xf0]
mov rcx, rbx
mov r8, rdi
lea rdx, [rbx + 8]
call fcn.140016468
test al, al
je 0x140019b20
lea r9, [rbx + 0x104]
mov r8, rdi
lea rdx, [rbx + 8]
mov rcx, rbx
call fcn.140016b90
test al, al
je 0x140019b20
cmp byte [rbx + 0xe8a6], 0
je 0x140019b20
lea rbp, [rbx + 8]
lea r15, [rbx + 0xd8]
mov rax, qword [rbx + 0xe970]
and qword [r15], rax
mov eax, dword [rbx + 0xec]
cmp dword [rbp], eax
jl 0x1400193d3
lea rdi, [rbx + 0xf0]
mov edx, dword [rbx + 0xf8]
dec edx
add edx, dword [rdi]
cmp dword [rbp], edx
jg 0x140019381
jne 0x1400193c3
mov eax, dword [rbx + 0xf4]
cmp dword [rbx + 0xc], eax
jl 0x1400193c3
cmp byte [rbx + 0x100], 0
jne 0x140019b18
mov r8, rdi
mov rdx, rbp
mov rcx, rbx
call fcn.140016468
test al, al
je 0x140019b20
lea r9, [rbx + 0x104]
mov r8, rdi
mov rdx, rbp
mov rcx, rbx
call fcn.140016b90
test al, al
je 0x140019b20
jmp 0x140019365
mov rcx, rbx
call fcn.140017950
test al, al
je 0x140019b18
mov rcx, qword [rbx + 0x4ba0]
mov rax, rcx
sub rax, qword [r15]
and rax, qword [rbx + 0xe970]
cmp rax, 0x1004
jae 0x14001941d
cmp rcx, qword [r15]
je 0x14001941d
mov rcx, rbx
call fcn.140017da8
mov rax, qword [rbx + 0x4db8]
cmp qword [rbx + 0x4dc8], rax
jg 0x140019b20
cmp byte [rbx + 0x4dc0], 0
jne 0x140019f3c
movsxd r10, dword [rbp]
mov ecx, 8
mov r11, qword [rbp + 0x10]
mov edi, dword [rbp + 4]
sub ecx, edi
movzx eax, byte [r10 + r11 + 1]
movzx edx, byte [r10 + r11]
shl edx, 8
or edx, eax
movzx eax, byte [r10 + r11 + 2]
shl edx, 8
or edx, eax
shr edx, cl
mov ecx, dword [rbx + 0x188]
and edx, 0xfffe
cmp edx, dword [rbx + rcx*4 + 0x108]
jae 0x140019498
mov eax, 0x10
sub eax, ecx
mov cl, al
shr rdx, cl
movzx r8d, byte [rdx + rbx + 0x18c]
add r8d, edi
mov eax, r8d
shr eax, 3
add r10d, eax
and r8d, 7
mov dword [rbp], r10d
mov dword [rbp + 4], r8d
movzx eax, word [rbx + rdx*2 + 0x58c]
jmp 0x14001950f
mov r9d, 0xf
inc ecx
cmp ecx, r9d
jae 0x1400194c5
mov r8d, ecx
add r8, 0x42
lea r8, [rbx + r8*4]
cmp edx, dword [r8]
jb 0x1400194c2
inc ecx
add r8, 4
cmp ecx, r9d
jb 0x1400194b0
jmp 0x1400194c5
mov r9d, ecx
lea r8d, [rdi + r9]
mov ecx, 0x10
mov eax, r8d
sub ecx, r9d
shr eax, 3
and r8d, 7
add r10d, eax
mov dword [rbp + 4], r8d
mov dword [rbp], r10d
lea eax, [r9 - 1]
sub edx, dword [rbx + rax*4 + 0x108]
mov eax, r9d
shr edx, cl
add edx, dword [rbx + rax*4 + 0x148]
cmp edx, dword [rbx + 0x104]
sbb eax, eax
and eax, edx
movzx eax, word [rbx + rax*2 + 0xd8c]
movzx edi, ax
cmp edi, 0x100
jae 0x140019557
cmp byte [rbx + 0x4db0], 0
je 0x140019541
mov rdx, qword [r15]
lea rcx, [rbx + 0x4bb0]
lea rax, [rdx + 1]
mov qword [r15], rax
call fcn.14001427c
mov byte [rax], dil
jmp 0x140019349
mov rax, qword [r15]
mov rcx, qword [rbx + 0x4ba8]
mov byte [rcx + rax], dil
inc qword [r15]
jmp 0x140019349
cmp edi, 0x106
jb 0x140019ae7
add edi, 0xfffffefa
cmp edi, 8
jae 0x140019573
add edi, 2
jmp 0x1400195df
mov r9d, edi
and edi, 3
or edi, 4
shr r9d, 2
dec r9d
mov ecx, r9d
shl edi, cl
add edi, 2
test r9d, r9d
je 0x1400195df
movsxd rcx, r10d
movzx eax, byte [rcx + r11]
movzx edx, byte [rcx + r11 + 1]
shl eax, 8
or edx, eax
movzx eax, byte [rcx + r11 + 2]
shl edx, 8
mov ecx, 8
or edx, eax
sub ecx, r8d
shr edx, cl
add r8d, r9d
mov eax, r8d
movzx edx, dx
shr eax, 3
mov ecx, 0x10
sub ecx, r9d
add r10d, eax
shr edx, cl
add edi, edx
mov dword [rbp], r10d
and r8d, 7
mov dword [rbp + 4], r8d
movsxd rcx, r10d
mov r14, r11
movzx eax, byte [rcx + r11 + 1]
movzx edx, byte [rcx + r11]
shl edx, 8
or edx, eax
movzx eax, byte [rcx + r11 + 2]
shl edx, 8
mov ecx, 8
or edx, eax
sub ecx, r8d
shr edx, cl
mov ecx, dword [rbx + 0x1074]
and edx, 0xfffe
cmp edx, dword [rbx + rcx*4 + 0xff4]
jae 0x140019657
mov eax, 0x10
sub eax, ecx
mov cl, al
shr rdx, cl
movzx r9d, byte [rdx + rbx + 0x1078]
add r9d, r8d
mov r12d, r9d
shr r12d, 3
add r12d, r10d
and r9d, 7
mov dword [rbp], r12d
mov dword [rbp + 4], r9d
movzx eax, word [rbx + rdx*2 + 0x1478]
jmp 0x1400196d4
mov r10d, 0xf
inc ecx
cmp ecx, r10d
jae 0x140019687
mov r8d, ecx
add r8, 0x3fd
lea r8, [rbx + r8*4]
cmp edx, dword [r8]
jb 0x140019684
inc ecx
add r8, 4
cmp ecx, r10d
jb 0x140019672
jmp 0x140019687
mov r10d, ecx
mov r9d, dword [rbp + 4]
mov ecx, 0x10
add r9d, r10d
sub ecx, r10d
mov eax, r9d
and r9d, 7
shr eax, 3
add dword [rbp], eax
lea eax, [r10 - 1]
mov r12d, dword [rbp]
mov dword [rbp + 4], r9d
sub edx, dword [rbx + rax*4 + 0xff4]
mov eax, r10d
shr edx, cl
add edx, dword [rbx + rax*4 + 0x1034]
cmp edx, dword [rbx + 0xff0]
sbb eax, eax
and eax, edx
movzx eax, word [rbx + rax*2 + 0x1c78]
movzx eax, ax
cmp eax, 4
jae 0x1400196e5
lea r10d, [rax + 1]
jmp 0x1400198ee
mov r11d, eax
and eax, 1
shr r11d, 1
or eax, 2
dec r11d
mov ecx, r11d
shl eax, cl
lea esi, [rax + 1]
mov r10d, esi
test r11d, r11d
je 0x1400198ee
cmp r11d, 4
jb 0x140019882
jbe 0x14001978a
movsxd rdx, r12d
mov ecx, 8
sub cl, byte [rbx + 0xc]
movzx eax, byte [rdx + r14 + 1]
movzx r8d, byte [rdx + r14]
movzx r10d, byte [rdx + r14 + 4]
shr r10d, cl
mov ecx, r9d
shl r8d, 8
add r9d, 0xfffffffc
or r8d, eax
add r9d, r11d
movzx eax, byte [rdx + r14 + 2]
shl r8d, 8
or r8d, eax
movzx eax, byte [rdx + r14 + 3]
shl r8d, 8
or r8d, eax
mov eax, r9d
shl r8d, cl
mov ecx, 0x24
or r10d, r8d
shr eax, 3
sub ecx, r11d
add eax, r12d
shr r10d, cl
shl r10d, 4
add r10d, esi
mov dword [rbp], eax
and r9d, 7
mov dword [rbp + 4], r9d
movsxd rdx, dword [rbp]
mov ecx, 8
sub ecx, r9d
movzx eax, byte [r14 + rdx + 1]
movzx r8d, byte [r14 + rdx]
shl r8d, 8
or r8d, eax
movzx eax, byte [r14 + rdx + 2]
shl r8d, 8
or r8d, eax
shr r8d, cl
mov ecx, dword [rbx + 0x1f60]
and r8d, 0xfffe
cmp r8d, dword [rbx + rcx*4 + 0x1ee0]
jae 0x140019801
mov eax, 0x10
mov edx, r8d
sub eax, ecx
mov cl, al
shr rdx, cl
movzx ecx, byte [rdx + rbx + 0x1f64]
add ecx, r9d
mov eax, ecx
shr eax, 3
add dword [rbp], eax
and ecx, 7
mov dword [rbp + 4], ecx
movzx eax, word [rbx + rdx*2 + 0x2364]
jmp 0x14001987a
mov r9d, 0xf
inc ecx
cmp ecx, r9d
jae 0x140019830
mov edx, ecx
add rdx, 0x7b8
lea rdx, [rbx + rdx*4]
cmp r8d, dword [rdx]
jb 0x14001982d
inc ecx
add rdx, 4
cmp ecx, r9d
jb 0x14001981b
jmp 0x140019830
mov r9d, ecx
mov ecx, dword [rbp + 4]
add ecx, r9d
mov eax, ecx
and ecx, 7
shr eax, 3
add dword [rbp], eax
lea eax, [r9 - 1]
mov dword [rbp + 4], ecx
mov ecx, 0x10
sub ecx, r9d
sub r8d, dword [rbx + rax*4 + 0x1ee0]
mov eax, r9d
shr r8d, cl
mov edx, dword [rbx + rax*4 + 0x1f20]
add edx, r8d
cmp edx, dword [rbx + 0x1edc]
sbb eax, eax
and eax, edx
movzx eax, word [rbx + rax*2 + 0x2b64]
movzx eax, ax
add r10d, eax
jmp 0x1400198ee
movsxd rdx, r12d
mov ecx, 8
sub cl, byte [rbx + 0xc]
movzx eax, byte [rdx + r14 + 1]
movzx r8d, byte [rdx + r14]
movzx r10d, byte [rdx + r14 + 4]
shr r10d, cl
mov ecx, r9d
shl r8d, 8
or r8d, eax
movzx eax, byte [rdx + r14 + 2]
shl r8d, 8
or r8d, eax
movzx eax, byte [rdx + r14 + 3]
shl r8d, 8
or r8d, eax
shl r8d, cl
mov ecx, 0x20
sub ecx, r11d
or r10d, r8d
shr r10d, cl
lea ecx, [r9 + r11]
mov eax, ecx
add r10d, esi
shr eax, 3
add eax, r12d
and ecx, 7
mov dword [rbp], eax
mov dword [rbp + 4], ecx
cmp r10d, 0x100
jbe 0x14001990f
inc edi
cmp r10d, 0x2000
jbe 0x14001990f
inc edi
cmp r10d, 0x40000
jbe 0x14001990f
inc edi
mov eax, dword [rbx + 0xc0]
mov dword [rbx + 0xc4], eax
mov eax, dword [rbx + 0xbc]
mov dword [rbx + 0xc0], eax
mov eax, dword [rbx + 0xb8]
mov dword [rbx + 0xbc], eax
mov dword [rbx + 0xb8], r10d
cmp byte [rbx + 0x4db0], 0
mov dword [rbx + 0xcc], edi
je 0x14001996e
mov r8d, r10d
mov rax, qword [rbx + 0xe970]
lea rcx, [rbx + 0x4bb0]
mov r9, r15
mov qword [rsp + 0x20], rax
mov edx, edi
call fcn.140014d4c
jmp 0x140019349
mov rcx, qword [r15]
mov eax, r10d
mov r8, rcx
sub r8, rax
mov rax, qword [rbx + 0xe968]
add rax, 0xffffffffffffeffc
cmp r8, rax
jae 0x140019aa4
cmp rcx, rax
jae 0x140019aa4
mov rax, qword [rbx + 0x4ba8]
lea rsi, [rax + r8]
lea r14, [rcx + rax]
mov eax, edi
add rax, rcx
mov qword [r15], rax
cmp edi, 8
jb 0x140019a32
cmp r10d, edi
jae 0x140019a09
mov ecx, edi
shr rcx, 3
mov al, byte [rsi]
add edi, 0xfffffff8
mov byte [r14], al
mov al, byte [rsi + 1]
mov byte [r14 + 1], al
mov al, byte [rsi + 2]
mov byte [r14 + 2], al
mov al, byte [rsi + 3]
mov byte [r14 + 3], al
mov al, byte [rsi + 4]
mov byte [r14 + 4], al
mov al, byte [rsi + 5]
mov byte [r14 + 5], al
mov al, byte [rsi + 6]
mov byte [r14 + 6], al
mov al, byte [rsi + 7]
add rsi, 8
mov byte [r14 + 7], al
add r14, 8
sub rcx, 1
jne 0x1400199c0
jmp 0x140019a32
mov r12d, edi
shr r12, 3
mov r8d, 8
mov rdx, rsi
mov rcx, r14
call fcn.140024890
add rsi, 8
add r14, 8
add edi, 0xfffffff8
sub r12, 1
jne 0x140019a10
test edi, edi
je 0x140019349
mov al, byte [rsi]
mov byte [r14], al
cmp edi, 1
jbe 0x140019349
mov al, byte [rsi + 1]
mov byte [r14 + 1], al
cmp edi, 2
jbe 0x140019349
mov al, byte [rsi + 2]
mov byte [r14 + 2], al
cmp edi, 3
jbe 0x140019349
mov al, byte [rsi + 3]
mov byte [r14 + 3], al
cmp edi, 4
jbe 0x140019349
mov al, byte [rsi + 4]
mov byte [r14 + 4], al
cmp edi, 5
jbe 0x140019349
mov al, byte [rsi + 5]
mov byte [r14 + 5], al
cmp edi, 6
jbe 0x140019349
mov al, byte [rsi + 6]
mov byte [r14 + 6], al
jmp 0x140019349
test edi, edi
je 0x140019349
mov r9, qword [rbx + 0xe970]
mov rdx, qword [rbx + 0x4ba8]
and r9, r8
mov rcx, qword [r15]
inc r8
mov al, byte [r9 + rdx]
mov byte [rdx + rcx], al
mov rax, qword [r15]
mov r9, qword [rbx + 0xe970]
inc rax
and rax, r9
mov qword [r15], rax
add edi, 0xffffffff
jne 0x140019ab3
jmp 0x140019349
cmp edi, 0x100
jne 0x140019b3f
lea r8, [rsp + 0x30]
mov rdx, rbp
mov rcx, rbx
call fcn.140016654
test al, al
je 0x140019b18
lea rdx, [rsp + 0x30]
mov rcx, rbx
call fcn.140014524
test al, al
jne 0x140019349
mov rcx, rbx
call fcn.140017da8
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
mov rdi, qword [rsp + 0x78]
add rsp, 0x40
pop r15
pop r14
pop r12
ret
cmp edi, 0x101
jne 0x140019c7b
mov edi, dword [rbx + 0xcc]
test edi, edi
je 0x140019349
cmp byte [rbx + 0x4db0], 0
je 0x140019b6e
mov r8d, dword [rbx + 0xb8]
jmp 0x14001994c
mov rcx, qword [r15]
mov edx, dword [rbx + 0xb8]
mov r8, rcx
mov rax, qword [rbx + 0xe968]
sub r8, rdx
add rax, 0xffffffffffffeffc
cmp r8, rax
jae 0x140019c40
cmp rcx, rax
jae 0x140019c40
mov rax, qword [rbx + 0x4ba8]
lea rsi, [rax + r8]
lea r14, [rcx + rax]
lea rax, [rcx + rdi]
mov qword [r15], rax
cmp edi, 8
jb 0x140019a32
cmp edx, edi
jae 0x140019c12
mov rcx, rdi
shr rcx, 3
mov al, byte [rsi]
add edi, 0xfffffff8
mov byte [r14], al
mov al, byte [rsi + 1]
mov byte [r14 + 1], al
mov al, byte [rsi + 2]
mov byte [r14 + 2], al
mov al, byte [rsi + 3]
mov byte [r14 + 3], al
mov al, byte [rsi + 4]
mov byte [r14 + 4], al
mov al, byte [rsi + 5]
mov byte [r14 + 5], al
mov al, byte [rsi + 6]
mov byte [r14 + 6], al
mov al, byte [rsi + 7]
add rsi, 8
mov byte [r14 + 7], al
add r14, 8
sub rcx, 1
jne 0x140019bc6
jmp 0x140019a32
mov r12, rdi
shr r12, 3
mov r8d, 8
mov rdx, rsi
mov rcx, r14
call fcn.140024890
add rsi, 8
add r14, 8
add edi, 0xfffffff8
sub r12, 1
jne 0x140019c19
jmp 0x140019a32
mov r9, qword [rbx + 0xe970]
mov rdx, qword [rbx + 0x4ba8]
and r9, r8
mov rcx, qword [r15]
inc r8
mov al, byte [r9 + rdx]
mov byte [rdx + rcx], al
mov rax, qword [r15]
mov r9, qword [rbx + 0xe970]
inc rax
and rax, r9
mov qword [r15], rax
add edi, 0xffffffff
jne 0x140019c47
jmp 0x140019349
add edi, 0xfffffefe
lea rdx, [rbx + 0xb8]
lea rdx, [rdx + rdi*4]
mov r12d, dword [rdx]
je 0x140019ca3
sub edi, 1
mov ecx, dword [rbx + rdi*4 + 0xb8]
mov dword [rdx], ecx
lea rdx, [rdx - 4]
jne 0x140019c91
mov r11, qword [rbp + 0x10]
mov ecx, 8
mov dword [rbx + 0xb8], r12d
movsxd r10, dword [rbp]
mov edi, dword [rbp + 4]
sub ecx, edi
movzx eax, byte [r10 + r11]
movzx edx, byte [r10 + r11 + 1]
shl eax, 8
or edx, eax
movzx eax, byte [r10 + r11 + 2]
shl edx, 8
or edx, eax
shr edx, cl
mov ecx, dword [rbx + 0x2e4c]
and edx, 0xfffe
cmp edx, dword [rbx + rcx*4 + 0x2dcc]
jae 0x140019d25
mov eax, 0x10
sub eax, ecx
mov cl, al
shr rdx, cl
movzx r8d, byte [rdx + rbx + 0x2e50]
add r8d, edi
mov eax, r8d
shr eax, 3
add r10d, eax
and r8d, 7
mov dword [rbp], r10d
mov dword [rbp + 4], r8d
movzx eax, word [rbx + rdx*2 + 0x3250]
jmp 0x140019d9f
mov r9d, 0xf
inc ecx
cmp ecx, r9d
jae 0x140019d55
mov r8d, ecx
add r8, 0xb73
lea r8, [rbx + r8*4]
cmp edx, dword [r8]
jb 0x140019d52
inc ecx
add r8, 4
cmp ecx, r9d
jb 0x140019d40
jmp 0x140019d55
mov r9d, ecx
lea r8d, [r9 + rdi]
mov ecx, 0x10
mov eax, r8d
sub ecx, r9d
shr eax, 3
and r8d, 7
add r10d, eax
mov dword [rbp + 4], r8d
mov dword [rbp], r10d
lea eax, [r9 - 1]
sub edx, dword [rbx + rax*4 + 0x2dcc]
mov eax, r9d
shr edx, cl
add edx, dword [rbx + rax*4 + 0x2e0c]
cmp edx, dword [rbx + 0x2dc8]
sbb eax, eax
and eax, edx
movzx eax, word [rbx + rax*2 + 0x3a50]
movzx edi, ax
cmp edi, 8
jae 0x140019dac
add edi, 2
jmp 0x140019e15
mov r9d, edi
and edi, 3
or edi, 4
shr r9d, 2
dec r9d
mov ecx, r9d
shl edi, cl
add edi, 2
test r9d, r9d
je 0x140019e15
movsxd rcx, r10d
movzx eax, byte [rcx + r11]
movzx edx, byte [rcx + r11 + 1]
shl eax, 8
or edx, eax
movzx eax, byte [rcx + r11 + 2]
shl edx, 8
mov ecx, 8
or edx, eax
sub ecx, r8d
shr edx, cl
mov ecx, 0x10
sub ecx, r9d
movzx edx, dx
shr edx, cl
lea ecx, [r8 + r9]
mov eax, ecx
add edi, edx
shr eax, 3
add eax, r10d
and ecx, 7
mov dword [rbp], eax
mov dword [rbp + 4], ecx
cmp byte [rbx + 0x4db0], 0
mov dword [rbx + 0xcc], edi
je 0x140019e2c
mov r8d, r12d
jmp 0x14001994c
mov rcx, qword [r15]
mov rax, qword [rbx + 0xe968]
mov r8, rcx
sub r8, r12
add rax, 0xffffffffffffeffc
cmp r8, rax
jae 0x140019ef9
cmp rcx, rax
jae 0x140019ef9
mov rax, qword [rbx + 0x4ba8]
lea rsi, [rax + r8]
lea r14, [rcx + rax]
mov eax, edi
add rax, rcx
mov qword [r15], rax
cmp edi, 8
jb 0x140019a32
cmp r12d, edi
jae 0x140019ecb
mov ecx, edi
shr rcx, 3
mov al, byte [rsi]
add edi, 0xfffffff8
mov byte [r14], al
mov al, byte [rsi + 1]
mov byte [r14 + 1], al
mov al, byte [rsi + 2]
mov byte [r14 + 2], al
mov al, byte [rsi + 3]
mov byte [r14 + 3], al
mov al, byte [rsi + 4]
mov byte [r14 + 4], al
mov al, byte [rsi + 5]
mov byte [r14 + 5], al
mov al, byte [rsi + 6]
mov byte [r14 + 6], al
mov al, byte [rsi + 7]
add rsi, 8
mov byte [r14 + 7], al
add r14, 8
sub rcx, 1
jne 0x140019e7f
jmp 0x140019a32
mov r12d, edi
shr r12, 3
mov r8d, 8
mov rdx, rsi
mov rcx, r14
call fcn.140024890
add rsi, 8
add r14, 8
add edi, 0xfffffff8
sub r12, 1
jne 0x140019ed2
jmp 0x140019a32
test edi, edi
je 0x140019349
mov r9, qword [rbx + 0xe970]
mov rdx, qword [rbx + 0x4ba8]
and r9, r8
mov rcx, qword [r15]
inc r8
mov al, byte [r9 + rdx]
mov byte [rdx + rcx], al
mov rax, qword [r15]
mov r9, qword [rbx + 0xe970]
inc rax
and rax, r9
mov qword [r15], rax
add edi, 0xffffffff
jne 0x140019f08
jmp 0x140019349
mov byte [rbx + 0x4dd0], 0
jmp 0x140019b20
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x430
mov bl, dl
mov rsi, rcx
call fcn.1400159e8
mov dl, bl
mov rcx, rsi
call fcn.1400177bc
mov eax, dword [rsi + 0x30]
xor r13d, r13d
mov edx, r13d
add eax, eax
je 0x140019fa6
mov eax, edx
inc edx
imul rcx, rax, 0x4af8
add rcx, qword [rsi + 0x28]
mov byte [rcx + 0x4add], r13b
mov byte [rcx + 0x4adf], r13b
mov eax, dword [rsi + 0x30]
add eax, eax
cmp edx, eax
jb 0x140019f80
mov rcx, qword [rsi + 0x28]
lea rdx, [rsi + 0x104]
movups xmm0, xmmword [rsi + 0xf0]
mov r8d, 0x4a9c
movups xmmword [rcx + 0x24], xmm0
mov eax, dword [rsi + 0x100]
mov dword [rcx + 0x34], eax
mov rcx, qword [rsi + 0x28]
add rcx, 0x3c
call fcn.140024890
mov dword [rsp + 0x488], r13d
mov r14d, r13d
mov byte [rsp + 0x480], r13b
mov byte [rsp + 0x470], r13b
mov r12d, r13d
mov rcx, qword [rsi]
mov eax, 0x400000
sub eax, r14d
movsxd rdx, r14d
add rdx, qword [rsi + 0x38]
movsxd r8, eax
and r8, 0xfffffffffffffff0
call fcn.14000e460
mov dword [rsp + 0x20], eax
test eax, eax
js 0x14001a354
add r14d, eax
je 0x14001a354
test eax, eax
jle 0x14001a036
cmp r14d, 0x400
jl 0x140019ff6
cmp r12d, r14d
jge 0x140019ff6
mov eax, dword [rsi + 0x30]
mov r15d, r13d
add eax, eax
je 0x14001a184
xor r8d, r8d
mov rdi, qword [rsi + 0x28]
mov eax, r15d
imul rbx, rax, 0x4af8
mov dword [rsp + 0x488], r15d
lea rbp, [rbx + rdi]
mov qword [rbx + rdi], rsi
cmp byte [rbx + rdi + 0x4adf], r8b
je 0x14001a082
mov cl, byte [rbx + rdi + 0x20]
mov dword [rbx + rdi + 0x4ad8], r14d
jmp 0x14001a0c1
movsxd rdx, r12d
lea rcx, [rbp + 8]
add rdx, qword [rsi + 0x38]
call fcn.14000bb0c
xor r8d, r8d
mov eax, r14d
sub eax, r12d
mov qword [rbp + 8], r8
mov dword [rbx + rdi + 0x4ad8], eax
je 0x14001a187
mov byte [rbx + rdi + 0x4adc], r8b
mov cl, r8b
mov byte [rbx + rdi + 0x20], r8b
mov byte [rbx + rdi + 0x38], r8b
cmp dword [rsp + 0x20], r8d
mov byte [rbx + rdi + 0x4adf], r8b
sete al
mov dword [rbx + rdi + 0x4af0], r15d
mov byte [rbx + rdi + 0x4ade], al
test cl, cl
jne 0x14001a11a
lea r8, [rdi + 0x24]
mov byte [rbx + rdi + 0x20], 1
add r8, rbx
lea rdx, [rbp + 8]
mov rcx, rsi
call fcn.140016468
xor r8d, r8d
test al, al
je 0x14001a17a
cmp byte [rbx + rdi + 0x35], r8b
jne 0x14001a113
cmp byte [rsi + 0xe8a6], r8b
je 0x14001a17a
mov byte [rsi + 0xe8a6], 1
cmp byte [rsp + 0x480], r8b
jne 0x14001a135
mov ecx, dword [rbx + rdi + 0x24]
cmp ecx, 0x20000
jg 0x14001a135
inc r13d
jmp 0x14001a149
mov ecx, dword [rbx + rdi + 0x24]
mov byte [rbx + rdi + 0x4add], 1
mov byte [rsp + 0x480], 1
mov eax, dword [rbx + rdi + 0x30]
inc r15d
add eax, ecx
add r12d, eax
mov eax, r14d
sub eax, r12d
js 0x14001a164
cmp byte [rbx + rdi + 0x34], r8b
jne 0x14001a187
cmp eax, 0x400
jl 0x14001a187
mov eax, dword [rsi + 0x30]
add eax, eax
cmp r15d, eax
jae 0x14001a187
jmp 0x14001a04c
mov byte [rsp + 0x470], 1
jmp 0x14001a187
xor r8d, r8d
xor edx, edx
mov eax, r13d
div dword [rsi + 0x30]
mov ebp, r8d
mov ebx, r8d
test edx, edx
lea edi, [rax + 1]
cmove edi, eax
test r13d, r13d
je 0x14001a1f7
mov eax, ebp
lea r8, [rsp + 0x30]
shl rax, 4
inc ebp
add r8, rax
mov eax, ebx
imul rdx, rax, 0x4af8
mov eax, r13d
add rdx, qword [rsi + 0x28]
sub eax, ebx
cmp edi, eax
mov qword [r8], rdx
cmovb eax, edi
mov dword [r8 + 8], eax
cmp r15d, 1
jne 0x14001a1e0
mov rcx, rsi
call fcn.14001a3c8
jmp 0x14001a1f0
mov rcx, qword [rsi + 0x20]
lea rdx, [0x14001ac90]
call fcn.140012bec
add ebx, edi
cmp ebx, r13d
jb 0x14001a1a2
xor r13d, r13d
test r15d, r15d
je 0x14001a346
mov rcx, qword [rsi + 0x20]
call fcn.140012ee8
mov ebx, r13d
test r15d, r15d
je 0x14001a284
mov edi, r13d
mov rbp, qword [rsi + 0x28]
add rbp, rdi
cmp byte [rbp + 0x4add], r13b
jne 0x14001a243
mov rdx, rbp
mov rcx, rsi
call fcn.140015e08
test al, al
je 0x14001a354
cmp byte [rbp + 0x4add], r13b
je 0x14001a256
mov rdx, rbp
mov rcx, rsi
call fcn.14001acd0
test al, al
je 0x14001a354
cmp byte [rbp + 0x4adc], r13b
jne 0x14001a354
cmp byte [rbp + 0x4adf], r13b
jne 0x14001a2c8
cmp byte [rbp + 0x34], r13b
jne 0x14001a354
inc ebx
add rdi, 0x4af8
cmp ebx, r15d
jb 0x14001a217
cmp byte [rsp + 0x470], r13b
jne 0x14001a354
mov ebx, r14d
sub ebx, r12d
cmp ebx, 0x400
jge 0x14001a036
test ebx, ebx
js 0x14001a354
jle 0x14001a2c0
mov rcx, qword [rsi + 0x38]
movsxd rdx, r12d
add rdx, rcx
movsxd r8, ebx
call fcn.140024890
mov r14d, ebx
jmp 0x140019ff3
mov eax, dword [rbp + 8]
sub eax, dword [rsi + 0x38]
add eax, dword [rbp + 0x18]
cmp r14d, eax
jle 0x14001a354
mov rcx, qword [rsi + 0x38]
sub r14d, eax
movsxd rdx, eax
movsxd r8, r14d
add rdx, rcx
call fcn.140024890
mov eax, dword [rbp + 0x2c]
sub eax, dword [rbp + 8]
add dword [rbp + 0x24], eax
mov qword [rbp + 0x2c], r13
mov rax, qword [rsi + 0x38]
mov qword [rbp + 0x18], rax
mov dword [rbp + 8], r13d
test ebx, ebx
je 0x14001a343
mov rcx, qword [rsi + 0x28]
mov r8d, 0x4af8
mov rdx, rbp
mov rbx, qword [rcx + 0x4ae0]
mov edi, dword [rcx + 0x4aec]
call fcn.140024890
mov rax, qword [rsi + 0x28]
mov qword [rax + 0x4ae0], rbx
mov rax, qword [rsi + 0x28]
mov dword [rax + 0x4aec], edi
mov byte [rbp + 0x4adf], r13b
mov r12d, r13d
cmp byte [rsp + 0x470], r13b
je 0x140019ff6
mov rax, qword [rsi + 0xe970]
mov rcx, rsi
and qword [rsi + 0xd8], rax
call fcn.140017da8
mov rdx, qword [rsi + 0x28]
mov r8d, 0x4a9c
mov ecx, dword [rsp + 0x488]
imul r9, rcx, 0x4af8
lea rcx, [rsi + 0x104]
movups xmm0, xmmword [r9 + rdx + 0x24]
movups xmmword [rsi + 0xf0], xmm0
mov eax, dword [r9 + rdx + 0x34]
add r9, 0x3c
add rdx, r9
mov dword [rsi + 0x100], eax
mov rbx, qword [rsp + 0x478]
add rsp, 0x430
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
jmp fcn.140024890