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

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x38
mov eax, dword [rcx + 0x3c]
xor r15d, r15d
add rax, rcx
mov edx, 0xe0
mov r9d, r15d
mov ebx, r15d
movzx r10d, word [rax + 0x14]
mov ecx, dword [rax + 0x54]
movzx esi, word [rax + 6]
mov r12d, dword [rax + 0x38]
mov dword [rsp + 0x98], ecx
lea r14, [r10 + rax]
cmp r10w, dx
jne 0x140016ba9
mov ebx, dword [rax + 0x34]
jmp 0x140016bb8
mov edx, 0xf0
cmp r10w, dx
jne 0x140016bb8
mov rbx, qword [rax + 0x30]
mov ebp, esi
mov dword [rsp + 0x20], esi
lea r8, [r14 + 0x18]
mov r11d, r15d
mov edi, r15d
mov esi, r15d
cmp ebp, 2
jb 0x140016c16
lea eax, [rbp - 2]
shr eax, 1
inc eax
mov r10d, eax
lea esi, [rax + rax]
nop dword [rax]
mov ecx, dword [r8 + 8]
xor edx, edx
mov eax, ecx
div r12d
sub ecx, edx
xor edx, edx
add ecx, r12d
add r11d, ecx
mov ecx, dword [r8 + 0x30]
mov eax, ecx
add r8, 0x50
div r12d
sub ecx, edx
add ecx, r12d
add edi, ecx
sub r10, 1
jne 0x140016be0
mov ecx, dword [rsp + 0x98]
cmp esi, ebp
jge 0x140016c2c
mov r9d, dword [r8 + 8]
xor edx, edx
mov eax, r9d
div r12d
sub r9d, edx
add r9d, r12d
mov r10, qword [rsp + 0x90]
xor edx, edx
mov eax, ecx
mov r13d, ecx
div r12d
mov r10, qword [r10 + 0x40]
mov r8d, 0x2000
sub r13d, edx
mov rcx, rbx
add r13d, r12d
lea eax, [rdi + r13]
add eax, r11d
add eax, r9d
mov r9d, 4
mov edx, eax
mov edi, eax
call r10
mov qword [rsp + 0x28], rax
mov rsi, rax
test rax, rax
jne 0x140016cb2
mov rax, qword [rsp + 0x90]
mov r9d, 4
mov r8d, 0x2000
mov edx, edi
xor ecx, ecx
mov rax, qword [rax + 0x40]
call rax
mov qword [rsp + 0x28], rax
mov rsi, rax
test rax, rax
je 0x140016e13
mov rcx, qword [rsp + 0x88]
sub rax, rbx
mov qword [rcx], rax
mov rax, qword [rsp + 0x90]
mov r9d, 4
mov r8d, 0x1000
mov edx, r13d
mov rcx, rsi
mov ebx, r13d
mov rax, qword [rax + 0x40]
call rax
test rax, rax
je 0x140016e13
mov r8d, dword [rsp + 0x98]
test r8, r8
je 0x140016d1c
mov rcx, rax
cmp rbx, r8
jb 0x140016d02
mov rdx, qword [rsp + 0x80]
call fcn.140014030
jmp 0x140016d1c
mov r8, rbx
xor edx, edx
call fcn.140013c70
call fcn.140004f04
mov dword [rax], 0x22
call fcn.140004d84
test ebp, ebp
je 0x140016e0e
lea rdi, [r14 + 0x28]
nop dword [rax + rax]
mov eax, dword [rdi + 4]
xor edx, edx
mov ebp, dword [rdi - 8]
mov ebx, dword [rdi]
mov dword [rsp + 0x98], eax
mov eax, ebp
div r12d
test edx, edx
je 0x140016d51
mov eax, r12d
sub eax, edx
add ebp, eax
test dword [rdi + 0x14], 0x20000000
mov ecx, 4
mov rax, qword [rsp + 0x90]
mov r9d, 0x40
cmove r9d, ecx
mov edx, ebp
mov ecx, r13d
mov r8d, 0x1000
add rcx, rsi
mov r14d, ebp
mov rax, qword [rax + 0x40]
call rax
test rax, rax
je 0x140016e13
mov rsi, rbx
mov ebx, dword [rsp + 0x98]
add rbx, qword [rsp + 0x80]
test rsi, rsi
je 0x140016df4
test rbx, rbx
je 0x140016dc0
cmp r14, rsi
jb 0x140016dc0
mov r8, rsi
mov rdx, rbx
mov rcx, rax
call fcn.140014030
jmp 0x140016df4
mov r8, r14
xor edx, edx
mov rcx, rax
call fcn.140013c70
test rbx, rbx
jne 0x140016ddf
call fcn.140004f04
mov dword [rax], 0x16
jmp 0x140016def
cmp r14, rsi
jae 0x140016df4
call fcn.140004f04
mov dword [rax], 0x22
call fcn.140004d84
mov rsi, qword [rsp + 0x28]
add r13d, ebp
add rdi, 0x28
inc r15d
cmp r15d, dword [rsp + 0x20]
jl 0x140016d30
mov rax, rsi
jmp 0x140016e15
xor eax, eax
add rsp, 0x38
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret