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

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x68
dec dword [rcx + 0x44]
mov eax, dword [r8 + 0x1c]
mov rbp, qword [rsp + 0xd0]
movzx r14d, byte [rbp]
mov rsi, qword [r8]
mov rbx, qword [rcx + 0x10]
mov dword [rsp + 0x3c], eax
mov eax, dword [rcx + 0x44]
mov r15d, r9d
mov dword [rsp + 0x40], eax
xor eax, eax
mov r12, rdx
mov r13d, eax
mov eax, dword [rbp + 4]
lea r9, [0x180143844]
mov dword [rsp + 0xb8], eax
mov rax, qword [rdx + 0x20]
mov rdi, rcx
add rax, 8
cmp dword [r8 + 8], r13d
lea r8, str.USE_TEMP_B_TREE_FOR__sORDER_BY
mov qword [rsp + 0x50], rax
lea rax, str.RIGHT_PART_OF
mov dword [rsp + 0x48], r14d
cmovg r9, rax
xor edx, edx
call fcn.180034ee0
mov rax, qword [rsp + 0xc0]
mov r9d, dword [rax + 0x14]
test r9d, r9d
je 0x18008a43f
mov r8d, dword [rax + 0x10]
mov edx, 0xa
mov rcx, rbx
mov dword [rsp + 0x20], r13d
call fcn.1800347e0
mov edx, dword [rsp + 0x3c]
mov rcx, rbx
call fcn.180034900
mov rax, qword [rsp + 0xc0]
mov rcx, qword [rbx + 0x18]
mov edx, dword [rax + 0x14]
mov eax, dword [rcx + 0x48]
add eax, dword [rcx + 0x44]
not edx
jns 0x18008a427
mov r8d, edx
mov rdx, rbx
call fcn.180035230
jmp 0x18008a437
mov rcx, qword [rcx + 0x50]
mov eax, dword [rbx + 0x90]
movsxd rdx, edx
mov dword [rcx + rdx*4], eax
mov rax, qword [rsp + 0xc0]
mov r11d, dword [rax + 0xc]
mov dword [rsp + 0x30], r11d
cmp r14d, 9
je 0x18008a4d5
cmp r14d, 0xd
je 0x18008a4d5
cmp r14d, 0xa
je 0x18008a4db
movzx eax, byte [rdi + 0x1f]
test al, al
jne 0x18008a46f
inc dword [rdi + 0x38]
mov r10d, dword [rdi + 0x38]
jmp 0x18008a47f
dec al
movzx eax, al
mov byte [rdi + 0x1f], al
mov r10d, dword [rdi + rax*4 + 0xe0]
mov dword [rsp + 0xc8], r10d
cmp r14d, 0xc
je 0x18008a4a6
cmp r14d, 0xe
je 0x18008a4a6
mov edx, r15d
mov rcx, rdi
call fcn.18005afa0
xor r8d, r8d
mov r14d, eax
jmp 0x18008a523
movzx eax, byte [rdi + 0x1f]
test al, al
jne 0x18008a4bd
inc dword [rdi + 0x38]
mov r14d, dword [rdi + 0x38]
xor r8d, r8d
mov r15d, r8d
jmp 0x18008a523
dec al
xor r8d, r8d
movzx eax, al
mov r15d, r8d
mov byte [rdi + 0x1f], al
mov r14d, dword [rdi + rax*4 + 0xe0]
jmp 0x18008a523
cmp r14d, 0xa
jne 0x18008a514
cmp dword [r12 + 0xc], r13d
je 0x18008a514
movsxd rcx, dword [rbx + 0x90]
mov edx, dword [rbp + 0xc]
cmp dword [rbx + 0x94], ecx
jg 0x18008a5a0
xor r8d, r8d
mov r9d, edx
mov rcx, rbx
lea edx, [r8 + 0x4b]
mov dword [rsp + 0x20], r13d
call fcn.1800346c0
mov r11d, dword [rsp + 0x30]
xor r8d, r8d
mov r14d, dword [rbp + 0xc]
mov dword [rsp + 0xc8], r8d
mov rcx, qword [rsp + 0xc0]
mov ebp, dword [rsi]
sub ebp, dword [rcx + 8]
test byte [rcx + 0x24], 1
je 0x18008a631
mov r12d, dword [rdi + 0x34]
inc dword [rdi + 0x38]
mov esi, dword [rdi + 0x38]
lea eax, [r12 + 1]
mov dword [rsp + 0x38], r12d
mov dword [rdi + 0x34], eax
cmp dword [rcx + 0x14], r13d
je 0x18008a567
mov edx, 0xf
mov rcx, rbx
call fcn.180034770
mov r13d, eax
lea ecx, [rbp + r15 + 1]
mov r9d, esi
mov r8d, r12d
mov dword [rsp + 0x20], ecx
mov rcx, rbx
mov edx, 0x79
call fcn.1800347e0
test r13d, r13d
je 0x18008a5e7
mov rcx, qword [rbx]
mov edx, dword [rbx + 0x90]
cmp byte [rcx + 0x67], 0
je 0x18008a5d2
lea rax, [0x180180dc0]
jmp 0x18008a5e4
lea eax, [rcx + 1]
lea rcx, [rcx + rcx*2]
xor r8d, r8d
mov dword [rbx + 0x90], eax
mov rax, qword [rbx + 0x88]
mov dword [rax + rcx*8 + 8], edx
mov dword [rax + rcx*8 + 0xc], r8d
mov qword [rax + rcx*8 + 0x10], r8
mov qword [rax + rcx*8], 0x4b
jmp 0x18008a517
movsxd rax, r13d
lea rcx, [rax + rax*2]
mov rax, qword [rbx + 0x88]
lea rax, [rax + rcx*8]
mov dword [rax + 8], edx
mov r13d, dword [rsp + 0x30]
mov r9d, dword [rsp + 0x3c]
xor eax, eax
lea edx, [rax + 0x22]
mov rcx, rbx
mov r8d, r13d
mov dword [rsp + 0x20], eax
call fcn.1800347e0
mov r9d, esi
inc eax
mov r8d, r13d
mov edx, 0x85
mov rcx, rbx
mov dword [rsp + 0x20], r12d
mov dword [rsp + 0x34], eax
call fcn.1800347e0
xor r9d, r9d
mov r13d, r12d
mov esi, r9d
jmp 0x18008a6b5
mov r9d, dword [rsp + 0x3c]
mov dword [rsp + 0x20], r8d
mov edx, 0x23
mov r8d, r11d
mov rcx, rbx
call fcn.1800347e0
mov r8d, dword [r12 + 0xc]
mov esi, 1
inc eax
mov dword [rsp + 0x34], eax
test r8d, r8d
jle 0x18008a674
mov r9d, dword [rsp + 0x40]
lea edx, [rsi + 0x3a]
mov rcx, rbx
mov dword [rsp + 0x20], esi
call fcn.1800347e0
cmp dword [r12 + 0xc], 0
mov r13d, dword [rsp + 0x30]
mov dword [rsp + 0x38], r13d
jle 0x18008a6b2
movsxd rcx, dword [rbx + 0x90]
mov edx, dword [r12 + 8]
cmp dword [rbx + 0x94], ecx
jg 0x18008a715
xor eax, eax
mov r8d, edx
or r9d, 0xffffffff
lea edx, [rax + 0x56]
mov rcx, rbx
mov dword [rsp + 0x20], eax
call fcn.1800346c0
xor r9d, r9d
mov r8, qword [rsp + 0x50]
lea edx, [rsi + rbp]
lea esi, [rdx - 1]
mov dword [rsp + 0x44], edx
test r15d, r15d
jle 0x18008a6e1
lea rax, [r8 + 0x18]
mov ecx, r15d
cmp word [rax], 0
jne 0x18008a6d8
inc esi
add rax, 0x20
dec rcx
jne 0x18008a6d0
lea eax, [r15 - 1]
movsxd rbp, eax
test eax, eax
js 0x18008a7cc
mov edi, dword [rsp + 0x38]
lea r12d, [rax + r14]
mov rax, rbp
shl rax, 5
lea r13, [rax + r8 + 0x18]
movzx eax, word [r13]
test ax, ax
je 0x18008a74e
movzx edx, ax
dec edx
jmp 0x18008a752
lea eax, [rcx + 1]
lea rcx, [rcx + rcx*2]
xor r9d, r9d
mov dword [rbx + 0x90], eax
mov rax, qword [rbx + 0x88]
mov dword [rax + rcx*8 + 4], edx
mov dword [rax + rcx*8 + 8], 0xffffffff
mov dword [rax + rcx*8 + 0xc], r9d
mov qword [rax + rcx*8 + 0x10], r9
mov dword [rax + rcx*8], 0x56
jmp 0x18008a6b5
mov edx, esi
dec esi
movsxd rcx, dword [rbx + 0x90]
cmp dword [rbx + 0x94], ecx
jg 0x18008a77e
mov r9d, edx
mov r8d, edi
mov rcx, rbx
mov edx, 0x5e
mov dword [rsp + 0x20], r12d
call fcn.1800346c0
xor r9d, r9d
jmp 0x18008a7ab
lea eax, [rcx + 1]
lea rcx, [rcx + rcx*2]
mov dword [rbx + 0x90], eax
mov rax, qword [rbx + 0x88]
mov dword [rax + rcx*8 + 4], edi
mov dword [rax + rcx*8 + 8], edx
mov dword [rax + rcx*8 + 0xc], r12d
mov qword [rax + rcx*8 + 0x10], r9
mov dword [rax + rcx*8], 0x5e
dec r12d
sub r13, 0x20
dec rbp
jns 0x18008a704
mov rdi, qword [rsp + 0xb0]
mov r13d, dword [rsp + 0x38]
mov edx, dword [rsp + 0x44]
mov r12d, dword [rsp + 0x48]
mov ecx, r12d
sub ecx, 0xa
je 0x18008a836
dec ecx
je 0x18008ab97
dec ecx
je 0x18008aa47
sub ecx, 2
je 0x18008aa47
dec ecx
mov rsi, qword [rsp + 0xd0]
je 0x18008a8f3
movsxd rcx, dword [rbx + 0x90]
cmp r12d, 9
jne 0x18008a8a2
mov edx, dword [rsi + 0xc]
cmp dword [rbx + 0x94], ecx
jg 0x18008a872
mov dword [rsp + 0x20], r9d
mov r8d, edx
mov r9d, r15d
lea edx, [r12 + 0x4b]
mov rcx, rbx
call fcn.1800346c0
mov ebp, dword [rsp + 0xc8]
xor esi, esi
test ebp, ebp
je 0x18008ad1b
cmp r12d, 0xb
jne 0x18008aceb
cmp r15d, 1
je 0x18008aceb
cmp r15d, dword [rdi + 0x28]
jle 0x18008ad06
mov dword [rdi + 0x28], r15d
mov dword [rdi + 0x2c], r14d
jmp 0x18008ad06
lea eax, [rcx + 1]
lea rcx, [rcx + rcx*2]
mov dword [rbx + 0x90], eax
mov rax, qword [rbx + 0x88]
mov dword [rax + rcx*8 + 4], edx
mov dword [rax + rcx*8 + 8], r15d
mov dword [rax + rcx*8 + 0xc], r9d
mov qword [rax + rcx*8 + 0x10], r9
mov dword [rax + rcx*8], 0x54
jmp 0x18008a836
mov edx, dword [rsi + 4]
cmp dword [rbx + 0x94], ecx
jg 0x18008a8c1
mov dword [rsp + 0x20], r9d
xor r9d, r9d
mov r8d, edx
lea edx, [r9 + 0xc]
jmp 0x18008a82e
lea eax, [rcx + 1]
lea rcx, [rcx + rcx*2]
mov dword [rbx + 0x90], eax
mov rax, qword [rbx + 0x88]
mov dword [rax + rcx*8 + 4], edx
mov qword [rax + rcx*8 + 8], 0
mov qword [rax + rcx*8 + 0x10], r9
mov dword [rax + rcx*8], 0xc
jmp 0x18008a836
movzx eax, byte [rdi + 0x1f]
mov ebp, dword [rsi + 8]
test al, al
jne 0x18008a906
inc dword [rdi + 0x38]
mov esi, dword [rdi + 0x38]
jmp 0x18008a915
dec al
movzx eax, al
mov byte [rdi + 0x1f], al
mov esi, dword [rdi + rax*4 + 0xe0]
movsxd rcx, dword [rbx + 0x90]
mov eax, r9d
test ebp, ebp
sets al
mov edx, r15d
sub edx, eax
lea r8d, [rax + r14]
cmp dword [rbx + 0x94], ecx
jg 0x18008a94e
mov r9d, edx
mov rcx, rbx
mov edx, 0x61
mov dword [rsp + 0x20], esi
call fcn.1800346c0
xor r9d, r9d
jmp 0x18008a97b
lea eax, [rcx + 1]
lea rcx, [rcx + rcx*2]
mov dword [rbx + 0x90], eax
mov rax, qword [rbx + 0x88]
mov dword [rax + rcx*8 + 4], r8d
mov dword [rax + rcx*8 + 8], edx
mov dword [rax + rcx*8 + 0xc], esi
mov qword [rax + rcx*8 + 0x10], r9
mov dword [rax + rcx*8], 0x61
movsxd rcx, dword [rbx + 0x90]
test ebp, ebp
jns 0x18008a9e1
cmp dword [rbx + 0x94], ecx
jg 0x18008a9a8
mov r8d, dword [rsp + 0xb8]
mov dword [rsp + 0x20], r14d
mov r9d, esi
mov edx, 0x80
jmp 0x18008a82e
mov edx, dword [rsp + 0xb8]
lea eax, [rcx + 1]
lea rcx, [rcx + rcx*2]
mov dword [rbx + 0x90], eax
mov rax, qword [rbx + 0x88]
mov dword [rax + rcx*8 + 4], edx
mov dword [rax + rcx*8 + 8], esi
mov dword [rax + rcx*8 + 0xc], r14d
mov qword [rax + rcx*8 + 0x10], r9
mov dword [rax + rcx*8], 0x80
jmp 0x18008a836
cmp dword [rbx + 0x94], ecx
jg 0x18008aa0f
mov r8d, dword [rsp + 0xb8]
mov r9d, esi
mov edx, 0x8a
mov rcx, rbx
mov dword [rsp + 0x28], ebp
mov dword [rsp + 0x20], r14d
call fcn.180034720
jmp 0x18008a836
mov edx, dword [rsp + 0xb8]
lea eax, [rcx + 1]
lea rcx, [rcx + rcx*2]
mov dword [rbx + 0x90], eax
mov rax, qword [rbx + 0x88]
mov dword [rax + rcx*8 + 4], edx
mov dword [rax + rcx*8 + 8], esi
mov dword [rax + rcx*8 + 0xc], r14d
mov dword [rax + rcx*8 + 0x10], ebp
mov dword [rax + rcx*8], 0xfd8a
jmp 0x18008a836
movsxd rcx, dword [rbx + 0x90]
cmp dword [rbx + 0x94], ecx
jg 0x18008aa73
mov r9d, edx
mov r8d, r13d
mov rcx, rbx
mov edx, 0x5e
mov dword [rsp + 0x20], r14d
call fcn.1800346c0
xor r9d, r9d
jmp 0x18008aaa1
lea eax, [rcx + 1]
lea rcx, [rcx + rcx*2]
mov dword [rbx + 0x90], eax
mov rax, qword [rbx + 0x88]
mov dword [rax + rcx*8 + 4], r13d
mov dword [rax + rcx*8 + 8], edx
mov dword [rax + rcx*8 + 0xc], r14d
mov qword [rax + rcx*8 + 0x10], r9
mov dword [rax + rcx*8], 0x5e
movsxd rcx, dword [rbx + 0x90]
mov r8d, dword [rsp + 0xb8]
cmp dword [rbx + 0x94], ecx
jg 0x18008aae6
mov dword [rsp + 0x20], r9d
mov r9d, dword [rsp + 0xc8]
mov edx, 0x7f
mov rcx, rbx
call fcn.1800346c0
mov edx, dword [rsp + 0xc8]
mov r8d, dword [rsp + 0xb8]
xor r9d, r9d
jmp 0x18008ab1b
mov edx, dword [rsp + 0xc8]
lea eax, [rcx + 1]
lea rcx, [rcx + rcx*2]
mov dword [rbx + 0x90], eax
mov rax, qword [rbx + 0x88]
mov dword [rax + rcx*8 + 4], r8d
mov dword [rax + rcx*8 + 8], edx
mov dword [rax + rcx*8 + 0xc], r9d
mov qword [rax + rcx*8 + 0x10], r9
mov dword [rax + rcx*8], 0x7f
movsxd rcx, dword [rbx + 0x90]
cmp dword [rbx + 0x94], ecx
jg 0x18008ab40
mov dword [rsp + 0x20], edx
mov r9d, r14d
mov rcx, rbx
mov edx, 0x80
call fcn.1800346c0
jmp 0x18008ab6e
lea eax, [rcx + 1]
lea rcx, [rcx + rcx*2]
mov dword [rbx + 0x90], eax
mov rax, qword [rbx + 0x88]
mov dword [rax + rcx*8 + 4], r8d
mov dword [rax + rcx*8 + 8], r14d
mov dword [rax + rcx*8 + 0xc], edx
mov qword [rax + rcx*8 + 0x10], r9
mov dword [rax + rcx*8], 0x80
movsxd rax, dword [rbx + 0x90]
test eax, eax
jle 0x18008a836
lea rcx, [rax + rax*2]
mov rax, qword [rbx + 0x88]
mov edx, 8
mov word [rax + rcx*8 - 0x16], dx
jmp 0x18008a836
mov rsi, qword [rsp + 0xd0]
movsxd rdx, dword [rbx + 0x90]
mov ebp, dword [rsp + 0xc8]
mov rsi, qword [rsi + 0x18]
cmp dword [rbx + 0x94], edx
jg 0x18008abd4
mov r9d, r15d
mov r8d, r14d
mov edx, 0x61
mov rcx, rbx
mov dword [rsp + 0x20], ebp
call fcn.1800346c0
mov edx, eax
jmp 0x18008ac02
lea rcx, [rdx + rdx*2]
lea eax, [rdx + 1]
mov dword [rbx + 0x90], eax
mov rax, qword [rbx + 0x88]
mov dword [rax + rcx*8 + 4], r14d
mov dword [rax + rcx*8 + 8], r15d
mov dword [rax + rcx*8 + 0xc], ebp
mov qword [rax + rcx*8 + 0x10], r9
mov dword [rax + rcx*8], 0x61
mov rcx, qword [rbx]
cmp byte [rcx + 0x67], 0
je 0x18008ac1e
cmp r15d, 0xfffffff5
je 0x18008ac7c
mov r8, rsi
mov edx, r15d
call fcn.180035890
jmp 0x18008ac7c
test edx, edx
jns 0x18008ac2a
mov edx, dword [rbx + 0x90]
dec edx
movsxd rax, edx
lea rcx, [rax + rax*2]
mov rax, qword [rbx + 0x88]
lea rdx, [rax + rcx*8]
test r15d, r15d
jns 0x18008ac6e
cmp byte [rdx + 1], 0
jne 0x18008ac6e
cmp r15d, 0xfffffffd
jne 0x18008ac56
mov dword [rdx + 0x10], esi
mov byte [rdx + 1], r15b
jmp 0x18008ac7c
test rsi, rsi
je 0x18008ac7c
mov qword [rdx + 0x10], rsi
mov byte [rdx + 1], r15b
cmp r15d, 0xfffffff5
jne 0x18008ac7c
inc dword [rsi + 0x18]
jmp 0x18008ac7c
mov r9d, r15d
mov r8, rsi
mov rcx, rbx
call fcn.180035ac0
movsxd rcx, dword [rbx + 0x90]
cmp dword [rbx + 0x94], ecx
jg 0x18008acb2
mov r8d, dword [rsp + 0xb8]
mov r9d, ebp
mov edx, 0x8a
mov rcx, rbx
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], r14d
call fcn.180034720
jmp 0x18008a83d
mov edx, dword [rsp + 0xb8]
lea eax, [rcx + 1]
lea rcx, [rcx + rcx*2]
mov dword [rbx + 0x90], eax
mov rax, qword [rbx + 0x88]
mov dword [rax + rcx*8 + 4], edx
mov dword [rax + rcx*8 + 8], ebp
mov dword [rax + rcx*8 + 0xc], r14d
mov dword [rax + rcx*8 + 0x10], r15d
mov dword [rax + rcx*8], 0xfd8a
jmp 0x18008a83d
test r14d, r14d
je 0x18008ad06
movzx eax, byte [rdi + 0x1f]
cmp al, 8
jae 0x18008ad06
movzx eax, al
mov dword [rdi + rax*4 + 0xe0], r14d
inc byte [rdi + 0x1f]
movzx eax, byte [rdi + 0x1f]
cmp al, 8
jae 0x18008ad1b
movzx eax, al
mov dword [rdi + rax*4 + 0xe0], ebp
inc byte [rdi + 0x1f]
mov rcx, qword [rbx + 0x18]
mov edx, dword [rsp + 0x40]
mov eax, dword [rcx + 0x48]
not edx
add eax, dword [rcx + 0x44]
jns 0x18008ad3a
mov r8d, edx
mov rdx, rbx
call fcn.180035230
jmp 0x18008ad4a
mov rcx, qword [rcx + 0x50]
mov eax, dword [rbx + 0x90]
movsxd rdx, edx
mov dword [rcx + rdx*4], eax
mov rdi, qword [rsp + 0xc0]
movsxd rcx, dword [rbx + 0x90]
test byte [rdi + 0x24], 1
je 0x18008ada1
cmp dword [rbx + 0x94], ecx
jg 0x18008ad84
mov r9d, dword [rsp + 0x34]
mov r8d, dword [rsp + 0x30]
mov edx, 0x25
mov rcx, rbx
mov dword [rsp + 0x20], esi
call fcn.1800346c0
jmp 0x18008adfa
lea eax, [rcx + 1]
lea rcx, [rcx + rcx*2]
mov dword [rbx + 0x90], eax
mov rax, qword [rbx + 0x88]
mov dword [rax + rcx*8], 0x25
jmp 0x18008ade1
cmp dword [rbx + 0x94], ecx
jg 0x18008adc6
mov r9d, dword [rsp + 0x34]
mov r8d, dword [rsp + 0x30]
mov edx, 0x27
mov rcx, rbx
mov dword [rsp + 0x20], esi
call fcn.1800346c0
jmp 0x18008adfa
lea eax, [rcx + 1]
lea rcx, [rcx + rcx*2]
mov dword [rbx + 0x90], eax
mov rax, qword [rbx + 0x88]
mov dword [rax + rcx*8], 0x27
mov edx, dword [rsp + 0x30]
mov dword [rax + rcx*8 + 4], edx
mov edx, dword [rsp + 0x34]
mov qword [rax + rcx*8 + 0x10], rsi
mov dword [rax + rcx*8 + 0xc], esi
mov dword [rax + rcx*8 + 8], edx
mov edx, dword [rdi + 0x10]
test edx, edx
je 0x18008ae55
movsxd rcx, dword [rbx + 0x90]
cmp dword [rbx + 0x94], ecx
jg 0x18008ae28
xor r9d, r9d
mov r8d, edx
mov rcx, rbx
lea edx, [r9 + 0x43]
mov dword [rsp + 0x20], esi
call fcn.1800346c0
jmp 0x18008ae55
lea eax, [rcx + 1]
lea rcx, [rcx + rcx*2]
mov dword [rbx + 0x90], eax
mov rax, qword [rbx + 0x88]
mov dword [rax + rcx*8 + 4], edx
mov qword [rax + rcx*8 + 8], 0
mov qword [rax + rcx*8 + 0x10], rsi
mov dword [rax + rcx*8], 0x43
mov rcx, qword [rbx + 0x18]
mov edx, dword [rsp + 0x3c]
mov eax, dword [rcx + 0x48]
not edx
add eax, dword [rcx + 0x44]
jns 0x18008ae74
mov r8d, edx
mov rdx, rbx
call fcn.180035230
jmp 0x18008ae84
mov rcx, qword [rcx + 0x50]
mov eax, dword [rbx + 0x90]
movsxd rdx, edx
mov dword [rcx + rdx*4], eax
add rsp, 0x68
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret