Function at 0x1002be228
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 [0x1004c4740]
xor rax, rsp
mov qword [rsp + 0xb0], rax
mov r12, qword [rcx + 0x10]
mov r14d, 0x8000
lea r11, [0x100000000]
mov eax, dword [0x1002f8888]
mov r15d, 0x269ec3
mov r13d, 0xfffffff
mov qword [rsp + 0x80], rdx
mov edx, dword [r12 + 5]
and rdx, r13
lea rsi, [rax + rdx - 1]
xor edx, edx
mov qword [rsp + 0x98], rcx
mov rcx, rax
mov rax, rsi
div rcx
mov eax, dword [0x1002f8888]
sub rsi, rdx
mov r10d, dword [0x1002a02b4]
mov eax, dword [0x1002f8888]
mov eax, dword [0x1002a02b4]
test eax, eax
je 0x1002be34d
mov edi, dword [0x1002a02b4]
xor r8d, r8d
xor eax, eax
dec edi
inc rdi
mov r9, rdi
je 0x1002be307
mov rcx, qword [0x1004c43a0]
imul rcx, rcx, 0x343fd
shl rax, 0x10
shr r9, 0x10
add rcx, r15
mov rdx, rcx
shr rdx, 0x10
movzx edx, dx
or rax, rdx
test r9, r9
jne 0x1002be2dc
mov qword [0x1004c43a0], rcx
xor edx, edx
div rdi
test r10, r10
je 0x1002be342
mov ecx, 0xffffc428
inc r8
mov eax, 0x3bd7
lock cmpxchg dword [r11 + rdx*4 + 0x4c5a60], ecx
je 0x1002be608
mov ecx, dword [0x1002a02b4]
lea rax, [rdx + 1]
xor edx, edx
div rcx
cmp r8, r10
jb 0x1002be311
xor ebx, ebx
test rbx, rbx
jne 0x1002be46e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
xor edi, edi
inc rdi
xor eax, eax
mov rcx, qword [0x1004c4380]
test rcx, rcx
mov r8, rcx
mov r9, rcx
je 0x1002be3a0
mov rcx, qword [0x1004c43a0]
imul rcx, rcx, 0x343fd
shl rax, 0x10
shr r9, 0x10
add rcx, r15
mov rdx, rcx
shr rdx, 0x10
movzx edx, dx
or rax, rdx
test r9, r9
jne 0x1002be375
mov qword [0x1004c43a0], rcx
xor edx, edx
mov r9d, 0x40
div r8
mov r8d, 0x3000
mov rcx, rdx
mov rdx, rsi
shl rcx, 0x10
add rcx, qword [0x1004c4308]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
test rax, rax
mov rbx, rax
je 0x1002be408
lea r9, [0x100435424]
mov rcx, rax
mov r8d, esi
mov rdx, rax
and qword [rsp + 0x28], 0
and qword [rsp + 0x20], 0
or rcx, 3
call qword [sym.imp.ntdll.dll_RtlInstallFunctionTableCallback]
test al, al
jne 0x1002be41c
mov rcx, rbx
mov r8d, r14d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
cmp rdi, 0x11
jb 0x1002be357
xor ebx, ebx
cmp rbx, 0x10000
jb 0x1002be42a
test bl, 3
je 0x1002be44c
test rbx, rbx
je 0x1002be44a
mov rcx, rbx
or rcx, 3
call qword [sym.imp.ntdll.dll_RtlDeleteFunctionTable]
xor edx, edx
mov rcx, rbx
mov r8d, r14d
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor ebx, ebx
mov ecx, ebp
call qword [sym.imp.KERNEL32.dll_SetLastError]
test rbx, rbx
lea r11, [0x100000000]
je 0x1002be2a5
mov rdi, rbx
mov rcx, rsi
xor eax, eax
rep stosb byte [rdi], al
mov eax, 0x900ee6ee
mov r14d, dword [r12 + 5]
and r14, r13
mov r8d, dword [0x1002f8888]
mov edx, dword [r12 + 1]
mov qword [rsp + 0xa0], r14
and edx, 7
sub r8, r14
xor eax, eax
lea rbp, [rdx + r12 + 9]
mov esi, ebp
mov qword [rsp + 0x90], rbp
lea r12, [0x100000000]
sub esi, r12d
mov dword [rsp + 0x38], esi
inc r8
mov rdi, r8
je 0x1002be4ee
mov rcx, qword [0x1004c43a0]
imul rcx, rcx, 0x343fd
shl rax, 0x10
shr rdi, 0x10
add rcx, r15
mov rdx, rcx
shr rdx, 0x10
movzx edx, dx
or rax, rdx
test rdi, rdi
jne 0x1002be4c3
mov qword [0x1004c43a0], rcx
mov ecx, esi
xor edx, edx
div r8
add rbx, rdx
mov rdx, r14
mov qword [rsp + 0x88], rbx
mov r8, rbx
mov eax, 0x5f2ecfa7
mov rdx, qword [r14 + rbp]
lea rcx, [rsp + 0x78]
xor dil, dil
mov qword [rsp + 0x78], rdx
mov eax, 0xe8d054a1
mov rax, qword [0x1000487b8]
mov r11, qword [rsp + 0x78]
mov rcx, r12
mov r9d, dword [rsp + 0x7c]
and qword [rsp + 0x40], 0
and r11, r13
and r9, r13
add r11, r12
mov r13d, 4
sub rcx, rax
mov qword [rsp + 0x30], rcx
jne 0x1002be61f
xor r10d, r10d
test r9, r9
je 0x1002be9e9
mov eax, dword [rsp + 0x44]
mov r12d, 0xf7df258b
mov r8d, dword [rsp + 0x40]
movzx ecx, byte [r11 + r10]
inc r10
sub ecx, 0x820da75
add r8d, ecx
add ecx, eax
mov eax, ecx
imul eax, eax, 0xa5eb
rol eax, 0xb
ror ecx, 0xb
xor eax, ecx
imul rax, r12
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, r12
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
add r8d, eax
cmp r10, r9
jb 0x1002be573
mov dword [rsp + 0x44], eax
mov dword [rsp + 0x40], r8d
jmp 0x1002be9e9
mov ecx, dword [0x1002f8888]
imul rcx, rdx
lea rbx, [rcx + r11 + 0x454000]
jmp 0x1002be344
lea rax, [r11 + r9]
movsxd rcx, dword [0x10000003c]
mov edx, dword [rcx + r12 + 0xb4]
mov r8d, dword [rcx + r12 + 0xb0]
add r8, r12
mov qword [rsp + 0x60], rax
mov eax, r11d
sub eax, r12d
mov ebx, eax
mov r10d, eax
lea r15, [rax + r9]
mov rcx, r15
and r10, 0xfffffffffffff000
sub rbx, r10
and rcx, 0xfffffffffffff000
mov qword [rsp + 0x68], rcx
sub r15, rcx
add rdx, r8
mov qword [rsp + 0x70], rdx
mov qword [rsp + 0x58], r15
jmp 0x1002be68b
mov eax, dword [r8]
cmp rax, r10
jae 0x1002be690
mov eax, dword [r8 + 4]
add r8, rax
cmp r8, rdx
jne 0x1002be67c
xor esi, esi
cmp r8, rdx
je 0x1002be6d3
mov eax, dword [r8]
cmp rax, r10
jne 0x1002be6d3
mov ecx, dword [r8 + 4]
sub rcx, 8
shr rcx, 1
je 0x1002be6ce
lea rdx, [r8 + 8]
movzx eax, word [rdx]
and eax, 0xfff
cmp rax, rbx
jae 0x1002be6c9
inc rsi
add rdx, 2
cmp rsi, rcx
jne 0x1002be6b0
mov rdx, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x68]
mov r12d, 0xf7df258b
mov ebx, dword [rsp + 0x40]
mov r14, qword [rsp + 0x30]
mov r9d, dword [rsp + 0x44]
cmp r8, rdx
je 0x1002be925
mov eax, dword [r8]
cmp rax, rcx
ja 0x1002be925
mov edi, dword [r8 + 4]
lea rax, [rdi - 8]
shr rax, 1
cmp rsi, rax
jne 0x1002be728
add r8, rdi
cmp r8, rdx
je 0x1002be925
mov eax, dword [r8]
cmp rax, rcx
ja 0x1002be925
xor esi, esi
jmp 0x1002be6fc
mov eax, dword [r8]
cmp rax, rcx
jne 0x1002be744
movzx eax, word [r8 + rsi*2 + 8]
and eax, 0xfff
cmp rax, r15
jae 0x1002be925
mov edi, 0xf000
mov rax, rsi
inc rsi
test word [r8 + rax*2 + 8], di
je 0x1002be6e7
xor ebp, ebp
movzx r10d, word [r8 + rax*2 + 8]
lea rax, [0x100000000]
mov r15d, r10d
and r15d, 0xfff
add r15d, dword [r8]
add r15, rax
mov rax, r15
sub rax, r11
je 0x1002be819
mov rdi, rax
movzx ecx, byte [r11 + rbp]
inc rbp
sub ecx, 0x820da75
add ebx, ecx
add ecx, r9d
mov eax, ecx
imul eax, eax, 0xa5eb
rol eax, 0xb
ror ecx, 0xb
xor eax, ecx
imul rax, r12
mov qword [rsp + 0x48], rax
shr rax, 0x20
mov ecx, dword [rsp + 0x48]
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, r12
mov qword [rsp + 0x48], rax
shr rax, 0x20
mov ecx, dword [rsp + 0x48]
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 rbp, rdi
jb 0x1002be785
mov dword [rsp + 0x44], r9d
mov dword [rsp + 0x40], ebx
shr r10d, 0xc
cmp r10d, 3
mov rax, qword [r15]
mov qword [rsp + 0x48], rax
je 0x1002be839
sub r10d, 0xa
neg r10d
sbb edx, edx
add edx, 3
jmp 0x1002be83e
mov edx, 2
mov r10, r14
neg r10
sub edx, 2
je 0x1002be864
cmp edx, 1
je 0x1002be854
or r10, 0xffffffffffffffff
jmp 0x1002be86c
add rax, r10
mov qword [rsp + 0x48], rax
mov r10d, 8
jmp 0x1002be86c
add dword [rsp + 0x48], r10d
mov r10, r13
xor r11d, r11d
test r10, r10
je 0x1002be90d
movzx ecx, byte [rsp + r11 + 0x48]
inc r11
sub ecx, 0x820da75
add ebx, ecx
add ecx, r9d
mov eax, ecx
imul eax, eax, 0xa5eb
rol eax, 0xb
ror ecx, 0xb
xor eax, ecx
imul rax, r12
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, r12
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 0x1002be878
mov dword [rsp + 0x44], r9d
mov dword [rsp + 0x40], ebx
mov rdx, qword [rsp + 0x70]
lea r11, [r10 + r15]
mov r15, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x68]
jmp 0x1002be6e7
xor r8d, r8d
mov dil, r8b
mov r10, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x90]
sub r10, r11
mov r14, qword [rsp + 0xa0]
je 0x1002be9dd
movzx ecx, byte [r11 + r8]
inc r8
sub ecx, 0x820da75
add ebx, ecx
add ecx, r9d
mov eax, ecx
imul eax, eax, 0xa5eb
rol eax, 0xb
ror ecx, 0xb
xor eax, ecx
imul rax, r12
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, r12
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 0x1002be949
mov dword [rsp + 0x44], r9d
mov dword [rsp + 0x40], ebx
mov esi, dword [rsp + 0x38]
mov rbx, qword [rsp + 0x88]
xor ecx, ecx
mov rax, rcx
inc rcx
and eax, 7
mov al, byte [rsp + rax + 0x40]
cmp rcx, 8
mov byte [rsp + rcx + 0xa7], al
jb 0x1002be9eb
mov eax, 0x63b29e88
mov r15, rbp
mov r12, r14
mov rax, qword [rsp + 0xa8]
mov qword [rsp + 0x30], rbx
xor r10d, r10d
mov r11, rbx
and r12d, 7
je 0x1002beef2
xor r8d, r8d
mov dword [rsp + 0x58], r8d
xor r11d, r11d
mov dword [rsp + 0x50], r11d
test r12d, r12d
not esi
jle 0x1002bea7d
lea r9d, [r10 + 0x38]
movzx edx, byte [r15]
cmp r10d, r13d
jge 0x1002bea5c
lea ecx, [r9 - 0x20]
shl edx, cl
or r11d, edx
jmp 0x1002bea64
mov ecx, r9d
shl edx, cl
or r8d, edx
inc r10d
inc r15
sub r9d, 8
cmp r10d, r12d
jl 0x1002bea48
mov dword [rsp + 0x50], r11d
mov dword [rsp + 0x58], r8d
movzx r9d, ax
mov edx, dword [rsp + 0x38]
movzx r10d, word [rsp + 0xae]
mov r8d, dword [rsp + 0xac]
movzx r11d, r8w
mov ecx, edx
mov ebx, eax
ror ecx, 1
xor ecx, r10d
imul ecx, r11d
xor esi, ecx
xor ebx, esi
rol ebx, 4
mov ecx, esi
rol ecx, 1
imul ebx, r11d
sub ebx, ecx
xor ebx, edx
mov ecx, ebx
lea edx, [r8 + rbx]
rol edx, 7
movzx r8d, word [rsp + 0xaa]
ror ecx, 2
imul edx, r8d
add ecx, edx
xor esi, ecx
mov edx, esi
xor edx, r8d
rol edx, 7
mov ecx, esi
ror ecx, 8
imul edx, r9d
xor ecx, edx
xor ebx, ecx
mov ecx, ebx
mov edx, ebx
sub edx, eax
rol edx, 1
rol ecx, 8
imul edx, r10d
sub edx, ecx
xor esi, edx
mov ecx, esi
mov edx, dword [rsp + 0xac]
sub ecx, r11d
xor ecx, eax
xor ebx, ecx
sub edx, ebx
mov ecx, ebx
ror edx, 0xf
rol ecx, 0xc
imul edx, r8d
mov r8d, dword [rsp + 0xac]
xor ecx, edx
xor esi, ecx
mov ecx, esi
mov edx, r8d
sub edx, esi
rol edx, 0xf
rol ecx, 2
imul edx, r9d
add ecx, edx
xor ebx, ecx
mov ecx, ebx
mov edx, ebx
sub edx, r11d
shr ecx, 0xe
imul edx, r10d
sub edx, ecx
xor esi, edx
mov edx, esi
mov ecx, esi
sub edx, r10d
shr ecx, 0xa
rol edx, 3
mov r10d, r8d
xor r10d, eax
imul edx, r11d
xor edx, ecx
xor ebx, edx
xor r10d, esi
mov esi, dword [rsp + 0x58]
xor r10d, ebx
mov ecx, r10d
mov edx, r10d
xor r10d, esi
ror edx, 9
xor ecx, r11d
imul ecx, r9d
mov r8d, r10d
xor edx, ecx
mov ecx, dword [rsp + 0x50]
xor edx, ecx
xor r9d, r9d
xor ebx, edx
test r12d, r12d
mov edx, ebx
jle 0x1002bebd0
mov rcx, qword [rsp + 0x30]
cmp r9d, r13d
jge 0x1002bebb6
rol edx, 8
mov byte [rcx], dl
inc rcx
xor dil, dl
jmp 0x1002bebc3
rol r8d, 8
mov byte [rcx], r8b
inc rcx
xor dil, r8b
inc r9d
cmp r9d, r12d
jl 0x1002beba4
mov qword [rsp + 0x30], rcx
lea ecx, [r12 - 4]
test ecx, ecx
jle 0x1002beed9
sub r13d, ecx
shl r13d, 3
mov ecx, r13d
shr r10d, cl
shl r10d, cl
mov r11, qword [rsp + 0x30]
mov r12, r14
shr r12, 3
test r12, r12
je 0x1002bee1b
movzx edx, word [rsp + 0xae]
movzx ecx, word [rsp + 0xaa]
mov r13d, dword [rsp + 0xac]
mov ebp, dword [rsp + 0x50]
mov dword [rsp + 0x70], ecx
mov dword [rsp + 0x58], edx
mov ecx, edx
neg ecx
mov dword [rsp + 0x68], ecx
mov r14d, dword [rsp + 0x68]
mov ecx, r13d
xor ecx, eax
mov dword [rsp + 0x30], ecx
movzx ecx, r13w
mov dword [rsp + 0x38], ecx
movzx ecx, ax
mov dword [rsp + 0x60], ecx
movzx r9d, byte [r15 + 1]
movzx r8d, byte [r15 + 4]
movzx ecx, byte [r15]
shl ecx, 8
shl r8d, 8
add r15, 8
or r9d, ecx
shl r9d, 8
movzx ecx, byte [r15 - 6]
or r9d, ecx
shl r9d, 8
movzx ecx, byte [r15 - 5]
or r9d, ecx
movzx ecx, byte [r15 - 3]
or r8d, ecx
xor ebx, r9d
movzx ecx, byte [r15 - 2]
shl r8d, 8
or r8d, ecx
movzx ecx, byte [r15 - 1]
shl r8d, 8
or r8d, ecx
mov ecx, ebx
ror ecx, 1
xor ecx, edx
imul ecx, dword [rsp + 0x38]
xor ecx, r8d
xor r10d, ecx
mov ecx, r10d
mov edx, eax
xor edx, r10d
rol edx, 4
rol ecx, 1
imul edx, dword [rsp + 0x38]
sub edx, ecx
xor ebx, edx
mov ecx, ebx
lea edx, [r13 + rbx]
rol edx, 7
ror ecx, 2
imul edx, dword [rsp + 0x70]
add ecx, edx
xor r10d, ecx
mov edx, r10d
movzx ecx, word [rsp + 0xaa]
xor edx, ecx
mov ecx, r10d
rol edx, 7
ror ecx, 8
imul edx, dword [rsp + 0x60]
xor ecx, edx
xor ebx, ecx
mov ecx, ebx
mov edx, ebx
sub edx, eax
rol edx, 1
rol ecx, 8
imul edx, dword [rsp + 0x58]
sub edx, ecx
xor r10d, edx
mov edx, r13d
mov ecx, r10d
sub ecx, dword [rsp + 0x38]
xor ecx, eax
xor ebx, ecx
sub edx, ebx
mov ecx, ebx
ror edx, 0xf
rol ecx, 0xc
imul edx, dword [rsp + 0x70]
xor ecx, edx
xor r10d, ecx
mov ecx, r10d
mov edx, r13d
sub edx, r10d
rol edx, 0xf
rol ecx, 2
imul edx, dword [rsp + 0x60]
add ecx, edx
xor ebx, ecx
mov edx, ebx
mov ecx, ebx
sub edx, dword [rsp + 0x38]
shr ecx, 0xe
imul edx, dword [rsp + 0x58]
sub edx, ecx
xor r10d, edx
mov ecx, r10d
lea edx, [r10 + r14]
shr ecx, 0xa
rol edx, 3
imul edx, dword [rsp + 0x38]
xor edx, ecx
mov ecx, dword [rsp + 0x30]
xor r10d, ecx
xor ebx, edx
xor r10d, ebx
mov edx, r10d
mov ecx, r10d
xor r10d, esi
xor ecx, dword [rsp + 0x38]
ror edx, 9
mov esi, r8d
mov byte [r11 + 7], r10b
imul ecx, dword [rsp + 0x60]
xor edx, ecx
xor edx, ebp
xor ebx, edx
xor dil, bl
mov edx, dword [rsp + 0x58]
mov ebp, r9d
mov byte [r11 + 3], bl
ror ebx, 8
xor dil, r10b
mov byte [r11 + 2], bl
ror r10d, 8
xor dil, bl
mov byte [r11 + 6], r10b
ror ebx, 8
xor dil, r10b
ror r10d, 8
mov byte [r11 + 1], bl
xor dil, bl
ror ebx, 8
mov byte [r11 + 5], r10b
xor dil, r10b
ror r10d, 8
mov cl, r10b
mov byte [r11], bl
mov byte [r11 + 4], r10b
add r11, 8
xor cl, bl
xor dil, cl
ror ebx, 8
ror r10d, 8
sub r12, 1
jne 0x1002bec4b
mov r14, qword [rsp + 0xa0]
mov rbp, qword [rsp + 0x90]
cmp dil, byte [r14 + rbp + 8]
je 0x1002bef18
call fcn.100058248
mov rbx, qword [rsp + 0x98]
mov r10d, 0xffff
lea r8, [rbx + 0x18]
mov r11, rax
lea r12, [0x1001094ec]
mov qword [rbx + 0x10], r12
mov rax, 0xfffffffffffff000
mov rcx, qword [0x1004c43a0]
and r8, 0xfffffffffffffff8
and r11, rax
lea r9, [r8 + 0xfff]
and r9, rax
xor edi, edi
imul rcx, rcx, 0x343fd
shl rdi, 0x10
shr r10, 0x10
add rcx, 0x269ec3
mov rax, rcx
shr rax, 0x10
movzx edx, ax
or rdi, rdx
test r10, r10
jne 0x1002bee6c
movabs rax, 0x8000800080008001
mul rdi
mov qword [0x1004c43a0], rcx
mov rax, qword [rsp + 0x80]
mov qword [rax + 0x98], r11
shr rdx, 0xf
imul rdx, rdx, 0xffff
sub rdi, rdx
inc rdi
mov qword [rax + 0xb0], rdi
mov qword [rsp + 0x80], r10
jmp 0x1002bef0e
xor r10d, r10d
test ecx, ecx
jns 0x1002bebed
neg ecx
shl ecx, 3
shr ebx, cl
shl ebx, cl
jmp 0x1002bebed
mov dword [rsp + 0x50], esi
not esi
xor ebx, ebx
jmp 0x1002bebf2
mov rax, qword [rsp + 0x80]
mov qword [r8], rax
add r8, 8
cmp r8, r9
jb 0x1002beeff
jmp 0x1002bf031
lea r15, [0x100000000]
mov r12, qword [rsp + 0x88]
mov rbx, rbp
sub rbx, r12
mov rsi, r15
mov rax, qword [0x1000487b8]
sub rsi, rax
jne 0x1002bef45
test rbx, rbx
je 0x1002bf01e
mov rcx, qword [0x1001d1e58]
mov r11, r12
xor edi, edi
sub r11, rbp
sub ebp, r15d
lea r8d, [rcx - 1]
test r8d, r8d
lea r13d, [r14 + rbp]
lea r14, [0x100000000]
js 0x1002bef9b
lea eax, [r8 + rdi]
cdq
sub eax, edx
sar eax, 1
movsxd rdx, eax
mov r9d, dword [r14 + rdx*4 + 0x1d1e5c]
and r9d, 0xfffffff
cmp ebp, r9d
jae 0x1002bef91
lea r8d, [rax - 1]
jmp 0x1002bef96
jbe 0x1002befa0
lea edi, [rax + 1]
cmp r8d, edi
jge 0x1002bef6b
movsxd r10, edi
jmp 0x1002bf017
movsxd r10, eax
jmp 0x1002bf017
mov edx, dword [r14 + r10*4 + 0x1d1e5c]
mov eax, edx
and eax, 0xfffffff
cmp eax, r13d
jae 0x1002bf01e
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 0x1002beff3
sub edi, 1
je 0x1002befee
cmp edi, 1
jne 0x1002beff9
mov r9, rsi
jmp 0x1002beff9
mov r9, rbx
jmp 0x1002beff9
mov r9, rsi
sub r9, rbx
sub edx, 2
je 0x1002bf009
cmp edx, 1
jne 0x1002bf014
add qword [r8 + r11], r9
jmp 0x1002bf00d
add dword [r8 + r11], r9d
mov rcx, qword [0x1001d1e58]
inc r10
mov eax, ecx
cmp r10, rax
jb 0x1002befa5
mov eax, dword [0x1002f8888]
mov eax, 0x2c0ff365
mov rbx, qword [rsp + 0x98]
mov qword [rbx + 0x10], r12
mov rcx, qword [rsp + 0xb0]
xor rcx, rsp
call fcn.10027d5f4
mov rbx, qword [rsp + 0x110]
add rsp, 0xc0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret