Function at 0x1003c335c
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 [0x1003fe1f8]
xor rax, rsp
mov qword [rsp + 0xa8], rax
mov r15d, 0x269ec3
lea r11, [0x100000000]
mov eax, dword [0x100015b94]
mov r14d, 0xfffffff
mov r12, qword [rcx + 0x10]
mov r13d, 0x8000
mov qword [rsp + 0x78], rdx
mov edx, dword [r12 + 1]
and rdx, r14
lea rsi, [rax + rdx - 1]
mov qword [rsp + 0x98], rcx
mov rcx, rax
mov rax, rsi
xor edx, edx
div rcx
mov eax, dword [0x100015b94]
sub rsi, rdx
mov eax, dword [0x100015b94]
mov eax, dword [0x10028bffc]
mov r10d, dword [0x10028bffc]
test eax, eax
je 0x1003c347e
xor r8d, r8d
xor eax, eax
mov edi, dword [0x10028bffc]
dec edi
inc rdi
mov r9, rdi
je 0x1003c3438
mov rcx, qword [0x1003feeb8]
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 0x1003c340d
mov qword [0x1003feeb8], rcx
xor edx, edx
div rdi
test r10, r10
je 0x1003c3473
mov eax, 0xef0b
mov ecx, 0xffff10f4
inc r8
lock cmpxchg dword [r11 + rdx*4 + 0x41a130], ecx
je 0x1003c3709
mov ecx, dword [0x10028bffc]
lea rax, [rdx + 1]
xor edx, edx
div rcx
cmp r8, r10
jb 0x1003c3442
xor ebx, ebx
test rbx, rbx
jne 0x1003c359f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
xor edi, edi
mov rcx, qword [0x10041aa98]
inc rdi
mov r8, rcx
xor eax, eax
mov r9, rcx
test rcx, rcx
je 0x1003c34d1
mov rcx, qword [0x1003feeb8]
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 0x1003c34a6
mov qword [0x1003feeb8], rcx
mov r9d, 0x40
xor edx, edx
div r8
mov rcx, rdx
mov r8d, 0x3000
shl rcx, 0x10
mov rdx, rsi
add rcx, qword [0x10041cce0]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rbx, rax
test rax, rax
je 0x1003c3539
and qword [rsp + 0x28], 0
and qword [rsp + 0x20], 0
mov rdx, rax
mov rcx, rax
mov r8d, esi
lea r9, [0x100363f08]
or rcx, 3
call qword [sym.imp.ntdll.dll_RtlInstallFunctionTableCallback]
test al, al
jne 0x1003c354d
xor edx, edx
mov rcx, rbx
mov r8d, r13d
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
cmp rdi, 0x11
jb 0x1003c3488
xor ebx, ebx
cmp rbx, 0x10000
jb 0x1003c355b
test bl, 3
je 0x1003c357d
test rbx, rbx
je 0x1003c357b
mov rcx, rbx
or rcx, 3
call qword [sym.imp.ntdll.dll_RtlDeleteFunctionTable]
xor edx, edx
mov r8d, r13d
mov rcx, rbx
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 0x1003c33d6
mov rdi, rbx
mov rcx, rsi
xor eax, eax
rep stosb byte [rdi], al
mov eax, 0x78b428c9
lea r15, [0x100000000]
mov edx, dword [r12 + 5]
mov r13d, dword [r12 + 1]
and r13, r14
and edx, 7
lea rbp, [rdx + r12 + 9]
mov r8d, dword [0x100015b94]
mov qword [rsp + 0x90], r13
mov qword [rsp + 0x88], rbp
sub r8, r13
xor eax, eax
mov esi, ebp
sub esi, r15d
mov dword [rsp + 0x50], esi
inc r8
mov rdi, r8
je 0x1003c3623
mov rcx, qword [0x1003feeb8]
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
test rdi, rdi
jne 0x1003c35f4
mov qword [0x1003feeb8], rcx
xor edx, edx
mov ecx, esi
div r8
lea r12, [rdx + rbx]
mov r8, r12
mov rdx, r13
mov qword [rsp + 0x70], r12
mov eax, 0x3b428e16
xor dil, dil
mov rdx, qword [r13 + rbp]
mov qword [rsp + 0x68], rdx
lea rcx, [rsp + 0x68]
mov eax, 0x75c63096
mov rcx, r15
mov rax, qword [0x10014d838]
mov rbx, qword [rsp + 0x68]
mov r9d, dword [rsp + 0x6c]
and qword [rsp + 0x48], 0
and rbx, r14
and r9, r14
mov r14d, 4
add rbx, r15
sub rcx, rax
mov qword [rsp + 0x58], rcx
jne 0x1003c3720
xor r10d, r10d
test r9, r9
je 0x1003c3a50
mov r8d, dword [rsp + 0x48]
mov eax, dword [rsp + 0x4c]
movzx ecx, byte [r10 + rbx]
inc r10
add ecx, 0x7e62aa84
add r8d, ecx
add ecx, eax
mov eax, ecx
imul eax, eax, 0x1f9e
rol eax, 4
ror ecx, 4
xor eax, ecx
imul rax, rax, 0x7e62aa84
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 0x1003c36a1
mov dword [rsp + 0x4c], eax
mov dword [rsp + 0x48], r8d
jmp 0x1003c3a50
mov ecx, dword [0x100015b94]
imul rcx, rdx
lea rbx, [rcx + r11 + 0x3df000]
jmp 0x1003c3475
lea rax, [rbx + r9]
movsxd rcx, dword [0x10000003c]
mov r8d, dword [rcx + r15 + 0xb0]
add r8, r15
mov ecx, dword [rcx + r15 + 0xb4]
mov qword [rsp + 0x80], rax
mov eax, ebx
sub eax, r15d
lea r12, [rax + r9]
mov r10d, eax
and r10, 0xfffffffffffff000
mov r15, r12
mov r11d, eax
sub r11, r10
and r15, 0xfffffffffffff000
sub r12, r15
add rcx, r8
mov qword [rsp + 0x30], rcx
mov qword [rsp + 0x40], r12
jmp 0x1003c378a
mov eax, dword [r8]
cmp rax, r10
jae 0x1003c378f
mov eax, dword [r8 + 4]
add r8, rax
cmp r8, rcx
jne 0x1003c377b
xor esi, esi
cmp r8, rcx
je 0x1003c37cd
mov eax, dword [r8]
cmp rax, r10
jne 0x1003c37cd
mov ecx, dword [r8 + 4]
sub rcx, 8
shr rcx, 1
je 0x1003c37c8
lea rdx, [r8 + 8]
movzx eax, word [rdx]
and eax, 0xfff
cmp rax, r11
jae 0x1003c37c8
inc rsi
add rdx, 2
cmp rsi, rcx
jne 0x1003c37af
mov rcx, qword [rsp + 0x30]
mov r10d, dword [rsp + 0x48]
mov r9d, dword [rsp + 0x4c]
mov rbp, qword [rsp + 0x58]
cmp r8, rcx
je 0x1003c39b5
mov eax, dword [r8]
cmp rax, r15
ja 0x1003c39b5
mov edx, dword [r8 + 4]
lea rax, [rdx - 8]
shr rax, 1
cmp rsi, rax
jne 0x1003c381d
add r8, rdx
cmp r8, rcx
je 0x1003c39b5
mov eax, dword [r8]
cmp rax, r15
ja 0x1003c39b5
xor esi, esi
jmp 0x1003c37f1
mov eax, dword [r8]
cmp rax, r15
jne 0x1003c3839
movzx eax, word [r8 + rsi*2 + 8]
and eax, 0xfff
cmp rax, r12
jae 0x1003c39b5
mov rax, rsi
inc rsi
mov edx, 0xf000
test word [r8 + rax*2 + 8], dx
je 0x1003c37dc
movzx r11d, word [r8 + rax*2 + 8]
lea rax, [0x100000000]
xor edi, edi
mov r12d, r11d
and r12d, 0xfff
add r12d, dword [r8]
add r12, rax
mov rax, r12
sub rax, rbx
je 0x1003c38de
mov r13, rax
movzx ecx, byte [rbx + rdi]
inc rdi
add ecx, 0x7e62aa84
add r10d, ecx
add ecx, r9d
mov eax, ecx
imul eax, eax, 0x1f9e
rol eax, 4
ror ecx, 4
xor eax, ecx
imul rax, rax, 0x7e62aa84
mov qword [rsp + 0x60], rax
mov ecx, dword [rsp + 0x60]
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 r10d, r9d
cmp rdi, r13
jb 0x1003c3876
mov dword [rsp + 0x4c], r9d
mov dword [rsp + 0x48], r10d
mov rax, qword [r12]
mov qword [rsp + 0x60], rax
shr r11d, 0xc
cmp r11d, 3
je 0x1003c38ff
sub r11d, 0xa
neg r11d
sbb edx, edx
add edx, 3
jmp 0x1003c3904
mov edx, 2
mov r11, rbp
neg r11
sub edx, 2
je 0x1003c392a
cmp edx, 1
je 0x1003c391a
or r11, 0xffffffffffffffff
jmp 0x1003c3932
add rax, r11
mov qword [rsp + 0x60], rax
mov r11d, 8
jmp 0x1003c3932
add dword [rsp + 0x60], r11d
mov r11, r14
xor ebx, ebx
test r11, r11
je 0x1003c39a2
movzx ecx, byte [rsp + rbx + 0x60]
inc rbx
add ecx, 0x7e62aa84
add r10d, ecx
add ecx, r9d
mov eax, ecx
imul eax, eax, 0x1f9e
rol eax, 4
ror ecx, 4
xor eax, ecx
imul rax, rax, 0x7e62aa84
mov qword [rsp + 0x58], rax
mov ecx, dword [rsp + 0x58]
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 r10d, r9d
cmp rbx, r11
jb 0x1003c3939
mov dword [rsp + 0x4c], r9d
mov dword [rsp + 0x48], r10d
lea rbx, [r11 + r12]
mov rcx, qword [rsp + 0x30]
mov r12, qword [rsp + 0x40]
jmp 0x1003c37dc
mov rbp, qword [rsp + 0x88]
xor r8d, r8d
mov dil, r8b
mov r13, qword [rsp + 0x90]
mov r11, qword [rsp + 0x80]
sub r11, rbx
je 0x1003c3a47
movzx ecx, byte [rbx + r8]
inc r8
add ecx, 0x7e62aa84
add r10d, ecx
add ecx, r9d
mov eax, ecx
imul eax, eax, 0x1f9e
rol eax, 4
ror ecx, 4
xor eax, ecx
imul rax, rax, 0x7e62aa84
mov qword [rsp + 0x80], rax
shr rax, 0x20
mov ecx, dword [rsp + 0x80]
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, r11
jb 0x1003c39d8
mov dword [rsp + 0x4c], r9d
mov dword [rsp + 0x48], r10d
mov r12, qword [rsp + 0x70]
mov esi, dword [rsp + 0x50]
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 0x1003c3a52
mov eax, 0xbf8d7c34
xor ebx, ebx
mov r10, r12
mov r15, rbp
mov rax, qword [rsp + 0xa0]
mov qword [rsp + 0x30], r12
mov r12, r13
mov r11d, esi
and r12d, 7
not r11d
je 0x1003c3f4d
mov dword [rsp + 0x40], ebx
xor r8d, r8d
xor r10d, r10d
mov dword [rsp + 0x58], r8d
test r12d, r12d
jle 0x1003c3ae4
lea r9d, [rbx + 0x38]
movzx edx, byte [r15]
cmp r10d, r14d
jge 0x1003c3ac4
lea ecx, [r9 - 0x20]
shl edx, cl
or ebx, edx
jmp 0x1003c3acc
mov ecx, r9d
shl edx, cl
or r8d, edx
inc r10d
inc r15
sub r9d, 8
cmp r10d, r12d
jl 0x1003c3ab1
mov dword [rsp + 0x40], ebx
mov dword [rsp + 0x58], r8d
movzx r8d, word [rsp + 0xa6]
movzx r10d, word [rsp + 0xa4]
mov esi, dword [rsp + 0xa4]
movzx r9d, word [rsp + 0xa2]
mov ecx, eax
mov ebx, dword [rsp + 0xa4]
xor ecx, r11d
xor ebx, eax
sub esi, ecx
xor ebx, r11d
movzx r11d, ax
xor esi, dword [rsp + 0x50]
xor ebx, esi
mov ecx, ebx
mov edx, ebx
shr ecx, 8
xor edx, r11d
imul edx, r10d
add edx, ecx
xor esi, edx
mov edx, dword [rsp + 0xa4]
mov ecx, esi
sub edx, esi
ror edx, 3
ror ecx, 8
imul edx, r9d
add ecx, edx
mov edx, dword [rsp + 0xa4]
xor ebx, ecx
mov ecx, ebx
xor edx, ebx
ror edx, 6
rol ecx, 5
imul edx, r11d
add ecx, edx
xor esi, ecx
mov ecx, esi
ror ecx, 0xa
sub ecx, r8d
imul ecx, r10d
xor ebx, ecx
mov edx, ebx
mov ecx, ebx
xor ecx, r8d
ror edx, 0xf
imul ecx, r10d
sub ecx, edx
xor esi, ecx
mov edx, esi
mov ecx, esi
shr ecx, 0xb
xor edx, r10d
imul edx, r9d
xor edx, ecx
xor ebx, edx
mov ecx, ebx
shr ecx, 0xc
mov edx, ebx
xor edx, r9d
rol edx, 4
imul edx, r11d
add edx, ecx
xor esi, edx
lea edx, [rax + rsi]
rol edx, 0xf
mov ecx, esi
ror ecx, 0xe
imul edx, r8d
add ecx, edx
xor ebx, ecx
mov ecx, ebx
sub ecx, eax
sub ecx, r10d
xor esi, ecx
mov ecx, esi
not ecx
ror ecx, 0xd
add ecx, r9d
imul ecx, r11d
xor ebx, ecx
mov ecx, ebx
mov edx, ebx
xor edx, r10d
xor r9d, r9d
rol edx, 6
rol ecx, 0xe
imul edx, r11d
mov r11d, dword [rsp + 0x58]
add ecx, edx
xor ebx, r11d
mov r8d, ebx
xor ecx, dword [rsp + 0x40]
xor esi, ecx
test r12d, r12d
mov edx, esi
jle 0x1003c3c39
mov rcx, qword [rsp + 0x30]
cmp r9d, r14d
jge 0x1003c3c1f
rol edx, 8
mov byte [rcx], dl
inc rcx
xor dil, dl
jmp 0x1003c3c2c
rol r8d, 8
mov byte [rcx], r8b
inc rcx
xor dil, r8b
inc r9d
cmp r9d, r12d
jl 0x1003c3c0d
mov qword [rsp + 0x30], rcx
lea ecx, [r12 - 4]
test ecx, ecx
jle 0x1003c3f35
sub r14d, ecx
shl r14d, 3
mov ecx, r14d
shr ebx, cl
shl ebx, cl
mov r10, qword [rsp + 0x30]
mov r14d, dword [rsp + 0x40]
mov r12, r13
shr r12, 3
test r12, r12
je 0x1003c3e7a
movzx ebp, word [rsp + 0xa4]
mov ecx, dword [rsp + 0xa4]
xor ecx, eax
mov dword [rsp + 0x50], ecx
movzx ecx, word [rsp + 0xa6]
mov r13d, dword [rsp + 0x50]
mov dword [rsp + 0x58], ecx
movzx ecx, word [rsp + 0xa2]
mov dword [rsp + 0x30], ecx
movzx ecx, ax
mov dword [rsp + 0x40], ecx
mov edx, dword [rsp + 0xa4]
movzx r9d, byte [r15 + 1]
movzx r8d, byte [r15 + 4]
movzx ecx, byte [r15]
shl ecx, 8
shl r8d, 8
or r9d, ecx
movzx ecx, byte [r15 + 2]
add r15, 8
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
shl r8d, 8
movzx ecx, byte [r15 - 1]
or r8d, ecx
mov ecx, eax
xor ebx, r8d
xor ecx, ebx
sub edx, ecx
xor edx, r9d
xor esi, edx
xor ebx, esi
xor ebx, r13d
mov edx, ebx
mov ecx, ebx
xor edx, dword [rsp + 0x40]
shr ecx, 8
imul edx, ebp
add edx, ecx
xor esi, edx
mov ecx, esi
mov edx, dword [rsp + 0xa4]
sub edx, esi
ror edx, 3
ror ecx, 8
imul edx, dword [rsp + 0x30]
add ecx, edx
xor ebx, ecx
mov ecx, ebx
mov edx, dword [rsp + 0xa4]
xor edx, ebx
ror edx, 6
rol ecx, 5
imul edx, dword [rsp + 0x40]
add ecx, edx
xor esi, ecx
mov ecx, esi
ror ecx, 0xa
movzx edx, word [rsp + 0xa6]
sub ecx, edx
imul ecx, ebp
xor ebx, ecx
mov ecx, ebx
xor ecx, dword [rsp + 0x58]
mov edx, ebx
ror edx, 0xf
imul ecx, ebp
sub ecx, edx
xor esi, ecx
movzx ecx, word [rsp + 0xa2]
mov edx, esi
xor edx, ebp
imul edx, ecx
mov ecx, esi
shr ecx, 0xb
xor edx, ecx
xor ebx, edx
mov edx, ebx
movzx ecx, word [rsp + 0xa2]
xor edx, ecx
mov ecx, ebx
rol edx, 4
imul edx, dword [rsp + 0x40]
shr ecx, 0xc
add edx, ecx
xor esi, edx
mov ecx, esi
lea edx, [rax + rsi]
rol edx, 0xf
ror ecx, 0xe
imul edx, dword [rsp + 0x58]
add ecx, edx
xor ebx, ecx
movzx edx, word [rsp + 0xa2]
mov ecx, ebx
sub ecx, eax
sub ecx, ebp
xor esi, ecx
mov ecx, esi
not ecx
ror ecx, 0xd
add ecx, edx
imul ecx, dword [rsp + 0x40]
xor ebx, ecx
mov edx, ebx
mov ecx, ebx
xor ebx, r11d
xor edx, ebp
mov byte [r10 + 7], bl
rol edx, 6
mov r11d, r8d
rol ecx, 0xe
imul edx, dword [rsp + 0x40]
add ecx, edx
xor ecx, r14d
mov r14d, r9d
xor esi, ecx
mov byte [r10 + 3], sil
xor dil, sil
ror esi, 8
mov byte [r10 + 2], sil
xor dil, bl
ror ebx, 8
mov byte [r10 + 6], bl
xor dil, sil
ror esi, 8
xor dil, bl
mov byte [r10 + 1], sil
ror ebx, 8
mov byte [r10 + 5], bl
xor dil, sil
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 r12, 1
jne 0x1003c3ca7
mov rbp, qword [rsp + 0x88]
mov r13, qword [rsp + 0x90]
mov al, byte [r13 + rbp + 8]
xor al, dil
je 0x1003c3f6d
call fcn.1000024bc
mov r10d, 0xffff
lea r12, [0x100059e28]
mov rbx, qword [rsp + 0x98]
mov r11, rax
lea r8, [rbx + 0x18]
mov rax, 0xfffffffffffff000
and r8, 0xfffffffffffffff8
mov qword [rbx + 0x10], r12
mov rcx, qword [0x1003feeb8]
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 0x1003c3ece
mov qword [0x1003feeb8], rcx
movabs rax, 0x8000800080008001
mul rdi
shr rdx, 0xf
mov rax, qword [rsp + 0x78]
mov qword [rax + 0x98], r11
imul rdx, rdx, 0xffff
sub rdi, rdx
inc rdi
mov qword [rax + 0xb0], rdi
mov qword [rsp + 0x78], r10
jmp 0x1003c3f63
xor ebx, ebx
test ecx, ecx
jns 0x1003c3c54
neg ecx
shl ecx, 3
shr esi, cl
shl esi, cl
jmp 0x1003c3c54
mov r14d, esi
xor esi, esi
jmp 0x1003c3c5e
mov rax, qword [rsp + 0x78]
mov qword [r8], rax
add r8, 8
cmp r8, r9
jb 0x1003c3f57
jmp 0x1003c4082
mov rbx, rbp
mov r12, qword [rsp + 0x70]
sub rbx, r12
mov rax, qword [0x10014d838]
lea r14, [0x100000000]
mov rsi, r14
sub rsi, rax
jne 0x1003c3f97
test rbx, rbx
je 0x1003c406f
mov r11, r12
lea r15, [0x100000000]
mov rcx, qword [0x1000199f8]
xor edi, edi
sub r11, rbp
lea r8d, [rcx - 1]
sub ebp, r14d
add r13d, ebp
test r8d, r8d
js 0x1003c3fec
lea eax, [r8 + rdi]
cdq
sub eax, edx
sar eax, 1
movsxd rdx, eax
mov r9d, dword [r15 + rdx*4 + 0x199fc]
and r9d, 0xfffffff
cmp ebp, r9d
jae 0x1003c3fe2
lea r8d, [rax - 1]
jmp 0x1003c3fe7
jbe 0x1003c3ff1
lea edi, [rax + 1]
cmp r8d, edi
jge 0x1003c3fbc
movsxd r10, edi
jmp 0x1003c4068
movsxd r10, eax
jmp 0x1003c4068
mov edx, dword [r15 + r10*4 + 0x199fc]
mov eax, edx
and eax, 0xfffffff
cmp eax, r13d
jae 0x1003c406f
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 0x1003c4044
sub edi, 1
je 0x1003c403f
cmp edi, 1
jne 0x1003c404a
mov r9, rsi
jmp 0x1003c404a
mov r9, rbx
jmp 0x1003c404a
mov r9, rsi
sub r9, rbx
sub edx, 2
je 0x1003c405a
cmp edx, 1
jne 0x1003c4065
add qword [r8 + r11], r9
jmp 0x1003c405e
add dword [r8 + r11], r9d
mov rcx, qword [0x1000199f8]
inc r10
mov eax, ecx
cmp r10, rax
jb 0x1003c3ff6
mov eax, dword [0x100015b94]
mov eax, 0xb781b31c
mov rbx, qword [rsp + 0x98]
mov qword [rbx + 0x10], r12
mov rcx, qword [rsp + 0xa8]
xor rcx, rsp
call fcn.1002d7828
mov rbx, qword [rsp + 0x100]
add rsp, 0xb0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret