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

Disassembly:
sub esp, 0x64
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x78]
xor edx, edx
push 0xa
pop ebx
push 5
mov al, byte [edi + 0x2c]
mov esi, dword [edi]
movzx ecx, al
mov byte [esp + 0x15], al
cmp ecx, 2
pop eax
cmove ebx, eax
mov dword [esp + 0x58], edx
xor eax, eax
mov dword [esp + 0x44], edx
inc eax
mov dword [esp + 0x40], edx
cmp ecx, eax
mov dword [esp + 0x60], edx
mov dword [esp + 0x5c], esi
cmovbe ebx, eax
mov dword [esp + 0x2c], ecx
mov eax, dword [edi + 8]
mov dword [esp + 0x1c], ebx
test eax, eax
je 0x596e7b
cmp word [esp + 0x7c], dx
je 0x596e7b
mov edx, dword [eax]
mov ebp, ecx
mov dword [esp + 0x34], edx
shl ebp, 2
lea eax, [ebp + 0x20]
imul eax, ebx
add eax, edx
add eax, eax
cdq
push edx
push eax
push dword [esi]
call fcn.00560346
add esp, 0xc
mov dword [esp + 0x70], eax
test eax, eax
jne 0x596eab
push 7
pop eax
jmp 0x59752a
mov esi, ebx
mov dword [esp + 0x28], eax
shl esi, 5
push 0x20
push 0
lea ebx, [esi + eax]
push ebx
mov dword [esp + 0x74], ebx
call sub.VCRUNTIME140.dll_memset
mov edx, dword [esp + 0x7c]
lea ecx, [esi + ebx]
mov esi, dword [esp + 0x28]
add esp, 0xc
add edx, 0x18
lea eax, [esi + esi]
mov dword [edx], ecx
dec eax
add ecx, ebp
lea edx, [edx + 0x20]
test eax, eax
jg 0x596ed9
mov edx, dword [esp + 0x34]
test edx, edx
je 0x596f04
lea eax, [edx + edx]
mov dword [esp + 0x60], ecx
push eax
push 0
push ecx
call sub.VCRUNTIME140.dll_memset
mov edx, dword [esp + 0x40]
add esp, 0xc
mov eax, dword [esp + 0x5c]
push 0x30
movzx ecx, word [eax + 0x9c]
pop eax
cmp cx, ax
jge 0x596f19
mov eax, ecx
mov cl, byte [esp + 0x11]
xor esi, esi
inc esi
mov word [ebx + 0x10], ax
mov eax, esi
mov dword [esp + 0x48], eax
test edx, edx
je 0x596f3e
movzx eax, dl
or edx, 0xffffffff
test cl, cl
cmovne eax, edx
mov byte [ebx + 0x16], al
mov eax, esi
and dword [esp + 0x30], 0
mov ebp, dword [esp + 0x2c]
test cl, cl
je 0x5972ff
mov ecx, dword [esp + 0x28]
mov esi, dword [esp + 0x30]
xor edx, edx
mov dword [esp + 0x20], edx
test eax, eax
jle 0x5972b8
lea esi, [ebx + 0x10]
mov ebx, dword [esp + 0x1c]
mov dword [esp + 0x14], esi
mov ebp, dword [edi + 0x40]
mov dword [esp + 0x18], ebp
test ebp, ebp
je 0x597294
mov ecx, dword [esi - 0x10]
mov eax, dword [esi - 0xc]
not ecx
and ecx, dword [ebp]
not eax
and eax, dword [ebp + 4]
or ecx, eax
jne 0x59727d
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov dword [esp + 0x38], ecx
mov ecx, eax
and ecx, dword [esi - 0x10]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x38]
and eax, dword [esi - 0xc]
or ecx, eax
jne 0x59727d
test dword [ebp + 0x2c], 0x4000
je 0x596fce
push 3
pop eax
cmp word [esi], ax
jl 0x59727d
mov eax, dword [esp + 0x14]
movzx esi, word [esi]
movzx eax, word [eax + 4]
push eax
mov ax, word [ebp + 0x14]
add ax, si
movzx eax, ax
push eax
movzx eax, word [ebp + 0x12]
push eax
call fcn.0056caa5
pop ecx
pop ecx
movzx eax, ax
push eax
call fcn.0056caa5
mov edx, dword [esp + 0x44]
movzx eax, ax
mov dword [esp + 0x2c], eax
mov ax, word [ebp + 0x16]
add ax, si
movzx eax, ax
mov dword [esp + 0x6c], eax
mov eax, dword [esp + 0x1c]
pop ecx
pop ecx
lea ecx, [eax - 0x10]
or edx, dword [ecx]
mov dword [esp + 0x3c], edx
mov edx, dword [esp + 0x38]
or edx, dword [ecx + 4]
mov dword [esp + 0x38], edx
mov dl, byte [eax + 6]
mov byte [esp + 0x12], dl
test dl, dl
jns 0x597111
lea eax, [esp + 0x4c]
xorps xmm0, xmm0
push eax
movzx eax, word [edi + 0x28]
push ebp
push dword [esp + 0x38]
movlpd qword [esp + 0x58], xmm0
push eax
push ecx
push dword [edi + 8]
push edi
call fcn.005965d8
mov ecx, dword [esp + 0x6c]
mov dl, al
add esp, 0x1c
mov dword [esp + 0x54], ecx
mov ecx, dword [esp + 0x4c]
mov byte [esp + 0x12], dl
mov dword [esp + 0x4c], ecx
test dl, dl
jns 0x59711f
mov eax, dword [esp + 0x24]
movzx esi, ax
sub eax, 2
mov dword [esp + 0x24], eax
mov edx, dword [esp + 0x20]
xor ecx, ecx
mov eax, dword [esp + 0x28]
mov ebp, eax
test edx, edx
jle 0x597176
mov eax, dword [esp + 0x3c]
mov ebx, dword [esp + 0x38]
cmp dword [ebp], eax
jne 0x5970c0
cmp dword [ebp + 4], ebx
jne 0x5970c0
mov al, byte [ebp + 0x16]
xor al, byte [esp + 0x12]
jge 0x5970c8
mov eax, dword [esp + 0x3c]
inc ecx
add ebp, 0x20
cmp ecx, edx
jl 0x5970a9
mov ebx, dword [esp + 0x1c]
cmp ecx, edx
jge 0x597172
movzx eax, word [ebp + 0x12]
cmp ax, si
jl 0x597104
jne 0x5971a6
movzx eax, word [ebp + 0x10]
mov ecx, dword [esp + 0x64]
cmp ax, cx
jl 0x597104
jne 0x5971a6
mov eax, dword [esp + 0x24]
cmp word [ebp + 0x14], ax
jg 0x5971a6
mov ebp, dword [esp + 0x18]
mov esi, dword [esp + 0x14]
jmp 0x597281
mov ecx, dword [eax - 8]
mov eax, dword [eax - 4]
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x54], eax
movzx esi, dl
mov edx, dword [esp + 0x34]
cmp esi, edx
jge 0x59707f
mov ebp, dword [esp + 0x60]
movzx eax, word [ebp + esi*2]
mov ecx, eax
test ax, ax
jne 0x597158
push esi
push edx
push dword [esp + 0x84]
push edi
call fcn.00597c9c
add esp, 0x10
movzx ecx, ax
mov word [ebp + esi*2], ax
push ecx
push dword [esp + 0x28]
call fcn.0056caa5
pop ecx
pop ecx
push 3
pop ecx
add ax, cx
movzx esi, ax
jmp 0x59708d
mov eax, dword [esp + 0x28]
cmp edx, ebx
jl 0x59719a
mov ecx, dword [esp + 0x44]
cmp si, cx
jg 0x597104
jne 0x597194
mov ecx, dword [esp + 0x40]
cmp word [esp + 0x24], cx
jge 0x597104
mov ebp, dword [esp + 0x58]
jmp 0x5971a1
mov ebp, edx
inc edx
mov dword [esp + 0x20], edx
shl ebp, 5
add ebp, eax
mov ebx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov eax, dword [ebx - 0xc]
or eax, dword [edx + 0xc]
mov ecx, dword [ebx - 0x10]
or ecx, dword [edx + 8]
mov dword [ebp + 4], eax
mov eax, dword [esp + 0x4c]
mov dword [ebp + 8], eax
mov eax, dword [esp + 0x54]
mov dword [ebp + 0xc], eax
mov eax, dword [esp + 0x64]
mov word [ebp + 0x12], si
mov esi, dword [esp + 0x30]
mov word [ebp + 0x10], ax
mov eax, dword [esp + 0x24]
mov word [ebp + 0x14], ax
mov al, byte [esp + 0x12]
shl esi, 2
push esi
mov dword [ebp], ecx
mov byte [ebp + 0x16], al
push dword [ebx + 8]
push dword [ebp + 0x18]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp + 0x18]
add esp, 0xc
mov ebp, dword [esp + 0x18]
mov edx, dword [esp + 0x20]
mov dword [esi + eax], ebp
mov esi, dword [esp + 0x1c]
cmp edx, esi
jl 0x5972f5
mov ebx, dword [esp + 0x28]
and dword [esp + 0x58], 0
movzx eax, word [ebx + 0x12]
mov dword [esp + 0x44], eax
movzx eax, word [ebx + 0x10]
mov dword [esp + 0x40], eax
xor eax, eax
inc eax
mov ecx, eax
cmp esi, eax
jbe 0x5972f5
mov edi, dword [esp + 0x40]
lea eax, [ebx + 0x34]
mov ebx, dword [esp + 0x44]
movzx edx, word [eax - 2]
cmp dx, bx
jg 0x59725a
jne 0x597263
cmp word [eax], di
jle 0x597263
movzx edi, word [eax]
mov ebx, edx
mov dword [esp + 0x58], ecx
inc ecx
add eax, 0x20
cmp ecx, esi
jl 0x59724a
mov dword [esp + 0x44], ebx
mov ebx, esi
mov esi, dword [esp + 0x14]
mov dword [esp + 0x40], edi
mov edi, dword [esp + 0x78]
mov edx, dword [esp + 0x20]
mov ebp, dword [ebp + 0x3c]
mov dword [esp + 0x18], ebp
test ebp, ebp
jne 0x596f7f
mov eax, dword [esp + 0x48]
add esi, 0x20
sub eax, 1
mov dword [esp + 0x14], esi
mov dword [esp + 0x48], eax
jne 0x596f70
mov ebx, dword [esp + 0x68]
mov ebp, dword [esp + 0x2c]
mov ecx, dword [esp + 0x28]
mov esi, dword [esp + 0x30]
mov eax, ecx
inc esi
mov dword [esp + 0x30], esi
mov ecx, ebx
mov dword [esp + 0x28], ecx
mov ebx, eax
mov dword [esp + 0x68], ebx
mov eax, edx
mov dword [esp + 0x48], eax
cmp esi, ebp
jl 0x596f57
test edx, edx
jne 0x5972fc
push str.no_query_solution
push dword [esp + 0x60]
call fcn.00561f37
pop ecx
xor esi, esi
pop ecx
inc esi
jmp 0x597517
mov ebx, esi
jmp 0x597108
xor esi, esi
inc esi
cmp eax, esi
jle 0x59731c
lea ecx, [ebx + 0x20]
lea edx, [eax - 1]
mov ax, word [ebx + 0x12]
cmp ax, word [ecx + 0x12]
cmovg ebx, ecx
add ecx, 0x20
sub edx, 1
jne 0x597309
xor esi, esi
cmp byte [esp + 0x11], 0
jbe 0x597354
lea edx, [edi + 0x334]
mov eax, dword [ebx + 0x18]
mov eax, dword [eax + esi*4]
mov dword [edx + 0x14], eax
mov al, byte [eax + 0x10]
mov byte [edx], al
lea edx, [edx + 0x60]
movzx eax, al
imul ecx, eax, 0x48
inc esi
mov eax, dword [edi + 4]
mov eax, dword [ecx + eax + 0x34]
mov dword [edx - 0x98], eax
cmp esi, ebp
jl 0x59732b
mov ax, word [edi + 0x28]
mov ecx, 0x180
and ax, cx
add ecx, 0xffffff80
cmp ax, cx
jne 0x5973a6
cmp byte [edi + 0x2f], 0
jne 0x5973a6
cmp word [esp + 0x7c], 0
je 0x5973a6
lea eax, [esp + 0x68]
push eax
mov eax, dword [ebx + 0x18]
push dword [eax + ebp*4 - 4]
lea eax, [ebp - 1]
push eax
push 0x80
push ebx
push dword [edi + 0xc]
push edi
call fcn.005965d8
movsx ecx, al
add esp, 0x1c
mov eax, dword [edi + 0xc]
cmp ecx, dword [eax]
jne 0x5973a6
mov byte [edi + 0x2f], 2
mov edx, dword [edi + 0x30]
mov ebp, dword [edi + 8]
and edx, 0xfffffffb
mov dword [edi + 0x30], edx
test ebp, ebp
je 0x59750d
mov cl, byte [ebx + 0x16]
movzx eax, word [edi + 0x28]
mov byte [esp + 0x78], cl
mov byte [edi + 0x2d], cl
test al, al
jns 0x5973f8
movsx eax, byte [ebx + 0x16]
cmp eax, dword [ebp]
jne 0x5973d9
mov byte [edi + 0x2f], 2
mov eax, dword [edi + 0x10]
mov edx, dword [eax + 0x30]
test edx, edx
je 0x5973ef
movsx eax, cl
cmp eax, dword [edx]
jle 0x5973ef
mov al, byte [edx]
mov byte [edi + 0x2d], al
mov cl, byte [esp + 0x11]
jmp 0x5974ae
mov eax, dword [ebx + 8]
mov esi, ebp
mov ecx, dword [ebx + 0xc]
mov dword [edi + 0x48], eax
mov al, byte [esp + 0x78]
mov dword [edi + 0x4c], ecx
test al, al
jg 0x597492
cmp byte [esp + 0x11], 0
mov byte [edi + 0x2d], 0
jbe 0x59748c
mov ecx, dword [esp + 0x2c]
mov eax, dword [ebx + 0x18]
mov eax, dword [eax + ecx*4 - 4]
mov ecx, 0x104
mov dword [esp + 0x78], eax
mov edx, dword [eax + 0x2c]
mov eax, edx
and eax, ecx
cmp eax, ecx
setne cl
bt edx, 0xc
setae al
test al, cl
je 0x59748c
lea eax, [esp + 0x68]
xorps xmm0, xmm0
push eax
push dword [esp + 0x7c]
mov eax, dword [esp + 0x34]
dec eax
movlpd qword [esp + 0x70], xmm0
push eax
push 0x800
push ebx
push ebp
push edi
call fcn.005965d8
mov esi, dword [edi + 8]
add esp, 0x1c
movsx eax, al
cmp eax, dword [esi]
jne 0x59748c
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x6c]
or dword [edi + 0x30], 4
mov dword [edi + 0x48], eax
mov dword [edi + 0x4c], ecx
mov cl, byte [esp + 0x11]
jmp 0x5974b0
mov cl, byte [esp + 0x11]
test cl, cl
je 0x5974b0
mov esi, ebp
cmp al, 1
jne 0x5974b0
movzx eax, word [edi + 0x28]
test al, 3
je 0x5974b0
or edx, 4
mov dword [edi + 0x30], edx
mov esi, ebp
mov eax, 0x200
test word [edi + 0x28], ax
je 0x59750d
movsx eax, byte [edi + 0x2d]
cmp eax, dword [esi]
jne 0x59750d
test cl, cl
je 0x59750d
mov ecx, dword [esp + 0x2c]
lea eax, [esp + 0x68]
push eax
mov eax, dword [ebx + 0x18]
xorps xmm0, xmm0
movlpd qword [esp + 0x6c], xmm0
push dword [eax + ecx*4 - 4]
lea eax, [ecx - 1]
push eax
push 0
push ebx
push esi
push edi
call fcn.005965d8
movsx ecx, al
add esp, 0x1c
mov eax, dword [edi + 8]
cmp ecx, dword [eax]
jne 0x59750d
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x6c]
or dword [edi + 0x30], 8
mov dword [edi + 0x48], eax
mov dword [edi + 0x4c], ecx
mov ax, word [ebx + 0x10]
xor esi, esi
mov word [edi + 0x34], ax
mov eax, dword [esp + 0x5c]
push dword [esp + 0x70]
push dword [eax]
call fcn.00560283
pop ecx
pop ecx
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret