Function at 0x10005594c
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 + 0xb8], rax
lea rax, [0x100000000]
lea r11, [0x100000000]
mov qword [rsp + 0x80], rdx
lea r12, [rcx + 0x18]
mov qword [rsp + 0xa0], rcx
mov ecx, 0xfffffff
mov r13, qword [r12]
mov edx, dword [r13 + 1]
shr rdx, 1
mov esi, dword [r13 + 5]
and rsi, rcx
add rsi, rax
and rdx, rcx
mov qword [rsp + 0x90], r12
mov eax, dword [0x1002f8888]
mov rcx, rax
lea rbp, [rax + rdx - 1]
xor edx, edx
mov qword [rsp + 0xa8], rsi
mov rax, rbp
div rcx
mov eax, dword [0x1002f8888]
sub rbp, rdx
xor r15d, r15d
mov r10d, dword [0x1002a02b4]
mov eax, dword [0x1002f8888]
mov eax, dword [0x1002a02b4]
cmp eax, r15d
je 0x100055a98
mov rax, r15
mov r8, r15
mov edi, dword [0x1002a02b4]
dec edi
inc rdi
mov r9, rdi
cmp rdi, r15
je 0x100055a51
mov rcx, qword [0x1004c43a0]
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 0x100055a22
mov qword [0x1004c43a0], rcx
xor edx, edx
div rdi
cmp r10, r15
jbe 0x100055a8c
inc r8
mov eax, 0x3bd7
mov ecx, 0xffffc428
lock cmpxchg dword [r11 + rdx*4 + 0x4c5a60], ecx
je 0x100055d6b
lea rax, [rdx + 1]
mov ecx, dword [0x1002a02b4]
xor edx, edx
div rcx
cmp r8, r10
jb 0x100055a5b
mov rbx, r15
cmp rbx, r15
jne 0x100055bcb
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r14d, eax
mov rdi, r15
mov rax, r15
mov rcx, qword [0x1004c4380]
mov r9, rcx
mov r8, rcx
inc rdi
cmp rcx, r15
je 0x100055af2
mov rcx, qword [0x1004c43a0]
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 0x100055ac3
mov qword [0x1004c43a0], rcx
mov r9d, 0x40
xor edx, edx
div r8
mov r8d, 0x3000
mov rcx, rdx
mov rdx, rbp
shl rcx, 0x10
add rcx, qword [0x1004c4308]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
cmp rax, r15
mov rbx, rax
je 0x100055b5f
lea r9, [0x100435424]
mov r8d, ebp
mov rdx, rax
mov rcx, rax
mov qword [rsp + 0x28], r15
or rcx, 3
mov qword [rsp + 0x20], r15
call qword [sym.imp.ntdll.dll_RtlInstallFunctionTableCallback]
movzx edx, al
cmp edx, r15d
jne 0x100055b74
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 0x100055aa4
mov rbx, r15
cmp rbx, 0x10000
jb 0x100055b82
test bl, 3
je 0x100055ba8
cmp rbx, r15
je 0x100055ba5
mov rcx, rbx
or rcx, 3
call qword [sym.imp.ntdll.dll_RtlDeleteFunctionTable]
xor edx, edx
mov r8d, 0x8000
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualFree]
mov rbx, r15
mov ecx, r14d
call qword [sym.imp.KERNEL32.dll_SetLastError]
lea r11, [0x100000000]
cmp rbx, r15
je 0x1000559e6
mov rcx, rbp
xor eax, eax
mov rdi, rbx
rep stosb byte [rdi], al
mov eax, 0x35572ff7
mov rax, r15
add qword [r12], 9
mov ebp, 0xfffffff
mov r9d, dword [0x1002f8888]
mov r13d, dword [r13 + 1]
mov edi, esi
shr r13, 1
lea r14, [0x100000000]
and r13, rbp
sub r9, r13
mov qword [rsp + 0x98], r13
sub edi, r14d
mov dword [rsp + 0x3c], edi
inc r9
mov r8, r9
cmp r9, r15
je 0x100055c4a
mov rcx, qword [0x1004c43a0]
imul rcx, rcx, 0x343fd
shl rax, 0x10
shr r8, 0x10
add rcx, 0x269ec3
mov rdx, rcx
shr rdx, 0x10
movzx edx, dx
or rax, rdx
cmp r8, r15
jne 0x100055c1b
mov qword [0x1004c43a0], rcx
mov ecx, edi
xor edx, edx
div r9
add rbx, rdx
mov r8, rbx
mov qword [rsp + 0x88], rbx
mov rdx, r13
mov eax, 0xf6978af1
mov dil, r15b
mov rdx, qword [r13 + rsi]
mov qword [rsp + 0x78], rdx
lea rcx, [rsp + 0x78]
mov eax, 0xc87e9e4c
mov rax, qword [0x1000487b8]
mov r9d, dword [rsp + 0x7c]
mov r11, qword [rsp + 0x78]
and r11, rbp
and r9, rbp
add r11, r14
mov rcx, r14
mov rbp, 0xfffffffffffff000
sub rcx, rax
mov qword [rsp + 0x48], r15
mov qword [rsp + 0x30], rcx
mov r15d, 4
jne 0x100055d82
xor r10d, r10d
test r9, r9
je 0x100056153
mov eax, dword [rsp + 0x4c]
mov r14d, 0xf7df258b
mov r8d, dword [rsp + 0x48]
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, r14
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, r14
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 0x100055cd6
mov dword [rsp + 0x4c], eax
mov dword [rsp + 0x48], r8d
jmp 0x100056153
mov ecx, dword [0x1002f8888]
imul rcx, rdx
lea rbx, [rcx + r11 + 0x454000]
jmp 0x100055a8f
movsxd rcx, dword [0x10000003c]
lea rax, [r11 + r9]
mov r8d, dword [rcx + r14 + 0xb0]
mov edx, dword [rcx + r14 + 0xb4]
mov qword [rsp + 0x40], rax
add r8, r14
mov eax, r11d
sub eax, r14d
mov ebx, eax
mov r10d, eax
add rax, r9
and r10, rbp
mov rcx, rax
and rcx, rbp
sub rbx, r10
sub rax, rcx
mov qword [rsp + 0x50], rcx
add rdx, r8
mov qword [rsp + 0x68], rdx
mov qword [rsp + 0x60], rax
jmp 0x100055de5
mov eax, dword [r8]
cmp rax, r10
jae 0x100055dea
mov eax, dword [r8 + 4]
add r8, rax
cmp r8, rdx
jne 0x100055dd6
xor ebp, ebp
cmp r8, rdx
je 0x100055e2d
mov eax, dword [r8]
cmp rax, r10
jne 0x100055e2d
mov ecx, dword [r8 + 4]
sub rcx, 8
shr rcx, 1
je 0x100055e28
lea rdx, [r8 + 8]
movzx eax, word [rdx]
and eax, 0xfff
cmp rax, rbx
jae 0x100055e23
inc rbp
add rdx, 2
cmp rbp, rcx
jne 0x100055e0a
mov rdx, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x50]
mov r9d, dword [rsp + 0x4c]
mov ebx, dword [rsp + 0x48]
lea rdi, [0x100000000]
mov r13, qword [rsp + 0x30]
mov r14d, 0xf7df258b
cmp r8, rdx
je 0x10005608b
mov eax, dword [r8]
cmp rax, rcx
ja 0x10005608b
mov r10d, dword [r8 + 4]
lea rax, [r10 - 8]
shr rax, 1
cmp rbp, rax
jne 0x100055e89
add r8, r10
cmp r8, rdx
je 0x10005608b
mov eax, dword [r8]
cmp rax, rcx
ja 0x10005608b
xor ebp, ebp
jmp 0x100055e5d
mov eax, dword [r8]
cmp rax, rcx
jne 0x100055ea7
movzx eax, word [r8 + rbp*2 + 8]
and eax, 0xfff
cmp rax, qword [rsp + 0x60]
jae 0x10005608b
mov rax, rbp
mov r10d, 0xf000
inc rbp
test word [r8 + rax*2 + 8], r10w
je 0x100055e48
movzx r10d, word [r8 + rax*2 + 8]
mov eax, r10d
xor r12d, r12d
and eax, 0xfff
add eax, dword [r8]
add rax, rdi
mov rcx, rax
mov qword [rsp + 0x70], rax
sub rcx, r11
je 0x100055f7f
mov rsi, rcx
movzx ecx, byte [r11 + r12]
inc r12
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, r14
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 eax, edx
sar eax, 0x1f
btr eax, 0x1f
add eax, edx
imul rax, r14
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, rsi
jb 0x100055ee6
mov rax, qword [rsp + 0x70]
mov dword [rsp + 0x4c], r9d
mov dword [rsp + 0x48], ebx
mov rax, qword [rax]
shr r10d, 0xc
mov qword [rsp + 0x58], rax
cmp r10d, 3
je 0x100055f9f
sub r10d, 0xa
neg r10d
sbb edx, edx
add edx, 3
jmp 0x100055fa4
mov edx, 2
mov r10, r13
neg r10
sub edx, 2
je 0x100055fca
cmp edx, 1
je 0x100055fba
or r10, 0xffffffffffffffff
jmp 0x100055fd2
add rax, r10
mov r10d, 8
mov qword [rsp + 0x58], rax
jmp 0x100055fd2
add dword [rsp + 0x58], r10d
mov r10, r15
xor r11d, r11d
test r10, r10
je 0x100056073
movzx ecx, byte [rsp + r11 + 0x58]
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, r14
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, r14
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 0x100055fde
mov dword [rsp + 0x4c], r9d
mov dword [rsp + 0x48], ebx
mov rcx, qword [rsp + 0x50]
mov rdx, qword [rsp + 0x68]
mov rax, qword [rsp + 0x70]
lea r11, [r10 + rax]
jmp 0x100055e48
mov r13, qword [rsp + 0x98]
mov r10, qword [rsp + 0x40]
mov rsi, qword [rsp + 0xa8]
mov r12, qword [rsp + 0x90]
xor r8d, r8d
mov dil, r8b
sub r10, r11
je 0x10005614b
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, r14
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, r14
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 0x1000560b7
mov dword [rsp + 0x4c], r9d
mov dword [rsp + 0x48], ebx
mov rbx, qword [rsp + 0x88]
xor ecx, ecx
mov rax, rcx
inc rcx
and eax, 7
mov al, byte [rsp + rax + 0x48]
cmp rcx, 8
mov byte [rsp + rcx + 0xaf], al
jb 0x100056155
mov eax, 0x49cd6b26
mov r14, r13
xor r10d, r10d
mov r11, rsi
mov rbp, rbx
mov rax, qword [rsp + 0xb0]
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x50], rsi
xor ebx, ebx
and r14d, 7
je 0x100056675
xor r8d, r8d
test r14d, r14d
mov edx, dword [rsp + 0x3c]
mov dword [rsp + 0x60], ebx
mov ebp, edx
not ebp
mov dword [rsp + 0x40], r8d
jle 0x1000561f7
lea r9d, [r10 + 0x38]
cmp r10d, r15d
movzx edx, byte [r11]
jge 0x1000561ce
lea ecx, [r9 - 0x20]
shl edx, cl
or ebx, edx
jmp 0x1000561d6
mov ecx, r9d
shl edx, cl
or r8d, edx
inc r10d
inc r11
sub r9d, 8
cmp r10d, r14d
jl 0x1000561bb
mov edx, dword [rsp + 0x3c]
mov dword [rsp + 0x60], ebx
mov dword [rsp + 0x40], r8d
mov qword [rsp + 0x50], r11
movzx r9d, ax
movzx r10d, word [rsp + 0xb6]
mov r8d, dword [rsp + 0xb4]
mov ecx, edx
mov ebx, eax
ror ecx, 1
movzx r11d, r8w
xor ecx, r10d
imul ecx, r11d
xor ebp, ecx
xor ebx, ebp
mov ecx, ebp
rol ebx, 4
rol ecx, 1
imul ebx, r11d
sub ebx, ecx
xor ebx, edx
lea edx, [r8 + rbx]
mov ecx, ebx
rol edx, 7
ror ecx, 2
movzx r8d, word [rsp + 0xb2]
imul edx, r8d
add ecx, edx
xor ebp, ecx
mov ecx, ebp
mov edx, ebp
xor edx, r8d
rol edx, 7
ror ecx, 8
imul edx, r9d
xor ecx, edx
xor ebx, ecx
mov edx, ebx
mov ecx, ebx
sub edx, eax
rol edx, 1
rol ecx, 8
imul edx, r10d
sub edx, ecx
xor ebp, edx
mov ecx, ebp
sub ecx, r11d
mov edx, dword [rsp + 0xb4]
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 + 0xb4]
xor ecx, edx
xor ebp, ecx
mov edx, r8d
mov ecx, ebp
sub edx, ebp
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 ebp, edx
mov ecx, ebp
mov edx, ebp
sub edx, r10d
shr ecx, 0xa
mov r10d, r8d
rol edx, 3
mov r8d, dword [rsp + 0x60]
xor r10d, eax
xor r10d, ebp
imul edx, r11d
xor edx, ecx
xor ebx, edx
xor r10d, ebx
mov ecx, r10d
mov edx, r10d
xor r10d, dword [rsp + 0x40]
ror edx, 9
xor ecx, r11d
imul ecx, r9d
xor edx, ecx
xor r9d, r9d
xor edx, r8d
mov r8d, r10d
xor ebx, edx
test r14d, r14d
mov edx, ebx
jle 0x100056346
mov rcx, qword [rsp + 0x30]
cmp r9d, r15d
jge 0x10005632c
rol edx, 8
mov byte [rcx], dl
inc rcx
xor dil, dl
jmp 0x100056339
rol r8d, 8
mov byte [rcx], r8b
inc rcx
xor dil, r8b
inc r9d
cmp r9d, r14d
jl 0x10005631a
mov qword [rsp + 0x30], rcx
lea ecx, [r14 - 4]
test ecx, ecx
jle 0x10005665c
sub r15d, ecx
shl r15d, 3
mov ecx, r15d
shr r10d, cl
shl r10d, cl
mov rbp, qword [rsp + 0x30]
mov r11, qword [rsp + 0x50]
mov r14d, dword [rsp + 0x40]
mov r15, r13
shr r15, 3
test r15, r15
je 0x1000565a1
mov esi, dword [rsp + 0x60]
movzx ecx, word [rsp + 0xb2]
mov r12d, dword [rsp + 0xb4]
mov dword [rsp + 0x70], ecx
movzx ecx, word [rsp + 0xb6]
mov dword [rsp + 0x3c], ecx
neg ecx
mov dword [rsp + 0x50], ecx
mov ecx, dword [rsp + 0xb4]
mov edx, ecx
xor edx, eax
mov r13d, dword [rsp + 0x50]
mov dword [rsp + 0x30], edx
movzx edx, cx
movzx ecx, ax
mov dword [rsp + 0x68], ecx
mov dword [rsp + 0x40], edx
movzx r8d, byte [r11 + 4]
movzx r9d, byte [r11 + 1]
movzx ecx, byte [r11]
shl ecx, 8
shl r8d, 8
add r11, 8
or r9d, ecx
movzx ecx, byte [r11 - 6]
shl r9d, 8
or r9d, ecx
movzx ecx, byte [r11 - 5]
shl r9d, 8
or r9d, ecx
movzx ecx, byte [r11 - 3]
or r8d, ecx
xor ebx, r9d
shl r8d, 8
movzx ecx, byte [r11 - 2]
or r8d, ecx
shl r8d, 8
movzx ecx, byte [r11 - 1]
or r8d, ecx
mov ecx, ebx
ror ecx, 1
xor ecx, dword [rsp + 0x3c]
imul ecx, edx
mov edx, eax
xor ecx, r8d
xor r10d, ecx
mov ecx, r10d
xor edx, r10d
rol edx, 4
rol ecx, 1
imul edx, dword [rsp + 0x40]
sub edx, ecx
xor ebx, edx
lea edx, [r12 + rbx]
mov ecx, ebx
rol edx, 7
ror ecx, 2
imul edx, dword [rsp + 0x70]
add ecx, edx
xor r10d, ecx
mov edx, r10d
movzx ecx, word [rsp + 0xb2]
xor edx, ecx
rol edx, 7
mov ecx, r10d
ror ecx, 8
imul edx, dword [rsp + 0x68]
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 + 0x3c]
sub edx, ecx
xor r10d, edx
mov edx, r12d
mov ecx, r10d
sub ecx, dword [rsp + 0x40]
xor ecx, eax
xor ebx, ecx
mov ecx, ebx
sub edx, ebx
ror edx, 0xf
rol ecx, 0xc
imul edx, dword [rsp + 0x70]
xor ecx, edx
xor r10d, ecx
mov edx, r12d
mov ecx, r10d
sub edx, r10d
rol edx, 0xf
rol ecx, 2
imul edx, dword [rsp + 0x68]
add ecx, edx
xor ebx, ecx
mov ecx, ebx
mov edx, ebx
sub edx, dword [rsp + 0x40]
shr ecx, 0xe
imul edx, dword [rsp + 0x3c]
sub edx, ecx
xor r10d, edx
mov ecx, r10d
lea edx, [r10 + r13]
shr ecx, 0xa
rol edx, 3
imul edx, dword [rsp + 0x40]
xor edx, ecx
mov ecx, dword [rsp + 0x30]
xor r10d, ecx
xor ebx, edx
xor r10d, ebx
mov ecx, r10d
mov edx, r10d
xor r10d, r14d
mov r14d, r8d
xor ecx, dword [rsp + 0x40]
mov byte [rbp + 7], r10b
ror edx, 9
imul ecx, dword [rsp + 0x68]
xor edx, ecx
xor edx, esi
mov esi, r9d
xor ebx, edx
mov edx, dword [rsp + 0x40]
xor dil, bl
mov byte [rbp + 3], bl
ror ebx, 8
mov byte [rbp + 2], bl
xor dil, r10b
ror r10d, 8
xor dil, bl
ror ebx, 8
mov byte [rbp + 6], r10b
mov byte [rbp + 1], bl
xor dil, r10b
ror r10d, 8
mov byte [rbp + 5], r10b
xor dil, bl
ror ebx, 8
xor dil, r10b
mov byte [rbp], bl
ror r10d, 8
mov byte [rbp + 4], r10b
mov cl, r10b
add rbp, 8
xor cl, bl
xor dil, cl
ror ebx, 8
ror r10d, 8
sub r15, 1
jne 0x1000563cd
mov rsi, qword [rsp + 0xa8]
mov r12, qword [rsp + 0x90]
mov r13, qword [rsp + 0x98]
cmp dil, byte [r13 + rsi + 8]
je 0x1000566a2
call fcn.100058248
mov r10, rax
and r12, 0xfffffffffffffff8
lea r8, [r12 + 0xfff]
mov r9d, 0xffff
lea r14, [0x1001094ec]
mov r11, qword [rsp + 0xa0]
mov qword [r11 + 0x10], r14
mov rcx, qword [0x1004c43a0]
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 0x1000565ef
mov qword [0x1004c43a0], rcx
movabs rax, 0x8000800080008001
mul rdi
mov rax, qword [rsp + 0x80]
shr rdx, 0xf
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 0x100056698
xor r10d, r10d
test ecx, ecx
jns 0x100056362
neg ecx
shl ecx, 3
shr ebx, cl
shl ebx, cl
jmp 0x100056362
mov ecx, dword [rsp + 0x3c]
mov dword [rsp + 0x60], ecx
mov r14d, ecx
not r14d
jmp 0x100056371
mov rax, qword [rsp + 0x80]
mov qword [r12], rax
add r12, 8
cmp r12, r8
jb 0x100056688
jmp 0x1000567bc
mov r14, qword [rsp + 0x88]
lea r15, [0x100000000]
mov rax, qword [0x1000487b8]
mov rbp, r15
mov rbx, rsi
sub rbx, r14
sub rbp, rax
jne 0x1000566cf
test rbx, rbx
je 0x1000567a9
mov r11, r14
xor edi, edi
mov rcx, qword [0x1001d1e58]
lea r8d, [rcx - 1]
sub r11, rsi
sub esi, r15d
test r8d, r8d
lea r12d, [r13 + rsi]
lea r13, [0x100000000]
js 0x100056726
lea eax, [r8 + rdi]
cdq
sub eax, edx
sar eax, 1
movsxd rdx, eax
mov r9d, dword [r13 + rdx*4 + 0x1d1e5c]
and r9d, 0xfffffff
cmp esi, r9d
jae 0x10005671c
lea r8d, [rax - 1]
jmp 0x100056721
jbe 0x10005672b
lea edi, [rax + 1]
cmp r8d, edi
jge 0x1000566f6
movsxd r10, edi
jmp 0x1000567a2
movsxd r10, eax
jmp 0x1000567a2
mov edx, dword [r13 + r10*4 + 0x1d1e5c]
mov eax, edx
and eax, 0xfffffff
cmp eax, r12d
jae 0x1000567a9
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 0x10005677e
sub edi, 1
je 0x100056779
cmp edi, 1
jne 0x100056784
mov r9, rbp
jmp 0x100056784
mov r9, rbx
jmp 0x100056784
mov r9, rbp
sub r9, rbx
sub edx, 2
je 0x100056794
cmp edx, 1
jne 0x10005679f
add qword [r8 + r11], r9
jmp 0x100056798
add dword [r8 + r11], r9d
mov rcx, qword [0x1001d1e58]
inc r10
mov eax, ecx
cmp r10, rax
jb 0x100056730
mov eax, dword [0x1002f8888]
mov eax, 0x1331773b
mov r11, qword [rsp + 0xa0]
mov qword [r11 + 0x10], r14
mov rcx, qword [rsp + 0xb8]
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