Function at 0x1002b57e8
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 [0x100347ae0]
xor rax, rsp
mov qword [rsp + 0xb8], rax
lea rax, [0x100000000]
lea r12, [rcx + 0x18]
lea r11, [0x100000000]
mov qword [rsp + 0x80], rdx
mov qword [rsp + 0x98], rcx
mov ecx, 0xfffffff
mov r14, qword [r12]
mov ebp, dword [r14 + 5]
mov edx, dword [r14 + 1]
and rdx, rcx
mov qword [rsp + 0x88], r12
and rbp, rcx
add rbp, rax
mov eax, dword [0x1000d5e38]
mov rcx, rax
mov qword [rsp + 0xa0], rbp
lea rsi, [rax + rdx - 1]
mov rax, rsi
xor edx, edx
div rcx
mov eax, dword [0x1000d5e38]
sub rsi, rdx
xor r15d, r15d
mov eax, dword [0x1000d5e38]
mov eax, dword [0x100172988]
cmp eax, r15d
mov r10d, dword [0x100172988]
je 0x1002b5931
mov r8, r15
mov rax, r15
mov edi, dword [0x100172988]
dec edi
inc rdi
mov r9, rdi
cmp rdi, r15
je 0x1002b58ea
mov rcx, qword [0x100346e50]
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
cmp r9, r15
jne 0x1002b58bb
mov qword [0x100346e50], rcx
xor edx, edx
div rdi
cmp r10, r15
jbe 0x1002b5925
mov ecx, 0xffff349a
mov eax, 0xcb65
inc r8
lock cmpxchg dword [r11 + rdx*4 + 0x349c90], ecx
je 0x1002b5bee
mov ecx, dword [0x100172988]
lea rax, [rdx + 1]
xor edx, edx
div rcx
cmp r8, r10
jb 0x1002b58f4
mov rbx, r15
cmp rbx, r15
jne 0x1002b5a64
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rdi, r15
mov r13d, eax
mov rax, r15
mov rcx, qword [0x100348890]
mov r9, rcx
inc rdi
cmp rcx, r15
mov r8, rcx
je 0x1002b598b
mov rcx, qword [0x100346e50]
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
cmp r9, r15
jne 0x1002b595c
mov qword [0x100346e50], rcx
xor edx, edx
mov r9d, 0x40
div r8
mov r8d, 0x3000
mov rcx, rdx
shl rcx, 0x10
mov rdx, rsi
add rcx, qword [0x1003475b0]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rbx, rax
cmp rax, r15
je 0x1002b59f8
mov qword [rsp + 0x28], r15
mov rcx, rax
mov rdx, rax
mov r8d, esi
or rcx, 3
lea r9, [0x1002af874]
mov qword [rsp + 0x20], r15
call qword [sym.imp.ntdll.dll_RtlInstallFunctionTableCallback]
movzx edx, al
cmp edx, r15d
jne 0x1002b5a0d
xor edx, edx
mov rcx, rbx
mov r8d, 0x8000
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
cmp rdi, 0x11
jb 0x1002b593d
mov rbx, r15
cmp rbx, 0x10000
jb 0x1002b5a1b
test bl, 3
je 0x1002b5a41
cmp rbx, r15
je 0x1002b5a3e
mov rcx, rbx
or rcx, 3
call qword [sym.imp.ntdll.dll_RtlDeleteFunctionTable]
mov rcx, rbx
mov r8d, 0x8000
xor edx, edx
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rbx, r15
mov ecx, r13d
call qword [sym.imp.KERNEL32.dll_SetLastError]
cmp rbx, r15
lea r11, [0x100000000]
je 0x1002b587f
xor eax, eax
mov rcx, rsi
mov rdi, rbx
rep stosb byte [rdi], al
mov eax, 0x27d01898
add qword [r12], 9
lea r13, [0x100000000]
mov r8d, dword [0x1000d5e38]
mov rax, r15
mov esi, ebp
mov r14d, dword [r14 + 1]
and r14d, 0xfffffff
sub r8, r14
inc r8
mov rdi, r8
mov qword [rsp + 0x90], r14
sub esi, r13d
cmp r8, r15
mov dword [rsp + 0x3c], esi
je 0x1002b5adf
mov rcx, qword [0x100346e50]
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
cmp rdi, r15
jne 0x1002b5ab0
mov qword [0x100346e50], rcx
mov ecx, esi
xor edx, edx
div r8
add rbx, rdx
mov qword [rsp + 0x70], rbx
mov rdx, r14
mov r8, rbx
mov eax, 0xce613332
mov dil, r15b
lea rcx, [rsp + 0x78]
mov rdx, qword [r14 + rbp]
mov qword [rsp + 0x78], rdx
mov eax, 0xad2223a8
mov r9d, dword [rsp + 0x7c]
mov rcx, r13
mov eax, 0xfffffff
mov r11, qword [rsp + 0x78]
and r11, rax
and r9, rax
add r11, r13
mov rax, qword [0x100037580]
sub rcx, rax
mov qword [rsp + 0x48], r15
mov r15d, 4
mov qword [rsp + 0x30], rcx
jne 0x1002b5c05
xor r10d, r10d
test r9, r9
je 0x1002b5fbf
mov r13d, 0xed08cdd6
mov ecx, dword [rsp + 0x4c]
mov r8d, dword [rsp + 0x48]
movzx eax, byte [r10 + r11]
inc r10
sub eax, 0x12f7322a
add r8d, eax
add eax, ecx
imul rax, r13
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 eax, eax, 0xed08cdd6
ror eax, 0xf
imul rax, r13
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 ecx, edx
sar ecx, 0x1f
btr ecx, 0x1f
add ecx, edx
add r8d, ecx
cmp r10, r9
jb 0x1002b5b65
mov dword [rsp + 0x4c], ecx
mov dword [rsp + 0x48], r8d
jmp 0x1002b5fbf
mov ecx, dword [0x1000d5e38]
imul rcx, rdx
lea rbx, [rcx + r11 + 0x313000]
jmp 0x1002b5928
mov rsi, 0xfffffffffffff000
lea rax, [r11 + r9]
movsxd rcx, dword [0x10000003c]
mov edx, dword [rcx + r13 + 0xb4]
mov r8d, dword [rcx + r13 + 0xb0]
add r8, r13
mov qword [rsp + 0xa8], rax
mov eax, r11d
sub eax, r13d
mov r10d, eax
mov ebx, eax
add rax, r9
mov rcx, rax
and r10, rsi
and rcx, rsi
sub rbx, r10
mov qword [rsp + 0x40], rcx
sub rax, rcx
add rdx, r8
mov qword [rsp + 0x60], rdx
mov qword [rsp + 0x50], rax
jmp 0x1002b5c72
mov eax, dword [r8]
cmp rax, r10
jae 0x1002b5c77
mov eax, dword [r8 + 4]
add r8, rax
cmp r8, rdx
jne 0x1002b5c63
xor esi, esi
cmp r8, rdx
je 0x1002b5cba
mov eax, dword [r8]
cmp rax, r10
jne 0x1002b5cba
mov ecx, dword [r8 + 4]
sub rcx, 8
shr rcx, 1
je 0x1002b5cb5
lea rdx, [r8 + 8]
movzx eax, word [rdx]
and eax, 0xfff
cmp rax, rbx
jae 0x1002b5cb0
inc rsi
add rdx, 2
cmp rsi, rcx
jne 0x1002b5c97
mov rdx, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x40]
mov r9d, dword [rsp + 0x4c]
mov r14, qword [rsp + 0x30]
lea rbp, [0x100000000]
mov r13d, 0xed08cdd6
mov ebx, dword [rsp + 0x48]
cmp r8, rdx
je 0x1002b5eff
mov eax, dword [r8]
cmp rax, rcx
ja 0x1002b5eff
mov edi, dword [r8 + 4]
lea rax, [rdi - 8]
shr rax, 1
cmp rsi, rax
jne 0x1002b5d16
add r8, rdi
cmp r8, rdx
je 0x1002b5eff
mov eax, dword [r8]
cmp rax, rcx
ja 0x1002b5eff
xor esi, esi
jmp 0x1002b5cea
mov eax, dword [r8]
cmp rax, rcx
jne 0x1002b5d34
movzx eax, word [r8 + rsi*2 + 8]
and eax, 0xfff
cmp rax, qword [rsp + 0x50]
jae 0x1002b5eff
mov rax, rsi
inc rsi
mov edi, 0xf000
test word [r8 + rax*2 + 8], di
je 0x1002b5cd5
xor r12d, r12d
movzx r10d, word [r8 + rax*2 + 8]
mov eax, r10d
and eax, 0xfff
add eax, dword [r8]
add rax, rbp
mov rcx, rax
mov qword [rsp + 0x68], rax
sub rcx, r11
je 0x1002b5dff
mov rdi, rcx
movzx eax, byte [r11 + r12]
inc r12
sub eax, 0x12f7322a
add ebx, eax
add eax, r9d
imul rax, r13
mov qword [rsp + 0x58], rax
mov ecx, dword [rsp + 0x58]
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 eax, eax, 0xed08cdd6
ror eax, 0xf
imul rax, r13
mov qword [rsp + 0x58], rax
shr rax, 0x20
mov ecx, dword [rsp + 0x58]
lea edx, [rcx + rax*2 - 0x7fffffff]
sar ecx, 0x1f
btr ecx, 0x1f
sub edx, ecx
mov r9d, edx
sar r9d, 0x1f
btr r9d, 0x1f
add r9d, edx
add ebx, r9d
cmp r12, rdi
jb 0x1002b5d72
mov rax, qword [rsp + 0x68]
mov dword [rsp + 0x4c], r9d
mov dword [rsp + 0x48], ebx
mov rax, qword [rax]
mov qword [rsp + 0x58], rax
shr r10d, 0xc
cmp r10d, 3
je 0x1002b5e1f
sub r10d, 0xa
neg r10d
sbb edx, edx
add edx, 3
jmp 0x1002b5e24
mov edx, 2
mov r10, r14
neg r10
sub edx, 2
je 0x1002b5e4a
cmp edx, 1
je 0x1002b5e3a
or r10, 0xffffffffffffffff
jmp 0x1002b5e52
add rax, r10
mov r10d, 8
mov qword [rsp + 0x58], rax
jmp 0x1002b5e52
add dword [rsp + 0x58], r10d
mov r10, r15
xor r11d, r11d
test r10, r10
je 0x1002b5ee7
movzx eax, byte [rsp + r11 + 0x58]
inc r11
sub eax, 0x12f7322a
add ebx, eax
add eax, r9d
imul rax, r13
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 eax, eax, 0xed08cdd6
ror eax, 0xf
imul rax, r13
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 r9d, edx
sar r9d, 0x1f
btr r9d, 0x1f
add r9d, edx
add ebx, r9d
cmp r11, r10
jb 0x1002b5e5e
mov dword [rsp + 0x4c], r9d
mov dword [rsp + 0x48], ebx
mov rdx, qword [rsp + 0x60]
mov rax, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x40]
lea r11, [r10 + rax]
jmp 0x1002b5cd5
mov r14, qword [rsp + 0x90]
mov r12, qword [rsp + 0x88]
xor r8d, r8d
mov r10, qword [rsp + 0xa8]
mov dil, r8b
sub r10, r11
mov rbp, qword [rsp + 0xa0]
je 0x1002b5fb6
movzx eax, byte [r8 + r11]
inc r8
sub eax, 0x12f7322a
add ebx, eax
add eax, r9d
imul rax, r13
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 eax, eax, 0xed08cdd6
ror eax, 0xf
imul rax, r13
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 r9d, edx
sar r9d, 0x1f
btr r9d, 0x1f
add r9d, edx
add ebx, r9d
cmp r8, r10
jb 0x1002b5f2e
mov dword [rsp + 0x4c], r9d
mov dword [rsp + 0x48], ebx
mov esi, dword [rsp + 0x3c]
mov rbx, qword [rsp + 0x70]
xor ecx, ecx
mov rax, rcx
inc rcx
and eax, 7
cmp rcx, 8
mov al, byte [rsp + rax + 0x48]
mov byte [rsp + rcx + 0xaf], al
jb 0x1002b5fc1
mov eax, 0xa3d7d146
mov r13, r14
mov r11, rbx
and r13d, 7
mov rax, qword [rsp + 0xb0]
mov r10, rbp
mov qword [rsp + 0x40], rbp
mov qword [rsp + 0x30], rbx
je 0x1002b6495
xor r8d, r8d
mov ebx, esi
xor esi, esi
not ebx
mov dword [rsp + 0x60], esi
mov dword [rsp + 0x50], r8d
xor r11d, r11d
test r13d, r13d
jle 0x1002b605b
lea r9d, [r8 + 0x38]
movzx edx, byte [r10]
cmp r11d, r15d
jge 0x1002b6036
lea ecx, [r9 - 0x20]
shl edx, cl
or esi, edx
jmp 0x1002b603e
mov ecx, r9d
shl edx, cl
or r8d, edx
inc r11d
inc r10
sub r9d, 8
cmp r11d, r13d
jl 0x1002b6023
mov dword [rsp + 0x60], esi
mov dword [rsp + 0x50], r8d
mov qword [rsp + 0x40], r10
mov ecx, eax
mov edx, dword [rsp + 0xb4]
mov esi, ebx
movzx r8d, ax
movzx r11d, dx
movzx r10d, word [rsp + 0xb2]
movzx r9d, word [rsp + 0xb6]
xor ecx, ebx
ror ecx, 1
ror esi, 8
imul ecx, r11d
xor esi, ecx
xor esi, dword [rsp + 0x3c]
add edx, esi
mov ecx, esi
ror edx, 0xc
ror ecx, 0xa
imul edx, r10d
add ecx, edx
xor ebx, ecx
mov ecx, ebx
mov edx, ebx
xor edx, r9d
rol edx, 2
ror ecx, 0x10
imul edx, r8d
xor ecx, edx
xor esi, ecx
mov edx, eax
xor edx, esi
mov ecx, esi
rol edx, 8
rol ecx, 6
imul edx, r9d
add ecx, edx
xor ebx, ecx
mov edx, ebx
mov ecx, ebx
xor ecx, r10d
ror edx, 6
imul ecx, r11d
add edx, ecx
xor esi, edx
mov edx, esi
sub edx, dword [rsp + 0xb4]
mov ecx, esi
ror edx, 5
ror ecx, 0xb
imul edx, r10d
xor ecx, edx
xor ebx, ecx
mov edx, ebx
mov ecx, ebx
shr ecx, 0xf
xor edx, r11d
imul edx, r8d
add edx, ecx
xor esi, edx
mov ecx, esi
sub ecx, eax
sub ecx, r9d
xor ebx, ecx
mov edx, ebx
mov ecx, ebx
sub edx, eax
ror edx, 0xe
rol ecx, 1
imul edx, r11d
add ecx, edx
xor esi, ecx
mov ecx, esi
not ecx
ror ecx, 0xd
add ecx, r10d
imul ecx, r11d
xor ebx, ecx
mov edx, ebx
mov ecx, ebx
sub edx, r9d
rol edx, 4
imul edx, r8d
xor ebx, dword [rsp + 0x50]
shr ecx, 0xc
xor r9d, r9d
xor edx, ecx
mov ecx, dword [rsp + 0x60]
xor edx, ecx
xor esi, edx
mov ecx, esi
test r13d, r13d
mov edx, ebx
jle 0x1002b6191
mov r8, qword [rsp + 0x30]
cmp r9d, r15d
jge 0x1002b6178
rol ecx, 8
mov byte [r8], cl
inc r8
xor dil, cl
jmp 0x1002b6184
rol edx, 8
mov byte [r8], dl
inc r8
xor dil, dl
inc r9d
cmp r9d, r13d
jl 0x1002b6165
mov qword [rsp + 0x30], r8
lea ecx, [r13 - 4]
test ecx, ecx
jle 0x1002b647d
sub r15d, ecx
shl r15d, 3
mov ecx, r15d
shr ebx, cl
shl ebx, cl
mov r13d, dword [rsp + 0x50]
mov r10, qword [rsp + 0x40]
mov r11, qword [rsp + 0x30]
mov r15, r14
shr r15, 3
test r15, r15
je 0x1002b63c2
movzx ecx, word [rsp + 0xb2]
mov r12d, dword [rsp + 0x60]
mov r14d, dword [rsp + 0xb4]
mov dword [rsp + 0x3c], ecx
movzx ecx, r14w
mov dword [rsp + 0x50], ecx
movzx ecx, word [rsp + 0xb6]
mov dword [rsp + 0x68], ecx
neg ecx
mov dword [rsp + 0x30], ecx
movzx ecx, ax
mov ebp, dword [rsp + 0x30]
mov dword [rsp + 0x40], ecx
mov edx, eax
movzx r9d, byte [r10 + 1]
movzx r8d, byte [r10 + 4]
movzx ecx, byte [r10]
shl ecx, 8
shl r8d, 8
add r10, 8
or r9d, ecx
movzx ecx, byte [r10 - 6]
shl r9d, 8
or r9d, ecx
movzx ecx, byte [r10 - 5]
shl r9d, 8
or r9d, ecx
movzx ecx, byte [r10 - 3]
or r8d, ecx
shl r8d, 8
movzx ecx, byte [r10 - 2]
or r8d, ecx
shl r8d, 8
movzx ecx, byte [r10 - 1]
or r8d, ecx
xor ebx, r8d
mov ecx, ebx
xor edx, ebx
ror edx, 1
ror ecx, 8
imul edx, dword [rsp + 0x50]
xor ecx, edx
xor ecx, r9d
xor esi, ecx
mov ecx, esi
lea edx, [r14 + rsi]
ror edx, 0xc
ror ecx, 0xa
imul edx, dword [rsp + 0x3c]
add ecx, edx
xor ebx, ecx
mov edx, ebx
xor edx, dword [rsp + 0x68]
mov ecx, ebx
rol edx, 2
ror ecx, 0x10
imul edx, dword [rsp + 0x40]
xor ecx, edx
mov edx, eax
xor esi, ecx
xor edx, esi
mov ecx, esi
rol edx, 8
rol ecx, 6
imul edx, dword [rsp + 0x68]
add ecx, edx
xor ebx, ecx
mov ecx, ebx
mov edx, ebx
xor ecx, dword [rsp + 0x3c]
ror edx, 6
imul ecx, dword [rsp + 0x50]
add edx, ecx
xor esi, edx
mov edx, esi
sub edx, r14d
mov ecx, esi
ror edx, 5
ror ecx, 0xb
imul edx, dword [rsp + 0x3c]
xor ecx, edx
xor ebx, ecx
mov ecx, ebx
mov edx, ebx
xor edx, dword [rsp + 0x50]
shr ecx, 0xf
imul edx, dword [rsp + 0x40]
add edx, ecx
xor esi, edx
mov ecx, esi
sub ecx, eax
sub ecx, dword [rsp + 0x68]
xor ebx, ecx
mov ecx, ebx
mov edx, ebx
sub edx, eax
ror edx, 0xe
rol ecx, 1
imul edx, dword [rsp + 0x50]
add ecx, edx
xor esi, ecx
movzx edx, word [rsp + 0xb2]
mov ecx, esi
not ecx
ror ecx, 0xd
add ecx, edx
imul ecx, dword [rsp + 0x50]
xor ebx, ecx
mov ecx, ebx
shr ecx, 0xc
lea edx, [rbx + rbp]
xor ebx, r13d
rol edx, 4
mov r13d, r8d
mov byte [r11 + 7], bl
imul edx, dword [rsp + 0x40]
xor edx, ecx
xor edx, r12d
xor esi, edx
xor dil, sil
mov byte [r11 + 3], sil
mov r12d, r9d
ror esi, 8
mov byte [r11 + 2], sil
xor dil, bl
ror ebx, 8
xor dil, sil
mov byte [r11 + 6], bl
ror esi, 8
mov byte [r11 + 1], sil
xor dil, bl
ror ebx, 8
xor dil, sil
mov byte [r11 + 5], bl
ror esi, 8
mov byte [r11], sil
xor dil, bl
ror ebx, 8
mov byte [r11 + 4], bl
add r11, 8
mov cl, bl
xor cl, sil
xor dil, cl
ror esi, 8
ror ebx, 8
sub r15, 1
jne 0x1002b6208
mov r12, qword [rsp + 0x88]
mov rbp, qword [rsp + 0xa0]
mov r14, qword [rsp + 0x90]
cmp dil, byte [r14 + rbp + 8]
je 0x1002b64c2
call fcn.1000de678
mov r10, rax
and r12, 0xfffffffffffffff8
mov r9d, 0xffff
mov rax, 0xfffffffffffff000
mov r11, qword [rsp + 0x98]
lea r8, [r12 + 0xfff]
and r10, rax
lea r13, [0x100046aec]
mov qword [r11 + 0x10], r13
and r8, rax
xor edi, edi
mov rcx, qword [0x100346e50]
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 0x1002b6410
mov qword [0x100346e50], rcx
movabs rax, 0x8000800080008001
mul rdi
shr rdx, 0xf
mov rax, qword [rsp + 0x80]
mov qword [rax + 0x98], r10
imul rdx, rdx, 0xffff
sub rdi, rdx
inc rdi
mov qword [rax + 0xb0], rdi
mov qword [rsp + 0x80], r9
jmp 0x1002b64b8
xor ebx, ebx
test ecx, ecx
jns 0x1002b61ab
neg ecx
shl ecx, 3
shr esi, cl
shl esi, cl
jmp 0x1002b61ab
mov dword [rsp + 0x60], esi
mov r13d, esi
xor ebx, ebx
xor esi, esi
not r13d
jmp 0x1002b61ba
mov rax, qword [rsp + 0x80]
mov qword [r12], rax
add r12, 8
cmp r12, r8
jb 0x1002b64a8
jmp 0x1002b65d8
mov rax, qword [0x100037580]
mov rbx, rbp
lea r15, [0x100000000]
mov r13, qword [rsp + 0x70]
mov rsi, r15
sub rbx, r13
sub rsi, rax
jne 0x1002b64ec
test rbx, rbx
je 0x1002b65c5
xor edi, edi
mov r11, r13
mov rcx, qword [0x100021bc8]
lea r8d, [rcx - 1]
sub r11, rbp
sub ebp, r15d
test r8d, r8d
lea r12d, [r14 + rbp]
lea r14, [0x100000000]
js 0x1002b6542
lea eax, [r8 + rdi]
cdq
sub eax, edx
sar eax, 1
movsxd rdx, eax
mov r9d, dword [r14 + rdx*4 + 0x21bcc]
and r9d, 0xfffffff
cmp ebp, r9d
jae 0x1002b6538
lea r8d, [rax - 1]
jmp 0x1002b653d
jbe 0x1002b6547
lea edi, [rax + 1]
cmp r8d, edi
jge 0x1002b6512
movsxd r10, edi
jmp 0x1002b65be
movsxd r10, eax
jmp 0x1002b65be
mov edx, dword [r14 + r10*4 + 0x21bcc]
mov eax, edx
and eax, 0xfffffff
cmp eax, r12d
jae 0x1002b65c5
mov r8, rdx
mov edi, edx
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 0x1002b659a
sub edi, 1
je 0x1002b6595
cmp edi, 1
jne 0x1002b65a0
mov r9, rsi
jmp 0x1002b65a0
mov r9, rbx
jmp 0x1002b65a0
mov r9, rsi
sub r9, rbx
sub edx, 2
je 0x1002b65b0
cmp edx, 1
jne 0x1002b65bb
add qword [r8 + r11], r9
jmp 0x1002b65b4
add dword [r8 + r11], r9d
mov rcx, qword [0x100021bc8]
inc r10
mov eax, ecx
cmp r10, rax
jb 0x1002b654c
mov eax, dword [0x1000d5e38]
mov eax, 0x35e63036
mov r11, qword [rsp + 0x98]
mov qword [r11 + 0x10], r13
mov rcx, qword [rsp + 0xb8]
xor rcx, rsp
call fcn.1002edf64
mov rbx, qword [rsp + 0x110]
add rsp, 0xc0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret