Function at 0x1400303b0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 0x20], rbx
push rsi
push rdi
push r12
push r13
push r14
movsxd r12, dword [rsp + 0x50]
mov r14, r8
mov r13, rdx
mov rbx, rcx
cmp r9d, 0x12
je 0x1400307d3
cmp r9d, 0x18
je 0x140030632
cmp r9d, 0x24
jne 0x1400309e2
mov r9d, dword [rsp + 0x58]
xor edi, edi
test r9d, r9d
jle 0x1400309e2
mov r10d, dword [rsp + 0x60]
mov esi, 0xffff8000
nop dword [rax]
nop word [rax + rax]
movsxd rax, edi
sar rax, 0x10
lea rdx, [rax*4]
add rdx, r13
mov eax, dword [rdx + 0x50]
add eax, dword [rdx + 0x3c]
movsxd r8, eax
movsx rax, word [r14 + 0x1e]
imul r8, rax
mov eax, dword [rdx + 0x58]
add eax, dword [rdx + 0x34]
movsxd rcx, eax
movsx rax, word [r14 + 0x1a]
imul rcx, rax
mov eax, dword [rdx + 0x60]
add eax, dword [rdx + 0x2c]
sar rcx, 0x10
sar r8, 0x10
add r8d, ecx
movsxd rcx, eax
movsx rax, word [r14 + 0x16]
imul rcx, rax
mov eax, dword [rdx + 0x68]
add eax, dword [rdx + 0x24]
sar rcx, 0x10
add r8d, ecx
movsxd rcx, eax
movsx rax, word [r14 + 0x12]
imul rcx, rax
mov eax, dword [rdx + 0x70]
add eax, dword [rdx + 0x1c]
sar rcx, 0x10
add r8d, ecx
movsxd rcx, eax
movsx rax, word [r14 + 0xe]
imul rcx, rax
mov eax, dword [rdx + 0x78]
add eax, dword [rdx + 0x14]
sar rcx, 0x10
add r8d, ecx
movsxd rcx, eax
movsx rax, word [r14 + 0xa]
imul rcx, rax
mov eax, dword [rdx + 0x80]
add eax, dword [rdx + 0xc]
sar rcx, 0x10
add r8d, ecx
movsxd rcx, eax
movsx rax, word [r14 + 6]
imul rcx, rax
mov eax, dword [rdx + 0x88]
add eax, dword [rdx + 4]
sar rcx, 0x10
add r8d, ecx
movsxd rcx, eax
movsx rax, word [r14 + 2]
imul rcx, rax
mov eax, dword [rdx + 0x48]
add eax, dword [rdx + 0x44]
sar rcx, 0x10
add r8d, ecx
movsxd rcx, eax
movsx rax, word [r14 + 0x22]
imul rcx, rax
mov eax, dword [rdx + 0x4c]
add eax, dword [rdx + 0x40]
sar rcx, 0x10
add r8d, ecx
movsxd rcx, eax
movsx rax, word [r14 + 0x20]
imul rcx, rax
mov eax, dword [rdx + 0x54]
add eax, dword [rdx + 0x38]
sar rcx, 0x10
add r8d, ecx
movsxd rcx, eax
movsx rax, word [r14 + 0x1c]
imul rcx, rax
mov eax, dword [rdx + 0x5c]
sar rcx, 0x10
add r8d, ecx
add eax, dword [rdx + 0x30]
movsxd rcx, eax
movsx rax, word [r14 + 0x18]
imul rcx, rax
mov eax, dword [rdx + 0x64]
add eax, dword [rdx + 0x28]
sar rcx, 0x10
add r8d, ecx
movsxd rcx, eax
movsx rax, word [r14 + 0x14]
imul rcx, rax
mov eax, dword [rdx + 0x6c]
add eax, dword [rdx + 0x20]
sar rcx, 0x10
add r8d, ecx
movsxd rcx, eax
movsx rax, word [r14 + 0x10]
imul rcx, rax
mov eax, dword [rdx + 0x74]
add eax, dword [rdx + 0x18]
sar rcx, 0x10
add r8d, ecx
movsxd rcx, eax
movsx rax, word [r14 + 0xc]
imul rcx, rax
mov eax, dword [rdx + 0x7c]
add eax, dword [rdx + 0x10]
sar rcx, 0x10
add r8d, ecx
movsxd rcx, eax
movsx rax, word [r14 + 8]
imul rcx, rax
mov eax, dword [rdx + 0x84]
add eax, dword [rdx + 8]
sar rcx, 0x10
add r8d, ecx
movsxd rcx, eax
movsx rax, word [r14 + 4]
imul rcx, rax
mov eax, dword [rdx + 0x8c]
add eax, dword [rdx]
sar rcx, 0x10
add r8d, ecx
movsxd rcx, eax
movsx rax, word [r14]
imul rcx, rax
sar rcx, 0x10
add r8d, ecx
sar r8d, 5
inc r8d
sar r8d, 1
cmp r8d, 0x7fff
jle 0x140030606
mov r8d, 0x7fff
jmp 0x14003060d
cmp r8d, esi
cmovl r8d, esi
mov word [rbx], r8w
add edi, r10d
add rbx, 2
cmp edi, r9d
jl 0x140030410
mov rax, rbx
mov rbx, qword [rsp + 0x48]
pop r14
pop r13
pop r12
pop rdi
pop rsi
ret
mov r9d, dword [rsp + 0x58]
xor edi, edi
test r9d, r9d
jle 0x1400309e2
mov r10d, dword [rsp + 0x60]
mov esi, 0xffff8000
nop dword [rax]
movsx rcx, word [r14 + 0x16]
movsxd rax, edi
sar rax, 0x10
lea r8, [rax*4]
add r8, r13
mov eax, dword [r8 + 0x30]
add eax, dword [r8 + 0x2c]
cdqe
imul rax, rcx
mov ecx, dword [r8 + 0x38]
add ecx, dword [r8 + 0x24]
movsxd rdx, ecx
movsx rcx, word [r14 + 0x12]
imul rdx, rcx
mov ecx, dword [r8 + 0x40]
add ecx, dword [r8 + 0x1c]
sar rdx, 0x10
sar rax, 0x10
add eax, edx
movsxd rdx, ecx
movsx rcx, word [r14 + 0xe]
imul rdx, rcx
mov ecx, dword [r8 + 0x48]
add ecx, dword [r8 + 0x14]
sar rdx, 0x10
add eax, edx
movsxd rdx, ecx
movsx rcx, word [r14 + 0xa]
imul rdx, rcx
mov ecx, dword [r8 + 0x50]
add ecx, dword [r8 + 0xc]
sar rdx, 0x10
add eax, edx
movsxd rdx, ecx
movsx rcx, word [r14 + 6]
imul rdx, rcx
mov ecx, dword [r8 + 0x58]
add ecx, dword [r8 + 4]
sar rdx, 0x10
add eax, edx
movsxd rdx, ecx
movsx rcx, word [r14 + 2]
imul rdx, rcx
mov ecx, dword [r8 + 0x34]
add ecx, dword [r8 + 0x28]
sar rdx, 0x10
add eax, edx
movsxd rdx, ecx
movsx rcx, word [r14 + 0x14]
imul rdx, rcx
mov ecx, dword [r8 + 0x3c]
add ecx, dword [r8 + 0x20]
sar rdx, 0x10
add eax, edx
movsxd rdx, ecx
movsx rcx, word [r14 + 0x10]
imul rdx, rcx
mov ecx, dword [r8 + 0x44]
add ecx, dword [r8 + 0x18]
sar rdx, 0x10
add eax, edx
movsxd rdx, ecx
movsx rcx, word [r14 + 0xc]
imul rdx, rcx
mov ecx, dword [r8 + 0x4c]
add ecx, dword [r8 + 0x10]
sar rdx, 0x10
add eax, edx
movsxd rdx, ecx
movsx rcx, word [r14 + 8]
imul rdx, rcx
mov ecx, dword [r8 + 0x54]
add ecx, dword [r8 + 8]
sar rdx, 0x10
add eax, edx
movsxd rdx, ecx
movsx rcx, word [r14 + 4]
imul rdx, rcx
mov ecx, dword [r8 + 0x5c]
sar rdx, 0x10
add eax, edx
add ecx, dword [r8]
movsxd rdx, ecx
movsx rcx, word [r14]
imul rdx, rcx
sar rdx, 0x10
add eax, edx
sar eax, 5
inc eax
sar eax, 1
cmp eax, 0x7fff
jle 0x1400307aa
mov eax, 0x7fff
jmp 0x1400307af
cmp eax, esi
cmovl eax, esi
mov word [rbx], ax
add edi, r10d
add rbx, 2
cmp edi, r9d
jl 0x140030650
mov rax, rbx
mov rbx, qword [rsp + 0x48]
pop r14
pop r13
pop r12
pop rdi
pop rsi
ret
mov qword [rsp + 0x38], rbp
xor edi, edi
mov ebp, dword [rsp + 0x58]
test ebp, ebp
jle 0x1400309dd
movsx rdx, r12w
mov esi, 0xffff8000
mov qword [rsp + 0x40], r15
mov r15d, dword [rsp + 0x60]
mov qword [rsp + 0x30], rdx
nop
movsxd rcx, edi
movzx r8d, cx
mov rax, rcx
sar rax, 0x10
imul r8, rdx
lea r11, [rax*4]
add r11, r13
sar r8, 0x10
lea eax, [r8 + r8*8]
movsxd rcx, eax
lea rdx, [r14 + rcx*2]
movsxd rax, dword [r11 + 0x20]
movsx r9, word [rdx + 0x10]
movsx rcx, word [rdx + 0xe]
imul r9, rax
movsxd rax, dword [r11 + 0x1c]
imul rcx, rax
movsxd rax, dword [r11 + 0x18]
sar rcx, 0x10
sar r9, 0x10
add r9d, ecx
movsx rcx, word [rdx + 0xc]
imul rcx, rax
movsxd rax, dword [r11 + 0x14]
sar rcx, 0x10
add r9d, ecx
movsx rcx, word [rdx + 0xa]
imul rcx, rax
movsxd rax, dword [r11 + 0x10]
sar rcx, 0x10
add r9d, ecx
movsx rcx, word [rdx + 8]
imul rcx, rax
movsxd rax, dword [r11 + 0xc]
sar rcx, 0x10
add r9d, ecx
movsx rcx, word [rdx + 6]
imul rcx, rax
movsxd rax, dword [r11 + 8]
sar rcx, 0x10
add r9d, ecx
movsx rcx, word [rdx + 4]
imul rcx, rax
movsxd rax, dword [r11 + 4]
sar rcx, 0x10
add r9d, ecx
movsx rcx, word [rdx + 2]
imul rcx, rax
movsxd rax, dword [r11]
sar rcx, 0x10
add r9d, ecx
movsx rcx, word [rdx]
movsxd rdx, dword [r11 + 0x3c]
imul rcx, rax
mov eax, r12d
sub eax, r8d
sar rcx, 0x10
movsxd r8, dword [r11 + 0x38]
add r9d, ecx
lea eax, [rax + rax*8]
movsxd rcx, eax
movsx rax, word [r14 + rcx*2 - 0xe]
lea r10, [r14 + rcx*2]
movsxd rcx, dword [r11 + 0x40]
imul rdx, rax
movsx rax, word [r10 - 0x10]
imul rcx, rax
movsx rax, word [r10 - 0xc]
sar rcx, 0x10
imul r8, rax
movsxd rax, dword [r11 + 0x34]
sar rdx, 0x10
add edx, r9d
sar r8, 0x10
movsx r9, word [r10 - 8]
add edx, ecx
movsx rcx, word [r10 - 0xa]
imul rcx, rax
movsxd rax, dword [r11 + 0x30]
sar rcx, 0x10
add r8d, edx
movsx rdx, word [r10 - 4]
add r8d, ecx
movsx rcx, word [r10 - 6]
imul r9, rax
movsxd rax, dword [r11 + 0x2c]
imul rcx, rax
movsxd rax, dword [r11 + 0x28]
imul rdx, rax
movsxd rax, dword [r11 + 0x24]
sar rcx, 0x10
sar r9, 0x10
add r9d, r8d
sar rdx, 0x10
movsxd r8, dword [r11 + 0x44]
add r9d, ecx
movsx rcx, word [r10 - 2]
add edx, r9d
imul rcx, rax
movsx rax, word [r10 - 0x12]
imul r8, rax
sar rcx, 0x10
sar r8, 0x10
add edx, ecx
add r8d, edx
sar r8d, 5
inc r8d
sar r8d, 1
cmp r8d, 0x7fff
jle 0x1400309b9
mov r8d, 0x7fff
jmp 0x1400309c0
cmp r8d, esi
cmovl r8d, esi
mov rdx, qword [rsp + 0x30]
add edi, r15d
mov word [rbx], r8w
add rbx, 2
cmp edi, ebp
jl 0x140030800
mov r15, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x38]
mov rax, rbx
mov rbx, qword [rsp + 0x48]
pop r14
pop r13
pop r12
pop rdi
pop rsi
ret