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

Disassembly:
mov word [rsp + 0x10], dx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xb8
mov rax, qword [rcx]
xor ebx, ebx
movzx ebp, byte [rcx + 0x40]
movzx r13d, dx
cmp ebp, 2
mov qword [rsp + 0x90], rax
mov rdi, rcx
mov dword [rsp + 0x50], ebx
mov r8, qword [rax]
lea esi, [rbx + 1]
lea eax, [rbx + 5]
mov word [rsp + 0x44], bx
lea r12d, [rbx + 0xa]
mov word [rsp + 0x42], bx
cmove r12d, eax
mov qword [rsp + 0x78], rbx
mov rax, qword [rcx + 0x10]
cmp ebp, esi
mov qword [rsp + 0xa8], r8
cmovbe r12d, esi
mov dword [rsp + 0x68], ebp
test rax, rax
je 0x1401186f1
test dx, dx
je 0x1401186f1
mov r15d, dword [rax]
mov dword [rsp + 0x58], r15d
jmp 0x1401186f8
mov r15d, ebx
mov dword [rsp + 0x58], ebx
lea eax, [rbp + 4]
imul eax, r12d
lea ecx, [r15 + rax*8]
add ecx, ecx
movsxd rdx, ecx
mov rcx, r8
call fcn.1400de430
mov qword [rsp + 0x98], rax
test rax, rax
jne 0x140118727
mov eax, 7
jmp 0x140118e82
xor edx, edx
mov ebx, r12d
shl rbx, 5
mov qword [rsp + 0x60], rax
lea r8d, [rdx + 0x20]
lea r14, [rbx + rax]
mov rcx, r14
mov qword [rsp + 0x88], r14
call sub.VCRUNTIME140.dll_memset
mov rdx, qword [rsp + 0x98]
lea rcx, [rbx + r14]
mov r8, rbp
lea eax, [r12 + r12]
shl r8, 3
add rdx, 0x18
xor r11d, r11d
mov qword [rdx], rcx
sub eax, esi
add rcx, r8
lea rdx, [rdx + 0x20]
test eax, eax
jg 0x14011876b
test r15d, r15d
je 0x140118795
movsxd r8, r15d
xor edx, edx
add r8, r8
mov qword [rsp + 0x78], rcx
call sub.VCRUNTIME140.dll_memset
xor r11d, r11d
mov rax, qword [rsp + 0x90]
mov ecx, 0x30
mov eax, dword [rax + 0xc4]
cmp eax, ecx
cmovb ecx, eax
mov word [r14 + 0x10], cx
mov ecx, esi
test r15d, r15d
je 0x1401187ca
or edx, 0xffffffff
movzx eax, r15b
test bpl, bpl
cmovne eax, edx
mov byte [r14 + 0x16], al
mov dword [rsp + 0x54], r11d
mov r8d, r11d
mov r10d, 0x100
test bpl, bpl
je 0x140118c1b
mov rdx, qword [rsp + 0x60]
mov r9, r11
mov qword [rsp + 0x48], r11
mov r13d, r11d
test ecx, ecx
jle 0x140118bbb
mov ebp, dword [rsp + 0x58]
lea rax, [r14 + 0x10]
mov qword [rsp + 0x100], rax
mov r14, qword [rsp + 0x100]
mov eax, ecx
mov qword [rsp + 0x80], rax
mov r15, qword [rdi + 0x58]
test r15, r15
je 0x140118b8b
mov al, byte [r14 + 6]
mov r10, qword [r14 - 0x10]
mov byte [rsp + 0x100], al
mov rax, r10
not rax
mov qword [rsp + 0x70], r11
test qword [r15], rax
jne 0x140118b6c
mov rbx, qword [r15 + 8]
test r10, rbx
jne 0x140118b6c
mov eax, 0x4000
test dword [r15 + 0x28], eax
je 0x14011886e
cmp word [r14], 3
jl 0x140118b6c
movzx eax, word [r14]
movzx ecx, word [r15 + 0x12]
movzx edx, ax
add dx, word [r15 + 0x14]
mov word [rsp + 0x118], ax
call fcn.1400ec274
movzx edx, word [r14 + 4]
movzx ecx, ax
call fcn.1400ec274
or rbx, r10
mov word [rsp + 0x40], ax
movzx eax, word [rsp + 0x118]
add ax, word [r15 + 0x16]
mov r10b, byte [rsp + 0x100]
mov qword [rsp + 0xa0], rbx
lea rbx, [rdi + 0x3c]
mov word [rsp + 0x118], ax
test r10b, r10b
jns 0x1401189a3
movzx r9d, word [rbx]
lea rax, [rsp + 0x70]
mov rdx, qword [rdi + 0x10]
lea r8, [r14 - 0x10]
mov qword [rsp + 0x30], rax
mov rcx, rdi
mov eax, dword [rsp + 0x54]
mov qword [rsp + 0x28], r15
mov word [rsp + 0x20], ax
call fcn.140117e7c
mov rcx, qword [rsp + 0x70]
mov r10b, al
mov qword [rsp + 0x110], rcx
mov byte [rsp + 0x100], al
test al, al
jns 0x1401189af
movzx r8d, word [rsp + 0x40]
movzx edx, r8w
add r8w, 0xfffe
mov r11, qword [rsp + 0x60]
xor eax, eax
mov ecx, eax
mov rbx, r11
test r13d, r13d
jle 0x140118a89
mov r9, qword [rsp + 0xa0]
cmp qword [rbx], r9
jne 0x140118957
mov al, r10b
xor al, byte [rbx + 0x16]
jge 0x140118962
add ecx, esi
add rbx, 0x20
cmp ecx, r13d
jl 0x14011894a
cmp ecx, r13d
jge 0x140118a89
cmp word [rbx + 0x12], dx
jl 0x140118b6c
jne 0x140118abd
movzx eax, word [rsp + 0x118]
cmp word [rbx + 0x10], ax
jl 0x140118b6c
jne 0x140118abd
cmp word [rbx + 0x14], r8w
jle 0x140118b6c
jmp 0x140118abd
mov rax, qword [r14 - 8]
mov qword [rsp + 0x110], rax
movzx r11d, r10b
cmp r11d, ebp
jge 0x14011891e
mov rcx, qword [rsp + 0x78]
movzx r10d, word [rcx + r11*2]
test r10w, r10w
jne 0x140118a65
movzx r9d, word [rsp + 0x108]
mov eax, ebp
sub eax, r11d
imul eax, eax, 0x64
cdq
idiv ebp
movsxd rcx, eax
call fcn.1400ec214
movzx r10d, ax
mov eax, 0x4000
test word [rbx], ax
movzx eax, r9w
je 0x140118a19
cmp word [rdi + 0x3e], ax
jge 0x140118a19
movzx r9d, word [rdi + 0x3e]
mov ecx, 0xa
cmp r9w, cx
jg 0x140118a37
movzx ecx, ax
jmp 0x140118a52
mov ecx, 0x100
test word [rbx], cx
je 0x140118a09
mov ecx, 0xa
cmp ax, cx
jle 0x140118a14
movzx r9d, ax
sub r9w, cx
jmp 0x140118a0e
movsx rcx, r9w
call fcn.1400ec214
movzx ecx, ax
movzx eax, word [rsp + 0x108]
sub ax, 0x21
add cx, ax
sub r10w, 0x32
add r10w, cx
mov rcx, qword [rsp + 0x78]
mov word [rcx + r11*2], r10w
movzx ecx, word [rsp + 0x40]
movzx edx, r10w
call fcn.1400ec274
movzx r8d, word [rsp + 0x40]
mov r10b, byte [rsp + 0x100]
lea edx, [rax + 5]
jmp 0x14011892d
cmp r13d, r12d
jl 0x140118aad
cmp dx, word [rsp + 0x44]
jg 0x140118b6c
jne 0x140118aa7
cmp r8w, word [rsp + 0x42]
jge 0x140118b6c
mov eax, dword [rsp + 0x50]
jmp 0x140118ab3
mov eax, r13d
add r13d, esi
movsxd rbx, eax
shl rbx, 5
add rbx, r11
mov rax, qword [r14 - 0x10]
or rax, qword [r15 + 8]
mov rcx, qword [rbx + 0x18]
mov qword [rbx], rax
mov rax, qword [rsp + 0x110]
mov qword [rbx + 8], rax
movzx eax, word [rsp + 0x118]
mov word [rbx + 0x14], r8w
mov r8, qword [rsp + 0x48]
mov word [rbx + 0x10], ax
mov word [rbx + 0x12], dx
mov byte [rbx + 0x16], r10b
mov rdx, qword [r14 + 8]
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rbx + 0x18]
mov r9, qword [rsp + 0x48]
mov qword [r9 + rax], r15
cmp r13d, r12d
jl 0x140118b71
mov r11, qword [rsp + 0x60]
xor eax, eax
mov dword [rsp + 0x50], eax
mov ecx, esi
movzx r9d, word [r11 + 0x12]
movzx edx, word [r11 + 0x10]
mov word [rsp + 0x44], r9w
mov word [rsp + 0x42], dx
cmp r12d, esi
jbe 0x140118b6c
lea rax, [r11 + 0x34]
cmp word [rax - 2], r9w
jg 0x140118b4a
jne 0x140118b56
cmp word [rax], dx
jle 0x140118b56
movzx r9d, word [rax - 2]
movzx edx, word [rax]
mov dword [rsp + 0x50], ecx
add ecx, esi
add rax, 0x20
cmp ecx, r12d
jl 0x140118b3c
mov word [rsp + 0x42], dx
mov word [rsp + 0x44], r9w
mov r9, qword [rsp + 0x48]
mov r15, qword [r15 + 0x40]
xor r11d, r11d
test r15, r15
jne 0x140118828
mov rax, qword [rsp + 0x80]
jmp 0x140118b90
mov r9, qword [rsp + 0x48]
add r14, 0x20
sub rax, rsi
mov qword [rsp + 0x80], rax
jne 0x14011881b
mov ebp, dword [rsp + 0x68]
mov r14, qword [rsp + 0x88]
mov rdx, qword [rsp + 0x60]
mov r8d, dword [rsp + 0x54]
mov rax, rdx
add r8d, esi
add r9, 8
mov qword [rsp + 0x88], rax
mov dword [rsp + 0x54], r8d
mov rdx, r14
mov qword [rsp + 0x60], rdx
mov r14, rax
mov qword [rsp + 0x48], r9
mov ecx, r13d
cmp r8d, ebp
jl 0x1401187ee
test r13d, r13d
jne 0x140118c0c
mov rcx, qword [rsp + 0x90]
lea rdx, str.no_query_solution
call fcn.1400e02c4
jmp 0x140118e6b
movzx r13d, word [rsp + 0x108]
mov r10d, 0x100
movsxd rax, ecx
mov rbx, r14
mov edx, esi
cmp rax, rsi
jle 0x140118c4e
lea rcx, [r14 + 0x32]
lea r8, [rax - 1]
movzx eax, word [rcx]
cmp word [rbx + 0x12], ax
jle 0x140118c43
movsxd rbx, edx
shl rbx, 5
add rbx, r14
add edx, esi
add rcx, 0x20
sub r8, rsi
jne 0x140118c30
test bpl, bpl
je 0x140118c91
mov r8, r11
mov r9d, ebp
lea rdx, [rdi + 0x394]
mov rax, qword [rbx + 0x18]
mov rcx, qword [r8 + rax]
lea r8, [r8 + 8]
mov qword [rdx + 0x1c], rcx
movzx eax, byte [rcx + 0x10]
imul rcx, rax, 0x70
mov byte [rdx], al
lea rdx, [rdx + 0x60]
mov rax, qword [rdi + 8]
mov ecx, dword [rcx + rax + 0x4c]
mov dword [rdx - 0x90], ecx
sub r9, rsi
jne 0x140118c60
movzx eax, word [rdi + 0x3c]
mov ecx, 0x180
and ax, cx
cmp ax, r10w
jne 0x140118d00
cmp byte [rdi + 0x43], r11b
jne 0x140118d00
test r13w, r13w
je 0x140118d00
mov rax, qword [rbx + 0x18]
lea r8, [rsp + 0x100]
mov qword [rsp + 0x30], r8
movzx edx, bp
sub dx, si
movzx ecx, bpl
mov r9d, 0x80
mov r8, rbx
mov rax, qword [rax + rcx*8 - 8]
mov rcx, rdi
mov qword [rsp + 0x28], rax
mov word [rsp + 0x20], dx
mov rdx, qword [rdi + 0x18]
call fcn.140117e7c
movsx ecx, al
xor r11d, r11d
mov rax, qword [rdi + 0x18]
cmp ecx, dword [rax]
jne 0x140118d00
mov byte [rdi + 0x43], 2
mov ecx, dword [rdi + 0x44]
mov r10, qword [rdi + 0x10]
and ecx, 0xfffffffb
mov dword [rdi + 0x44], ecx
test r10, r10
je 0x140118e5f
test byte [rdi + 0x3c], 0x80
movsx r8d, byte [rbx + 0x16]
je 0x140118d32
cmp r8d, dword [r10]
jne 0x140118d2a
mov byte [rdi + 0x43], 2
mov rdx, r10
jmp 0x140118def
mov byte [rdi + 0x41], r8b
mov rdx, r10
mov rax, qword [rbx + 8]
mov qword [rdi + 0x68], rax
test r8b, r8b
jg 0x140118dd9
mov byte [rdi + 0x41], r11b
test bpl, bpl
je 0x140118def
mov rax, qword [rbx + 0x18]
movzx ecx, bpl
mov r11, qword [rax + rcx*8 - 8]
mov ecx, 0x104
mov eax, dword [r11 + 0x28]
and eax, ecx
cmp eax, ecx
setne cl
bt dword [r11 + 0x28], 0xc
setae al
test al, cl
je 0x140118dd4
xor eax, eax
lea rcx, [rsp + 0x100]
mov qword [rsp + 0x30], rcx
mov r9d, 0x800
mov qword [rsp + 0x100], rax
mov r8, rbx
movzx eax, bp
mov qword [rsp + 0x28], r11
sub ax, si
mov rcx, rdi
mov word [rsp + 0x20], ax
call fcn.140117e7c
mov rdx, qword [rdi + 0x10]
movsx ecx, al
cmp ecx, dword [rdx]
jne 0x140118dd4
mov rax, qword [rsp + 0x100]
or dword [rdi + 0x44], 4
mov qword [rdi + 0x68], rax
xor r11d, r11d
jmp 0x140118def
test bpl, bpl
je 0x140118def
cmp r8b, sil
jne 0x140118def
test byte [rdi + 0x3c], 3
je 0x140118def
or ecx, 4
mov dword [rdi + 0x44], ecx
mov eax, 0x200
test word [rdi + 0x3c], ax
je 0x140118e5f
movsx eax, byte [rdi + 0x41]
cmp eax, dword [rdx]
jne 0x140118e5f
test bpl, bpl
je 0x140118e5f
mov rax, qword [rbx + 0x18]
lea r8, [rsp + 0x100]
mov qword [rsp + 0x30], r8
xor r9d, r9d
movzx ecx, bpl
mov r8, rbx
sub bp, si
mov qword [rsp + 0x100], r11
mov rax, qword [rax + rcx*8 - 8]
mov rcx, rdi
mov qword [rsp + 0x28], rax
mov word [rsp + 0x20], bp
call fcn.140117e7c
movsx ecx, al
mov rax, qword [rdi + 0x10]
cmp ecx, dword [rax]
jne 0x140118e5f
mov rax, qword [rsp + 0x100]
or dword [rdi + 0x44], 8
mov qword [rdi + 0x68], rax
movzx eax, word [rbx + 0x10]
mov word [rdi + 0x48], ax
xor eax, eax
mov esi, eax
mov rdx, qword [rsp + 0x98]
mov rcx, qword [rsp + 0xa8]
call fcn.1400de378
mov eax, esi
add rsp, 0xb8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret