Function at 0x100121f34
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, 0xb0
mov rax, qword [0x100347ae0]
xor rax, rsp
mov qword [rsp + 0xa8], rax
mov eax, dword [0x1000d5e38]
mov r14d, 0xfffffff
mov r13d, 0x8000
mov r15d, 0x269ec3
lea r11, [0x100000000]
mov r12, qword [rcx + 0x10]
mov qword [rsp + 0x70], rdx
mov edx, dword [r12 + 1]
mov qword [rsp + 0x88], rcx
shr rdx, 2
mov rcx, rax
and rdx, r14
lea rsi, [rax + rdx - 1]
xor edx, edx
mov rax, rsi
div rcx
sub rsi, rdx
mov eax, dword [0x1000d5e38]
mov eax, dword [0x1000d5e38]
mov eax, dword [0x100172988]
mov r10d, dword [0x100172988]
test eax, eax
je 0x10012205a
mov edi, dword [0x100172988]
xor r8d, r8d
xor eax, eax
dec edi
inc rdi
mov r9, rdi
je 0x100122014
mov rcx, qword [0x100346e50]
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 0x100121fe9
mov qword [0x100346e50], rcx
xor edx, edx
div rdi
test r10, r10
je 0x10012204f
inc r8
mov eax, 0xcb65
mov ecx, 0xffff349a
lock cmpxchg dword [r11 + rdx*4 + 0x349c90], ecx
je 0x100122316
lea rax, [rdx + 1]
xor edx, edx
mov ecx, dword [0x100172988]
div rcx
cmp r8, r10
jb 0x10012201e
xor ebx, ebx
test rbx, rbx
jne 0x10012217b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
xor edi, edi
inc rdi
mov rcx, qword [0x100348890]
mov r8, rcx
mov r9, rcx
xor eax, eax
test rcx, rcx
je 0x1001220ad
mov rcx, qword [0x100346e50]
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 0x100122082
mov qword [0x100346e50], rcx
mov r9d, 0x40
xor edx, edx
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]
test rax, rax
mov rbx, rax
je 0x100122115
and qword [rsp + 0x28], 0
mov rdx, rax
and qword [rsp + 0x20], 0
mov rcx, rax
mov r8d, esi
lea r9, [0x1002af874]
or rcx, 3
call qword [sym.imp.ntdll.dll_RtlInstallFunctionTableCallback]
test al, al
jne 0x100122129
mov rcx, rbx
xor edx, edx
mov r8d, r13d
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
cmp rdi, 0x11
jb 0x100122064
xor ebx, ebx
cmp rbx, 0x10000
jb 0x100122137
test bl, 3
je 0x100122159
test rbx, rbx
je 0x100122157
mov rcx, rbx
or rcx, 3
call qword [sym.imp.ntdll.dll_RtlDeleteFunctionTable]
mov rcx, rbx
mov r8d, r13d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor ebx, ebx
mov ecx, ebp
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea r11, [0x100000000]
test rbx, rbx
je 0x100121fb2
mov rcx, rsi
xor eax, eax
mov rdi, rbx
rep stosb byte [rdi], al
mov eax, 0x265b22d1
mov r8d, dword [0x1000d5e38]
lea r13, [0x100000000]
mov edx, dword [r12 + 5]
and edx, 7
xor eax, eax
lea rbp, [rdx + r12 + 9]
mov esi, ebp
mov r12d, dword [r12 + 1]
shr r12, 2
mov qword [rsp + 0x90], rbp
and r12, r14
mov qword [rsp + 0x80], r12
sub esi, r13d
sub r8, r12
inc r8
mov dword [rsp + 0x48], esi
mov rdi, r8
je 0x1001221ff
mov rcx, qword [0x100346e50]
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 0x1001221d4
mov qword [0x100346e50], rcx
xor edx, edx
div r8
mov ecx, esi
add rbx, rdx
mov qword [rsp + 0x68], rbx
mov rdx, r12
mov r8, rbx
mov eax, 0xf435ae8
xor dil, dil
mov rdx, qword [r12 + rbp]
lea rcx, [rsp + 0x78]
mov qword [rsp + 0x78], rdx
mov eax, 0xce25b937
mov rax, qword [0x100037580]
mov r9d, dword [rsp + 0x7c]
mov rcx, r13
mov r11, qword [rsp + 0x78]
and qword [rsp + 0x40], 0
and r11, r14
and r9, r14
mov r14d, 4
add r11, r13
sub rcx, rax
mov qword [rsp + 0x30], rcx
jne 0x10012232d
xor r10d, r10d
test r9, r9
je 0x1001226f8
mov r8d, dword [rsp + 0x40]
mov eax, dword [rsp + 0x44]
movzx ecx, byte [r10 + r11]
inc r10
add ecx, 0x2becbda7
add r8d, ecx
add ecx, eax
mov eax, ecx
imul eax, eax, 0x70ec
rol eax, 7
ror ecx, 7
xor eax, ecx
imul rax, rax, 0x2becbda7
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, rax, 0x2becbda7
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
add r8d, eax
cmp r10, r9
jb 0x10012227b
mov dword [rsp + 0x44], eax
mov dword [rsp + 0x40], r8d
jmp 0x1001226f8
mov ecx, dword [0x1000d5e38]
imul rcx, rdx
lea rbx, [rcx + r11 + 0x313000]
jmp 0x100122051
lea rax, [r11 + r9]
movsxd rcx, dword [0x10000003c]
mov r8d, dword [rcx + r13 + 0xb0]
add r8, r13
mov ecx, dword [rcx + r13 + 0xb4]
mov qword [rsp + 0x98], rax
mov eax, r11d
sub eax, r13d
mov r10d, eax
mov ebx, eax
and r10, 0xfffffffffffff000
lea r13, [rax + r9]
mov r15, r13
sub rbx, r10
and r15, 0xfffffffffffff000
sub r13, r15
add rcx, r8
mov qword [rsp + 0x58], rcx
mov qword [rsp + 0x60], r13
jmp 0x100122397
mov eax, dword [r8]
cmp rax, r10
jae 0x10012239c
mov eax, dword [r8 + 4]
add r8, rax
cmp r8, rcx
jne 0x100122388
xor esi, esi
cmp r8, rcx
je 0x1001223da
mov eax, dword [r8]
cmp rax, r10
jne 0x1001223da
mov ecx, dword [r8 + 4]
sub rcx, 8
shr rcx, 1
je 0x1001223d5
lea rdx, [r8 + 8]
movzx eax, word [rdx]
and eax, 0xfff
cmp rax, rbx
jae 0x1001223d5
inc rsi
add rdx, 2
cmp rsi, rcx
jne 0x1001223bc
mov rcx, qword [rsp + 0x58]
mov ebx, dword [rsp + 0x40]
mov r9d, dword [rsp + 0x44]
mov rbp, qword [rsp + 0x30]
cmp r8, rcx
je 0x10012262e
mov eax, dword [r8]
cmp rax, r15
ja 0x10012262e
mov edx, dword [r8 + 4]
lea rax, [rdx - 8]
shr rax, 1
cmp rsi, rax
jne 0x100122429
add r8, rdx
cmp r8, rcx
je 0x10012262e
mov eax, dword [r8]
cmp rax, r15
ja 0x10012262e
xor esi, esi
jmp 0x1001223fd
mov eax, dword [r8]
cmp rax, r15
jne 0x100122445
movzx eax, word [r8 + rsi*2 + 8]
and eax, 0xfff
cmp rax, r13
jae 0x10012262e
mov rax, rsi
mov edx, 0xf000
inc rsi
test word [r8 + rax*2 + 8], dx
je 0x1001223e8
movzx r10d, word [r8 + rax*2 + 8]
xor edi, edi
lea rax, [0x100000000]
mov r13d, r10d
and r13d, 0xfff
add r13d, dword [r8]
add r13, rax
mov rax, r13
sub rax, r11
je 0x100122520
mov r12, rax
movzx ecx, byte [r11 + rdi]
inc rdi
add ecx, 0x2becbda7
add ebx, ecx
add ecx, r9d
mov eax, ecx
imul eax, eax, 0x70ec
rol eax, 7
ror ecx, 7
xor eax, ecx
imul rax, rax, 0x2becbda7
mov qword [rsp + 0x50], rax
shr rax, 0x20
mov ecx, dword [rsp + 0x50]
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, rax, 0x2becbda7
mov qword [rsp + 0x50], rax
shr rax, 0x20
mov ecx, dword [rsp + 0x50]
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 rdi, r12
jb 0x100122486
mov dword [rsp + 0x44], r9d
mov dword [rsp + 0x40], ebx
mov rax, qword [r13]
shr r10d, 0xc
cmp r10d, 3
mov qword [rsp + 0x50], rax
je 0x100122541
sub r10d, 0xa
neg r10d
sbb edx, edx
add edx, 3
jmp 0x100122546
mov edx, 2
mov r10, rbp
neg r10
sub edx, 2
je 0x10012256c
cmp edx, 1
je 0x10012255c
or r10, 0xffffffffffffffff
jmp 0x100122574
add rax, r10
mov qword [rsp + 0x50], rax
mov r10d, 8
jmp 0x100122574
add dword [rsp + 0x50], r10d
mov r10, r14
xor r11d, r11d
test r10, r10
je 0x10012261b
movzx ecx, byte [rsp + r11 + 0x50]
inc r11
add ecx, 0x2becbda7
add ebx, ecx
add ecx, r9d
mov eax, ecx
imul eax, eax, 0x70ec
rol eax, 7
ror ecx, 7
xor eax, ecx
imul rax, rax, 0x2becbda7
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, rax, 0x2becbda7
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 0x100122580
mov dword [rsp + 0x44], r9d
mov dword [rsp + 0x40], ebx
mov rcx, qword [rsp + 0x58]
lea r11, [r10 + r13]
mov r13, qword [rsp + 0x60]
jmp 0x1001223e8
mov r12, qword [rsp + 0x80]
mov rbp, qword [rsp + 0x90]
mov r10, qword [rsp + 0x98]
xor r8d, r8d
mov dil, r8b
sub r10, r11
je 0x1001226ef
movzx ecx, byte [r11 + r8]
inc r8
add ecx, 0x2becbda7
add ebx, ecx
add ecx, r9d
mov eax, ecx
imul eax, eax, 0x70ec
rol eax, 7
ror ecx, 7
xor eax, ecx
imul rax, rax, 0x2becbda7
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, rax, 0x2becbda7
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 0x100122655
mov dword [rsp + 0x44], r9d
mov dword [rsp + 0x40], ebx
mov rbx, qword [rsp + 0x68]
mov esi, dword [rsp + 0x48]
xor ecx, ecx
mov rax, rcx
inc rcx
and eax, 7
mov al, byte [rsp + rax + 0x40]
mov byte [rsp + rcx + 0x9f], al
cmp rcx, 8
jb 0x1001226fa
mov eax, 0xf9383503
mov r13, r12
mov r15, rbp
mov r10, rbx
and r13d, 7
mov rax, qword [rsp + 0xa0]
mov qword [rsp + 0x30], rbx
je 0x100122be2
mov ebx, esi
not ebx
xor r8d, r8d
mov dword [rsp + 0x58], r8d
xor r11d, r11d
mov dword [rsp + 0x60], r11d
xor r10d, r10d
test r13d, r13d
jle 0x10012278e
lea r9d, [r8 + 0x38]
cmp r10d, r14d
movzx edx, byte [r15]
jge 0x10012276d
lea ecx, [r9 - 0x20]
shl edx, cl
or r11d, edx
jmp 0x100122775
mov ecx, r9d
shl edx, cl
or r8d, edx
inc r10d
inc r15
sub r9d, 8
cmp r10d, r13d
jl 0x100122759
mov dword [rsp + 0x60], r11d
mov dword [rsp + 0x58], r8d
mov ecx, eax
mov edx, dword [rsp + 0xa4]
movzx r9d, ax
movzx r10d, word [rsp + 0xa4]
movzx r11d, word [rsp + 0xa2]
xor edx, esi
movzx r8d, word [rsp + 0xa6]
sub ecx, edx
xor ebx, ecx
mov ecx, ebx
mov esi, ebx
xor ecx, r11d
rol ecx, 6
ror esi, 0xc
imul ecx, r10d
xor esi, ecx
xor esi, dword [rsp + 0x48]
mov ecx, esi
mov edx, esi
sub edx, dword [rsp + 0xa4]
ror edx, 6
rol ecx, 0xf
imul edx, r11d
xor ecx, edx
xor ebx, ecx
mov ecx, ebx
mov edx, dword [rsp + 0xa4]
sub edx, ebx
ror edx, 7
ror ecx, 1
imul edx, r9d
sub edx, ecx
xor esi, edx
mov ecx, esi
mov edx, esi
sub edx, r10d
shr ecx, 5
imul edx, r8d
sub edx, ecx
xor ebx, edx
mov edx, ebx
xor edx, r8d
rol edx, 4
mov ecx, ebx
ror ecx, 4
imul edx, r10d
sub edx, ecx
xor esi, edx
mov edx, dword [rsp + 0xa4]
xor edx, esi
rol edx, 4
mov ecx, esi
ror ecx, 0xd
imul edx, r11d
sub edx, ecx
xor ebx, edx
mov ecx, ebx
mov edx, ebx
xor ecx, r10d
ror edx, 1
imul ecx, r9d
sub ecx, edx
mov edx, eax
xor esi, ecx
sub edx, esi
ror edx, 3
mov ecx, esi
ror ecx, 4
imul edx, r8d
add ecx, edx
xor ebx, ecx
mov ecx, ebx
ror ecx, 0xe
sub ecx, r10d
imul ecx, r9d
xor esi, ecx
mov edx, esi
xor edx, r9d
mov ecx, esi
imul edx, r11d
shr ecx, 6
xor edx, ecx
xor ebx, edx
mov r11d, dword [rsp + 0x58]
mov ecx, ebx
xor ebx, r11d
sub ecx, dword [rsp + 0xa4]
sub ecx, r9d
mov r8d, ebx
xor r9d, r9d
xor ecx, dword [rsp + 0x60]
xor esi, ecx
mov edx, esi
test r13d, r13d
jle 0x1001228e1
mov rcx, qword [rsp + 0x30]
cmp r9d, r14d
jge 0x1001228c7
rol edx, 8
mov byte [rcx], dl
inc rcx
xor dil, dl
jmp 0x1001228d4
rol r8d, 8
mov byte [rcx], r8b
inc rcx
xor dil, r8b
inc r9d
cmp r9d, r13d
jl 0x1001228b5
mov qword [rsp + 0x30], rcx
lea ecx, [r13 - 4]
test ecx, ecx
jle 0x100122bca
sub r14d, ecx
shl r14d, 3
mov ecx, r14d
shr ebx, cl
shl ebx, cl
mov r10, qword [rsp + 0x30]
mov r14d, dword [rsp + 0x60]
mov r13, r12
shr r13, 3
test r13, r13
je 0x100122b12
movzx ecx, word [rsp + 0xa6]
movzx ebp, word [rsp + 0xa4]
mov dword [rsp + 0x60], ecx
movzx ecx, word [rsp + 0xa2]
mov dword [rsp + 0x58], ecx
movzx ecx, ax
mov r12d, ecx
mov edx, eax
movzx r9d, byte [r15 + 1]
movzx ecx, byte [r15]
shl ecx, 8
movzx r8d, byte [r15 + 4]
shl r8d, 8
add r15, 8
or r9d, ecx
movzx ecx, byte [r15 - 6]
shl r9d, 8
or r9d, ecx
movzx ecx, byte [r15 - 5]
shl r9d, 8
or r9d, ecx
movzx ecx, byte [r15 - 3]
or r8d, ecx
movzx ecx, byte [r15 - 2]
xor esi, r9d
shl r8d, 8
or r8d, ecx
shl r8d, 8
movzx ecx, byte [r15 - 1]
or r8d, ecx
mov ecx, dword [rsp + 0xa4]
xor ecx, esi
sub edx, ecx
xor edx, r8d
movzx ecx, word [rsp + 0xa2]
xor ebx, edx
mov edx, ebx
xor edx, ecx
mov ecx, ebx
rol edx, 6
ror ecx, 0xc
imul edx, ebp
xor ecx, edx
xor esi, ecx
mov edx, esi
sub edx, dword [rsp + 0xa4]
ror edx, 6
mov ecx, esi
rol ecx, 0xf
imul edx, dword [rsp + 0x58]
xor ecx, edx
xor ebx, ecx
mov edx, dword [rsp + 0xa4]
sub edx, ebx
ror edx, 7
mov ecx, ebx
ror ecx, 1
imul edx, r12d
sub edx, ecx
xor esi, edx
mov edx, esi
sub edx, ebp
movzx ecx, word [rsp + 0xa6]
imul edx, ecx
mov ecx, esi
shr ecx, 5
sub edx, ecx
movzx ecx, word [rsp + 0xa6]
xor ebx, edx
mov edx, ebx
xor edx, ecx
mov ecx, ebx
rol edx, 4
ror ecx, 4
imul edx, ebp
sub edx, ecx
xor esi, edx
mov ecx, esi
mov edx, dword [rsp + 0xa4]
xor edx, esi
rol edx, 4
ror ecx, 0xd
imul edx, dword [rsp + 0x58]
sub edx, ecx
xor ebx, edx
mov edx, ebx
ror edx, 1
mov ecx, ebx
xor ecx, ebp
imul ecx, r12d
sub ecx, edx
xor esi, ecx
mov ecx, esi
mov edx, eax
sub edx, esi
ror edx, 3
ror ecx, 4
imul edx, dword [rsp + 0x60]
add ecx, edx
xor ebx, ecx
mov ecx, ebx
ror ecx, 0xe
sub ecx, ebp
imul ecx, r12d
xor esi, ecx
mov edx, esi
xor edx, r12d
movzx ecx, word [rsp + 0xa2]
imul edx, ecx
mov ecx, esi
shr ecx, 6
xor edx, ecx
xor ebx, edx
mov ecx, ebx
xor ebx, r11d
sub ecx, dword [rsp + 0xa4]
mov r11d, r8d
sub ecx, r12d
xor ecx, r14d
mov r14d, r9d
xor esi, ecx
mov byte [r10 + 7], bl
mov byte [r10 + 3], sil
xor dil, sil
ror esi, 8
mov byte [r10 + 2], sil
xor dil, bl
ror ebx, 8
xor dil, sil
ror esi, 8
mov byte [r10 + 6], bl
xor dil, bl
ror ebx, 8
mov byte [r10 + 1], sil
xor dil, sil
mov byte [r10 + 5], bl
ror esi, 8
mov byte [r10], sil
xor dil, bl
ror ebx, 8
mov byte [r10 + 4], bl
add r10, 8
mov cl, bl
xor cl, sil
xor dil, cl
ror esi, 8
ror ebx, 8
sub r13, 1
jne 0x10012293b
mov rbp, qword [rsp + 0x90]
mov r12, qword [rsp + 0x80]
cmp dil, byte [r12 + rbp + 8]
je 0x100122c0a
call fcn.1000de678
mov r11, rax
mov rax, 0xfffffffffffff000
mov r10d, 0xffff
lea r13, [0x100046aec]
mov rbx, qword [rsp + 0x88]
mov qword [rbx + 0x10], r13
mov rcx, qword [0x100346e50]
lea r8, [rbx + 0x18]
and r8, 0xfffffffffffffff8
lea r9, [r8 + 0xfff]
and r11, rax
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 0x100122b63
mov qword [0x100346e50], rcx
movabs rax, 0x8000800080008001
mul rdi
mov rax, qword [rsp + 0x70]
shr rdx, 0xf
imul rdx, rdx, 0xffff
sub rdi, rdx
mov qword [rax + 0x98], r11
inc rdi
mov qword [rax + 0xb0], rdi
mov qword [rsp + 0x70], r10
jmp 0x100122c00
xor ebx, ebx
test ecx, ecx
jns 0x1001228fb
neg ecx
shl ecx, 3
shr esi, cl
shl esi, cl
jmp 0x1001228fb
mov r14d, esi
xor ebx, ebx
mov r11d, esi
xor esi, esi
not r11d
jmp 0x100122905
mov rax, qword [rsp + 0x70]
mov qword [r8], rax
add r8, 8
cmp r8, r9
jb 0x100122bf4
jmp 0x100122d1f
lea r14, [0x100000000]
mov rsi, r14
mov r13, qword [rsp + 0x68]
mov rax, qword [0x100037580]
mov rbx, rbp
sub rbx, r13
sub rsi, rax
jne 0x100122c34
test rbx, rbx
je 0x100122d0c
mov r11, r13
xor edi, edi
mov rcx, qword [0x100021bc8]
lea r8d, [rcx - 1]
lea r15, [0x100000000]
sub r11, rbp
sub ebp, r14d
add r12d, ebp
test r8d, r8d
js 0x100122c89
lea eax, [r8 + rdi]
cdq
sub eax, edx
sar eax, 1
movsxd rdx, eax
mov r9d, dword [r15 + rdx*4 + 0x21bcc]
and r9d, 0xfffffff
cmp ebp, r9d
jae 0x100122c7f
lea r8d, [rax - 1]
jmp 0x100122c84
jbe 0x100122c8e
lea edi, [rax + 1]
cmp r8d, edi
jge 0x100122c59
movsxd r10, edi
jmp 0x100122d05
movsxd r10, eax
jmp 0x100122d05
mov edx, dword [r15 + r10*4 + 0x21bcc]
mov eax, edx
and eax, 0xfffffff
cmp eax, r12d
jae 0x100122d0c
mov r8, rdx
mov edi, edx
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 0x100122ce1
sub edi, 1
je 0x100122cdc
cmp edi, 1
jne 0x100122ce7
mov r9, rsi
jmp 0x100122ce7
mov r9, rbx
jmp 0x100122ce7
mov r9, rsi
sub r9, rbx
sub edx, 2
je 0x100122cf7
cmp edx, 1
jne 0x100122d02
add qword [r8 + r11], r9
jmp 0x100122cfb
add dword [r8 + r11], r9d
mov rcx, qword [0x100021bc8]
inc r10
mov eax, ecx
cmp r10, rax
jb 0x100122c93
mov eax, dword [0x1000d5e38]
mov eax, 0x1d3ad8a6
mov rbx, qword [rsp + 0x88]
mov qword [rbx + 0x10], r13
mov rcx, qword [rsp + 0xa8]
xor rcx, rsp
call fcn.1002edf64
mov rbx, qword [rsp + 0x100]
add rsp, 0xb0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret