Function at 0x140196d50
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 rax, qword [rcx]
mov qword [rsp + 0x90], rax
movzx eax, byte [rcx + 0x40]
mov r14, rcx
mov dword [rsp + 0xac], edx
mov word [rsp + 0xa8], dx
mov byte [rsp + 0xab], al
mov dword [rsp + 0x8c], eax
cmp eax, 1
jle 0x140197570
cmp eax, 2
setne al
setne bl
movzx eax, al
movzx ebx, bl
lea eax, [rax + rax*4 + 5]
lea rbx, [rbx + rbx*4 + 5]
mov dword [rsp + 0x50], eax
cmp word [rsp + 0xac], 0
mov rdx, qword [r14 + 0x10]
je 0x140196dd7
test rdx, rdx
je 0x140196dd7
movsxd rsi, dword [rdx]
mov dword [rsp + 0x54], esi
lea ecx, [rsi + rsi]
jmp 0x140196de3
mov dword [rsp + 0x54], 0
xor ecx, ecx
xor esi, esi
movzx edi, byte [rsp + 0xab]
lea rdx, [rdi + 4]
imul edx, eax
mov rax, qword [rsp + 0x90]
shl edx, 4
add edx, ecx
mov rcx, qword [rax]
movsxd rdx, edx
call fcn.140173f40
mov qword [rsp + 0xa0], rax
test rax, rax
je 0x1401976e7
lea r10, [rdi*8]
mov edi, dword [rsp + 0x50]
mov rcx, rbx
shl rcx, 5
mov qword [rsp + 0x98], r10
lea r8d, [rdi + rdi]
lea rbx, [rax + rcx]
movsxd r8, r8d
mov qword [rsp + 0x80], rbx
add rcx, rbx
mov r9, r8
mov qword [rbx], 0
mov rdx, rcx
mov qword [rbx + 8], 0
shl r9, 5
mov qword [rbx + 0x10], 0
add r9, rax
mov qword [rbx + 0x18], 0
mov qword [rax + 0x18], rdx
add rax, 0x20
add rdx, r10
cmp rax, r9
jne 0x140196e78
imul r8, qword [rsp + 0x98]
mov r10d, dword [rsp + 0x54]
lea rax, [rcx + r8]
mov qword [rsp + 0x68], rax
test r10d, r10d
jne 0x140197587
mov rdi, qword [rsp + 0x90]
mov eax, 0x30
mov qword [rsp + 0x68], 0
cmp word [rdi + 0xe0], 0x30
cmovle ax, word [rdi + 0xe0]
mov rdi, qword [rsp + 0x80]
mov word [rdi + 0x10], ax
mov r8d, dword [rsp + 0x8c]
mov r15, qword [rsp + 0x80]
test r8d, r8d
je 0x14019743a
xor r11d, r11d
xor ebx, ebx
mov qword [rsp + 0x78], 0
mov r15, qword [rsp + 0xa0]
mov word [rsp + 0x72], r11w
mov r12d, 1
mov word [rsp + 0x70], bx
mov dword [rsp + 0x74], 0
mov eax, dword [rsp + 0x78]
mov dword [rsp + 0x64], eax
test r12d, r12d
je 0x1401971d7
mov rax, qword [rsp + 0x78]
mov r13, qword [rsp + 0x80]
movsxd r12, r12d
shl r12, 5
shl rax, 3
add r12, r13
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x58], r12
xor r12d, r12d
nop dword [rax + rax]
mov rbp, qword [r14 + 0x58]
test rbp, rbp
je 0x1401971c8
mov eax, dword [rsp + 0x48]
and eax, 2
mov dword [rsp + 0x60], eax
jmp 0x140196f8d
mov rbp, qword [rbp + 0x50]
test rbp, rbp
je 0x1401971c8
mov rbx, qword [r13]
mov rax, rbx
not rax
and rax, qword [rbp]
jne 0x140196f80
mov r10, qword [rbp + 8]
test rbx, r10
jne 0x140196f80
movzx esi, word [r13 + 0x10]
test byte [rbp + 0x39], 0x40
je 0x140196fb7
cmp si, 2
jle 0x140196f80
movzx edx, word [rbp + 0x14]
movsx ecx, word [rbp + 0x12]
or rbx, r10
add edx, esi
movsx edx, dx
call fcn.14015cd50
movsx edx, word [r13 + 0x14]
movsx ecx, ax
call fcn.14015cd50
movzx r10d, byte [r13 + 0x16]
add si, word [rbp + 0x16]
mov edi, eax
test r10b, r10b
js 0x140197160
mov rax, qword [r13 + 8]
mov qword [rsp + 0xb8], rax
movsx edx, r10b
cmp dword [rsp + 0x54], edx
jle 0x1401971a5
mov rcx, qword [rsp + 0x68]
movsx rax, r10b
lea r11, [rcx + rax*2]
movzx r9d, word [r11]
test r9w, r9w
je 0x1401972ad
movsx ecx, di
movsx edx, r9w
call fcn.14015cd50
mov ecx, edi
lea edi, [rax + 3]
test r12d, r12d
je 0x1401971b8
movsxd rdx, r12d
mov rax, r15
shl rdx, 5
add rdx, r15
jmp 0x14019705d
add rax, 0x20
cmp rax, rdx
je 0x140197210
cmp rbx, qword [rax]
jne 0x140197050
mov r11d, r10d
xor r11b, byte [rax + 0x16]
js 0x140197050
cmp di, word [rax + 0x12]
jg 0x140196f80
je 0x14019728e
mov rdx, qword [r13]
or rdx, qword [rbp + 8]
mov qword [rax], rdx
mov rdx, qword [rsp + 0xb8]
cmp dword [rsp + 0x48], 8
mov word [rax + 0x10], si
mov qword [rax + 8], rdx
mov rdx, qword [rax + 0x18]
mov byte [rax + 0x16], r10b
mov rsi, qword [r13 + 0x18]
mov word [rax + 0x12], di
mov word [rax + 0x14], cx
jae 0x140197240
xor edi, edi
test edi, edi
jne 0x140197377
mov ecx, dword [rsp + 0x48]
test ecx, ecx
je 0x1401970dc
movzx ecx, byte [rsi]
mov byte [rdx], cl
mov edi, dword [rsp + 0x60]
test edi, edi
jne 0x1401973a5
mov rdx, qword [rax + 0x18]
mov rax, qword [rsp + 0x48]
mov qword [rdx + rax], rbp
cmp dword [rsp + 0x50], r12d
jg 0x140196f80
movzx r8d, word [r15 + 0x12]
movzx r10d, word [r15 + 0x10]
lea rax, [r15 + 0x20]
mov r9d, dword [rsp + 0x50]
mov word [rsp + 0x70], r8w
mov word [rsp + 0x72], r10w
cmp r9d, 1
je 0x140197398
xor r11d, r11d
mov edx, 1
jmp 0x140197143
movzx r10d, word [rax + 0x14]
mov r8d, ecx
mov r11d, edx
add edx, 1
add rax, 0x20
cmp r9d, edx
je 0x140197278
movzx ecx, word [rax + 0x12]
cmp cx, r8w
jg 0x140197128
jne 0x140197133
movzx ebx, word [rax + 0x14]
cmp bx, r10w
jle 0x140197133
mov r10d, ebx
jmp 0x14019712d
mov qword [rsp + 0x28], rbp
mov rdx, qword [r14 + 0x10]
mov r8, r13
mov rcx, r14
lea rax, [rsp + 0xb8]
movzx r9d, word [r14 + 0x3c]
mov qword [rsp + 0xb8], 0
mov qword [rsp + 0x30], rax
mov eax, dword [rsp + 0x64]
mov dword [rsp + 0x20], eax
call fcn.140196240
mov r10d, eax
test al, al
jns 0x140196ff9
lea ecx, [rdi - 2]
test r12d, r12d
jne 0x14019703c
nop dword [rax]
movsxd rax, r12d
add r12d, 1
jmp 0x140197234
add r13, 0x20
cmp r13, qword [rsp + 0x58]
jne 0x140196f60
add qword [rsp + 0x78], 1
mov rax, qword [rsp + 0x80]
mov rdi, qword [rsp + 0x78]
mov qword [rsp + 0x80], r15
cmp dword [rsp + 0x8c], edi
jle 0x1401973be
mov r15, rax
jmp 0x140196f22
cmp dword [rsp + 0x50], r12d
jg 0x1401971b8
cmp di, word [rsp + 0x70]
jg 0x140196f80
jne 0x14019722f
cmp cx, word [rsp + 0x72]
jge 0x140196f80
movsxd rax, dword [rsp + 0x74]
shl rax, 5
add rax, r15
jmp 0x14019707b
mov rcx, qword [rsi]
lea rdi, [rdx + 8]
and rdi, 0xfffffffffffffff8
mov qword [rdx], rcx
mov rbx, qword [rsp + 0x48]
mov ecx, ebx
mov r8, qword [rsi + rcx - 8]
mov qword [rdx + rcx - 8], r8
sub rdx, rdi
mov ecx, ebx
add ecx, edx
sub rsi, rdx
shr ecx, 3
rep movsq qword [rdi], qword [rsi]
jmp 0x1401970d8
mov dword [rsp + 0x74], r11d
mov word [rsp + 0x70], r8w
mov word [rsp + 0x72], r10w
jmp 0x140196f80
cmp si, word [rax + 0x10]
jg 0x140196f80
jne 0x14019707b
cmp cx, word [rax + 0x14]
jl 0x14019707b
jmp 0x140196f80
mov rax, qword [r14 + 0x20]
mov dword [rsp + 0x88], edx
mov rax, qword [rax + 0x20]
mov ecx, dword [rax]
add ecx, 0x3b
movsxd rax, ecx
imul rax, rax, 0xffffffff88888889
shr rax, 0x20
add eax, ecx
sar ecx, 0x1f
sar eax, 4
sub eax, ecx
movsxd rcx, eax
call fcn.14015b290
movzx ecx, word [rsp + 0xa8]
mov edx, dword [rsp + 0x88]
lea r9d, [rax + rcx]
test edx, edx
jne 0x140197339
movzx eax, word [r14 + 0x3c]
test ah, 0x40
jne 0x140197392
test ah, 1
movzx eax, word [rsp + 0xa8]
je 0x14019731c
cmp ax, 0xa
jle 0x140197330
sub eax, 0xa
cmp ax, 0xa
jle 0x140197330
movsx rcx, ax
call fcn.14015b290
lea r9d, [r9 + rax - 0x21]
mov word [r11], r9w
jmp 0x140197022
mov ecx, dword [rsp + 0x54]
mov eax, ecx
sub eax, edx
imul eax, eax, 0x64
cdq
idiv ecx
movsxd rcx, eax
call fcn.14015b290
lea r9d, [r9 + rax - 0x42]
movzx eax, word [r14 + 0x3c]
test ah, 0x40
je 0x140197306
add r9d, 0x10
movzx eax, word [rsp + 0xa8]
cmp word [r14 + 0x3e], ax
cmovle ax, word [r14 + 0x3e]
jmp 0x14019731c
mov ecx, dword [rsi]
mov dword [rdx], ecx
mov ecx, dword [rsp + 0x48]
mov r8d, dword [rsi + rcx - 4]
mov dword [rdx + rcx - 4], r8d
mov rdx, qword [rax + 0x18]
jmp 0x1401970dc
add r9d, 0xa
jmp 0x140197362
mov dword [rsp + 0x74], 0
jmp 0x140196f80
mov ecx, dword [rsp + 0x48]
movzx r8d, word [rsi + rcx - 2]
mov word [rdx + rcx - 2], r8w
mov rdx, qword [rax + 0x18]
jmp 0x1401970dc
test r12d, r12d
je 0x1401976c0
cmp r12d, 1
je 0x1401973f5
lea edx, [r12 - 2]
lea rax, [r15 + 0x20]
shl rdx, 5
lea rdx, [r15 + rdx + 0x40]
movzx edi, word [rax + 0x12]
cmp word [r15 + 0x12], di
cmovg r15, rax
add rax, 0x20
cmp rdx, rax
jne 0x1401973df
mov r9, qword [r15 + 0x18]
mov r8, qword [r14 + 8]
lea rdx, [r14 + 0x364]
xor ecx, ecx
mov r11d, dword [rsp + 0x8c]
mov rax, qword [r9 + rcx*8]
add rcx, 1
add rdx, 0x70
mov qword [rdx - 0x14], rax
movzx eax, byte [rax + 0x10]
lea r10, [rax + rax*2]
mov byte [rdx - 0x34], al
lea rax, [rax + r10*4]
mov eax, dword [r8 + rax*8 + 0x4c]
mov dword [rdx - 0x70], eax
cmp r11d, ecx
jg 0x14019740e
movzx eax, word [r14 + 0x3c]
and ax, 0x180
cmp ax, 0x100
je 0x1401974ee
movzx ecx, byte [r14 + 0x44]
mov rdx, qword [r14 + 0x10]
and ecx, 0xfffffffb
mov byte [r14 + 0x44], cl
test rdx, rdx
je 0x1401974b9
movsx eax, byte [r15 + 0x16]
movzx r8d, word [r14 + 0x3c]
mov byte [r14 + 0x41], al
test r8b, 0x80
je 0x1401975db
cmp eax, dword [rdx]
je 0x1401976fb
mov rcx, qword [r14 + 0x20]
mov rcx, qword [rcx + 0x48]
test rcx, rcx
je 0x140197499
mov ecx, dword [rcx]
cmp eax, ecx
jle 0x140197499
mov byte [r14 + 0x41], cl
test r8w, 0x200
je 0x1401974b9
movsx eax, byte [r14 + 0x41]
cmp eax, dword [rdx]
jne 0x1401974b9
mov eax, dword [rsp + 0x8c]
test eax, eax
jne 0x140197705
movzx eax, word [r15 + 0x10]
mov rdx, qword [rsp + 0xa0]
mov word [r14 + 0x48], ax
mov rax, qword [rsp + 0x90]
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.1401640a0
cmp byte [r14 + 0x43], 0
jne 0x14019744d
cmp word [rsp + 0xac], 0
je 0x14019744d
mov rdx, qword [r14 + 0x18]
mov r9d, pe_nt_image_headers64
mov r8, r15
mov rcx, r14
lea rax, [rsp + 0xb8]
mov rdi, qword [rsp + 0x98]
mov qword [rsp + 0x30], rax
mov rax, qword [r15 + 0x18]
mov rax, qword [rax + rdi - 8]
mov qword [rsp + 0x28], rax
movzx eax, byte [rsp + 0xab]
sub eax, 1
movzx eax, ax
mov dword [rsp + 0x20], eax
call fcn.140196240
mov rdx, qword [r14 + 0x18]
movsx eax, al
cmp eax, dword [rdx]
jne 0x14019744d
mov byte [r14 + 0x43], 2
jmp 0x14019744d
mov dword [rsp + 0x50], 1
mov eax, 1
mov ebx, 1
jmp 0x140196db7
xor edx, edx
lea r8, [rsi + rsi]
mov rcx, rax
call sub.msvcrt.dll_memset
mov rdi, qword [rsp + 0x90]
mov eax, 0x30
mov r9d, dword [rsp + 0x8c]
cmp word [rdi + 0xe0], 0x30
cmovle ax, word [rdi + 0xe0]
test r9d, r9d
mov rdi, qword [rsp + 0x80]
mov word [rdi + 0x10], ax
mov eax, 0xffffffff
cmove eax, dword [rsp + 0x54]
mov byte [rdi + 0x16], al
jmp 0x140196eda
mov r9, qword [r15 + 8]
mov qword [r14 + 0x68], r9
test al, al
jle 0x140197616
cmp al, 1
jne 0x140197499
mov r9d, dword [rsp + 0x8c]
test r9d, r9d
je 0x140197499
test r8b, 3
je 0x140197499
or ecx, 4
mov byte [r14 + 0x44], cl
jmp 0x140197499
mov r10d, dword [rsp + 0x8c]
mov byte [r14 + 0x41], 0
test r10d, r10d
je 0x1401974b9
mov rax, qword [r15 + 0x18]
mov rdi, qword [rsp + 0x98]
mov rcx, qword [rax + rdi - 8]
mov eax, dword [rcx + 0x38]
test ah, 0x10
jne 0x140197499
and eax, 0x104
cmp eax, 0x104
je 0x140197499
lea rax, [rsp + 0xb8]
mov qword [rsp + 0x28], rcx
mov r9d, 0x800
mov r8, r15
mov qword [rsp + 0x30], rax
mov rcx, r14
movzx eax, byte [rsp + 0xab]
mov qword [rsp + 0xb8], 0
sub eax, 1
movzx eax, ax
mov dword [rsp + 0x20], eax
call fcn.140196240
mov rdx, qword [r14 + 0x10]
movsx eax, al
cmp eax, dword [rdx]
jne 0x1401976b6
mov rax, qword [rsp + 0xb8]
or byte [r14 + 0x44], 4
mov qword [r14 + 0x68], rax
movzx r8d, word [r14 + 0x3c]
jmp 0x140197499
mov rdi, qword [rsp + 0x90]
lea rdx, str.no_query_solution
mov rcx, rdi
call fcn.140173d40
mov rdx, qword [rsp + 0xa0]
mov rax, rdi
jmp 0x1401974d3
add rsp, 0xc8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov byte [r14 + 0x43], 2
jmp 0x140197482
lea rax, [rsp + 0xb8]
xor r9d, r9d
mov r8, r15
mov rcx, r14
mov qword [rsp + 0x30], rax
mov rax, qword [r15 + 0x18]
mov rdi, qword [rsp + 0x98]
mov qword [rsp + 0xb8], 0
mov rax, qword [rax + rdi - 8]
mov qword [rsp + 0x28], rax
movzx eax, byte [rsp + 0xab]
sub eax, 1
movzx eax, ax
mov dword [rsp + 0x20], eax
call fcn.140196240
mov rdx, qword [r14 + 0x10]
movsx eax, al
cmp eax, dword [rdx]
jne 0x1401974b9
mov rax, qword [rsp + 0xb8]
or byte [r14 + 0x44], 8
mov qword [r14 + 0x68], rax
jmp 0x1401974b9