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

Disassembly:
mov qword [rsp + 0x20], r9
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x68
mov dword [rsp + 0x20], 0
mov rax, qword [rsp + 0x88]
mov eax, dword [rax]
inc eax
mov rcx, qword [rsp + 0x88]
mov dword [rcx], eax
mov rax, qword [rsp + 0x88]
cmp dword [rax], 5
jle 0x140166230
mov dword [rsp + 0x3c], 1
mov rax, qword [rsp + 0x88]
mov eax, dword [rax]
mov dword [rsp + 0x34], eax
cmp dword [rsp + 0x34], 0x64
jle 0x1401661ee
mov eax, 0xf
jmp 0x14016660b
mov rax, qword [rsp + 0x88]
cmp dword [rax], 0xa
jl 0x140166213
mov eax, dword [rsp + 0x34]
sub eax, 9
mov ecx, dword [rsp + 0x34]
sub ecx, 9
imul eax, ecx
imul eax, eax, 0x27
mov dword [rsp + 0x3c], eax
mov edx, dword [rsp + 0x3c]
mov rax, qword [rsp + 0x70]
mov rcx, qword [rax]
call fcn.140188fd8
mov rax, qword [rsp + 0x88]
mov ecx, dword [rax]
mov dword [rax], ecx
cmp dword [rsp + 0x80], 0
jne 0x1401662fd
mov rax, qword [rsp + 0x70]
movzx eax, byte [rax + 0x46]
test eax, eax
jne 0x14016625e
mov rdx, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x70]
call fcn.140166a18
mov dword [rsp + 0x20], eax
cmp dword [rsp + 0x20], 5
jne 0x1401662ca
mov eax, 8
imul rax, rax, 0
mov rcx, qword [rsp + 0x70]
mov rcx, qword [rcx + 0x30]
cmp qword [rax + rcx], 0
jne 0x140166288
mov dword [rsp + 0x20], 0xffffffff
jmp 0x1401662ca
mov edx, 2
mov rcx, qword [rsp + 0x70]
call fcn.140169250
mov dword [rsp + 0x20], eax
cmp dword [rsp + 0x20], 0
jne 0x1401662bb
mov edx, 2
mov rcx, qword [rsp + 0x70]
call fcn.1401691d8
mov dword [rsp + 0x20], 0xffffffff
jmp 0x1401662ca
cmp dword [rsp + 0x20], 5
jne 0x1401662ca
mov dword [rsp + 0x20], 0x105
cmp dword [rsp + 0x20], 0
je 0x1401662dc
mov eax, dword [rsp + 0x20]
jmp 0x14016660b
mov rax, qword [rsp + 0x70]
movzx eax, byte [rax + 0x46]
test eax, eax
je 0x1401662fd
mov rdx, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x70]
call fcn.140166618
jmp 0x14016660b
mov rcx, qword [rsp + 0x70]
call fcn.140169bf8
mov qword [rsp + 0x48], rax
mov rcx, qword [rsp + 0x70]
call fcn.140169e78
cmp dword [rsp + 0x80], 0
jne 0x1401663cc
mov rax, qword [rsp + 0x48]
mov eax, dword [rax]
mov rcx, qword [rsp + 0x70]
cmp eax, dword [rcx + 0x58]
jne 0x1401663cc
mov edx, 3
mov rcx, qword [rsp + 0x70]
call fcn.140169250
mov dword [rsp + 0x20], eax
mov rcx, qword [rsp + 0x70]
call fcn.140169700
cmp dword [rsp + 0x20], 0
jne 0x1401663bc
mov rax, qword [rsp + 0x70]
add rax, 0x48
mov qword [rsp + 0x50], rax
mov rcx, qword [rsp + 0x70]
call fcn.140169bc4
mov r8d, 0x30
mov rcx, qword [rsp + 0x50]
mov rdx, rcx
mov rcx, rax
call fcn.14018ed10
test eax, eax
je 0x1401663a8
mov edx, 3
mov rcx, qword [rsp + 0x70]
call fcn.1401691d8
mov eax, 0xffffffff
jmp 0x14016660b
xor eax, eax
mov rcx, qword [rsp + 0x70]
mov word [rcx + 0x3c], ax
xor eax, eax
jmp 0x14016660b
cmp dword [rsp + 0x20], 5
je 0x1401663cc
mov eax, dword [rsp + 0x20]
jmp 0x14016660b
mov dword [rsp + 0x2c], 0
mov dword [rsp + 0x28], 0
mov rax, qword [rsp + 0x70]
mov eax, dword [rax + 0x58]
mov dword [rsp + 0x30], eax
mov dword [rsp + 0x24], 1
jmp 0x1401663fc
mov eax, dword [rsp + 0x24]
inc eax
mov dword [rsp + 0x24], eax
cmp dword [rsp + 0x24], 5
jge 0x140166445
movsxd rax, dword [rsp + 0x24]
mov rcx, qword [rsp + 0x48]
mov eax, dword [rcx + rax*4 + 4]
mov dword [rsp + 0x38], eax
mov rcx, qword [rsp + 0x70]
call fcn.140169e78
mov eax, dword [rsp + 0x38]
cmp dword [rsp + 0x2c], eax
ja 0x140166443
mov eax, dword [rsp + 0x30]
cmp dword [rsp + 0x38], eax
ja 0x140166443
mov eax, dword [rsp + 0x38]
mov dword [rsp + 0x2c], eax
mov eax, dword [rsp + 0x24]
mov dword [rsp + 0x28], eax
jmp 0x1401663f2
mov rax, qword [rsp + 0x70]
movzx eax, byte [rax + 0x42]
and eax, 2
test eax, eax
jne 0x140166502
mov eax, dword [rsp + 0x30]
cmp dword [rsp + 0x2c], eax
jb 0x14016646e
cmp dword [rsp + 0x28], 0
jne 0x140166502
mov dword [rsp + 0x24], 1
jmp 0x140166482
mov eax, dword [rsp + 0x24]
inc eax
mov dword [rsp + 0x24], eax
cmp dword [rsp + 0x24], 5
jge 0x140166502
mov eax, dword [rsp + 0x24]
add eax, 3
mov r8d, 1
mov edx, eax
mov rcx, qword [rsp + 0x70]
call fcn.140169144
mov dword [rsp + 0x20], eax
cmp dword [rsp + 0x20], 0
jne 0x1401664ed
movsxd rax, dword [rsp + 0x24]
mov rcx, qword [rsp + 0x48]
mov edx, dword [rsp + 0x30]
mov dword [rcx + rax*4 + 4], edx
mov eax, dword [rsp + 0x30]
mov dword [rsp + 0x2c], eax
mov eax, dword [rsp + 0x24]
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x24]
add eax, 3
mov r8d, 1
mov edx, eax
mov rcx, qword [rsp + 0x70]
call fcn.1401690bc
nop
jmp 0x140166502
cmp dword [rsp + 0x20], 5
je 0x1401664fd
mov eax, dword [rsp + 0x20]
jmp 0x14016660b
jmp 0x140166478
cmp dword [rsp + 0x28], 0
jne 0x14016652b
cmp dword [rsp + 0x20], 5
jne 0x14016651a
mov dword [rsp + 0x40], 0xffffffff
jmp 0x140166522
mov dword [rsp + 0x40], 0x508
mov eax, dword [rsp + 0x40]
jmp 0x14016660b
mov eax, dword [rsp + 0x28]
add eax, 3
mov edx, eax
mov rcx, qword [rsp + 0x70]
call fcn.140169250
mov dword [rsp + 0x20], eax
cmp dword [rsp + 0x20], 0
je 0x140166572
mov eax, dword [rsp + 0x20]
and eax, 0xff
cmp eax, 5
jne 0x140166561
mov dword [rsp + 0x44], 0xffffffff
jmp 0x140166569
mov eax, dword [rsp + 0x20]
mov dword [rsp + 0x44], eax
mov eax, dword [rsp + 0x44]
jmp 0x14016660b
mov rax, qword [rsp + 0x48]
mov eax, dword [rax]
inc eax
mov rcx, qword [rsp + 0x70]
mov dword [rcx + 0x78], eax
mov rcx, qword [rsp + 0x70]
call fcn.140169e78
mov rcx, qword [rsp + 0x70]
call fcn.140169700
movsxd rax, dword [rsp + 0x28]
mov rcx, qword [rsp + 0x48]
mov eax, dword [rcx + rax*4 + 4]
cmp eax, dword [rsp + 0x2c]
jne 0x1401665dd
mov rax, qword [rsp + 0x70]
add rax, 0x48
mov qword [rsp + 0x58], rax
mov rcx, qword [rsp + 0x70]
call fcn.140169bc4
mov r8d, 0x30
mov rcx, qword [rsp + 0x58]
mov rdx, rcx
mov rcx, rax
call fcn.14018ed10
test eax, eax
je 0x1401665f9
mov eax, dword [rsp + 0x28]
add eax, 3
mov edx, eax
mov rcx, qword [rsp + 0x70]
call fcn.1401691d8
mov eax, 0xffffffff
jmp 0x14016660b
mov rax, qword [rsp + 0x70]
movzx ecx, word [rsp + 0x28]
mov word [rax + 0x3c], cx
mov eax, dword [rsp + 0x20]
add rsp, 0x68
ret