Function at 0x10005f214
Capabilities:
Allocate or change rwx memory
Encode data using xor

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xd0
mov rax, qword [0x1003fe1f8]
xor rax, rsp
mov qword [rsp + 0xc0], rax
mov qword [rsp + 0x88], rdx
mov eax, 0xfffffff
lea r11, [0x100000000]
lea r14, [0x100000000]
lea r13, [rcx + 0x18]
mov r15, qword [r13]
mov qword [rsp + 0xa0], rcx
mov esi, dword [r15 + 1]
mov edx, dword [r15 + 5]
and rdx, rax
shr rsi, 1
and rsi, rax
mov qword [rsp + 0x90], r13
mov eax, dword [0x100015b94]
mov rcx, rax
lea rbp, [rax + rdx - 1]
xor edx, edx
mov rax, rbp
add rsi, r14
div rcx
mov eax, dword [0x100015b94]
sub rbp, rdx
mov qword [rsp + 0xa8], rsi
mov eax, dword [0x100015b94]
mov r10d, dword [0x10028bffc]
mov eax, dword [0x10028bffc]
test eax, eax
je 0x10005f357
xor r8d, r8d
mov edi, dword [0x10028bffc]
xor eax, eax
dec edi
inc rdi
mov r9, rdi
je 0x10005f311
mov rcx, qword [0x1003feeb8]
imul rcx, rcx, 0x343fd
shl rax, 0x10
shr r9, 0x10
add rcx, 0x269ec3
mov rdx, rcx
shr rdx, 0x10
movzx edx, dx
or rax, rdx
test r9, r9
jne 0x10005f2e2
mov qword [0x1003feeb8], rcx
xor edx, edx
div rdi
test r10, r10
je 0x10005f34c
inc r8
mov ecx, 0xffff10f4
mov eax, 0xef0b
lock cmpxchg dword [r11 + rdx*4 + 0x41a130], ecx
je 0x10005f5cd
lea rax, [rdx + 1]
xor edx, edx
mov ecx, dword [0x10028bffc]
div rcx
cmp r8, r10
jb 0x10005f31b
xor ebx, ebx
test rbx, rbx
jne 0x10005f484
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor edi, edi
mov r12d, eax
inc rdi
xor eax, eax
mov rcx, qword [0x10041aa98]
mov r9, rcx
test rcx, rcx
mov r8, rcx
je 0x10005f3af
mov rcx, qword [0x1003feeb8]
imul rcx, rcx, 0x343fd
shl rax, 0x10
shr r9, 0x10
add rcx, 0x269ec3
mov rdx, rcx
shr rdx, 0x10
movzx edx, dx
or rax, rdx
test r9, r9
jne 0x10005f380
mov qword [0x1003feeb8], rcx
mov r9d, 0x40
xor edx, edx
div r8
mov r8d, 0x3000
mov rcx, rdx
mov rdx, rbp
shl rcx, 0x10
add rcx, qword [0x10041cce0]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
test rax, rax
mov rbx, rax
je 0x10005f41a
mov rcx, rax
and qword [rsp + 0x28], 0
mov rdx, rax
and qword [rsp + 0x20], 0
mov r8d, ebp
lea r9, [0x100363f08]
or rcx, 3
call qword [sym.imp.ntdll.dll_RtlInstallFunctionTableCallback]
test al, al
jne 0x10005f42e
mov r8d, 0x8000
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
cmp rdi, 0x11
jb 0x10005f362
xor ebx, ebx
cmp rbx, 0x10000
jb 0x10005f43c
test bl, 3
je 0x10005f461
test rbx, rbx
je 0x10005f45f
mov rcx, rbx
or rcx, 3
call qword [sym.imp.ntdll.dll_RtlDeleteFunctionTable]
mov rcx, rbx
xor edx, edx
mov r8d, 0x8000
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor ebx, ebx
mov ecx, r12d
call qword [sym.imp.KERNEL32.dll_SetLastError]
test rbx, rbx
lea r11, [0x100000000]
je 0x10005f2ab
mov rcx, rbp
xor eax, eax
mov rdi, rbx
rep stosb byte [rdi], al
mov eax, 0x5fd989e1
mov ebp, 0xfffffff
mov r12d, esi
add qword [r13], 9
mov r15d, dword [r15 + 5]
and r15, rbp
sub r12d, r14d
mov r8d, dword [0x100015b94]
xor eax, eax
mov qword [rsp + 0x98], r15
mov dword [rsp + 0x30], r12d
sub r8, r15
inc r8
mov rdi, r8
je 0x10005f4f7
mov rcx, qword [0x1003feeb8]
imul rcx, rcx, 0x343fd
shl rax, 0x10
shr rdi, 0x10
add rcx, 0x269ec3
mov rdx, rcx
shr rdx, 0x10
movzx edx, dx
or rax, rdx
test rdi, rdi
jne 0x10005f4c8
mov qword [0x1003feeb8], rcx
mov ecx, r12d
xor edx, edx
div r8
add rbx, rdx
mov qword [rsp + 0x78], rbx
mov r8, rbx
mov rdx, r15
mov eax, 0x4c5dc7dd
mov rdx, qword [r15 + rsi]
lea rcx, [rsp + 0x80]
mov qword [rsp + 0x80], rdx
xor dil, dil
mov eax, 0xe2b64398
mov rcx, r14
mov r10, qword [rsp + 0x80]
mov r9d, dword [rsp + 0x84]
mov rax, qword [0x10014d838]
and qword [rsp + 0x48], 0
and r10, rbp
and r9, rbp
mov ebp, 4
add r10, r14
sub rcx, rax
mov qword [rsp + 0x50], rcx
jne 0x10005f5e4
xor r11d, r11d
test r9, r9
je 0x10005f8b9
mov edx, dword [rsp + 0x4c]
mov r8d, dword [rsp + 0x48]
mov r14d, 0xb0053e08
movzx ecx, byte [r10 + r11]
inc r11
sub ecx, 0x4ffac1f8
add r8d, ecx
add ecx, edx
mov eax, ecx
imul eax, eax, 0xf80c
rol eax, 8
ror ecx, 8
xor eax, ecx
imul rax, r14
mov qword [rsp + 0x38], rax
shr rax, 0x20
mov edx, dword [rsp + 0x38]
add edx, eax
add r8d, edx
cmp r11, r9
jb 0x10005f581
mov dword [rsp + 0x4c], edx
mov dword [rsp + 0x48], r8d
jmp 0x10005f8b9
mov ecx, dword [0x100015b94]
imul rcx, rdx
lea rbx, [rcx + r11 + 0x3df000]
jmp 0x10005f34e
mov rbx, 0xfffffffffffff000
movsxd rcx, dword [0x10000003c]
mov r8d, dword [rcx + r14 + 0xb0]
lea rax, [r10 + r9]
mov ecx, dword [rcx + r14 + 0xb4]
mov qword [rsp + 0x68], rax
add r8, r14
mov eax, r10d
sub eax, r14d
mov r12d, eax
mov r11d, eax
add rax, r9
mov r14, rax
and r11, rbx
and r14, rbx
sub r12, r11
sub rax, r14
add rcx, r8
mov qword [rsp + 0x38], rcx
mov qword [rsp + 0x70], rax
jmp 0x10005f64a
mov eax, dword [r8]
cmp rax, r11
jae 0x10005f64f
mov eax, dword [r8 + 4]
add r8, rax
cmp r8, rcx
jne 0x10005f63b
xor ebx, ebx
cmp r8, rcx
je 0x10005f68d
mov eax, dword [r8]
cmp rax, r11
jne 0x10005f68d
mov ecx, dword [r8 + 4]
sub rcx, 8
shr rcx, 1
je 0x10005f688
lea rdx, [r8 + 8]
movzx eax, word [rdx]
and eax, 0xfff
cmp rax, r12
jae 0x10005f688
inc rbx
add rdx, 2
cmp rbx, rcx
jne 0x10005f66f
mov rcx, qword [rsp + 0x38]
mov r9d, dword [rsp + 0x48]
mov edx, dword [rsp + 0x4c]
mov rsi, qword [rsp + 0x50]
mov r13d, 0xb0053e08
cmp r8, rcx
je 0x10005f83a
mov eax, dword [r8]
cmp rax, r14
ja 0x10005f83a
mov edi, dword [r8 + 4]
lea rax, [rdi - 8]
shr rax, 1
cmp rbx, rax
jne 0x10005f6e2
add r8, rdi
cmp r8, rcx
je 0x10005f83a
mov eax, dword [r8]
cmp rax, r14
ja 0x10005f83a
xor ebx, ebx
jmp 0x10005f6b6
mov eax, dword [r8]
cmp rax, r14
jne 0x10005f700
movzx eax, word [r8 + rbx*2 + 8]
and eax, 0xfff
cmp rax, qword [rsp + 0x70]
jae 0x10005f83a
mov edi, 0xf000
mov rax, rbx
inc rbx
test word [r8 + rax*2 + 8], di
je 0x10005f6a1
xor edi, edi
movzx r11d, word [r8 + rax*2 + 8]
mov r12d, r11d
lea rax, [0x100000000]
and r12d, 0xfff
add r12d, dword [r8]
add r12, rax
mov rax, r12
sub rax, r10
je 0x10005f784
mov r15, rax
movzx ecx, byte [r10 + rdi]
inc rdi
sub ecx, 0x4ffac1f8
add r9d, ecx
add ecx, edx
mov eax, ecx
imul eax, eax, 0xf80c
rol eax, 8
ror ecx, 8
xor eax, ecx
imul rax, r13
mov qword [rsp + 0x60], rax
mov edx, dword [rsp + 0x60]
shr rax, 0x20
add edx, eax
add r9d, edx
cmp rdi, r15
jb 0x10005f73d
mov dword [rsp + 0x4c], edx
mov dword [rsp + 0x48], r9d
mov rax, qword [r12]
shr r11d, 0xc
mov qword [rsp + 0x60], rax
cmp r11d, 3
je 0x10005f7a7
sub r11d, 0xa
neg r11d
sbb r10d, r10d
add r10d, 3
jmp 0x10005f7ad
mov r10d, 2
mov r11, rsi
neg r11
sub r10d, 2
je 0x10005f7d5
cmp r10d, 1
je 0x10005f7c5
or r10, 0xffffffffffffffff
jmp 0x10005f7dd
add rax, r11
mov qword [rsp + 0x60], rax
mov r10d, 8
jmp 0x10005f7dd
add dword [rsp + 0x60], r11d
mov r10, rbp
xor r11d, r11d
test r10, r10
je 0x10005f82d
movzx ecx, byte [rsp + r11 + 0x60]
inc r11
sub ecx, 0x4ffac1f8
add r9d, ecx
add ecx, edx
mov eax, ecx
imul eax, eax, 0xf80c
rol eax, 8
ror ecx, 8
xor eax, ecx
imul rax, r13
mov qword [rsp + 0x50], rax
shr rax, 0x20
mov edx, dword [rsp + 0x50]
add edx, eax
add r9d, edx
cmp r11, r10
jb 0x10005f7e5
mov dword [rsp + 0x4c], edx
mov dword [rsp + 0x48], r9d
mov rcx, qword [rsp + 0x38]
add r10, r12
jmp 0x10005f6a1
mov r13, qword [rsp + 0x90]
mov r15, qword [rsp + 0x98]
mov rbx, qword [rsp + 0x68]
xor r8d, r8d
mov dil, r8b
mov rsi, qword [rsp + 0xa8]
sub rbx, r10
je 0x10005f8af
mov r11d, 0xb0053e08
movzx ecx, byte [r10 + r8]
inc r8
sub ecx, 0x4ffac1f8
add r9d, ecx
add ecx, edx
mov eax, ecx
imul eax, eax, 0xf80c
rol eax, 8
ror ecx, 8
xor eax, ecx
imul rax, r11
mov qword [rsp + 0x38], rax
shr rax, 0x20
mov edx, dword [rsp + 0x38]
add edx, eax
add r9d, edx
cmp r8, rbx
jb 0x10005f868
mov dword [rsp + 0x4c], edx
mov dword [rsp + 0x48], r9d
mov r12d, dword [rsp + 0x30]
mov rbx, qword [rsp + 0x78]
xor ecx, ecx
mov rax, rcx
inc rcx
and eax, 7
mov al, byte [rsp + rax + 0x48]
cmp rcx, 8
mov byte [rsp + rcx + 0xb7], al
jb 0x10005f8bb
mov eax, 0x8d621667
mov rax, qword [rsp + 0xb8]
mov r10, rsi
mov r11, rbx
mov r14, r15
and r14d, 7
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x38], rbx
je 0x10005fdc5
xor r8d, r8d
xor ebx, ebx
mov dword [rsp + 0x68], r8d
not r12d
xor r11d, r11d
test r14d, r14d
mov dword [rsp + 0x58], ebx
jle 0x10005f954
lea r9d, [r8 + 0x38]
cmp r11d, ebp
movzx edx, byte [r10]
jge 0x10005f92f
lea ecx, [r9 - 0x20]
shl edx, cl
or ebx, edx
jmp 0x10005f937
mov ecx, r9d
shl edx, cl
or r8d, edx
inc r11d
inc r10
sub r9d, 8
cmp r11d, r14d
jl 0x10005f91c
mov dword [rsp + 0x58], ebx
mov dword [rsp + 0x68], r8d
mov qword [rsp + 0x50], r10
movzx r11d, ax
mov ebx, r12d
mov edx, eax
mov ebp, dword [rsp + 0xbc]
movzx r10d, word [rsp + 0xba]
movzx r9d, word [rsp + 0xbe]
sub ebx, ebp
movzx r8d, bp
sub ebx, r11d
xor ebx, dword [rsp + 0x30]
mov ecx, ebx
ror ecx, 6
xor ecx, r9d
imul ecx, r10d
xor r12d, ecx
sub edx, r12d
mov ecx, r12d
ror edx, 7
rol ecx, 0xe
imul edx, r8d
add ecx, edx
xor ebx, ecx
mov ecx, ebx
mov edx, ebx
ror edx, 1
xor ecx, r11d
imul ecx, r10d
xor edx, ecx
xor r12d, edx
mov edx, eax
mov ecx, r12d
sub ecx, r11d
xor ecx, ebp
xor ebx, ecx
xor edx, ebx
mov ecx, ebx
ror edx, 2
rol ecx, 5
imul edx, r9d
xor ecx, edx
xor r12d, ecx
mov edx, r12d
sub edx, eax
mov ecx, r12d
rol edx, 2
ror ecx, 0xc
imul edx, r8d
add ecx, edx
xor ebx, ecx
mov edx, ebx
mov ecx, ebx
xor edx, r11d
shr ecx, 0xe
rol edx, 6
imul edx, r10d
add edx, ecx
xor r12d, edx
mov edx, r12d
mov ecx, r12d
sub edx, ebp
ror edx, 1
ror ecx, 0xd
imul edx, r11d
sub edx, ecx
xor ebx, edx
mov ecx, ebx
mov edx, ebx
sub edx, eax
ror edx, 0xa
ror ecx, 3
imul edx, r9d
xor ecx, edx
mov edx, eax
xor r12d, ecx
mov ecx, ebp
mov ebp, eax
xor ebp, dword [rsp + 0xbc]
xor edx, r12d
sub ecx, edx
mov edx, dword [rsp + 0x58]
xor ebx, ecx
xor ebp, r12d
xor ebp, ebx
mov r12d, dword [rsp + 0x68]
mov ecx, ebp
xor ebp, r12d
mov r9d, ebp
ror ecx, 0xf
sub ecx, r11d
imul ecx, r10d
xor r10d, r10d
xor ecx, edx
lea edx, [r10 + 4]
xor ebx, ecx
mov r8d, ebx
test r14d, r14d
jle 0x10005faa7
mov rcx, qword [rsp + 0x38]
cmp r10d, edx
jge 0x10005fa8d
rol r8d, 8
mov byte [rcx], r8b
inc rcx
xor dil, r8b
jmp 0x10005fa9a
rol r9d, 8
mov byte [rcx], r9b
inc rcx
xor dil, r9b
inc r10d
cmp r10d, r14d
jl 0x10005fa79
mov qword [rsp + 0x38], rcx
lea ecx, [r14 - 4]
test ecx, ecx
jle 0x10005fdad
sub edx, ecx
shl edx, 3
mov ecx, edx
shr ebp, cl
shl ebp, cl
mov r11, qword [rsp + 0x38]
mov r10, qword [rsp + 0x50]
mov rcx, r15
shr rcx, 3
test rcx, rcx
mov qword [rsp + 0xb0], rcx
je 0x10005fcf0
mov r14d, dword [rsp + 0xbc]
movzx edx, ax
mov r15d, dword [rsp + 0x58]
movzx ecx, r14w
mov r13, qword [rsp + 0xb0]
mov dword [rsp + 0x68], ecx
movzx ecx, word [rsp + 0xbe]
mov dword [rsp + 0x30], edx
mov dword [rsp + 0x70], ecx
mov ecx, eax
xor ecx, r14d
mov dword [rsp + 0x38], ecx
movzx ecx, word [rsp + 0xba]
mov esi, dword [rsp + 0x38]
mov dword [rsp + 0x50], ecx
movzx ecx, byte [r10]
shl ecx, 8
movzx r8d, byte [r10 + 4]
shl r8d, 8
movzx r9d, byte [r10 + 1]
add r10, 8
or r9d, ecx
shl r9d, 8
movzx ecx, byte [r10 - 6]
or r9d, ecx
movzx ecx, byte [r10 - 5]
shl r9d, 8
or r9d, ecx
movzx ecx, byte [r10 - 3]
or r8d, ecx
movzx ecx, byte [r10 - 2]
shl r8d, 8
or r8d, ecx
movzx ecx, byte [r10 - 1]
shl r8d, 8
or r8d, ecx
xor ebp, r8d
mov ecx, ebp
sub ecx, r14d
sub ecx, edx
movzx edx, word [rsp + 0xbe]
xor ecx, r9d
xor ebx, ecx
mov ecx, ebx
ror ecx, 6
xor ecx, edx
movzx edx, word [rsp + 0xba]
imul ecx, edx
xor ebp, ecx
mov edx, eax
mov ecx, ebp
sub edx, ebp
ror edx, 7
rol ecx, 0xe
imul edx, dword [rsp + 0x68]
add ecx, edx
xor ebx, ecx
mov edx, ebx
mov ecx, ebx
xor ecx, dword [rsp + 0x30]
ror edx, 1
imul ecx, dword [rsp + 0x50]
xor edx, ecx
xor ebp, edx
mov edx, eax
mov ecx, ebp
sub ecx, dword [rsp + 0x30]
xor ecx, r14d
xor ebx, ecx
mov ecx, ebx
xor edx, ebx
ror edx, 2
rol ecx, 5
imul edx, dword [rsp + 0x70]
xor ecx, edx
xor ebp, ecx
mov ecx, ebp
mov edx, ebp
sub edx, eax
rol edx, 2
ror ecx, 0xc
imul edx, dword [rsp + 0x68]
add ecx, edx
xor ebx, ecx
mov edx, ebx
xor edx, dword [rsp + 0x30]
movzx ecx, word [rsp + 0xba]
rol edx, 6
imul edx, ecx
mov ecx, ebx
shr ecx, 0xe
add edx, ecx
xor ebp, edx
mov ecx, ebp
mov edx, ebp
sub edx, r14d
ror edx, 1
imul edx, dword [rsp + 0x30]
ror ecx, 0xd
sub edx, ecx
xor ebx, edx
mov edx, ebx
mov ecx, ebx
sub edx, eax
ror edx, 0xa
ror ecx, 3
imul edx, dword [rsp + 0x70]
xor ecx, edx
mov edx, eax
xor ebp, ecx
xor edx, ebp
mov ecx, r14d
sub ecx, edx
mov edx, dword [rsp + 0x30]
xor ebx, ecx
xor ebp, ebx
xor ebp, esi
mov ecx, ebp
xor ebp, r12d
mov byte [r11 + 7], bpl
ror ecx, 0xf
mov r12d, r8d
sub ecx, edx
imul ecx, dword [rsp + 0x50]
xor ecx, r15d
xor ebx, ecx
mov r15d, r9d
mov byte [r11 + 3], bl
xor dil, bl
ror ebx, 8
mov byte [r11 + 2], bl
xor dil, bpl
ror ebp, 8
mov byte [r11 + 6], bpl
xor dil, bl
ror ebx, 8
mov byte [r11 + 1], bl
xor dil, bpl
ror ebp, 8
xor dil, bl
ror ebx, 8
xor dil, bpl
mov byte [r11 + 5], bpl
ror ebp, 8
mov cl, bpl
mov byte [r11], bl
mov byte [r11 + 4], bpl
add r11, 8
xor cl, bl
xor dil, cl
ror ebx, 8
ror ebp, 8
sub r13, 1
jne 0x10005fb29
mov r15, qword [rsp + 0x98]
mov rsi, qword [rsp + 0xa8]
mov r13, qword [rsp + 0x90]
mov al, byte [r15 + rsi + 8]
xor al, dil
je 0x10005fdf0
call fcn.1000024bc
mov r11, qword [rsp + 0xa0]
mov r10, rax
mov rax, 0xfffffffffffff000
lea r12, [0x100059e28]
mov r9d, 0xffff
mov qword [r11 + 0x10], r12
mov rcx, qword [0x1003feeb8]
and r13, 0xfffffffffffffff8
and r10, rax
lea r8, [r13 + 0xfff]
and r8, rax
xor edi, edi
imul rcx, rcx, 0x343fd
shl rdi, 0x10
shr r9, 0x10
add rcx, 0x269ec3
mov rax, rcx
shr rax, 0x10
movzx edx, ax
or rdi, rdx
test r9, r9
jne 0x10005fd40
mov qword [0x1003feeb8], rcx
movabs rax, 0x8000800080008001
mul rdi
mov rax, qword [rsp + 0x88]
shr rdx, 0xf
imul rdx, rdx, 0xffff
mov qword [rax + 0x98], r10
sub rdi, rdx
inc rdi
mov qword [rax + 0xb0], rdi
mov qword [rsp + 0x88], r9
jmp 0x10005fde6
xor ebp, ebp
test ecx, ecx
jns 0x10005fabe
neg ecx
shl ecx, 3
shr ebx, cl
shl ebx, cl
jmp 0x10005fabe
mov dword [rsp + 0x58], r12d
not r12d
xor ebp, ebp
xor ebx, ebx
jmp 0x10005fac8
mov rax, qword [rsp + 0x88]
mov qword [r13], rax
add r13, 8
cmp r13, r8
jb 0x10005fdd6
jmp 0x10005ff06
mov r12, qword [rsp + 0x78]
mov rbx, rsi
mov rax, qword [0x10014d838]
lea r14, [0x100000000]
sub rbx, r12
mov rbp, r14
sub rbp, rax
jne 0x10005fe1a
test rbx, rbx
je 0x10005fef3
xor edi, edi
mov r11, r12
sub r11, rsi
sub esi, r14d
lea r13d, [r15 + rsi]
lea r15, [0x100000000]
mov rcx, qword [0x1000199f8]
lea r8d, [rcx - 1]
test r8d, r8d
js 0x10005fe70
lea eax, [r8 + rdi]
cdq
sub eax, edx
sar eax, 1
movsxd rdx, eax
mov r9d, dword [r15 + rdx*4 + 0x199fc]
and r9d, 0xfffffff
cmp esi, r9d
jae 0x10005fe66
lea r8d, [rax - 1]
jmp 0x10005fe6b
jbe 0x10005fe75
lea edi, [rax + 1]
cmp r8d, edi
jge 0x10005fe40
movsxd r10, edi
jmp 0x10005feec
movsxd r10, eax
jmp 0x10005feec
mov edx, dword [r15 + r10*4 + 0x199fc]
mov eax, edx
and eax, 0xfffffff
cmp eax, r13d
jae 0x10005fef3
mov edi, edx
mov r8, rdx
sar edx, 0x1e
shl edi, 2
and r8d, 0xfffffff
and edx, 3
sar edi, 0x1e
add r8, r14
xor r9d, r9d
and edi, 3
sub edi, 1
je 0x10005fec8
sub edi, 1
je 0x10005fec3
cmp edi, 1
jne 0x10005fece
mov r9, rbp
jmp 0x10005fece
mov r9, rbx
jmp 0x10005fece
mov r9, rbp
sub r9, rbx
sub edx, 2
je 0x10005fede
cmp edx, 1
jne 0x10005fee9
add qword [r8 + r11], r9
jmp 0x10005fee2
add dword [r8 + r11], r9d
mov rcx, qword [0x1000199f8]
inc r10
mov eax, ecx
cmp r10, rax
jb 0x10005fe7a
mov eax, dword [0x100015b94]
mov eax, 0xb0589a07
mov r11, qword [rsp + 0xa0]
mov qword [r11 + 0x10], r12
mov rcx, qword [rsp + 0xc0]
xor rcx, rsp
call fcn.1002d7828
mov rbx, qword [rsp + 0x120]
add rsp, 0xd0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret