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

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x118
cmp dword [rsp + 0x180], 5
mov r15, rdx
mov rbx, rcx
mov rdx, qword [rcx + 0x70]
mov qword [rsp + 0x170], r8
mov qword [rsp + 0x178], r9
mov r8d, dword [rcx + 0x108]
je 0x140182e1b
cmp dword [rsp + 0x180], 6
je 0x140182e27
imul eax, dword [r15], 0x9e3779b1
mov ecx, 0x20
sub ecx, r8d
shr eax, cl
jmp 0x140182e40
movabs rax, 0xcf1bbcdcbb000000
jmp 0x140182e31
movabs rax, 0xcf1bbcdcbf9b0000
imul rax, qword [r15]
mov ecx, 0x40
sub ecx, r8d
shr rax, cl
lea rax, [rdx + rax*4]
mov ecx, dword [rbx + 0x1c]
mov qword [rsp + 0x88], rax
mov r11d, dword [rax]
mov rax, qword [rbx + 8]
mov edx, dword [rbx + 0x28]
mov r9d, dword [rbx + 0x100]
mov qword [rsp + 0x70], rax
mov rsi, qword [rsp + 0x70]
mov rax, r15
sub rax, rsi
xor esi, esi
mov qword [rsp + 0x50], rax
mov eax, dword [rsp + 0x50]
mov r8d, eax
mov dword [rsp + 0xd8], eax
call fcn.1401b70a0
mov dword [rsp + 0x58], esi
mov dword [rsp + 0x9c], eax
mov rax, qword [rbx + 0x80]
mov qword [rsp + 0x40], rax
mov eax, dword [rbx + 0x104]
lea ecx, [rax - 1]
mov eax, 1
shl eax, cl
dec eax
cmp eax, r8d
mov dword [rsp + 0x98], eax
jae 0x140182ecf
mov edi, dword [rsp + 0x98]
mov eax, r8d
sub eax, edi
mov dword [rsp + 0x58], eax
mov esi, dword [rsp + 0x9c]
mov edx, 1
cmp dword [rsp + 0x58], esi
mov ecx, dword [rbx + 0x10c]
mov eax, esi
mov rsi, qword [rsp + 0x40]
cmovae eax, dword [rsp + 0x58]
xor edi, edi
shl edx, cl
mov dword [rsp + 0xa0], eax
mov eax, dword [rsp + 0x98]
mov dword [rsp + 0x3c], edx
mov dword [rsp + 0x68], edx
and eax, r11d
add eax, eax
shl rax, 2
lea r8, [rsi + rax]
lea rax, [rsi + rax + 4]
cmp dword [rsp + 0xa0], r11d
jae 0x140182f6f
cmp dword [rax], 1
jne 0x140182f61
cmp dword [rsp + 0x68], 1
je 0x140182f61
dec dword [rsp + 0x68]
mov dword [rax], edi
mov eax, dword [rsp + 0x98]
mov edx, dword [r8]
mov rdi, qword [rsp + 0x40]
and eax, edx
add eax, eax
shl rax, 2
lea r8, [rdi + rax]
lea rax, [rdi + rax + 4]
mov edi, r11d
mov r11d, edx
jmp 0x140182f1d
cmp dword [rax], 1
jne 0x140182f6f
xor r10d, r10d
mov dword [rax], r10d
mov dword [r8], r10d
mov rax, qword [rbx + 0x10]
mov qword [rsp + 0x60], rax
lea rax, [rsp + 0x10c]
mov qword [rsp + 0xd0], rax
mov eax, dword [rbx + 0x18]
mov qword [rsp + 0x48], rax
mov rsi, qword [rsp + 0x48]
mov dword [rsp + 0xb4], eax
mov rax, qword [rsp + 0x60]
add rax, rsi
test edi, edi
mov qword [rsp + 0xb8], rax
je 0x14018327e
mov eax, dword [rsp + 0x98]
mov rsi, qword [rsp + 0x40]
and eax, edi
add eax, eax
mov eax, dword [rsi + rax*4 + 4]
mov esi, dword [rsp + 0xb4]
mov dword [rsp + 0xdc], eax
mov rax, qword [rbx + 0x80]
mov qword [rsp + 0xc0], rax
mov eax, dword [rbx + 0x104]
lea ecx, [rax - 1]
mov eax, 1
shl eax, cl
dec eax
cmp edi, esi
mov dword [rsp + 0xc8], eax
mov rax, qword [rbx + 8]
mov qword [rsp + 0x78], rax
mov eax, edi
jb 0x140183027
mov rsi, qword [rsp + 0x78]
mov r8, qword [rsp + 0x170]
add rax, rsi
mov qword [rsp + 0x90], rax
jmp 0x14018303f
mov rsi, qword [rsp + 0x60]
mov r8, qword [rsp + 0xb8]
add rax, rsi
mov qword [rsp + 0x90], rax
mov rsi, qword [rsp + 0x48]
mov edx, edi
mov rax, qword [rsp + 0x78]
mov rcx, qword [rsp + 0xc0]
add rax, rsi
mov qword [rsp + 0xe0], rax
mov eax, dword [rsp + 0xc8]
and eax, edi
add eax, eax
lea r13, [rcx + rax*4]
mov eax, dword [rbx + 0x1c]
mov ecx, dword [rbx + 0x100]
lea r10, [r13 + 4]
mov ebp, dword [r13]
mov dword [rsp + 0xb0], eax
mov esi, dword [rsp + 0xb0]
mov eax, 1
shl eax, cl
sub edx, esi
cmp eax, edx
jae 0x1401830a4
mov esi, edi
sub esi, eax
mov dword [rsp + 0xb0], esi
mov eax, dword [rsp + 0x68]
xor r9d, r9d
mov qword [rsp + 0xa8], r9
mov qword [rsp + 0x80], r9
mov dword [rsp + 0xcc], eax
cmp dword [rsp + 0xcc], 0
je 0x140183265
cmp dword [rsp + 0xb0], ebp
jae 0x140183265
mov eax, dword [rsp + 0xc8]
mov r14d, ebp
mov rcx, qword [rsp + 0xa8]
mov rdx, qword [rsp + 0xc0]
mov r12, qword [rsp + 0x78]
and eax, ebp
add eax, eax
mov rsi, rcx
cmp qword [rsp + 0x80], rcx
cmovbe rsi, qword [rsp + 0x80]
cmp dword [rsp + 0x188], 1
lea r11, [rdx + rax*4]
mov rax, qword [rsp + 0x90]
lea rcx, [rax + rsi]
jne 0x14018314c
mov rdx, qword [rsp + 0x48]
lea rax, [rsi + r14]
cmp rax, rdx
jae 0x14018314c
mov eax, dword [rsp + 0xb4]
cmp edi, eax
jae 0x14018317d
mov r12, qword [rsp + 0x60]
add r12, r14
mov qword [rsp + 0xf0], r10
lea rdx, [r12 + rsi]
mov qword [rsp + 0xe8], r11
call fcn.1401b4180
mov r11, qword [rsp + 0xe8]
mov r10, qword [rsp + 0xf0]
add rsi, rax
jmp 0x1401831ee
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0xf8], r10
mov r9, qword [rsp + 0xb8]
mov qword [rsp + 0xf0], r11
mov qword [rsp + 0xe8], r8
lea r12, [rax + r14]
mov rax, qword [rsp + 0xe0]
lea rdx, [r12 + rsi]
mov qword [rsp + 0x20], rax
call fcn.1401b44f0
mov rcx, qword [rsp + 0x48]
add rsi, rax
mov r8, qword [rsp + 0xe8]
lea rax, [rsi + r14]
mov r11, qword [rsp + 0xf0]
mov r10, qword [rsp + 0xf8]
cmp rax, rcx
jb 0x1401831ee
mov rax, qword [rsp + 0x78]
lea r12, [rax + r14]
mov rax, qword [rsp + 0x90]
add rax, rsi
cmp r8, rax
je 0x140183265
mov al, byte [rax]
cmp byte [r12 + rsi], al
jae 0x14018321d
cmp dword [rsp + 0xa0], ebp
mov dword [r13], ebp
jae 0x140183253
mov ebp, dword [r11 + 4]
lea r13, [r11 + 4]
jmp 0x14018323f
cmp dword [rsp + 0xa0], ebp
mov dword [r10], ebp
jae 0x14018325d
mov qword [rsp + 0xa8], rsi
mov ebp, dword [r11]
mov r10, r11
mov rsi, qword [rsp + 0x80]
dec dword [rsp + 0xcc]
mov qword [rsp + 0x80], rsi
jmp 0x1401830c2
mov r13, qword [rsp + 0xd0]
jmp 0x140183265
mov r10, qword [rsp + 0xd0]
xor ecx, ecx
mov edi, dword [rsp + 0xdc]
inc dword [rsp + 0x68]
mov dword [r10], ecx
mov dword [r13], ecx
jmp 0x140182f88
mov rax, qword [rsp + 0x70]
xor edx, edx
mov edi, dword [rsp + 0x50]
mov qword [rsp + 0x78], rdx
mov qword [rsp + 0x68], rdx
add rax, rsi
mov qword [rsp + 0x90], rax
mov eax, dword [rsp + 0x98]
and eax, edi
mov rdi, qword [rsp + 0x40]
add eax, eax
shl rax, 2
lea r13, [rdi + rax]
lea r14, [rdi + rax + 4]
mov eax, dword [rsp + 0x50]
mov edi, dword [rsp + 0x50]
mov qword [rsp + 0x50], rdx
add eax, 9
mov dword [rsp + 0x80], eax
mov rax, qword [rsp + 0x88]
mov esi, dword [rax]
mov dword [rax], edi
cmp dword [rsp + 0x3c], 0
je 0x1401834ac
cmp dword [rsp + 0x9c], esi
jae 0x1401834ac
mov eax, dword [rsp + 0x98]
mov r12d, esi
mov rdi, qword [rsp + 0x40]
and eax, esi
add eax, eax
lea r11, [rdi + rax*4]
mov rdi, qword [rsp + 0x78]
cmp qword [rsp + 0x68], rdi
cmovbe rdi, qword [rsp + 0x68]
cmp dword [rsp + 0x188], 1
lea rcx, [r15 + rdi]
jne 0x140183339
mov rdx, qword [rsp + 0x48]
lea rax, [rdi + r12]
cmp rax, rdx
jb 0x140183369
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x88], r11
mov r8, qword [rsp + 0x170]
lea rbp, [rax + r12]
lea rdx, [rbp + rdi]
call fcn.1401b4180
mov r11, qword [rsp + 0x88]
add rax, rdi
jmp 0x1401833c3
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0x88], r11
mov r9, qword [rsp + 0xb8]
mov r8, qword [rsp + 0x170]
lea rbp, [rax + r12]
mov rax, qword [rsp + 0x90]
lea rdx, [rbp + rdi]
mov qword [rsp + 0x20], rax
call fcn.1401b44f0
mov r11, qword [rsp + 0x88]
add rax, rdi
mov rdi, qword [rsp + 0x48]
lea rdx, [rax + r12]
cmp rdx, rdi
jb 0x1401833c3
mov rdi, qword [rsp + 0x70]
lea rbp, [rdi + r12]
cmp qword [rsp + 0x50], rax
jae 0x140183455
mov edx, dword [rsp + 0x80]
mov r8d, eax
sub edx, esi
cmp rdx, rax
jae 0x1401833e9
lea edi, [rsi + rax]
mov dword [rsp + 0x80], edi
mov r9d, dword [rsp + 0xd8]
mov rcx, qword [rsp + 0x178]
mov edi, dword [rsp + 0x50]
sub r9d, esi
lea edx, [r9 + 1]
bsr edx, edx
sub r8d, edi
bsr ecx, dword [rcx]
xor edx, 0x1f
shl r8d, 2
xor ecx, 0x1f
sub ecx, edx
cmp r8d, ecx
jle 0x140183432
mov rdx, qword [rsp + 0x178]
lea ecx, [r9 + 3]
mov qword [rsp + 0x50], rax
mov qword [rdx], rcx
lea rdx, [r15 + rax]
cmp qword [rsp + 0x170], rdx
jne 0x140183455
xor eax, eax
cmp dword [rsp + 0x188], 2
cmovne eax, dword [rsp + 0x3c]
mov dword [rsp + 0x3c], eax
jmp 0x1401834ac
mov dl, byte [r15 + rax]
cmp byte [rbp + rax], dl
jae 0x140183473
cmp dword [rsp + 0x58], esi
mov dword [r13], esi
jae 0x14018349a
mov esi, dword [r11 + 4]
lea r13, [r11 + 4]
jmp 0x14018348c
cmp dword [rsp + 0x58], esi
mov dword [r14], esi
jae 0x1401834a4
mov qword [rsp + 0x78], rax
mov esi, dword [r11]
mov r14, r11
mov rax, qword [rsp + 0x68]
dec dword [rsp + 0x3c]
mov qword [rsp + 0x68], rax
jmp 0x1401832de
lea r13, [rsp + 0x10c]
jmp 0x1401834ac
lea r14, [rsp + 0x10c]
xor eax, eax
cmp dword [rsp + 0x188], 2
mov dword [r14], eax
mov dword [r13], eax
jne 0x14018371f
cmp dword [rsp + 0x3c], 0
je 0x14018371f
mov rdi, qword [rbx + 0xf8]
cmp dword [rsp + 0x180], 5
mov rdx, qword [rdi + 0x70]
mov r8d, dword [rdi + 0x108]
je 0x140183507
cmp dword [rsp + 0x180], 6
je 0x140183513
imul eax, dword [r15], 0x9e3779b1
mov ecx, 0x20
sub ecx, r8d
shr eax, cl
jmp 0x14018352c
movabs rax, 0xcf1bbcdcbb000000
jmp 0x14018351d
movabs rax, 0xcf1bbcdcbf9b0000
imul rax, qword [r15]
mov ecx, 0x40
sub ecx, r8d
shr rax, cl
mov ecx, dword [rdi + 0x1c]
mov esi, dword [rdx + rax*4]
mov edx, r15d
mov r12, qword [rbx + 8]
mov eax, dword [rbx + 0x18]
mov dword [rsp + 0x40], ecx
mov rcx, qword [rdi + 0x80]
mov r11, qword [rdi + 8]
mov r8d, dword [rbx + 0x1c]
sub edx, r12d
add rax, r12
mov qword [rsp + 0x70], rcx
mov ecx, dword [rdi + 0x104]
mov qword [rsp + 0x68], rax
mov rax, qword [rdi]
mov edi, 1
mov r10d, r8d
dec ecx
shl edi, cl
mov qword [rsp + 0x58], rax
sub rax, r11
dec edi
mov ecx, eax
sub r10d, eax
mov dword [rsp + 0x98], edi
mov edi, dword [rsp + 0x40]
mov r9d, eax
sub ecx, edi
cmp dword [rsp + 0x98], ecx
mov dword [rsp + 0x48], edi
jae 0x1401835af
mov ecx, dword [rsp + 0x98]
mov edi, eax
sub edi, ecx
mov dword [rsp + 0x48], edi
mov eax, eax
sub edx, r8d
xor r13d, r13d
mov qword [rsp + 0x88], rax
mov eax, r10d
xor ebp, ebp
mov qword [rsp + 0x90], rax
lea eax, [rdx + r9]
mov dword [rsp + 0x9c], eax
cmp dword [rsp + 0x3c], 0
je 0x14018371f
cmp dword [rsp + 0x40], esi
jae 0x14018371f
mov eax, dword [rsp + 0x98]
mov r10, r13
mov edi, esi
mov qword [rsp + 0xa0], r11
mov rdx, qword [rsp + 0x70]
lea r14, [r11 + rdi]
mov r9, qword [rsp + 0x58]
mov r8, qword [rsp + 0x170]
and eax, esi
add eax, eax
cmp rbp, r13
lea rax, [rdx + rax*4]
cmovbe r10, rbp
mov qword [rsp + 0x60], rax
mov rax, qword [rsp + 0x68]
lea rdx, [r14 + r10]
mov qword [rsp + 0x78], r10
lea rcx, [r15 + r10]
mov qword [rsp + 0x20], rax
call fcn.1401b44f0
mov r10, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x88]
mov r11, qword [rsp + 0xa0]
add rax, r10
lea rdx, [rdi + rax]
cmp rdx, rcx
jb 0x140183676
mov rdx, qword [rsp + 0x90]
add rdi, rdx
lea r14, [r12 + rdi]
cmp qword [rsp + 0x50], rax
jae 0x1401836e6
mov rdx, qword [rsp + 0x178]
mov r9d, eax
mov r8d, dword [rsp + 0x9c]
mov rdx, qword [rdx]
sub r8d, esi
lea ecx, [r8 + 1]
bsr ecx, ecx
mov qword [rsp + 0x78], rdx
mov edi, dword [rsp + 0x78]
xor ecx, 0x1f
lea edx, [rdi + 1]
mov edi, dword [rsp + 0x50]
bsr edx, edx
xor edx, 0x1f
sub edx, ecx
sub r9d, edi
shl r9d, 2
cmp r9d, edx
jle 0x1401836d8
mov rcx, qword [rsp + 0x178]
lea edx, [r8 + 3]
mov qword [rsp + 0x50], rax
mov qword [rcx], rdx
lea rdx, [r15 + rax]
cmp qword [rsp + 0x170], rdx
je 0x14018371f
mov cl, byte [r15 + rax]
cmp byte [r14 + rax], cl
jae 0x140183700
cmp dword [rsp + 0x48], esi
jae 0x14018371f
mov rsi, qword [rsp + 0x60]
mov esi, dword [rsi + 4]
jmp 0x140183713
cmp dword [rsp + 0x48], esi
jae 0x14018371f
mov rsi, qword [rsp + 0x60]
mov r13, rax
mov rax, rbp
mov esi, dword [rsi]
dec dword [rsp + 0x3c]
mov rbp, rax
jmp 0x1401835d7
mov eax, dword [rsp + 0x80]
sub eax, 8
mov dword [rbx + 0x2c], eax
mov rax, qword [rsp + 0x50]
add rsp, 0x118
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret