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

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xc8
mov r13d, 1
mov dword [rsp + 0x88], edx
mov eax, dword [rsp + 0x88]
mov rbx, rcx
mov word [rsp + 0x70], ax
mov rax, qword [rcx]
mov qword [rsp + 0x60], rax
movzx eax, byte [rcx + 0x40]
mov byte [rsp + 0x73], al
mov dword [rsp + 0x48], eax
cmp eax, 1
jle 0x14022a077
xor r13d, r13d
cmp eax, 2
setne r13b
lea r13d, [r13 + r13*4 + 5]
mov rax, qword [rbx + 0x10]
test rax, rax
je 0x14022a093
cmp word [rsp + 0x88], 0
je 0x14022a093
mov eax, dword [rax]
mov dword [rsp + 0x44], eax
jmp 0x14022a099
xor eax, eax
mov dword [rsp + 0x44], eax
movzx r14d, byte [rsp + 0x73]
mov edi, dword [rsp + 0x44]
movsxd rsi, r13d
movsxd r12, dword [rsp + 0x44]
lea rax, [r14 + 4]
imul eax, r13d
shl eax, 4
lea edx, [rax + rdi*2]
mov rax, qword [rsp + 0x60]
movsxd rdx, edx
mov rcx, qword [rax]
call fcn.1401d9ef0
mov qword [rsp + 0x58], rax
test rax, rax
je 0x14022a814
shl rsi, 5
mov ecx, 8
mov r8, qword [rsp + 0x58]
shl r14, 3
lea rbp, [rax + rsi]
xor eax, eax
mov rdi, rbp
add rsi, rbp
rep stosd dword [rdi], eax
lea eax, [r13 + r13]
mov rcx, rsi
mov edx, eax
mov qword [r8 + 0x18], rcx
add r8, 0x20
add rcx, r14
dec edx
jne 0x14022a101
xor r15d, r15d
cmp dword [rsp + 0x44], 0
mov qword [rsp + 0x78], r15
je 0x14022a13a
cdqe
lea rcx, [r12 + r12]
imul rax, r14
add rax, rsi
mov qword [rsp + 0x78], rax
mov rdi, qword [rsp + 0x78]
xor eax, eax
rep stosb byte [rdi], al
mov rax, qword [rsp + 0x60]
mov edx, 0x30
mov eax, dword [rax + 0xd0]
cmp eax, edx
cmova eax, edx
cmp dword [rsp + 0x44], 0
mov word [rbp + 0x10], ax
je 0x14022a16c
cmp dword [rsp + 0x48], 0
mov eax, 0xffffffff
cmove eax, dword [rsp + 0x44]
mov byte [rbp + 0x16], al
mov rax, qword [rsp + 0x58]
xor esi, esi
xor edi, edi
mov dword [rsp + 0x74], 1
mov dword [rsp + 0x84], esi
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x68], rdi
mov word [rsp + 0x80], 0
mov word [rsp + 0x8c], 0
mov eax, dword [rsp + 0x68]
mov dword [rsp + 0xa4], eax
cmp dword [rsp + 0x48], eax
jle 0x14022a58e
mov rax, qword [rsp + 0x68]
xor r9d, r9d
mov r12, rbp
mov dword [rsp + 0x4c], r9d
shl rax, 3
mov dword [rsp + 0xa0], r9d
mov qword [rsp + 0x90], rax
lea rax, [rsp + 0xb8]
mov qword [rsp + 0xa8], rax
mov esi, dword [rsp + 0x74]
cmp dword [rsp + 0xa0], esi
jge 0x14022a56f
mov r15, qword [rbx + 0x58]
test r15, r15
je 0x14022a55f
mov r11, qword [r12]
mov rax, r11
not rax
and rax, qword [r15]
jne 0x14022a556
mov rdi, qword [r15 + 8]
test r11, rdi
jne 0x14022a556
mov r10d, dword [r12 + 0x10]
test byte [r15 + 0x39], 0x40
je 0x14022a240
cmp r10w, 2
jle 0x14022a556
movsx ecx, word [r15 + 0x12]
mov edx, r10d
add edx, dword [r15 + 0x14]
or r11, rdi
movsx edx, dx
call fcn.1401f09d0
movsx edx, word [r12 + 0x14]
movsx ecx, ax
call fcn.1401f09d0
mov qword [rsp + 0x98], r11
mov r11b, byte [r12 + 0x16]
add r10w, word [r15 + 0x16]
mov esi, eax
mov word [rsp + 0x8e], r10w
mov word [rsp + 0x82], r10w
test r11b, r11b
jns 0x14022a2d9
mov rdx, qword [rbx + 0x10]
mov qword [rsp + 0x28], r15
xor r11d, r11d
mov r8, r12
mov rax, qword [rsp + 0xa8]
mov rcx, rbx
mov qword [rsp + 0xb8], r11
mov qword [rsp + 0x30], rax
mov eax, dword [rsp + 0xa4]
mov dword [rsp + 0x20], eax
movzx r9d, word [rbx + 0x3c]
call fcn.140229970
mov r11d, eax
test al, al
js 0x14022a3b7
jmp 0x14022a2e6
mov rax, qword [r12 + 8]
mov qword [rsp + 0xb8], rax
movsx edi, r11b
cmp dword [rsp + 0x44], edi
jle 0x14022a3b7
mov rax, qword [rsp + 0x78]
movsx r8, r11b
add r8, r8
add r8, rax
cmp word [r8], 0
jne 0x14022a3a4
mov rax, qword [rbx + 0x20]
mov ecx, 0x1e
mov rax, qword [rax + 0x20]
mov eax, dword [rax]
add eax, 0x3b
cdq
idiv ecx
movsxd rcx, eax
call fcn.1401f0980
mov ecx, dword [rsp + 0x70]
lea r9d, [rax + rcx]
test r11b, r11b
je 0x14022a353
mov eax, dword [rsp + 0x44]
sub eax, edi
imul eax, eax, 0x64
cdq
idiv dword [rsp + 0x44]
movsxd rcx, eax
call fcn.1401f0980
lea r9d, [r9 + rax - 0x42]
mov eax, dword [rbx + 0x3c]
mov edi, r9d
test ah, 0x40
je 0x14022a37c
lea edi, [r9 + 0x10]
test r11b, r11b
jne 0x14022a36b
lea edi, [r9 + 0xa]
mov cx, word [rbx + 0x3e]
cmp word [rsp + 0x70], cx
cmovle cx, word [rsp + 0x70]
jmp 0x14022a396
test ah, 1
je 0x14022a392
cmp word [rsp + 0x70], 0xa
jle 0x14022a392
mov eax, dword [rsp + 0x70]
lea ecx, [rax - 0xa]
jmp 0x14022a396
mov ecx, dword [rsp + 0x70]
movsx ecx, cx
call fcn.140190320
add eax, edi
mov word [r8], ax
movsx edx, word [r8]
movsx ecx, si
call fcn.1401f09d0
mov edx, esi
lea esi, [rax + 3]
jmp 0x14022a3ba
lea edx, [rsi - 2]
cmp qword [rsp + 0x68], 0
jne 0x14022a3df
test byte [r15 + 0x3b], 2
je 0x14022a3df
mov ax, word [rsp + 0x8e]
sub esi, 0xa
sub eax, 0x1e
mov word [rsp + 0x82], ax
mov rax, qword [rsp + 0x50]
xor ecx, ecx
mov edi, dword [rsp + 0x4c]
cmp ecx, edi
jge 0x14022a40c
mov rdi, qword [rsp + 0x98]
cmp rdi, qword [rax]
jne 0x14022a404
mov edi, r11d
xor dil, byte [rax + 0x16]
jns 0x14022a454
inc ecx
add rax, 0x20
jmp 0x14022a3e6
cmp r13d, edi
jg 0x14022a439
cmp word [rsp + 0x8c], si
jl 0x14022a556
jne 0x14022a42f
cmp word [rsp + 0x80], dx
jle 0x14022a556
movsxd rax, dword [rsp + 0x84]
jmp 0x14022a446
movsxd rax, dword [rsp + 0x4c]
mov edi, eax
inc edi
mov dword [rsp + 0x4c], edi
mov rdi, qword [rsp + 0x50]
shl rax, 5
add rax, rdi
jmp 0x14022a47e
cmp si, word [rax + 0x12]
jg 0x14022a556
jne 0x14022a47e
mov di, word [rsp + 0x82]
cmp word [rax + 0x10], di
jl 0x14022a556
jne 0x14022a47e
cmp dx, word [rax + 0x14]
jge 0x14022a556
mov rcx, qword [r12]
or rcx, qword [r15 + 8]
mov word [rax + 0x12], si
mov qword [rax], rcx
mov di, word [rsp + 0x82]
mov rcx, qword [rsp + 0xb8]
mov byte [rax + 0x16], r11b
mov word [rax + 0x10], di
mov rsi, qword [r12 + 0x18]
mov qword [rax + 8], rcx
mov rdi, qword [rax + 0x18]
mov word [rax + 0x14], dx
mov ecx, dword [rsp + 0x90]
rep movsb byte [rdi], byte [rsi]
mov rsi, qword [rsp + 0x90]
mov rax, qword [rax + 0x18]
mov qword [rax + rsi], r15
mov eax, dword [rsp + 0x4c]
cmp r13d, eax
jg 0x14022a556
mov rax, qword [rsp + 0x50]
xor r10d, r10d
mov edx, 1
mov dword [rsp + 0x84], r10d
mov ax, word [rax + 0x12]
mov word [rsp + 0x8c], ax
mov rax, qword [rsp + 0x50]
mov eax, dword [rax + 0x10]
mov word [rsp + 0x80], ax
mov rax, qword [rsp + 0x50]
add rax, 0x20
cmp r13d, edx
je 0x14022a556
mov cx, word [rax + 0x12]
cmp cx, word [rsp + 0x8c]
jg 0x14022a534
jne 0x14022a54e
mov esi, dword [rsp + 0x80]
cmp word [rax + 0x14], si
jle 0x14022a54e
mov esi, dword [rax + 0x14]
mov word [rsp + 0x8c], cx
mov dword [rsp + 0x84], edx
mov word [rsp + 0x80], si
inc edx
add rax, 0x20
jmp 0x14022a512
mov r15, qword [r15 + 0x50]
jmp 0x14022a200
inc dword [rsp + 0xa0]
add r12, 0x20
jmp 0x14022a1eb
mov rax, rbp
mov rbp, qword [rsp + 0x50]
inc qword [rsp + 0x68]
mov qword [rsp + 0x50], rax
mov eax, dword [rsp + 0x4c]
mov dword [rsp + 0x74], eax
jmp 0x14022a1a2
cmp dword [rsp + 0x74], 0
je 0x14022a5a0
lea rax, [rbp + 0x20]
mov edx, 1
jmp 0x14022a5b6
mov rcx, qword [rsp + 0x60]
lea rdx, str.no_query_solution
call fcn.1401dc700
jmp 0x14022a7ef
cmp dword [rsp + 0x74], edx
jle 0x14022a5d0
mov si, word [rax + 0x12]
cmp word [rbp + 0x12], si
cmovg rbp, rax
inc edx
add rax, 0x20
jmp 0x14022a5b6
lea rdx, [rbx + 0x364]
xor ecx, ecx
cmp dword [rsp + 0x48], ecx
jle 0x14022a609
mov rax, qword [rbp + 0x18]
add rdx, 0x70
mov rax, qword [rax + rcx*8]
inc rcx
mov qword [rdx - 0x14], rax
movzx eax, byte [rax + 0x10]
mov byte [rdx - 0x34], al
imul rax, rax, 0x68
add rax, qword [rbx + 8]
mov eax, dword [rax + 0x4c]
mov dword [rdx - 0x70], eax
jmp 0x14022a5d9
mov eax, dword [rbx + 0x3c]
and ax, 0x180
cmp ax, 0x100
jne 0x14022a674
cmp byte [rbx + 0x43], 0
jne 0x14022a674
cmp word [rsp + 0x88], 0
je 0x14022a674
mov rdx, qword [rbx + 0x18]
mov r9d, pe_nt_image_headers64
mov r8, rbp
mov rcx, rbx
lea rax, [rsp + 0xb8]
mov qword [rsp + 0x30], rax
mov rax, qword [rbp + 0x18]
mov rax, qword [rax + r14 - 8]
mov qword [rsp + 0x28], rax
movzx eax, byte [rsp + 0x73]
dec eax
movzx eax, ax
mov dword [rsp + 0x20], eax
call fcn.140229970
mov rdx, qword [rbx + 0x18]
movsx eax, al
cmp eax, dword [rdx]
jne 0x14022a674
mov byte [rbx + 0x43], 2
mov dl, byte [rbx + 0x44]
mov rcx, qword [rbx + 0x10]
and edx, 0xfffffffb
mov byte [rbx + 0x44], dl
test rcx, rcx
je 0x14022a7e8
movsx eax, byte [rbp + 0x16]
mov r8d, dword [rbx + 0x3c]
mov byte [rbx + 0x41], al
test r8b, 0x80
je 0x14022a6c6
cmp eax, dword [rcx]
jne 0x14022a6a3
mov byte [rbx + 0x43], 2
mov rdx, qword [rbx + 0x20]
mov rdx, qword [rdx + 0x48]
test rdx, rdx
je 0x14022a773
mov edx, dword [rdx]
cmp eax, edx
jle 0x14022a773
mov byte [rbx + 0x41], dl
jmp 0x14022a773
mov r9, qword [rbp + 8]
mov qword [rbx + 0x68], r9
test al, al
jg 0x14022a75c
cmp dword [rsp + 0x48], 0
mov byte [rbx + 0x41], 0
je 0x14022a773
mov rax, qword [rbp + 0x18]
mov rdx, qword [rax + r14 - 8]
mov eax, dword [rdx + 0x38]
bt eax, 0xc
jb 0x14022a773
not eax
test eax, 0x104
je 0x14022a773
lea rax, [rsp + 0xb8]
mov qword [rsp + 0x28], rdx
xor r8d, r8d
mov rdx, rcx
mov qword [rsp + 0x30], rax
movzx eax, byte [rsp + 0x73]
mov r9d, 0x800
mov rcx, rbx
mov qword [rsp + 0xb8], r8
mov r8, rbp
dec eax
movzx eax, ax
mov dword [rsp + 0x20], eax
call fcn.140229970
mov rdx, qword [rbx + 0x10]
movsx eax, al
cmp eax, dword [rdx]
jne 0x14022a773
mov rax, qword [rsp + 0xb8]
or byte [rbx + 0x44], 4
mov qword [rbx + 0x68], rax
jmp 0x14022a773
cmp dword [rsp + 0x48], 0
je 0x14022a773
dec al
jne 0x14022a773
and r8d, 3
je 0x14022a773
or edx, 4
mov byte [rbx + 0x44], dl
test byte [rbx + 0x3d], 2
je 0x14022a7e8
mov rdx, qword [rbx + 0x10]
movsx eax, byte [rbx + 0x41]
cmp eax, dword [rdx]
jne 0x14022a7e8
cmp dword [rsp + 0x48], 0
je 0x14022a7e8
xor eax, eax
xor r9d, r9d
mov r8, rbp
mov rcx, rbx
mov qword [rsp + 0xb8], rax
lea rax, [rsp + 0xb8]
mov qword [rsp + 0x30], rax
mov rax, qword [rbp + 0x18]
mov rax, qword [rax + r14 - 8]
mov qword [rsp + 0x28], rax
movzx eax, byte [rsp + 0x73]
dec eax
movzx eax, ax
mov dword [rsp + 0x20], eax
call fcn.140229970
mov rdx, qword [rbx + 0x10]
movsx eax, al
cmp eax, dword [rdx]
jne 0x14022a7e8
mov rax, qword [rsp + 0xb8]
or byte [rbx + 0x44], 8
mov qword [rbx + 0x68], rax
mov eax, dword [rbp + 0x10]
mov word [rbx + 0x48], ax
mov rax, qword [rsp + 0x60]
mov rdx, qword [rsp + 0x58]
mov rcx, qword [rax]
add rsp, 0xc8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp fcn.1401d9e20
add rsp, 0xc8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret