Function at 0x10004af88
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 + 0xb0], rax
lea rax, [0x100000000]
lea r11, [0x100000000]
lea r12, [rcx + 0x18]
mov qword [rsp + 0x88], rdx
mov qword [rsp + 0xa0], rcx
mov ecx, 0xfffffff
mov r14, qword [r12]
mov edx, dword [r14 + 5]
mov ebp, dword [r14 + 1]
and rdx, rcx
mov qword [rsp + 0x80], r12
and rbp, rcx
add rbp, rax
mov eax, dword [0x1000d5e38]
mov rcx, rax
mov qword [rsp + 0x90], rbp
lea rsi, [rax + rdx - 1]
xor edx, edx
mov rax, rsi
div rcx
mov eax, dword [0x1000d5e38]
sub rsi, rdx
xor r15d, r15d
mov r10d, dword [0x100172988]
mov eax, dword [0x1000d5e38]
mov eax, dword [0x100172988]
cmp eax, r15d
je 0x10004b0d1
mov edi, dword [0x100172988]
dec edi
mov r8, r15
mov rax, r15
inc rdi
cmp rdi, r15
mov r9, rdi
je 0x10004b08a
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 0x10004b05b
mov qword [0x100346e50], rcx
xor edx, edx
div rdi
cmp r10, r15
jbe 0x10004b0c5
inc r8
mov eax, 0xcb65
mov ecx, 0xffff349a
lock cmpxchg dword [r11 + rdx*4 + 0x349c90], ecx
je 0x10004b381
mov ecx, dword [0x100172988]
lea rax, [rdx + 1]
xor edx, edx
div rcx
cmp r8, r10
jb 0x10004b094
mov rbx, r15
cmp rbx, r15
jne 0x10004b204
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
mov r8, rcx
cmp rcx, r15
je 0x10004b12b
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 0x10004b0fc
mov qword [0x100346e50], rcx
xor edx, edx
mov r9d, 0x40
div r8
mov rcx, rdx
mov rdx, rsi
mov r8d, 0x3000
shl rcx, 0x10
add rcx, qword [0x1003475b0]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
cmp rax, r15
mov rbx, rax
je 0x10004b198
mov r8d, esi
mov rdx, rax
lea r9, [0x1002af874]
mov qword [rsp + 0x28], r15
mov rcx, rax
mov qword [rsp + 0x20], r15
or rcx, 3
call qword [sym.imp.ntdll.dll_RtlInstallFunctionTableCallback]
movzx edx, al
cmp edx, r15d
jne 0x10004b1ad
mov rcx, rbx
mov r8d, 0x8000
xor edx, edx
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
cmp rdi, 0x11
jb 0x10004b0dd
mov rbx, r15
cmp rbx, 0x10000
jb 0x10004b1bb
test bl, 3
je 0x10004b1e1
cmp rbx, r15
je 0x10004b1de
mov rcx, rbx
or rcx, 3
call qword [sym.imp.ntdll.dll_RtlDeleteFunctionTable]
xor edx, edx
mov rcx, rbx
mov r8d, 0x8000
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rbx, r15
mov ecx, r13d
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea r11, [0x100000000]
cmp rbx, r15
je 0x10004b01f
xor eax, eax
mov rdi, rbx
mov rcx, rsi
rep stosb byte [rdi], al
mov eax, 0xfd80ca63
add qword [r12], 9
lea rax, [0x100000000]
mov r14d, dword [r14 + 5]
mov esi, ebp
and r14d, 0xfffffff
mov r8d, dword [0x1000d5e38]
sub r8, r14
mov qword [rsp + 0x98], r14
sub esi, eax
inc r8
mov rax, r15
mov rdi, r8
mov dword [rsp + 0x3c], esi
cmp r8, r15
je 0x10004b27e
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 0x10004b24f
mov qword [0x100346e50], rcx
mov ecx, esi
xor edx, edx
div r8
lea r13, [rdx + rbx]
mov rdx, r14
mov r8, r13
mov qword [rsp + 0x78], r13
mov eax, 0x712c344e
mov dil, r15b
mov rdx, qword [r14 + rbp]
lea rcx, [rsp + 0x70]
mov qword [rsp + 0x70], rdx
mov eax, 0xdad751cf
mov rbx, qword [rsp + 0x70]
mov r9d, dword [rsp + 0x74]
lea rdx, [0x100000000]
mov rcx, rdx
mov eax, 0xfffffff
and rbx, rax
and r9, rax
mov rax, qword [0x100037580]
mov qword [rsp + 0x48], r15
mov r15d, 4
add rbx, rdx
sub rcx, rax
mov qword [rsp + 0x68], rcx
jne 0x10004b398
xor r10d, r10d
test r9, r9
je 0x10004b6ec
mov eax, dword [rsp + 0x4c]
mov r12d, 0x9ffb0838
mov r8d, dword [rsp + 0x48]
movzx ecx, byte [r10 + rbx]
inc r10
sub ecx, 0x6004f7c8
add r8d, ecx
add ecx, eax
imul ecx, ecx, 0x9ffb0838
ror ecx, 1
mov eax, ecx
imul eax, eax, 0x6581
rol eax, 8
ror ecx, 8
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
add r8d, eax
cmp r10, r9
jb 0x10004b30c
mov r12, qword [rsp + 0x80]
mov dword [rsp + 0x4c], eax
mov dword [rsp + 0x48], r8d
jmp 0x10004b6ec
mov ecx, dword [0x1000d5e38]
imul rcx, rdx
lea rbx, [rcx + r11 + 0x313000]
jmp 0x10004b0c8
lea rax, [rbx + r9]
movsxd rcx, dword [0x10000003c]
mov r8d, dword [rcx + rdx + 0xb0]
mov qword [rsp + 0x40], rax
mov eax, ebx
sub eax, edx
mov r10d, eax
mov r11d, eax
lea r13, [rax + r9]
add r8, rdx
mov edx, dword [rcx + rdx + 0xb4]
mov rcx, r13
and r10, 0xfffffffffffff000
and rcx, 0xfffffffffffff000
mov qword [rsp + 0x30], rcx
sub r11, r10
sub r13, rcx
add rdx, r8
mov qword [rsp + 0x50], rdx
mov qword [rsp + 0x60], r13
jmp 0x10004b402
mov eax, dword [r8]
cmp rax, r10
jae 0x10004b407
mov eax, dword [r8 + 4]
add r8, rax
cmp r8, rdx
jne 0x10004b3f3
xor esi, esi
cmp r8, rdx
je 0x10004b44a
mov eax, dword [r8]
cmp rax, r10
jne 0x10004b44a
mov ecx, dword [r8 + 4]
sub rcx, 8
shr rcx, 1
je 0x10004b445
lea rdx, [r8 + 8]
movzx eax, word [rdx]
and eax, 0xfff
cmp rax, r11
jae 0x10004b440
inc rsi
add rdx, 2
cmp rsi, rcx
jne 0x10004b427
mov rdx, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x30]
mov r12d, 0x9ffb0838
mov r10d, dword [rsp + 0x48]
mov r14, qword [rsp + 0x68]
mov r9d, dword [rsp + 0x4c]
cmp r8, rdx
je 0x10004b647
mov eax, dword [r8]
cmp rax, rcx
ja 0x10004b647
mov edi, dword [r8 + 4]
lea rax, [rdi - 8]
shr rax, 1
cmp rsi, rax
jne 0x10004b4a0
add r8, rdi
cmp r8, rdx
je 0x10004b647
mov eax, dword [r8]
cmp rax, rcx
ja 0x10004b647
xor esi, esi
jmp 0x10004b474
mov eax, dword [r8]
cmp rax, rcx
jne 0x10004b4bc
movzx eax, word [r8 + rsi*2 + 8]
and eax, 0xfff
cmp rax, r13
jae 0x10004b647
mov rax, rsi
inc rsi
mov edi, 0xf000
test word [r8 + rax*2 + 8], di
je 0x10004b45f
xor edi, edi
movzx r11d, word [r8 + rax*2 + 8]
mov r13d, r11d
lea rax, [0x100000000]
and r13d, 0xfff
add r13d, dword [r8]
add r13, rax
mov rax, r13
sub rax, rbx
je 0x10004b566
mov rbp, rax
movzx ecx, byte [rdi + rbx]
inc rdi
sub ecx, 0x6004f7c8
add r10d, ecx
add ecx, r9d
imul ecx, ecx, 0x9ffb0838
ror ecx, 1
mov eax, ecx
imul eax, eax, 0x6581
rol eax, 8
ror ecx, 8
xor eax, ecx
imul rax, r12
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 r10d, r9d
cmp rdi, rbp
jb 0x10004b4f9
mov dword [rsp + 0x4c], r9d
mov dword [rsp + 0x48], r10d
shr r11d, 0xc
cmp r11d, 3
mov rax, qword [r13]
mov qword [rsp + 0x58], rax
je 0x10004b587
sub r11d, 0xa
neg r11d
sbb edx, edx
add edx, 3
jmp 0x10004b58c
mov edx, 2
mov r11, r14
neg r11
sub edx, 2
je 0x10004b5b2
cmp edx, 1
je 0x10004b5a2
or r11, 0xffffffffffffffff
jmp 0x10004b5ba
add rax, r11
mov r11d, 8
mov qword [rsp + 0x58], rax
jmp 0x10004b5ba
add dword [rsp + 0x58], r11d
mov r11, r15
xor ebx, ebx
test r11, r11
je 0x10004b62f
movzx ecx, byte [rsp + rbx + 0x58]
inc rbx
sub ecx, 0x6004f7c8
add r10d, ecx
add ecx, r9d
imul ecx, ecx, 0x9ffb0838
ror ecx, 1
mov eax, ecx
imul eax, eax, 0x6581
rol eax, 8
ror ecx, 8
xor eax, ecx
imul rax, r12
mov qword [rsp + 0x68], rax
shr rax, 0x20
mov ecx, dword [rsp + 0x68]
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 r10d, r9d
cmp rbx, r11
jb 0x10004b5c1
mov dword [rsp + 0x4c], r9d
mov dword [rsp + 0x48], r10d
mov rdx, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x30]
lea rbx, [r11 + r13]
mov r13, qword [rsp + 0x60]
jmp 0x10004b45f
mov rsi, qword [rsp + 0x40]
xor r8d, r8d
mov r14, qword [rsp + 0x98]
sub rsi, rbx
mov dil, r8b
mov r12, qword [rsp + 0x80]
mov rbp, qword [rsp + 0x90]
je 0x10004b6e3
mov r11d, 0x9ffb0838
movzx ecx, byte [rbx + r8]
inc r8
sub ecx, 0x6004f7c8
add r10d, ecx
add ecx, r9d
imul ecx, ecx, 0x9ffb0838
ror ecx, 1
mov eax, ecx
imul eax, eax, 0x6581
rol eax, 8
ror ecx, 8
xor eax, ecx
imul rax, r11
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 r10d, r9d
cmp r8, rsi
jb 0x10004b675
mov dword [rsp + 0x4c], r9d
mov dword [rsp + 0x48], r10d
mov r13, qword [rsp + 0x78]
mov esi, dword [rsp + 0x3c]
xor ecx, ecx
mov rax, rcx
inc rcx
and eax, 7
cmp rcx, 8
mov al, byte [rsp + rax + 0x48]
mov byte [rsp + rcx + 0xa7], al
jb 0x10004b6ee
mov eax, 0x4c49948f
mov r10, rbp
mov rax, qword [rsp + 0xa8]
mov r11, r13
mov qword [rsp + 0x30], r13
mov r13, r14
mov qword [rsp + 0x50], rbp
and r13d, 7
je 0x10004bbdb
xor r8d, r8d
mov ebx, esi
xor r11d, r11d
and dword [rsp + 0x60], r8d
mov dword [rsp + 0x40], r8d
not ebx
test r13d, r13d
jle 0x10004b785
lea r9d, [r8 + 0x38]
cmp r11d, r15d
movzx edx, byte [r10]
jge 0x10004b764
lea ecx, [r9 - 0x20]
shl edx, cl
or dword [rsp + 0x60], edx
jmp 0x10004b76c
mov ecx, r9d
shl edx, cl
or r8d, edx
inc r11d
inc r10
sub r9d, 8
cmp r11d, r13d
jl 0x10004b74f
mov dword [rsp + 0x40], r8d
mov qword [rsp + 0x50], r10
movzx r10d, word [rsp + 0xae]
movzx r9d, word [rsp + 0xaa]
mov r8d, dword [rsp + 0xac]
mov ecx, esi
movzx r11d, r8w
mov edx, r11d
xor edx, esi
rol edx, 6
rol ecx, 7
imul edx, r10d
xor ecx, edx
xor ebx, ecx
mov esi, ebx
mov ecx, eax
sub ecx, ebx
rol ecx, 1
ror esi, 3
imul ecx, r11d
add esi, ecx
xor esi, dword [rsp + 0x3c]
lea edx, [r8 + rsi]
mov ecx, esi
movzx r8d, ax
ror edx, 2
rol ecx, 0xe
imul edx, r9d
sub edx, ecx
xor ebx, edx
mov ecx, ebx
sub ecx, r8d
xor ecx, dword [rsp + 0xac]
xor esi, ecx
mov ecx, esi
not ecx
ror ecx, 0xa
add ecx, r10d
imul ecx, r8d
xor ebx, ecx
mov edx, ebx
mov ecx, ebx
xor ecx, r10d
ror edx, 8
imul ecx, r11d
xor edx, ecx
xor esi, edx
mov edx, r8d
xor edx, esi
mov ecx, esi
rol edx, 6
ror ecx, 3
imul edx, r9d
add ecx, edx
xor ebx, ecx
mov edx, ebx
mov ecx, ebx
xor ecx, r11d
ror edx, 0xb
imul ecx, r8d
mov r8d, dword [rsp + 0xac]
sub ecx, edx
mov edx, eax
xor esi, ecx
mov ecx, esi
ror ecx, 0xc
sub ecx, r10d
imul ecx, r11d
xor ebx, ecx
mov ecx, ebx
xor edx, ebx
rol edx, 6
rol ecx, 3
imul edx, r11d
xor ecx, edx
mov edx, r8d
xor esi, ecx
xor edx, esi
mov ecx, esi
rol edx, 3
shr ecx, 0xa
imul edx, r9d
sub edx, ecx
xor ebx, edx
xor r9d, r9d
mov ecx, r8d
xor ecx, eax
xor ecx, dword [rsp + 0x60]
xor ecx, ebx
xor ebx, dword [rsp + 0x40]
mov edx, ebx
xor esi, ecx
test r13d, r13d
mov ecx, esi
jle 0x10004b8c9
mov r8, qword [rsp + 0x30]
cmp r9d, r15d
jge 0x10004b8b0
rol ecx, 8
mov byte [r8], cl
inc r8
xor dil, cl
jmp 0x10004b8bc
rol edx, 8
mov byte [r8], dl
inc r8
xor dil, dl
inc r9d
cmp r9d, r13d
jl 0x10004b89d
mov qword [rsp + 0x30], r8
lea ecx, [r13 - 4]
test ecx, ecx
jle 0x10004bbc3
sub r15d, ecx
shl r15d, 3
mov ecx, r15d
shr ebx, cl
shl ebx, cl
mov r11, qword [rsp + 0x30]
mov r10, qword [rsp + 0x50]
mov r13d, dword [rsp + 0x40]
mov r15, r14
shr r15, 3
test r15, r15
je 0x10004bb08
movzx ecx, ax
mov r12d, dword [rsp + 0xac]
movzx r8d, word [rsp + 0xaa]
mov ebp, dword [rsp + 0x60]
mov dword [rsp + 0x50], r8d
mov dword [rsp + 0x68], ecx
movzx ecx, word [rsp + 0xae]
mov dword [rsp + 0x3c], ecx
mov ecx, dword [rsp + 0xac]
movzx edx, cx
xor ecx, eax
mov r14d, ecx
mov dword [rsp + 0x40], edx
movzx r8d, byte [r10 + 4]
movzx ecx, byte [r10]
movzx r9d, byte [r10 + 1]
shl ecx, 8
shl r8d, 8
add r10, 8
or r9d, ecx
movzx ecx, byte [r10 - 6]
shl r9d, 8
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, 6
rol ecx, 7
imul edx, dword [rsp + 0x3c]
xor ecx, edx
mov edx, eax
xor ecx, r8d
xor ebx, ecx
sub edx, ebx
mov ecx, ebx
rol edx, 1
ror ecx, 3
imul edx, dword [rsp + 0x40]
add ecx, edx
xor esi, ecx
mov ecx, esi
lea edx, [r12 + rsi]
ror edx, 2
rol ecx, 0xe
imul edx, dword [rsp + 0x50]
sub edx, ecx
xor ebx, edx
mov ecx, ebx
mov edx, dword [rsp + 0x68]
sub ecx, edx
xor ecx, r12d
xor esi, ecx
mov ecx, esi
not ecx
ror ecx, 0xa
add ecx, dword [rsp + 0x3c]
imul ecx, edx
xor ebx, ecx
mov ecx, ebx
mov edx, ebx
xor ecx, dword [rsp + 0x3c]
ror edx, 8
imul ecx, dword [rsp + 0x40]
xor edx, ecx
xor esi, edx
mov edx, dword [rsp + 0x68]
xor edx, esi
mov ecx, esi
rol edx, 6
ror ecx, 3
imul edx, dword [rsp + 0x50]
add ecx, edx
xor ebx, ecx
mov ecx, ebx
xor ecx, dword [rsp + 0x40]
mov edx, ebx
ror edx, 0xb
imul ecx, dword [rsp + 0x68]
sub ecx, edx
xor esi, ecx
mov ecx, esi
movzx edx, word [rsp + 0xae]
ror ecx, 0xc
sub ecx, edx
imul ecx, dword [rsp + 0x40]
xor ebx, ecx
mov ecx, ebx
mov edx, eax
xor edx, ebx
rol edx, 6
rol ecx, 3
imul edx, dword [rsp + 0x40]
xor ecx, edx
xor esi, ecx
mov edx, r12d
movzx ecx, word [rsp + 0xaa]
xor edx, esi
rol edx, 3
imul edx, ecx
mov ecx, esi
shr ecx, 0xa
sub edx, ecx
mov ecx, r14d
xor ecx, ebp
xor ebx, edx
xor ecx, ebx
mov edx, dword [rsp + 0x40]
mov ebp, r9d
xor ebx, r13d
xor esi, ecx
mov r13d, r8d
xor dil, sil
mov byte [r11 + 7], bl
mov byte [r11 + 3], sil
ror esi, 8
xor dil, bl
mov byte [r11 + 2], sil
ror ebx, 8
xor dil, sil
mov byte [r11 + 6], bl
ror esi, 8
xor dil, bl
mov byte [r11 + 1], sil
ror ebx, 8
mov byte [r11 + 5], bl
xor dil, sil
ror esi, 8
xor dil, bl
mov byte [r11], sil
ror ebx, 8
mov cl, bl
mov byte [r11 + 4], bl
add r11, 8
xor cl, sil
xor dil, cl
ror esi, 8
ror ebx, 8
sub r15, 1
jne 0x10004b942
mov rbp, qword [rsp + 0x90]
mov r14, qword [rsp + 0x98]
mov r12, qword [rsp + 0x80]
cmp dil, byte [r14 + rbp + 8]
je 0x10004bc08
call fcn.1000de678
and r12, 0xfffffffffffffff8
mov r9d, 0xffff
mov r11, qword [rsp + 0xa0]
lea r13, [0x100046aec]
lea r8, [r12 + 0xfff]
mov qword [r11 + 0x10], r13
mov r10, rax
mov rcx, qword [0x100346e50]
mov rax, 0xfffffffffffff000
and r10, rax
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 0x10004bb56
mov qword [0x100346e50], rcx
movabs rax, 0x8000800080008001
mul rdi
shr rdx, 0xf
imul rdx, rdx, 0xffff
sub rdi, rdx
inc rdi
mov rax, qword [rsp + 0x88]
mov qword [rax + 0x98], r10
mov qword [rax + 0xb0], rdi
mov qword [rsp + 0x88], r9
jmp 0x10004bbfe
xor ebx, ebx
test ecx, ecx
jns 0x10004b8e3
neg ecx
shl ecx, 3
shr esi, cl
shl esi, cl
jmp 0x10004b8e3
mov dword [rsp + 0x60], esi
xor ebx, ebx
mov r13d, esi
xor esi, esi
not r13d
jmp 0x10004b8f2
mov rax, qword [rsp + 0x88]
mov qword [r12], rax
add r12, 8
cmp r12, r8
jb 0x10004bbee
jmp 0x10004bd1e
mov rax, qword [0x100037580]
mov r13, qword [rsp + 0x78]
mov rbx, rbp
lea r15, [0x100000000]
sub rbx, r13
mov rsi, r15
sub rsi, rax
jne 0x10004bc32
test rbx, rbx
je 0x10004bd0b
xor edi, edi
mov r11, r13
sub r11, rbp
sub ebp, r15d
lea r12d, [r14 + rbp]
mov rcx, qword [0x100021bc8]
lea r8d, [rcx - 1]
test r8d, r8d
lea r14, [0x100000000]
js 0x10004bc88
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 0x10004bc7e
lea r8d, [rax - 1]
jmp 0x10004bc83
jbe 0x10004bc8d
lea edi, [rax + 1]
cmp r8d, edi
jge 0x10004bc58
movsxd r10, edi
jmp 0x10004bd04
movsxd r10, eax
jmp 0x10004bd04
mov edx, dword [r14 + r10*4 + 0x21bcc]
mov eax, edx
and eax, 0xfffffff
cmp eax, r12d
jae 0x10004bd0b
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 0x10004bce0
sub edi, 1
je 0x10004bcdb
cmp edi, 1
jne 0x10004bce6
mov r9, rsi
jmp 0x10004bce6
mov r9, rbx
jmp 0x10004bce6
mov r9, rsi
sub r9, rbx
sub edx, 2
je 0x10004bcf6
cmp edx, 1
jne 0x10004bd01
add qword [r8 + r11], r9
jmp 0x10004bcfa
add dword [r8 + r11], r9d
mov rcx, qword [0x100021bc8]
inc r10
mov eax, ecx
cmp r10, rax
jb 0x10004bc92
mov eax, dword [0x1000d5e38]
mov eax, 0xd2a872ae
mov r11, qword [rsp + 0xa0]
mov qword [r11 + 0x10], r13
mov rcx, qword [rsp + 0xb0]
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