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

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x50
xor r13d, r13d
mov rsi, rdx
mov rbx, rcx
mov edi, r13d
mov r12d, r13d
test rdx, rdx
je 0x1401977d7
mov r14d, dword [rdx + 0x18]
mov ecx, 0x200
call fcn.1401c8de4
mov r12, rax
test rax, rax
je 0x1401977cd
mov dword [rax], r14d
mov eax, dword [rsi + 0x18]
jmp 0x1401977da
mov eax, 7
jmp 0x140197a39
mov eax, dword [rcx + 0x24]
mov dword [rbx + 0x20], eax
mov al, byte [rbx + 0x10]
mov byte [rbx + 0x17], al
test rsi, rsi
jne 0x1401977fe
cmp qword [rbx + 0x128], r13
je 0x1401977fe
mov rcx, rbx
call fcn.140197a54
jmp 0x140197a39
lea r14, [rbx + 0x60]
mov r8, qword [r14]
mov qword [rbp + 0x58], r8
test rsi, rsi
je 0x140197862
cmp qword [rbx + 0x128], r13
jne 0x140197862
cmp qword [rsi + 8], r13
mov r15, r8
mov rax, qword [rsi]
cmovne r15, qword [rsi + 8]
mov qword [r14], rax
cmp qword [r14], r15
jge 0x140197850
mov r9d, 1
mov dword [rsp + 0x20], 1
mov r8, r12
mov rdx, r14
mov rcx, rbx
call fcn.14019886c
mov edi, eax
test eax, eax
je 0x140197829
lea r14, [rbx + 0x60]
test edi, edi
jne 0x14019791b
mov r8, qword [rbp + 0x58]
jmp 0x14019786a
mov qword [r14], r13
jmp 0x14019786a
xor r13d, r13d
cmp qword [r14], r8
jge 0x140197912
lea rax, [rbp + 0x50]
mov dword [rbp + 0x48], r13d
lea r9, [rbp + 0x48]
mov qword [rsp + 0x20], rax
xor edx, edx
mov rcx, rbx
call fcn.14019c8c4
mov r13d, dword [rbp + 0x48]
mov edi, eax
mov r8, qword [rbp + 0x58]
test r13d, r13d
jne 0x1401978c8
mov eax, dword [rbx + 0xb8]
add rax, qword [rbx + 0x68]
cmp rax, qword [r14]
jne 0x1401978c8
mov rcx, qword [rbx + 0xc8]
mov rax, r8
sub rax, qword [r14]
add rcx, 8
cqo
idiv rcx
mov r13, rax
mov dword [rbp + 0x48], eax
xor r15d, r15d
test edi, edi
jne 0x14019790f
cmp r15d, r13d
jae 0x140197867
cmp qword [r14], r8
jge 0x140197902
mov r9d, 1
mov dword [rsp + 0x20], 1
mov r8, r12
mov rdx, r14
mov rcx, rbx
call fcn.14019886c
mov r8, qword [rbp + 0x58]
inc r15d
mov edi, eax
test eax, eax
je 0x1401978cf
xor r13d, r13d
test edi, edi
je 0x14019786a
jmp 0x140197912
xor r13d, r13d
test rsi, rsi
je 0x140197a23
mov rcx, qword [rbx + 0xc8]
mov eax, dword [rsi + 0x1c]
add rcx, 4
mov r14, qword [rbx + 0x128]
imul rcx, rax
mov qword [rbp + 0x48], rcx
test r14, r14
je 0x1401979f5
mov eax, dword [r14 + 0x88]
cmp dword [rsi + 0x30], eax
je 0x14019795b
mov dword [rsi + 0x24], r13d
mov eax, dword [r14 + 0x88]
mov dword [rsi + 0x30], eax
mov ecx, dword [rsi + 0x24]
cmp ecx, dword [r14 + 0x58]
jae 0x1401979f2
mov dword [r14 + 0x58], ecx
mov eax, dword [rsi + 0x28]
mov dword [r14 + 0x60], eax
mov eax, dword [rsi + 0x2c]
mov dword [r14 + 0x64], eax
test ecx, ecx
je 0x1401979f2
lea edx, [rcx + 0x1000]
mov rcx, r14
sub rdx, 0xfdf
lea r8, [rbp - 0x20]
shr rdx, 0xc
call fcn.1401f5364
test eax, eax
jne 0x1401979f2
mov r9d, dword [r14 + 0x58]
mov r10d, 0x2000
mov rdx, qword [rbp - 0x20]
sub r9d, dword [rbp - 0x10]
mov r8, rdx
movzx eax, word [rdx]
cmp eax, r9d
jle 0x1401979c0
mov word [r8], r13w
add r8, 2
add rdx, 2
sub r10, 1
jne 0x1401979b4
mov edx, dword [rbp - 0x20]
lea eax, [r9*4]
mov rcx, qword [rbp - 0x18]
sub edx, eax
sub edx, ecx
movsxd rax, r9d
movsxd r8, edx
xor edx, edx
lea rcx, [rcx + rax*4]
call sub.VCRUNTIME140.dll_memset
mov edi, r13d
mov esi, dword [rsi + 0x1c]
test edi, edi
jne 0x140197a23
cmp esi, dword [rbx + 0x3c]
jae 0x140197a23
xor r9d, r9d
mov dword [rsp + 0x20], 1
mov r8, r12
lea rdx, [rbp + 0x48]
mov rcx, rbx
call fcn.14019886c
inc esi
mov edi, eax
test eax, eax
je 0x1401979fc
mov rcx, r12
call fcn.1401a989c
test edi, edi
jne 0x140197a37
mov rax, qword [rbp + 0x58]
mov qword [rbx + 0x60], rax
mov eax, edi
mov rbx, qword [rsp + 0x90]
add rsp, 0x50
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret