Function at 0x1000477d0
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
lea r11, [0x100000000]
mov r14d, 0x269ec3
mov rbp, qword [rcx + 0x10]
mov eax, dword [0x1000d5e38]
mov qword [rsp + 0x78], rdx
mov edx, dword [rbp + 1]
shr rdx, 4
lea rsi, [rax + rdx - 1]
xor edx, edx
mov qword [rsp + 0x88], rcx
mov r13d, 0x8000
mov rcx, rax
mov rax, rsi
div rcx
mov eax, dword [0x1000d5e38]
sub rsi, rdx
mov r10d, dword [0x100172988]
mov eax, dword [0x1000d5e38]
mov eax, dword [0x100172988]
test eax, eax
je 0x1000478eb
mov edi, dword [0x100172988]
xor r8d, r8d
xor eax, eax
dec edi
inc rdi
mov r9, rdi
je 0x1000478a5
mov rcx, qword [0x100346e50]
imul rcx, rcx, 0x343fd
shl rax, 0x10
shr r9, 0x10
add rcx, r14
mov rdx, rcx
shr rdx, 0x10
movzx edx, dx
or rax, rdx
test r9, r9
jne 0x10004787a
mov qword [0x100346e50], rcx
xor edx, edx
div rdi
test r10, r10
je 0x1000478e0
inc r8
mov eax, 0xcb65
mov ecx, 0xffff349a
lock cmpxchg dword [r11 + rdx*4 + 0x349c90], ecx
je 0x100047b9f
lea rax, [rdx + 1]
xor edx, edx
mov ecx, dword [0x100172988]
div rcx
cmp r8, r10
jb 0x1000478af
xor ebx, ebx
test rbx, rbx
jne 0x100047a0e
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor edi, edi
mov r12d, eax
inc rdi
mov rcx, qword [0x100348890]
mov r9, rcx
mov r8, rcx
xor eax, eax
test rcx, rcx
je 0x10004793f
mov rcx, qword [0x100346e50]
imul rcx, rcx, 0x343fd
shl rax, 0x10
shr r9, 0x10
add rcx, r14
mov rdx, rcx
shr rdx, 0x10
movzx edx, dx
or rax, rdx
test r9, r9
jne 0x100047914
mov qword [0x100346e50], rcx
xor edx, edx
div r8
mov r9d, 0x40
mov r8d, 0x3000
mov rcx, rdx
shl rcx, 0x10
add rcx, qword [0x1003475b0]
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rbx, rax
test rax, rax
je 0x1000479a7
mov rdx, rax
mov r8d, esi
and qword [rsp + 0x28], 0
mov rcx, rax
lea r9, [0x1002af874]
and qword [rsp + 0x20], 0
or rcx, 3
call qword [sym.imp.ntdll.dll_RtlInstallFunctionTableCallback]
test al, al
jne 0x1000479bb
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 0x1000478f6
xor ebx, ebx
cmp rbx, 0x10000
jb 0x1000479c9
test bl, 3
je 0x1000479eb
test rbx, rbx
je 0x1000479e9
mov rcx, rbx
or rcx, 3
call qword [sym.imp.ntdll.dll_RtlDeleteFunctionTable]
mov r8d, r13d
mov rcx, rbx
xor edx, edx
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor ebx, ebx
mov ecx, r12d
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea r11, [0x100000000]
test rbx, rbx
je 0x100047843
mov rcx, rsi
mov rdi, rbx
xor eax, eax
rep stosb byte [rdi], al
mov eax, 0x163d3053
lea r13, [0x100000000]
mov r12d, dword [rbp + 1]
mov rax, r12
shr r12, 4
shr rax, 1
mov r8d, dword [0x1000d5e38]
sub r8, r12
mov qword [rsp + 0x90], r12
and eax, 7
lea rbp, [rax + rbp + 9]
xor eax, eax
mov esi, ebp
mov qword [rsp + 0x80], rbp
sub esi, r13d
inc r8
mov dword [rsp + 0x3c], esi
mov rdi, r8
je 0x100047a8f
mov rcx, qword [0x100346e50]
imul rcx, rcx, 0x343fd
shl rax, 0x10
shr rdi, 0x10
add rcx, r14
mov rdx, rcx
shr rdx, 0x10
movzx edx, dx
or rax, rdx
test rdi, rdi
jne 0x100047a64
mov qword [0x100346e50], rcx
xor edx, edx
div r8
mov ecx, esi
add rbx, rdx
mov r8, rbx
mov qword [rsp + 0x68], rbx
mov rdx, r12
mov eax, 0x62dd9339
xor dil, dil
lea rcx, [rsp + 0x70]
mov rdx, qword [r12 + rbp]
mov qword [rsp + 0x70], rdx
mov eax, 0x77f5879d
mov r9d, dword [rsp + 0x74]
mov eax, 0xfffffff
mov r11, qword [rsp + 0x70]
and qword [rsp + 0x48], 0
and r11, rax
mov rcx, r13
and r9, rax
mov rax, qword [0x100037580]
mov r14d, 4
add r11, r13
sub rcx, rax
mov qword [rsp + 0x30], rcx
jne 0x100047bb6
xor r10d, r10d
test r9, r9
je 0x100047f5f
mov ecx, dword [rsp + 0x4c]
mov r13d, 0xed08cdd6
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 0x100047b16
mov dword [rsp + 0x4c], ecx
mov dword [rsp + 0x48], r8d
jmp 0x100047f5f
mov ecx, dword [0x1000d5e38]
imul rcx, rdx
lea rbx, [rcx + r11 + 0x313000]
jmp 0x1000478e2
movsxd rcx, dword [0x10000003c]
mov edx, dword [rcx + r13 + 0xb4]
mov r8d, dword [rcx + r13 + 0xb0]
add r8, r13
lea rax, [r11 + r9]
mov qword [rsp + 0x98], rax
mov eax, r11d
sub eax, r13d
mov r10d, eax
mov ebx, eax
lea r15, [rax + r9]
and r10, 0xfffffffffffff000
mov rcx, r15
sub rbx, r10
and rcx, 0xfffffffffffff000
sub r15, rcx
add rdx, r8
mov qword [rsp + 0x58], rcx
mov qword [rsp + 0x60], rdx
mov qword [rsp + 0x40], r15
jmp 0x100047c25
mov eax, dword [r8]
cmp rax, r10
jae 0x100047c2a
mov eax, dword [r8 + 4]
add r8, rax
cmp r8, rdx
jne 0x100047c16
xor esi, esi
cmp r8, rdx
je 0x100047c6d
mov eax, dword [r8]
cmp rax, r10
jne 0x100047c6d
mov ecx, dword [r8 + 4]
sub rcx, 8
shr rcx, 1
je 0x100047c68
lea rdx, [r8 + 8]
movzx eax, word [rdx]
and eax, 0xfff
cmp rax, rbx
jae 0x100047c63
inc rsi
add rdx, 2
cmp rsi, rcx
jne 0x100047c4a
mov rdx, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x58]
mov r9d, dword [rsp + 0x4c]
mov rbp, qword [rsp + 0x30]
mov r13d, 0xed08cdd6
mov ebx, dword [rsp + 0x48]
cmp r8, rdx
je 0x100047ea7
mov eax, dword [r8]
cmp rax, rcx
ja 0x100047ea7
mov edi, dword [r8 + 4]
lea rax, [rdi - 8]
shr rax, 1
cmp rsi, rax
jne 0x100047cc2
add r8, rdi
cmp r8, rdx
je 0x100047ea7
mov eax, dword [r8]
cmp rax, rcx
ja 0x100047ea7
xor esi, esi
jmp 0x100047c96
mov eax, dword [r8]
cmp rax, rcx
jne 0x100047cde
movzx eax, word [r8 + rsi*2 + 8]
and eax, 0xfff
cmp rax, r15
jae 0x100047ea7
mov rax, rsi
mov edi, 0xf000
inc rsi
test word [r8 + rax*2 + 8], di
je 0x100047c81
xor edi, edi
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 0x100047da7
mov r12, rax
movzx eax, byte [r11 + rdi]
inc rdi
sub eax, 0x12f7322a
add ebx, eax
add eax, r9d
imul rax, r13
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 eax, eax, 0xed08cdd6
ror eax, 0xf
imul rax, r13
mov qword [rsp + 0x50], rax
mov ecx, dword [rsp + 0x50]
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 rdi, r12
jb 0x100047d1f
mov dword [rsp + 0x4c], r9d
mov dword [rsp + 0x48], ebx
mov rax, qword [r15]
shr r10d, 0xc
cmp r10d, 3
mov qword [rsp + 0x50], rax
je 0x100047dc7
sub r10d, 0xa
neg r10d
sbb edx, edx
add edx, 3
jmp 0x100047dcc
mov edx, 2
mov r10, rbp
neg r10
sub edx, 2
je 0x100047df2
cmp edx, 1
je 0x100047de2
or r10, 0xffffffffffffffff
jmp 0x100047dfa
add rax, r10
mov r10d, 8
mov qword [rsp + 0x50], rax
jmp 0x100047dfa
add dword [rsp + 0x50], r10d
mov r10, r14
xor r11d, r11d
test r10, r10
je 0x100047e8f
movzx eax, byte [rsp + r11 + 0x50]
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
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 r11, r10
jb 0x100047e06
mov dword [rsp + 0x4c], r9d
mov dword [rsp + 0x48], ebx
mov rcx, qword [rsp + 0x58]
lea r11, [r10 + r15]
mov r15, qword [rsp + 0x40]
mov rdx, qword [rsp + 0x60]
jmp 0x100047c81
mov rbp, qword [rsp + 0x80]
mov r12, qword [rsp + 0x90]
xor r8d, r8d
mov dil, r8b
mov r10, qword [rsp + 0x98]
sub r10, r11
je 0x100047f56
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
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 r8, r10
jb 0x100047ece
mov dword [rsp + 0x4c], r9d
mov dword [rsp + 0x48], ebx
mov esi, dword [rsp + 0x3c]
mov rbx, qword [rsp + 0x68]
xor ecx, ecx
mov rax, rcx
inc rcx
and eax, 7
cmp rcx, 8
mov al, byte [rsp + rax + 0x48]
mov byte [rsp + rcx + 0x9f], al
jb 0x100047f61
mov eax, 0x5661edb7
mov r13, r12
mov r10, rbx
and r13d, 7
mov r15, rbp
mov rax, qword [rsp + 0xa0]
mov qword [rsp + 0x30], rbx
je 0x10004841b
mov ebx, esi
not ebx
xor r8d, r8d
mov dword [rsp + 0x58], r8d
xor r11d, r11d
mov dword [rsp + 0x40], r11d
xor r10d, r10d
test r13d, r13d
jle 0x100047ff5
lea r9d, [r8 + 0x38]
cmp r10d, r14d
movzx edx, byte [r15]
jge 0x100047fd4
lea ecx, [r9 - 0x20]
shl edx, cl
or r11d, edx
jmp 0x100047fdc
mov ecx, r9d
shl edx, cl
or r8d, edx
inc r10d
inc r15
sub r9d, 8
cmp r10d, r13d
jl 0x100047fc0
mov dword [rsp + 0x40], r11d
mov dword [rsp + 0x58], r8d
movzx r10d, word [rsp + 0xa2]
mov esi, ebx
movzx r8d, ax
mov ecx, eax
movzx r9d, word [rsp + 0xa6]
mov edx, dword [rsp + 0xa4]
xor ecx, ebx
movzx r11d, dx
ror ecx, 1
ror esi, 8
imul ecx, r11d
xor esi, ecx
xor esi, dword [rsp + 0x3c]
add edx, esi
ror edx, 0xc
mov ecx, esi
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
mov edx, eax
xor esi, ecx
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 + 0xa4]
ror edx, 5
mov ecx, esi
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 r11d, dword [rsp + 0x58]
mov edx, ebx
sub edx, r9d
mov ecx, ebx
rol edx, 4
imul edx, r8d
shr ecx, 0xc
xor r9d, r9d
xor edx, ecx
xor ebx, r11d
xor edx, dword [rsp + 0x40]
xor esi, edx
mov ecx, esi
mov edx, ebx
test r13d, r13d
jle 0x10004812d
mov r8, qword [rsp + 0x30]
cmp r9d, r14d
jge 0x100048114
rol ecx, 8
mov byte [r8], cl
inc r8
xor dil, cl
jmp 0x100048120
rol edx, 8
mov byte [r8], dl
inc r8
xor dil, dl
inc r9d
cmp r9d, r13d
jl 0x100048101
mov qword [rsp + 0x30], r8
lea ecx, [r13 - 4]
test ecx, ecx
jle 0x100048403
sub r14d, ecx
shl r14d, 3
mov ecx, r14d
shr ebx, cl
shl ebx, cl
mov r14d, dword [rsp + 0x40]
mov r10, qword [rsp + 0x30]
mov r13, r12
shr r13, 3
test r13, r13
je 0x10004834b
movzx ecx, word [rsp + 0xa2]
mov ebp, dword [rsp + 0xa4]
mov dword [rsp + 0x3c], ecx
movzx ecx, bp
mov dword [rsp + 0x40], ecx
movzx ecx, word [rsp + 0xa6]
mov dword [rsp + 0x60], ecx
neg ecx
mov dword [rsp + 0x30], ecx
movzx ecx, ax
mov r12d, dword [rsp + 0x30]
mov dword [rsp + 0x58], ecx
movzx r8d, byte [r15 + 4]
movzx r9d, byte [r15 + 1]
movzx ecx, byte [r15]
shl ecx, 8
mov edx, eax
shl r8d, 8
add r15, 8
or r9d, ecx
movzx ecx, byte [r15 - 6]
shl r9d, 8
or r9d, ecx
shl r9d, 8
movzx ecx, byte [r15 - 5]
or r9d, ecx
movzx ecx, byte [r15 - 3]
or r8d, ecx
movzx ecx, byte [r15 - 2]
shl r8d, 8
or r8d, ecx
movzx ecx, byte [r15 - 1]
shl r8d, 8
or r8d, ecx
xor ebx, r8d
xor edx, ebx
ror edx, 1
mov ecx, ebx
ror ecx, 8
imul edx, dword [rsp + 0x40]
xor ecx, edx
xor ecx, r9d
xor esi, ecx
mov ecx, esi
lea edx, [rbp + 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 + 0x60]
mov ecx, ebx
rol edx, 2
ror ecx, 0x10
imul edx, dword [rsp + 0x58]
xor ecx, edx
xor esi, ecx
mov edx, eax
xor edx, esi
rol edx, 8
mov ecx, esi
rol ecx, 6
imul edx, dword [rsp + 0x60]
add ecx, edx
xor ebx, ecx
mov edx, ebx
mov ecx, ebx
xor ecx, dword [rsp + 0x3c]
ror edx, 6
imul ecx, dword [rsp + 0x40]
add edx, ecx
xor esi, edx
mov ecx, esi
mov edx, esi
sub edx, ebp
ror edx, 5
ror ecx, 0xb
imul edx, dword [rsp + 0x3c]
xor ecx, edx
xor ebx, ecx
mov edx, ebx
mov ecx, ebx
xor edx, dword [rsp + 0x40]
shr ecx, 0xf
imul edx, dword [rsp + 0x58]
add edx, ecx
xor esi, edx
mov ecx, esi
sub ecx, eax
sub ecx, dword [rsp + 0x60]
xor ebx, ecx
mov edx, ebx
sub edx, eax
ror edx, 0xe
mov ecx, ebx
rol ecx, 1
imul edx, dword [rsp + 0x40]
add ecx, edx
xor esi, ecx
movzx edx, word [rsp + 0xa2]
mov ecx, esi
not ecx
ror ecx, 0xd
add ecx, edx
imul ecx, dword [rsp + 0x40]
xor ebx, ecx
mov ecx, ebx
lea edx, [rbx + r12]
shr ecx, 0xc
xor ebx, r11d
mov r11d, r8d
mov byte [r10 + 7], bl
rol edx, 4
imul edx, dword [rsp + 0x58]
xor edx, ecx
xor edx, r14d
xor esi, edx
xor dil, sil
mov byte [r10 + 3], sil
mov r14d, r9d
ror esi, 8
xor dil, bl
mov byte [r10 + 2], sil
ror ebx, 8
mov byte [r10 + 6], bl
xor dil, sil
ror esi, 8
xor dil, bl
ror ebx, 8
mov byte [r10 + 1], sil
mov byte [r10 + 5], bl
xor dil, sil
ror esi, 8
mov byte [r10], sil
xor dil, bl
ror ebx, 8
mov cl, bl
mov byte [r10 + 4], bl
add r10, 8
xor cl, sil
xor dil, cl
ror esi, 8
ror ebx, 8
sub r13, 1
jne 0x100048199
mov rbp, qword [rsp + 0x80]
mov r12, qword [rsp + 0x90]
cmp dil, byte [r12 + rbp + 8]
je 0x100048443
call fcn.1000de678
mov r10d, 0xffff
mov rbx, qword [rsp + 0x88]
lea r8, [rbx + 0x18]
mov r11, rax
and r8, 0xfffffffffffffff8
mov rax, 0xfffffffffffff000
lea r9, [r8 + 0xfff]
lea r13, [0x100046aec]
mov qword [rbx + 0x10], r13
and r11, rax
and r9, rax
xor edi, edi
mov rcx, qword [0x100346e50]
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 0x10004839c
movabs rax, 0x8000800080008001
mov qword [0x100346e50], rcx
mul rdi
mov rax, qword [rsp + 0x78]
shr rdx, 0xf
imul rdx, rdx, 0xffff
mov qword [rax + 0x98], r11
sub rdi, rdx
inc rdi
mov qword [rax + 0xb0], rdi
mov qword [rsp + 0x78], r10
jmp 0x100048439
xor ebx, ebx
test ecx, ecx
jns 0x100048147
neg ecx
shl ecx, 3
shr esi, cl
shl esi, cl
jmp 0x100048147
mov r11d, esi
not r11d
xor ebx, ebx
mov r14d, esi
xor esi, esi
jmp 0x100048151
mov rax, qword [rsp + 0x78]
mov qword [r8], rax
add r8, 8
cmp r8, r9
jb 0x10004842d
jmp 0x100048558
mov r13, qword [rsp + 0x68]
mov rax, qword [0x100037580]
mov rbx, rbp
sub rbx, r13
lea r14, [0x100000000]
mov rsi, r14
sub rsi, rax
jne 0x10004846d
test rbx, rbx
je 0x100048545
mov r11, r13
mov rcx, qword [0x100021bc8]
lea r15, [0x100000000]
lea r8d, [rcx - 1]
xor edi, edi
sub r11, rbp
sub ebp, r14d
add r12d, ebp
test r8d, r8d
js 0x1000484c2
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 0x1000484b8
lea r8d, [rax - 1]
jmp 0x1000484bd
jbe 0x1000484c7
lea edi, [rax + 1]
cmp r8d, edi
jge 0x100048492
movsxd r10, edi
jmp 0x10004853e
movsxd r10, eax
jmp 0x10004853e
mov edx, dword [r15 + r10*4 + 0x21bcc]
mov eax, edx
and eax, 0xfffffff
cmp eax, r12d
jae 0x100048545
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 0x10004851a
sub edi, 1
je 0x100048515
cmp edi, 1
jne 0x100048520
mov r9, rsi
jmp 0x100048520
mov r9, rbx
jmp 0x100048520
mov r9, rsi
sub r9, rbx
sub edx, 2
je 0x100048530
cmp edx, 1
jne 0x10004853b
add qword [r8 + r11], r9
jmp 0x100048534
add dword [r8 + r11], r9d
mov rcx, qword [0x100021bc8]
inc r10
mov eax, ecx
cmp r10, rax
jb 0x1000484cc
mov eax, dword [0x1000d5e38]
mov eax, 0x339d5a75
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