Function at 0x1002f9ac4
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, 0xc0
mov rax, qword [0x100404bb0]
xor rax, rsp
mov qword [rsp + 0xb8], rax
mov qword [rsp + 0x78], rdx
lea r12, [rcx + 0x18]
lea r15, [0x100000000]
mov r14, qword [r12]
mov qword [rsp + 0x90], rcx
mov ebp, dword [r14 + 5]
mov eax, 0xfffffff
lea r11, [0x100000000]
mov edx, dword [r14 + 1]
and rbp, rax
shr rdx, 2
and rdx, rax
mov qword [rsp + 0x98], r12
add rbp, r15
mov eax, dword [0x100015964]
mov rcx, rax
lea rsi, [rax + rdx - 1]
mov qword [rsp + 0x88], rbp
xor edx, edx
mov rax, rsi
div rcx
sub rsi, rdx
mov eax, dword [0x100015964]
mov eax, dword [0x100015964]
mov eax, dword [0x10028bf00]
test eax, eax
mov r10d, dword [0x10028bf00]
je 0x1002f9c05
mov edi, dword [0x10028bf00]
xor r8d, r8d
xor eax, eax
dec edi
inc rdi
mov r9, rdi
je 0x1002f9bbf
mov rcx, qword [0x1003fe198]
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 0x1002f9b90
mov qword [0x1003fe198], rcx
xor edx, edx
div rdi
test r10, r10
je 0x1002f9bfa
mov eax, 0xef0b
mov ecx, 0xffff10f4
inc r8
lock cmpxchg dword [r11 + rdx*4 + 0x4059e0], ecx
je 0x1002f9ea9
lea rax, [rdx + 1]
xor edx, edx
mov ecx, dword [0x10028bf00]
div rcx
cmp r8, r10
jb 0x1002f9bc9
xor ebx, ebx
test rbx, rbx
jne 0x1002f9d32
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor edi, edi
mov r13d, eax
mov rcx, qword [0x100405548]
mov r8, rcx
inc rdi
mov r9, rcx
xor eax, eax
test rcx, rcx
je 0x1002f9c5d
mov rcx, qword [0x1003fe198]
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 0x1002f9c2e
mov qword [0x1003fe198], rcx
mov r9d, 0x40
xor edx, edx
div r8
mov rcx, rdx
mov rdx, rsi
shl rcx, 0x10
mov r8d, 0x3000
add rcx, qword [0x10041cd78]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
test rax, rax
mov rbx, rax
je 0x1002f9cc8
mov rcx, rax
and qword [rsp + 0x28], 0
mov rdx, rax
lea r9, [0x100363da0]
and qword [rsp + 0x20], 0
or rcx, 3
mov r8d, esi
call qword [sym.imp.ntdll.dll_RtlInstallFunctionTableCallback]
test al, al
jne 0x1002f9cdc
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 0x1002f9c10
xor ebx, ebx
cmp rbx, 0x10000
jb 0x1002f9cea
test bl, 3
je 0x1002f9d0f
test rbx, rbx
je 0x1002f9d0d
mov rcx, rbx
or rcx, 3
call qword [sym.imp.ntdll.dll_RtlDeleteFunctionTable]
mov r8d, 0x8000
mov rcx, rbx
xor edx, edx
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor ebx, ebx
mov ecx, r13d
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea r11, [0x100000000]
test rbx, rbx
je 0x1002f9b59
mov rcx, rsi
mov rdi, rbx
xor eax, eax
rep stosb byte [rdi], al
mov eax, 0x5b81963d
mov esi, ebp
add qword [r12], 9
mov r8d, dword [0x100015964]
mov r14d, dword [r14 + 1]
shr r14, 2
and r14d, 0xfffffff
sub esi, r15d
mov qword [rsp + 0xa0], r14
xor eax, eax
mov dword [rsp + 0x38], esi
sub r8, r14
inc r8
mov rdi, r8
je 0x1002f9da6
mov rcx, qword [0x1003fe198]
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 0x1002f9d77
mov qword [0x1003fe198], rcx
xor edx, edx
mov ecx, esi
div r8
lea r13, [rdx + rbx]
mov rdx, r14
mov r8, r13
mov qword [rsp + 0x80], r13
mov eax, 0x36e29fa
xor dil, dil
mov rdx, qword [r14 + rbp]
mov qword [rsp + 0x70], rdx
lea rcx, [rsp + 0x70]
mov eax, 0x32683e33
mov ebx, 4
mov r10, qword [rsp + 0x70]
mov r9d, dword [rsp + 0x74]
and qword [rsp + 0x40], 0
mov rcx, r15
mov eax, 0xfffffff
and r10, rax
and r9, rax
mov rax, qword [0x10014dad0]
add r10, r15
sub rcx, rax
mov qword [rsp + 0x30], rcx
jne 0x1002f9ec0
xor r11d, r11d
test r9, r9
je 0x1002fa22b
mov ecx, dword [rsp + 0x44]
mov ebx, 0xb0d52e05
mov r8d, dword [rsp + 0x40]
movzx eax, byte [r11 + r10]
inc r11
sub eax, 0x4f2ad1fb
add r8d, eax
add eax, ecx
imul rax, rbx
mov qword [rsp + 0x30], rax
mov ecx, dword [rsp + 0x30]
shr rax, 0x20
add eax, ecx
imul rax, rbx
mov qword [rsp + 0x30], rax
mov ecx, dword [rsp + 0x30]
shr rax, 0x20
lea edx, [rcx + rax*2 - 0x7fffffff]
sar ecx, 0x1f
btr ecx, 0x1f
sub edx, ecx
mov eax, edx
sar eax, 0x1f
btr eax, 0x1f
add eax, edx
imul rax, rbx
mov qword [rsp + 0x30], rax
mov ecx, dword [rsp + 0x30]
shr rax, 0x20
add ecx, eax
add r8d, ecx
cmp r11, r9
jb 0x1002f9e2f
mov dword [rsp + 0x44], ecx
mov dword [rsp + 0x40], r8d
jmp 0x1002fa226
mov ecx, dword [0x100015964]
imul rcx, rdx
lea rbx, [rcx + r11 + 0x3df000]
jmp 0x1002f9bfc
lea rax, [r10 + r9]
movsxd rcx, dword [0x10000003c]
mov edx, dword [rcx + r15 + 0xb4]
mov r8d, dword [rcx + r15 + 0xb0]
add r8, r15
mov qword [rsp + 0x68], rax
mov eax, r10d
sub eax, r15d
mov r11d, eax
mov ecx, eax
mov rax, 0xfffffffffffff000
and r11, rax
lea r13, [rcx + r9]
mov rbx, rcx
sub rbx, r11
lea rcx, [rdx + r8]
mov qword [rsp + 0x48], rcx
mov r15, r13
and r15, rax
sub r13, r15
mov qword [rsp + 0x58], r13
jmp 0x1002f9f2a
mov eax, dword [r8]
cmp rax, r11
jae 0x1002f9f2f
mov eax, dword [r8 + 4]
add r8, rax
cmp r8, rcx
jne 0x1002f9f1b
xor esi, esi
cmp r8, rcx
je 0x1002f9f6d
mov eax, dword [r8]
cmp rax, r11
jne 0x1002f9f6d
mov ecx, dword [r8 + 4]
sub rcx, 8
shr rcx, 1
je 0x1002f9f68
lea rdx, [r8 + 8]
movzx eax, word [rdx]
and eax, 0xfff
cmp rax, rbx
jae 0x1002f9f68
inc rsi
add rdx, 2
cmp rsi, rcx
jne 0x1002f9f4f
mov rcx, qword [rsp + 0x48]
mov edx, dword [rsp + 0x44]
mov ebx, 0xb0d52e05
mov r14, qword [rsp + 0x30]
mov r9d, dword [rsp + 0x40]
lea rdi, [0x100000000]
cmp r8, rcx
je 0x1002fa17d
mov eax, dword [r8]
cmp rax, r15
ja 0x1002fa17d
mov r11d, dword [r8 + 4]
lea rax, [r11 - 8]
shr rax, 1
cmp rsi, rax
jne 0x1002f9fc8
add r8, r11
cmp r8, rcx
je 0x1002fa17d
mov eax, dword [r8]
cmp rax, r15
ja 0x1002fa17d
xor esi, esi
jmp 0x1002f9f9c
mov eax, dword [r8]
cmp rax, r15
jne 0x1002f9fe4
movzx eax, word [r8 + rsi*2 + 8]
and eax, 0xfff
cmp rax, r13
jae 0x1002fa17d
mov r11d, 0xf000
mov rax, rsi
inc rsi
test word [r8 + rax*2 + 8], r11w
je 0x1002f9f87
xor r12d, r12d
movzx r11d, word [r8 + rax*2 + 8]
mov r13d, r11d
and r13d, 0xfff
add r13d, dword [r8]
add r13, rdi
mov rax, r13
sub rax, r10
je 0x1002fa091
mov rbp, rax
movzx eax, byte [r12 + r10]
inc r12
sub eax, 0x4f2ad1fb
add r9d, eax
add eax, edx
imul rax, rbx
mov qword [rsp + 0x30], rax
mov ecx, dword [rsp + 0x30]
shr rax, 0x20
add eax, ecx
imul rax, rbx
mov qword [rsp + 0x30], rax
mov ecx, dword [rsp + 0x30]
shr rax, 0x20
lea edx, [rcx + rax*2 - 0x7fffffff]
sar ecx, 0x1f
btr ecx, 0x1f
sub edx, ecx
mov eax, edx
sar eax, 0x1f
btr eax, 0x1f
add eax, edx
imul rax, rbx
mov qword [rsp + 0x30], rax
mov edx, dword [rsp + 0x30]
shr rax, 0x20
add edx, eax
add r9d, edx
cmp r12, rbp
jb 0x1002fa01c
mov dword [rsp + 0x44], edx
mov dword [rsp + 0x40], r9d
mov rax, qword [r13]
shr r11d, 0xc
mov qword [rsp + 0x60], rax
cmp r11d, 3
je 0x1002fa0b4
sub r11d, 0xa
neg r11d
sbb r10d, r10d
add r10d, 3
jmp 0x1002fa0ba
mov r10d, 2
mov r11, r14
neg r11
sub r10d, 2
je 0x1002fa0e2
cmp r10d, 1
je 0x1002fa0d2
or r10, 0xffffffffffffffff
jmp 0x1002fa0ed
mov r10d, 8
add rax, r11
mov qword [rsp + 0x60], rax
jmp 0x1002fa0ed
mov r10d, 4
add dword [rsp + 0x60], r11d
xor r11d, r11d
test r10, r10
je 0x1002fa16b
movzx eax, byte [rsp + r11 + 0x60]
inc r11
sub eax, 0x4f2ad1fb
add r9d, eax
add eax, edx
imul rax, rbx
mov qword [rsp + 0x30], rax
mov ecx, dword [rsp + 0x30]
shr rax, 0x20
add eax, ecx
imul rax, rbx
mov qword [rsp + 0x30], rax
shr rax, 0x20
mov ecx, dword [rsp + 0x30]
lea edx, [rcx + rax*2 - 0x7fffffff]
sar ecx, 0x1f
btr ecx, 0x1f
sub edx, ecx
mov eax, edx
sar eax, 0x1f
btr eax, 0x1f
add eax, edx
imul rax, rbx
mov qword [rsp + 0x30], rax
mov edx, dword [rsp + 0x30]
shr rax, 0x20
add edx, eax
add r9d, edx
cmp r11, r10
jb 0x1002fa0f5
mov dword [rsp + 0x44], edx
mov dword [rsp + 0x40], r9d
mov rcx, qword [rsp + 0x48]
add r10, r13
mov r13, qword [rsp + 0x58]
jmp 0x1002f9f87
mov r14, qword [rsp + 0xa0]
mov rbp, qword [rsp + 0x88]
mov r11, qword [rsp + 0x68]
xor r8d, r8d
sub r11, r10
mov dil, r8b
mov r12, qword [rsp + 0x98]
je 0x1002fa21a
movzx eax, byte [r8 + r10]
inc r8
sub eax, 0x4f2ad1fb
add r9d, eax
add eax, edx
imul rax, rbx
mov qword [rsp + 0x30], rax
shr rax, 0x20
mov ecx, dword [rsp + 0x30]
add eax, ecx
imul rax, rbx
mov qword [rsp + 0x30], rax
mov ecx, dword [rsp + 0x30]
shr rax, 0x20
lea edx, [rcx + rax*2 - 0x7fffffff]
sar ecx, 0x1f
btr ecx, 0x1f
sub edx, ecx
mov eax, edx
sar eax, 0x1f
btr eax, 0x1f
add eax, edx
imul rax, rbx
mov qword [rsp + 0x30], rax
mov edx, dword [rsp + 0x30]
shr rax, 0x20
add edx, eax
add r9d, edx
cmp r8, r11
jb 0x1002fa1a5
mov dword [rsp + 0x44], edx
mov dword [rsp + 0x40], r9d
mov r13, qword [rsp + 0x80]
mov esi, dword [rsp + 0x38]
mov ebx, 4
xor ecx, ecx
mov rax, rcx
inc rcx
and eax, 7
cmp rcx, 8
mov al, byte [rsp + rax + 0x40]
mov byte [rsp + rcx + 0xaf], al
jb 0x1002fa22d
mov eax, 0xc9910741
mov r15, r14
mov r10, rbp
xor r11d, r11d
and r15d, 7
mov rax, qword [rsp + 0xb0]
mov qword [rsp + 0x48], rbp
mov qword [rsp + 0x30], r13
je 0x1002fa762
mov r13d, esi
xor r8d, r8d
not r13d
and dword [rsp + 0x50], r8d
mov dword [rsp + 0x58], r8d
test r15d, r15d
jle 0x1002fa2c3
lea r9d, [r11 + 0x38]
movzx edx, byte [r10]
cmp r11d, ebx
jge 0x1002fa2a2
lea ecx, [r9 - 0x20]
shl edx, cl
or dword [rsp + 0x50], edx
jmp 0x1002fa2aa
mov ecx, r9d
shl edx, cl
or r8d, edx
inc r11d
inc r10
sub r9d, 8
cmp r11d, r15d
jl 0x1002fa28d
mov dword [rsp + 0x58], r8d
mov qword [rsp + 0x48], r10
mov r10d, dword [rsp + 0xb4]
movzx r9d, word [rsp + 0xb2]
mov edx, esi
movzx ebx, r10w
mov r8d, ebx
xor r8d, esi
rol r8d, 4
ror edx, 8
movzx r11d, word [rsp + 0xb6]
mov ecx, r11d
imul ecx, r8d
sub ecx, edx
xor r13d, ecx
mov esi, r13d
mov edx, r13d
sub edx, eax
mov ecx, ebx
rol edx, 8
rol esi, 3
imul ecx, edx
add esi, ecx
xor esi, dword [rsp + 0x38]
mov ecx, r9d
lea r8d, [r10 + rsi]
mov edx, esi
ror r8d, 4
ror edx, 0xf
imul ecx, r8d
sub ecx, edx
mov r8d, r10d
movzx r10d, ax
xor r13d, ecx
mov ecx, r10d
mov edx, r13d
sub r8d, r13d
ror r8d, 2
rol edx, 7
imul ecx, r8d
xor edx, ecx
mov r8d, dword [rsp + 0xb4]
xor esi, edx
mov edx, eax
sub edx, esi
mov ecx, esi
rol edx, 0xc
ror ecx, 4
imul edx, r11d
add ecx, edx
xor r13d, ecx
mov ecx, r13d
mov edx, eax
xor edx, r13d
rol edx, 0xb
ror ecx, 8
imul edx, ebx
xor ecx, edx
xor esi, ecx
mov ecx, r10d
xor ecx, esi
mov edx, esi
ror edx, 4
imul ecx, r9d
sub ecx, edx
mov edx, eax
xor r13d, ecx
mov ecx, r13d
sub ecx, r8d
sub ecx, r10d
xor esi, ecx
mov ecx, esi
sub edx, esi
ror edx, 1
ror ecx, 6
imul edx, r11d
sub edx, ecx
xor r13d, edx
mov ecx, r13d
not ecx
ror ecx, 0xe
mov edx, r8d
add ecx, ebx
imul ecx, r11d
mov ebx, dword [rsp + 0x58]
xor esi, ecx
mov r11d, r8d
xor r11d, eax
xor r11d, r13d
xor r11d, esi
xor edx, r11d
mov ecx, r11d
xor r11d, ebx
rol edx, 0xf
mov r9d, r11d
ror ecx, 8
imul edx, r10d
add ecx, edx
xor r10d, r10d
xor ecx, dword [rsp + 0x50]
xor esi, ecx
lea edx, [r10 + 4]
test r15d, r15d
mov r8d, esi
jle 0x1002fa434
mov rcx, qword [rsp + 0x30]
cmp r10d, edx
jge 0x1002fa41a
rol r8d, 8
mov byte [rcx], r8b
inc rcx
xor dil, r8b
jmp 0x1002fa427
rol r9d, 8
mov byte [rcx], r9b
inc rcx
xor dil, r9b
inc r10d
cmp r10d, r15d
jl 0x1002fa406
mov qword [rsp + 0x30], rcx
lea ecx, [r15 - 4]
test ecx, ecx
jle 0x1002fa749
sub edx, ecx
shl edx, 3
mov ecx, edx
shr r11d, cl
shl r11d, cl
mov r10, qword [rsp + 0x48]
mov r13, qword [rsp + 0x30]
mov rcx, r14
shr rcx, 3
mov qword [rsp + 0xa8], rcx
test rcx, rcx
je 0x1002fa691
mov r12, qword [rsp + 0xa8]
mov r15d, dword [rsp + 0xb4]
movzx ecx, word [rsp + 0xb2]
movzx edx, r15w
mov ebp, dword [rsp + 0x50]
mov dword [rsp + 0x48], ecx
movzx ecx, word [rsp + 0xb6]
mov dword [rsp + 0x58], ecx
mov ecx, r15d
mov dword [rsp + 0x38], edx
xor ecx, eax
mov dword [rsp + 0x30], ecx
movzx ecx, ax
mov r14d, dword [rsp + 0x30]
mov dword [rsp + 0x68], ecx
movzx r8d, byte [r10 + 4]
movzx ecx, byte [r10]
shl ecx, 8
movzx r9d, byte [r10 + 1]
shl r8d, 8
add r10, 8
or r9d, ecx
shl r9d, 8
movzx ecx, byte [r10 - 6]
or r9d, ecx
shl r9d, 8
movzx ecx, byte [r10 - 5]
or r9d, ecx
movzx ecx, byte [r10 - 3]
or r8d, ecx
movzx ecx, byte [r10 - 2]
xor esi, r9d
xor edx, esi
shl r8d, 8
or r8d, ecx
shl r8d, 8
movzx ecx, byte [r10 - 1]
or r8d, ecx
mov ecx, esi
rol edx, 4
ror ecx, 8
imul edx, dword [rsp + 0x58]
sub edx, ecx
xor edx, r8d
xor r11d, edx
mov ecx, r11d
mov edx, r11d
sub edx, eax
rol edx, 8
rol ecx, 3
imul edx, dword [rsp + 0x38]
add ecx, edx
xor esi, ecx
mov ecx, esi
lea edx, [r15 + rsi]
ror edx, 4
ror ecx, 0xf
imul edx, dword [rsp + 0x48]
sub edx, ecx
xor r11d, edx
mov ecx, r11d
mov edx, r15d
sub edx, r11d
ror edx, 2
rol ecx, 7
imul edx, dword [rsp + 0x68]
xor ecx, edx
mov edx, eax
xor esi, ecx
mov ecx, esi
sub edx, esi
rol edx, 0xc
ror ecx, 4
imul edx, dword [rsp + 0x58]
add ecx, edx
xor r11d, ecx
mov edx, eax
mov ecx, r11d
xor edx, r11d
rol edx, 0xb
ror ecx, 8
imul edx, dword [rsp + 0x38]
xor ecx, edx
xor esi, ecx
mov edx, esi
mov ecx, dword [rsp + 0x68]
xor ecx, esi
ror edx, 4
imul ecx, dword [rsp + 0x48]
sub ecx, edx
mov edx, eax
xor r11d, ecx
mov ecx, r11d
sub ecx, r15d
sub ecx, dword [rsp + 0x68]
xor esi, ecx
sub edx, esi
mov ecx, esi
ror edx, 1
ror ecx, 6
imul edx, dword [rsp + 0x58]
sub edx, ecx
xor r11d, edx
mov ecx, r11d
movzx edx, word [rsp + 0xb6]
xor r11d, r14d
not ecx
ror ecx, 0xe
add ecx, dword [rsp + 0x38]
imul ecx, edx
xor esi, ecx
xor r11d, esi
mov ecx, r11d
mov edx, r15d
xor edx, r11d
xor r11d, ebx
rol edx, 0xf
mov byte [r13 + 7], r11b
ror ecx, 8
mov ebx, r8d
imul edx, dword [rsp + 0x68]
add ecx, edx
mov edx, dword [rsp + 0x38]
xor ecx, ebp
xor esi, ecx
mov byte [r13 + 3], sil
mov ebp, r9d
xor dil, sil
ror esi, 8
mov byte [r13 + 2], sil
xor dil, r11b
ror r11d, 8
xor dil, sil
ror esi, 8
mov byte [r13 + 6], r11b
mov byte [r13 + 1], sil
xor dil, r11b
ror r11d, 8
xor dil, sil
mov byte [r13 + 5], r11b
ror esi, 8
mov byte [r13], sil
xor dil, r11b
ror r11d, 8
mov byte [r13 + 4], r11b
add r13, 8
mov cl, r11b
xor cl, sil
xor dil, cl
ror esi, 8
ror r11d, 8
sub r12, 1
jne 0x1002fa4b8
mov r14, qword [rsp + 0xa0]
mov rbp, qword [rsp + 0x88]
mov r12, qword [rsp + 0x98]
mov al, byte [r14 + rbp + 8]
xor al, dil
je 0x1002fa788
call fcn.10000228c
mov r11, qword [rsp + 0x90]
and r12, 0xfffffffffffffff8
lea r13, [0x10006d7ac]
mov r10, rax
mov qword [r11 + 0x10], r13
lea r8, [r12 + 0xfff]
mov rax, 0xfffffffffffff000
mov r9d, 0xffff
and r10, rax
and r8, rax
xor edi, edi
mov rcx, qword [0x1003fe198]
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 0x1002fa6e2
movabs rax, 0x8000800080008001
mov qword [0x1003fe198], rcx
mul rdi
shr rdx, 0xf
mov rax, qword [rsp + 0x78]
mov qword [rax + 0x98], r10
imul rdx, rdx, 0xffff
sub rdi, rdx
inc rdi
mov qword [rax + 0xb0], rdi
mov qword [rsp + 0x78], r9
jmp 0x1002fa77e
xor r11d, r11d
test ecx, ecx
jns 0x1002fa44d
neg ecx
shl ecx, 3
shr esi, cl
shl esi, cl
jmp 0x1002fa44d
mov dword [rsp + 0x50], esi
mov ebx, esi
not ebx
xor esi, esi
jmp 0x1002fa457
mov rax, qword [rsp + 0x78]
mov qword [r12], rax
add r12, 8
cmp r12, r8
jb 0x1002fa771
jmp 0x1002fa8a1
mov rbx, rbp
lea r15, [0x100000000]
mov rsi, r15
mov r13, qword [rsp + 0x80]
mov rax, qword [0x10014dad0]
sub rbx, r13
sub rsi, rax
jne 0x1002fa7b5
test rbx, rbx
je 0x1002fa88e
mov rcx, qword [0x100019a28]
mov r11, r13
xor edi, edi
sub r11, rbp
lea r8d, [rcx - 1]
sub ebp, r15d
test r8d, r8d
lea r12d, [r14 + rbp]
lea r14, [0x100000000]
js 0x1002fa80b
lea eax, [r8 + rdi]
cdq
sub eax, edx
sar eax, 1
movsxd rdx, eax
mov r9d, dword [r14 + rdx*4 + 0x19a2c]
and r9d, 0xfffffff
cmp ebp, r9d
jae 0x1002fa801
lea r8d, [rax - 1]
jmp 0x1002fa806
jbe 0x1002fa810
lea edi, [rax + 1]
cmp r8d, edi
jge 0x1002fa7db
movsxd r10, edi
jmp 0x1002fa887
movsxd r10, eax
jmp 0x1002fa887
mov edx, dword [r14 + r10*4 + 0x19a2c]
mov eax, edx
and eax, 0xfffffff
cmp eax, r12d
jae 0x1002fa88e
mov edi, edx
mov r8, rdx
sar edx, 0x1e
shl edi, 2
and r8d, 0xfffffff
and edx, 3
sar edi, 0x1e
add r8, r15
xor r9d, r9d
and edi, 3
sub edi, 1
je 0x1002fa863
sub edi, 1
je 0x1002fa85e
cmp edi, 1
jne 0x1002fa869
mov r9, rsi
jmp 0x1002fa869
mov r9, rbx
jmp 0x1002fa869
mov r9, rsi
sub r9, rbx
sub edx, 2
je 0x1002fa879
cmp edx, 1
jne 0x1002fa884
add qword [r8 + r11], r9
jmp 0x1002fa87d
add dword [r8 + r11], r9d
mov rcx, qword [0x100019a28]
inc r10
mov eax, ecx
cmp r10, rax
jb 0x1002fa815
mov eax, dword [0x100015964]
mov eax, 0x9e5b6468
mov r11, qword [rsp + 0x90]
mov qword [r11 + 0x10], r13
mov rcx, qword [rsp + 0xb8]
xor rcx, rsp
call fcn.1003005f0
mov rbx, qword [rsp + 0x110]
add rsp, 0xc0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret