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

Disassembly:
mov dword [rsp + 0x10], edx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x38
mov rdi, rcx
mov ebp, edx
mov rcx, qword [rcx + 0x20]
mov rcx, qword [rcx + 0x18]
call fcn.140016438
mov rcx, qword [rdi + 0x28]
call fcn.140035280
mov r8, qword [rdi]
test r8, r8
je 0x140016bcf
mov rcx, qword [r8 + 0x18]
call fcn.140016438
mov r8, qword [rdi]
mov ebx, dword [rdi + 0x30]
mov ecx, ebx
call fcn.140027360
test eax, eax
jne 0x140016feb
mov r9, qword [rdi + 0x28]
mov rcx, r9
call fcn.140036628
mov rcx, qword [rdi + 8]
mov qword [rsp + 0x20], rax
call fcn.140036628
and dword [rsp + 0x80], 0
mov r13, rax
mov esi, 1
test r8, r8
je 0x140016c1f
mov rcx, qword [r9 + 8]
cmp byte [rcx + 0x24], 2
jne 0x140016c1f
lea ebx, [rsi + 4]
jmp 0x140016c6a
xor ebx, ebx
cmp dword [rdi + 0x14], ebx
jne 0x140016c4e
mov rcx, qword [rdi + 8]
lea edx, [rbx + 2]
call fcn.1400345c8
mov ebx, eax
test eax, eax
jne 0x140016c6a
mov rcx, qword [rdi + 8]
lea r8, [rdi + 0x10]
mov edx, esi
mov dword [rdi + 0x14], esi
call fcn.140035390
mov r9, qword [rdi + 0x28]
mov rcx, r9
call fcn.140035a24
test eax, eax
jne 0x140016c6a
xor edx, edx
call fcn.1400345c8
mov ebx, eax
mov dword [rsp + 0x80], esi
mov rcx, qword [rdi + 0x28]
call fcn.1400353f0
mov rcx, qword [rdi + 8]
movsxd r15, eax
call fcn.1400353f0
mov r12d, eax
call fcn.140036628
mov rcx, rax
call fcn.14004580c
mov dword [rsp + 0x90], eax
test ebx, ebx
jne 0x140016ca8
cmp eax, 5
jne 0x140016ca8
cmp r15d, r12d
lea eax, [rbx + 8]
cmovne ebx, eax
mov rcx, qword [rdi + 0x28]
call fcn.140035af4
mov esi, eax
xor r14d, r14d
mov eax, 0x65
test ebp, ebp
js 0x140016cc8
cmp r14d, ebp
jge 0x140016d4c
mov ebp, dword [rdi + 0x18]
cmp ebp, esi
ja 0x140016d4c
test ebx, ebx
jne 0x140016d7b
mov rax, qword [rdi + 0x28]
xor edx, edx
mov rcx, qword [rax + 8]
mov eax, dword [0x1400b8998]
div dword [rcx + 0x30]
inc eax
cmp ebp, eax
je 0x140016d3a
mov rcx, qword [rsp + 0x20]
lea r9d, [rbx + 2]
lea r8, [rsp + 0x98]
mov edx, ebp
call fcn.140044ff4
mov ebx, eax
test eax, eax
jne 0x140016d3a
mov rcx, qword [rsp + 0x98]
call fcn.1400457fc
mov r8, rax
xor r9d, r9d
mov edx, ebp
mov rcx, rdi
call fcn.140019544
mov rcx, qword [rsp + 0x98]
mov ebx, eax
call fcn.140046950
inc dword [rdi + 0x18]
mov ebp, dword [rsp + 0x88]
inc r14d
jmp 0x140016cb6
test ebx, ebx
jne 0x140016d7b
mov eax, esi
mov dword [rdi + 0x38], esi
sub eax, dword [rdi + 0x18]
lea ebp, [rbx + 1]
add eax, ebp
mov dword [rdi + 0x34], eax
cmp dword [rdi + 0x18], esi
ja 0x140016d88
cmp dword [rdi + 0x3c], ebx
jne 0x140016fb7
mov rcx, rdi
call fcn.140019308
jmp 0x140016fb7
cmp ebx, eax
jne 0x140016fb7
mov ebp, 1
test esi, esi
jne 0x140016da6
mov rcx, qword [rdi + 8]
call fcn.140036004
mov ebx, eax
mov esi, ebp
test eax, eax
je 0x140016da6
cmp eax, 0x65
jne 0x140016fb7
mov r8d, dword [rdi + 0x10]
mov edx, ebp
mov rcx, qword [rdi + 8]
add r8d, ebp
call fcn.140036d38
mov ebx, eax
test eax, eax
jne 0x140016fb7
mov rcx, qword [rdi]
test rcx, rcx
je 0x140016dcf
call fcn.14004b190
cmp dword [rsp + 0x90], 5
jne 0x140016df1
mov rcx, qword [rdi + 8]
mov edx, 2
call fcn.140036b74
mov ebx, eax
test eax, eax
jne 0x140016fb7
cmp r15d, r12d
jge 0x140016f7c
mov eax, r12d
movsxd r14, esi
cdq
idiv r15d
imul r14, r15
mov ecx, eax
dec eax
add eax, esi
cdq
idiv ecx
mov rcx, r13
mov r9d, eax
call fcn.1400457d8
lea rdx, [rsp + 0x90]
mov qword [rsp + 0x28], rax
call fcn.14004612c
mov rcx, qword [rdi + 8]
lea esi, [r9 - 1]
mov r10d, dword [0x1400b8998]
xor edx, edx
mov eax, r10d
mov r8, qword [rcx + 8]
div dword [r8 + 0x30]
add eax, ebp
cmp r9d, eax
cmovne esi, r9d
cmp esi, dword [rsp + 0x90]
ja 0x140016eb6
mov rax, qword [rdi + 8]
xor edx, edx
mov rcx, qword [rax + 8]
mov eax, r10d
div dword [rcx + 0x30]
add eax, ebp
cmp esi, eax
je 0x140016eb0
xor r9d, r9d
lea r8, [rsp + 0x98]
mov edx, esi
mov rcx, r13
call fcn.140044ff4
mov ebx, eax
test eax, eax
jne 0x140016ea9
mov rcx, qword [rsp + 0x98]
call fcn.1400469c4
mov rcx, qword [rsp + 0x98]
mov ebx, eax
call fcn.140046950
mov r10d, dword [0x1400b8998]
add esi, ebp
test ebx, ebx
je 0x140016e53
test ebx, ebx
jne 0x140016ed0
mov r8d, ebp
xor edx, edx
mov rcx, r13
call fcn.1400455bc
mov r10d, dword [0x1400b8998]
mov ebx, eax
lea eax, [r10 + r12]
mov rbp, r14
movsxd rcx, eax
lea eax, [r10 + r15]
cmp rcx, r14
movsxd rsi, eax
cmovl rbp, rcx
test ebx, ebx
jne 0x140016fb7
mov r12, qword [rsp + 0x28]
cmp rsi, rbp
jge 0x140016f5f
mov rcx, qword [rsp + 0x20]
lea r8, [rsp + 0x90]
and qword [rsp + 0x90], 0
mov rax, rsi
cqo
xor r9d, r9d
idiv r15
lea edx, [rax + 1]
call fcn.140044ff4
mov ebx, eax
test eax, eax
jne 0x140016f49
mov rcx, qword [rsp + 0x90]
call fcn.1400457fc
mov rdx, rax
mov r9, rsi
mov r8d, r15d
mov rcx, r12
call fcn.140044ea4
mov ebx, eax
mov rcx, qword [rsp + 0x90]
call fcn.140046950
add rsi, r15
test ebx, ebx
je 0x140016ef5
jmp 0x140016fb7
mov rdx, r14
mov rcx, r12
call fcn.1400196c8
mov ebx, eax
test eax, eax
jne 0x140016fb7
xor edx, edx
mov rcx, r13
call fcn.1400468fc
jmp 0x140016f9a
mov eax, r15d
mov rcx, r13
cdq
idiv r12d
imul eax, esi
mov edx, eax
call fcn.14004694c
xor r8d, r8d
xor edx, edx
call fcn.1400455bc
mov ebx, eax
test eax, eax
jne 0x140016fb7
mov rcx, qword [rdi + 8]
xor edx, edx
call fcn.140034b94
mov ebx, eax
test eax, eax
mov eax, 0x65
cmove ebx, eax
cmp dword [rsp + 0x80], 0
je 0x140016fd7
mov rcx, qword [rdi + 0x28]
xor edx, edx
call fcn.140034afc
mov rcx, qword [rdi + 0x28]
xor edx, edx
call fcn.140034b94
mov r8, qword [rdi]
cmp ebx, 0xc0a
mov eax, 7
cmove ebx, eax
mov dword [rdi + 0x30], ebx
test r8, r8
je 0x140016ff9
mov rcx, qword [r8 + 0x18]
call fcn.14001645c
mov rcx, qword [rdi + 0x28]
call fcn.140035b00
mov rcx, qword [rdi + 0x20]
mov rcx, qword [rcx + 0x18]
call fcn.14001645c
mov eax, ebx
add rsp, 0x38
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret