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

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x60
movsxd rax, dword [rsp + 0x88]
imul rax, rax, 0x898
mov rcx, qword [rsp + 0x70]
lea rax, [rcx + rax + 0x38]
mov qword [rsp], rax
mov rax, qword [rsp]
mov rax, qword [rax + 8]
mov qword [rsp + 8], rax
mov rax, qword [rsp]
movsxd rax, dword [rax]
imul rax, rax, 0x48
mov rcx, qword [rsp + 8]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x10], rax
cmp dword [rsp + 0x78], 0
je 0x18017d8d1
mov eax, dword [rsp + 0x78]
dec eax
mov eax, eax
imul rax, rax, 0xc
mov rcx, qword [rsp + 0x80]
mov eax, dword [rcx + rax]
mov dword [rsp + 0x24], eax
jmp 0x18017d8d9
mov dword [rsp + 0x24], 0
mov rax, qword [rsp + 0x70]
mov rax, qword [rax + 0x1170]
mov eax, dword [rax + 0x38]
shl eax, 3
cdq
and edx, 0x7ff
add eax, edx
sar eax, 0xb
mov dword [rsp + 0x18], eax
cmp dword [rsp + 0x18], 0
jne 0x18017d90a
mov dword [rsp + 0x18], 1
mov rax, qword [rsp + 0x70]
mov rax, qword [rax + 0x1170]
imul eax, dword [rax + 0x38], 0x1770
cdq
and edx, 0x7ff
add eax, edx
sar eax, 0xb
mov dword [rsp + 0x1c], eax
mov dword [rsp + 0x20], 0xbb8
mov rax, qword [rsp + 8]
mov qword [rsp + 0x28], rax
jmp 0x18017d94f
mov rax, qword [rsp + 0x28]
add rax, 0x48
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x10]
cmp qword [rsp + 0x28], rax
jae 0x18017db2d
mov rax, qword [rsp + 0x28]
movsx eax, byte [rax + 1]
mov rcx, qword [rsp]
cmp eax, dword [rcx + 0x20]
je 0x18017d973
jmp 0x18017d941
mov rax, qword [rsp + 8]
mov qword [rsp + 0x30], rax
jmp 0x18017d98d
mov rax, qword [rsp + 0x30]
add rax, 0x48
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x10]
cmp qword [rsp + 0x30], rax
jae 0x18017db28
mov rax, qword [rsp + 0x28]
movsx eax, word [rax + 2]
mov dword [rsp + 0x38], eax
mov rax, qword [rsp + 0x30]
movsx eax, word [rax + 2]
mov dword [rsp + 0x3c], eax
mov rax, qword [rsp + 0x28]
movsx eax, byte [rax + 1]
mov rcx, qword [rsp + 0x30]
movsx ecx, byte [rcx + 1]
add eax, ecx
test eax, eax
jne 0x18017db23
mov eax, dword [rsp + 0x38]
cmp dword [rsp + 0x3c], eax
jle 0x18017db23
mov rax, qword [rsp + 0x28]
movsx eax, word [rax + 6]
mov dword [rsp + 0x40], eax
mov rax, qword [rsp + 0x28]
movsx eax, word [rax + 8]
mov dword [rsp + 0x44], eax
mov rax, qword [rsp + 0x30]
movsx eax, word [rax + 6]
cmp dword [rsp + 0x40], eax
jge 0x18017da17
mov rax, qword [rsp + 0x30]
movsx eax, word [rax + 6]
mov dword [rsp + 0x40], eax
mov rax, qword [rsp + 0x30]
movsx eax, word [rax + 8]
cmp dword [rsp + 0x44], eax
jle 0x18017da33
mov rax, qword [rsp + 0x30]
movsx eax, word [rax + 8]
mov dword [rsp + 0x44], eax
mov eax, dword [rsp + 0x40]
mov ecx, dword [rsp + 0x44]
sub ecx, eax
mov eax, ecx
mov dword [rsp + 0x48], eax
mov eax, dword [rsp + 0x18]
cmp dword [rsp + 0x48], eax
jl 0x18017db23
mov eax, dword [rsp + 0x38]
mov ecx, dword [rsp + 0x3c]
sub ecx, eax
mov eax, ecx
mov dword [rsp + 0x4c], eax
cmp dword [rsp + 0x24], 0
je 0x18017dab6
mov eax, dword [rsp + 0x4c]
shl eax, 0xa
cdq
idiv dword [rsp + 0x24]
sub eax, 0x400
mov dword [rsp + 0x58], eax
cmp dword [rsp + 0x58], 0x2710
jle 0x18017da91
mov dword [rsp + 0x50], 0x7d00
jmp 0x18017dab4
cmp dword [rsp + 0x58], 0
jle 0x18017daac
mov eax, dword [rsp + 0x58]
imul eax, dword [rsp + 0x58]
cdq
idiv dword [rsp + 0x20]
mov dword [rsp + 0x50], eax
jmp 0x18017dab4
mov dword [rsp + 0x50], 0
jmp 0x18017dabe
mov eax, dword [rsp + 0x4c]
mov dword [rsp + 0x50], eax
mov eax, dword [rsp + 0x1c]
cdq
idiv dword [rsp + 0x48]
mov ecx, dword [rsp + 0x50]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x54], eax
mov rax, qword [rsp + 0x28]
mov eax, dword [rax + 0x30]
cmp dword [rsp + 0x54], eax
jge 0x18017dafb
mov rax, qword [rsp + 0x28]
mov ecx, dword [rsp + 0x54]
mov dword [rax + 0x30], ecx
mov rax, qword [rsp + 0x28]
mov rcx, qword [rsp + 0x30]
mov qword [rax + 0x20], rcx
mov rax, qword [rsp + 0x30]
mov eax, dword [rax + 0x30]
cmp dword [rsp + 0x54], eax
jge 0x18017db23
mov rax, qword [rsp + 0x30]
mov ecx, dword [rsp + 0x54]
mov dword [rax + 0x30], ecx
mov rax, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x28]
mov qword [rax + 0x20], rcx
jmp 0x18017d97f
jmp 0x18017d941
mov rax, qword [rsp + 8]
mov qword [rsp + 0x28], rax
jmp 0x18017db47
mov rax, qword [rsp + 0x28]
add rax, 0x48
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x10]
cmp qword [rsp + 0x28], rax
jae 0x18017db9a
mov rax, qword [rsp + 0x28]
mov rax, qword [rax + 0x20]
mov qword [rsp + 0x30], rax
cmp qword [rsp + 0x30], 0
je 0x18017db98
mov rax, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x28]
cmp qword [rax + 0x20], rcx
je 0x18017db98
mov rax, qword [rsp + 0x28]
mov qword [rax + 0x20], 0
mov rax, qword [rsp + 0x28]
mov rcx, qword [rsp + 0x30]
mov rcx, qword [rcx + 0x20]
mov qword [rax + 0x28], rcx
jmp 0x18017db39
add rsp, 0x60
pop rdi
ret